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

Side by Side Diff: Source/core/rendering/RenderFlexibleBox.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: Remove opera prefix from test Created 6 years 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) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 } else 117 } else
118 minLogicalWidth += minPreferredLogicalWidth; 118 minLogicalWidth += minPreferredLogicalWidth;
119 } else { 119 } else {
120 minLogicalWidth = std::max(minPreferredLogicalWidth, minLogicalWidth ); 120 minLogicalWidth = std::max(minPreferredLogicalWidth, minLogicalWidth );
121 maxLogicalWidth = std::max(maxPreferredLogicalWidth, maxLogicalWidth ); 121 maxLogicalWidth = std::max(maxPreferredLogicalWidth, maxLogicalWidth );
122 } 122 }
123 } 123 }
124 124
125 maxLogicalWidth = std::max(minLogicalWidth, maxLogicalWidth); 125 maxLogicalWidth = std::max(minLogicalWidth, maxLogicalWidth);
126 126
127 LayoutUnit scrollbarWidth = instrinsicScrollbarLogicalWidth(); 127 LayoutUnit scrollbarWidth = intrinsicScrollbarLogicalWidth();
128 maxLogicalWidth += scrollbarWidth; 128 maxLogicalWidth += scrollbarWidth;
129 minLogicalWidth += scrollbarWidth; 129 minLogicalWidth += scrollbarWidth;
130 } 130 }
131 131
132 static int synthesizedBaselineFromContentBox(const RenderBox& box, LineDirection Mode direction) 132 static int synthesizedBaselineFromContentBox(const RenderBox& box, LineDirection Mode direction)
133 { 133 {
134 return direction == HorizontalLine ? box.borderTop() + box.paddingTop() + bo x.contentHeight() : box.borderRight() + box.paddingRight() + box.contentWidth(); 134 return direction == HorizontalLine ? box.borderTop() + box.paddingTop() + bo x.contentHeight() : box.borderRight() + box.paddingRight() + box.contentWidth();
135 } 135 }
136 136
137 int RenderFlexibleBox::baselinePosition(FontBaseline, bool, LineDirectionMode di rection, LinePositionMode mode) const 137 int RenderFlexibleBox::baselinePosition(FontBaseline, bool, LineDirectionMode di rection, LinePositionMode mode) const
(...skipping 1260 matching lines...) Expand 10 before | Expand all | Expand 10 after
1398 ASSERT(child); 1398 ASSERT(child);
1399 LayoutUnit lineCrossAxisExtent = lineContexts[lineNumber].crossAxisE xtent; 1399 LayoutUnit lineCrossAxisExtent = lineContexts[lineNumber].crossAxisE xtent;
1400 LayoutUnit originalOffset = lineContexts[lineNumber].crossAxisOffset - crossAxisStartEdge; 1400 LayoutUnit originalOffset = lineContexts[lineNumber].crossAxisOffset - crossAxisStartEdge;
1401 LayoutUnit newOffset = contentExtent - originalOffset - lineCrossAxi sExtent; 1401 LayoutUnit newOffset = contentExtent - originalOffset - lineCrossAxi sExtent;
1402 adjustAlignmentForChild(*child, newOffset - originalOffset); 1402 adjustAlignmentForChild(*child, newOffset - originalOffset);
1403 } 1403 }
1404 } 1404 }
1405 } 1405 }
1406 1406
1407 } 1407 }
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderDeprecatedFlexibleBox.cpp ('k') | Source/core/rendering/RenderGrid.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698