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

Side by Side Diff: Source/core/layout/LayoutBox.h

Issue 1287413002: Fix paint invalidation rect tracking within composited scrolling layers. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 4 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * Copyright (C) 2003, 2006, 2007 Apple Inc. All rights reserved. 4 * Copyright (C) 2003, 2006, 2007 Apple Inc. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 552 matching lines...) Expand 10 before | Expand all | Expand 10 after
563 virtual void panScroll(const IntPoint&); 563 virtual void panScroll(const IntPoint&);
564 564
565 bool hasAutoVerticalScrollbar() const { return hasOverflowClip() && (style() ->overflowY() == OAUTO || style()->overflowY() == OPAGEDY || style()->overflowY( ) == OOVERLAY); } 565 bool hasAutoVerticalScrollbar() const { return hasOverflowClip() && (style() ->overflowY() == OAUTO || style()->overflowY() == OPAGEDY || style()->overflowY( ) == OOVERLAY); }
566 bool hasAutoHorizontalScrollbar() const { return hasOverflowClip() && (style ()->overflowX() == OAUTO || style()->overflowX() == OOVERLAY); } 566 bool hasAutoHorizontalScrollbar() const { return hasOverflowClip() && (style ()->overflowX() == OAUTO || style()->overflowX() == OOVERLAY); }
567 bool scrollsOverflow() const { return scrollsOverflowX() || scrollsOverflowY (); } 567 bool scrollsOverflow() const { return scrollsOverflowX() || scrollsOverflowY (); }
568 568
569 bool hasScrollableOverflowX() const { return scrollsOverflowX() && pixelSnap pedScrollWidth() != pixelSnappedClientWidth(); } 569 bool hasScrollableOverflowX() const { return scrollsOverflowX() && pixelSnap pedScrollWidth() != pixelSnappedClientWidth(); }
570 bool hasScrollableOverflowY() const { return scrollsOverflowY() && pixelSnap pedScrollHeight() != pixelSnappedClientHeight(); } 570 bool hasScrollableOverflowY() const { return scrollsOverflowY() && pixelSnap pedScrollHeight() != pixelSnappedClientHeight(); }
571 virtual bool scrollsOverflowX() const { return hasOverflowClip() && (style() ->overflowX() == OSCROLL || hasAutoHorizontalScrollbar()); } 571 virtual bool scrollsOverflowX() const { return hasOverflowClip() && (style() ->overflowX() == OSCROLL || hasAutoHorizontalScrollbar()); }
572 virtual bool scrollsOverflowY() const { return hasOverflowClip() && (style() ->overflowY() == OSCROLL || hasAutoVerticalScrollbar()); } 572 virtual bool scrollsOverflowY() const { return hasOverflowClip() && (style() ->overflowY() == OSCROLL || hasAutoVerticalScrollbar()); }
573 bool usesCompositedScrolling() const;
574 573
575 // Elements such as the <input> field override this to specify that they are scrollable 574 // Elements such as the <input> field override this to specify that they are scrollable
576 // outside the context of the CSS overflow style 575 // outside the context of the CSS overflow style
577 virtual bool isIntrinsicallyScrollable(ScrollbarOrientation orientation) con st { return false; } 576 virtual bool isIntrinsicallyScrollable(ScrollbarOrientation orientation) con st { return false; }
578 577
579 bool hasUnsplittableScrollingOverflow() const; 578 bool hasUnsplittableScrollingOverflow() const;
580 bool isUnsplittableForPagination() const; 579 bool isUnsplittableForPagination() const;
581 580
582 LayoutRect localCaretRect(InlineBox*, int caretOffset, LayoutUnit* extraWidt hToEndOfLine = nullptr) override; 581 LayoutRect localCaretRect(InlineBox*, int caretOffset, LayoutUnit* extraWidt hToEndOfLine = nullptr) override;
583 582
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
808 // These include tables, positioned objects, floats and flexible boxes. 807 // These include tables, positioned objects, floats and flexible boxes.
809 virtual void computePreferredLogicalWidths() { clearPreferredLogicalWidthsDi rty(); } 808 virtual void computePreferredLogicalWidths() { clearPreferredLogicalWidthsDi rty(); }
810 809
811 LayoutBoxRareData& ensureRareData() 810 LayoutBoxRareData& ensureRareData()
812 { 811 {
813 if (!m_rareData) 812 if (!m_rareData)
814 m_rareData = adoptPtr(new LayoutBoxRareData()); 813 m_rareData = adoptPtr(new LayoutBoxRareData());
815 return *m_rareData.get(); 814 return *m_rareData.get();
816 } 815 }
817 816
818 bool needToSavePreviousBoxSizes(); 817 bool needToSavePreviousBoxSizes(const LayoutBoxModelObject& paintInvalidatio nContainer);
819 void savePreviousBoxSizesIfNeeded(); 818 void savePreviousBoxSizesIfNeeded(const LayoutBoxModelObject& paintInvalidat ionContainer);
820 LayoutSize computePreviousBorderBoxSize(const LayoutSize& previousBoundsSize ) const; 819 LayoutSize computePreviousBorderBoxSize(const LayoutSize& previousBoundsSize ) const;
821 820
822 bool logicalHeightComputesAsNone(SizeType) const; 821 bool logicalHeightComputesAsNone(SizeType) const;
823 822
824 bool isBox() const = delete; // This will catch anyone doing an unnecessary check. 823 bool isBox() const = delete; // This will catch anyone doing an unnecessary check.
825 824
826 void frameRectChanged() 825 void frameRectChanged()
827 { 826 {
828 // The frame rect may change because of layout of other objects. 827 // The frame rect may change because of layout of other objects.
829 // Should check this object for paint invalidation. 828 // Should check this object for paint invalidation.
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
931 if (UNLIKELY(inlineBoxWrapper() != nullptr)) 930 if (UNLIKELY(inlineBoxWrapper() != nullptr))
932 deleteLineBoxWrapper(); 931 deleteLineBoxWrapper();
933 } 932 }
934 933
935 ensureRareData().m_inlineBoxWrapper = boxWrapper; 934 ensureRareData().m_inlineBoxWrapper = boxWrapper;
936 } 935 }
937 936
938 } // namespace blink 937 } // namespace blink
939 938
940 #endif // LayoutBox_h 939 #endif // LayoutBox_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698