Closed
Bug 372365
Opened 19 years ago
Closed 19 years ago
Clientwidth returns something differently now for tables
Categories
(Core :: Layout, defect)
Core
Layout
Tracking
()
RESOLVED
FIXED
People
(Reporter: martijn.martijn, Assigned: MatsPalmgren_bugz)
References
()
Details
(Keywords: regression, testcase)
Attachments
(7 files, 1 obsolete file)
This was mentioned at Hendrix feedback:
http://groups.google.com/group/mozilla.feedback/browse_thread/thread/1149af0cac4ea0d9/f0f1b01485de0d1e#f0f1b01485de0d1e
This regressed between 2006-01-25 and 2006-01-26, so probably a regression from the frame display lists patch.
See also testcase, you should see 3 squares inside the gray area.
| Assignee | ||
Comment 1•19 years ago
|
||
| Assignee | ||
Updated•19 years ago
|
OS: Windows XP → All
Hardware: PC → All
| Assignee | ||
Comment 2•19 years ago
|
||
| Assignee | ||
Comment 3•19 years ago
|
||
| Assignee | ||
Comment 4•19 years ago
|
||
| Assignee | ||
Comment 5•19 years ago
|
||
| Assignee | ||
Comment 6•19 years ago
|
||
The problem is that bug 317375 removed
*|*::-moz-table-outer {
...
- border: inherit;
so that GetUsedBorder() is zero for the outer table frame.
layout/style/nsComputedDOMStyle.cpp was updated:
http://bonsai.mozilla.org/cvsblame.cgi?file=/mozilla/layout/style/nsComputedDOMStyle.cpp&rev=1.166&root=/cvsroot&mark=2482-2489#2477
but we need to do it for other DOM stuff that calculates dimensions too.
With this patch we get the same result as Firefox 2.0.0.2 for the testcase.
Assignee: nobody → mats.palmgren
Status: NEW → ASSIGNED
Attachment #257153 -
Flags: superreview?(roc)
Attachment #257153 -
Flags: review?(roc)
Why do you need to modify GetClientAreaSize? Isn't the frame already corrected by GetScrollInfo?
nsIFrame *frame = presShell->GetPrimaryFrameFor(this);
if (!frame) {
return;
}
+ if (frame->GetType() == nsGkAtoms::tableOuterFrame) {
+ frame = frame->GetFirstChild(nsnull);
+ }
How about moving this code to a shared static helper, say GetStyledFrameFor? You'd call it from GetScrollInfo and GetOffsetRect. Hmm, you could also share GetCurrentDoc, GetShellAt and FlushPendingNotifications calls in there.
Otherwise OK.
| Assignee | ||
Comment 8•19 years ago
|
||
Nits fixed. I found that there is a base class method that does the
flush-then-get-frame thing. Additionally, I made GetScrollInfo() always
initialize its out params and improved the documentation a bit.
There are a few code sharing improvements also in bug 111207, in case
you want to look at those at the same time... ;-)
Attachment #257519 -
Flags: superreview?(roc)
Attachment #257519 -
Flags: review?(roc)
| Assignee | ||
Updated•19 years ago
|
Attachment #257153 -
Attachment is obsolete: true
Attachment #257153 -
Flags: superreview?(roc)
Attachment #257153 -
Flags: review?(roc)
Attachment #257519 -
Flags: superreview?(roc)
Attachment #257519 -
Flags: superreview+
Attachment #257519 -
Flags: review?(roc)
Attachment #257519 -
Flags: review+
| Assignee | ||
Comment 9•19 years ago
|
||
Checked in to trunk at 2007-03-15 13:43 PST.
-> FIXED
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Flags: in-testsuite?
Resolution: --- → FIXED
Comment 10•19 years ago
|
||
This may have caused bug 375003.
Comment 11•18 years ago
|
||
So how come tests were not checked in with the patch? What's the plan for getting them in, Mats? Is something blocking them?
Also, see bug 383898.
| Assignee | ||
Comment 12•18 years ago
|
||
(In reply to comment #11)
> So how come tests were not checked in with the patch? What's the plan for
> getting them in, Mats? Is something blocking them?
I will add mochitests on bug 375003 that covers this bug and more.
> Also, see bug 383898.
Fixed by the patch on bug 375003. Sorry for the regression.
You need to log in
before you can comment on or make changes to this bug.
Description
•