Open
Bug 581685
Opened 15 years ago
Updated 3 years ago
We're _still_ flushing layout before firing onload
Categories
(Core :: Layout, defect)
Core
Layout
Tracking
()
NEW
People
(Reporter: bzbarsky, Unassigned)
Details
Attachments
(1 file)
1.28 KB,
patch
|
bzbarsky
:
review-
joe
:
approval2.0-
|
Details | Diff | Splinter Review |
It turns out we actually had two different places that do such a flush. I only fixed one in bug 572604.
Patch coming up.
![]() |
Reporter | |
Comment 1•15 years ago
|
||
Attachment #460048 -
Flags: review?(roc)
Attachment #460048 -
Flags: approval2.0?
Updated•15 years ago
|
OS: Mac OS X → All
Hardware: x86 → All
Attachment #460048 -
Flags: review?(roc) → review+
Updated•15 years ago
|
Attachment #460048 -
Flags: approval2.0? → approval2.0+
![]() |
Reporter | |
Updated•15 years ago
|
Priority: -- → P1
![]() |
Reporter | |
Comment 2•15 years ago
|
||
That patch causes some test failures. Mostly bugs in the tests, but also one core issue and I'm still sorting out a few of them.
![]() |
Reporter | |
Comment 3•15 years ago
|
||
OK. So I'm still sorting through the failures, but one source of them is crashtests that stop asserting with this patch. Presumably they exercise bugs in dynamic updates and assume that layout is flushed by onload....
I can fix this by just flushing layout in the reftest onload handler for crashtests, but I was considering doing it for all reftests in general in case some other tests also depend on that behavior for detecting the bugs they're testing.
The main drawback is that if I do that reftests won't run in the same situation as on the web, but I think it's ok... and that in particular this would not interfere with writing any tests, offhand.
Thoughts?
Presumably drawWindow already flushes layout, so the only thing that adding a layout flush to the reftest harness would affect is crashtests, right? I think it probably makes sense to add such a flush. (Maybe we could add the flush *after* onload, but before moving on to the next test?)
Er, except you want to add the flush before hitting the tests' onload handlers. I guess that seems a little sketchy to me, but there certainly could be a lot of tests that depended on it, and we wouldn't want to lose that test coverage.
It feels like the "right" thing might be to modify all existing tests that have onload handlers, but that also seems like a lot of work.
![]() |
Reporter | |
Comment 6•15 years ago
|
||
Another option is for the harness to run each test twice: once with a flush before firing the page's onload, and once without.
![]() |
Reporter | |
Updated•15 years ago
|
Priority: P1 → P2
Comment 7•14 years ago
|
||
Comment on attachment 460048 [details] [diff] [review]
Like so
Sorry, it's too late for 2.0.
Attachment #460048 -
Flags: approval2.0+ → approval2.0-
![]() |
Reporter | |
Updated•14 years ago
|
Attachment #460048 -
Flags: review+ → review-
Comment 8•11 years ago
|
||
This is no longer just breaking crashtests! https://tbpl.mozilla.org/?tree=Try&rev=e21b19c06e53
Comment 9•11 years ago
|
||
It seems like quite a few of these test failures are caused by XUL documents. Can we special case this for only HTML documents? (That would require to access the mDocument pointer which is currently checked after we flush, so I guess the behavior would change for documents that have a null mDocument pointer in their content viewer, not sure if we should worry about that or not.)
Flags: needinfo?(bzbarsky)
Comment 10•11 years ago
|
||
Also, do we have any idea what we want to do for crashtests here? There are currently two crashtests that currently fail with this patch on try, but I'm not sure if there are others which will be testing the wrong thing with this flush being removed.
![]() |
Reporter | |
Comment 11•11 years ago
|
||
> Can we special case this for only HTML documents?
We could, yeah. Or at least non-XUL.
> so I guess the behavior would change for documents that have a null mDocument pointer in
> their content viewer
Null mDocument means we're torn down. Which is something the onload scripts can do, hence checking that pointer after firing onload. Not flushing if !mDocument is totally fine.
> but I'm not sure if there are others which will be testing the wrong thing with this
> flush being removed.
See comment 3. :(
Flags: needinfo?(bzbarsky)
Comment 12•7 years ago
|
||
Moving to p3 because no activity for at least 1 year(s).
See https://github.com/mozilla/bug-handling/blob/master/policy/triage-bugzilla.md#how-do-you-triage for more information
Priority: P2 → P3
![]() |
Reporter | |
Comment 13•5 years ago
|
||
Clearly not going to get to this. Back into the pool. It might still be nice to do something here if we still have this problem.
Assignee: bzbarsky → nobody
Priority: P3 → --
Updated•3 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•