Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 27 matching lines...) Expand all Loading... | |
| 38 class ShapeOutsideInfo; | 38 class ShapeOutsideInfo; |
| 39 | 39 |
| 40 struct PaintInfo; | 40 struct PaintInfo; |
| 41 | 41 |
| 42 enum SizeType { MainOrPreferredSize, MinSize, MaxSize }; | 42 enum SizeType { MainOrPreferredSize, MinSize, MaxSize }; |
| 43 enum AvailableLogicalHeightType { ExcludeMarginBorderPadding, IncludeMarginBorde rPadding }; | 43 enum AvailableLogicalHeightType { ExcludeMarginBorderPadding, IncludeMarginBorde rPadding }; |
| 44 // When painting, overlay scrollbars do not take up space and should not affect | 44 // When painting, overlay scrollbars do not take up space and should not affect |
| 45 // clipping behavior. During hit testing, overlay scrollbars behave like regular | 45 // clipping behavior. During hit testing, overlay scrollbars behave like regular |
| 46 // scrollbars and should change how hit testing is clipped. | 46 // scrollbars and should change how hit testing is clipped. |
| 47 enum MarginDirection { BlockDirection, InlineDirection }; | 47 enum MarginDirection { BlockDirection, InlineDirection }; |
| 48 enum BackgroundRectOpacity { TranslucentBackgroundRect, OpaqueBackgroundRect }; | |
|
chrishtr
2016/08/12 17:03:00
The meaning of these enum values is not that clear
| |
| 48 | 49 |
| 49 enum ShouldComputePreferred { ComputeActual, ComputePreferred }; | 50 enum ShouldComputePreferred { ComputeActual, ComputePreferred }; |
| 50 | 51 |
| 51 enum ApplyOverflowClipFlag { | 52 enum ApplyOverflowClipFlag { |
| 52 ApplyOverflowClip, | 53 ApplyOverflowClip, |
| 53 // Don't apply overflow clipping or scrolling. | 54 // Don't apply overflow clipping or scrolling. |
| 54 ApplyNonScrollOverflowClip | 55 ApplyNonScrollOverflowClip |
| 55 }; | 56 }; |
| 56 | 57 |
| 57 using SnapAreaSet = HashSet<const LayoutBox*>; | 58 using SnapAreaSet = HashSet<const LayoutBox*>; |
| (...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 348 | 349 |
| 349 // The content area of the box (excludes padding - and intrinsic padding for table cells, etc... - and border). | 350 // The content area of the box (excludes padding - and intrinsic padding for table cells, etc... - and border). |
| 350 LayoutRect contentBoxRect() const { return LayoutRect(borderLeft() + padding Left(), borderTop() + paddingTop(), contentWidth(), contentHeight()); } | 351 LayoutRect contentBoxRect() const { return LayoutRect(borderLeft() + padding Left(), borderTop() + paddingTop(), contentWidth(), contentHeight()); } |
| 351 LayoutSize contentBoxOffset() const { return LayoutSize(borderLeft() + paddi ngLeft(), borderTop() + paddingTop()); } | 352 LayoutSize contentBoxOffset() const { return LayoutSize(borderLeft() + paddi ngLeft(), borderTop() + paddingTop()); } |
| 352 // The content box in absolute coords. Ignores transforms. | 353 // The content box in absolute coords. Ignores transforms. |
| 353 IntRect absoluteContentBox() const; | 354 IntRect absoluteContentBox() const; |
| 354 // The offset of the content box in absolute coords, ignoring transforms. | 355 // The offset of the content box in absolute coords, ignoring transforms. |
| 355 IntSize absoluteContentBoxOffset() const; | 356 IntSize absoluteContentBoxOffset() const; |
| 356 // The content box converted to absolute coords (taking transforms into acco unt). | 357 // The content box converted to absolute coords (taking transforms into acco unt). |
| 357 FloatQuad absoluteContentQuad() const; | 358 FloatQuad absoluteContentQuad() const; |
| 358 // The clip rect of the background. | 359 // The enclosing rectangle of the background with given opacity requirement. |
| 359 LayoutRect backgroundClipRect() const; | 360 LayoutRect backgroundRect(BackgroundRectOpacity) const; |
| 360 | 361 |
| 361 // This returns the content area of the box (excluding padding and border). The only difference with contentBoxRect is that computedCSSContentBoxRect | 362 // This returns the content area of the box (excluding padding and border). The only difference with contentBoxRect is that computedCSSContentBoxRect |
| 362 // does include the intrinsic padding in the content box as this is what som e callers expect (like getComputedStyle). | 363 // does include the intrinsic padding in the content box as this is what som e callers expect (like getComputedStyle). |
| 363 LayoutRect computedCSSContentBoxRect() const { return LayoutRect(borderLeft( ) + computedCSSPaddingLeft(), borderTop() + computedCSSPaddingTop(), clientWidth () - computedCSSPaddingLeft() - computedCSSPaddingRight(), clientHeight() - comp utedCSSPaddingTop() - computedCSSPaddingBottom()); } | 364 LayoutRect computedCSSContentBoxRect() const { return LayoutRect(borderLeft( ) + computedCSSPaddingLeft(), borderTop() + computedCSSPaddingTop(), clientWidth () - computedCSSPaddingLeft() - computedCSSPaddingRight(), clientHeight() - comp utedCSSPaddingTop() - computedCSSPaddingBottom()); } |
| 364 | 365 |
| 365 void addOutlineRects(Vector<LayoutRect>&, const LayoutPoint& additionalOffse t, IncludeBlockVisualOverflowOrNot) const override; | 366 void addOutlineRects(Vector<LayoutRect>&, const LayoutPoint& additionalOffse t, IncludeBlockVisualOverflowOrNot) const override; |
| 366 | 367 |
| 367 // Use this with caution! No type checking is done! | 368 // Use this with caution! No type checking is done! |
| 368 LayoutBox* previousSiblingBox() const; | 369 LayoutBox* previousSiblingBox() const; |
| 369 LayoutBox* previousInFlowSiblingBox() const; | 370 LayoutBox* previousInFlowSiblingBox() const; |
| (...skipping 866 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1236 || breakValue == BreakLeft | 1237 || breakValue == BreakLeft |
| 1237 || breakValue == BreakPage | 1238 || breakValue == BreakPage |
| 1238 || breakValue == BreakRecto | 1239 || breakValue == BreakRecto |
| 1239 || breakValue == BreakRight | 1240 || breakValue == BreakRight |
| 1240 || breakValue == BreakVerso; | 1241 || breakValue == BreakVerso; |
| 1241 } | 1242 } |
| 1242 | 1243 |
| 1243 } // namespace blink | 1244 } // namespace blink |
| 1244 | 1245 |
| 1245 #endif // LayoutBox_h | 1246 #endif // LayoutBox_h |
| OLD | NEW |