Changeset 248514 in webkit


Ignore:
Timestamp:
Aug 10, 2019 9:03:56 PM (5 years ago)
Author:
Simon Fraser
Message:

REGRESSION (r245974): Missing content on habitburger.com, amazon.com
https://bugs.webkit.org/show_bug.cgi?id=200618
rdar://problem/53920224

Reviewed by Zalan Bujtas.

Source/WebCore:

In r245974 TileController::adjustTileCoverageRect() started to intersect the coverage
rect with the bounds of the layer, which is wrong because this coverage rect is passed down
to descendant layers, and they may project outside the bounds of this tiled layer.

This caused missing dropdowns on amazon.com, and a missing menu on habitburger.com on iPhone.

The fix is to just not do the intersection with the bounds. TileGrid::getTileIndexRangeForRect()
already ensures that we never make tiles outside the bounds of a TileController.

Test: compositing/backing/layer-outside-tiled-parent.html

  • platform/graphics/ca/TileController.cpp:

(WebCore::TileController::adjustTileCoverageRect):

  • platform/graphics/ca/TileGrid.cpp:

(WebCore::TileGrid::ensureTilesForRect):

LayoutTests:

  • compositing/backing/layer-outside-tiled-parent-expected.txt: Added.
  • compositing/backing/layer-outside-tiled-parent.html: Added.
  • platform/ios-wk2/compositing/backing/layer-outside-tiled-parent-expected.txt: Added.
  • tiled-drawing/tile-coverage-iframe-to-zero-coverage-expected.txt:
  • tiled-drawing/tiled-backing-in-window-expected.txt:
Location:
trunk
Files:
3 added
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r248513 r248514  
     12019-08-10  Simon Fraser  <simon.fraser@apple.com>
     2
     3        REGRESSION (r245974): Missing content on habitburger.com, amazon.com
     4        https://bugs.webkit.org/show_bug.cgi?id=200618
     5        rdar://problem/53920224
     6
     7        Reviewed by Zalan Bujtas.
     8
     9        * compositing/backing/layer-outside-tiled-parent-expected.txt: Added.
     10        * compositing/backing/layer-outside-tiled-parent.html: Added.
     11        * platform/ios-wk2/compositing/backing/layer-outside-tiled-parent-expected.txt: Added.
     12        * tiled-drawing/tile-coverage-iframe-to-zero-coverage-expected.txt:
     13        * tiled-drawing/tiled-backing-in-window-expected.txt:
     14
    1152019-08-10  Andres Gonzalez  <andresg_22@apple.com>
    216
  • trunk/LayoutTests/tiled-drawing/tile-coverage-iframe-to-zero-coverage-expected.txt

    r245990 r248514  
    8080                                  (drawsContent 1)
    8181                                  (visible rect 0.00, 0.00 0.00 x 0.00)
    82                                   (coverage rect 0.00, 0.00 0.00 x 0.00)
     82                                  (coverage rect -8.00, -8.00 0.00 x 0.00)
    8383                                  (intersects coverage rect 0)
    8484                                  (contentsScale 1.00)
  • trunk/LayoutTests/tiled-drawing/tiled-backing-in-window-expected.txt

    r245974 r248514  
    6464          (drawsContent 1)
    6565          (visible rect 0.00, 0.00 777.00 x 200.00)
    66           (coverage rect 0.00, 0.00 777.00 x 200.00)
     66          (coverage rect -8.00, -8.00 785.00 x 585.00)
    6767          (intersects coverage rect 1)
    6868          (contentsScale 1.00)
  • trunk/Source/WebCore/ChangeLog

    r248513 r248514  
     12019-08-10  Simon Fraser  <simon.fraser@apple.com>
     2
     3        REGRESSION (r245974): Missing content on habitburger.com, amazon.com
     4        https://bugs.webkit.org/show_bug.cgi?id=200618
     5        rdar://problem/53920224
     6
     7        Reviewed by Zalan Bujtas.
     8
     9        In r245974 TileController::adjustTileCoverageRect() started to intersect the coverage
     10        rect with the bounds of the layer, which is wrong because this coverage rect is passed down
     11        to descendant layers, and they may project outside the bounds of this tiled layer.
     12       
     13        This caused missing dropdowns on amazon.com, and a missing menu on habitburger.com on iPhone.
     14
     15        The fix is to just not do the intersection with the bounds. TileGrid::getTileIndexRangeForRect()
     16        already ensures that we never make tiles outside the bounds of a TileController.
     17
     18        Test: compositing/backing/layer-outside-tiled-parent.html
     19
     20        * platform/graphics/ca/TileController.cpp:
     21        (WebCore::TileController::adjustTileCoverageRect):
     22        * platform/graphics/ca/TileGrid.cpp:
     23        (WebCore::TileGrid::ensureTilesForRect):
     24
    1252019-08-10  Andres Gonzalez  <andresg_22@apple.com>
    226
  • trunk/Source/WebCore/platform/graphics/ca/TileController.cpp

    r246091 r248514  
    369369        return unionRect(coverageRect, currentVisibleRect);
    370370
    371     auto expandedCoverageRect = GraphicsLayer::adjustCoverageRectForMovement(coverageRect, previousVisibleRect, currentVisibleRect);
    372     return intersection(expandedCoverageRect, boundsWithoutMargin());
     371    return GraphicsLayer::adjustCoverageRectForMovement(coverageRect, previousVisibleRect, currentVisibleRect);
    373372}
    374373
  • trunk/Source/WebCore/platform/graphics/ca/TileGrid.cpp

    r237925 r248514  
    558558        return IntRect();
    559559
    560     LOG_WITH_STREAM(Tiling, stream << "TileGrid " << this << " ensureTilesForRect: " << rect);
    561 
    562560    FloatRect scaledRect(rect);
    563561    scaledRect.scale(m_scale);
     
    609607        }
    610608    }
    611    
     609
    612610    if (tilesInCohort)
    613611        startedNewCohort(currCohort);
     612
     613    LOG_WITH_STREAM(Tiling, stream << "TileGrid " << this << " (bounds " << m_controller.bounds() << ") ensureTilesForRect: " << rect << " covered " << coverageRect);
    614614
    615615    return coverageRect;
Note: See TracChangeset for help on using the changeset viewer.