Changeset 251567 in webkit
- Timestamp:
- Oct 24, 2019 3:40:07 PM (5 years ago)
- Location:
- trunk
- Files:
-
- 2 deleted
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r251565 r251567 1 2019-10-24 Commit Queue <commit-queue@webkit.org> 2 3 Unreviewed, rolling out r251269, r251294, and r251328. 4 https://bugs.webkit.org/show_bug.cgi?id=203384 5 6 Probably made many animation tests flaky (Requested by rniwa 7 on #webkit). 8 9 Reverted changesets: 10 11 "Integrate resize event with HTML5 event loop" 12 https://bugs.webkit.org/show_bug.cgi?id=202964 13 https://trac.webkit.org/changeset/251269 14 15 "Flaky Test: fast/events/resize-subframe-in-rendering- 16 update.html" 17 https://bugs.webkit.org/show_bug.cgi?id=203140 18 https://trac.webkit.org/changeset/251294 19 20 "Flaky Test: fast/events/resize-subframe-in-rendering- 21 update.html" 22 https://bugs.webkit.org/show_bug.cgi?id=203140 23 https://trac.webkit.org/changeset/251328 24 1 25 2019-10-24 Sihui Liu <sihui_liu@apple.com> 2 26 -
trunk/LayoutTests/fast/shadow-dom/trusted-event-scoped-flags.html
r251269 r251567 111 111 112 112 iframe.onload = function () { 113 requestAnimationFrame(function () { 113 iframe.contentDocument.body.getBoundingClientRect(); 114 log(iframe.contentWindow, "resize"); 115 setTimeout(function () { 116 iframe.style.width = '200px'; 117 iframe.style.height = '200px'; 118 iframe.contentDocument.body.getBoundingClientRect(); 114 119 setTimeout(function () { 115 iframe.contentDocument.body.getBoundingClientRect(); 116 log(iframe.contentWindow, "resize"); 117 iframe.style.width = '200px'; 118 iframe.style.height = '200px'; 119 iframe.contentDocument.body.getBoundingClientRect(); 120 requestAnimationFrame(function () { 121 checkFlags('', {eventType: 'resize', composed: false}); 122 finishJSTest(); 123 }); 120 checkFlags('', {eventType: 'resize', composed: false}); 121 finishJSTest(); 124 122 }, 0); 125 } );123 }, 0); 126 124 } 127 125 -
trunk/Source/WebCore/ChangeLog
r251558 r251567 1 2019-10-24 Commit Queue <commit-queue@webkit.org> 2 3 Unreviewed, rolling out r251269, r251294, and r251328. 4 https://bugs.webkit.org/show_bug.cgi?id=203384 5 6 Probably made many animation tests flaky (Requested by rniwa 7 on #webkit). 8 9 Reverted changesets: 10 11 "Integrate resize event with HTML5 event loop" 12 https://bugs.webkit.org/show_bug.cgi?id=202964 13 https://trac.webkit.org/changeset/251269 14 15 "Flaky Test: fast/events/resize-subframe-in-rendering- 16 update.html" 17 https://bugs.webkit.org/show_bug.cgi?id=203140 18 https://trac.webkit.org/changeset/251294 19 20 "Flaky Test: fast/events/resize-subframe-in-rendering- 21 update.html" 22 https://bugs.webkit.org/show_bug.cgi?id=203140 23 https://trac.webkit.org/changeset/251328 24 1 25 2019-10-23 Ryosuke Niwa <rniwa@webkit.org> 2 26 -
trunk/Source/WebCore/dom/Document.cpp
r251558 r251567 224 224 #include "VisibilityChangeClient.h" 225 225 #include "VisitedLinkState.h" 226 #include "VisualViewport.h"227 226 #include "WebAnimation.h" 228 227 #include "WheelEvent.h" … … 3967 3966 } 3968 3967 3969 void Document::setNeedsDOMWindowResizeEvent()3970 {3971 m_needsDOMWindowResizeEvent = true;3972 scheduleTimedRenderingUpdate();3973 }3974 3975 void Document::setNeedsVisualViewportResize()3976 {3977 m_needsVisualViewportResizeEvent = true;3978 scheduleTimedRenderingUpdate();3979 }3980 3981 // https://drafts.csswg.org/cssom-view/#run-the-resize-steps3982 void Document::runResizeSteps()3983 {3984 // FIXME: The order of dispatching is not specified: https://github.com/WICG/visual-viewport/issues/65.3985 if (m_needsDOMWindowResizeEvent) {3986 LOG(Events, "Document %p sending resize events to window", this);3987 m_needsDOMWindowResizeEvent = false;3988 dispatchWindowEvent(Event::create(eventNames().resizeEvent, Event::CanBubble::No, Event::IsCancelable::No));3989 }3990 if (m_needsVisualViewportResizeEvent) {3991 LOG(Events, "Document %p sending resize events to visualViewport", this);3992 m_needsVisualViewportResizeEvent = false;3993 if (auto* window = domWindow())3994 window->visualViewport().dispatchEvent(Event::create(eventNames().resizeEvent, Event::CanBubble::No, Event::IsCancelable::No));3995 }3996 }3997 3998 3968 void Document::addAudioProducer(MediaProducer& audioProducer) 3999 3969 { -
trunk/Source/WebCore/dom/Document.h
r251558 r251567 1361 1361 void updateViewportUnitsOnResize(); 1362 1362 1363 void setNeedsDOMWindowResizeEvent();1364 void setNeedsVisualViewportResize();1365 void runResizeSteps();1366 1367 1363 WEBCORE_EXPORT void addAudioProducer(MediaProducer&); 1368 1364 WEBCORE_EXPORT void removeAudioProducer(MediaProducer&); … … 2017 2013 2018 2014 bool m_hasStyleWithViewportUnits { false }; 2019 bool m_needsDOMWindowResizeEvent { false };2020 bool m_needsVisualViewportResizeEvent { false };2021 2015 bool m_isTimerThrottlingEnabled { false }; 2022 2016 bool m_isSuspended { false }; -
trunk/Source/WebCore/page/FrameView.cpp
r251369 r251567 3423 3423 #endif 3424 3424 3425 LOG(Events, "FrameView %p sendResizeEventIfNeeded scheduling resize event for document %p, size %dx%d", this, frame().document(), currentSize.width(), currentSize.height());3426 frame().document()->setNeedsDOMWindowResizeEvent();3427 3428 3425 bool isMainFrame = frame().isMainFrame(); 3426 bool canSendResizeEventSynchronously = isMainFrame && !m_shouldAutoSize; 3427 3428 LOG(Events, "FrameView %p sendResizeEventIfNeeded sending resize event, size %dx%d (canSendResizeEventSynchronously %d)", this, currentSize.width(), currentSize.height(), canSendResizeEventSynchronously); 3429 3430 Ref<Event> resizeEvent = Event::create(eventNames().resizeEvent, Event::CanBubble::No, Event::IsCancelable::No); 3431 if (canSendResizeEventSynchronously) 3432 frame().document()->dispatchWindowEvent(resizeEvent); 3433 else { 3434 // FIXME: Queueing this event for an unpredictable time in the future seems 3435 // intrinsically racy. By the time this resize event fires, the frame might 3436 // be resized again, so we could end up with two resize events for the same size. 3437 frame().document()->enqueueWindowEvent(WTFMove(resizeEvent)); 3438 } 3439 3429 3440 if (InspectorInstrumentation::hasFrontends() && isMainFrame) { 3430 3441 if (Page* page = frame().page()) { -
trunk/Source/WebCore/page/Page.cpp
r251322 r251567 1295 1295 SetForScope<bool> change(m_inUpdateRendering, true); 1296 1296 1297 layoutIfNeeded(); 1298 1299 for (auto& document : collectDocuments()) 1300 document->runResizeSteps(); 1297 Vector<RefPtr<Document>> documents; 1298 1299 // The requestAnimationFrame callbacks may change the frame hierarchy of the page 1300 forEachDocument([&documents] (Document& document) { 1301 documents.append(&document); 1302 }); 1303 1304 // FIXME: Run the resize steps 1301 1305 1302 1306 // FIXME: Run the scroll steps … … 1305 1309 document->evaluateMediaQueriesAndReportChanges(); 1306 1310 1307 Vector<Ref<Document>> documents = collectDocuments(); // The requestAnimationFrame callbacks may change the frame hierarchy of the page1308 1311 for (auto& document : documents) { 1309 1312 DOMHighResTimeStamp timestamp = document->domWindow()->nowTimestamp(); … … 2872 2875 } 2873 2876 2874 Vector<Ref<Document>> Page::collectDocuments()2875 {2876 Vector<Ref<Document>> documents;2877 for (Frame* frame = &mainFrame(); frame; frame = frame->tree().traverseNext()) {2878 auto* document = frame->document();2879 if (!document)2880 continue;2881 documents.append(*document);2882 }2883 return documents;2884 }2885 2886 2877 void Page::applicationWillResignActive() 2887 2878 { -
trunk/Source/WebCore/page/Page.h
r251269 r251567 751 751 752 752 void forEachDocument(const WTF::Function<void(Document&)>&); 753 Vector<Ref<Document>> collectDocuments();754 753 755 754 enum class TimerThrottlingState { Disabled, Enabled, EnabledIncreasing }; -
trunk/Source/WebCore/page/VisualViewport.cpp
r251269 r251567 186 186 if (!frame) 187 187 return; 188 frame->document()->setNeedsVisualViewportResize(); 188 189 frame->document()->eventQueue().enqueueResizeEvent(*this, Event::CanBubble::No, Event::IsCancelable::No); 189 190 } 190 191
Note: See TracChangeset
for help on using the changeset viewer.