OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "core/layout/PaintInvalidationState.h" | 5 #include "core/layout/PaintInvalidationState.h" |
6 | 6 |
7 #include "core/frame/FrameView.h" | 7 #include "core/frame/FrameView.h" |
8 #include "core/frame/Settings.h" | 8 #include "core/frame/Settings.h" |
9 #include "core/layout/LayoutInline.h" | 9 #include "core/layout/LayoutInline.h" |
10 #include "core/layout/LayoutPart.h" | 10 #include "core/layout/LayoutPart.h" |
(...skipping 17 matching lines...) Expand all Loading... |
28 if (LayoutObject* container = object.container()) | 28 if (LayoutObject* container = object.container()) |
29 return container->isAnonymousBlock() && container->styleRef().position()
== RelativePosition; | 29 return container->isAnonymousBlock() && container->styleRef().position()
== RelativePosition; |
30 return false; | 30 return false; |
31 } | 31 } |
32 | 32 |
33 static bool supportsCachedOffsets(const LayoutObject& object) | 33 static bool supportsCachedOffsets(const LayoutObject& object) |
34 { | 34 { |
35 // TODO(wangxianzhu): Move some conditions to fast path if possible. | 35 // TODO(wangxianzhu): Move some conditions to fast path if possible. |
36 return !object.hasTransformRelatedProperty() | 36 return !object.hasTransformRelatedProperty() |
37 && !object.hasReflection() | 37 && !object.hasReflection() |
38 && !object.hasFilter() | 38 && !object.hasFilterInducingProperty() |
39 && !object.isLayoutFlowThread() | 39 && !object.isLayoutFlowThread() |
40 && !object.isLayoutMultiColumnSpannerPlaceholder() | 40 && !object.isLayoutMultiColumnSpannerPlaceholder() |
41 && object.styleRef().position() != FixedPosition | 41 && object.styleRef().position() != FixedPosition |
42 && !object.styleRef().isFlippedBlocksWritingMode() | 42 && !object.styleRef().isFlippedBlocksWritingMode() |
43 // TODO(crbug.com/598094): Handle this in fast path. | 43 // TODO(crbug.com/598094): Handle this in fast path. |
44 && !isAbsolutePositionUnderRelativePositionInline(object); | 44 && !isAbsolutePositionUnderRelativePositionInline(object); |
45 } | 45 } |
46 | 46 |
47 PaintInvalidationState::PaintInvalidationState(const LayoutView& layoutView, Vec
tor<LayoutObject*>& pendingDelayedPaintInvalidations) | 47 PaintInvalidationState::PaintInvalidationState(const LayoutView& layoutView, Vec
tor<LayoutObject*>& pendingDelayedPaintInvalidations) |
48 : m_currentObject(layoutView) | 48 : m_currentObject(layoutView) |
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
346 | 346 |
347 PaintLayer& PaintInvalidationState::enclosingSelfPaintingLayer(const LayoutObjec
t& layoutObject) const | 347 PaintLayer& PaintInvalidationState::enclosingSelfPaintingLayer(const LayoutObjec
t& layoutObject) const |
348 { | 348 { |
349 if (layoutObject.hasLayer() && toLayoutBoxModelObject(layoutObject).hasSelfP
aintingLayer()) | 349 if (layoutObject.hasLayer() && toLayoutBoxModelObject(layoutObject).hasSelfP
aintingLayer()) |
350 return *toLayoutBoxModelObject(layoutObject).layer(); | 350 return *toLayoutBoxModelObject(layoutObject).layer(); |
351 | 351 |
352 return m_enclosingSelfPaintingLayer; | 352 return m_enclosingSelfPaintingLayer; |
353 } | 353 } |
354 | 354 |
355 } // namespace blink | 355 } // namespace blink |
OLD | NEW |