Correct LayoutUnit usage in Accessibility code
authorleviw@chromium.org <leviw@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 22 Mar 2012 15:07:02 +0000 (15:07 +0000)
committerleviw@chromium.org <leviw@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 22 Mar 2012 15:07:02 +0000 (15:07 +0000)
commit7b210f5317b7873730d06bebedcaa7733dc77a02
tree94ec5df4d61e0dcf4033fd639072f95d7b7c3608
parent64c35ae673055d0f4091b7d5994f18ec7feb83b5
Correct LayoutUnit usage in Accessibility code
https://bugs.webkit.org/show_bug.cgi?id=81789

Reviewed by Eric Seidel.

Reverting Accessibility hit testing code back to integers. Accessibility hit tests originate from
the embedder and don't accumulate offsets, so we get nothing from using LayoutUnits, and needlessly
expose them to the embedder.

No new tests. No change in behavior.

* accessibility/AccessibilityListBox.cpp:
(WebCore::AccessibilityListBox::elementAccessibilityHitTest): See above.
* accessibility/AccessibilityListBox.h:
(AccessibilityListBox):
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::clickPoint): This value is only ever used to display a context menu,
which is always done with integer coordinates.
(WebCore::AccessibilityObject::boundingBoxForQuads): This is a bounding box built from floats. We
don't pixel snap floats, so we return an integer bounding box.
(WebCore::AccessibilityObject::elementAccessibilityHitTest): See above.
(WebCore::AccessibilityObject::scrollToMakeVisible): Pixel snapping the bounding box and simplifying
up the code to position it at (0,0).
* accessibility/AccessibilityObject.h:
(WebCore::AccessibilityObject::accessibilityHitTest): See above.
(AccessibilityObject):
(WebCore::AccessibilityObject::pixelSnappedBoundingBoxRect): Convenience method for embedder callers.
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::visiblePositionForPoint): The point passed in here is comes from
screen coordinates and originates in embedder code. Reverting it to take an integer.
(WebCore::AccessibilityRenderObject::accessibilityImageMapHitTest): See above.
(WebCore::AccessibilityRenderObject::accessibilityHitTest): See above.
* accessibility/AccessibilityRenderObject.h:
(AccessibilityRenderObject):
* accessibility/AccessibilityScrollView.cpp:
(WebCore::AccessibilityScrollView::accessibilityHitTest): See above.
* accessibility/AccessibilityScrollView.h:
(AccessibilityScrollView):
* accessibility/AccessibilitySlider.cpp:
(WebCore::AccessibilitySlider::elementAccessibilityHitTest): See above.
* accessibility/AccessibilitySlider.h:
(AccessibilitySlider):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@111699 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/accessibility/AccessibilityListBox.cpp
Source/WebCore/accessibility/AccessibilityListBox.h
Source/WebCore/accessibility/AccessibilityObject.cpp
Source/WebCore/accessibility/AccessibilityObject.h
Source/WebCore/accessibility/AccessibilityRenderObject.cpp
Source/WebCore/accessibility/AccessibilityRenderObject.h
Source/WebCore/accessibility/AccessibilityScrollView.cpp
Source/WebCore/accessibility/AccessibilityScrollView.h
Source/WebCore/accessibility/AccessibilitySlider.cpp
Source/WebCore/accessibility/AccessibilitySlider.h