1. 15 Sep, 2009 1 commit
    • mrowe@apple.com's avatar
      WebCore: Document.elementFromPoint() and Document.caretRangeFromPoint()... · bc939268
      mrowe@apple.com authored
      WebCore: Document.elementFromPoint() and Document.caretRangeFromPoint() erroneously returning null at points visible only after scrolling.
      https://bugs.webkit.org/show_bug.cgi?id=29245
      
      Patch by Andrew Richards <randrew@gmail.com> on 2009-09-14
      Reviewed by Sam Weinig.
      
      Use visibleContentRect() instead of boundsRect() when checking hit point bounds on viewport.
      
      * dom/Document.cpp:
      (WebCore::Document::elementFromPoint):
      (WebCore::Document::caretRangeFromPoint):
      
      LayoutTests: Document.elementFromPoint() and Document.caretRangeFromPoint() returning null at points visible only after scrolling.
      https://bugs.webkit.org/show_bug.cgi?id=29245
      
      Patch by Andrew Richards <randrew@gmail.com> on 2009-09-14
      Reviewed by Sam Weinig.
      
      Extend tests to include hits in areas that are not in the initial containing block of the page.
      
      * fast/dom/Document/CaretRangeFromPoint/hittest-relative-to-viewport-expected.txt:
      * fast/dom/Document/CaretRangeFromPoint/hittest-relative-to-viewport.html:
      * fast/dom/elementFromPoint-relative-to-viewport-expected.txt:
      * fast/dom/elementFromPoint-relative-to-viewport.html:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48398 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      bc939268
  2. 12 Sep, 2009 1 commit
    • 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
  3. 08 Sep, 2009 1 commit
    • weinig@apple.com's avatar
      WebCore: Fix for https://bugs.webkit.org/show_bug.cgi?id=27046 · 628cb2cd
      weinig@apple.com authored
      Implement CSSOM DocumentView.caretRangeFromPoint
      
      Reviewed by Timothy Hatcher.
      
      Tests: fast/dom/Document/CaretRangeFromPoint/basic.html
             fast/dom/Document/CaretRangeFromPoint/replace-element.html
      
      * dom/Document.cpp:
      (WebCore::Document::caretRangeFromPoint):
      * dom/Document.h:
      * dom/Document.idl:
      
      LayoutTests: Test for https://bugs.webkit.org/show_bug.cgi?id=27046
      Implement CSSOM DocumentView.caretRangeFromPoint
      
      Reviewed by Timothy Hatcher.
      
      * fast/dom/Document/CaretRangeFromPoint: Added.
      * fast/dom/Document/CaretRangeFromPoint/basic-expected.txt: Added.
      * fast/dom/Document/CaretRangeFromPoint/basic.html: Added.
      * fast/dom/Document/CaretRangeFromPoint/replace-element-expected.txt: Added.
      * fast/dom/Document/CaretRangeFromPoint/replace-element.html: Added.
      * fast/dom/Window/window-properties-expected.txt:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48188 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      628cb2cd