OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) |
3 * (C) 2000 Antti Koivisto (koivisto@kde.org) | 3 * (C) 2000 Antti Koivisto (koivisto@kde.org) |
4 * (C) 2000 Dirk Mueller (mueller@kde.org) | 4 * (C) 2000 Dirk Mueller (mueller@kde.org) |
5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) | 5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) |
6 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2012 Apple Inc. All r
ights reserved. | 6 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2012 Apple Inc. All r
ights reserved. |
7 * Copyright (C) 2009 Google Inc. All rights reserved. | 7 * Copyright (C) 2009 Google Inc. All rights reserved. |
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 1085 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1096 // is responsible for painting this object. The function crosses | 1096 // is responsible for painting this object. The function crosses |
1097 // frames boundaries so the returned value can be in a | 1097 // frames boundaries so the returned value can be in a |
1098 // different document. | 1098 // different document. |
1099 // | 1099 // |
1100 // This is the container that should be passed to | 1100 // This is the container that should be passed to |
1101 // the '*forPaintInvalidation' methods. | 1101 // the '*forPaintInvalidation' methods. |
1102 const LayoutBoxModelObject& containerForPaintInvalidation() const; | 1102 const LayoutBoxModelObject& containerForPaintInvalidation() const; |
1103 | 1103 |
1104 bool isPaintInvalidationContainer() const; | 1104 bool isPaintInvalidationContainer() const; |
1105 | 1105 |
1106 LayoutRect computePaintInvalidationRect() | |
1107 { | |
1108 return computePaintInvalidationRect(containerForPaintInvalidation()); | |
1109 } | |
1110 | |
1111 // Returns the paint invalidation rect for this LayoutObject in the coordina
te space of the paint backing (typically a GraphicsLayer) for |paintInvalidation
Container|. | 1106 // Returns the paint invalidation rect for this LayoutObject in the coordina
te space of the paint backing (typically a GraphicsLayer) for |paintInvalidation
Container|. |
1112 LayoutRect computePaintInvalidationRect(const LayoutBoxModelObject& paintInv
alidationContainer, const PaintInvalidationState* = nullptr) const; | 1107 LayoutRect computePaintInvalidationRect(const LayoutBoxModelObject& paintInv
alidationContainer, const PaintInvalidationState* = nullptr) const; |
1113 | 1108 |
1114 // Returns the rect bounds needed to invalidate the paint of this object, in
the coordinate space of the layoutObject backing of |paintInvalidationContainer
| | 1109 // Returns the rect bounds needed to invalidate the paint of this object, in
the coordinate space of the layoutObject backing of |paintInvalidationContainer
| |
1115 LayoutRect boundsRectForPaintInvalidation(const LayoutBoxModelObject& paintI
nvalidationContainer, const PaintInvalidationState* = nullptr) const; | 1110 LayoutRect boundsRectForPaintInvalidation(const LayoutBoxModelObject& paintI
nvalidationContainer, const PaintInvalidationState* = nullptr) const; |
1116 | 1111 |
1117 // Actually do the paint invalidate of rect r for this object which has been
computed in the coordinate space | 1112 // Actually do the paint invalidate of rect r for this object which has been
computed in the coordinate space |
1118 // of the GraphicsLayer backing of |paintInvalidationContainer|. Note that t
his coordinaten space is not the same | 1113 // of the GraphicsLayer backing of |paintInvalidationContainer|. Note that t
his coordinaten space is not the same |
1119 // as the local coordinate space of |paintInvalidationContainer| in the pres
ence of layer squashing. | 1114 // as the local coordinate space of |paintInvalidationContainer| in the pres
ence of layer squashing. |
1120 void invalidatePaintUsingContainer(const LayoutBoxModelObject& paintInvalida
tionContainer, const LayoutRect&, PaintInvalidationReason) const; | 1115 void invalidatePaintUsingContainer(const LayoutBoxModelObject& paintInvalida
tionContainer, const LayoutRect&, PaintInvalidationReason) const; |
(...skipping 14 matching lines...) Expand all Loading... |
1135 | 1130 |
1136 void invalidatePaintIncludingNonCompositingDescendants(); | 1131 void invalidatePaintIncludingNonCompositingDescendants(); |
1137 void invalidatePaintIncludingNonSelfPaintingLayerDescendants(const LayoutBox
ModelObject& paintInvalidationContainer); | 1132 void invalidatePaintIncludingNonSelfPaintingLayerDescendants(const LayoutBox
ModelObject& paintInvalidationContainer); |
1138 void setShouldDoFullPaintInvalidationIncludingNonCompositingDescendants(); | 1133 void setShouldDoFullPaintInvalidationIncludingNonCompositingDescendants(); |
1139 | 1134 |
1140 // Returns the rect that should have paint invalidated whenever this object
changes. The rect is in the view's | 1135 // Returns the rect that should have paint invalidated whenever this object
changes. The rect is in the view's |
1141 // coordinate space. This method deals with outlines and overflow. | 1136 // coordinate space. This method deals with outlines and overflow. |
1142 virtual LayoutRect absoluteClippedOverflowRect() const; | 1137 virtual LayoutRect absoluteClippedOverflowRect() const; |
1143 virtual LayoutRect clippedOverflowRectForPaintInvalidation(const LayoutBoxMo
delObject* paintInvalidationContainer, const PaintInvalidationState* = nullptr)
const; | 1138 virtual LayoutRect clippedOverflowRectForPaintInvalidation(const LayoutBoxMo
delObject* paintInvalidationContainer, const PaintInvalidationState* = nullptr)
const; |
1144 | 1139 |
| 1140 // Returns the rect that should have paint invalidated whenever this object
changes. The rect is in the object's |
| 1141 // local coordinate space. |
| 1142 virtual LayoutRect localOverflowRectForPaintInvalidation() const; |
| 1143 |
1145 // Given a rect in the object's coordinate space, compute a rect in the coor
dinate space of |ancestor|. If | 1144 // Given a rect in the object's coordinate space, compute a rect in the coor
dinate space of |ancestor|. If |
1146 // intermediate containers have clipping or scrolling of any kind, it is app
lied; but overflow clipping is | 1145 // intermediate containers have clipping or scrolling of any kind, it is app
lied; but overflow clipping is |
1147 // *not* applied for |ancestor| itself. The output rect is suitable for purp
oses such as paint invalidation. | 1146 // *not* applied for |ancestor| itself. The output rect is suitable for purp
oses such as paint invalidation. |
1148 // | 1147 // |
1149 // If visibleRectFlags has the EdgeInclusive bit set, clipping operations wi
ll use | 1148 // If visibleRectFlags has the EdgeInclusive bit set, clipping operations wi
ll use |
1150 // LayoutRect::inclusiveIntersect, and the return value of inclusiveIntersec
t will be propagated | 1149 // LayoutRect::inclusiveIntersect, and the return value of inclusiveIntersec
t will be propagated |
1151 // to the return value of this method. Otherwise, clipping operations will
use LayoutRect::intersect, | 1150 // to the return value of this method. Otherwise, clipping operations will
use LayoutRect::intersect, |
1152 // and the return value will be true only if the clipped rect has non-zero a
rea. | 1151 // and the return value will be true only if the clipped rect has non-zero a
rea. |
1153 // See the documentation for LayoutRect::inclusiveIntersect for more informa
tion. | 1152 // See the documentation for LayoutRect::inclusiveIntersect for more informa
tion. |
1154 virtual bool mapToVisibleRectInAncestorSpace(const LayoutBoxModelObject* anc
estor, LayoutRect&, const PaintInvalidationState*, VisibleRectFlags = DefaultVis
ibleRectFlags) const; | 1153 virtual bool mapToVisibleRectInAncestorSpace(const LayoutBoxModelObject* anc
estor, LayoutRect&, const PaintInvalidationState*, VisibleRectFlags = DefaultVis
ibleRectFlags) const; |
(...skipping 12 matching lines...) Expand all Loading... |
1167 bool hasReflection() const { return m_bitfields.hasReflection(); } | 1166 bool hasReflection() const { return m_bitfields.hasReflection(); } |
1168 | 1167 |
1169 // The current selection state for an object. For blocks, the state refers
to the state of the leaf | 1168 // The current selection state for an object. For blocks, the state refers
to the state of the leaf |
1170 // descendants (as described above in the SelectionState enum declaration). | 1169 // descendants (as described above in the SelectionState enum declaration). |
1171 SelectionState getSelectionState() const { return m_bitfields.getSelectionSt
ate(); } | 1170 SelectionState getSelectionState() const { return m_bitfields.getSelectionSt
ate(); } |
1172 virtual void setSelectionState(SelectionState state) { m_bitfields.setSelect
ionState(state); } | 1171 virtual void setSelectionState(SelectionState state) { m_bitfields.setSelect
ionState(state); } |
1173 inline void setSelectionStateIfNeeded(SelectionState); | 1172 inline void setSelectionStateIfNeeded(SelectionState); |
1174 bool canUpdateSelectionOnRootLineBoxes() const; | 1173 bool canUpdateSelectionOnRootLineBoxes() const; |
1175 | 1174 |
1176 // A single rectangle that encompasses all of the selected objects within th
is object. Used to determine the tightest | 1175 // A single rectangle that encompasses all of the selected objects within th
is object. Used to determine the tightest |
1177 // possible bounding box for the selection. The rect returned is in the coor
dinate space of the paint invalidation container's backing. | 1176 // possible bounding box for the selection. The rect returned is in the obje
ct's local coordinate space. |
1178 virtual LayoutRect selectionRectForPaintInvalidation(const LayoutBoxModelObj
ect* /* paintInvalidationContainer */) const { return LayoutRect(); } | 1177 virtual LayoutRect localSelectionRect() const { return LayoutRect(); } |
1179 | 1178 |
1180 // View coordinates means the coordinate space of |view()|. | 1179 // View coordinates means the coordinate space of |view()|. |
1181 LayoutRect selectionRectInViewCoordinates() const; | 1180 LayoutRect selectionRectInViewCoordinates() const; |
1182 | 1181 |
1183 virtual bool canBeSelectionLeaf() const { return false; } | 1182 virtual bool canBeSelectionLeaf() const { return false; } |
1184 bool hasSelectedChildren() const { return getSelectionState() != SelectionNo
ne; } | 1183 bool hasSelectedChildren() const { return getSelectionState() != SelectionNo
ne; } |
1185 | 1184 |
1186 bool isSelectable() const; | 1185 bool isSelectable() const; |
1187 // Obtains the selection colors that should be used when painting a selectio
n. | 1186 // Obtains the selection colors that should be used when painting a selectio
n. |
1188 Color selectionBackgroundColor() const; | 1187 Color selectionBackgroundColor() const; |
(...skipping 980 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2169 void showTree(const blink::LayoutObject*); | 2168 void showTree(const blink::LayoutObject*); |
2170 void showLineTree(const blink::LayoutObject*); | 2169 void showLineTree(const blink::LayoutObject*); |
2171 void showLayoutTree(const blink::LayoutObject* object1); | 2170 void showLayoutTree(const blink::LayoutObject* object1); |
2172 // We don't make object2 an optional parameter so that showLayoutTree | 2171 // We don't make object2 an optional parameter so that showLayoutTree |
2173 // can be called from gdb easily. | 2172 // can be called from gdb easily. |
2174 void showLayoutTree(const blink::LayoutObject* object1, const blink::LayoutObjec
t* object2); | 2173 void showLayoutTree(const blink::LayoutObject* object1, const blink::LayoutObjec
t* object2); |
2175 | 2174 |
2176 #endif | 2175 #endif |
2177 | 2176 |
2178 #endif // LayoutObject_h | 2177 #endif // LayoutObject_h |
OLD | NEW |