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

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

Issue 21430003: Implement interfaces in PaintInfo and make it a class. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@getterPaintInfo01
Patch Set: Step 01: PaintContainer. Created 7 years, 4 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
« no previous file with comments | « no previous file | Source/core/rendering/RenderObject.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 RenderObject* newPaintingRoot = 0, RenderRegion* region = 0, ListHashSet <RenderInline*>* newOutlineObjects = 0, 54 RenderObject* newPaintingRoot = 0, RenderRegion* region = 0, ListHashSet <RenderInline*>* newOutlineObjects = 0,
55 OverlapTestRequestMap* overlapTestRequests = 0, const RenderLayerModelOb ject* newPaintContainer = 0) 55 OverlapTestRequestMap* overlapTestRequests = 0, const RenderLayerModelOb ject* newPaintContainer = 0)
56 : context(newContext) 56 : context(newContext)
57 , rect(newRect) 57 , rect(newRect)
58 , phase(newPhase) 58 , phase(newPhase)
59 , paintBehavior(newPaintBehavior) 59 , paintBehavior(newPaintBehavior)
60 , paintingRoot(newPaintingRoot) 60 , paintingRoot(newPaintingRoot)
61 , renderRegion(region) 61 , renderRegion(region)
62 , outlineObjects(newOutlineObjects) 62 , outlineObjects(newOutlineObjects)
63 , overlapTestRequests(overlapTestRequests) 63 , overlapTestRequests(overlapTestRequests)
64 , paintContainer(newPaintContainer) 64 , m_paintContainer(newPaintContainer)
65 { 65 {
66 } 66 }
67 67
68 void updatePaintingRootForChildren(const RenderObject* renderer) 68 void updatePaintingRootForChildren(const RenderObject* renderer)
69 { 69 {
70 if (!paintingRoot) 70 if (!paintingRoot)
71 return; 71 return;
72 72
73 // If we're the painting root, kids draw normally, and see root of 0. 73 // If we're the painting root, kids draw normally, and see root of 0.
74 if (paintingRoot == renderer) { 74 if (paintingRoot == renderer) {
(...skipping 19 matching lines...) Expand all
94 94
95 context->concatCTM(localToAncestorTransform); 95 context->concatCTM(localToAncestorTransform);
96 96
97 if (rect == infiniteRect()) 97 if (rect == infiniteRect())
98 return; 98 return;
99 99
100 rect = localToAncestorTransform.inverse().mapRect(rect); 100 rect = localToAncestorTransform.inverse().mapRect(rect);
101 } 101 }
102 102
103 static IntRect infiniteRect() { return IntRect(LayoutRect::infiniteRect()); } 103 static IntRect infiniteRect() { return IntRect(LayoutRect::infiniteRect()); }
104 const RenderLayerModelObject* paintContainer() const { return m_paintContain er; }
104 105
105 // FIXME: Introduce setters/getters at some point. Requires a lot of changes throughout rendering/. 106 // FIXME: Introduce setters/getters at some point. Requires a lot of changes throughout rendering/.
106 GraphicsContext* context; 107 GraphicsContext* context;
107 IntRect rect; 108 IntRect rect;
108 PaintPhase phase; 109 PaintPhase phase;
109 PaintBehavior paintBehavior; 110 PaintBehavior paintBehavior;
110 RenderObject* paintingRoot; // used to draw just one element and its visual kids 111 RenderObject* paintingRoot; // used to draw just one element and its visual kids
111 RenderRegion* renderRegion; 112 RenderRegion* renderRegion;
112 ListHashSet<RenderInline*>* outlineObjects; // used to list outlines that sh ould be painted by a block with inline children 113 ListHashSet<RenderInline*>* outlineObjects; // used to list outlines that sh ould be painted by a block with inline children
113 OverlapTestRequestMap* overlapTestRequests; 114 OverlapTestRequestMap* overlapTestRequests;
114 const RenderLayerModelObject* paintContainer; // the layer object that origi nates the current painting 115
116 private:
117
118 const RenderLayerModelObject* m_paintContainer; // the layer object that ori ginates the current painting
115 }; 119 };
116 120
117 } // namespace WebCore 121 } // namespace WebCore
118 122
119 #endif // PaintInfo_h 123 #endif // PaintInfo_h
OLDNEW
« no previous file with comments | « no previous file | Source/core/rendering/RenderObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698