WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
59138
REGRESSION(81625): Tables are not rendered correctly
https://bugs.webkit.org/show_bug.cgi?id=59138
Summary
REGRESSION(81625): Tables are not rendered correctly
Nico Weber
Reported
2011-04-21 14:17:46 PDT
See attached test case (passes if everything is green, fails if theres a red stripe to the right of the green) Regressed in
http://trac.webkit.org/changeset/81625
This breaks e.g. gmail, see
http://crbug.com/78114
Attachments
repro
(381 bytes, text/html)
2011-04-21 14:18 PDT
,
Nico Weber
no flags
Details
bug fix
(1.25 KB, patch)
2011-04-22 20:47 PDT
,
Rik Cabanier
thakis
: review-
Details
Formatted Diff
Diff
bug fix with testcase
(3.43 KB, patch)
2011-04-22 21:50 PDT
,
Rik Cabanier
simon.fraser
: review-
simon.fraser
: commit-queue-
Details
Formatted Diff
Diff
bug fix with comment moved
(3.54 KB, patch)
2011-04-22 22:28 PDT
,
Rik Cabanier
simon.fraser
: review-
simon.fraser
: commit-queue-
Details
Formatted Diff
Diff
corrected test + fixed style
(2.75 KB, patch)
2011-04-23 12:30 PDT
,
Rik Cabanier
cabanier
: review-
cabanier
: commit-queue-
Details
Formatted Diff
Diff
corrected test + fixed style
(3.60 KB, patch)
2011-04-23 12:45 PDT
,
Rik Cabanier
simon.fraser
: review+
simon.fraser
: commit-queue-
Details
Formatted Diff
Diff
updated HTML file
(3.57 KB, patch)
2011-04-23 22:55 PDT
,
Rik Cabanier
no flags
Details
Formatted Diff
Diff
Show Obsolete
(5)
View All
Add attachment
proposed patch, testcase, etc.
Nico Weber
Comment 1
2011-04-21 14:18:04 PDT
Created
attachment 90598
[details]
repro
Rik Cabanier
Comment 2
2011-04-21 14:33:18 PDT
I will sync down the latest sources and take a look.
Simon Fraser (smfr)
Comment 3
2011-04-21 14:50:14 PDT
<
rdar://problem/9320145
>
Adele Peterson
Comment 4
2011-04-22 11:25:40 PDT
Do we know of any cases where the original change caused a progression? If not, maybe we should roll it out.
Nico Weber
Comment 5
2011-04-22 11:32:10 PDT
jamesr tells me the original change doesn't revert cleanly because other changes have been made on top of it.
Simon Fraser (smfr)
Comment 6
2011-04-22 12:05:30 PDT
The original change was related to not rounding to pixel values for transforms.
Rik Cabanier
Comment 7
2011-04-22 20:47:06 PDT
Created
attachment 90839
[details]
bug fix
Nico Weber
Comment 8
2011-04-22 20:49:04 PDT
Missing a test case.
Nico Weber
Comment 9
2011-04-22 20:58:17 PDT
Comment on
attachment 90839
[details]
bug fix (I'm not a reviewer, but I'm pretty sure the other folks would ask for a test as well. My attachment should be a good starting point.) Also, putting |else| and |if| on the same line would be nice.
Rik Cabanier
Comment 10
2011-04-22 21:07:48 PDT
his bug was introduced by the change that made '%' a true float instead of a fixed. There's some strange code in the AutoTableLayout file that sometimes returns incorrect results (I didn't create this). Other code in WebKit sees these (large) results and ignores them. I didn't realize that the code at the end already tries to fix this for certain cases so my change was wrong. Adding a simple 'else' so my code doesn't get invoked fixes the problem.
Rik Cabanier
Comment 11
2011-04-22 21:11:36 PDT
(In reply to
comment #9
)
> (From update of
attachment 90839
[details]
) > (I'm not a reviewer, but I'm pretty sure the other folks would ask for a test as well. My attachment should be a good starting point.) > > Also, putting |else| and |if| on the same line would be nice.
What do you mean with |else| and |if| ?
Nico Weber
Comment 12
2011-04-22 21:14:01 PDT
Comment on
attachment 90839
[details]
bug fix View in context:
https://bugs.webkit.org/attachment.cgi?id=90839&action=review
> Source/WebCore/rendering/AutoTableLayout.cpp:270 > if (!remainingPercent && maxNonPercent)
You're saying else // comment if (foo) I think // comment else if (foo) is nicer. (And I guess bool maxWidthValid = !remainingPercent && maxNonPercent; ... else if (maxWidthValid) is even more WebKit-style.)
Rik Cabanier
Comment 13
2011-04-22 21:50:41 PDT
Created
attachment 90841
[details]
bug fix with testcase
Simon Fraser (smfr)
Comment 14
2011-04-22 22:11:04 PDT
Comment on
attachment 90841
[details]
bug fix with testcase View in context:
https://bugs.webkit.org/attachment.cgi?id=90841&action=review
r- for lack of working test.
> Source/WebCore/rendering/AutoTableLayout.cpp:270 > + } else > // if there was no remaining percent, maxWidth is invalid. > if (!remainingPercent && maxNonPercent)
I'd prefer the 'else if' together, and the comment after the condition
> LayoutTests/fast/table/auto-100-percent-width.html:8 > +function test() > +{ > + if (window.layoutTestController) > + layoutTestController.dumpAsText(); > +}
Where is the test code?
Rik Cabanier
Comment 15
2011-04-22 22:22:22 PDT
(In reply to
comment #14
)
> (From update of
attachment 90841
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=90841&action=review
> > r- for lack of working test. > > > Source/WebCore/rendering/AutoTableLayout.cpp:270 > > + } else > > // if there was no remaining percent, maxWidth is invalid. > > if (!remainingPercent && maxNonPercent) > > I'd prefer the 'else if' together, and the comment after the condition
OK. I will change it
> > > LayoutTests/fast/table/auto-100-percent-width.html:8 > > +function test() > > +{ > > + if (window.layoutTestController) > > + layoutTestController.dumpAsText(); > > +} > > Where is the test code?
Doesn't it take a dump of the layout? The table in the body should be the test.
Rik Cabanier
Comment 16
2011-04-22 22:28:20 PDT
Created
attachment 90842
[details]
bug fix with comment moved
Simon Fraser (smfr)
Comment 17
2011-04-23 09:21:00 PDT
Comment on
attachment 90842
[details]
bug fix with comment moved View in context:
https://bugs.webkit.org/attachment.cgi?id=90842&action=review
> Source/WebCore/rendering/AutoTableLayout.cpp:270 > + } else if (!remainingPercent && maxNonPercent) > + // if there was no remaining percent, maxWidth is invalid. > maxWidth = intMaxForLength;
Braces are preferred when a comment is included above a single-line clause.
> LayoutTests/fast/table/auto-100-percent-width.html:9 > +function test() > +{ > + if (window.layoutTestController) > + layoutTestController.dumpAsText(); > +} > +</script>
The dumpAsText() makes this a text test, so the output doesn't show the sizes of the render objects. You can see the output above; how does that reveal whether the bug is fixed? Part of your workflow should be to ensure that the LayoutTest reproduces failure without the fix in the code. I think in this case you can just remove the entire <script> block. The <div> is also unnecessary.
Rik Cabanier
Comment 18
2011-04-23 12:30:02 PDT
(In reply to
comment #17
)
> (From update of
attachment 90842
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=90842&action=review
> > > Source/WebCore/rendering/AutoTableLayout.cpp:270 > > + } else if (!remainingPercent && maxNonPercent) > > + // if there was no remaining percent, maxWidth is invalid. > > maxWidth = intMaxForLength; > > Braces are preferred when a comment is included above a single-line clause.
Will do
> > > LayoutTests/fast/table/auto-100-percent-width.html:9 > > +function test() > > +{ > > + if (window.layoutTestController) > > + layoutTestController.dumpAsText(); > > +} > > +</script> > > The dumpAsText() makes this a text test, so the output doesn't show the sizes of the render objects. You can see the output above; how does that reveal whether the bug is fixed? > > Part of your workflow should be to ensure that the LayoutTest reproduces failure without the fix in the code. > > I think in this case you can just remove the entire <script> block. The <div> is also unnecessary.
I was wondering about that. I assumed that it was putting it out as binary or something. I will fix the text.
Rik Cabanier
Comment 19
2011-04-23 12:30:46 PDT
Created
attachment 90855
[details]
corrected test + fixed style
Nico Weber
Comment 20
2011-04-23 12:36:51 PDT
Comment on
attachment 90855
[details]
corrected test + fixed style View in context:
https://bugs.webkit.org/attachment.cgi?id=90855&action=review
> LayoutTests/ChangeLog:8 > + * fast/table/auto-100-percent-width-expected.txt: Added.
the -expected file is missing from this patch
> LayoutTests/fast/table/auto-100-percent-width.html:4 > +<body onload="test()">
Drop onload=test()?
Rik Cabanier
Comment 21
2011-04-23 12:45:43 PDT
Created
attachment 90856
[details]
corrected test + fixed style
Rik Cabanier
Comment 22
2011-04-23 12:48:24 PDT
(In reply to
comment #20
)
> (From update of
attachment 90855
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=90855&action=review
> > > LayoutTests/ChangeLog:8 > > + * fast/table/auto-100-percent-width-expected.txt: Added. > > the -expected file is missing from this patch > > > LayoutTests/fast/table/auto-100-percent-width.html:4 > > +<body onload="test()"> > > Drop onload=test()?
I already noticed that. Fixed in latest patch
Nico Weber
Comment 23
2011-04-23 12:55:40 PDT
Thanks!
Simon Fraser (smfr)
Comment 24
2011-04-23 18:45:54 PDT
Comment on
attachment 90856
[details]
corrected test + fixed style View in context:
https://bugs.webkit.org/attachment.cgi?id=90856&action=review
> LayoutTests/fast/table/auto-100-percent-width.html:1 > +<!doctype HTML>
Should be !DOCTYPE html
> LayoutTests/fast/table/auto-100-percent-width.html:3 > +<head> > +<title></title></head>
No need for these tags.
Rik Cabanier
Comment 25
2011-04-23 22:55:56 PDT
Created
attachment 90872
[details]
updated HTML file
WebKit Commit Bot
Comment 26
2011-04-24 01:16:20 PDT
The commit-queue encountered the following flaky tests while processing
attachment 90872
[details]
: http/tests/canvas/webgl/origin-clean-conformance.html
bug 52117
(author:
enne@google.com
) http/tests/security/local-video-source-from-remote.html
bug 59298
(author:
eric.carlson@apple.com
) The commit-queue is continuing to process your patch.
WebKit Commit Bot
Comment 27
2011-04-24 01:17:49 PDT
Comment on
attachment 90872
[details]
updated HTML file Clearing flags on attachment: 90872 Committed
r84755
: <
http://trac.webkit.org/changeset/84755
>
WebKit Commit Bot
Comment 28
2011-04-24 01:17:56 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug