WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
23990
Regression (
r40837
): JavaScript image popup doesn't work
https://bugs.webkit.org/show_bug.cgi?id=23990
Summary
Regression (r40837): JavaScript image popup doesn't work
Alexander Kahn
Reported
2009-02-17 08:25:12 PST
Hi, On this page:
http://www.tetongravity.com/forums/showthread.php?t=137052&page=196
, in post #4877, clicking on one of the attached images is supposed to popup a larger version of the image. In the current nightly (41018?), it doesn't. However, when viewing the post on its own (
http://www.tetongravity.com/forums/showpost.php?p=2260986&postcount=4877
), the image pops up correctly. Thanks to cpst for helping me file this.
Attachments
Reduced test case
(7.36 KB, text/html)
2009-02-18 14:36 PST
,
Cameron Zwarich (cpst)
no flags
Details
patch
(5.33 KB, patch)
2009-02-24 18:22 PST
,
Sam Weinig
hyatt
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Cameron Zwarich (cpst)
Comment 1
2009-02-17 08:43:07 PST
Using nightlies I tracked down this regression to the range
r40813
-
r40884
. I'll try bisecting some more with SVN.
Cameron Zwarich (cpst)
Comment 2
2009-02-17 10:40:26 PST
This regressed in
r40837
:
http://trac.webkit.org/changeset/40837
I'm not sure what caused the change.
Cameron Zwarich (cpst)
Comment 3
2009-02-18 10:49:30 PST
The YAHOO.util.Dom.setXY YUI function seems to be broken after
r40837
, but I am not sure why.
Cameron Zwarich (cpst)
Comment 4
2009-02-18 13:02:28 PST
The problem seems to be with the getXY YUI function, which sniffs getBoundingClientRect and uses it if it exists. In the case of the element in question, getBoundingClientRect().top differs from offsetTop.
Cameron Zwarich (cpst)
Comment 5
2009-02-18 13:59:34 PST
The problem is that getBoundingClientRect on all other browsers gives a negative top value if the page has been scrolled downwards. We need to emulate this behaviour (and other quirks of getBoundingClientRect) for compatibility. I'll try to make a simple test case from this example.
Cameron Zwarich (cpst)
Comment 6
2009-02-18 14:36:51 PST
Created
attachment 27764
[details]
Reduced test case Here's a reduced test case. Clicking anywhere gives an alert with the top of the enclosing div's current bounding rectangle. Note that this is reported relative to the viewport in all other browsers.
Cameron Zwarich (cpst)
Comment 7
2009-02-18 16:06:07 PST
I'm unassigning this, because I'm probably not the one to fix it.
Kevin M. Dean
Comment 8
2009-02-24 07:57:57 PST
You mentioned scrolling the page downwards. I think I'm seeing what may be other related issues with scrolling between builds
r40813
and
r40884
, so it could be the same bug. I'm seeing that javascript opened content is only positioned correctly before you start scrolling. Once scrolled it opens in it's original position on the screen but not correct relative to the page content anymore. Example:
http://www.mania.com/aodvb/
On this and other forum sites, click the search or quick links drop down menus and they'll appear fine. Scroll down the page a little and then they appear out of proper position. I'm also seeing something similar on Yahoo Personals in the photo gallery grid mode where an info box appears relative to a picture, but isn't in the right spot after scrolling.
Cameron Zwarich (cpst)
Comment 9
2009-02-24 09:02:36 PST
It's probably the same bug. The fix is to just use viewport-relative coordinates. If Sam doesn't fix it soon, I'll ask Hyatt how to fix it and do it myself.
Sam Weinig
Comment 10
2009-02-24 18:22:47 PST
Created
attachment 27948
[details]
patch
Dave Hyatt
Comment 11
2009-02-24 18:36:50 PST
Comment on
attachment 27948
[details]
patch r=me
Sam Weinig
Comment 12
2009-02-24 18:38:52 PST
Fixed in
r41207
.
Cameron Zwarich (cpst)
Comment 13
2009-02-25 23:18:04 PST
***
Bug 24134
has been marked as a duplicate of this bug. ***
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug