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

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

Issue 762073002: Split more Paragraph-specific code from RenderBlock into RenderParagraph (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 6 years 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
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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 RenderBox* child; 65 RenderBox* child;
66 LayoutUnit childSize; 66 LayoutUnit childSize;
67 }; 67 };
68 68
69 69
70 RenderFlexibleBox::RenderFlexibleBox(Element* element) 70 RenderFlexibleBox::RenderFlexibleBox(Element* element)
71 : RenderBlock(element) 71 : RenderBlock(element)
72 , m_orderIterator(this) 72 , m_orderIterator(this)
73 , m_numberOfInFlowChildrenOnFirstLine(-1) 73 , m_numberOfInFlowChildrenOnFirstLine(-1)
74 { 74 {
75 ASSERT(!isRenderParagraph());
rafaelw 2014/11/28 03:53:50 No point in asserting this since the class hierarc
ojan 2014/11/28 04:02:24 Lol. Yeah. This used to be !childrenInline().
76 } 75 }
77 76
78 RenderFlexibleBox::~RenderFlexibleBox() 77 RenderFlexibleBox::~RenderFlexibleBox()
79 { 78 {
80 } 79 }
81 80
82 RenderFlexibleBox* RenderFlexibleBox::createAnonymous(Document* document) 81 RenderFlexibleBox* RenderFlexibleBox::createAnonymous(Document* document)
83 { 82 {
84 RenderFlexibleBox* renderer = new RenderFlexibleBox(0); 83 RenderFlexibleBox* renderer = new RenderFlexibleBox(0);
85 renderer->setDocumentForAnonymous(document); 84 renderer->setDocumentForAnonymous(document);
(...skipping 1216 matching lines...) Expand 10 before | Expand all | Expand 10 after
1302 ASSERT(child); 1301 ASSERT(child);
1303 LayoutUnit lineCrossAxisExtent = lineContexts[lineNumber].crossAxisE xtent; 1302 LayoutUnit lineCrossAxisExtent = lineContexts[lineNumber].crossAxisE xtent;
1304 LayoutUnit originalOffset = lineContexts[lineNumber].crossAxisOffset - crossAxisStartEdge; 1303 LayoutUnit originalOffset = lineContexts[lineNumber].crossAxisOffset - crossAxisStartEdge;
1305 LayoutUnit newOffset = contentExtent - originalOffset - lineCrossAxi sExtent; 1304 LayoutUnit newOffset = contentExtent - originalOffset - lineCrossAxi sExtent;
1306 adjustAlignmentForChild(child, newOffset - originalOffset); 1305 adjustAlignmentForChild(child, newOffset - originalOffset);
1307 } 1306 }
1308 } 1307 }
1309 } 1308 }
1310 1309
1311 } 1310 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698