WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Patch
bug-138873-20141119094210.patch (text/plain), 3.95 KB, created by
Chris Dumez
on 2014-11-19 09:41:57 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Chris Dumez
Created:
2014-11-19 09:41:57 PST
Size:
3.95 KB
patch
obsolete
>Subversion Revision: 176318 >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index 3cf3d7f0cd5d351d3669141f7ed983a22665c8d6..00947dd706f0272fd8823d23d136ed466e13597f 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,20 @@ >+2014-11-19 Chris Dumez <cdumez@apple.com> >+ >+ Add layout test for DOM timers throttling and 0 height element with visible overflowing content >+ https://bugs.webkit.org/show_bug.cgi?id=138873 >+ >+ Reviewed by Simon Fraser. >+ >+ Add a layout test for verify that a DOM timer changing the style of a 0 >+ height element with visible overflowing content does not get throttled. >+ If the implementation did not properly use the overflow rect to >+ determine if the element is visible, this test would fail. >+ >+ This covers the case of the top scrolling banner on huffingtonpost.com. >+ >+ * fast/dom/repeating-timer-element-overflow-throttling-expected.txt: Added. >+ * fast/dom/repeating-timer-element-overflow-throttling.html: Added. >+ > 2014-11-19 Chris Fleizach <cfleizach@apple.com> > > AX: Screen braille input doesn't work on forms. >diff --git a/LayoutTests/fast/dom/repeating-timer-element-overflow-throttling-expected.txt b/LayoutTests/fast/dom/repeating-timer-element-overflow-throttling-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..a4c20c19115ccdcff7d1a348535757e39610f3c1 >--- /dev/null >+++ b/LayoutTests/fast/dom/repeating-timer-element-overflow-throttling-expected.txt >@@ -0,0 +1,17 @@ >+Tests that a repeating timer changing the style of an element with 0 height and visible overflowing content does not get throttled. >+ >+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". >+ >+ >+PASS testElement.offsetHeight is 0 >+The timer should initially not be throttled. >+PASS internals.isTimerThrottled(timeoutId) is false >+5th iteration, timer should not have been throttled. >+PASS wasThrottled is false >+6th iteration, timer should still be unthrottled. >+PASS internals.isTimerThrottled(timeoutId) is false >+PASS successfullyParsed is true >+ >+TEST COMPLETE >+test1 >+test2 >diff --git a/LayoutTests/fast/dom/repeating-timer-element-overflow-throttling.html b/LayoutTests/fast/dom/repeating-timer-element-overflow-throttling.html >new file mode 100644 >index 0000000000000000000000000000000000000000..bf499865eb07e8ed13f3f5f331a6fb5f8abc4909 >--- /dev/null >+++ b/LayoutTests/fast/dom/repeating-timer-element-overflow-throttling.html >@@ -0,0 +1,45 @@ >+<!DOCTYPE html> >+<body> >+<script src="../../resources/js-test-pre.js"></script> >+<ul id="testElement" style="height: 0;"> >+<li>test1</li> >+<li>test2</li> >+</ul> >+<script> >+description("Tests that a repeating timer changing the style of an element with 0 height and visible overflowing content does not get throttled."); >+jsTestIsAsync = true; >+ >+var iterationCount = 0; >+var timeoutId; >+var testElement = document.getElementById("testElement"); >+var wasThrottled = false; >+ >+function timerCallback() >+{ >+ ++iterationCount; >+ // Interact with the style of the element. >+ testElement.style["left"] = "" + iterationCount + "px"; >+ >+ // 5 iterations should suffice to throttle the timer. >+ if (iterationCount == 5) { >+ // Do not use shouldBeTrue() here because it would cause a DOM tree mutation and >+ // unthrottle the DOM Timer. >+ wasThrottled = internals.isTimerThrottled(timeoutId); >+ } else if (iterationCount == 6) { >+ debug("5th iteration, timer should not have been throttled."); >+ shouldBeFalse("wasThrottled"); >+ debug("6th iteration, timer should still be unthrottled."); >+ shouldBeFalse("internals.isTimerThrottled(timeoutId)"); >+ clearInterval(timeoutId); >+ finishJSTest(); >+ } >+} >+ >+shouldBe("testElement.offsetHeight", "0"); >+ >+timeoutId = setInterval(timerCallback, 0); >+debug("The timer should initially not be throttled."); >+shouldBeFalse("internals.isTimerThrottled(timeoutId)"); >+</script> >+<script src="../../resources/js-test-post.js"></script> >+</body>
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 138873
:
241864
| 241865