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

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

Issue 684383002: Delete a ton more dead vertical writing mode code. (Closed) Base URL: git@github.com:domokit/mojo.git@writingmode1
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 1300 matching lines...) Expand 10 before | Expand all | Expand 10 after
1311 for (size_t i = 0; i < replacedChildren.size(); i++) 1311 for (size_t i = 0; i < replacedChildren.size(); i++)
1312 replacedChildren[i]->layoutIfNeeded(); 1312 replacedChildren[i]->layoutIfNeeded();
1313 1313
1314 layoutRunsAndFloats(layoutState); 1314 layoutRunsAndFloats(layoutState);
1315 } 1315 }
1316 1316
1317 // Expand the last line to accommodate Ruby and emphasis marks. 1317 // Expand the last line to accommodate Ruby and emphasis marks.
1318 int lastLineAnnotationsAdjustment = 0; 1318 int lastLineAnnotationsAdjustment = 0;
1319 if (lastRootBox()) { 1319 if (lastRootBox()) {
1320 LayoutUnit lowestAllowedPosition = std::max(lastRootBox()->lineBottom(), logicalHeight() + paddingAfter()); 1320 LayoutUnit lowestAllowedPosition = std::max(lastRootBox()->lineBottom(), logicalHeight() + paddingAfter());
1321 if (!style()->isFlippedLinesWritingMode()) 1321 lastLineAnnotationsAdjustment = lastRootBox()->computeUnderAnnotationAdj ustment(lowestAllowedPosition);
1322 lastLineAnnotationsAdjustment = lastRootBox()->computeUnderAnnotatio nAdjustment(lowestAllowedPosition);
1323 else
1324 lastLineAnnotationsAdjustment = lastRootBox()->computeOverAnnotation Adjustment(lowestAllowedPosition);
1325 } 1322 }
1326 1323
1327 // Now add in the bottom border/padding. 1324 // Now add in the bottom border/padding.
1328 setLogicalHeight(logicalHeight() + lastLineAnnotationsAdjustment + afterEdge ); 1325 setLogicalHeight(logicalHeight() + lastLineAnnotationsAdjustment + afterEdge );
1329 1326
1330 if (!firstLineBox() && hasLineIfEmpty()) 1327 if (!firstLineBox() && hasLineIfEmpty())
1331 setLogicalHeight(logicalHeight() + lineHeight(true, HorizontalLine, Posi tionOfInteriorLineBoxes)); 1328 setLogicalHeight(logicalHeight() + lineHeight(true, HorizontalLine, Posi tionOfInteriorLineBoxes));
1332 1329
1333 // See if we have any lines that spill out of our block. If we do, then we will possibly need to 1330 // See if we have any lines that spill out of our block. If we do, then we will possibly need to
1334 // truncate text. 1331 // truncate text.
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
1640 float logicalLeft = logicalLeftOffsetForLine(logicalHeight(), false).toFloat (); 1637 float logicalLeft = logicalLeftOffsetForLine(logicalHeight(), false).toFloat ();
1641 float availableLogicalWidth = logicalRightOffsetForLine(logicalHeight(), fal se) - logicalLeft; 1638 float availableLogicalWidth = logicalRightOffsetForLine(logicalHeight(), fal se) - logicalLeft;
1642 updateLogicalWidthForAlignment(textAlign, 0, 0, logicalLeft, totalLogicalWid th, availableLogicalWidth, 0); 1639 updateLogicalWidthForAlignment(textAlign, 0, 0, logicalLeft, totalLogicalWid th, availableLogicalWidth, 0);
1643 1640
1644 if (!style()->isLeftToRightDirection()) 1641 if (!style()->isLeftToRightDirection())
1645 return logicalWidth() - logicalLeft; 1642 return logicalWidth() - logicalLeft;
1646 return logicalLeft; 1643 return logicalLeft;
1647 } 1644 }
1648 1645
1649 } 1646 }
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