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

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

Issue 734813004: Get rid of continuations. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: 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
« no previous file with comments | « sky/engine/core/rendering/RenderBlock.cpp ('k') | sky/engine/core/rendering/RenderBox.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) 2000 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2003, 2004, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ight reserved. 3 * Copyright (C) 2003, 2004, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ight reserved.
4 * Copyright (C) 2010 Google Inc. All rights reserved. 4 * Copyright (C) 2010 Google Inc. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 if (box->isInlineTextBox()) { 216 if (box->isInlineTextBox()) {
217 InlineTextBox* text = toInlineTextBox(box); 217 InlineTextBox* text = toInlineTextBox(box);
218 text->setStart(r->m_start); 218 text->setStart(r->m_start);
219 text->setLen(r->m_stop - r->m_start); 219 text->setLen(r->m_stop - r->m_start);
220 text->setDirOverride(r->dirOverride()); 220 text->setDirOverride(r->dirOverride());
221 if (r->m_hasHyphen) 221 if (r->m_hasHyphen)
222 text->setHasHyphen(true); 222 text->setHasHyphen(true);
223 } 223 }
224 } 224 }
225 225
226 // We should have a root inline box. It should be unconstructed and
227 // be the last continuation of our line list.
228 ASSERT(lastLineBox() && !lastLineBox()->isConstructed()); 226 ASSERT(lastLineBox() && !lastLineBox()->isConstructed());
229 227
230 // Set the m_selectedChildren flag on the root inline box if one of the leaf inline box 228 // Set the m_selectedChildren flag on the root inline box if one of the leaf inline box
231 // from the bidi runs walk above has a selection state. 229 // from the bidi runs walk above has a selection state.
232 if (rootHasSelectedChildren) 230 if (rootHasSelectedChildren)
233 lastLineBox()->root().setHasSelectedChildren(true); 231 lastLineBox()->root().setHasSelectedChildren(true);
234 232
235 // Set bits on our inline flow boxes that indicate which sides should 233 // Set bits on our inline flow boxes that indicate which sides should
236 // paint borders/margins/padding. This knowledge will ultimately be used wh en 234 // paint borders/margins/padding. This knowledge will ultimately be used wh en
237 // we determine the horizontal positions and widths of all the inline boxes on 235 // we determine the horizontal positions and widths of all the inline boxes on
(...skipping 1352 matching lines...) Expand 10 before | Expand all | Expand 10 after
1590 float logicalLeft = logicalLeftOffsetForLine(logicalHeight(), false).toFloat (); 1588 float logicalLeft = logicalLeftOffsetForLine(logicalHeight(), false).toFloat ();
1591 float availableLogicalWidth = logicalRightOffsetForLine(logicalHeight(), fal se) - logicalLeft; 1589 float availableLogicalWidth = logicalRightOffsetForLine(logicalHeight(), fal se) - logicalLeft;
1592 updateLogicalWidthForAlignment(textAlign, 0, 0, logicalLeft, totalLogicalWid th, availableLogicalWidth, 0); 1590 updateLogicalWidthForAlignment(textAlign, 0, 0, logicalLeft, totalLogicalWid th, availableLogicalWidth, 0);
1593 1591
1594 if (!style()->isLeftToRightDirection()) 1592 if (!style()->isLeftToRightDirection())
1595 return logicalWidth() - logicalLeft; 1593 return logicalWidth() - logicalLeft;
1596 return logicalLeft; 1594 return logicalLeft;
1597 } 1595 }
1598 1596
1599 } 1597 }
OLDNEW
« no previous file with comments | « sky/engine/core/rendering/RenderBlock.cpp ('k') | sky/engine/core/rendering/RenderBox.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698