Bug 14693

Summary: document.width/height doesn't force layout
Product: WebKit Reporter: Matt Lilek <dev+webkit>
Component: Layout and RenderingAssignee: Nobody <webkit-unassigned>
Severity: Normal CC: mitz, webkit
Priority: P2 Keywords: HasReduction, InRadar
Version: 523.x (Safari 3)   
Hardware: All   
OS: All   
URL: http://jjc.edu
Description Flags
patch mjs: review+

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]
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]
Comment 6 Maciej Stachowiak 2007-09-13 19:38:46 PDT
Comment on attachment 16202 [details]

Comment 7 Mark Rowe (bdash) 2007-09-13 19:40:45 PDT
Comment 8 Sam Weinig 2007-09-16 17:17:27 PDT
Landed in r25591.