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

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

Issue 707233006: Remove scrollbar width/height computations from layout. (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/RenderBlockFlow.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 479 matching lines...) Expand 10 before | Expand all | Expand 10 after
490 else 490 else
491 updateLogicalWidthForRightAlignedBlock(style()->isLeftToRightDirecti on(), trailingSpaceRun, logicalLeft, totalLogicalWidth, availableLogicalWidth); 491 updateLogicalWidthForRightAlignedBlock(style()->isLeftToRightDirecti on(), trailingSpaceRun, logicalLeft, totalLogicalWidth, availableLogicalWidth);
492 break; 492 break;
493 case TAEND: 493 case TAEND:
494 if (direction == LTR) 494 if (direction == LTR)
495 updateLogicalWidthForRightAlignedBlock(style()->isLeftToRightDirecti on(), trailingSpaceRun, logicalLeft, totalLogicalWidth, availableLogicalWidth); 495 updateLogicalWidthForRightAlignedBlock(style()->isLeftToRightDirecti on(), trailingSpaceRun, logicalLeft, totalLogicalWidth, availableLogicalWidth);
496 else 496 else
497 updateLogicalWidthForLeftAlignedBlock(style()->isLeftToRightDirectio n(), trailingSpaceRun, logicalLeft, totalLogicalWidth, availableLogicalWidth); 497 updateLogicalWidthForLeftAlignedBlock(style()->isLeftToRightDirectio n(), trailingSpaceRun, logicalLeft, totalLogicalWidth, availableLogicalWidth);
498 break; 498 break;
499 } 499 }
500 if (style()->shouldPlaceBlockDirectionScrollbarOnLogicalLeft())
501 logicalLeft += verticalScrollbarWidth();
502 } 500 }
503 501
504 static void updateLogicalInlinePositions(RenderBlockFlow* block, float& lineLogi calLeft, float& lineLogicalRight, float& availableLogicalWidth, IndentTextOrNot shouldIndentText) 502 static void updateLogicalInlinePositions(RenderBlockFlow* block, float& lineLogi calLeft, float& lineLogicalRight, float& availableLogicalWidth, IndentTextOrNot shouldIndentText)
505 { 503 {
506 lineLogicalLeft = block->logicalLeftOffsetForLine(shouldIndentText == Indent Text).toFloat(); 504 lineLogicalLeft = block->logicalLeftOffsetForLine(shouldIndentText == Indent Text).toFloat();
507 lineLogicalRight = block->logicalRightOffsetForLine(shouldIndentText == Inde ntText).toFloat(); 505 lineLogicalRight = block->logicalRightOffsetForLine(shouldIndentText == Inde ntText).toFloat();
508 availableLogicalWidth = lineLogicalRight - lineLogicalLeft; 506 availableLogicalWidth = lineLogicalRight - lineLogicalLeft;
509 } 507 }
510 508
511 void RenderBlockFlow::computeInlineDirectionPositionsForLine(RootInlineBox* line Box, const LineInfo& lineInfo, BidiRun* firstRun, BidiRun* trailingSpaceRun, boo l reachedEnd, 509 void RenderBlockFlow::computeInlineDirectionPositionsForLine(RootInlineBox* line Box, const LineInfo& lineInfo, BidiRun* firstRun, BidiRun* trailingSpaceRun, boo l reachedEnd,
(...skipping 1086 matching lines...) Expand 10 before | Expand all | Expand 10 after
1598 float logicalLeft = logicalLeftOffsetForLine(logicalHeight(), false).toFloat (); 1596 float logicalLeft = logicalLeftOffsetForLine(logicalHeight(), false).toFloat ();
1599 float availableLogicalWidth = logicalRightOffsetForLine(logicalHeight(), fal se) - logicalLeft; 1597 float availableLogicalWidth = logicalRightOffsetForLine(logicalHeight(), fal se) - logicalLeft;
1600 updateLogicalWidthForAlignment(textAlign, 0, 0, logicalLeft, totalLogicalWid th, availableLogicalWidth, 0); 1598 updateLogicalWidthForAlignment(textAlign, 0, 0, logicalLeft, totalLogicalWid th, availableLogicalWidth, 0);
1601 1599
1602 if (!style()->isLeftToRightDirection()) 1600 if (!style()->isLeftToRightDirection())
1603 return logicalWidth() - logicalLeft; 1601 return logicalWidth() - logicalLeft;
1604 return logicalLeft; 1602 return logicalLeft;
1605 } 1603 }
1606 1604
1607 } 1605 }
OLDNEW
« no previous file with comments | « sky/engine/core/rendering/RenderBlockFlow.cpp ('k') | sky/engine/core/rendering/RenderBox.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698