| Differences between
and this patch
- a/Source/WebCore/ChangeLog +18 lines
Lines 1-3 a/Source/WebCore/ChangeLog_sec1
1
2012-01-23  Sami Kyostila  <skyostil@chromium.org>
2
3
        Clipping of render layer boundaries does not take page scale into account
4
        https://bugs.webkit.org/show_bug.cgi?id=76850
5
6
        Reviewed by NOBODY (OOPS!).
7
8
        When inserting render layers into the compositor's overlap map, the
9
        layer boundaries are clipped against any potential parent clip rects.
10
        The clip rects are given in CSS coordinates, while the render layer
11
        boundaries are in scaled CSS coordinates, so the result is incorrect.
12
        This patch scales the clip rects before calculating the intersection.
13
14
        Test: compositing/overflow/overflow-scaled-descendant-overlapping.html
15
16
        * rendering/RenderLayerCompositor.cpp:
17
        (WebCore::RenderLayerCompositor::addToOverlapMap):
18
1
2012-01-22  Mario Sanchez Prada  <msanchez@igalia.com>
19
2012-01-22  Mario Sanchez Prada  <msanchez@igalia.com>
2
20
3
        [GTK] ATK text-caret-moved and text-selection-changed events not being emitted
21
        [GTK] ATK text-caret-moved and text-selection-changed events not being emitted
- a/Source/WebCore/rendering/RenderLayerCompositor.cpp +1 lines
Lines 595-600 void RenderLayerCompositor::addToOverlapMap(OverlapMap& overlapMap, RenderLayer* a/Source/WebCore/rendering/RenderLayerCompositor.cpp_sec1
595
    }
595
    }
596
596
597
    LayoutRect clipRect = layer->backgroundClipRect(rootRenderLayer(), 0, true).rect(); // FIXME: Incorrect for CSS regions.
597
    LayoutRect clipRect = layer->backgroundClipRect(rootRenderLayer(), 0, true).rect(); // FIXME: Incorrect for CSS regions.
598
    clipRect.scale(pageScaleFactor());
598
    clipRect.intersect(layerBounds);
599
    clipRect.intersect(layerBounds);
599
    overlapMap.add(layer, clipRect);
600
    overlapMap.add(layer, clipRect);
600
}
601
}
- a/LayoutTests/ChangeLog +13 lines
Lines 1-3 a/LayoutTests/ChangeLog_sec1
1
2012-01-23  Sami Kyostila  <skyostil@chromium.org>
2
3
        Clipping of render layer boundaries does not take page scale into account
4
        https://bugs.webkit.org/show_bug.cgi?id=76850
5
6
        Added new test to make sure render layers inside clipped containers
7
        are correctly tested for overlap with over layers.
8
9
        Reviewed by NOBODY (OOPS!).
10
11
        * compositing/overflow/overflow-scaled-descendant-overlapping.html: Added.
12
        * platform/chromium-linux/compositing/overflow/overflow-scaled-descendant-overlapping-expected.png: Added.
13
1
2012-01-22  Nikolas Zimmermann  <nzimmermann@rim.com>
14
2012-01-22  Nikolas Zimmermann  <nzimmermann@rim.com>
2
15
3
        Not reviewed. Fix typo, which makes the style bot warn on every patch.
16
        Not reviewed. Fix typo, which makes the style bot warn on every patch.
- a/LayoutTests/compositing/overflow/overflow-scaled-descendant-overlapping.html +27 lines
Line 0 a/LayoutTests/compositing/overflow/overflow-scaled-descendant-overlapping.html_sec1
1
<html>
2
    <!-- This checks the overlap test between render layers inside clipped
3
    containers and other render layers when page scaling is used. See
4
    https://bugs.webkit.org/show_bug.cgi?id=76850 -->
5
    <script>
6
        window.onload = function() {
7
            if (window.layoutTestController)
8
                layoutTestController.dumpAsText(true);
9
            if (window.internals)
10
                window.internals.setPageScaleFactor(document, 0.5, 0, 0);
11
        }
12
    </script>
13
14
    <style type="text/css">
15
        div { width: 100px; height: 100px }
16
    </style>
17
18
    <div style="position: absolute; left: 400px; z-index: 1; background: #0f0">
19
        <!-- Green should appear on top. -->
20
    </div>
21
22
    <div style="position: absolute; left: 400px; overflow: hidden">
23
        <div style="-webkit-transform: translateZ(0); background: #f00">
24
            <!-- Red should be hidden. -->
25
        </div>
26
    </div>
27
</html>

Return to Bug 76850