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

Side by Side Diff: Source/core/rendering/RenderBlockLineLayout.cpp

Issue 285293007: Fix layoutOverflowRect in case of explicit 'overflow: scroll', but no overflow content (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebased Created 6 years, 7 months 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 560 matching lines...) Expand 10 before | Expand all | Expand 10 after
571 else 571 else
572 updateLogicalWidthForRightAlignedBlock(style()->isLeftToRightDirecti on(), trailingSpaceRun, logicalLeft, totalLogicalWidth, availableLogicalWidth); 572 updateLogicalWidthForRightAlignedBlock(style()->isLeftToRightDirecti on(), trailingSpaceRun, logicalLeft, totalLogicalWidth, availableLogicalWidth);
573 break; 573 break;
574 case TAEND: 574 case TAEND:
575 if (direction == LTR) 575 if (direction == LTR)
576 updateLogicalWidthForRightAlignedBlock(style()->isLeftToRightDirecti on(), trailingSpaceRun, logicalLeft, totalLogicalWidth, availableLogicalWidth); 576 updateLogicalWidthForRightAlignedBlock(style()->isLeftToRightDirecti on(), trailingSpaceRun, logicalLeft, totalLogicalWidth, availableLogicalWidth);
577 else 577 else
578 updateLogicalWidthForLeftAlignedBlock(style()->isLeftToRightDirectio n(), trailingSpaceRun, logicalLeft, totalLogicalWidth, availableLogicalWidth); 578 updateLogicalWidthForLeftAlignedBlock(style()->isLeftToRightDirectio n(), trailingSpaceRun, logicalLeft, totalLogicalWidth, availableLogicalWidth);
579 break; 579 break;
580 } 580 }
581 if (style()->shouldPlaceBlockDirectionScrollbarOnLogicalLeft())
582 logicalLeft += verticalScrollbarWidth();
581 } 583 }
582 584
583 static void updateLogicalInlinePositions(RenderBlockFlow* block, float& lineLogi calLeft, float& lineLogicalRight, float& availableLogicalWidth, bool firstLine, IndentTextOrNot shouldIndentText, LayoutUnit boxLogicalHeight) 585 static void updateLogicalInlinePositions(RenderBlockFlow* block, float& lineLogi calLeft, float& lineLogicalRight, float& availableLogicalWidth, bool firstLine, IndentTextOrNot shouldIndentText, LayoutUnit boxLogicalHeight)
584 { 586 {
585 LayoutUnit lineLogicalHeight = block->minLineHeightForReplacedRenderer(first Line, boxLogicalHeight); 587 LayoutUnit lineLogicalHeight = block->minLineHeightForReplacedRenderer(first Line, boxLogicalHeight);
586 lineLogicalLeft = block->logicalLeftOffsetForLine(block->logicalHeight(), sh ouldIndentText == IndentText, lineLogicalHeight).toFloat(); 588 lineLogicalLeft = block->logicalLeftOffsetForLine(block->logicalHeight(), sh ouldIndentText == IndentText, lineLogicalHeight).toFloat();
587 // FIXME: This shouldn't be pixel snapped once multicolumn layout has been u pdated to correctly carry over subpixel values. 589 // FIXME: This shouldn't be pixel snapped once multicolumn layout has been u pdated to correctly carry over subpixel values.
588 // https://bugs.webkit.org/show_bug.cgi?id=105461 590 // https://bugs.webkit.org/show_bug.cgi?id=105461
589 lineLogicalRight = block->pixelSnappedLogicalRightOffsetForLine(block->logic alHeight(), shouldIndentText == IndentText, lineLogicalHeight).toFloat(); 591 lineLogicalRight = block->pixelSnappedLogicalRightOffsetForLine(block->logic alHeight(), shouldIndentText == IndentText, lineLogicalHeight).toFloat();
590 availableLogicalWidth = lineLogicalRight - lineLogicalLeft; 592 availableLogicalWidth = lineLogicalRight - lineLogicalLeft;
(...skipping 1602 matching lines...) Expand 10 before | Expand all | Expand 10 after
2193 float logicalLeft = logicalLeftOffsetForLine(logicalHeight(), false).toFloat (); 2195 float logicalLeft = logicalLeftOffsetForLine(logicalHeight(), false).toFloat ();
2194 float availableLogicalWidth = logicalRightOffsetForLine(logicalHeight(), fal se) - logicalLeft; 2196 float availableLogicalWidth = logicalRightOffsetForLine(logicalHeight(), fal se) - logicalLeft;
2195 updateLogicalWidthForAlignment(textAlign, 0, 0, logicalLeft, totalLogicalWid th, availableLogicalWidth, 0); 2197 updateLogicalWidthForAlignment(textAlign, 0, 0, logicalLeft, totalLogicalWid th, availableLogicalWidth, 0);
2196 2198
2197 if (!style()->isLeftToRightDirection()) 2199 if (!style()->isLeftToRightDirection())
2198 return logicalWidth() - logicalLeft; 2200 return logicalWidth() - logicalLeft;
2199 return logicalLeft; 2201 return logicalLeft;
2200 } 2202 }
2201 2203
2202 } 2204 }
OLDNEW
« no previous file with comments | « LayoutTests/scrollbars/rtl/overflow-scroll-rtl-expected.txt ('k') | Source/core/rendering/RenderBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698