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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 LayoutUnit m_overrideLogicalContentWidth; | 69 LayoutUnit m_overrideLogicalContentWidth; |
70 | 70 |
71 // Set by RenderBox::updatePreviousBorderBoxSizeIfNeeded(). | 71 // Set by RenderBox::updatePreviousBorderBoxSizeIfNeeded(). |
72 LayoutSize m_previousBorderBoxSize; | 72 LayoutSize m_previousBorderBoxSize; |
73 }; | 73 }; |
74 | 74 |
75 class RenderBox : public RenderBoxModelObject { | 75 class RenderBox : public RenderBoxModelObject { |
76 public: | 76 public: |
77 explicit RenderBox(ContainerNode*); | 77 explicit RenderBox(ContainerNode*); |
78 | 78 |
79 // hasAutoZIndex only returns true if the element is positioned or a flex-it
em since | 79 virtual LayerType layerTypeRequired() const override; |
80 // position:static elements that are not flex-items get their z-index coerce
d to auto. | |
81 virtual LayerType layerTypeRequired() const override | |
82 { | |
83 if (isPositioned() || createsGroup() || hasClipPath() || hasTransformRel
atedProperty() || hasHiddenBackface() || hasReflection() || style()->specifiesCo
lumns() || !style()->hasAutoZIndex() || style()->shouldCompositeForCurrentAnimat
ions()) | |
84 return NormalLayer; | |
85 if (hasOverflowClip()) | |
86 return OverflowClipLayer; | |
87 | |
88 return NoLayer; | |
89 } | |
90 | 80 |
91 virtual bool backgroundIsKnownToBeOpaqueInRect(const LayoutRect& localRect)
const override; | 81 virtual bool backgroundIsKnownToBeOpaqueInRect(const LayoutRect& localRect)
const override; |
92 | 82 |
93 virtual bool backgroundShouldAlwaysBeClipped() const { return false; } | 83 virtual bool backgroundShouldAlwaysBeClipped() const { return false; } |
94 | 84 |
95 // Use this with caution! No type checking is done! | 85 // Use this with caution! No type checking is done! |
96 RenderBox* firstChildBox() const; | 86 RenderBox* firstChildBox() const; |
97 RenderBox* lastChildBox() const; | 87 RenderBox* lastChildBox() const; |
98 | 88 |
99 int pixelSnappedWidth() const { return m_frameRect.pixelSnappedWidth(); } | 89 int pixelSnappedWidth() const { return m_frameRect.pixelSnappedWidth(); } |
(...skipping 751 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
851 if (UNLIKELY(inlineBoxWrapper() != 0)) | 841 if (UNLIKELY(inlineBoxWrapper() != 0)) |
852 deleteLineBoxWrapper(); | 842 deleteLineBoxWrapper(); |
853 } | 843 } |
854 | 844 |
855 ensureRareData().m_inlineBoxWrapper = boxWrapper; | 845 ensureRareData().m_inlineBoxWrapper = boxWrapper; |
856 } | 846 } |
857 | 847 |
858 } // namespace blink | 848 } // namespace blink |
859 | 849 |
860 #endif // RenderBox_h | 850 #endif // RenderBox_h |
OLD | NEW |