Bug 4875

Summary: link jumping should scroll to tallest object on line, not first object on line
Product: WebKit Reporter: mitz
Component: New BugsAssignee: Vicki Murley <vicki>
Status: VERIFIED FIXED    
Severity: Normal CC: vicki
Priority: P2    
Version: 420+   
Hardware: Mac   
OS: OS X 10.4   
Bug Depends on:    
Bug Blocks: 4964    
Attachments:
Description Flags
testcase none

mitz
Reported 2005-09-07 12:45:14 PDT
Summary: If a named anchor comes right before a table (and there's no whitespace between them) then a link to the anchor scrolls to the first text in the table rather than to where the anchor is. To reproduce: 1) Open the testcase in Safari 2) Click the "Click here" link Expected: in step 2, page should scroll to "You came to the right place!". Actual: in step 2, page scrolls to "I didn't expect you to get this far!". (Similar to bug 4825, but this one is not a regression).
Attachments
testcase (408 bytes, text/html)
2005-09-07 12:45 PDT, mitz
no flags
mitz
Comment 1 2005-09-07 12:45:58 PDT
Created attachment 3800 [details] testcase
mitz
Comment 2 2005-09-07 12:47:12 PDT
Forgot to mention that Firefox behaves as expected.
Vicki Murley
Comment 3 2005-09-07 14:36:26 PDT
Scrolling to anchors is broken in many ways, in large part b/c the function that calculates the position to scroll to (getUpperLeftCorner) predates the line box tree. Let's use this bug as a master bug for this issue.
Vicki Murley
Comment 4 2005-09-13 11:30:56 PDT
Dave Hyatt
Comment 5 2005-10-18 16:16:32 PDT
Putting a border on the table makes this test case a bit more clear IMO.
mitz
Comment 6 2005-10-28 01:41:32 PDT
Vicki fixed this but I'm not sure the bug can be closed because it's tracking other scroll-to-anchor issues.
Vicki Murley
Comment 7 2005-10-28 01:57:07 PDT
I think we can close this. The only remaining bug that is related to this bug is http:// bugzilla.opendarwin.org/show_bug.cgi?id=3390, and the originator claims that bug has something to do with stylesheets. The fixes I made pertain only to the algorithm that calculates the position to scroll to. By the way Mitz, thanks for all of your great test cases! They really helped in coming up with a solution that covered a lot of edge cases.
Note You need to log in before you can comment on or make changes to this bug.