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

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

Issue 596583002: Move paint code from RenderFlexibleBox to BlockPainter. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 3 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
« no previous file with comments | « Source/core/rendering/RenderFlexibleBox.h ('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) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 } 273 }
274 274
275 void RenderFlexibleBox::appendChildFrameRects(ChildFrameRects& childFrameRects) 275 void RenderFlexibleBox::appendChildFrameRects(ChildFrameRects& childFrameRects)
276 { 276 {
277 for (RenderBox* child = m_orderIterator.first(); child; child = m_orderItera tor.next()) { 277 for (RenderBox* child = m_orderIterator.first(); child; child = m_orderItera tor.next()) {
278 if (!child->isOutOfFlowPositioned()) 278 if (!child->isOutOfFlowPositioned())
279 childFrameRects.append(child->frameRect()); 279 childFrameRects.append(child->frameRect());
280 } 280 }
281 } 281 }
282 282
283 void RenderFlexibleBox::paintChildren(PaintInfo& paintInfo, const LayoutPoint& p aintOffset) 283 void RenderFlexibleBox::paintChildren(PaintInfo& paintInfo, const LayoutPoint& p aintOffset)
pdr. 2014/09/22 23:07:48 For a future patch: I looked into this and we only
chrishtr 2014/09/22 23:10:37 Kewl.
284 { 284 {
285 for (RenderBox* child = m_orderIterator.first(); child; child = m_orderItera tor.next()) 285 BlockPainter::paintChildrenOfFlexibleBox(*this, paintInfo, paintOffset);
286 BlockPainter(*this).paintChildAsInlineBlock(child, paintInfo, paintOffse t);
287 } 286 }
288 287
289 void RenderFlexibleBox::repositionLogicalHeightDependentFlexItems(Vector<LineCon text>& lineContexts) 288 void RenderFlexibleBox::repositionLogicalHeightDependentFlexItems(Vector<LineCon text>& lineContexts)
290 { 289 {
291 LayoutUnit crossAxisStartEdge = lineContexts.isEmpty() ? LayoutUnit() : line Contexts[0].crossAxisOffset; 290 LayoutUnit crossAxisStartEdge = lineContexts.isEmpty() ? LayoutUnit() : line Contexts[0].crossAxisOffset;
292 alignFlexLines(lineContexts); 291 alignFlexLines(lineContexts);
293 292
294 alignChildren(lineContexts); 293 alignChildren(lineContexts);
295 294
296 if (style()->flexWrap() == FlexWrapReverse) 295 if (style()->flexWrap() == FlexWrapReverse)
(...skipping 1105 matching lines...) Expand 10 before | Expand all | Expand 10 after
1402 ASSERT(child); 1401 ASSERT(child);
1403 LayoutUnit lineCrossAxisExtent = lineContexts[lineNumber].crossAxisE xtent; 1402 LayoutUnit lineCrossAxisExtent = lineContexts[lineNumber].crossAxisE xtent;
1404 LayoutUnit originalOffset = lineContexts[lineNumber].crossAxisOffset - crossAxisStartEdge; 1403 LayoutUnit originalOffset = lineContexts[lineNumber].crossAxisOffset - crossAxisStartEdge;
1405 LayoutUnit newOffset = contentExtent - originalOffset - lineCrossAxi sExtent; 1404 LayoutUnit newOffset = contentExtent - originalOffset - lineCrossAxi sExtent;
1406 adjustAlignmentForChild(*child, newOffset - originalOffset); 1405 adjustAlignmentForChild(*child, newOffset - originalOffset);
1407 } 1406 }
1408 } 1407 }
1409 } 1408 }
1410 1409
1411 } 1410 }
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderFlexibleBox.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698