WebKit Bugzilla
Attachment 369985 Details for
Bug 197891
: [IntersectionObserver] Regression: No initial observation when nothing else triggers rendering
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-197891-20190515160324.patch (text/plain), 4.14 KB, created by
Ali Juma
on 2019-05-15 13:03:25 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Ali Juma
Created:
2019-05-15 13:03:25 PDT
Size:
4.14 KB
patch
obsolete
>Subversion Revision: 245304 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 5def6e694399947cf897b2c98cd8301f47f35135..69b036954d7eea5450772009716e059db62c4147 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,17 @@ >+2019-05-15 Ali Juma <ajuma@chromium.org> >+ >+ [IntersectionObserver] Regression: No initial observation when nothing else triggers rendering >+ https://bugs.webkit.org/show_bug.cgi?id=197891 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Schedule a rendering update whenever a new IntersectionObserver target is added. >+ >+ Test: intersection-observer/initial-observation.html >+ >+ * page/IntersectionObserver.cpp: >+ (WebCore::IntersectionObserver::observe): >+ > 2019-05-14 Robin Morisset <rmorisset@apple.com> > > [WHLSL] parseEffectfulAssignment should not call parseCallExpression directly >diff --git a/Source/WebCore/page/IntersectionObserver.cpp b/Source/WebCore/page/IntersectionObserver.cpp >index 1836278f12c40d2c5634adc9c88a19dc29273ca3..669b86f54b925dd281f05ba18c58573f30b1a680 100644 >--- a/Source/WebCore/page/IntersectionObserver.cpp >+++ b/Source/WebCore/page/IntersectionObserver.cpp >@@ -158,6 +158,7 @@ void IntersectionObserver::observe(Element& target) > auto* document = trackingDocument(); > if (!hadObservationTargets) > document->addIntersectionObserver(*this); >+ document->scheduleRenderingUpdate(); > } > > void IntersectionObserver::unobserve(Element& target) >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index d368e06525747969c980353e5ea60018476bc58d..ce70355247a26fb5991f769272d4940117f0720a 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,16 @@ >+2019-05-15 Ali Juma <ajuma@chromium.org> >+ >+ [IntersectionObserver] Regression: No initial observation when nothing else triggers rendering >+ https://bugs.webkit.org/show_bug.cgi?id=197891 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Add a test where other timers that can schedule rendering updates are disabled, >+ in order to verify that IntersectionObserver is scheduling rendering updates >+ itself. >+ >+ * intersection-observer/initial-observation.html: Added. >+ > 2019-05-14 Ali Juma <ajuma@chromium.org> > > [IntersectionObserver] Update expectations for tests that are no longer flaky >diff --git a/LayoutTests/intersection-observer/initial-observation-expected.txt b/LayoutTests/intersection-observer/initial-observation-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..b6bd13fa8f06b16ed049b7314b4b4c2ba82b6b23 >--- /dev/null >+++ b/LayoutTests/intersection-observer/initial-observation-expected.txt >@@ -0,0 +1,3 @@ >+ >+PASS An initial observation is fired even when nothing else triggers rendering >+ >diff --git a/LayoutTests/intersection-observer/initial-observation.html b/LayoutTests/intersection-observer/initial-observation.html >new file mode 100644 >index 0000000000000000000000000000000000000000..6292047e4dfc0d5dcb08c40ee667979c0d2ecff1 >--- /dev/null >+++ b/LayoutTests/intersection-observer/initial-observation.html >@@ -0,0 +1,39 @@ >+<!DOCTYPE html> >+<script src="../resources/testharness.js"></script> >+<script src="../resources/testharnessreport.js"></script> >+ >+<script> >+if (window.internals) { >+ // Disable timers that trigger delayed flushes, since these will make >+ // this test pass spuriously, even if IntersectionObserver never >+ // schedules any rendering updates. >+ internals.setSpeculativeTilingDelayDisabledForTesting(true); >+ internals.disableTileSizeUpdateDelay(); >+} >+ >+window.onload = function() { >+async_test((t) => { >+ var observer = new IntersectionObserver(t.step_func_done(() => { >+ observer.disconnect(); >+ })); >+ requestAnimationFrame(() => { >+ requestAnimationFrame(() => { >+ setTimeout(() => { >+ observer.observe(document.getElementById("target")); >+ }, 0); >+ }); >+ }); >+}, "An initial observation is fired even when nothing else triggers rendering"); >+}; >+</script> >+ >+<style> >+#target { >+ width: 100px; >+ height: 100px; >+ background-color: green; >+} >+</style> >+ >+<div id="target"></div> >+
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 197891
:
369885
| 369985