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

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

Issue 720313002: Push selection gaps logic down to RenderBlockFlow (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: move even MOAR! Created 6 years, 1 month 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
« no previous file with comments | « Source/core/rendering/RenderBlockFlow.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 2138 matching lines...) Expand 10 before | Expand all | Expand 10 after
2149 rect.intersect(box->overflowClipRect(LayoutPoint())); 2149 rect.intersect(box->overflowClipRect(LayoutPoint()));
2150 } 2150 }
2151 if (renderer()->hasClip()) 2151 if (renderer()->hasClip())
2152 rect.intersect(toRenderBox(renderer())->clipRect(LayoutPoint())); 2152 rect.intersect(toRenderBox(renderer())->clipRect(LayoutPoint()));
2153 if (!rect.isEmpty()) 2153 if (!rect.isEmpty())
2154 renderer()->invalidatePaintRectangle(rect); 2154 renderer()->invalidatePaintRectangle(rect);
2155 } 2155 }
2156 2156
2157 IntRect RenderLayer::blockSelectionGapsBounds() const 2157 IntRect RenderLayer::blockSelectionGapsBounds() const
2158 { 2158 {
2159 if (!renderer()->isRenderBlock()) 2159 if (!renderer()->isRenderBlockFlow())
2160 return IntRect(); 2160 return IntRect();
2161 2161
2162 RenderBlock* renderBlock = toRenderBlock(renderer()); 2162 RenderBlockFlow* renderBlockFlow = toRenderBlockFlow(renderer());
2163 LayoutRect gapRects = renderBlock->selectionGapRectsForPaintInvalidation(ren derBlock); 2163 LayoutRect gapRects = renderBlockFlow->selectionGapRectsForPaintInvalidation (renderBlockFlow);
2164 2164
2165 return pixelSnappedIntRect(gapRects); 2165 return pixelSnappedIntRect(gapRects);
2166 } 2166 }
2167 2167
2168 bool RenderLayer::hasBlockSelectionGapBounds() const 2168 bool RenderLayer::hasBlockSelectionGapBounds() const
2169 { 2169 {
2170 // FIXME: it would be more accurate to return !blockSelectionGapsBounds().is Empty(), but this is impossible 2170 // FIXME: it would be more accurate to return !blockSelectionGapsBounds().is Empty(), but this is impossible
2171 // at the moment because it causes invalid queries to layout-dependent code (crbug.com/372802). 2171 // at the moment because it causes invalid queries to layout-dependent code (crbug.com/372802).
2172 // ASSERT(renderer()->document().lifecycle().state() >= DocumentLifecycle::L ayoutClean); 2172 // ASSERT(renderer()->document().lifecycle().state() >= DocumentLifecycle::L ayoutClean);
2173 2173
(...skipping 666 matching lines...) Expand 10 before | Expand all | Expand 10 after
2840 } 2840 }
2841 } 2841 }
2842 2842
2843 void showLayerTree(const blink::RenderObject* renderer) 2843 void showLayerTree(const blink::RenderObject* renderer)
2844 { 2844 {
2845 if (!renderer) 2845 if (!renderer)
2846 return; 2846 return;
2847 showLayerTree(renderer->enclosingLayer()); 2847 showLayerTree(renderer->enclosingLayer());
2848 } 2848 }
2849 #endif 2849 #endif
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderBlockFlow.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698