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

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

Issue 1811753003: Set m_{width,height}AvailableToChildrenChanged when scrollbars appear (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comment 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 1907 matching lines...) Expand 10 before | Expand all | Expand 10 after
1918 offset = flipForWritingMode(offset); 1918 offset = flipForWritingMode(offset);
1919 } 1919 }
1920 1920
1921 int LayoutBlock::columnGap() const 1921 int LayoutBlock::columnGap() const
1922 { 1922 {
1923 if (style()->hasNormalColumnGap()) 1923 if (style()->hasNormalColumnGap())
1924 return style()->getFontDescription().computedPixelSize(); // "1em" is re commended as the normal gap setting. Matches <p> margins. 1924 return style()->getFontDescription().computedPixelSize(); // "1em" is re commended as the normal gap setting. Matches <p> margins.
1925 return static_cast<int>(style()->columnGap()); 1925 return static_cast<int>(style()->columnGap());
1926 } 1926 }
1927 1927
1928 void LayoutBlock::scrollbarsChanged(bool horizontalScrollbarChanged, bool vertic alScrollbarChanged)
1929 {
1930 m_widthAvailableToChildrenChanged |= horizontalScrollbarChanged;
1931 m_heightAvailableToChildrenChanged |= verticalScrollbarChanged;
1932 }
1933
1928 void LayoutBlock::computeIntrinsicLogicalWidths(LayoutUnit& minLogicalWidth, Lay outUnit& maxLogicalWidth) const 1934 void LayoutBlock::computeIntrinsicLogicalWidths(LayoutUnit& minLogicalWidth, Lay outUnit& maxLogicalWidth) const
1929 { 1935 {
1930 // Layout-contained elements don't consider their contents for preferred siz ing. 1936 // Layout-contained elements don't consider their contents for preferred siz ing.
1931 if (style()->containsLayout()) 1937 if (style()->containsLayout())
1932 return; 1938 return;
1933 1939
1934 if (childrenInline()) { 1940 if (childrenInline()) {
1935 // FIXME: Remove this const_cast. 1941 // FIXME: Remove this const_cast.
1936 toLayoutBlockFlow(const_cast<LayoutBlock*>(this))->computeInlinePreferre dLogicalWidths(minLogicalWidth, maxLogicalWidth); 1942 toLayoutBlockFlow(const_cast<LayoutBlock*>(this))->computeInlinePreferre dLogicalWidths(minLogicalWidth, maxLogicalWidth);
1937 } else { 1943 } else {
(...skipping 923 matching lines...) Expand 10 before | Expand all | Expand 10 after
2861 void LayoutBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Layout Object* obj) const 2867 void LayoutBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Layout Object* obj) const
2862 { 2868 {
2863 showLayoutObject(); 2869 showLayoutObject();
2864 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot Box()) 2870 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot Box())
2865 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa bel2, obj, 1); 2871 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa bel2, obj, 1);
2866 } 2872 }
2867 2873
2868 #endif 2874 #endif
2869 2875
2870 } // namespace blink 2876 } // 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