| 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 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 // |unobscuredRect| receives the clip rect that is not clipped to the root w
indow. It may be nullptr. | 163 // |unobscuredRect| receives the clip rect that is not clipped to the root w
indow. It may be nullptr. |
| 164 IntRect clipRectsForFrameOwner(const HTMLFrameOwnerElement*, IntRect* unobsc
uredRect) const; | 164 IntRect clipRectsForFrameOwner(const HTMLFrameOwnerElement*, IntRect* unobsc
uredRect) const; |
| 165 | 165 |
| 166 // Scale used to convert incoming input events. | 166 // Scale used to convert incoming input events. |
| 167 float inputEventsScaleFactor() const; | 167 float inputEventsScaleFactor() const; |
| 168 | 168 |
| 169 // Offset used to convert incoming input events while emulating device metic
s. | 169 // Offset used to convert incoming input events while emulating device metic
s. |
| 170 IntSize inputEventsOffsetForEmulation() const; | 170 IntSize inputEventsOffsetForEmulation() const; |
| 171 void setInputEventsTransformForEmulation(const IntSize&, float); | 171 void setInputEventsTransformForEmulation(const IntSize&, float); |
| 172 | 172 |
| 173 virtual void setScrollPosition(const DoublePoint&, ScrollBehavior = ScrollBe
haviorInstant) override; | 173 virtual void setScrollPosition(const DoublePoint&, ScrollType, ScrollBehavio
r = ScrollBehaviorInstant) override; |
| 174 | 174 |
| 175 FloatSize elasticOverscroll() const { return m_elasticOverscroll; } | 175 FloatSize elasticOverscroll() const { return m_elasticOverscroll; } |
| 176 void setElasticOverscroll(const FloatSize&); | 176 void setElasticOverscroll(const FloatSize&); |
| 177 | 177 |
| 178 void viewportSizeChanged(bool widthChanged, bool heightChanged); | 178 void viewportSizeChanged(bool widthChanged, bool heightChanged); |
| 179 | 179 |
| 180 AtomicString mediaType() const; | 180 AtomicString mediaType() const; |
| 181 void setMediaType(const AtomicString&); | 181 void setMediaType(const AtomicString&); |
| 182 void adjustMediaTypeForPrinting(bool printing); | 182 void adjustMediaTypeForPrinting(bool printing); |
| 183 | 183 |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 346 virtual void getTickmarks(Vector<IntRect>&) const override; | 346 virtual void getTickmarks(Vector<IntRect>&) const override; |
| 347 void scrollTo(const DoublePoint&); | 347 void scrollTo(const DoublePoint&); |
| 348 virtual IntRect scrollableAreaBoundingBox() const override; | 348 virtual IntRect scrollableAreaBoundingBox() const override; |
| 349 virtual bool scrollAnimatorEnabled() const override; | 349 virtual bool scrollAnimatorEnabled() const override; |
| 350 virtual bool usesCompositedScrolling() const override; | 350 virtual bool usesCompositedScrolling() const override; |
| 351 virtual GraphicsLayer* layerForScrolling() const override; | 351 virtual GraphicsLayer* layerForScrolling() const override; |
| 352 virtual GraphicsLayer* layerForHorizontalScrollbar() const override; | 352 virtual GraphicsLayer* layerForHorizontalScrollbar() const override; |
| 353 virtual GraphicsLayer* layerForVerticalScrollbar() const override; | 353 virtual GraphicsLayer* layerForVerticalScrollbar() const override; |
| 354 virtual GraphicsLayer* layerForScrollCorner() const override; | 354 virtual GraphicsLayer* layerForScrollCorner() const override; |
| 355 virtual int scrollSize(ScrollbarOrientation) const override; | 355 virtual int scrollSize(ScrollbarOrientation) const override; |
| 356 virtual void setScrollOffset(const IntPoint&) override; | |
| 357 virtual void setScrollOffset(const DoublePoint&) override; | |
| 358 virtual bool isScrollCornerVisible() const override; | 356 virtual bool isScrollCornerVisible() const override; |
| 359 virtual bool userInputScrollable(ScrollbarOrientation) const override; | 357 virtual bool userInputScrollable(ScrollbarOrientation) const override; |
| 360 virtual bool shouldPlaceVerticalScrollbarOnLeft() const override; | 358 virtual bool shouldPlaceVerticalScrollbarOnLeft() const override; |
| 361 virtual LayoutRect scrollIntoView( | 359 virtual LayoutRect scrollIntoView( |
| 362 const LayoutRect& rectInContent, | 360 const LayoutRect& rectInContent, |
| 363 const ScrollAlignment& alignX, | 361 const ScrollAlignment& alignX, |
| 364 const ScrollAlignment& alignY) override; | 362 const ScrollAlignment& alignY) override; |
| 365 | 363 |
| 366 // The window that hosts the FrameView. The FrameView will communicate scrol
ls and repaints to the | 364 // The window that hosts the FrameView. The FrameView will communicate scrol
ls and repaints to the |
| 367 // host window in the window's coordinate space. | 365 // host window in the window's coordinate space. |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 433 IntSize scrollOffset() const { return toIntSize(visibleContentRect().locatio
n()); } // Gets the scrolled position as an IntSize. Convenient for adding to ot
her sizes. | 431 IntSize scrollOffset() const { return toIntSize(visibleContentRect().locatio
n()); } // Gets the scrolled position as an IntSize. Convenient for adding to ot
her sizes. |
| 434 DoubleSize scrollOffsetDouble() const { return DoubleSize(m_scrollPosition.x
(), m_scrollPosition.y()); } | 432 DoubleSize scrollOffsetDouble() const { return DoubleSize(m_scrollPosition.x
(), m_scrollPosition.y()); } |
| 435 DoubleSize pendingScrollDelta() const { return m_pendingScrollDelta; } | 433 DoubleSize pendingScrollDelta() const { return m_pendingScrollDelta; } |
| 436 virtual IntPoint minimumScrollPosition() const override; // The minimum posi
tion we can be scrolled to. | 434 virtual IntPoint minimumScrollPosition() const override; // The minimum posi
tion we can be scrolled to. |
| 437 int scrollX() const { return scrollPosition().x(); } | 435 int scrollX() const { return scrollPosition().x(); } |
| 438 int scrollY() const { return scrollPosition().y(); } | 436 int scrollY() const { return scrollPosition().y(); } |
| 439 | 437 |
| 440 void cacheCurrentScrollPosition() { m_cachedScrollPosition = scrollPositionD
ouble(); } | 438 void cacheCurrentScrollPosition() { m_cachedScrollPosition = scrollPositionD
ouble(); } |
| 441 DoublePoint cachedScrollPosition() const { return m_cachedScrollPosition; } | 439 DoublePoint cachedScrollPosition() const { return m_cachedScrollPosition; } |
| 442 | 440 |
| 443 // Functions for scrolling the view. | |
| 444 void scrollBy(const DoubleSize& s, ScrollBehavior behavior = ScrollBehaviorI
nstant) | |
| 445 { | |
| 446 return setScrollPosition(scrollPositionDouble() + s, behavior); | |
| 447 } | |
| 448 | |
| 449 // Scroll the actual contents of the view (either blitting or invalidating a
s needed). | 441 // Scroll the actual contents of the view (either blitting or invalidating a
s needed). |
| 450 void scrollContents(const IntSize& scrollDelta); | 442 void scrollContents(const IntSize& scrollDelta); |
| 451 | 443 |
| 452 // This gives us a means of blocking painting on our scrollbars until the fi
rst layout has occurred. | 444 // This gives us a means of blocking painting on our scrollbars until the fi
rst layout has occurred. |
| 453 void setScrollbarsSuppressed(bool suppressed, bool repaintOnUnsuppress = fal
se); | 445 void setScrollbarsSuppressed(bool suppressed, bool repaintOnUnsuppress = fal
se); |
| 454 bool scrollbarsSuppressed() const { return m_scrollbarsSuppressed; } | 446 bool scrollbarsSuppressed() const { return m_scrollbarsSuppressed; } |
| 455 | 447 |
| 456 bool drawPanScrollIcon() { return m_shouldDrawPanScrollIcon; } | 448 bool drawPanScrollIcon() { return m_shouldDrawPanScrollIcon; } |
| 457 | 449 |
| 458 // Methods for converting between this frame and other coordinate spaces. | 450 // Methods for converting between this frame and other coordinate spaces. |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 608 explicit InUpdateScrollbarsScope(FrameView* view) | 600 explicit InUpdateScrollbarsScope(FrameView* view) |
| 609 : m_scope(view->m_inUpdateScrollbars, true) | 601 : m_scope(view->m_inUpdateScrollbars, true) |
| 610 { } | 602 { } |
| 611 private: | 603 private: |
| 612 TemporaryChange<bool> m_scope; | 604 TemporaryChange<bool> m_scope; |
| 613 }; | 605 }; |
| 614 | 606 |
| 615 private: | 607 private: |
| 616 explicit FrameView(LocalFrame*); | 608 explicit FrameView(LocalFrame*); |
| 617 | 609 |
| 610 virtual void setScrollOffset(const IntPoint&, ScrollType) override; |
| 611 virtual void setScrollOffset(const DoublePoint&, ScrollType) override; |
| 612 |
| 618 void updateLayoutAndStyleForPaintingInternal(); | 613 void updateLayoutAndStyleForPaintingInternal(); |
| 619 void invalidateTreeIfNeededRecursive(); | 614 void invalidateTreeIfNeededRecursive(); |
| 620 void scrollContentsIfNeededRecursive(); | 615 void scrollContentsIfNeededRecursive(); |
| 621 void updateLayoutAndStyleIfNeededRecursive(); | 616 void updateLayoutAndStyleIfNeededRecursive(); |
| 622 | 617 |
| 623 void reset(); | 618 void reset(); |
| 624 void init(); | 619 void init(); |
| 625 | 620 |
| 626 void clearLayoutSubtreeRootsAndMarkContainingBlocks(); | 621 void clearLayoutSubtreeRootsAndMarkContainingBlocks(); |
| 627 | 622 |
| (...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 882 static const unsigned visualPixelThreshold = 32 * 32; | 877 static const unsigned visualPixelThreshold = 32 * 32; |
| 883 if (m_visuallyNonEmptyPixelCount > visualPixelThreshold) | 878 if (m_visuallyNonEmptyPixelCount > visualPixelThreshold) |
| 884 setIsVisuallyNonEmpty(); | 879 setIsVisuallyNonEmpty(); |
| 885 } | 880 } |
| 886 | 881 |
| 887 DEFINE_TYPE_CASTS(FrameView, Widget, widget, widget->isFrameView(), widget.isFra
meView()); | 882 DEFINE_TYPE_CASTS(FrameView, Widget, widget, widget->isFrameView(), widget.isFra
meView()); |
| 888 | 883 |
| 889 } // namespace blink | 884 } // namespace blink |
| 890 | 885 |
| 891 #endif // FrameView_h | 886 #endif // FrameView_h |
| OLD | NEW |