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

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

Issue 535913002: Add scrollbar logical width while computing intrinsic logical width (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix typo + Remove Scrollbar calculation from testcase Created 6 years, 3 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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) 4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com)
5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com)
6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv ed. 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv ed.
7 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. 7 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 630 matching lines...) Expand 10 before | Expand all | Expand 10 after
641 } 641 }
642 642
643 int RenderBox::horizontalScrollbarHeight() const 643 int RenderBox::horizontalScrollbarHeight() const
644 { 644 {
645 if (!hasOverflowClip() || style()->overflowX() == OOVERLAY) 645 if (!hasOverflowClip() || style()->overflowX() == OOVERLAY)
646 return 0; 646 return 0;
647 647
648 return layer()->scrollableArea()->horizontalScrollbarHeight(); 648 return layer()->scrollableArea()->horizontalScrollbarHeight();
649 } 649 }
650 650
651 int RenderBox::instrinsicScrollbarLogicalWidth() const 651 int RenderBox::intrinsicScrollbarLogicalWidth() const
652 { 652 {
653 if (!hasOverflowClip()) 653 if (!hasOverflowClip())
654 return 0; 654 return 0;
655 655
656 if (isHorizontalWritingMode() && style()->overflowY() == OSCROLL) { 656 if (isHorizontalWritingMode() && style()->overflowY() == OSCROLL) {
657 ASSERT(layer()->scrollableArea() && layer()->scrollableArea()->hasVertic alScrollbar()); 657 ASSERT(layer()->scrollableArea() && layer()->scrollableArea()->hasVertic alScrollbar());
658 return verticalScrollbarWidth(); 658 return verticalScrollbarWidth();
659 } 659 }
660 660
661 if (!isHorizontalWritingMode() && style()->overflowX() == OSCROLL) { 661 if (!isHorizontalWritingMode() && style()->overflowX() == OSCROLL) {
(...skipping 4088 matching lines...) Expand 10 before | Expand all | Expand 10 after
4750 RenderBox::BoxDecorationData::BoxDecorationData(const RenderStyle& style) 4750 RenderBox::BoxDecorationData::BoxDecorationData(const RenderStyle& style)
4751 { 4751 {
4752 backgroundColor = style.visitedDependentColor(CSSPropertyBackgroundColor); 4752 backgroundColor = style.visitedDependentColor(CSSPropertyBackgroundColor);
4753 hasBackground = backgroundColor.alpha() || style.hasBackgroundImage(); 4753 hasBackground = backgroundColor.alpha() || style.hasBackgroundImage();
4754 ASSERT(hasBackground == style.hasBackground()); 4754 ASSERT(hasBackground == style.hasBackground());
4755 hasBorder = style.hasBorder(); 4755 hasBorder = style.hasBorder();
4756 hasAppearance = style.hasAppearance(); 4756 hasAppearance = style.hasAppearance();
4757 } 4757 }
4758 4758
4759 } // namespace blink 4759 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698