WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
5759
Links to anchors jump to wrong place (horizontally)
https://bugs.webkit.org/show_bug.cgi?id=5759
Summary
Links to anchors jump to wrong place (horizontally)
Christopher Stevenson
Reported
2005-11-16 09:58:42 PST
When Webkit jumps horizontally to an anchor it displays the begining of it in the top right and not the top left of the browser (despite the code having a work-around which is sound for IE PC). Test case page at :
http://www.aplacecalledcommon.co.uk/testcase/index.html
Attachments
testcase html page
(2.54 KB, text/html)
2005-11-16 09:59 PST
,
Christopher Stevenson
no flags
Details
Patch to fix anchor scrolling problem
(2.47 KB, patch)
2005-11-16 14:38 PST
,
Adele Peterson
no flags
Details
Formatted Diff
Diff
new patch for anchor scrolling
(2.61 KB, patch)
2005-11-16 15:16 PST
,
Adele Peterson
adele
: review+
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Christopher Stevenson
Comment 1
2005-11-16 09:59:52 PST
Created
attachment 4698
[details]
testcase html page
mitz
Comment 2
2005-11-16 12:06:19 PST
Confirmed on TOT. I think this is a regression from after
bug 4964
was fixed. The testcase for that bug is broken as well on TOT.
mitz
Comment 3
2005-11-16 12:10:12 PST
P1 since it's a regression from WebKit-416.11
Vicki Murley
Comment 4
2005-11-16 13:05:23 PST
Adele, looks like <
rdar://problem/4318167
> REGRESSION: content doesn't scroll far enough to the left after clicking links at aplacecalledcommon.co.uk is back!
Vicki Murley
Comment 5
2005-11-16 13:22:45 PST
In Radar as <
rdar://problem/4346132
>
Adele Peterson
Comment 6
2005-11-16 14:38:19 PST
Created
attachment 4704
[details]
Patch to fix anchor scrolling problem This patch fixes two bugs. First, in getRect- if the width or the height was 0, then we would set both the width and height to -1. This is clearly wrong. Second, in scrollRectToVisible - if we were trying to do the minimum amount of scrolling, and a rect was off-screen to the right, we scroll to line up the right edge of the rect, to the right edge of the window. This doesn't work right if the node's rect is bigger than the window. So now we check for that, and align to the left side in that case.
David Harrison
Comment 7
2005-11-16 14:57:26 PST
Looks good except don't you still want to return an empty rect rather than one with a negative width or height? if ( xEnd < xPos || yEnd < yPos ) return QRect( QPoint( xPos, yPos ), QSize() );
Adele Peterson
Comment 8
2005-11-16 15:00:51 PST
excellent point Dave! I'll attach a new patch
Adele Peterson
Comment 9
2005-11-16 15:02:16 PST
well...if the width is negative, don't we want to only set that to 0? and not the height also in case the height is positive?
Adele Peterson
Comment 10
2005-11-16 15:16:54 PST
Created
attachment 4705
[details]
new patch for anchor scrolling
Adele Peterson
Comment 11
2005-11-16 16:14:54 PST
Comment on
attachment 4705
[details]
new patch for anchor scrolling Dave Harrison reviewed this
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