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

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

Issue 1907213002: Refactor OverlayScrollbarSizeRelevancy into OverlayScrollbarClipBehavior (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
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 21 matching lines...) Expand all
32 namespace blink { 32 namespace blink {
33 33
34 class LayoutBlockFlow; 34 class LayoutBlockFlow;
35 class LayoutMultiColumnSpannerPlaceholder; 35 class LayoutMultiColumnSpannerPlaceholder;
36 class ShapeOutsideInfo; 36 class ShapeOutsideInfo;
37 37
38 struct PaintInfo; 38 struct PaintInfo;
39 39
40 enum SizeType { MainOrPreferredSize, MinSize, MaxSize }; 40 enum SizeType { MainOrPreferredSize, MinSize, MaxSize };
41 enum AvailableLogicalHeightType { ExcludeMarginBorderPadding, IncludeMarginBorde rPadding }; 41 enum AvailableLogicalHeightType { ExcludeMarginBorderPadding, IncludeMarginBorde rPadding };
42 enum OverlayScrollbarSizeRelevancy { IgnoreOverlayScrollbarSize, IncludeOverlayS crollbarSize }; 42 // When painting, overlay scrollbars do not take up space and should not affect
43 // clipping behavior. During hit testing, overlay scrollbars behave like regular
44 // scrollbars and should change how hit testing is clipped.
45 enum OverlayScrollbarClipBehavior { IgnoreOverlayScrollbarSize, IncludeOverlaySc rollbarSizeForHitTesting };
chrishtr 2016/04/22 16:05:04 Exclude, not Include, right?
43 enum MarginDirection { BlockDirection, InlineDirection }; 46 enum MarginDirection { BlockDirection, InlineDirection };
44 47
45 enum ShouldComputePreferred { ComputeActual, ComputePreferred }; 48 enum ShouldComputePreferred { ComputeActual, ComputePreferred };
46 49
47 enum ScrollOffsetClamping { 50 enum ScrollOffsetClamping {
48 ScrollOffsetUnclamped, 51 ScrollOffsetUnclamped,
49 ScrollOffsetClamped 52 ScrollOffsetClamped
50 }; 53 };
51 54
52 enum ApplyOverflowClipFlag { 55 enum ApplyOverflowClipFlag {
(...skipping 702 matching lines...) Expand 10 before | Expand all | Expand 10 after
755 // Page / column breakability inside block-level objects. 758 // Page / column breakability inside block-level objects.
756 enum PaginationBreakability { 759 enum PaginationBreakability {
757 AllowAnyBreaks, // No restrictions on breaking. May examine children to find possible break points. 760 AllowAnyBreaks, // No restrictions on breaking. May examine children to find possible break points.
758 ForbidBreaks, // Forbid breaks inside this object. Content cannot be spl it nicely into smaller pieces. 761 ForbidBreaks, // Forbid breaks inside this object. Content cannot be spl it nicely into smaller pieces.
759 AvoidBreaks // Preferably avoid breaks. If not possible, examine childre n to find possible break points. 762 AvoidBreaks // Preferably avoid breaks. If not possible, examine childre n to find possible break points.
760 }; 763 };
761 PaginationBreakability getPaginationBreakability() const; 764 PaginationBreakability getPaginationBreakability() const;
762 765
763 LayoutRect localCaretRect(InlineBox*, int caretOffset, LayoutUnit* extraWidt hToEndOfLine = nullptr) override; 766 LayoutRect localCaretRect(InlineBox*, int caretOffset, LayoutUnit* extraWidt hToEndOfLine = nullptr) override;
764 767
765 virtual LayoutRect overflowClipRect(const LayoutPoint& location, OverlayScro llbarSizeRelevancy = IgnoreOverlayScrollbarSize) const; 768 virtual LayoutRect overflowClipRect(const LayoutPoint& location, OverlayScro llbarClipBehavior = IgnoreOverlayScrollbarSize) const;
766 LayoutRect clipRect(const LayoutPoint& location) const; 769 LayoutRect clipRect(const LayoutPoint& location) const;
767 virtual bool hasControlClip() const { return false; } 770 virtual bool hasControlClip() const { return false; }
768 virtual LayoutRect controlClipRect(const LayoutPoint&) const { return Layout Rect(); } 771 virtual LayoutRect controlClipRect(const LayoutPoint&) const { return Layout Rect(); }
769 772
770 virtual void paintBoxDecorationBackground(const PaintInfo&, const LayoutPoin t&) const; 773 virtual void paintBoxDecorationBackground(const PaintInfo&, const LayoutPoin t&) const;
771 virtual void paintMask(const PaintInfo&, const LayoutPoint&) const; 774 virtual void paintMask(const PaintInfo&, const LayoutPoint&) const;
772 void imageChanged(WrappedImagePtr, const IntRect* = nullptr) override; 775 void imageChanged(WrappedImagePtr, const IntRect* = nullptr) override;
773 ResourcePriority computeResourcePriority() const final; 776 ResourcePriority computeResourcePriority() const final;
774 777
775 void logicalExtentAfterUpdatingLogicalWidth(const LayoutUnit& logicalTop, Lo gicalExtentComputedValues&); 778 void logicalExtentAfterUpdatingLogicalWidth(const LayoutUnit& logicalTop, Lo gicalExtentComputedValues&);
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
949 const LayoutRect& oldBounds, const LayoutPoint& oldPositionFromPaintInva lidationContainer, 952 const LayoutRect& oldBounds, const LayoutPoint& oldPositionFromPaintInva lidationContainer,
950 const LayoutRect& newBounds, const LayoutPoint& newPositionFromPaintInva lidationContainer) const override; 953 const LayoutRect& newBounds, const LayoutPoint& newPositionFromPaintInva lidationContainer) const override;
951 void incrementallyInvalidatePaint(const LayoutBoxModelObject& paintInvalidat ionContainer, const LayoutRect& oldBounds, const LayoutRect& newBounds, const La youtPoint& positionFromPaintInvalidationContainer) override; 954 void incrementallyInvalidatePaint(const LayoutBoxModelObject& paintInvalidat ionContainer, const LayoutRect& oldBounds, const LayoutRect& newBounds, const La youtPoint& positionFromPaintInvalidationContainer) override;
952 955
953 PaintInvalidationReason invalidatePaintIfNeeded(const PaintInvalidationState &) override; 956 PaintInvalidationReason invalidatePaintIfNeeded(const PaintInvalidationState &) override;
954 void invalidatePaintOfSubtreesIfNeeded(const PaintInvalidationState& childPa intInvalidationState) override; 957 void invalidatePaintOfSubtreesIfNeeded(const PaintInvalidationState& childPa intInvalidationState) override;
955 958
956 bool hasStretchedLogicalWidth() const; 959 bool hasStretchedLogicalWidth() const;
957 960
958 bool hasNonCompositedScrollbars() const final; 961 bool hasNonCompositedScrollbars() const final;
959 void excludeScrollbars(LayoutRect&, OverlayScrollbarSizeRelevancy = IgnoreOv erlayScrollbarSize) const; 962 void excludeScrollbars(LayoutRect&, OverlayScrollbarClipBehavior = IgnoreOve rlayScrollbarSize) const;
960 963
961 LayoutUnit containingBlockLogicalWidthForPositioned(const LayoutBoxModelObje ct* containingBlock, bool checkForPerpendicularWritingMode = true) const; 964 LayoutUnit containingBlockLogicalWidthForPositioned(const LayoutBoxModelObje ct* containingBlock, bool checkForPerpendicularWritingMode = true) const;
962 LayoutUnit containingBlockLogicalHeightForPositioned(const LayoutBoxModelObj ect* containingBlock, bool checkForPerpendicularWritingMode = true) const; 965 LayoutUnit containingBlockLogicalHeightForPositioned(const LayoutBoxModelObj ect* containingBlock, bool checkForPerpendicularWritingMode = true) const;
963 966
964 static void computeBlockStaticDistance(Length& logicalTop, Length& logicalBo ttom, const LayoutBox* child, const LayoutBoxModelObject* containerBlock); 967 static void computeBlockStaticDistance(Length& logicalTop, Length& logicalBo ttom, const LayoutBox* child, const LayoutBoxModelObject* containerBlock);
965 static void computeInlineStaticDistance(Length& logicalLeft, Length& logical Right, const LayoutBox* child, const LayoutBoxModelObject* containerBlock, Layou tUnit containerLogicalWidth); 968 static void computeInlineStaticDistance(Length& logicalLeft, Length& logical Right, const LayoutBox* child, const LayoutBoxModelObject* containerBlock, Layou tUnit containerLogicalWidth);
966 static void computeLogicalLeftPositionedOffset(LayoutUnit& logicalLeftPos, c onst LayoutBox* child, LayoutUnit logicalWidthValue, const LayoutBoxModelObject* containerBlock, LayoutUnit containerLogicalWidth); 969 static void computeLogicalLeftPositionedOffset(LayoutUnit& logicalLeftPos, c onst LayoutBox* child, LayoutUnit logicalWidthValue, const LayoutBoxModelObject* containerBlock, LayoutUnit containerLogicalWidth);
967 static void computeLogicalTopPositionedOffset(LayoutUnit& logicalTopPos, con st LayoutBox* child, LayoutUnit logicalHeightValue, const LayoutBoxModelObject* containerBlock, LayoutUnit containerLogicalHeight); 970 static void computeLogicalTopPositionedOffset(LayoutUnit& logicalTopPos, con st LayoutBox* child, LayoutUnit logicalHeightValue, const LayoutBoxModelObject* containerBlock, LayoutUnit containerLogicalHeight);
968 971
969 private: 972 private:
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
1160 || breakValue == BreakLeft 1163 || breakValue == BreakLeft
1161 || breakValue == BreakPage 1164 || breakValue == BreakPage
1162 || breakValue == BreakRecto 1165 || breakValue == BreakRecto
1163 || breakValue == BreakRight 1166 || breakValue == BreakRight
1164 || breakValue == BreakVerso; 1167 || breakValue == BreakVerso;
1165 } 1168 }
1166 1169
1167 } // namespace blink 1170 } // namespace blink
1168 1171
1169 #endif // LayoutBox_h 1172 #endif // LayoutBox_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBlock.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698