Move nodeFromPoint() back to Document where it belongs
https://bugs.webkit.org/show_bug.cgi?id=137012
Reviewed by Zalan Bujtas.
Source/WebCore:
nodeFromPoint() was moved into TreeScope for ShadowDOM work, but now we can move
it back to its logical place.
Make versions of elementFromPoint and caretRangeFromPoint that take LayoutPoints,
and change the current scale/offset code to be in layout units (which results
in a small behavior change).
elementFromPoint(int, int) and caretRangeFromPoint(int, int) are still required
for bindings code.
* dom/Document.cpp:
(WebCore::Document::nodeFromPoint):
(WebCore::Document::elementFromPoint):
(WebCore::Document::caretRangeFromPoint):
* dom/Document.h:
(WebCore::Document::elementFromPoint): Move logic from TreeScope::elementFromPoint()
here.
* dom/TreeScope.cpp:
(WebCore::nodeFromPoint): Deleted.
(WebCore::TreeScope::elementFromPoint): Deleted.
* dom/TreeScope.h:
LayoutTests:
All platforms use subpixel layout now, so remove the conditional behavior in this test.
Fix the test to account for scaling now being done in layout units.
* fast/dom/Document/CaretRangeFromPoint/hittest-relative-to-viewport-expected.txt:
* fast/dom/Document/CaretRangeFromPoint/hittest-relative-to-viewport.html:
* platform/mac/fast/dom/Document/CaretRangeFromPoint/hittest-relative-to-viewport-expected.txt:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173857 268f45cc-cd09-0410-ab3c-d52691b4dbfc
10 files changed