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

Side by Side Diff: sky/engine/core/rendering/InlineFlowBox.cpp

Issue 899753003: Walk render tree instead of render layers for paint. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: address review comments Created 5 years, 10 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
« no previous file with comments | « sky/engine/core/rendering/InlineFlowBox.h ('k') | sky/engine/core/rendering/InlineTextBox.h » ('j') | 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) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
3 * 3 *
4 * This library is free software; you can redistribute it and/or 4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public 5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version. 7 * version 2 of the License, or (at your option) any later version.
8 * 8 *
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 971 matching lines...) Expand 10 before | Expand all | Expand 10 after
982 982
983 if (visibleToHitTestRequest(request) && locationInContainer.intersects(rect) ) { 983 if (visibleToHitTestRequest(request) && locationInContainer.intersects(rect) ) {
984 renderer().updateHitTestResult(result, locationInContainer.point() - toL ayoutSize(accumulatedOffset)); // Don't add in m_x or m_y here, we want coords i n the containing block's space. 984 renderer().updateHitTestResult(result, locationInContainer.point() - toL ayoutSize(accumulatedOffset)); // Don't add in m_x or m_y here, we want coords i n the containing block's space.
985 if (!result.addNodeToRectBasedTestResult(renderer().node(), request, loc ationInContainer, rect)) 985 if (!result.addNodeToRectBasedTestResult(renderer().node(), request, loc ationInContainer, rect))
986 return true; 986 return true;
987 } 987 }
988 988
989 return false; 989 return false;
990 } 990 }
991 991
992 void InlineFlowBox::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset, LayoutUnit lineTop, LayoutUnit lineBottom) 992 void InlineFlowBox::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset, LayoutUnit lineTop, LayoutUnit lineBottom, Vector<RenderBox*>& layers)
993 { 993 {
994 LayoutRect overflowRect(visualOverflowRect(lineTop, lineBottom)); 994 LayoutRect overflowRect(visualOverflowRect(lineTop, lineBottom));
995 overflowRect.moveBy(paintOffset); 995 overflowRect.moveBy(paintOffset);
996 996
997 if (!paintInfo.rect.intersects(pixelSnappedIntRect(overflowRect))) 997 if (!paintInfo.rect.intersects(pixelSnappedIntRect(overflowRect)))
998 return; 998 return;
999 999
1000 paintBoxDecorationBackground(paintInfo, paintOffset); 1000 paintBoxDecorationBackground(paintInfo, paintOffset);
1001 1001
1002 for (InlineBox* curr = firstChild(); curr; curr = curr->nextOnLine()) { 1002 for (InlineBox* curr = firstChild(); curr; curr = curr->nextOnLine()) {
1003 if (curr->renderer().isText() || !curr->boxModelObject()->hasSelfPaintin gLayer()) 1003 if (curr->renderer().isText() || !curr->boxModelObject()->hasSelfPaintin gLayer())
1004 curr->paint(paintInfo, paintOffset, lineTop, lineBottom); 1004 curr->paint(paintInfo, paintOffset, lineTop, lineBottom, layers);
1005 } 1005 }
1006 } 1006 }
1007 1007
1008 void InlineFlowBox::paintFillLayers(const PaintInfo& paintInfo, const Color& c, const FillLayer& fillLayer, const LayoutRect& rect) 1008 void InlineFlowBox::paintFillLayers(const PaintInfo& paintInfo, const Color& c, const FillLayer& fillLayer, const LayoutRect& rect)
1009 { 1009 {
1010 if (fillLayer.next()) 1010 if (fillLayer.next())
1011 paintFillLayers(paintInfo, c, *fillLayer.next(), rect); 1011 paintFillLayers(paintInfo, c, *fillLayer.next(), rect);
1012 paintFillLayer(paintInfo, c, fillLayer, rect); 1012 paintFillLayer(paintInfo, c, fillLayer, rect);
1013 } 1013 }
1014 1014
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
1352 ASSERT(child->prevOnLine() == prev); 1352 ASSERT(child->prevOnLine() == prev);
1353 prev = child; 1353 prev = child;
1354 } 1354 }
1355 ASSERT(prev == m_lastChild); 1355 ASSERT(prev == m_lastChild);
1356 #endif 1356 #endif
1357 } 1357 }
1358 1358
1359 #endif 1359 #endif
1360 1360
1361 } // namespace blink 1361 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/core/rendering/InlineFlowBox.h ('k') | sky/engine/core/rendering/InlineTextBox.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698