• weinig@apple.com's avatar
    WebCore: Fix for https://bugs.webkit.org/show_bug.cgi?id=29217 · 4ff6c71c
    weinig@apple.com authored
    Document.caretRangeFromPoint should take the scroll offset into account before hit testing
    
    Reviewed by Maciej Stachowiak.
    
    In accordance with the CSSOM View Module spec, Document.caretRangeFromPoint should interpret
    the point passed to it as relative to the viewport, not the document.
    
    Test: fast/dom/Document/CaretRangeFromPoint/hittest-relative-to-viewport.html
    
    * dom/Document.cpp:
    (WebCore::Document::caretRangeFromPoint):
    
    LayoutTests: Test for https://bugs.webkit.org/show_bug.cgi?id=29217
    Document.caretRangeFromPoint should take the scroll offset into account before hit testing
    
    Reviewed by Maciej Stachowiak.
    
    * fast/dom/Document/CaretRangeFromPoint/hittest-relative-to-viewport-expected.txt: Added.
    * fast/dom/Document/CaretRangeFromPoint/hittest-relative-to-viewport.html: Added.
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48333 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    4ff6c71c
Document.cpp 144 KB