Changeset 261979 in webkit


Ignore:
Timestamp:
May 20, 2020, 6:44:12 PM (5 years ago)
Author:
Alan Bujtas
Message:

Repaint issues when the login field collapses on music.apple.com
https://bugs.webkit.org/show_bug.cgi?id=212101
<rdar://problem/62874369>

Reviewed by Simon Fraser.

Source/WebCore:

RenderWidgets (e.g iframe) are painted on integral pixel boundaries. When we issue the repaints on such renderers, we need to
make sure that the repaint rectangles are also snapped to integral pixel values.
Currently trunk only covers the case when the renderer itself is positioned on a subpixel position (e.g when the containing block's content box has a non-integral position value).
This patch ensures that we repaint the RenderWidgets properly when a non-direct ancestor puts the renderer on a subpixel position.

Test: fast/repaint/iframe-on-subpixel-position.html

  • page/FrameView.h:
  • rendering/RenderBox.cpp:

(WebCore::RenderBox::computeVisibleRectInContainer const):

  • rendering/RenderLayerBacking.cpp:

(WebCore::RenderLayerBacking::setContentsNeedDisplay):
(WebCore::RenderLayerBacking::setContentsNeedDisplayInRect):

  • rendering/RenderObject.h:
  • testing/Internals.cpp:

(WebCore::Internals::enableSubframeRepaintTracking): add subframe repaint tracking
(WebCore::Internals::disableSubframeRepaintTracking):

  • testing/Internals.h:
  • testing/Internals.idl:

LayoutTests:

  • fast/repaint/iframe-on-subpixel-position-expected.txt: Added.
  • fast/repaint/iframe-on-subpixel-position.html: Added.
Location:
trunk
Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r261976 r261979  
     12020-05-20  Zalan Bujtas  <zalan@apple.com>
     2
     3        Repaint issues when the login field collapses on music.apple.com
     4        https://bugs.webkit.org/show_bug.cgi?id=212101
     5        <rdar://problem/62874369>
     6
     7        Reviewed by Simon Fraser.
     8
     9        * fast/repaint/iframe-on-subpixel-position-expected.txt: Added.
     10        * fast/repaint/iframe-on-subpixel-position.html: Added.
     11
    1122020-05-20  Kenneth Russell  <kbr@chromium.org>
    213
  • trunk/Source/WebCore/ChangeLog

    r261974 r261979  
     12020-05-20  Zalan Bujtas  <zalan@apple.com>
     2
     3        Repaint issues when the login field collapses on music.apple.com
     4        https://bugs.webkit.org/show_bug.cgi?id=212101
     5        <rdar://problem/62874369>
     6
     7        Reviewed by Simon Fraser.
     8
     9        RenderWidgets (e.g iframe) are painted on integral pixel boundaries. When we issue the repaints on such renderers, we need to
     10        make sure that the repaint rectangles are also snapped to integral pixel values.
     11        Currently trunk only covers the case when the renderer itself is positioned on a subpixel position (e.g when the containing block's content box has a non-integral position value).
     12        This patch ensures that we repaint the RenderWidgets properly when a non-direct ancestor puts the renderer on a subpixel position.
     13
     14        Test: fast/repaint/iframe-on-subpixel-position.html
     15
     16        * page/FrameView.h:
     17        * rendering/RenderBox.cpp:
     18        (WebCore::RenderBox::computeVisibleRectInContainer const):
     19        * rendering/RenderLayerBacking.cpp:
     20        (WebCore::RenderLayerBacking::setContentsNeedDisplay):
     21        (WebCore::RenderLayerBacking::setContentsNeedDisplayInRect):
     22        * rendering/RenderObject.h:
     23        * testing/Internals.cpp:
     24        (WebCore::Internals::enableSubframeRepaintTracking): add subframe repaint tracking
     25        (WebCore::Internals::disableSubframeRepaintTracking):
     26        * testing/Internals.h:
     27        * testing/Internals.idl:
     28
    1292020-05-20  Oriol Brufau  <obrufau@igalia.com>
    230
  • trunk/Source/WebCore/rendering/RenderBox.cpp

    r261941 r261979  
    22782278        if (container->style().isFlippedBlocksWritingMode())
    22792279            flipForWritingMode(adjustedRect);
     2280        if (context.descendantNeedsEnclosingIntRect)
     2281            adjustedRect = enclosingIntRect(adjustedRect);
    22802282        return adjustedRect;
    22812283    }
     
    23142316        adjustedRect.expand(locationOffset - flooredLocationOffset);
    23152317        locationOffset = flooredLocationOffset;
     2318        context.descendantNeedsEnclosingIntRect = true;
    23162319    }
    23172320
  • trunk/Source/WebCore/rendering/RenderObject.h

    r261941 r261979  
    625625            {
    626626            }
    627         bool hasPositionFixedDescendant;
    628         bool dirtyRectIsFlipped;
     627        bool hasPositionFixedDescendant { false };
     628        bool dirtyRectIsFlipped { false };
     629        bool descendantNeedsEnclosingIntRect { false };
    629630        OptionSet<VisibleRectContextOption> options;
    630631    };
Note: See TracChangeset for help on using the changeset viewer.