Closed
Bug 420069
Opened 18 years ago
Closed 18 years ago
PGO layout regression with horizontal lists of links
Categories
(Core :: Layout, defect)
Tracking
()
VERIFIED
FIXED
People
(Reporter: stevee, Assigned: dbaron)
References
Details
(Keywords: regression, testcase, Whiteboard: [pgo])
Attachments
(6 files)
1.05 KB,
text/html
|
Details | |
38.42 KB,
image/png
|
Details | |
1.65 KB,
patch
|
roc
:
review+
roc
:
superreview+
damons
:
approval1.9b4+
|
Details | Diff | Splinter Review |
35.61 KB,
patch
|
roc
:
review+
roc
:
superreview+
beltzner
:
approval1.9+
|
Details | Diff | Splinter Review |
8.31 KB,
patch
|
Details | Diff | Splinter Review | |
3.47 KB,
text/plain
|
Details |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9b4pre) Gecko/2008022714 Minefield/3.0b4pre ID:2008022714
Samson from the mz forum noticed this and provided the start of this testcase.
1. New profile, start firefox
2. Load testcase
Expected:
- Mozilla Mozilla Mozilla Mozilla Mozilla Mozilla
Actual:
- MozillaMozillaMozillaMozillaMozillaMozilla
Works: 20080227_1215_firefox-3.0b4pre.en-US.win32
Broken: 20080227_1248_N_firefox-3.0b4pre.en-US.win32
Checkins to module PhoenixTinderbox between 2008-02-27 12:15 and 2008-02-27 12:47 :
http://bonsai.mozilla.org/cvsquery.cgi?module=PhoenixTinderbox&date=explicit&mindate=1204143300&maxdate=1204145279
The turning on off PGO lies within this range:
http://bonsai.mozilla.org/cvsquery.cgi?treeid=default&module=all&branch=HEAD&branchtype=match&dir=&file=&filetype=match&who=&whotype=match&sortby=Date&hours=2&date=explicit&mindate=1204143300&maxdate=1204145279&cvsroot=%2Fcvsroot
Reporter | ||
Updated•18 years ago
|
Flags: blocking1.9?
Reporter | ||
Comment 1•18 years ago
|
||
Updated•18 years ago
|
Whiteboard: pgo
Updated•18 years ago
|
Whiteboard: pgo → [pgo]
![]() |
||
Comment 2•18 years ago
|
||
When the bug appears, does DOM Inspector report the right specified style for the padding? The right computed style? Would be nice to pin down whether it's CSS parsing, style computation, or layout that's being miscompiled...
Comment 3•18 years ago
|
||
See also bug 420092
Comment 4•18 years ago
|
||
Firebug reports that computed padding is 8px for each of top/right/bottom/left on the <a> element.
![]() |
||
Comment 5•18 years ago
|
||
OK, so the issue is somewhere in the layout code...
Someone want to spin up a PGO-enabled debug build with the layout-debugger extension and see what the frame tree looks like?
Comment 6•18 years ago
|
||
I have debug symbols on this PGO build I just made, but I didn't --enable-debug. I'm out of luck there, aren't I?
My plan was to run this through TUnit and mochitest anyway.
Assignee | ||
Comment 7•18 years ago
|
||
For what it's worth, I suspect it's probably the same bug that's causing two of the text-indent reftests to fail in a PGO build. We're misrendering the first case in mozilla/layout/reftests/text-indent/text-indent-intrinsic-pref-ref.html and mozilla/layout/reftests/text-indent/text-indent-intrinsic-min-ref.html by putting the margin-left on both sides of the span instead of just the left side. (This is from bug 420092 comment 2; skip to bug 420092 comment 14 after reading that.)
![]() |
||
Comment 8•18 years ago
|
||
Yeah, I think you need to --enable-debug and enable the layoutdebug extension (or whatever it's called) to get the frame dump.
Assignee | ||
Comment 10•18 years ago
|
||
The behavior is consistent with a bug where nsContainerFrame::DoInlineIntrinsicWidth is somehow crossing padding and margin and thus handling the margin twice and the padding not at all.
Assignee | ||
Comment 11•18 years ago
|
||
And now that I look at it, I think this code is probably invalid:
nsStyleCoord tmp;
// This goes at the beginning no matter how things are broken and how
// messy the bidi situations are, since per CSS2.1 section 8.6
// (implemented in bug 328168), the startSide border is always on the
// first line.
aData->currentLine +=
GetCoord(stylePadding->mPadding.Get(startSide, tmp), 0) +
styleBorder->GetBorderWidth(startSide) +
GetCoord(styleMargin->mMargin.Get(startSide, tmp), 0);
since it's using tmp for both temporaries and assuming the result comes out of one before the other starts.
Assignee | ||
Comment 12•18 years ago
|
||
I bet this fixes it (though I don't have a setup to test; I haven't even run the patch yet, but it does compile). The code that this patches was depending on undefined order-of-evaluation.
Attachment #306353 -
Flags: superreview?(roc)
Attachment #306353 -
Flags: review?(roc)
Assignee | ||
Updated•18 years ago
|
Blocks: reflow-refactor
Assignee | ||
Comment 13•18 years ago
|
||
And in the longer term I think we should probably inline nsStyleCoord's copy constructor and then make nsStyleSides::Get* just return nsStyleCoords by value.
I should also add reftests for the various cases to test this function better; we only tested margin-left in current reftests.
Assignee | ||
Comment 14•18 years ago
|
||
This applies on top of the previous patch, and fixes the broken API (from back when we had rules against returning structs by value). Still want to run a few more tests on this one before requesting reviews, and I think it can wait until after beta4.
Assignee: nobody → dbaron
Status: NEW → ASSIGNED
Assignee | ||
Comment 15•18 years ago
|
||
Oh, and while writing attachment 306396 [details] [diff] [review], I was paying attention to whether there were any more occurrences of the broken pattern. I didn't find any. All other uses seemed to be separated by ";", "||", or "&&".
Attachment #306353 -
Flags: superreview?(roc)
Attachment #306353 -
Flags: superreview+
Attachment #306353 -
Flags: review?(roc)
Attachment #306353 -
Flags: review+
Assignee | ||
Comment 16•18 years ago
|
||
These cover the broken code better; I'll land them when the tree reopens.
Assignee | ||
Comment 17•18 years ago
|
||
Comment on attachment 306396 [details] [diff] [review]
... and fix the broken API
This passes reftests (except mozilla/layout/reftests/text/zwnj-02.html and mozilla/layout/reftests/bidi/386339.html, which don't seem at all related to this patch and I presume fail without it) and passes style system mochitests.
Attachment #306396 -
Flags: superreview?(roc)
Attachment #306396 -
Flags: review?(roc)
Assignee | ||
Comment 18•18 years ago
|
||
Comment on attachment 306353 [details] [diff] [review]
possible patch
Want to get the simple fix in for beta4.
Attachment #306353 -
Flags: approval1.9b4?
Comment 19•18 years ago
|
||
I took a crack at making a Dehydra GCC script to detect bugs of this sort. The pattern I am looking for is an subexpression that does not contain internal sequence points that has a variable that is either (a) written more than once (as in this bug) or (b) written and read.
The script does detect this bug, but when I ran it on the rest of layout, all else I got was a few false positives. This may be evidence that there aren't other bugs of this sort, at least in layout.
Comment 20•18 years ago
|
||
Comment on attachment 306353 [details] [diff] [review]
possible patch
a1.9b4+=damons
Attachment #306353 -
Flags: approval1.9b4? → approval1.9b4+
Comment 21•18 years ago
|
||
I assume this is causing weird layout issues I'm seeing on facebook.com?
Assignee | ||
Comment 22•18 years ago
|
||
Attachment 306353 [details] [diff] and attachment 306402 [details] [diff] [review] checked in to trunk, 2008-02-28 17:52 -0800.
Reporter | ||
Comment 23•18 years ago
|
||
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9b4pre) Gecko/2008022901 Minefield/3.0b4pre ID:2008022901
Testcase now WFM.
Comment 24•18 years ago
|
||
Testcase WFM also XP 2008022906. And an issue I saw on yahoo.com is also fixed that was the same bug as this.
Comment 25•18 years ago
|
||
Gmail tags alignment fixed aswell
Comment 26•18 years ago
|
||
The issue that prompted me to post in the build forums for www.iguanadons.net is fixed as well.
Assignee | ||
Updated•18 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Reporter | ||
Comment 27•18 years ago
|
||
--> VERIFIED per comments 23, 24, 25 and 26.
Status: RESOLVED → VERIFIED
Comment 28•18 years ago
|
||
Flags: in-testsuite+
Attachment #306396 -
Flags: superreview?(roc)
Attachment #306396 -
Flags: superreview+
Attachment #306396 -
Flags: review?(roc)
Attachment #306396 -
Flags: review+
Assignee | ||
Updated•18 years ago
|
Attachment #306396 -
Flags: approval1.9?
Comment 29•18 years ago
|
||
Comment on attachment 306396 [details] [diff] [review]
... and fix the broken API
a1.9=beltzner
Attachment #306396 -
Flags: approval1.9? → approval1.9+
Assignee | ||
Comment 30•18 years ago
|
||
Attachment 306396 [details] [diff] checked in to trunk, 2008-03-05 16:05 -0800.
You need to log in
before you can comment on or make changes to this bug.
Description
•