Index: third_party/WebKit/Source/core/frame/FrameView.h |
diff --git a/third_party/WebKit/Source/core/frame/FrameView.h b/third_party/WebKit/Source/core/frame/FrameView.h |
index ebfc224ae38a9c19793658a19a97a4c50725b3b3..7c3dd1e8a2cac2c252c6a34523ff74ae386f770d 100644 |
--- a/third_party/WebKit/Source/core/frame/FrameView.h |
+++ b/third_party/WebKit/Source/core/frame/FrameView.h |
@@ -260,6 +260,7 @@ public: |
// Methods to convert points and rects between the coordinate space of the layoutObject, and this view. |
IntRect convertFromLayoutObject(const LayoutObject&, const IntRect&) const; |
IntRect convertToLayoutObject(const LayoutObject&, const IntRect&) const; |
+ FloatRect convertFromLayoutObject(const LayoutObject&, const FloatRect&) const; |
IntPoint convertFromLayoutObject(const LayoutObject&, const IntPoint&) const; |
IntPoint convertToLayoutObject(const LayoutObject&, const IntPoint&) const; |
@@ -457,9 +458,10 @@ public: |
IntRect contentsToRootFrame(const IntRect&) const; |
IntRect viewportToContents(const IntRect&) const; |
+ IntPoint viewportToContents(const IntPoint&) const; |
IntRect contentsToViewport(const IntRect&) const; |
+ FloatRect contentsToViewport(const FloatRect&) const; |
IntPoint contentsToViewport(const IntPoint&) const; |
- IntPoint viewportToContents(const IntPoint&) const; |
// FIXME: Some external callers expect to get back a rect that's positioned |
// in viewport space, but sized in CSS pixels. This is an artifact of the |
@@ -473,7 +475,10 @@ public: |
// they are affected by scroll offset. Content coordinates are relative to the |
// document's top left corner and thus are not affected by scroll offset. |
IntPoint contentsToFrame(const IntPoint&) const; |
+ FloatPoint contentsToFrame(const FloatPoint&) const; |
IntRect contentsToFrame(const IntRect&) const; |
+ FloatRect contentsToFrame(const FloatRect&) const; |
+ |
IntPoint frameToContents(const IntPoint&) const; |
FloatPoint frameToContents(const FloatPoint&) const; |
IntRect frameToContents(const IntRect&) const; |
@@ -510,6 +515,15 @@ public: |
return newPoint; |
} |
+ FloatPoint convertChildToSelf(const Widget* child, const FloatPoint& point) const override |
+ { |
+ FloatPoint newPoint = point; |
+ if (!isFrameViewScrollbar(child)) |
+ newPoint = contentsToFrame(point); |
+ newPoint.moveBy(child->location()); |
+ return newPoint; |
+ } |
+ |
// Widget override. Handles painting of the contents of the view as well as the scrollbars. |
void paint(GraphicsContext*, const CullRect&) const override; |
void paint(GraphicsContext*, const GlobalPaintFlags, const CullRect&) const; |
@@ -526,6 +540,9 @@ public: |
IntRect convertFromScrollbarToContainingWidget(const Scrollbar*, const IntRect&) const override; |
IntRect convertFromContainingWidgetToScrollbar(const Scrollbar*, const IntRect&) const override; |
+ |
+ FloatRect convertFromScrollbarToContainingWidget(const Scrollbar*, const FloatRect&) const override; |
+ |
IntPoint convertFromScrollbarToContainingWidget(const Scrollbar*, const IntPoint&) const override; |
IntPoint convertFromContainingWidgetToScrollbar(const Scrollbar*, const IntPoint&) const override; |
@@ -667,6 +684,7 @@ private: |
// take transforms into account. |
IntRect convertToContainingWidget(const IntRect&) const override; |
IntRect convertFromContainingWidget(const IntRect&) const override; |
+ FloatRect convertToContainingWidget(const FloatRect&) const override; |
IntPoint convertToContainingWidget(const IntPoint&) const override; |
IntPoint convertFromContainingWidget(const IntPoint&) const override; |