Bug 9943 - REGRESSION (Tiger-TOT): menus are offset to the right at http://movies.aol.com/movie-photo-bts/superman-returns
Summary: REGRESSION (Tiger-TOT): menus are offset to the right at http://movies.aol.co...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 420+
Hardware: Mac OS X 10.4
: P1 Major
Assignee: Darin Adler
URL:
Keywords: InRadar, Regression
Depends on:
Blocks:
 
Reported: 2006-07-15 16:27 PDT by Darin Adler
Modified: 2006-07-16 17:43 PDT (History)
0 users

See Also:


Attachments
test case to demonstrate difference in body offset properties (598 bytes, text/html)
2006-07-15 18:09 PDT, Darin Adler
no flags Details
patch, including change log and a layout test (5.29 KB, patch)
2006-07-15 18:27 PDT, Darin Adler
sullivan: review+
Details | Formatted Diff | Diff
these additional corrections to layout tests also need to be landed (4.84 KB, patch)
2006-07-16 12:16 PDT, Darin Adler
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Darin Adler 2006-07-15 16:27:29 PDT
<rdar://problem/4590613>

* SUMMARY
drop down menus at http://movies.aol.com/movie-photo-bts/superman-returns have regressed.  they are being rendered off the to the right.  

* STEPS TO REPRODUCE
0. TOT
1. http://movies.aol.com/movie-photo-bts/superman-returns
2. mouse over the menu bar with items such as "main", "showtimes & tix" "reviews & picks" , etc. 

* RESULTS
menus aren't drawn in correct position

* REGRESSION
this is a regression from Tiger Safari.  
Comment 1 Darin Adler 2006-07-15 16:28:25 PDT
I can't figure out why this worked in Tiger, but I do see what's going wrong.

The relevant function is this one, from channels.js:

function bb_left(o){
	var x=0;
	while(o.offsetParent){
		x+=o.offsetLeft;
		o=o.offsetParent;
	}
//	x+=o.offsetLeft;	
	return x;
}

In Firefox this works because the body has an offsetLeft of 0. In WebKit, the offsetLeft is the distance from the left side of the body to the left side of the window.
Comment 2 Darin Adler 2006-07-15 18:09:30 PDT
Created attachment 9471 [details]
test case to demonstrate difference in body offset properties
Comment 3 Darin Adler 2006-07-15 18:27:54 PDT
Created attachment 9472 [details]
patch, including change log and a layout test
Comment 4 John Sullivan 2006-07-15 18:35:00 PDT
Comment on attachment 9472 [details]
patch, including change log and a layout test

r=me
Comment 5 Darin Adler 2006-07-16 12:16:24 PDT
Created attachment 9501 [details]
these additional corrections to layout tests also need to be landed
Comment 6 Darin Adler 2006-07-16 17:43:56 PDT
Committed revision 15471.