Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(817)

Side by Side Diff: Source/core/rendering/RenderLayerRepainter.cpp

Issue 210043008: Kill outlineBox (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved.
3 * 3 *
4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. 4 * Portions are Copyright (C) 1998 Netscape Communications Corporation.
5 * 5 *
6 * Other contributors: 6 * Other contributors:
7 * Robert O'Callahan <roc+@cs.cmu.edu> 7 * Robert O'Callahan <roc+@cs.cmu.edu>
8 * David Baron <dbaron@fas.harvard.edu> 8 * David Baron <dbaron@fas.harvard.edu>
9 * Christian Biesinger <cbiesinger@web.de> 9 * Christian Biesinger <cbiesinger@web.de>
10 * Randall Jesup <rjesup@wgate.com> 10 * Randall Jesup <rjesup@wgate.com>
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 if (m_renderer->layer()->hasVisibleContent()) { 69 if (m_renderer->layer()->hasVisibleContent()) {
70 RenderView* view = m_renderer->view(); 70 RenderView* view = m_renderer->view();
71 ASSERT(view); 71 ASSERT(view);
72 // FIXME: LayoutState does not work with RenderLayers as there is not a 1-to-1 72 // FIXME: LayoutState does not work with RenderLayers as there is not a 1-to-1
73 // mapping between them and the RenderObjects. It would be neat to enabl e 73 // mapping between them and the RenderObjects. It would be neat to enabl e
74 // LayoutState outside the layout() phase and use it here. 74 // LayoutState outside the layout() phase and use it here.
75 ASSERT(!view->layoutStateEnabled()); 75 ASSERT(!view->layoutStateEnabled());
76 76
77 RenderLayerModelObject* repaintContainer = m_renderer->containerForRepai nt(); 77 RenderLayerModelObject* repaintContainer = m_renderer->containerForRepai nt();
78 LayoutRect oldRepaintRect = m_repaintRect; 78 LayoutRect oldRepaintRect = m_repaintRect;
79 LayoutRect oldOutlineBox = m_outlineBox;
80 computeRepaintRects(repaintContainer, geometryMap); 79 computeRepaintRects(repaintContainer, geometryMap);
81 shouldCheckForRepaint &= shouldRepaintLayer(); 80 shouldCheckForRepaint &= shouldRepaintLayer();
82 81
83 // FIXME: Should ASSERT that value calculated for m_outlineBox using the cached offset is the same
84 // as the value not using the cached offset, but we can't due to https:/ /bugs.webkit.org/show_bug.cgi?id=37048
85 if (shouldCheckForRepaint) { 82 if (shouldCheckForRepaint) {
86 if (view && !view->document().printing()) { 83 if (view && !view->document().printing()) {
87 if (m_repaintStatus & NeedsFullRepaint) { 84 if (m_repaintStatus & NeedsFullRepaint) {
88 m_renderer->repaintUsingContainer(repaintContainer, pixelSna ppedIntRect(oldRepaintRect)); 85 m_renderer->repaintUsingContainer(repaintContainer, pixelSna ppedIntRect(oldRepaintRect));
89 if (m_repaintRect != oldRepaintRect) 86 if (m_repaintRect != oldRepaintRect)
90 m_renderer->repaintUsingContainer(repaintContainer, pixe lSnappedIntRect(m_repaintRect)); 87 m_renderer->repaintUsingContainer(repaintContainer, pixe lSnappedIntRect(m_repaintRect));
91 } else { 88 } else {
92 m_renderer->repaintAfterLayoutIfNeeded(repaintContainer, m_r enderer->selfNeedsLayout(), oldRepaintRect, oldOutlineBox, &m_repaintRect, &m_ou tlineBox); 89 m_renderer->repaintAfterLayoutIfNeeded(repaintContainer, m_r enderer->selfNeedsLayout(), oldRepaintRect, &m_repaintRect);
93 } 90 }
94 } 91 }
95 } 92 }
96 } else { 93 } else {
97 clearRepaintRects(); 94 clearRepaintRects();
98 } 95 }
99 96
100 m_repaintStatus = NeedsNormalRepaint; 97 m_repaintStatus = NeedsNormalRepaint;
101 98
102 } 99 }
103 100
104 void RenderLayerRepainter::clearRepaintRects() 101 void RenderLayerRepainter::clearRepaintRects()
105 { 102 {
106 ASSERT(!m_renderer->layer()->hasVisibleContent()); 103 ASSERT(!m_renderer->layer()->hasVisibleContent());
107 104
108 m_repaintRect = IntRect(); 105 m_repaintRect = IntRect();
109 m_outlineBox = IntRect();
110 } 106 }
111 107
112 void RenderLayerRepainter::computeRepaintRects(const RenderLayerModelObject* rep aintContainer, const RenderGeometryMap* geometryMap) 108 void RenderLayerRepainter::computeRepaintRects(const RenderLayerModelObject* rep aintContainer, const RenderGeometryMap* geometryMap)
113 { 109 {
114 if (RuntimeEnabledFeatures::repaintAfterLayoutEnabled()) 110 if (RuntimeEnabledFeatures::repaintAfterLayoutEnabled())
115 return; 111 return;
116 112
117 m_repaintRect = m_renderer->clippedOverflowRectForRepaint(repaintContainer); 113 m_repaintRect = m_renderer->clippedOverflowRectForRepaint(repaintContainer);
118 m_outlineBox = m_renderer->outlineBoundsForRepaint(repaintContainer, geometr yMap);
119 } 114 }
120 115
121 void RenderLayerRepainter::computeRepaintRectsIncludingDescendants() 116 void RenderLayerRepainter::computeRepaintRectsIncludingDescendants()
122 { 117 {
123 if (RuntimeEnabledFeatures::repaintAfterLayoutEnabled()) { 118 if (RuntimeEnabledFeatures::repaintAfterLayoutEnabled()) {
124 // FIXME: We want RenderLayerRepainter to go away when 119 // FIXME: We want RenderLayerRepainter to go away when
125 // repaint-after-layout is on by default so we need to figure out how to 120 // repaint-after-layout is on by default so we need to figure out how to
126 // handle this update. 121 // handle this update.
127 // 122 //
128 // This is a little silly as we create and immediately destroy the RAII 123 // This is a little silly as we create and immediately destroy the RAII
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 RenderLayer* RenderLayerRepainter::enclosingFilterRepaintLayer() const 275 RenderLayer* RenderLayerRepainter::enclosingFilterRepaintLayer() const
281 { 276 {
282 for (const RenderLayer* curr = m_renderer->layer(); curr; curr = curr->paren t()) { 277 for (const RenderLayer* curr = m_renderer->layer(); curr; curr = curr->paren t()) {
283 if ((curr != m_renderer->layer() && curr->requiresFullLayerImageForFilte rs()) || curr->compositingState() == PaintsIntoOwnBacking || curr->isRootLayer() ) 278 if ((curr != m_renderer->layer() && curr->requiresFullLayerImageForFilte rs()) || curr->compositingState() == PaintsIntoOwnBacking || curr->isRootLayer() )
284 return const_cast<RenderLayer*>(curr); 279 return const_cast<RenderLayer*>(curr);
285 } 280 }
286 return 0; 281 return 0;
287 } 282 }
288 283
289 } // Namespace WebCore 284 } // Namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698