-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 306344 - Use transform animations to implement marquee. r=smaug,f…
…irefox-animation-reviewers,boris This matches what chromium does, and is both simpler and prettier. The overflow: hidden enforcement also matches chromium / WebKit via: https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/css/resolver/style_adjuster.cc;l=482;drc=88c8510c16d44e0dc8c07426db31aa5bb3c90a2b https://searchfox.org/wubkat/rev/473ca5f8512b88edd7e82c8783e7e09158f17ba1/Source/WebCore/style/StyleAdjuster.cpp#581-596 See also whatwg/html#10243 and the resets.html change. Adding white-space: nowrap isn't strictly necessary, but also matches other implementations: https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/html/html_marquee_element.cc;l=66;drc=4aba604f0aae6fb93eab830b68765604e9a2cca0 (and same link as above on WebKit) Differential Revision: https://phabricator.services.mozilla.com/D206357
- Loading branch information
Showing
17 changed files
with
291 additions
and
359 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
<div style="background-color: lime; height: 50px;"><div style="background: green; width: 50px; margin-left: auto; margin-right: 0;"> </div></div> | ||
<div style="background-color: lime; height: 50px;"><div style="background: green; width: 50px;"> </div></div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
<table><marquee behavior="alternate" scrollamount="0" style="background-color: lime; height: 50px;"><div style="background: green; width: 50px"> </div></marquee><span><title> | ||
<table><marquee behavior="alternate" scrollamount="0" style="background-color: lime; height: 50px;"><div style="background: green; width: 50px"> </div></marquee><span><title> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<html> | ||
<body dir="rtl"> | ||
<div style="background: green; width: 50px"> </div> | ||
</body> | ||
</html> |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 0 additions & 3 deletions
3
...tml/obsolete/requirements-for-implementations/the-marquee-element-0/marquee-loop.html.ini
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
...lete/requirements-for-implementations/the-marquee-element-0/marquee-scrollamount.html.ini
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
...olete/requirements-for-implementations/the-marquee-element-0/marquee-scrolldelay.html.ini
This file was deleted.
Oops, something went wrong.
18 changes: 18 additions & 0 deletions
18
...tml/obsolete/requirements-for-implementations/the-marquee-element-0/marquee-overflow.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<!doctype html> | ||
<meta charset="utf-8"> | ||
<title>Marquee forces overflow: hidden</title> | ||
<link rel="help" href="https://html.spec.whatwg.org/#the-marquee-element"> | ||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
<marquee style="overflow: visible"> </marquee> | ||
<marquee style="overflow: scroll"> </marquee> | ||
<marquee style="overflow: clip"> </marquee> | ||
<marquee style="overflow: auto"> </marquee> | ||
|
||
<script> | ||
test(() => { | ||
for (let m of document.querySelectorAll("marquee")) { | ||
assert_equals(getComputedStyle(m).overflow, "hidden", m.style); | ||
} | ||
}, "Marquee should have overflow: hidden !important in the UA stylesheet"); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.