Closed
Bug 631682
Opened 13 years ago
Closed 13 years ago
window.onload event is fired before background image for html element in style
Categories
(Core :: CSS Parsing and Computation, defect)
Core
CSS Parsing and Computation
Tracking
()
RESOLVED
FIXED
mozilla2.0b12
People
(Reporter: hiro, Assigned: bzbarsky)
References
Details
Attachments
(2 files)
5.57 KB,
patch
|
Details | Diff | Splinter Review | |
7.58 KB,
patch
|
dbaron
:
review+
dbaron
:
approval2.0+
|
Details | Diff | Splinter Review |
I will attach a test case. Please see bug 580873#c248 and bug 580873#c265.
Reporter | ||
Comment 1•13 years ago
|
||
I could not find a way to know loading background image in style is completed, so checked that the background image is in image cache. As mkato said in bug 580873#c265, this test case works if html element is changed to body element, so I thinks the check works fine for this bug.
Component: Event Handling → Style System (CSS)
QA Contact: events → style-system
Assignee | ||
Comment 2•13 years ago
|
||
This test fails for me without the patch, passes with. Worst-case, it could randomly pass even if someone regresses this bug...
Attachment #509977 -
Flags: review?(dbaron)
Assignee | ||
Comment 3•13 years ago
|
||
Nice catch. What's going on here is that background image loads start when we compute the background style. For non-root elements, this happens in nsCSSFrameConstructor::ConstructFramesFromItem because we make and explicit GetStyleBackground call there. But for the root element we don't call ConstructFramesFromItem.
Assignee: nobody → bzbarsky
Whiteboard: [need review]
Comment on attachment 509977 [details] [diff] [review] Proposed fix r=dbaron
Attachment #509977 -
Flags: review?(dbaron)
Attachment #509977 -
Flags: review+
Attachment #509977 -
Flags: approval2.0+
Assignee | ||
Updated•13 years ago
|
Whiteboard: [need review] → [need landing]
Comment 5•13 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/16cc18d74a8c
Status: NEW → RESOLVED
Closed: 13 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Whiteboard: [need landing]
Target Milestone: --- → mozilla2.0b12
You need to log in
before you can comment on or make changes to this bug.
Description
•