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 * (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) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. |
7 * All rights reserved. | 7 * All rights reserved. |
8 * Copyright (C) 2009 Google Inc. All rights reserved. | 8 * Copyright (C) 2009 Google Inc. All rights reserved. |
9 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. | 9 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. |
10 * (http://www.torchmobile.com/) | 10 * (http://www.torchmobile.com/) |
(...skipping 1116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1127 return IntSize(); | 1127 return IntSize(); |
1128 } | 1128 } |
1129 | 1129 |
1130 LayoutRect LayoutObject::InvalidatePaintRectangle( | 1130 LayoutRect LayoutObject::InvalidatePaintRectangle( |
1131 const LayoutRect& dirty_rect, | 1131 const LayoutRect& dirty_rect, |
1132 DisplayItemClient* display_item_client) const { | 1132 DisplayItemClient* display_item_client) const { |
1133 return ObjectPaintInvalidator(*this).InvalidatePaintRectangle( | 1133 return ObjectPaintInvalidator(*this).InvalidatePaintRectangle( |
1134 dirty_rect, display_item_client); | 1134 dirty_rect, display_item_client); |
1135 } | 1135 } |
1136 | 1136 |
1137 void LayoutObject::InvalidateTreeIfNeeded( | 1137 void LayoutObject::DeprecatedInvalidateTree( |
1138 const PaintInvalidationState& paint_invalidation_state) { | 1138 const PaintInvalidationState& paint_invalidation_state) { |
1139 DCHECK(!RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled()); | 1139 DCHECK(!RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled()); |
1140 EnsureIsReadyForPaintInvalidation(); | 1140 EnsureIsReadyForPaintInvalidation(); |
1141 | 1141 |
1142 // If we didn't need paint invalidation then our children don't need as well. | 1142 // If we didn't need paint invalidation then our children don't need as well. |
1143 // Skip walking down the tree as everything should be fine below us. | 1143 // Skip walking down the tree as everything should be fine below us. |
1144 if (!ShouldCheckForPaintInvalidationWithPaintInvalidationState( | 1144 if (!ShouldCheckForPaintInvalidationWithPaintInvalidationState( |
1145 paint_invalidation_state)) | 1145 paint_invalidation_state)) |
1146 return; | 1146 return; |
1147 | 1147 |
1148 PaintInvalidationState new_paint_invalidation_state(paint_invalidation_state, | 1148 PaintInvalidationState new_paint_invalidation_state(paint_invalidation_state, |
1149 *this); | 1149 *this); |
1150 | 1150 |
1151 if (MayNeedPaintInvalidationSubtree()) { | 1151 if (MayNeedPaintInvalidationSubtree()) { |
1152 new_paint_invalidation_state | 1152 new_paint_invalidation_state |
1153 .SetForceSubtreeInvalidationCheckingWithinContainer(); | 1153 .SetForceSubtreeInvalidationCheckingWithinContainer(); |
1154 } | 1154 } |
1155 | 1155 |
1156 PaintInvalidationReason reason = | 1156 PaintInvalidationReason reason = |
1157 InvalidatePaint(new_paint_invalidation_state); | 1157 DeprecatedInvalidatePaint(new_paint_invalidation_state); |
1158 new_paint_invalidation_state.UpdateForChildren(reason); | 1158 new_paint_invalidation_state.UpdateForChildren(reason); |
1159 InvalidatePaintOfSubtreesIfNeeded(new_paint_invalidation_state); | 1159 DeprecatedInvalidatePaintOfSubtrees(new_paint_invalidation_state); |
1160 | 1160 |
1161 ClearPaintInvalidationFlags(); | 1161 ClearPaintInvalidationFlags(); |
1162 } | 1162 } |
1163 | 1163 |
1164 DISABLE_CFI_PERF | 1164 DISABLE_CFI_PERF |
1165 void LayoutObject::InvalidatePaintOfSubtreesIfNeeded( | 1165 void LayoutObject::DeprecatedInvalidatePaintOfSubtrees( |
1166 const PaintInvalidationState& child_paint_invalidation_state) { | 1166 const PaintInvalidationState& child_paint_invalidation_state) { |
1167 DCHECK(!RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled()); | 1167 DCHECK(!RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled()); |
1168 | 1168 |
1169 for (auto* child = SlowFirstChild(); child; child = child->NextSibling()) | 1169 for (auto* child = SlowFirstChild(); child; child = child->NextSibling()) |
1170 child->InvalidateTreeIfNeeded(child_paint_invalidation_state); | 1170 child->DeprecatedInvalidateTree(child_paint_invalidation_state); |
1171 } | 1171 } |
1172 | 1172 |
1173 LayoutRect LayoutObject::SelectionRectInViewCoordinates() const { | 1173 LayoutRect LayoutObject::SelectionRectInViewCoordinates() const { |
1174 LayoutRect selection_rect = LocalSelectionRect(); | 1174 LayoutRect selection_rect = LocalSelectionRect(); |
1175 if (!selection_rect.IsEmpty()) | 1175 if (!selection_rect.IsEmpty()) |
1176 MapToVisualRectInAncestorSpace(View(), selection_rect); | 1176 MapToVisualRectInAncestorSpace(View(), selection_rect); |
1177 return selection_rect; | 1177 return selection_rect; |
1178 } | 1178 } |
1179 | 1179 |
1180 PaintInvalidationReason LayoutObject::InvalidatePaint( | 1180 PaintInvalidationReason LayoutObject::DeprecatedInvalidatePaint( |
1181 const PaintInvalidationState& paint_invalidation_state) { | 1181 const PaintInvalidationState& paint_invalidation_state) { |
1182 DCHECK_EQ(&paint_invalidation_state.CurrentObject(), this); | 1182 DCHECK_EQ(&paint_invalidation_state.CurrentObject(), this); |
1183 | 1183 |
1184 if (StyleRef().HasOutline()) { | 1184 if (StyleRef().HasOutline()) { |
1185 PaintLayer& layer = paint_invalidation_state.PaintingLayer(); | 1185 PaintLayer& layer = paint_invalidation_state.PaintingLayer(); |
1186 if (&layer.GetLayoutObject() != this) | 1186 if (&layer.GetLayoutObject() != this) |
1187 layer.SetNeedsPaintPhaseDescendantOutlines(); | 1187 layer.SetNeedsPaintPhaseDescendantOutlines(); |
1188 } | 1188 } |
1189 | 1189 |
1190 LayoutView* v = View(); | 1190 LayoutView* v = View(); |
(...skipping 2444 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3635 const blink::LayoutObject* root = object1; | 3635 const blink::LayoutObject* root = object1; |
3636 while (root->Parent()) | 3636 while (root->Parent()) |
3637 root = root->Parent(); | 3637 root = root->Parent(); |
3638 root->ShowLayoutTreeAndMark(object1, "*", object2, "-", 0); | 3638 root->ShowLayoutTreeAndMark(object1, "*", object2, "-", 0); |
3639 } else { | 3639 } else { |
3640 WTFLogAlways("%s", "Cannot showLayoutTree. Root is (nil)"); | 3640 WTFLogAlways("%s", "Cannot showLayoutTree. Root is (nil)"); |
3641 } | 3641 } |
3642 } | 3642 } |
3643 | 3643 |
3644 #endif | 3644 #endif |
OLD | NEW |