Changeset 261941 in webkit


Ignore:
Timestamp:
May 20, 2020 12:59:53 PM (4 years ago)
Author:
Alan Bujtas
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):

Location:
trunk/Source/WebCore
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r261940 r261941  
     12020-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
    1232020-05-20  Myles C. Maxfield  <mmaxfield@apple.com>
    224
  • trunk/Source/WebCore/rendering/RenderBox.cpp

    r261775 r261941  
    10301030    flipForWritingMode(rect);
    10311031
    1032     if (context.m_options.contains(VisibleRectContextOption::ApplyCompositedContainerScrolls) || this != container || !usesCompositedScrolling())
     1032    if (context.options.contains(VisibleRectContextOption::ApplyCompositedContainerScrolls) || this != container || !usesCompositedScrolling())
    10331033        rect.moveBy(-scrollPosition()); // For overflow:auto/scroll/hidden.
    10341034
    10351035    // 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)) {
    10381038        flipForWritingMode(rect);
    10391039        return true;
     
    10451045    LayoutRect clipRect(LayoutPoint(), cachedSizeForOverflowClip());
    10461046    bool intersects;
    1047     if (context.m_options.contains(VisibleRectContextOption::UseEdgeInclusiveIntersection))
     1047    if (context.options.contains(VisibleRectContextOption::UseEdgeInclusiveIntersection))
    10481048        intersects = rect.edgeInclusiveIntersect(clipRect);
    10491049    else {
     
    22682268    const RenderStyle& styleToUse = style();
    22692269    // 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))
    22712271        return computeVisibleRectUsingPaintOffset(rect);
    22722272
     
    23022302
    23032303    if (isWritingModeRoot()) {
    2304         if (!isOutOfFlowPositioned() || !context.m_dirtyRectIsFlipped) {
     2304        if (!isOutOfFlowPositioned() || !context.dirtyRectIsFlipped) {
    23052305            flipForWritingMode(adjustedRect);
    2306             context.m_dirtyRectIsFlipped = true;
     2306            context.dirtyRectIsFlipped = true;
    23072307        }
    23082308    }
     
    23362336    // in the parent's coordinate space that encloses us.
    23372337    if (hasLayer() && layer()->transform()) {
    2338         context.m_hasPositionFixedDescendant = position == PositionType::Fixed;
     2338        context.hasPositionFixedDescendant = position == PositionType::Fixed;
    23392339        adjustedRect = LayoutRect(encloseRectToDevicePixels(layer()->transform()->mapRect(adjustedRect), document().deviceScaleFactor()));
    23402340        topLeft = adjustedRect.location();
    23412341        topLeft.move(locationOffset);
    23422342    } else if (position == PositionType::Fixed)
    2343         context.m_hasPositionFixedDescendant = true;
     2343        context.hasPositionFixedDescendant = true;
    23442344
    23452345    if (position == PositionType::Absolute && localContainer->isInFlowPositioned() && is<RenderInline>(*localContainer))
     
    23602360        bool isEmpty = !containerBox.applyCachedClipAndScrollPosition(adjustedRect, container, context);
    23612361        if (isEmpty) {
    2362             if (context.m_options.contains(VisibleRectContextOption::UseEdgeInclusiveIntersection))
     2362            if (context.options.contains(VisibleRectContextOption::UseEdgeInclusiveIntersection))
    23632363                return WTF::nullopt;
    23642364            return adjustedRect;
  • trunk/Source/WebCore/rendering/RenderInline.cpp

    r261775 r261941  
    888888{
    889889    // 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))
    891891        return computeVisibleRectUsingPaintOffset(rect);
    892892
     
    914914    adjustedRect.setLocation(topLeft);
    915915    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);
    918918        bool isEmpty = !downcast<RenderBox>(*localContainer).applyCachedClipAndScrollPosition(adjustedRect, container, context);
    919919        if (isEmpty) {
    920             if (context.m_options.contains(VisibleRectContextOption::UseEdgeInclusiveIntersection))
     920            if (context.options.contains(VisibleRectContextOption::UseEdgeInclusiveIntersection))
    921921                return WTF::nullopt;
    922922            return adjustedRect;
  • trunk/Source/WebCore/rendering/RenderObject.cpp

    r261775 r261941  
    973973        bool isEmpty = !downcast<RenderBox>(*parent).applyCachedClipAndScrollPosition(adjustedRect, container, context);
    974974        if (isEmpty) {
    975             if (context.m_options.contains(VisibleRectContextOption::UseEdgeInclusiveIntersection))
     975            if (context.options.contains(VisibleRectContextOption::UseEdgeInclusiveIntersection))
    976976                return WTF::nullopt;
    977977            return adjustedRect;
  • trunk/Source/WebCore/rendering/RenderObject.h

    r261775 r261941  
    620620    struct VisibleRectContext {
    621621        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)
    625625            {
    626626            }
    627         bool m_hasPositionFixedDescendant;
    628         bool m_dirtyRectIsFlipped;
    629         OptionSet<VisibleRectContextOption> m_options;
     627        bool hasPositionFixedDescendant;
     628        bool dirtyRectIsFlipped;
     629        OptionSet<VisibleRectContextOption> options;
    630630    };
    631631    virtual Optional<LayoutRect> computeVisibleRectInContainer(const LayoutRect&, const RenderLayerModelObject* repaintContainer, VisibleRectContext) const;
  • trunk/Source/WebCore/rendering/RenderTableCell.cpp

    r252161 r261941  
    401401        return rect;
    402402    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())
    404404        adjustedRect.moveBy(-parentBox()->location()); // Rows are in the same coordinate space, so don't add their offset in.
    405405    return RenderBlockFlow::computeVisibleRectInContainer(adjustedRect, container, context);
  • trunk/Source/WebCore/rendering/RenderView.cpp

    r261775 r261941  
    534534    }
    535535
    536     if (context.m_hasPositionFixedDescendant)
     536    if (context.hasPositionFixedDescendant)
    537537        adjustedRect.moveBy(frameView().scrollPositionRespectingCustomFixedPosition());
    538538   
  • trunk/Source/WebCore/rendering/svg/RenderSVGRoot.cpp

    r261775 r261941  
    366366    // Apply initial viewport clip
    367367    if (shouldApplyViewportClip()) {
    368         if (context.m_options.contains(VisibleRectContextOption::UseEdgeInclusiveIntersection)) {
     368        if (context.options.contains(VisibleRectContextOption::UseEdgeInclusiveIntersection)) {
    369369            if (!adjustedRect.edgeInclusiveIntersect(snappedIntRect(borderBoxRect())))
    370370                return WTF::nullopt;
Note: See TracChangeset for help on using the changeset viewer.