Changeset 261774 in webkit


Ignore:
Timestamp:
May 15, 2020 7:07:00 PM (4 years ago)
Author:
Simon Fraser
Message:

REGRESSION (r249091): Can't click on a video in the second column of a paginated web view
https://bugs.webkit.org/show_bug.cgi?id=211973
<rdar://problem/61418775>

Reviewed by Zalan Bujtas.

Source/WebCore:

In r249091 I made clip layer computation use offsetFromAncestor() by default, but this turns
out to give different behavior from mapping via renderers in columns.

The bug was that accumulateOffsetTowardsAncestor() would map through the
RenderMultiColumnFlow columns if the ancestorLayer was the one that was using columns,
but mapping via renderers only maps through columns if converting to some ancestor of
the columnated renderer.

I did not investigate why this only affects video.

Test: fast/multicol/clipped-video-in-second-column.html

  • rendering/RenderLayer.cpp:

(WebCore::accumulateOffsetTowardsAncestor):
(WebCore::RenderLayer::calculateClipRects const):

LayoutTests:

  • fast/multicol/clipped-video-in-second-column-expected.html: Added.
  • fast/multicol/clipped-video-in-second-column.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r261772 r261774  
     12020-05-15  Simon Fraser  <simon.fraser@apple.com>
     2
     3        REGRESSION (r249091): Can't click on a video in the second column of a paginated web view
     4        https://bugs.webkit.org/show_bug.cgi?id=211973
     5        <rdar://problem/61418775>
     6
     7        Reviewed by Zalan Bujtas.
     8
     9        * fast/multicol/clipped-video-in-second-column-expected.html: Added.
     10        * fast/multicol/clipped-video-in-second-column.html: Added.
     11
    1122020-05-15  Devin Rousso  <drousso@apple.com>
    213
  • trunk/Source/WebCore/ChangeLog

    r261769 r261774  
     12020-05-15  Simon Fraser  <simon.fraser@apple.com>
     2
     3        REGRESSION (r249091): Can't click on a video in the second column of a paginated web view
     4        https://bugs.webkit.org/show_bug.cgi?id=211973
     5        <rdar://problem/61418775>
     6
     7        Reviewed by Zalan Bujtas.
     8
     9        In r249091 I made clip layer computation use offsetFromAncestor() by default, but this turns
     10        out to give different behavior from mapping via renderers in columns.
     11
     12        The bug was that accumulateOffsetTowardsAncestor() would map through the
     13        RenderMultiColumnFlow columns if the ancestorLayer was the one that was using columns,
     14        but mapping via renderers only maps through columns if converting to some ancestor of
     15        the columnated renderer.
     16
     17        I did not investigate why this only affects video.
     18
     19        Test: fast/multicol/clipped-video-in-second-column.html
     20
     21        * rendering/RenderLayer.cpp:
     22        (WebCore::accumulateOffsetTowardsAncestor):
     23        (WebCore::RenderLayer::calculateClipRects const):
     24
    1252020-05-15  Kenneth Russell  <kbr@chromium.org>
    226
  • trunk/Source/WebCore/rendering/RenderLayer.cpp

    r261742 r261774  
    23852385
    23862386    if (adjustForColumns == RenderLayer::AdjustForColumns) {
    2387         if (RenderLayer* parentLayer = layer->parent()) {
     2387        auto* parentLayer = layer->parent();
     2388        if (parentLayer && parentLayer != ancestorLayer) {
    23882389            if (is<RenderMultiColumnFlow>(parentLayer->renderer())) {
    2389                 RenderFragmentContainer* fragment = downcast<RenderMultiColumnFlow>(parentLayer->renderer()).physicalTranslationFromFlowToFragment(location);
    2390                 if (fragment)
     2390                if (auto* fragment = downcast<RenderMultiColumnFlow>(parentLayer->renderer()).physicalTranslationFromFlowToFragment(location))
    23912391                    location.moveBy(fragment->topLeftLocation() + -parentLayer->renderBox()->topLeftLocation());
    23922392            }
     
    57845784        if (clipRects.fixed() && &clipRectsContext.rootLayer->renderer() == &renderer().view())
    57855785            offset -= toLayoutSize(renderer().view().frameView().scrollPositionForFixedPosition());
    5786        
     5786
    57875787        if (renderer().hasOverflowClip()) {
    57885788            ClipRect newOverflowClip = downcast<RenderBox>(renderer()).overflowClipRectForChildLayers(offset, nullptr, clipRectsContext.overlayScrollbarSizeRelevancy);
     
    58005800    }
    58015801
    5802     LOG_WITH_STREAM(ClipRects, stream << "RenderLayer " << this << " calculateClipRects " << clipRects);
     5802    LOG_WITH_STREAM(ClipRects, stream << "RenderLayer " << this << " calculateClipRects " << clipRectsContext << " computed " << clipRects);
    58035803}
    58045804
Note: See TracChangeset for help on using the changeset viewer.