Title: [184446] trunk
- Revision
- 184446
- Author
- [email protected]
- Date
- 2015-05-17 23:16:58 -0700 (Sun, 17 May 2015)
Log Message
[CSS Grid Layout] Add scrollbar width in intrinsic logical widths computation
https://bugs.webkit.org/show_bug.cgi?id=145021
Source/WebCore:
Like for flexboxes we've to take into account the scrollbar logical
width while computing the intrinsic min and max logical widths.
Reviewed by Sergio Villar Senin.
Test: fast/css-grid-layout/compute-intrinsic-widths-scrollbar.html
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::computeIntrinsicLogicalWidths): Add scrollbar
logical width.
LayoutTests:
Reviewed by Sergio Villar Senin.
* fast/css-grid-layout/compute-intrinsic-widths-scrollbar-expected.txt: Added.
* fast/css-grid-layout/compute-intrinsic-widths-scrollbar.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (184445 => 184446)
--- trunk/LayoutTests/ChangeLog 2015-05-18 03:39:28 UTC (rev 184445)
+++ trunk/LayoutTests/ChangeLog 2015-05-18 06:16:58 UTC (rev 184446)
@@ -1,3 +1,13 @@
+2015-05-17 Manuel Rego Casasnovas <[email protected]>
+
+ [CSS Grid Layout] Add scrollbar width in intrinsic logical widths computation
+ https://bugs.webkit.org/show_bug.cgi?id=145021
+
+ Reviewed by Sergio Villar Senin.
+
+ * fast/css-grid-layout/compute-intrinsic-widths-scrollbar-expected.txt: Added.
+ * fast/css-grid-layout/compute-intrinsic-widths-scrollbar.html: Added.
+
2015-05-16 Zalan Bujtas <[email protected]>
REGRESSION (Subpixel): Dashed underline is missing when box is positioned at subpixels.
Added: trunk/LayoutTests/fast/css-grid-layout/compute-intrinsic-widths-scrollbar-expected.txt (0 => 184446)
--- trunk/LayoutTests/fast/css-grid-layout/compute-intrinsic-widths-scrollbar-expected.txt (rev 0)
+++ trunk/LayoutTests/fast/css-grid-layout/compute-intrinsic-widths-scrollbar-expected.txt 2015-05-18 06:16:58 UTC (rev 184446)
@@ -0,0 +1,20 @@
+This test checks that grid container scrollbar is computed properly during intrinsic width calculation.
+
+item
+PASS
+item
+PASS
+item
+PASS
+item
+PASS
+item
+PASS
+item
+PASS
+item
+PASS
+item
+PASS
+item
+PASS
Added: trunk/LayoutTests/fast/css-grid-layout/compute-intrinsic-widths-scrollbar.html (0 => 184446)
--- trunk/LayoutTests/fast/css-grid-layout/compute-intrinsic-widths-scrollbar.html (rev 0)
+++ trunk/LayoutTests/fast/css-grid-layout/compute-intrinsic-widths-scrollbar.html 2015-05-18 06:16:58 UTC (rev 184446)
@@ -0,0 +1,51 @@
+<!DOCTYPE html>
+<link href="" rel="stylesheet">
+<link href="" rel=stylesheet>
+<style>
+ .grid {
+ overflow-y: scroll;
+ }
+
+ .item {
+ width: 200px;
+ }
+
+ .oneColumn {
+ -webkit-grid-template-columns: 200px;
+ }
+
+ .fourColumns {
+ -webkit-grid-template-columns: repeat(4, 50px);
+ }
+</style>
+<script src=""
+<p>This test checks that grid container scrollbar is computed properly during intrinsic width calculation.</p>
+<body _onload_="checkLayout('.grid')">
+ <div class="grid min-content" data-expected-client-width="200">
+ <div class="item">item</div>
+ </div>
+ <div class="grid max-content" data-expected-client-width="200">
+ <div class="item">item</div>
+ </div>
+ <div class="grid fit-content" data-expected-client-width="200">
+ <div class="item">item</div>
+ </div>
+ <div class="grid oneColumn min-content" data-expected-client-width="200">
+ item
+ </div>
+ <div class="grid oneColumn max-content" data-expected-client-width="200">
+ item
+ </div>
+ <div class="grid oneColumn fit-content" data-expected-client-width="200">
+ item
+ </div>
+ <div class="grid fourColumns min-content" data-expected-client-width="200">
+ item
+ </div>
+ <div class="grid fourColumns max-content" data-expected-client-width="200">
+ item
+ </div>
+ <div class="grid fourColumns fit-content" data-expected-client-width="200">
+ item
+ </div>
+</body>
Modified: trunk/Source/WebCore/ChangeLog (184445 => 184446)
--- trunk/Source/WebCore/ChangeLog 2015-05-18 03:39:28 UTC (rev 184445)
+++ trunk/Source/WebCore/ChangeLog 2015-05-18 06:16:58 UTC (rev 184446)
@@ -1,3 +1,19 @@
+2015-05-17 Manuel Rego Casasnovas <[email protected]>
+
+ [CSS Grid Layout] Add scrollbar width in intrinsic logical widths computation
+ https://bugs.webkit.org/show_bug.cgi?id=145021
+
+ Like for flexboxes we've to take into account the scrollbar logical
+ width while computing the intrinsic min and max logical widths.
+
+ Reviewed by Sergio Villar Senin.
+
+ Test: fast/css-grid-layout/compute-intrinsic-widths-scrollbar.html
+
+ * rendering/RenderGrid.cpp:
+ (WebCore::RenderGrid::computeIntrinsicLogicalWidths): Add scrollbar
+ logical width.
+
2015-05-17 Xabier Rodriguez Calvar <[email protected]> and Youenn Fablet <[email protected]>
[Streams API] Delegate ReadableStreamReader reference counting to ReadableStream
Modified: trunk/Source/WebCore/rendering/RenderGrid.cpp (184445 => 184446)
--- trunk/Source/WebCore/rendering/RenderGrid.cpp 2015-05-18 03:39:28 UTC (rev 184445)
+++ trunk/Source/WebCore/rendering/RenderGrid.cpp 2015-05-18 06:16:58 UTC (rev 184446)
@@ -301,10 +301,12 @@
minLogicalWidth += minTrackBreadth;
maxLogicalWidth += maxTrackBreadth;
-
- // FIXME: This should add in the scrollbarWidth (e.g. see RenderFlexibleBox).
}
+ LayoutUnit scrollbarWidth = intrinsicScrollbarLogicalWidth();
+ minLogicalWidth += scrollbarWidth;
+ maxLogicalWidth += scrollbarWidth;
+
if (!wasPopulated)
const_cast<RenderGrid*>(this)->clearGrid();
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes