Bug 14693 - document.width/height doesn't force layout
Summary: document.width/height doesn't force layout
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 523.x (Safari 3)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL: http://jjc.edu
Keywords: HasReduction, InRadar
: 15137 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-07-20 11:22 PDT by Matt Lilek
Modified: 2007-09-16 17:17 PDT (History)
2 users (show)

See Also:


Attachments
Reduction (927 bytes, text/html)
2007-07-20 11:23 PDT, Matt Lilek
no flags Details
patch (3.90 KB, patch)
2007-09-04 21:45 PDT, Sam Weinig
mjs: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Lilek 2007-07-20 11:22:41 PDT
The menu code at <http://jjc.edu/> calculates its positioning based on document.width, which is returning 0 by the time the position is calculated.  However, this doesn't happen all the time.  For me, if I load the URL in the address bar and hit enter, I can reproduce the bug consistently.  If I click the reload button in the toolbar though, it works properly.

The attached testcase shows the bug either way, but if I add in an alert(), it works OK after it is dismissed.
Comment 1 Matt Lilek 2007-07-20 11:23:02 PDT
Created attachment 15604 [details]
Reduction
Comment 2 Matt Lilek 2007-07-20 17:37:41 PDT
Should mention this happens with Safari 2 up to ToT.
Comment 3 Dave Hyatt 2007-07-20 17:42:39 PDT
Sounds easy to fix.  Just need to add an updateLayoutIgnoringPendingStylesheets.
Comment 4 mitz 2007-09-03 23:28:35 PDT
*** Bug 15137 has been marked as a duplicate of this bug. ***
Comment 5 Sam Weinig 2007-09-04 21:45:25 PDT
Created attachment 16202 [details]
patch
Comment 6 Maciej Stachowiak 2007-09-13 19:38:46 PDT
Comment on attachment 16202 [details]
patch

r=me
Comment 7 Mark Rowe (bdash) 2007-09-13 19:40:45 PDT
<rdar://problem/5481392>
Comment 8 Sam Weinig 2007-09-16 17:17:27 PDT
Landed in r25591.