Bug 148978 - [css-grid] Percentage columns shouldn't include border and padding
Summary: [css-grid] Percentage columns shouldn't include border and padding
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Manuel Rego Casasnovas
URL:
Keywords:
Depends on: 149002
Blocks: 60731
  Show dependency treegraph
 
Reported: 2015-09-08 14:18 PDT by Manuel Rego Casasnovas
Modified: 2015-09-09 14:11 PDT (History)
7 users (show)

See Also:


Attachments
Patch (7.76 KB, patch)
2015-09-08 14:21 PDT, Rego GTK+ EWS Bot
no flags Details | Formatted Diff | Diff
Patch (7.76 KB, patch)
2015-09-08 14:22 PDT, Manuel Rego Casasnovas
no flags Details | Formatted Diff | Diff
Patch for landing (7.84 KB, patch)
2015-09-09 03:05 PDT, Manuel Rego Casasnovas
no flags Details | Formatted Diff | Diff
Rebased patch for landing (7.79 KB, patch)
2015-09-09 13:10 PDT, Manuel Rego Casasnovas
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Manuel Rego Casasnovas 2015-09-08 14:18:41 PDT
If you've a column with 100%, the size of the column is calculated including the border and padding of the grid container. This is not right and leads to weird results.

Example to reproduce the issue:
<div style="display: -webkit-grid; border: 5px solid black; padding: 25px; -webkit-grid: 100% / 100%; width: 200px; height: 200px;">
  <div style="background: lime;">item</div>
</div>

The height of the item is kept to 200px as it should, however the width goes to 260px (200 + 5 + 25 + 25 + 5) instead of 200px.

This was already reported and fixed in Blink:
https://code.google.com/p/chromium/issues/detail?id=529203
Comment 1 Rego GTK+ EWS Bot 2015-09-08 14:21:02 PDT
Created attachment 260792 [details]
Patch
Comment 2 Manuel Rego Casasnovas 2015-09-08 14:22:09 PDT
Created attachment 260793 [details]
Patch
Comment 3 WebKit Commit Bot 2015-09-09 02:58:07 PDT
Comment on attachment 260793 [details]
Patch

Rejecting attachment 260793 [details] from commit-queue.

Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.webkit.org', '--bot-id=webkit-cq-03', 'apply-attachment', '--no-update', '--non-interactive', 260793, '--port=mac']" exit_code: 2 cwd: /Volumes/Data/EWS/WebKit

Last 500 characters of output:
 -- saving rejects to file Source/WebCore/rendering/RenderGrid.cpp.rej
patching file LayoutTests/ChangeLog
Hunk #1 succeeded at 1 with fuzz 3.
patching file LayoutTests/fast/css-grid-layout/grid-percent-track-margin-border-padding-expected.txt
patching file LayoutTests/fast/css-grid-layout/grid-percent-track-margin-border-padding.html

Failed to run "[u'/Volumes/Data/EWS/WebKit/Tools/Scripts/svn-apply', '--force', '--reviewer', u'Sergio Villar Senin']" exit_code: 1 cwd: /Volumes/Data/EWS/WebKit

Full output: http://webkit-queues.webkit.org/results/154060
Comment 4 Manuel Rego Casasnovas 2015-09-09 03:05:42 PDT
Created attachment 260853 [details]
Patch for landing
Comment 5 WebKit Commit Bot 2015-09-09 04:23:17 PDT
Comment on attachment 260853 [details]
Patch for landing

Clearing flags on attachment: 260853

Committed r189538: <http://trac.webkit.org/changeset/189538>
Comment 6 WebKit Commit Bot 2015-09-09 04:23:21 PDT
All reviewed patches have been landed.  Closing bug.
Comment 7 WebKit Commit Bot 2015-09-09 08:39:55 PDT
Re-opened since this is blocked by bug 149002
Comment 8 Alex Christensen 2015-09-09 08:41:50 PDT
Sorry. r189536 wouldn't rollout without rolling this out, too, because this touched RenderGrid.cpp after that patch. This might be good.
Comment 9 Manuel Rego Casasnovas 2015-09-09 13:10:42 PDT
Created attachment 260869 [details]
Rebased patch for landing
Comment 10 WebKit Commit Bot 2015-09-09 14:11:12 PDT
Comment on attachment 260869 [details]
Rebased patch for landing

Clearing flags on attachment: 260869

Committed r189550: <http://trac.webkit.org/changeset/189550>
Comment 11 WebKit Commit Bot 2015-09-09 14:11:18 PDT
All reviewed patches have been landed.  Closing bug.