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, 2009 Apple Inc. All rights reserved. | 4 * Copyright (C) 2003, 2006, 2007, 2009 Apple Inc. All rights reserved. |
5 * Copyright (C) 2010, 2012 Google Inc. All rights reserved. | 5 * Copyright (C) 2010, 2012 Google Inc. All rights reserved. |
6 * | 6 * |
7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
(...skipping 27 matching lines...) Expand all Loading... |
38 }; | 38 }; |
39 | 39 |
40 class RenderLayerModelObject : public RenderObject { | 40 class RenderLayerModelObject : public RenderObject { |
41 public: | 41 public: |
42 explicit RenderLayerModelObject(ContainerNode*); | 42 explicit RenderLayerModelObject(ContainerNode*); |
43 virtual ~RenderLayerModelObject(); | 43 virtual ~RenderLayerModelObject(); |
44 | 44 |
45 // This is the only way layers should ever be destroyed. | 45 // This is the only way layers should ever be destroyed. |
46 void destroyLayer(); | 46 void destroyLayer(); |
47 | 47 |
| 48 void collectSelfPaintingLayers(Vector<RenderBox*>& layers); |
48 bool hasSelfPaintingLayer() const; | 49 bool hasSelfPaintingLayer() const; |
49 RenderLayer* layer() const { return m_layer.get(); } | 50 RenderLayer* layer() const { return m_layer.get(); } |
50 | 51 |
51 virtual void styleWillChange(StyleDifference, const RenderStyle& newStyle) o
verride; | 52 virtual void styleWillChange(StyleDifference, const RenderStyle& newStyle) o
verride; |
52 virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle) ov
erride; | 53 virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle) ov
erride; |
53 virtual void updateFromStyle() { } | 54 virtual void updateFromStyle() { } |
54 | 55 |
55 virtual LayerType layerTypeRequired() const = 0; | 56 virtual LayerType layerTypeRequired() const = 0; |
56 | 57 |
57 // This is null for anonymous renderers. | 58 // This is null for anonymous renderers. |
58 ContainerNode* node() const { return toContainerNode(RenderObject::node());
} | 59 ContainerNode* node() const { return toContainerNode(RenderObject::node());
} |
59 protected: | 60 protected: |
60 void createLayer(LayerType); | 61 void createLayer(LayerType); |
61 | 62 |
62 virtual void willBeDestroyed() override; | 63 virtual void willBeDestroyed() override; |
63 private: | 64 private: |
64 virtual bool isLayerModelObject() const override final { return true; } | 65 virtual bool isLayerModelObject() const override final { return true; } |
65 | 66 |
66 OwnPtr<RenderLayer> m_layer; | 67 OwnPtr<RenderLayer> m_layer; |
67 | 68 |
68 // Used to store state between styleWillChange and styleDidChange | 69 // Used to store state between styleWillChange and styleDidChange |
69 static bool s_wasFloating; | 70 static bool s_wasFloating; |
70 }; | 71 }; |
71 | 72 |
72 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderLayerModelObject, isLayerModelObject()); | 73 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderLayerModelObject, isLayerModelObject()); |
73 | 74 |
74 } // namespace blink | 75 } // namespace blink |
75 | 76 |
76 #endif // SKY_ENGINE_CORE_RENDERING_RENDERLAYERMODELOBJECT_H_ | 77 #endif // SKY_ENGINE_CORE_RENDERING_RENDERLAYERMODELOBJECT_H_ |
OLD | NEW |