Changeset 122376 in webkit


Ignore:
Timestamp:
Jul 11, 2012 3:26:55 PM (12 years ago)
Author:
Simon Fraser
Message:

Assertion ASSERTION FAILED: enclosingIntRect(rendererMappedResult) == enclosingIntRect(FloatQuad(result).boundingBox()) when compositing in paginated mode
https://bugs.webkit.org/show_bug.cgi?id=90919

Reviewed by Antti Koivisto.

Source/WebCore:

r121124 added a fast path for geometry mapping that goes via layers
when possible. However, this broke paginated pages, which put
the root (RenderView) layer into column mode, because it failed
to check for columns on the ancestor layer.

Rather than make a risky change to convertToLayerCoords(), add a local
function canMapViaLayer(), which is like RenderLayer::canUseConvertToLayerCoords(),
but doesn't check for compositing (compositing itself is not a reason
to avoid convertToLayerCoords). Call canMapViaLayer() with the ancestorLayer
to check whether the ancestor has columns, which fixes the bug.

Test: compositing/columns/geometry-map-paginated-assert.html

  • rendering/RenderGeometryMap.cpp:

(WebCore::canMapViaLayer):
(WebCore::RenderGeometryMap::pushMappingsToAncestor):

LayoutTests:

Test with a composited element in a document which is put into paginated mode.

  • compositing/columns/geometry-map-paginated-assert-expected.txt: Added.
  • compositing/columns/geometry-map-paginated-assert.html: Added.
Location:
trunk
Files:
3 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r122374 r122376  
     12012-07-10  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Assertion ASSERTION FAILED: enclosingIntRect(rendererMappedResult) == enclosingIntRect(FloatQuad(result).boundingBox()) when compositing in paginated mode
     4        https://bugs.webkit.org/show_bug.cgi?id=90919
     5
     6        Reviewed by Antti Koivisto.
     7
     8        Test with a composited element in a document which is put into paginated mode.
     9
     10        * compositing/columns/geometry-map-paginated-assert-expected.txt: Added.
     11        * compositing/columns/geometry-map-paginated-assert.html: Added.
     12
    1132012-07-11  Ojan Vafai  <ojan@chromium.org>
    214
  • trunk/Source/WebCore/ChangeLog

    r122373 r122376  
     12012-07-10  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Assertion ASSERTION FAILED: enclosingIntRect(rendererMappedResult) == enclosingIntRect(FloatQuad(result).boundingBox()) when compositing in paginated mode
     4        https://bugs.webkit.org/show_bug.cgi?id=90919
     5
     6        Reviewed by Antti Koivisto.
     7
     8        r121124 added a fast path for geometry mapping that goes via layers
     9        when possible. However, this broke paginated pages, which put
     10        the root (RenderView) layer into column mode, because it failed
     11        to check for columns on the ancestor layer.
     12       
     13        Rather than make a risky change to convertToLayerCoords(), add a local
     14        function canMapViaLayer(), which is like RenderLayer::canUseConvertToLayerCoords(),
     15        but doesn't check for compositing (compositing itself is not a reason
     16        to avoid convertToLayerCoords). Call canMapViaLayer() with the ancestorLayer
     17        to check whether the ancestor has columns, which fixes the bug.
     18
     19        Test: compositing/columns/geometry-map-paginated-assert.html
     20
     21        * rendering/RenderGeometryMap.cpp:
     22        (WebCore::canMapViaLayer):
     23        (WebCore::RenderGeometryMap::pushMappingsToAncestor):
     24
    1252012-07-11  Dana Jansens  <danakj@chromium.org>
    226
  • trunk/Source/WebCore/rendering/RenderGeometryMap.cpp

    r121446 r122376  
    139139}
    140140
     141static bool canMapViaLayer(const RenderLayer* layer)
     142{
     143    RenderStyle* style = layer->renderer()->style();
     144    if (style->position() == FixedPosition || style->isFlippedBlocksWritingMode())
     145        return false;
     146   
     147    if (layer->renderer()->hasColumns() || layer->renderer()->hasTransform())
     148        return false;
     149
     150#if ENABLE(SVG)
     151    if (layer->renderer()->isSVGRoot())
     152        return false;
     153#endif
     154
     155    return true;
     156}
     157
    141158void RenderGeometryMap::pushMappingsToAncestor(const RenderLayer* layer, const RenderLayer* ancestorLayer)
    142159{
     
    144161
    145162    // The simple case can be handled fast in the layer tree.
    146     bool canConvertInLayerTree = ancestorLayer && renderer->style()->position() != FixedPosition && !renderer->style()->isFlippedBlocksWritingMode();
     163    bool canConvertInLayerTree = ancestorLayer ? canMapViaLayer(ancestorLayer) : false;
    147164    for (const RenderLayer* current = layer; current != ancestorLayer && canConvertInLayerTree; current = current->parent())
    148         canConvertInLayerTree = current->canUseConvertToLayerCoords();
     165        canConvertInLayerTree = canMapViaLayer(current);
    149166
    150167    if (canConvertInLayerTree) {
Note: See TracChangeset for help on using the changeset viewer.