Remove duplicated invalidation

The code to generate an invalidation for StyleDifferenceRepaint and outline
decrease in RenderLayerModelObject::styleWillChange is duplicated with the
one in RenderObject::styleWillChange. This meant that we would generate 2
identical invalidations for each repaint-cue or outline decrease.

Review URL: https://codereview.chromium.org/217973002

git-svn-id: svn://svn.chromium.org/blink/trunk@170591 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent e7d7fd86
......@@ -479,6 +479,20 @@ crbug.com/268832 [ SnowLeopard Debug ] fast/multicol/newmulticol/direct-child-co
crbug.com/271243 [ Win ] http/tests/misc/acid3.html [ Failure ]
Bug(jchaffraix) [ Mac ] compositing/repaint/invalidations-on-composited-layers.html [ NeedsRebaseline ]
Bug(jchaffraix) [ Mac ] fast/repaint/body-background-image.html [ NeedsRebaseline ]
Bug(jchaffraix) [ Mac ] fast/repaint/fixed.html [ NeedsRebaseline ]
Bug(jchaffraix) [ Mac ] fast/repaint/inline-color-change.html [ NeedsRebaseline ]
Bug(jchaffraix) [ Mac ] fast/repaint/outline-shrinking.html [ NeedsRebaseline ]
Bug(jchaffraix) [ Mac ] fast/repaint/rel-positioned-inline-with-overflow.html [ NeedsRebaseline ]
Bug(jchaffraix) [ Mac ] fast/repaint/table-cell-collapsed-border.html [ NeedsRebaseline ]
Bug(jchaffraix) [ Mac ] fast/repaint/table-collapsed-border.html [ NeedsRebaseline ]
Bug(jchaffraix) [ Mac ] fast/repaint/textarea-set-disabled.html [ NeedsRebaseline ]
Bug(jchaffraix) [ Mac ] virtual/softwarecompositing/repaint/invalidations-on-composited-layers.html [ NeedsRebaseline ]
Bug(jchaffraix) compositing/overflow/updating-scrolling-content.html [ NeedsRebaseline ]
Bug(jchaffraix) virtual/gpu/compositedscrolling/overflow/updating-scrolling-content.html [ NeedsRebaseline ]
Bug(jchaffraix) virtual/softwarecompositing/overflow/updating-scrolling-content.html [ NeedsRebaseline ]
crbug.com/278497 [ SnowLeopard Debug ] http/tests/security/contentSecurityPolicy/1.1/plugintypes-invalid.html [ Failure Pass ]
crbug.com/280342 [ Linux Win ] http/tests/media/progress-events-generated-correctly.html [ Failure Pass ]
......
......@@ -23,7 +23,6 @@
(repaint rects
(rect 80.00 80.00 182.00 29.00)
(rect 80.00 80.00 182.00 29.00)
(rect 80.00 80.00 182.00 29.00)
)
)
)
......
......@@ -52,7 +52,6 @@ CASE 2, hovering over the outer div
(repaint rects
(rect 0.00 0.00 142.00 142.00)
(rect 0.00 0.00 142.00 142.00)
(rect 0.00 0.00 142.00 142.00)
)
)
)
......@@ -86,8 +85,6 @@ CASE 3, hovering over the inner div
(repaint rects
(rect 0.00 0.00 142.00 142.00)
(rect 0.00 0.00 142.00 142.00)
(rect 0.00 0.00 142.00 142.00)
(rect 32.00 32.00 71.00 71.00)
(rect 32.00 32.00 71.00 71.00)
(rect 32.00 32.00 71.00 71.00)
)
......
......@@ -52,7 +52,6 @@ CASE 2, hovering over the outer div
(repaint rects
(rect 0.00 0.00 132.00 132.00)
(rect 0.00 0.00 132.00 132.00)
(rect 0.00 0.00 132.00 132.00)
)
)
)
......@@ -86,8 +85,6 @@ CASE 3, hovering over the inner div
(repaint rects
(rect 0.00 0.00 132.00 132.00)
(rect 0.00 0.00 132.00 132.00)
(rect 0.00 0.00 132.00 132.00)
(rect 18.00 21.00 87.00 87.00)
(rect 18.00 21.00 87.00 87.00)
(rect 18.00 21.00 87.00 87.00)
)
......
......@@ -54,7 +54,6 @@ CASE 2, overlap1 changes color:
(repaint rects
(rect 0.00 0.00 100.00 100.00)
(rect 0.00 0.00 100.00 100.00)
(rect 0.00 0.00 100.00 100.00)
)
)
)
......@@ -86,12 +85,10 @@ CASE 3, overlap1 and overlap2 change color:
(bounds 260.00 260.00)
(drawsContent 1)
(repaint rects
(rect 80.00 80.00 100.00 100.00)
(rect 80.00 80.00 100.00 100.00)
(rect 80.00 80.00 100.00 100.00)
(rect 0.00 0.00 100.00 100.00)
(rect 0.00 0.00 100.00 100.00)
(rect 0.00 0.00 100.00 100.00)
)
)
)
......@@ -123,12 +120,10 @@ CASE 4, overlap2 and overlap3 change color:
(bounds 260.00 260.00)
(drawsContent 1)
(repaint rects
(rect 160.00 160.00 100.00 100.00)
(rect 160.00 160.00 100.00 100.00)
(rect 160.00 160.00 100.00 100.00)
(rect 80.00 80.00 100.00 100.00)
(rect 80.00 80.00 100.00 100.00)
(rect 80.00 80.00 100.00 100.00)
)
)
)
......@@ -162,8 +157,6 @@ CASE 5, overlap3 and overlap1 change color:
(repaint rects
(rect 160.00 160.00 100.00 100.00)
(rect 160.00 160.00 100.00 100.00)
(rect 160.00 160.00 100.00 100.00)
(rect 0.00 0.00 100.00 100.00)
(rect 0.00 0.00 100.00 100.00)
(rect 0.00 0.00 100.00 100.00)
)
......
(repaint rects
(rect 28 20 320 320)
(rect 28 20 320 320)
(rect 28 20 320 320)
)
(repaint rects
(rect 33 25 250 250)
(rect 33 25 250 250)
(rect 33 25 250 250)
)
(repaint rects
(rect 8 8 390 390)
(rect 8 8 390 390)
(rect 8 8 390 390)
)
......@@ -2,6 +2,5 @@
(repaint rects
(rect 8 8 100 100)
(rect 8 8 100 100)
(rect 8 8 100 100)
)
(repaint rects
(rect 60 60 100 100)
(rect 60 60 100 100)
(rect 60 60 100 100)
)
......@@ -3,6 +3,5 @@ In DumpRenderTree, there should be repaint logs of 100x100 rect. We don't care h
(repaint rects
(rect 29 106 100 100)
(rect 29 106 100 100)
(rect 29 106 100 100)
)
......@@ -3,6 +3,5 @@ In DumpRenderTree, there should be repaint logs of 100x100 rect. We don't care h
(repaint rects
(rect 29 29 100 100)
(rect 29 29 100 100)
(rect 29 29 100 100)
)
......@@ -3,6 +3,5 @@ In DumpRenderTree, there should be repaint logs of 100x100 rect. We don't care h
(repaint rects
(rect 29 21 100 100)
(rect 29 21 100 100)
(rect 29 21 100 100)
)
(repaint rects
(rect 8 8 100 100)
(rect 8 8 100 100)
(rect 8 8 100 100)
(rect 138 8 100 100)
......
......@@ -6,7 +6,6 @@
(rect 148 48 60 60)
(rect 48 48 60 60)
(rect 48 48 60 60)
(rect 48 48 60 60)
(rect 88 28 20 80)
(rect 28 88 80 20)
(rect 48 48 60 60)
......
......@@ -2,6 +2,5 @@ Hidden Text
(repaint rects
(rect 550 8 200 50)
(rect 550 8 200 50)
(rect 550 8 200 50)
)
(repaint rects
(rect 260 260 100 100)
(rect 260 260 100 100)
(rect 260 260 100 100)
)
(repaint rects
(rect 111 9 100 100)
(rect 111 9 100 100)
(rect 111 9 100 100)
)
(repaint rects
(rect 8 8 106 104)
(rect 8 8 106 104)
(rect 8 8 106 104)
)
......@@ -3,6 +3,5 @@ A A A
(repaint rects
(rect 8 10 200 97)
(rect 8 10 200 97)
(rect 8 10 200 97)
)
......@@ -3,6 +3,5 @@ In DumpRenderTree, there should be repaint logs of 100x100 rect. We don't care h
(repaint rects
(rect 214 21 100 100)
(rect 214 21 100 100)
(rect 214 21 100 100)
)
......@@ -3,6 +3,5 @@ In DumpRenderTree, there should be repaint logs of 100x100 rect. We don't care h
(repaint rects
(rect 29 29 100 100)
(rect 29 29 100 100)
(rect 29 29 100 100)
)
......@@ -3,6 +3,5 @@ In DumpRenderTree, there should be repaint logs of 100x100 rect. We don't care h
(repaint rects
(rect 29 21 100 100)
(rect 29 21 100 100)
(rect 29 21 100 100)
)
......@@ -20,7 +20,6 @@
(repaint rects
(rect 0.00 0.00 185.00 200.00)
(rect 0.00 0.00 185.00 200.00)
(rect 0.00 0.00 185.00 200.00)
)
)
)
......
......@@ -20,7 +20,6 @@
(repaint rects
(rect 0.00 0.00 185.00 200.00)
(rect 0.00 0.00 185.00 200.00)
(rect 0.00 0.00 185.00 200.00)
)
)
)
......
......@@ -20,7 +20,6 @@
(repaint rects
(rect 0.00 0.00 185.00 200.00)
(rect 0.00 0.00 185.00 200.00)
(rect 0.00 0.00 185.00 200.00)
)
)
)
......
......@@ -20,7 +20,6 @@
(repaint rects
(rect 0.00 0.00 400.00 400.00)
(rect 0.00 0.00 400.00 400.00)
(rect 0.00 0.00 400.00 400.00)
)
(children 1
(GraphicsLayer
......@@ -32,7 +31,6 @@
(repaint rects
(rect 0.00 0.00 75.00 75.00)
(rect 0.00 0.00 75.00 75.00)
(rect 0.00 0.00 75.00 75.00)
)
)
)
......
......@@ -4,6 +4,5 @@ Repaint test for http://bugs.webkit.org/show_bug.cgi?id=15157 Image defined in b
(rect 0 0 800 600)
(rect 8 240 784 288)
(rect 8 240 784 288)
(rect 8 240 784 288)
)
......@@ -3,6 +3,5 @@ Repaint test for http://bugs.webkit.org/show_bug.cgi?id=11452 REGRESSION (r16736
(repaint rects
(rect 8 64 100 100)
(rect 8 64 100 100)
(rect 8 64 100 100)
)
......@@ -5,6 +5,5 @@ PASS
(repaint rects
(rect 8 72 38 19)
(rect 8 72 38 19)
(rect 8 72 38 19)
)
......@@ -3,7 +3,6 @@ This is a test for http://bugzilla.opendarwin.org/show_bug.cgi?id=9388 REGRESSIO
There should be a green square and no trace of red.
(repaint rects
(rect 4 114 108 108)
(rect 4 114 108 108)
(rect 4 114 108 108)
(rect 8 118 100 100)
......
......@@ -4,6 +4,5 @@ If you see any red or orange below then the test has failed.
(repaint rects
(rect 8 94 100 50)
(rect 8 94 100 50)
(rect 8 94 100 50)
)
......@@ -3,12 +3,9 @@ Repaint test for http://bugs.webkit.org/show_bug.cgi?id=11359 Incomplete repaint
(repaint rects
(rect 220 264 122 110)
(rect 220 264 122 110)
(rect 220 264 122 110)
(rect 3 264 118 110)
(rect 3 264 118 110)
(rect 3 264 118 110)
(rect 220 64 122 108)
(rect 220 64 122 108)
(rect 220 64 122 108)
)
......@@ -17,17 +17,12 @@ sit amet
(rect 22 224 89 22)
(rect 8 10 91 82)
(rect 8 10 91 82)
(rect 8 10 91 82)
(rect 12 14 83 74)
(rect 12 14 83 74)
(rect 12 14 83 74)
(rect 12 62 83 26)
(rect 12 62 83 26)
(rect 12 62 83 26)
(rect 12 40 83 22)
(rect 12 40 83 22)
(rect 12 40 83 22)
(rect 12 14 83 26)
(rect 12 14 83 26)
(rect 12 14 83 26)
(rect 22 102 56 30)
......
......@@ -2,8 +2,6 @@
(repaint rects
(rect 8 8 106 106)
(rect 8 8 106 106)
(rect 8 8 106 106)
(rect 11 11 100 10)
(rect 11 11 100 10)
(rect 11 11 100 10)
(rect 8 8 106 106)
......
......@@ -20,7 +20,6 @@
(repaint rects
(rect 0.00 0.00 400.00 400.00)
(rect 0.00 0.00 400.00 400.00)
(rect 0.00 0.00 400.00 400.00)
)
(children 1
(GraphicsLayer
......@@ -32,7 +31,6 @@
(repaint rects
(rect 0.00 0.00 75.00 75.00)
(rect 0.00 0.00 75.00 75.00)
(rect 0.00 0.00 75.00 75.00)
)
)
)
......
......@@ -96,15 +96,12 @@ void RenderLayerModelObject::styleWillChange(StyleDifference diff, const RenderS
// we need to dirty our stacking context's z-order list.
RenderStyle* oldStyle = style();
if (oldStyle) {
if (parent()) {
// Do a repaint with the old style first, e.g., for example if we go from
// having an outline to not having an outline.
if (diff == StyleDifferenceRepaintLayer) {
layer()->repainter().repaintIncludingDescendants();
if (oldStyle->clip() != newStyle.clip())
layer()->clipper().clearClipRectsIncludingDescendants();
} else if (diff == StyleDifferenceRepaint || newStyle.outlineSize() < oldStyle->outlineSize())
repaint();
// Do a repaint with the old style first through RenderLayerRepainter.
// RenderObject::styleWillChange takes care of repainting objects without RenderLayers.
if (parent() && diff == StyleDifferenceRepaintLayer) {
layer()->repainter().repaintIncludingDescendants();
if (oldStyle->clip() != newStyle.clip())
layer()->clipper().clearClipRectsIncludingDescendants();
}
if (diff == StyleDifferenceLayout || diff == StyleDifferenceSimplifiedLayout) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment