fast/dom/scroll-element-to-rect.html fails on WK1 Mac port
authorsimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 29 Sep 2011 00:45:20 +0000 (00:45 +0000)
committersimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 29 Sep 2011 00:45:20 +0000 (00:45 +0000)
commit3379765742c263140f633620dfc4f021a8057296
tree86741d46e6dacd4bf845a932ae86a9243d7597fb
parent8e72192a2a0970952ee9c1eb505eb6049c66ab77
fast/dom/scroll-element-to-rect.html fails on WK1 Mac port
https://bugs.webkit.org/show_bug.cgi?id=68815

Source/WebCore:

Reviewed by Dan Bernstein.

FrameView::scrollElementToRect() was incorrectly using Element::boundsInWindowSpace(),
which is window-relative (not web view-relative), and has flipped coordinates
in WebKit1.

Change to use Node::getRect() which is what the author intended.

* dom/Element.h:
* page/FrameView.cpp:
(WebCore::FrameView::scrollElementToRect):

LayoutTests:

Reviewed by Dan Bernstein.

Fix these tests to not throw errors when window.internals is not available.

* fast/dom/scroll-element-to-rect-centered.html:
* fast/dom/scroll-element-to-rect.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@96278 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/dom/scroll-element-to-rect-centered.html
LayoutTests/fast/dom/scroll-element-to-rect.html
Source/WebCore/ChangeLog
Source/WebCore/dom/Element.h
Source/WebCore/page/FrameView.cpp