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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutBlock.cpp

Issue 1819993002: Set m_{width,height}AvailableToChildrenChanged when scrollbars appear (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2661
Patch Set: Created 4 years, 9 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) 2007 David Smith (catfish.man@gmail.com) 4 * (C) 2007 David Smith (catfish.man@gmail.com)
5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 1903 matching lines...) Expand 10 before | Expand all | Expand 10 after
1914 offset = flipForWritingMode(offset); 1914 offset = flipForWritingMode(offset);
1915 } 1915 }
1916 1916
1917 int LayoutBlock::columnGap() const 1917 int LayoutBlock::columnGap() const
1918 { 1918 {
1919 if (style()->hasNormalColumnGap()) 1919 if (style()->hasNormalColumnGap())
1920 return style()->fontDescription().computedPixelSize(); // "1em" is recom mended as the normal gap setting. Matches <p> margins. 1920 return style()->fontDescription().computedPixelSize(); // "1em" is recom mended as the normal gap setting. Matches <p> margins.
1921 return static_cast<int>(style()->columnGap()); 1921 return static_cast<int>(style()->columnGap());
1922 } 1922 }
1923 1923
1924 void LayoutBlock::scrollbarsChanged(bool horizontalScrollbarChanged, bool vertic alScrollbarChanged)
1925 {
1926 m_widthAvailableToChildrenChanged |= horizontalScrollbarChanged;
1927 m_heightAvailableToChildrenChanged |= verticalScrollbarChanged;
1928 }
1929
1924 void LayoutBlock::computeIntrinsicLogicalWidths(LayoutUnit& minLogicalWidth, Lay outUnit& maxLogicalWidth) const 1930 void LayoutBlock::computeIntrinsicLogicalWidths(LayoutUnit& minLogicalWidth, Lay outUnit& maxLogicalWidth) const
1925 { 1931 {
1926 if (childrenInline()) { 1932 if (childrenInline()) {
1927 // FIXME: Remove this const_cast. 1933 // FIXME: Remove this const_cast.
1928 toLayoutBlockFlow(const_cast<LayoutBlock*>(this))->computeInlinePreferre dLogicalWidths(minLogicalWidth, maxLogicalWidth); 1934 toLayoutBlockFlow(const_cast<LayoutBlock*>(this))->computeInlinePreferre dLogicalWidths(minLogicalWidth, maxLogicalWidth);
1929 } else { 1935 } else {
1930 computeBlockPreferredLogicalWidths(minLogicalWidth, maxLogicalWidth); 1936 computeBlockPreferredLogicalWidths(minLogicalWidth, maxLogicalWidth);
1931 } 1937 }
1932 1938
1933 maxLogicalWidth = std::max(minLogicalWidth, maxLogicalWidth); 1939 maxLogicalWidth = std::max(minLogicalWidth, maxLogicalWidth);
(...skipping 931 matching lines...) Expand 10 before | Expand all | Expand 10 after
2865 void LayoutBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Layout Object* obj) const 2871 void LayoutBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Layout Object* obj) const
2866 { 2872 {
2867 showLayoutObject(); 2873 showLayoutObject();
2868 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot Box()) 2874 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot Box())
2869 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa bel2, obj, 1); 2875 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa bel2, obj, 1);
2870 } 2876 }
2871 2877
2872 #endif 2878 #endif
2873 2879
2874 } // namespace blink 2880 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBlock.h ('k') | third_party/WebKit/Source/core/layout/LayoutTableCell.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698