| OLD | NEW |
| 1 /* | 1 /* |
| 2 Copyright (C) 1997 Martin Jones (mjones@kde.org) | 2 Copyright (C) 1997 Martin Jones (mjones@kde.org) |
| 3 (C) 1998 Waldo Bastian (bastian@kde.org) | 3 (C) 1998 Waldo Bastian (bastian@kde.org) |
| 4 (C) 1998, 1999 Torben Weis (weis@kde.org) | 4 (C) 1998, 1999 Torben Weis (weis@kde.org) |
| 5 (C) 1999 Lars Knoll (knoll@kde.org) | 5 (C) 1999 Lars Knoll (knoll@kde.org) |
| 6 (C) 1999 Antti Koivisto (koivisto@kde.org) | 6 (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 7 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights | 7 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights |
| 8 reserved. | 8 reserved. |
| 9 | 9 |
| 10 This library is free software; you can redistribute it and/or | 10 This library is free software; you can redistribute it and/or |
| (...skipping 606 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 617 FloatPoint FrameToContents(const FloatPoint&) const; | 617 FloatPoint FrameToContents(const FloatPoint&) const; |
| 618 IntRect FrameToContents(const IntRect&) const; | 618 IntRect FrameToContents(const IntRect&) const; |
| 619 | 619 |
| 620 // Functions for converting to screen coordinates. | 620 // Functions for converting to screen coordinates. |
| 621 IntRect ContentsToScreen(const IntRect&) const; | 621 IntRect ContentsToScreen(const IntRect&) const; |
| 622 | 622 |
| 623 // For platforms that need to hit test scrollbars from within the engine's | 623 // For platforms that need to hit test scrollbars from within the engine's |
| 624 // event handlers (like Win32). | 624 // event handlers (like Win32). |
| 625 Scrollbar* ScrollbarAtFramePoint(const IntPoint&); | 625 Scrollbar* ScrollbarAtFramePoint(const IntPoint&); |
| 626 | 626 |
| 627 IntPoint ConvertChildToSelf(const FrameViewBase* child, | 627 IntRect ConvertToRootFrame(const IntRect&) const; |
| 628 const IntPoint& point) const override { | 628 IntPoint ConvertToRootFrame(const IntPoint&) const; |
| 629 IntPoint new_point = point; | 629 IntPoint ConvertSelfToChild(const FrameViewBase*, const IntPoint&) const; |
| 630 if (!IsFrameViewScrollbar(child)) | |
| 631 new_point = ContentsToFrame(point); | |
| 632 new_point.MoveBy(child->Location()); | |
| 633 return new_point; | |
| 634 } | |
| 635 | |
| 636 IntPoint ConvertSelfToChild(const FrameViewBase* child, | |
| 637 const IntPoint& point) const override { | |
| 638 IntPoint new_point = point; | |
| 639 if (!IsFrameViewScrollbar(child)) | |
| 640 new_point = FrameToContents(point); | |
| 641 new_point.MoveBy(-child->Location()); | |
| 642 return new_point; | |
| 643 } | |
| 644 | 630 |
| 645 // FrameViewBase override. Handles painting of the contents of the view as | 631 // FrameViewBase override. Handles painting of the contents of the view as |
| 646 // well as the scrollbars. | 632 // well as the scrollbars. |
| 647 void Paint(GraphicsContext&, const CullRect&) const override; | 633 void Paint(GraphicsContext&, const CullRect&) const override; |
| 648 void Paint(GraphicsContext&, const GlobalPaintFlags, const CullRect&) const; | 634 void Paint(GraphicsContext&, const GlobalPaintFlags, const CullRect&) const; |
| 649 void PaintContents(GraphicsContext&, | 635 void PaintContents(GraphicsContext&, |
| 650 const GlobalPaintFlags, | 636 const GlobalPaintFlags, |
| 651 const IntRect& damage_rect) const; | 637 const IntRect& damage_rect) const; |
| 652 | 638 |
| 653 // FrameViewBase overrides to ensure that our children's visibility status is | 639 // FrameViewBase overrides to ensure that our children's visibility status is |
| 654 // kept up to date when we get shown and hidden. | 640 // kept up to date when we get shown and hidden. |
| 655 void Show() override; | 641 void Show() override; |
| 656 void Hide() override; | 642 void Hide() override; |
| 657 void SetParentVisible(bool) override; | 643 void SetParentVisible(bool) override; |
| 658 | 644 |
| 659 bool IsPointInScrollbarCorner(const IntPoint&); | 645 bool IsPointInScrollbarCorner(const IntPoint&); |
| 660 bool ScrollbarCornerPresent() const; | 646 bool ScrollbarCornerPresent() const; |
| 661 IntRect ScrollCornerRect() const override; | 647 IntRect ScrollCornerRect() const override; |
| 662 | 648 |
| 663 IntRect ConvertFromScrollbarToContainingFrameViewBase( | |
| 664 const Scrollbar&, | |
| 665 const IntRect&) const override; | |
| 666 IntRect ConvertFromContainingFrameViewBaseToScrollbar( | |
| 667 const Scrollbar&, | |
| 668 const IntRect&) const override; | |
| 669 IntPoint ConvertFromScrollbarToContainingFrameViewBase( | |
| 670 const Scrollbar&, | |
| 671 const IntPoint&) const override; | |
| 672 IntPoint ConvertFromContainingFrameViewBaseToScrollbar( | 649 IntPoint ConvertFromContainingFrameViewBaseToScrollbar( |
| 673 const Scrollbar&, | 650 const Scrollbar&, |
| 674 const IntPoint&) const override; | 651 const IntPoint&) const override; |
| 675 | 652 |
| 676 bool IsFrameView() const override { return true; } | 653 bool IsFrameView() const override { return true; } |
| 677 | 654 |
| 678 DECLARE_VIRTUAL_TRACE(); | 655 DECLARE_VIRTUAL_TRACE(); |
| 679 void NotifyPageThatContentAreaWillPaint() const; | 656 void NotifyPageThatContentAreaWillPaint() const; |
| 680 FrameView* ParentFrameView() const; | 657 FrameView* ParentFrameView() const; |
| 681 | 658 |
| (...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 962 void ScheduleOrPerformPostLayoutTasks(); | 939 void ScheduleOrPerformPostLayoutTasks(); |
| 963 void PerformPostLayoutTasks(); | 940 void PerformPostLayoutTasks(); |
| 964 | 941 |
| 965 void RecordDeferredLoadingStats(); | 942 void RecordDeferredLoadingStats(); |
| 966 | 943 |
| 967 DocumentLifecycle& Lifecycle() const; | 944 DocumentLifecycle& Lifecycle() const; |
| 968 | 945 |
| 969 void ContentsResized() override; | 946 void ContentsResized() override; |
| 970 void ScrollbarExistenceDidChange(); | 947 void ScrollbarExistenceDidChange(); |
| 971 | 948 |
| 972 // Override FrameViewBase methods to do point conversion via layoutObjects, in | 949 // Methods to do point conversion via layoutObjects, in order to take |
| 973 // order to take transforms into account. | 950 // transforms into account. |
| 974 IntRect ConvertToContainingFrameViewBase(const IntRect&) const override; | 951 IntRect ConvertToContainingFrameViewBase(const IntRect&) const; |
| 975 IntRect ConvertFromContainingFrameViewBase(const IntRect&) const override; | 952 IntPoint ConvertToContainingFrameViewBase(const IntPoint&) const; |
| 976 IntPoint ConvertToContainingFrameViewBase(const IntPoint&) const override; | 953 IntRect ConvertFromContainingFrameViewBase(const IntRect&) const; |
| 977 IntPoint ConvertFromContainingFrameViewBase(const IntPoint&) const override; | 954 IntPoint ConvertFromContainingFrameViewBase(const IntPoint&) const; |
| 978 | 955 |
| 979 void DidChangeGlobalRootScroller() override; | 956 void DidChangeGlobalRootScroller() override; |
| 980 | 957 |
| 981 void UpdateGeometriesIfNeeded(); | 958 void UpdateGeometriesIfNeeded(); |
| 982 | 959 |
| 983 bool WasViewportResized(); | 960 bool WasViewportResized(); |
| 984 void SendResizeEventIfNeeded(); | 961 void SendResizeEventIfNeeded(); |
| 985 | 962 |
| 986 void UpdateParentScrollableAreaSet(); | 963 void UpdateParentScrollableAreaSet(); |
| 987 | 964 |
| (...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1271 frameViewBase.IsFrameView()); | 1248 frameViewBase.IsFrameView()); |
| 1272 DEFINE_TYPE_CASTS(FrameView, | 1249 DEFINE_TYPE_CASTS(FrameView, |
| 1273 ScrollableArea, | 1250 ScrollableArea, |
| 1274 scrollableArea, | 1251 scrollableArea, |
| 1275 scrollableArea->IsFrameView(), | 1252 scrollableArea->IsFrameView(), |
| 1276 scrollableArea.IsFrameView()); | 1253 scrollableArea.IsFrameView()); |
| 1277 | 1254 |
| 1278 } // namespace blink | 1255 } // namespace blink |
| 1279 | 1256 |
| 1280 #endif // FrameView_h | 1257 #endif // FrameView_h |
| OLD | NEW |