| 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 reserv
ed. | 7 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv
ed. |
| 8 | 8 |
| 9 This library is free software; you can redistribute it and/or | 9 This library is free software; you can redistribute it and/or |
| 10 modify it under the terms of the GNU Library General Public | 10 modify it under the terms of the GNU Library General Public |
| (...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 317 typedef HashSet<LayoutBox*> ResizerAreaSet; | 317 typedef HashSet<LayoutBox*> ResizerAreaSet; |
| 318 void addResizerArea(LayoutBox&); | 318 void addResizerArea(LayoutBox&); |
| 319 void removeResizerArea(LayoutBox&); | 319 void removeResizerArea(LayoutBox&); |
| 320 const ResizerAreaSet* resizerAreas() const { return m_resizerAreas.get(); } | 320 const ResizerAreaSet* resizerAreas() const { return m_resizerAreas.get(); } |
| 321 | 321 |
| 322 bool shouldUseIntegerScrollOffset() const override; | 322 bool shouldUseIntegerScrollOffset() const override; |
| 323 | 323 |
| 324 bool isActive() const override; | 324 bool isActive() const override; |
| 325 | 325 |
| 326 // Override scrollbar notifications to update the AXObject cache. | 326 // Override scrollbar notifications to update the AXObject cache. |
| 327 void didAddScrollbar(Scrollbar*, ScrollbarOrientation) override; | 327 void didAddScrollbar(Scrollbar&, ScrollbarOrientation) override; |
| 328 | 328 |
| 329 // FIXME: This should probably be renamed as the 'inSubtreeLayout' parameter | 329 // FIXME: This should probably be renamed as the 'inSubtreeLayout' parameter |
| 330 // passed around the FrameView layout methods can be true while this returns | 330 // passed around the FrameView layout methods can be true while this returns |
| 331 // false. | 331 // false. |
| 332 bool isSubtreeLayout() const { return !m_layoutSubtreeRootList.isEmpty(); } | 332 bool isSubtreeLayout() const { return !m_layoutSubtreeRootList.isEmpty(); } |
| 333 | 333 |
| 334 // Sets the tickmarks for the FrameView, overriding the default behavior | 334 // Sets the tickmarks for the FrameView, overriding the default behavior |
| 335 // which is to display the tickmarks corresponding to find results. | 335 // which is to display the tickmarks corresponding to find results. |
| 336 // If |m_tickmarks| is empty, the default behavior is restored. | 336 // If |m_tickmarks| is empty, the default behavior is restored. |
| 337 void setTickmarks(const Vector<IntRect>& tickmarks) | 337 void setTickmarks(const Vector<IntRect>& tickmarks) |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 505 IntPoint convertSelfToChild(const Widget* child, const IntPoint& point) cons
t override | 505 IntPoint convertSelfToChild(const Widget* child, const IntPoint& point) cons
t override |
| 506 { | 506 { |
| 507 IntPoint newPoint = point; | 507 IntPoint newPoint = point; |
| 508 if (!isFrameViewScrollbar(child)) | 508 if (!isFrameViewScrollbar(child)) |
| 509 newPoint = frameToContents(point); | 509 newPoint = frameToContents(point); |
| 510 newPoint.moveBy(-child->location()); | 510 newPoint.moveBy(-child->location()); |
| 511 return newPoint; | 511 return newPoint; |
| 512 } | 512 } |
| 513 | 513 |
| 514 // Widget override. Handles painting of the contents of the view as well as
the scrollbars. | 514 // Widget override. Handles painting of the contents of the view as well as
the scrollbars. |
| 515 void paint(GraphicsContext*, const CullRect&) const override; | 515 void paint(GraphicsContext&, const CullRect&) const override; |
| 516 void paint(GraphicsContext*, const GlobalPaintFlags, const CullRect&) const; | 516 void paint(GraphicsContext&, const GlobalPaintFlags, const CullRect&) const; |
| 517 void paintContents(GraphicsContext*, const GlobalPaintFlags, const IntRect&
damageRect) const; | 517 void paintContents(GraphicsContext&, const GlobalPaintFlags, const IntRect&
damageRect) const; |
| 518 | 518 |
| 519 // Widget overrides to ensure that our children's visibility status is kept
up to date when we get shown and hidden. | 519 // Widget overrides to ensure that our children's visibility status is kept
up to date when we get shown and hidden. |
| 520 void show() override; | 520 void show() override; |
| 521 void hide() override; | 521 void hide() override; |
| 522 void setParentVisible(bool) override; | 522 void setParentVisible(bool) override; |
| 523 | 523 |
| 524 bool isPointInScrollbarCorner(const IntPoint&); | 524 bool isPointInScrollbarCorner(const IntPoint&); |
| 525 bool scrollbarCornerPresent() const; | 525 bool scrollbarCornerPresent() const; |
| 526 IntRect scrollCornerRect() const override; | 526 IntRect scrollCornerRect() const override; |
| 527 | 527 |
| 528 IntRect convertFromScrollbarToContainingWidget(const Scrollbar*, const IntRe
ct&) const override; | 528 IntRect convertFromScrollbarToContainingWidget(const Scrollbar&, const IntRe
ct&) const override; |
| 529 IntRect convertFromContainingWidgetToScrollbar(const Scrollbar*, const IntRe
ct&) const override; | 529 IntRect convertFromContainingWidgetToScrollbar(const Scrollbar&, const IntRe
ct&) const override; |
| 530 IntPoint convertFromScrollbarToContainingWidget(const Scrollbar*, const IntP
oint&) const override; | 530 IntPoint convertFromScrollbarToContainingWidget(const Scrollbar&, const IntP
oint&) const override; |
| 531 IntPoint convertFromContainingWidgetToScrollbar(const Scrollbar*, const IntP
oint&) const override; | 531 IntPoint convertFromContainingWidgetToScrollbar(const Scrollbar&, const IntP
oint&) const override; |
| 532 | 532 |
| 533 bool isFrameView() const override { return true; } | 533 bool isFrameView() const override { return true; } |
| 534 | 534 |
| 535 DECLARE_VIRTUAL_TRACE(); | 535 DECLARE_VIRTUAL_TRACE(); |
| 536 void notifyPageThatContentAreaWillPaint() const; | 536 void notifyPageThatContentAreaWillPaint() const; |
| 537 FrameView* parentFrameView() const; | 537 FrameView* parentFrameView() const; |
| 538 | 538 |
| 539 // Returns the scrollable area for the frame. For the root frame, this will | 539 // Returns the scrollable area for the frame. For the root frame, this will |
| 540 // be the RootFrameViewport, which adds pinch-zoom semantics to scrolling. | 540 // be the RootFrameViewport, which adds pinch-zoom semantics to scrolling. |
| 541 // For non-root frames, this will be the the ScrollableArea used by the | 541 // For non-root frames, this will be the the ScrollableArea used by the |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 598 void scrollContentsIfNeeded(); | 598 void scrollContentsIfNeeded(); |
| 599 | 599 |
| 600 void setScrollOrigin(const IntPoint&, bool updatePositionAtAll, bool updateP
ositionSynchronously); | 600 void setScrollOrigin(const IntPoint&, bool updatePositionAtAll, bool updateP
ositionSynchronously); |
| 601 | 601 |
| 602 enum ComputeScrollbarExistenceOption { | 602 enum ComputeScrollbarExistenceOption { |
| 603 FirstPass, | 603 FirstPass, |
| 604 Incremental | 604 Incremental |
| 605 }; | 605 }; |
| 606 void computeScrollbarExistence(bool& newHasHorizontalScrollbar, bool& newHas
VerticalScrollbar, const IntSize& docSize, ComputeScrollbarExistenceOption = Fir
stPass) const; | 606 void computeScrollbarExistence(bool& newHasHorizontalScrollbar, bool& newHas
VerticalScrollbar, const IntSize& docSize, ComputeScrollbarExistenceOption = Fir
stPass) const; |
| 607 void updateScrollbarGeometry(); | 607 void updateScrollbarGeometry(); |
| 608 IntRect adjustScrollbarRectForResizer(const IntRect&, Scrollbar*); | 608 IntRect adjustScrollbarRectForResizer(const IntRect&, Scrollbar&); |
| 609 | 609 |
| 610 // Called to update the scrollbars to accurately reflect the state of the vi
ew. | 610 // Called to update the scrollbars to accurately reflect the state of the vi
ew. |
| 611 void updateScrollbars(const DoubleSize& desiredOffset); | 611 void updateScrollbars(const DoubleSize& desiredOffset); |
| 612 | 612 |
| 613 class InUpdateScrollbarsScope { | 613 class InUpdateScrollbarsScope { |
| 614 STACK_ALLOCATED(); | 614 STACK_ALLOCATED(); |
| 615 public: | 615 public: |
| 616 explicit InUpdateScrollbarsScope(FrameView* view) | 616 explicit InUpdateScrollbarsScope(FrameView* view) |
| 617 : m_scope(view->m_inUpdateScrollbars, true) | 617 : m_scope(view->m_inUpdateScrollbars, true) |
| 618 { } | 618 { } |
| (...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 915 static const unsigned visualPixelThreshold = 32 * 32; | 915 static const unsigned visualPixelThreshold = 32 * 32; |
| 916 if (m_visuallyNonEmptyPixelCount > visualPixelThreshold) | 916 if (m_visuallyNonEmptyPixelCount > visualPixelThreshold) |
| 917 setIsVisuallyNonEmpty(); | 917 setIsVisuallyNonEmpty(); |
| 918 } | 918 } |
| 919 | 919 |
| 920 DEFINE_TYPE_CASTS(FrameView, Widget, widget, widget->isFrameView(), widget.isFra
meView()); | 920 DEFINE_TYPE_CASTS(FrameView, Widget, widget, widget->isFrameView(), widget.isFra
meView()); |
| 921 | 921 |
| 922 } // namespace blink | 922 } // namespace blink |
| 923 | 923 |
| 924 #endif // FrameView_h | 924 #endif // FrameView_h |
| OLD | NEW |