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

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

Issue 688233002: Remove writing mode code from the linebox tree. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: merge to ToT 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
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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 bool constructedNewBox = false; 106 bool constructedNewBox = false;
107 bool allowedToConstructNewBox = !hasDefaultLineBoxContain || !inlineFlow || inlineFlow->alwaysCreateLineBoxes(); 107 bool allowedToConstructNewBox = !hasDefaultLineBoxContain || !inlineFlow || inlineFlow->alwaysCreateLineBoxes();
108 bool canUseExistingParentBox = parentBox && !parentIsConstructedOrHaveNe xt(parentBox); 108 bool canUseExistingParentBox = parentBox && !parentIsConstructedOrHaveNe xt(parentBox);
109 if (allowedToConstructNewBox && !canUseExistingParentBox) { 109 if (allowedToConstructNewBox && !canUseExistingParentBox) {
110 // We need to make a new box for this render object. Once 110 // We need to make a new box for this render object. Once
111 // made, we need to place it at the end of the current line. 111 // made, we need to place it at the end of the current line.
112 InlineBox* newBox = createInlineBoxForRenderer(obj, obj == this); 112 InlineBox* newBox = createInlineBoxForRenderer(obj, obj == this);
113 ASSERT_WITH_SECURITY_IMPLICATION(newBox->isInlineFlowBox()); 113 ASSERT_WITH_SECURITY_IMPLICATION(newBox->isInlineFlowBox());
114 parentBox = toInlineFlowBox(newBox); 114 parentBox = toInlineFlowBox(newBox);
115 parentBox->setFirstLineStyleBit(lineInfo.isFirstLine()); 115 parentBox->setFirstLineStyleBit(lineInfo.isFirstLine());
116 // FIXME(sky): Remove
117 parentBox->setIsHorizontal(true);
118 if (!hasDefaultLineBoxContain) 116 if (!hasDefaultLineBoxContain)
119 parentBox->clearDescendantsHaveSameLineHeightAndBaseline(); 117 parentBox->clearDescendantsHaveSameLineHeightAndBaseline();
120 constructedNewBox = true; 118 constructedNewBox = true;
121 } 119 }
122 120
123 if (constructedNewBox || canUseExistingParentBox) { 121 if (constructedNewBox || canUseExistingParentBox) {
124 if (!result) 122 if (!result)
125 result = parentBox; 123 result = parentBox;
126 124
127 // If we have hit the block itself, then |box| represents the root 125 // If we have hit the block itself, then |box| represents the root
(...skipping 1506 matching lines...) Expand 10 before | Expand all | Expand 10 after
1634 float logicalLeft = logicalLeftOffsetForLine(logicalHeight(), false).toFloat (); 1632 float logicalLeft = logicalLeftOffsetForLine(logicalHeight(), false).toFloat ();
1635 float availableLogicalWidth = logicalRightOffsetForLine(logicalHeight(), fal se) - logicalLeft; 1633 float availableLogicalWidth = logicalRightOffsetForLine(logicalHeight(), fal se) - logicalLeft;
1636 updateLogicalWidthForAlignment(textAlign, 0, 0, logicalLeft, totalLogicalWid th, availableLogicalWidth, 0); 1634 updateLogicalWidthForAlignment(textAlign, 0, 0, logicalLeft, totalLogicalWid th, availableLogicalWidth, 0);
1637 1635
1638 if (!style()->isLeftToRightDirection()) 1636 if (!style()->isLeftToRightDirection())
1639 return logicalWidth() - logicalLeft; 1637 return logicalWidth() - logicalLeft;
1640 return logicalLeft; 1638 return logicalLeft;
1641 } 1639 }
1642 1640
1643 } 1641 }
OLDNEW
« no previous file with comments | « sky/engine/core/rendering/InlineTextBox.cpp ('k') | sky/engine/core/rendering/RenderBoxModelObject.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698