Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1303)

Side by Side Diff: Source/WebCore/rendering/PaintInfo.h

Issue 12616003: Merge 144350 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1410/
Patch Set: Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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;
45 class RenderObject; 46 class RenderObject;
46 class RenderRegion; 47 class RenderRegion;
47 48
48 typedef HashMap<OverlapTestRequestClient*, IntRect> OverlapTestRequestMap; 49 typedef HashMap<OverlapTestRequestClient*, IntRect> OverlapTestRequestMap;
49 50
50 /* 51 /*
51 * Paint the object and its children, clipped by (x|y|w|h). 52 * Paint the object and its children, clipped by (x|y|w|h).
52 * (tx|ty) is the calculated position of the parent 53 * (tx|ty) is the calculated position of the parent
53 */ 54 */
54 struct PaintInfo { 55 struct PaintInfo {
55 PaintInfo(GraphicsContext* newContext, const IntRect& newRect, PaintPhase ne wPhase, PaintBehavior newPaintBehavior, 56 PaintInfo(GraphicsContext* newContext, const IntRect& newRect, PaintPhase ne wPhase, PaintBehavior newPaintBehavior,
56 RenderObject* newPaintingRoot = 0, RenderRegion* region = 0, ListH ashSet<RenderInline*>* newOutlineObjects = 0, 57 RenderObject* newPaintingRoot = 0, RenderRegion* region = 0, ListHashSet <RenderInline*>* newOutlineObjects = 0,
57 OverlapTestRequestMap* overlapTestRequests = 0) 58 OverlapTestRequestMap* overlapTestRequests = 0, const RenderLayerModelOb ject* newPaintContainer = 0)
58 : context(newContext) 59 : context(newContext)
59 , rect(newRect) 60 , rect(newRect)
60 , phase(newPhase) 61 , phase(newPhase)
61 , paintBehavior(newPaintBehavior) 62 , paintBehavior(newPaintBehavior)
62 , paintingRoot(newPaintingRoot) 63 , paintingRoot(newPaintingRoot)
63 , renderRegion(region) 64 , renderRegion(region)
64 , outlineObjects(newOutlineObjects) 65 , outlineObjects(newOutlineObjects)
65 , overlapTestRequests(overlapTestRequests) 66 , overlapTestRequests(overlapTestRequests)
67 , paintContainer(newPaintContainer)
66 { 68 {
67 } 69 }
68 70
69 void updatePaintingRootForChildren(const RenderObject* renderer) 71 void updatePaintingRootForChildren(const RenderObject* renderer)
70 { 72 {
71 if (!paintingRoot) 73 if (!paintingRoot)
72 return; 74 return;
73 75
74 // If we're the painting root, kids draw normally, and see root of 0. 76 // If we're the painting root, kids draw normally, and see root of 0.
75 if (paintingRoot == renderer) { 77 if (paintingRoot == renderer) {
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 109
108 // FIXME: Introduce setters/getters at some point. Requires a lot of changes throughout rendering/. 110 // FIXME: Introduce setters/getters at some point. Requires a lot of changes throughout rendering/.
109 GraphicsContext* context; 111 GraphicsContext* context;
110 IntRect rect; 112 IntRect rect;
111 PaintPhase phase; 113 PaintPhase phase;
112 PaintBehavior paintBehavior; 114 PaintBehavior paintBehavior;
113 RenderObject* paintingRoot; // used to draw just one element and its visual kids 115 RenderObject* paintingRoot; // used to draw just one element and its visual kids
114 RenderRegion* renderRegion; 116 RenderRegion* renderRegion;
115 ListHashSet<RenderInline*>* outlineObjects; // used to list outlines that sh ould be painted by a block with inline children 117 ListHashSet<RenderInline*>* outlineObjects; // used to list outlines that sh ould be painted by a block with inline children
116 OverlapTestRequestMap* overlapTestRequests; 118 OverlapTestRequestMap* overlapTestRequests;
119 const RenderLayerModelObject* paintContainer; // the layer object that origi nates the current painting
117 }; 120 };
118 121
119 } // namespace WebCore 122 } // namespace WebCore
120 123
121 #endif // PaintInfo_h 124 #endif // PaintInfo_h
OLDNEW
« no previous file with comments | « LayoutTests/compositing/sub-layer-focus-ring-expected.html ('k') | Source/WebCore/rendering/RenderBlock.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698