Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(116)

Side by Side Diff: Source/core/frame/FrameView.h

Issue 1093383003: Remove mainthread overhang painting code (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/core/frame/FrameView.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 440 matching lines...) Expand 10 before | Expand all | Expand 10 after
451 IntSize scrollOffset() const { return toIntSize(visibleContentRect().locatio n()); } // Gets the scrolled position as an IntSize. Convenient for adding to ot her sizes. 451 IntSize scrollOffset() const { return toIntSize(visibleContentRect().locatio n()); } // Gets the scrolled position as an IntSize. Convenient for adding to ot her sizes.
452 DoubleSize scrollOffsetDouble() const { return DoubleSize(m_scrollPosition.x (), m_scrollPosition.y()); } 452 DoubleSize scrollOffsetDouble() const { return DoubleSize(m_scrollPosition.x (), m_scrollPosition.y()); }
453 DoubleSize pendingScrollDelta() const { return m_pendingScrollDelta; } 453 DoubleSize pendingScrollDelta() const { return m_pendingScrollDelta; }
454 virtual IntPoint minimumScrollPosition() const override; // The minimum posi tion we can be scrolled to. 454 virtual IntPoint minimumScrollPosition() const override; // The minimum posi tion we can be scrolled to.
455 // Adjust the passed in scroll position to keep it between the minimum and m aximum positions. 455 // Adjust the passed in scroll position to keep it between the minimum and m aximum positions.
456 IntPoint adjustScrollPositionWithinRange(const IntPoint&) const; 456 IntPoint adjustScrollPositionWithinRange(const IntPoint&) const;
457 DoublePoint adjustScrollPositionWithinRange(const DoublePoint&) const; 457 DoublePoint adjustScrollPositionWithinRange(const DoublePoint&) const;
458 int scrollX() const { return scrollPosition().x(); } 458 int scrollX() const { return scrollPosition().x(); }
459 int scrollY() const { return scrollPosition().y(); } 459 int scrollY() const { return scrollPosition().y(); }
460 460
461 virtual IntSize overhangAmount() const override;
462
463 void cacheCurrentScrollPosition() { m_cachedScrollPosition = scrollPositionD ouble(); } 461 void cacheCurrentScrollPosition() { m_cachedScrollPosition = scrollPositionD ouble(); }
464 DoublePoint cachedScrollPosition() const { return m_cachedScrollPosition; } 462 DoublePoint cachedScrollPosition() const { return m_cachedScrollPosition; }
465 463
466 // Functions for scrolling the view. 464 // Functions for scrolling the view.
467 void scrollBy(const DoubleSize& s, ScrollBehavior behavior = ScrollBehaviorI nstant) 465 void scrollBy(const DoubleSize& s, ScrollBehavior behavior = ScrollBehaviorI nstant)
468 { 466 {
469 return setScrollPosition(scrollPositionDouble() + s, behavior); 467 return setScrollPosition(scrollPositionDouble() + s, behavior);
470 } 468 }
471 469
472 bool scroll(ScrollDirection, ScrollGranularity); 470 bool scroll(ScrollDirection, ScrollGranularity);
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
566 virtual IntRect convertFromContainingViewToScrollbar(const Scrollbar*, const IntRect&) const override; 564 virtual IntRect convertFromContainingViewToScrollbar(const Scrollbar*, const IntRect&) const override;
567 virtual IntPoint convertFromScrollbarToContainingView(const Scrollbar*, cons t IntPoint&) const override; 565 virtual IntPoint convertFromScrollbarToContainingView(const Scrollbar*, cons t IntPoint&) const override;
568 virtual IntPoint convertFromContainingViewToScrollbar(const Scrollbar*, cons t IntPoint&) const override; 566 virtual IntPoint convertFromContainingViewToScrollbar(const Scrollbar*, cons t IntPoint&) const override;
569 567
570 virtual bool isFrameView() const override { return true; } 568 virtual bool isFrameView() const override { return true; }
571 569
572 DECLARE_VIRTUAL_TRACE(); 570 DECLARE_VIRTUAL_TRACE();
573 void notifyPageThatContentAreaWillPaint() const; 571 void notifyPageThatContentAreaWillPaint() const;
574 FrameView* parentFrameView() const; 572 FrameView* parentFrameView() const;
575 573
576 void calculateOverhangAreasForPainting(IntRect& horizontalOverhangRect, IntR ect& verticalOverhangRect);
577
578 // Returns the scrollable area for the frame. 574 // Returns the scrollable area for the frame.
579 ScrollableArea* scrollableArea(); 575 ScrollableArea* scrollableArea();
580 576
581 int viewportWidth() const; 577 int viewportWidth() const;
582 578
583 LayoutAnalyzer& layoutAnalyzer() { return m_analyzer; } 579 LayoutAnalyzer& layoutAnalyzer() { return m_analyzer; }
584 580
585 // LayoutObject for the viewport-defining element (see Document::viewportDef iningElement). 581 // LayoutObject for the viewport-defining element (see Document::viewportDef iningElement).
586 LayoutObject* viewportLayoutObject() { return m_viewportLayoutObject; } 582 LayoutObject* viewportLayoutObject() { return m_viewportLayoutObject; }
587 void clearViewportLayoutObject() { m_viewportLayoutObject = nullptr; } 583 void clearViewportLayoutObject() { m_viewportLayoutObject = nullptr; }
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
714 710
715 bool adjustScrollbarExistence(ComputeScrollbarExistenceOption = FirstPass); 711 bool adjustScrollbarExistence(ComputeScrollbarExistenceOption = FirstPass);
716 void adjustScrollbarOpacity(); 712 void adjustScrollbarOpacity();
717 // FIXME(bokan): setScrollOffset, setScrollPosition, scrollTo, scrollToOffse tWithoutAnimation, 713 // FIXME(bokan): setScrollOffset, setScrollPosition, scrollTo, scrollToOffse tWithoutAnimation,
718 // notifyScrollPositionChanged...there's too many ways to scroll this class. This needs 714 // notifyScrollPositionChanged...there's too many ways to scroll this class. This needs
719 // some cleanup. 715 // some cleanup.
720 void setScrollOffsetFromUpdateScrollbars(const DoubleSize&); 716 void setScrollOffsetFromUpdateScrollbars(const DoubleSize&);
721 717
722 IntRect rectToCopyOnScroll() const; 718 IntRect rectToCopyOnScroll() const;
723 719
724 void updateOverhangAreas();
725
726 bool isFrameViewScrollbar(const Widget* child) const { return horizontalScro llbar() == child || verticalScrollbar() == child; } 720 bool isFrameViewScrollbar(const Widget* child) const { return horizontalScro llbar() == child || verticalScrollbar() == child; }
727 721
728 ScrollingCoordinator* scrollingCoordinator(); 722 ScrollingCoordinator* scrollingCoordinator();
729 723
730 PassRefPtr<TracedValue> analyzerCounters(); 724 PassRefPtr<TracedValue> analyzerCounters();
731 725
732 LayoutSize m_size; 726 LayoutSize m_size;
733 727
734 typedef HashSet<RefPtr<LayoutEmbeddedObject>> EmbeddedObjectSet; 728 typedef HashSet<RefPtr<LayoutEmbeddedObject>> EmbeddedObjectSet;
735 EmbeddedObjectSet m_partUpdateSet; 729 EmbeddedObjectSet m_partUpdateSet;
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
882 static const unsigned visualPixelThreshold = 32 * 32; 876 static const unsigned visualPixelThreshold = 32 * 32;
883 if (m_visuallyNonEmptyPixelCount > visualPixelThreshold) 877 if (m_visuallyNonEmptyPixelCount > visualPixelThreshold)
884 setIsVisuallyNonEmpty(); 878 setIsVisuallyNonEmpty();
885 } 879 }
886 880
887 DEFINE_TYPE_CASTS(FrameView, Widget, widget, widget->isFrameView(), widget.isFra meView()); 881 DEFINE_TYPE_CASTS(FrameView, Widget, widget, widget->isFrameView(), widget.isFra meView());
888 882
889 } // namespace blink 883 } // namespace blink
890 884
891 #endif // FrameView_h 885 #endif // FrameView_h
OLDNEW
« no previous file with comments | « no previous file | Source/core/frame/FrameView.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698