Changeset 261941 in webkit
- Timestamp:
- May 20, 2020 12:59:53 PM (4 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r261940 r261941 1 2020-05-20 Zalan Bujtas <zalan@apple.com> 2 3 RenderObject::VisibleRectContext members should not be prefixed with m_ 4 https://bugs.webkit.org/show_bug.cgi?id=212154 5 6 Reviewed by Simon Fraser. 7 8 * rendering/RenderBox.cpp: 9 (WebCore::RenderBox::applyCachedClipAndScrollPosition const): 10 (WebCore::RenderBox::computeVisibleRectInContainer const): 11 * rendering/RenderInline.cpp: 12 (WebCore::RenderInline::computeVisibleRectInContainer const): 13 * rendering/RenderObject.cpp: 14 (WebCore::RenderObject::computeVisibleRectInContainer const): 15 * rendering/RenderObject.h: 16 * rendering/RenderTableCell.cpp: 17 (WebCore::RenderTableCell::computeVisibleRectInContainer const): 18 * rendering/RenderView.cpp: 19 (WebCore::RenderView::computeVisibleRectInContainer const): 20 * rendering/svg/RenderSVGRoot.cpp: 21 (WebCore::RenderSVGRoot::computeFloatVisibleRectInContainer const): 22 1 23 2020-05-20 Myles C. Maxfield <mmaxfield@apple.com> 2 24 -
trunk/Source/WebCore/rendering/RenderBox.cpp
r261775 r261941 1030 1030 flipForWritingMode(rect); 1031 1031 1032 if (context. m_options.contains(VisibleRectContextOption::ApplyCompositedContainerScrolls) || this != container || !usesCompositedScrolling())1032 if (context.options.contains(VisibleRectContextOption::ApplyCompositedContainerScrolls) || this != container || !usesCompositedScrolling()) 1033 1033 rect.moveBy(-scrollPosition()); // For overflow:auto/scroll/hidden. 1034 1034 1035 1035 // Do not clip scroll layer contents to reduce the number of repaints while scrolling. 1036 if ((!context. m_options.contains(VisibleRectContextOption::ApplyCompositedClips) && usesCompositedScrolling())1037 || (!context. m_options.contains(VisibleRectContextOption::ApplyContainerClip) && this == container)) {1036 if ((!context.options.contains(VisibleRectContextOption::ApplyCompositedClips) && usesCompositedScrolling()) 1037 || (!context.options.contains(VisibleRectContextOption::ApplyContainerClip) && this == container)) { 1038 1038 flipForWritingMode(rect); 1039 1039 return true; … … 1045 1045 LayoutRect clipRect(LayoutPoint(), cachedSizeForOverflowClip()); 1046 1046 bool intersects; 1047 if (context. m_options.contains(VisibleRectContextOption::UseEdgeInclusiveIntersection))1047 if (context.options.contains(VisibleRectContextOption::UseEdgeInclusiveIntersection)) 1048 1048 intersects = rect.edgeInclusiveIntersect(clipRect); 1049 1049 else { … … 2268 2268 const RenderStyle& styleToUse = style(); 2269 2269 // Paint offset cache is only valid for root-relative, non-fixed position repainting 2270 if (view().frameView().layoutContext().isPaintOffsetCacheEnabled() && !container && styleToUse.position() != PositionType::Fixed && !context. m_options.contains(VisibleRectContextOption::UseEdgeInclusiveIntersection))2270 if (view().frameView().layoutContext().isPaintOffsetCacheEnabled() && !container && styleToUse.position() != PositionType::Fixed && !context.options.contains(VisibleRectContextOption::UseEdgeInclusiveIntersection)) 2271 2271 return computeVisibleRectUsingPaintOffset(rect); 2272 2272 … … 2302 2302 2303 2303 if (isWritingModeRoot()) { 2304 if (!isOutOfFlowPositioned() || !context. m_dirtyRectIsFlipped) {2304 if (!isOutOfFlowPositioned() || !context.dirtyRectIsFlipped) { 2305 2305 flipForWritingMode(adjustedRect); 2306 context. m_dirtyRectIsFlipped = true;2306 context.dirtyRectIsFlipped = true; 2307 2307 } 2308 2308 } … … 2336 2336 // in the parent's coordinate space that encloses us. 2337 2337 if (hasLayer() && layer()->transform()) { 2338 context. m_hasPositionFixedDescendant = position == PositionType::Fixed;2338 context.hasPositionFixedDescendant = position == PositionType::Fixed; 2339 2339 adjustedRect = LayoutRect(encloseRectToDevicePixels(layer()->transform()->mapRect(adjustedRect), document().deviceScaleFactor())); 2340 2340 topLeft = adjustedRect.location(); 2341 2341 topLeft.move(locationOffset); 2342 2342 } else if (position == PositionType::Fixed) 2343 context. m_hasPositionFixedDescendant = true;2343 context.hasPositionFixedDescendant = true; 2344 2344 2345 2345 if (position == PositionType::Absolute && localContainer->isInFlowPositioned() && is<RenderInline>(*localContainer)) … … 2360 2360 bool isEmpty = !containerBox.applyCachedClipAndScrollPosition(adjustedRect, container, context); 2361 2361 if (isEmpty) { 2362 if (context. m_options.contains(VisibleRectContextOption::UseEdgeInclusiveIntersection))2362 if (context.options.contains(VisibleRectContextOption::UseEdgeInclusiveIntersection)) 2363 2363 return WTF::nullopt; 2364 2364 return adjustedRect; -
trunk/Source/WebCore/rendering/RenderInline.cpp
r261775 r261941 888 888 { 889 889 // Repaint offset cache is only valid for root-relative repainting 890 if (view().frameView().layoutContext().isPaintOffsetCacheEnabled() && !container && !context. m_options.contains(VisibleRectContextOption::UseEdgeInclusiveIntersection))890 if (view().frameView().layoutContext().isPaintOffsetCacheEnabled() && !container && !context.options.contains(VisibleRectContextOption::UseEdgeInclusiveIntersection)) 891 891 return computeVisibleRectUsingPaintOffset(rect); 892 892 … … 914 914 adjustedRect.setLocation(topLeft); 915 915 if (localContainer->hasOverflowClip()) { 916 // FIXME: Respect the value of context. m_options.917 SetForScope<OptionSet<VisibleRectContextOption>> change(context. m_options, context.m_options | VisibleRectContextOption::ApplyCompositedContainerScrolls);916 // FIXME: Respect the value of context.options. 917 SetForScope<OptionSet<VisibleRectContextOption>> change(context.options, context.options | VisibleRectContextOption::ApplyCompositedContainerScrolls); 918 918 bool isEmpty = !downcast<RenderBox>(*localContainer).applyCachedClipAndScrollPosition(adjustedRect, container, context); 919 919 if (isEmpty) { 920 if (context. m_options.contains(VisibleRectContextOption::UseEdgeInclusiveIntersection))920 if (context.options.contains(VisibleRectContextOption::UseEdgeInclusiveIntersection)) 921 921 return WTF::nullopt; 922 922 return adjustedRect; -
trunk/Source/WebCore/rendering/RenderObject.cpp
r261775 r261941 973 973 bool isEmpty = !downcast<RenderBox>(*parent).applyCachedClipAndScrollPosition(adjustedRect, container, context); 974 974 if (isEmpty) { 975 if (context. m_options.contains(VisibleRectContextOption::UseEdgeInclusiveIntersection))975 if (context.options.contains(VisibleRectContextOption::UseEdgeInclusiveIntersection)) 976 976 return WTF::nullopt; 977 977 return adjustedRect; -
trunk/Source/WebCore/rendering/RenderObject.h
r261775 r261941 620 620 struct VisibleRectContext { 621 621 VisibleRectContext(bool hasPositionFixedDescendant = false, bool dirtyRectIsFlipped = false, OptionSet<VisibleRectContextOption> options = { }) 622 : m_hasPositionFixedDescendant(hasPositionFixedDescendant)623 , m_dirtyRectIsFlipped(dirtyRectIsFlipped)624 , m_options(options)622 : hasPositionFixedDescendant(hasPositionFixedDescendant) 623 , dirtyRectIsFlipped(dirtyRectIsFlipped) 624 , options(options) 625 625 { 626 626 } 627 bool m_hasPositionFixedDescendant;628 bool m_dirtyRectIsFlipped;629 OptionSet<VisibleRectContextOption> m_options;627 bool hasPositionFixedDescendant; 628 bool dirtyRectIsFlipped; 629 OptionSet<VisibleRectContextOption> options; 630 630 }; 631 631 virtual Optional<LayoutRect> computeVisibleRectInContainer(const LayoutRect&, const RenderLayerModelObject* repaintContainer, VisibleRectContext) const; -
trunk/Source/WebCore/rendering/RenderTableCell.cpp
r252161 r261941 401 401 return rect; 402 402 LayoutRect adjustedRect = rect; 403 if ((!view().frameView().layoutContext().isPaintOffsetCacheEnabled() || container || context. m_options.contains(VisibleRectContextOption::UseEdgeInclusiveIntersection)) && parent())403 if ((!view().frameView().layoutContext().isPaintOffsetCacheEnabled() || container || context.options.contains(VisibleRectContextOption::UseEdgeInclusiveIntersection)) && parent()) 404 404 adjustedRect.moveBy(-parentBox()->location()); // Rows are in the same coordinate space, so don't add their offset in. 405 405 return RenderBlockFlow::computeVisibleRectInContainer(adjustedRect, container, context); -
trunk/Source/WebCore/rendering/RenderView.cpp
r261775 r261941 534 534 } 535 535 536 if (context. m_hasPositionFixedDescendant)536 if (context.hasPositionFixedDescendant) 537 537 adjustedRect.moveBy(frameView().scrollPositionRespectingCustomFixedPosition()); 538 538 -
trunk/Source/WebCore/rendering/svg/RenderSVGRoot.cpp
r261775 r261941 366 366 // Apply initial viewport clip 367 367 if (shouldApplyViewportClip()) { 368 if (context. m_options.contains(VisibleRectContextOption::UseEdgeInclusiveIntersection)) {368 if (context.options.contains(VisibleRectContextOption::UseEdgeInclusiveIntersection)) { 369 369 if (!adjustedRect.edgeInclusiveIntersect(snappedIntRect(borderBoxRect()))) 370 370 return WTF::nullopt;
Note: See TracChangeset
for help on using the changeset viewer.