Changeset 268902 in webkit
- Timestamp:
- Oct 22, 2020, 6:38:25 PM (6 years ago)
- Location:
- trunk
- Files:
-
- 8 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/platform/mac/TestExpectations (modified) (1 diff)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/dom/Document.cpp (modified) (4 diffs)
-
Source/WebCore/dom/Document.h (modified) (1 diff)
-
Source/WebCore/page/Frame.cpp (modified) (1 diff)
-
Source/WebCore/page/Frame.h (modified) (1 diff)
-
Source/WebCore/page/FrameView.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r268901 r268902 1 2020-10-22 Simon Fraser <simon.fraser@apple.com> 2 3 REGRESSION(r268476): [ macOS ] tiled-drawing/scrolling/non-fast-region/handlers-in-iframes.html is a flaky failure 4 https://bugs.webkit.org/show_bug.cgi?id=218031 5 <rdar://problem/70532268> 6 7 Reviewed by Tim Horton. 8 9 * platform/mac/TestExpectations: 10 1 11 2020-10-22 Aditya Keerthi <akeerthi@apple.com> 2 12 -
trunk/LayoutTests/platform/mac/TestExpectations
r268865 r268902 2257 2257 webkit.org/b/217994 imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/audioworkletnode-output-channel-count.https.html [ Pass Failure ] 2258 2258 2259 webkit.org/b/218031 tiled-drawing/scrolling/non-fast-region/handlers-in-iframes.html [ Pass Failure ]2260 2261 2259 # rdar://70546330 REGRESSION (r267531): [ Big Sur iOS 14 ] imported/w3c/web-platform-tests/mathml/relations/css-styling/padding-border-margin/border-002.html is a constant failure 2262 2260 [ BigSur+ ] imported/w3c/web-platform-tests/mathml/relations/css-styling/padding-border-margin/border-002.html [ Failure ] -
trunk/Source/WebCore/ChangeLog
r268901 r268902 1 2020-10-22 Simon Fraser <simon.fraser@apple.com> 2 3 REGRESSION(r268476): [ macOS ] tiled-drawing/scrolling/non-fast-region/handlers-in-iframes.html is a flaky failure 4 https://bugs.webkit.org/show_bug.cgi?id=218031 5 <rdar://problem/70532268> 6 7 Reviewed by Tim Horton. 8 9 The test exercises wheel event regions in non-composited iframes. These were not reliably updated 10 when all wheel event handlers were removed, because Frame::invalidateContentEventRegionsIfNeeded() 11 early-returned if there were no handlers (but we need to update the regions in this case). Clean 12 up the logic here, and pass in a "reason" so we know that we should do work when there are no 13 handlers. 14 15 Document::wheelEventHandlersChanged() also needs to invalidate style, since flags in style 16 are used for wheel event region building, and it needs to call invalidateContentEventRegionsIfNeeded(). 17 18 * dom/Document.cpp: 19 (WebCore::Document::wheelEventHandlersChanged): 20 (WebCore::Document::didAddWheelEventHandler): 21 (WebCore::Document::didRemoveWheelEventHandler): 22 * dom/Document.h: 23 * page/Frame.cpp: 24 (WebCore::Frame::invalidateContentEventRegionsIfNeeded): 25 * page/Frame.h: 26 * page/FrameView.cpp: 27 (WebCore::FrameView::didLayout): 28 1 29 2020-10-22 Aditya Keerthi <akeerthi@apple.com> 2 30 -
trunk/Source/WebCore/dom/Document.cpp
r268868 r268902 6644 6644 } 6645 6645 6646 void Document::wheelEventHandlersChanged( )6646 void Document::wheelEventHandlersChanged(Node* node) 6647 6647 { 6648 6648 Page* page = this->page(); … … 6655 6655 } 6656 6656 6657 #if ENABLE(WHEEL_EVENT_REGIONS) 6658 if (is<Element>(node)) { 6659 // Style is affected via eventListenerRegionTypes(). 6660 downcast<Element>(*node).invalidateStyle(); 6661 } 6662 6663 m_frame->invalidateContentEventRegionsIfNeeded(Frame::InvalidateContentEventRegionsReason::EventHandlerChange); 6664 #else 6665 UNUSED_PARAM(node); 6666 #endif 6667 6657 6668 bool haveHandlers = m_wheelEventTargets && !m_wheelEventTargets->isEmpty(); 6658 6669 page->chrome().client().wheelEventHandlersChanged(haveHandlers); … … 6665 6676 6666 6677 m_wheelEventTargets->add(&node); 6667 6668 wheelEventHandlersChanged(); 6678 wheelEventHandlersChanged(&node); 6669 6679 6670 6680 if (Frame* frame = this->frame()) … … 6700 6710 return; 6701 6711 6702 wheelEventHandlersChanged( );6712 wheelEventHandlersChanged(&node); 6703 6713 6704 6714 if (Frame* frame = this->frame()) -
trunk/Source/WebCore/dom/Document.h
r268868 r268902 1675 1675 void didAssociateFormControlsTimerFired(); 1676 1676 1677 void wheelEventHandlersChanged( );1677 void wheelEventHandlersChanged(Node* = nullptr); 1678 1678 1679 1679 HttpEquivPolicy httpEquivPolicy() const; -
trunk/Source/WebCore/page/Frame.cpp
r268716 r268902 301 301 } 302 302 303 void Frame::invalidateContentEventRegionsIfNeeded( )303 void Frame::invalidateContentEventRegionsIfNeeded(InvalidateContentEventRegionsReason reason) 304 304 { 305 305 if (!m_page || !m_doc || !m_doc->renderView()) 306 306 return; 307 bool hasWheelEventHandlers = false; 308 bool hasTouchActionElements = false; 309 bool hasEditableElements = false; 307 308 bool needsUpdateForWheelEventHandlers = false; 309 bool needsUpdateForTouchActionElements = false; 310 bool needsUpdateForEditableElements = false; 310 311 #if ENABLE(WHEEL_EVENT_REGIONS) 311 hasWheelEventHandlers = m_doc->hasWheelEventHandlers(); 312 needsUpdateForWheelEventHandlers = m_doc->hasWheelEventHandlers() || reason == InvalidateContentEventRegionsReason::EventHandlerChange; 313 #else 314 UNUSED_PARAM(reason); 312 315 #endif 313 316 #if ENABLE(TOUCH_ACTION_REGIONS) 314 hasTouchActionElements = m_doc->mayHaveElementsWithNonAutoTouchAction(); 317 // Document::mayHaveElementsWithNonAutoTouchAction never changes from true to false currently. 318 needsUpdateForTouchActionElements = m_doc->mayHaveElementsWithNonAutoTouchAction(); 315 319 #endif 316 320 #if ENABLE(EDITABLE_REGION) 317 hasEditableElements = m_doc->mayHaveEditableElements() && m_page->shouldBuildEditableRegion(); 321 // Document::mayHaveEditableElements never changes from true to false currently. 322 needsUpdateForEditableElements = m_doc->mayHaveEditableElements() && m_page->shouldBuildEditableRegion(); 318 323 #endif 319 if (!hasTouchActionElements && !hasEditableElements && !hasWheelEventHandlers) 320 return; 324 if (!needsUpdateForTouchActionElements && !needsUpdateForEditableElements && !needsUpdateForWheelEventHandlers) 325 return; 326 321 327 if (!m_doc->renderView()->compositor().viewNeedsToInvalidateEventRegionOfEnclosingCompositingLayerForRepaint()) 322 328 return; 329 323 330 if (m_ownerElement) 324 331 m_ownerElement->document().invalidateEventRegionsForFrame(*m_ownerElement); -
trunk/Source/WebCore/page/Frame.h
r268716 r268902 308 308 bool mayPrewarmLocalStorage() const; 309 309 310 void invalidateContentEventRegionsIfNeeded(); 310 enum class InvalidateContentEventRegionsReason { Layout, EventHandlerChange }; 311 void invalidateContentEventRegionsIfNeeded(InvalidateContentEventRegionsReason); 311 312 312 313 WEBCORE_EXPORT FloatSize screenSize() const; 313 314 void setOverrideScreenSize(FloatSize&&); 314 315 // ========316 315 317 316 void selfOnlyRef(); -
trunk/Source/WebCore/page/FrameView.cpp
r268484 r268902 1272 1272 #endif 1273 1273 1274 frame().invalidateContentEventRegionsIfNeeded( );1274 frame().invalidateContentEventRegionsIfNeeded(Frame::InvalidateContentEventRegionsReason::Layout); 1275 1275 document->invalidateRenderingDependentRegions(); 1276 1276
Note:
See TracChangeset
for help on using the changeset viewer.