Title: [261941] trunk/Source/WebCore
Revision
261941
Author
[email protected]
Date
2020-05-20 12:59:53 -0700 (Wed, 20 May 2020)

Log Message

RenderObject::VisibleRectContext members should not be prefixed with m_
https://bugs.webkit.org/show_bug.cgi?id=212154

Reviewed by Simon Fraser.

* rendering/RenderBox.cpp:
(WebCore::RenderBox::applyCachedClipAndScrollPosition const):
(WebCore::RenderBox::computeVisibleRectInContainer const):
* rendering/RenderInline.cpp:
(WebCore::RenderInline::computeVisibleRectInContainer const):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::computeVisibleRectInContainer const):
* rendering/RenderObject.h:
* rendering/RenderTableCell.cpp:
(WebCore::RenderTableCell::computeVisibleRectInContainer const):
* rendering/RenderView.cpp:
(WebCore::RenderView::computeVisibleRectInContainer const):
* rendering/svg/RenderSVGRoot.cpp:
(WebCore::RenderSVGRoot::computeFloatVisibleRectInContainer const):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (261940 => 261941)


--- trunk/Source/WebCore/ChangeLog	2020-05-20 19:19:39 UTC (rev 261940)
+++ trunk/Source/WebCore/ChangeLog	2020-05-20 19:59:53 UTC (rev 261941)
@@ -1,3 +1,25 @@
+2020-05-20  Zalan Bujtas  <[email protected]>
+
+        RenderObject::VisibleRectContext members should not be prefixed with m_
+        https://bugs.webkit.org/show_bug.cgi?id=212154
+
+        Reviewed by Simon Fraser.
+
+        * rendering/RenderBox.cpp:
+        (WebCore::RenderBox::applyCachedClipAndScrollPosition const):
+        (WebCore::RenderBox::computeVisibleRectInContainer const):
+        * rendering/RenderInline.cpp:
+        (WebCore::RenderInline::computeVisibleRectInContainer const):
+        * rendering/RenderObject.cpp:
+        (WebCore::RenderObject::computeVisibleRectInContainer const):
+        * rendering/RenderObject.h:
+        * rendering/RenderTableCell.cpp:
+        (WebCore::RenderTableCell::computeVisibleRectInContainer const):
+        * rendering/RenderView.cpp:
+        (WebCore::RenderView::computeVisibleRectInContainer const):
+        * rendering/svg/RenderSVGRoot.cpp:
+        (WebCore::RenderSVGRoot::computeFloatVisibleRectInContainer const):
+
 2020-05-20  Myles C. Maxfield  <[email protected]>
 
         [iPadOS] -webkit-text-size-adjust:percentage doesn't work

Modified: trunk/Source/WebCore/rendering/RenderBox.cpp (261940 => 261941)


