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 24 matching lines...) Expand all Loading... |
35 #include "LayoutRect.h" | 35 #include "LayoutRect.h" |
36 #include "PaintPhase.h" | 36 #include "PaintPhase.h" |
37 #include <limits> | 37 #include <limits> |
38 #include <wtf/HashMap.h> | 38 #include <wtf/HashMap.h> |
39 #include <wtf/ListHashSet.h> | 39 #include <wtf/ListHashSet.h> |
40 | 40 |
41 namespace WebCore { | 41 namespace WebCore { |
42 | 42 |
43 class OverlapTestRequestClient; | 43 class OverlapTestRequestClient; |
44 class RenderInline; | 44 class RenderInline; |
45 class RenderLayerModelObject; | |
46 class RenderObject; | 45 class RenderObject; |
47 class RenderRegion; | 46 class RenderRegion; |
48 | 47 |
49 typedef HashMap<OverlapTestRequestClient*, IntRect> OverlapTestRequestMap; | 48 typedef HashMap<OverlapTestRequestClient*, IntRect> OverlapTestRequestMap; |
50 | 49 |
51 /* | 50 /* |
52 * Paint the object and its children, clipped by (x|y|w|h). | 51 * Paint the object and its children, clipped by (x|y|w|h). |
53 * (tx|ty) is the calculated position of the parent | 52 * (tx|ty) is the calculated position of the parent |
54 */ | 53 */ |
55 struct PaintInfo { | 54 struct PaintInfo { |
56 PaintInfo(GraphicsContext* newContext, const IntRect& newRect, PaintPhase ne
wPhase, PaintBehavior newPaintBehavior, | 55 PaintInfo(GraphicsContext* newContext, const IntRect& newRect, PaintPhase ne
wPhase, PaintBehavior newPaintBehavior, |
57 RenderObject* newPaintingRoot = 0, RenderRegion* region = 0, ListHashSet
<RenderInline*>* newOutlineObjects = 0, | 56 RenderObject* newPaintingRoot = 0, RenderRegion* region = 0, ListH
ashSet<RenderInline*>* newOutlineObjects = 0, |
58 OverlapTestRequestMap* overlapTestRequests = 0, const RenderLayerModelOb
ject* newPaintContainer = 0) | 57 OverlapTestRequestMap* overlapTestRequests = 0) |
59 : context(newContext) | 58 : context(newContext) |
60 , rect(newRect) | 59 , rect(newRect) |
61 , phase(newPhase) | 60 , phase(newPhase) |
62 , paintBehavior(newPaintBehavior) | 61 , paintBehavior(newPaintBehavior) |
63 , paintingRoot(newPaintingRoot) | 62 , paintingRoot(newPaintingRoot) |
64 , renderRegion(region) | 63 , renderRegion(region) |
65 , outlineObjects(newOutlineObjects) | 64 , outlineObjects(newOutlineObjects) |
66 , overlapTestRequests(overlapTestRequests) | 65 , overlapTestRequests(overlapTestRequests) |
67 , paintContainer(newPaintContainer) | |
68 { | 66 { |
69 } | 67 } |
70 | 68 |
71 void updatePaintingRootForChildren(const RenderObject* renderer) | 69 void updatePaintingRootForChildren(const RenderObject* renderer) |
72 { | 70 { |
73 if (!paintingRoot) | 71 if (!paintingRoot) |
74 return; | 72 return; |
75 | 73 |
76 // If we're the painting root, kids draw normally, and see root of 0. | 74 // If we're the painting root, kids draw normally, and see root of 0. |
77 if (paintingRoot == renderer) { | 75 if (paintingRoot == renderer) { |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 | 107 |
110 // FIXME: Introduce setters/getters at some point. Requires a lot of changes
throughout rendering/. | 108 // FIXME: Introduce setters/getters at some point. Requires a lot of changes
throughout rendering/. |
111 GraphicsContext* context; | 109 GraphicsContext* context; |
112 IntRect rect; | 110 IntRect rect; |
113 PaintPhase phase; | 111 PaintPhase phase; |
114 PaintBehavior paintBehavior; | 112 PaintBehavior paintBehavior; |
115 RenderObject* paintingRoot; // used to draw just one element and its visual
kids | 113 RenderObject* paintingRoot; // used to draw just one element and its visual
kids |
116 RenderRegion* renderRegion; | 114 RenderRegion* renderRegion; |
117 ListHashSet<RenderInline*>* outlineObjects; // used to list outlines that sh
ould be painted by a block with inline children | 115 ListHashSet<RenderInline*>* outlineObjects; // used to list outlines that sh
ould be painted by a block with inline children |
118 OverlapTestRequestMap* overlapTestRequests; | 116 OverlapTestRequestMap* overlapTestRequests; |
119 const RenderLayerModelObject* paintContainer; // the layer object that origi
nates the current painting | |
120 }; | 117 }; |
121 | 118 |
122 } // namespace WebCore | 119 } // namespace WebCore |
123 | 120 |
124 #endif // PaintInfo_h | 121 #endif // PaintInfo_h |
OLD | NEW |