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

Side by Side Diff: Source/core/rendering/RenderBlock.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: Use width: fit-content in test case 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
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 2948 matching lines...) Expand 10 before | Expand all | Expand 10 after
2959 maxLogicalWidth = std::max(minLogicalWidth, maxLogicalWidth); 2959 maxLogicalWidth = std::max(minLogicalWidth, maxLogicalWidth);
2960 2960
2961 adjustIntrinsicLogicalWidthsForColumns(minLogicalWidth, maxLogicalWidth); 2961 adjustIntrinsicLogicalWidthsForColumns(minLogicalWidth, maxLogicalWidth);
2962 2962
2963 if (isTableCell()) { 2963 if (isTableCell()) {
2964 Length tableCellWidth = toRenderTableCell(this)->styleOrColLogicalWidth( ); 2964 Length tableCellWidth = toRenderTableCell(this)->styleOrColLogicalWidth( );
2965 if (tableCellWidth.isFixed() && tableCellWidth.value() > 0) 2965 if (tableCellWidth.isFixed() && tableCellWidth.value() > 0)
2966 maxLogicalWidth = std::max(minLogicalWidth, adjustContentBoxLogicalW idthForBoxSizing(tableCellWidth.value())); 2966 maxLogicalWidth = std::max(minLogicalWidth, adjustContentBoxLogicalW idthForBoxSizing(tableCellWidth.value()));
2967 } 2967 }
2968 2968
2969 int scrollbarWidth = instrinsicScrollbarLogicalWidth(); 2969 int scrollbarWidth = intrinsicScrollbarLogicalWidth();
2970 maxLogicalWidth += scrollbarWidth; 2970 maxLogicalWidth += scrollbarWidth;
2971 minLogicalWidth += scrollbarWidth; 2971 minLogicalWidth += scrollbarWidth;
2972 } 2972 }
2973 2973
2974 void RenderBlock::computePreferredLogicalWidths() 2974 void RenderBlock::computePreferredLogicalWidths()
2975 { 2975 {
2976 ASSERT(preferredLogicalWidthsDirty()); 2976 ASSERT(preferredLogicalWidthsDirty());
2977 2977
2978 m_minPreferredLogicalWidth = 0; 2978 m_minPreferredLogicalWidth = 0;
2979 m_maxPreferredLogicalWidth = 0; 2979 m_maxPreferredLogicalWidth = 0;
(...skipping 941 matching lines...) Expand 10 before | Expand all | Expand 10 after
3921 void RenderBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Render Object* obj) const 3921 void RenderBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Render Object* obj) const
3922 { 3922 {
3923 showRenderObject(); 3923 showRenderObject();
3924 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot Box()) 3924 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot Box())
3925 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa bel2, obj, 1); 3925 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa bel2, obj, 1);
3926 } 3926 }
3927 3927
3928 #endif 3928 #endif
3929 3929
3930 } // namespace blink 3930 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698