| 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 Apple Inc. All rights
reserved. | 6 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights
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 29 matching lines...) Expand all Loading... |
| 40 class RenderInline; | 40 class RenderInline; |
| 41 class RenderLayerModelObject; | 41 class RenderLayerModelObject; |
| 42 class RenderObject; | 42 class RenderObject; |
| 43 | 43 |
| 44 /* | 44 /* |
| 45 * Paint the object and its children, clipped by (x|y|w|h). | 45 * Paint the object and its children, clipped by (x|y|w|h). |
| 46 * (tx|ty) is the calculated position of the parent | 46 * (tx|ty) is the calculated position of the parent |
| 47 */ | 47 */ |
| 48 struct PaintInfo { | 48 struct PaintInfo { |
| 49 PaintInfo(GraphicsContext* newContext, const IntRect& newRect, PaintPhase ne
wPhase, | 49 PaintInfo(GraphicsContext* newContext, const IntRect& newRect, PaintPhase ne
wPhase, |
| 50 RenderObject* newPaintingRoot = 0, ListHashSet<RenderInline*>* newOutlin
eObjects = 0, | 50 RenderObject* newPaintingRoot = 0, const RenderLayerModelObject* newPain
tContainer = 0) |
| 51 const RenderLayerModelObject* newPaintContainer = 0) | |
| 52 : context(newContext) | 51 : context(newContext) |
| 53 , rect(newRect) | 52 , rect(newRect) |
| 54 , phase(newPhase) | 53 , phase(newPhase) |
| 55 , paintingRoot(newPaintingRoot) | 54 , paintingRoot(newPaintingRoot) |
| 56 , m_paintContainer(newPaintContainer) | 55 , m_paintContainer(newPaintContainer) |
| 57 , m_outlineObjects(newOutlineObjects) | |
| 58 { | 56 { |
| 59 } | 57 } |
| 60 | 58 |
| 61 void updatePaintingRootForChildren(const RenderObject* renderer) | 59 void updatePaintingRootForChildren(const RenderObject* renderer) |
| 62 { | 60 { |
| 63 if (!paintingRoot) | 61 if (!paintingRoot) |
| 64 return; | 62 return; |
| 65 | 63 |
| 66 // If we're the painting root, kids draw normally, and see root of 0. | 64 // If we're the painting root, kids draw normally, and see root of 0. |
| 67 if (paintingRoot == renderer) { | 65 if (paintingRoot == renderer) { |
| (...skipping 19 matching lines...) Expand all Loading... |
| 87 | 85 |
| 88 if (localToAncestorTransform.isInvertible()) | 86 if (localToAncestorTransform.isInvertible()) |
| 89 rect = localToAncestorTransform.inverse().mapRect(rect); | 87 rect = localToAncestorTransform.inverse().mapRect(rect); |
| 90 else | 88 else |
| 91 rect.setSize(IntSize(0, 0)); | 89 rect.setSize(IntSize(0, 0)); |
| 92 } | 90 } |
| 93 | 91 |
| 94 static IntRect infiniteRect() { return IntRect(LayoutRect::infiniteRect());
} | 92 static IntRect infiniteRect() { return IntRect(LayoutRect::infiniteRect());
} |
| 95 const RenderLayerModelObject* paintContainer() const { return m_paintContain
er; } | 93 const RenderLayerModelObject* paintContainer() const { return m_paintContain
er; } |
| 96 | 94 |
| 97 ListHashSet<RenderInline*>* outlineObjects() { return m_outlineObjects; } | |
| 98 void setOutlineObjects(ListHashSet<RenderInline*>* objects) { m_outlineObjec
ts = objects; } | |
| 99 | |
| 100 // FIXME: Introduce setters/getters at some point. Requires a lot of changes
throughout rendering/. | 95 // FIXME: Introduce setters/getters at some point. Requires a lot of changes
throughout rendering/. |
| 101 GraphicsContext* context; | 96 GraphicsContext* context; |
| 102 IntRect rect; | 97 IntRect rect; |
| 103 PaintPhase phase; | 98 PaintPhase phase; |
| 104 RenderObject* paintingRoot; // used to draw just one element and its visual
kids | 99 RenderObject* paintingRoot; // used to draw just one element and its visual
kids |
| 105 | 100 |
| 106 private: | 101 private: |
| 107 const RenderLayerModelObject* m_paintContainer; // the layer object that ori
ginates the current painting | 102 const RenderLayerModelObject* m_paintContainer; // the layer object that ori
ginates the current painting |
| 108 ListHashSet<RenderInline*>* m_outlineObjects; // used to list outlines that
should be painted by a block with inline children | |
| 109 }; | 103 }; |
| 110 | 104 |
| 111 } // namespace blink | 105 } // namespace blink |
| 112 | 106 |
| 113 #endif // SKY_ENGINE_CORE_RENDERING_PAINTINFO_H_ | 107 #endif // SKY_ENGINE_CORE_RENDERING_PAINTINFO_H_ |
| OLD | NEW |