--- trunk/Source/WebCore/rendering/RenderBox.cpp	2020-05-20 19:19:39 UTC (rev 261940)
+++ trunk/Source/WebCore/rendering/RenderBox.cpp	2020-05-20 19:59:53 UTC (rev 261941)
@@ -1029,12 +1029,12 @@
 {
     flipForWritingMode(rect);
 
-    if (context.m_options.contains(VisibleRectContextOption::ApplyCompositedContainerScrolls) || this != container || !usesCompositedScrolling())
+    if (context.options.contains(VisibleRectContextOption::ApplyCompositedContainerScrolls) || this != container || !usesCompositedScrolling())
         rect.moveBy(-scrollPosition()); // For overflow:auto/scroll/hidden.
 
     // Do not clip scroll layer contents to reduce the number of repaints while scrolling.
-    if ((!context.m_options.contains(VisibleRectContextOption::ApplyCompositedClips) && usesCompositedScrolling())
-        || (!context.m_options.contains(VisibleRectContextOption::ApplyContainerClip) && this == container)) {
+    if ((!context.options.contains(VisibleRectContextOption::ApplyCompositedClips) && usesCompositedScrolling())
+        || (!context.options.contains(VisibleRectContextOption::ApplyContainerClip) && this == container)) {
         flipForWritingMode(rect);
         return true;
     }
@@ -1044,7 +1044,7 @@
     // anyway if its size does change.
     LayoutRect clipRect(LayoutPoint(), cachedSizeForOverflowClip());
     bool intersects;
-    if (context.m_options.contains(VisibleRectContextOption::UseEdgeInclusiveIntersection))
+    if (context.options.contains(VisibleRectContextOption::UseEdgeInclusiveIntersection))
         intersects = rect.edgeInclusiveIntersect(clipRect);
     else {
         rect.intersect(clipRect);
@@ -2267,7 +2267,7 @@
     // physical coordinate space of the container.
     const RenderStyle& styleToUse = style();
     // Paint offset cache is only valid for root-relative, non-fixed position repainting
-    if (view().frameView().layoutContext().isPaintOffsetCacheEnabled() && !container && styleToUse.position() != PositionType::Fixed && !context.m_options.contains(VisibleRectContextOption::UseEdgeInclusiveIntersection))
+    if (view().frameView().layoutContext().isPaintOffsetCacheEnabled() && !container && styleToUse.position() != PositionType::Fixed && !context.options.contains(VisibleRectContextOption::UseEdgeInclusiveIntersection))
         return computeVisibleRectUsingPaintOffset(rect);
 
     LayoutRect adjustedRect = rect;
@@ -2301,9 +2301,9 @@
     }
 
     if (isWritingModeRoot()) {
-        if (!isOutOfFlowPositioned() || !context.m_dirtyRectIsFlipped) {
+        if (!isOutOfFlowPositioned() || !context.dirtyRectIsFlipped) {
             flipForWritingMode(adjustedRect);
-            context.m_dirtyRectIsFlipped = true;
+            context.dirtyRectIsFlipped = true;
         }
     }
 
@@ -2335,12 +2335,12 @@
     // We are now in our parent container's coordinate space. Apply our transform to obtain a bounding box
     // in the parent's coordinate space that encloses us.
     if (hasLayer() && layer()->transform()) {
-        context.m_hasPositionFixedDescendant = position == PositionType::Fixed;
+        context.hasPositionFixedDescendant = position == PositionType::Fixed;
         adjustedRect = LayoutRect(encloseRectToDevicePixels(layer()->transform()->mapRect(adjustedRect), document().deviceScaleFactor()));
         topLeft = adjustedRect.location();
         topLeft.move(locationOffset);
     } else if (position == PositionType::Fixed)
-        context.m_hasPositionFixedDescendant = true;
+        context.hasPositionFixedDescendant = true;
 
     if (position == PositionType::Absolute && localContainer->isInFlowPositioned() && is<RenderInline>(*localContainer))
         topLeft += downcast<RenderInline>(*localContainer).offsetForInFlowPositionedInline(this);
@@ -2359,7 +2359,7 @@
         RenderBox& containerBox = downcast<RenderBox>(*localContainer);
         bool isEmpty = !containerBox.applyCachedClipAndScrollPosition(adjustedRect, container, context);
         if (isEmpty) {
-            if (context.m_options.contains(VisibleRectContextOption::UseEdgeInclusiveIntersection))
+            if (context.options.contains(VisibleRectContextOption::UseEdgeInclusiveIntersection))
                 return WTF::nullopt;
             return adjustedRect;
         }

Modified: trunk/Source/WebCore/rendering/RenderInline.cpp (261940 => 261941)


--- trunk/Source/WebCore/rendering/RenderInline.cpp	2020-05-20 19:19:39 UTC (rev 261940)
+++ trunk/Source/WebCore/rendering/RenderInline.cpp	2020-05-20 19:59:53 UTC (rev 261941)
@@ -887,7 +887,7 @@
 Optional<LayoutRect> RenderInline::computeVisibleRectInContainer(const LayoutRect& rect, const RenderLayerModelObject* container, VisibleRectContext context) const
 {
     // Repaint offset cache is only valid for root-relative repainting
-    if (view().frameView().layoutContext().isPaintOffsetCacheEnabled() && !container && !context.m_options.contains(VisibleRectContextOption::UseEdgeInclusiveIntersection))
+    if (view().frameView().layoutContext().isPaintOffsetCacheEnabled() && !container && !context.options.contains(VisibleRectContextOption::UseEdgeInclusiveIntersection))
         return computeVisibleRectUsingPaintOffset(rect);
 
     if (container == this)
@@ -913,11 +913,11 @@
     // its controlClipRect will be wrong. For overflow clip we use the values cached by the layer.
     adjustedRect.setLocation(topLeft);
     if (localContainer->hasOverflowClip()) {
-        // FIXME: Respect the value of context.m_options.
-        SetForScope<OptionSet<VisibleRectContextOption>> change(context.m_options, context.m_options | VisibleRectContextOption::ApplyCompositedContainerScrolls);
+        // FIXME: Respect the value of context.options.
+        SetForScope<OptionSet<VisibleRectContextOption>> change(context.options, context.options | VisibleRectContextOption::ApplyCompositedContainerScrolls);
         bool isEmpty = !downcast<RenderBox>(*localContainer).applyCachedClipAndScrollPosition(adjustedRect, container, context);
         if (isEmpty) {
-            if (context.m_options.contains(VisibleRectContextOption::UseEdgeInclusiveIntersection))
+            if (context.options.contains(VisibleRectContextOption::UseEdgeInclusiveIntersection))
                 return WTF::nullopt;
             return adjustedRect;
         }

Modified: trunk/Source/WebCore/rendering/RenderObject.cpp (261940 => 261941)


--- trunk/Source/WebCore/rendering/RenderObject.cpp	2020-05-20 19:19:39 UTC (rev 261940)
+++ trunk/Source/WebCore/rendering/RenderObject.cpp	2020-05-20 19:59:53 UTC (rev 261941)
@@ -972,7 +972,7 @@
     if (parent->hasOverflowClip()) {
         bool isEmpty = !downcast<RenderBox>(*parent).applyCachedClipAndScrollPosition(adjustedRect, container, context);
         if (isEmpty) {
-            if (context.m_options.contains(VisibleRectContextOption::UseEdgeInclusiveIntersection))
+            if (context.options.contains(VisibleRectContextOption::UseEdgeInclusiveIntersection))
                 return WTF::nullopt;
             return adjustedRect;
         }

Modified: trunk/Source/WebCore/rendering/RenderObject.h (261940 => 261941)


--- trunk/Source/WebCore/rendering/RenderObject.h	2020-05-20 19:19:39 UTC (rev 261940)
+++ trunk/Source/WebCore/rendering/RenderObject.h	2020-05-20 19:59:53 UTC (rev 261941)
@@ -619,14 +619,14 @@
     };
     struct VisibleRectContext {
         VisibleRectContext(bool hasPositionFixedDescendant = false, bool dirtyRectIsFlipped = false, OptionSet<VisibleRectContextOption> options = { })
-            : m_hasPositionFixedDescendant(hasPositionFixedDescendant)
-            , m_dirtyRectIsFlipped(dirtyRectIsFlipped)
-            , m_options(options)
+            : hasPositionFixedDescendant(hasPositionFixedDescendant)
+            , dirtyRectIsFlipped(dirtyRectIsFlipped)
+            , options(options)
             {
             }
-        bool m_hasPositionFixedDescendant;
-        bool m_dirtyRectIsFlipped;
-        OptionSet<VisibleRectContextOption> m_options;
+        bool hasPositionFixedDescendant;
+        bool dirtyRectIsFlipped;
+        OptionSet<VisibleRectContextOption> options;
     };
     virtual Optional<LayoutRect> computeVisibleRectInContainer(const LayoutRect&, const RenderLayerModelObject* repaintContainer, VisibleRectContext) const;
     virtual Optional<FloatRect> computeFloatVisibleRectInContainer(const FloatRect&, const RenderLayerModelObject* repaintContainer, VisibleRectContext) const;

Modified: trunk/Source/WebCore/rendering/RenderTableCell.cpp (261940 => 261941)


--- trunk/Source/WebCore/rendering/RenderTableCell.cpp	2020-05-20 19:19:39 UTC (rev 261940)
+++ trunk/Source/WebCore/rendering/RenderTableCell.cpp	2020-05-20 19:59:53 UTC (rev 261941)
@@ -400,7 +400,7 @@
     if (container == this)
         return rect;
     LayoutRect adjustedRect = rect;
-    if ((!view().frameView().layoutContext().isPaintOffsetCacheEnabled() || container || context.m_options.contains(VisibleRectContextOption::UseEdgeInclusiveIntersection)) && parent())
+    if ((!view().frameView().layoutContext().isPaintOffsetCacheEnabled() || container || context.options.contains(VisibleRectContextOption::UseEdgeInclusiveIntersection)) && parent())
         adjustedRect.moveBy(-parentBox()->location()); // Rows are in the same coordinate space, so don't add their offset in.
     return RenderBlockFlow::computeVisibleRectInContainer(adjustedRect, container, context);
 }

Modified: trunk/Source/WebCore/rendering/RenderView.cpp (261940 => 261941)


--- trunk/Source/WebCore/rendering/RenderView.cpp	2020-05-20 19:19:39 UTC (rev 261940)
+++ trunk/Source/WebCore/rendering/RenderView.cpp	2020-05-20 19:59:53 UTC (rev 261941)
@@ -533,7 +533,7 @@
             adjustedRect.setX(viewWidth() - adjustedRect.maxX());
     }
 
-    if (context.m_hasPositionFixedDescendant)
+    if (context.hasPositionFixedDescendant)
         adjustedRect.moveBy(frameView().scrollPositionRespectingCustomFixedPosition());
     
     // Apply our transform if we have one (because of full page zooming).

Modified: trunk/Source/WebCore/rendering/svg/RenderSVGRoot.cpp (261940 => 261941)


--- trunk/Source/WebCore/rendering/svg/RenderSVGRoot.cpp	2020-05-20 19:19:39 UTC (rev 261940)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGRoot.cpp	2020-05-20 19:59:53 UTC (rev 261941)
@@ -365,7 +365,7 @@
 
     // Apply initial viewport clip
     if (shouldApplyViewportClip()) {
-        if (context.m_options.contains(VisibleRectContextOption::UseEdgeInclusiveIntersection)) {
+        if (context.options.contains(VisibleRectContextOption::UseEdgeInclusiveIntersection)) {
             if (!adjustedRect.edgeInclusiveIntersect(snappedIntRect(borderBoxRect())))
                 return WTF::nullopt;
         } else
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to