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

Side by Side Diff: Source/core/rendering/RenderEmbeddedObject.cpp

Issue 21430003: Implement interfaces in PaintInfo and make it a class. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@getterPaintInfo01
Patch Set: Fixed Linux compilation (hopefuly Windows too), addressing some reviewer's suggestions. 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 2000 Simon Hausmann <hausmann@kde.org> 3 * (C) 2000 Simon Hausmann <hausmann@kde.org>
4 * (C) 2000 Stefan Schimanski (1Stein@gmx.de) 4 * (C) 2000 Stefan Schimanski (1Stein@gmx.de)
5 * Copyright (C) 2004, 2005, 2006, 2008, 2009, 2010 Apple Inc. All rights reserv ed. 5 * Copyright (C) 2004, 2005, 2006, 2008, 2009, 2010 Apple Inc. All rights reserv ed.
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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 RenderPart::paintContents(paintInfo, paintOffset); 120 RenderPart::paintContents(paintInfo, paintOffset);
121 } 121 }
122 122
123 void RenderEmbeddedObject::paint(PaintInfo& paintInfo, const LayoutPoint& paintO ffset) 123 void RenderEmbeddedObject::paint(PaintInfo& paintInfo, const LayoutPoint& paintO ffset)
124 { 124 {
125 Page* page = 0; 125 Page* page = 0;
126 if (Frame* frame = this->frame()) 126 if (Frame* frame = this->frame())
127 page = frame->page(); 127 page = frame->page();
128 128
129 if (showsUnavailablePluginIndicator()) { 129 if (showsUnavailablePluginIndicator()) {
130 if (page && paintInfo.phase == PaintPhaseForeground) 130 if (page && paintInfo.getPhase() == PaintPhaseForeground)
131 page->addRelevantUnpaintedObject(this, visualOverflowRect()); 131 page->addRelevantUnpaintedObject(this, visualOverflowRect());
132 RenderReplaced::paint(paintInfo, paintOffset); 132 RenderReplaced::paint(paintInfo, paintOffset);
133 return; 133 return;
134 } 134 }
135 135
136 if (page && paintInfo.phase == PaintPhaseForeground) 136 if (page && paintInfo.getPhase() == PaintPhaseForeground)
137 page->addRelevantRepaintedObject(this, visualOverflowRect()); 137 page->addRelevantRepaintedObject(this, visualOverflowRect());
138 138
139 RenderPart::paint(paintInfo, paintOffset); 139 RenderPart::paint(paintInfo, paintOffset);
140 } 140 }
141 141
142 void RenderEmbeddedObject::paintReplaced(PaintInfo& paintInfo, const LayoutPoint & paintOffset) 142 void RenderEmbeddedObject::paintReplaced(PaintInfo& paintInfo, const LayoutPoint & paintOffset)
143 { 143 {
144 if (!showsUnavailablePluginIndicator()) 144 if (!showsUnavailablePluginIndicator())
145 return; 145 return;
146 146
147 if (paintInfo.phase == PaintPhaseSelection) 147 if (paintInfo.getPhase() == PaintPhaseSelection)
148 return; 148 return;
149 149
150 GraphicsContext* context = paintInfo.context; 150 GraphicsContext* context = paintInfo.getContext();
151 if (context->paintingDisabled()) 151 if (context->paintingDisabled())
152 return; 152 return;
153 153
154 FloatRect contentRect; 154 FloatRect contentRect;
155 Path path; 155 Path path;
156 FloatRect replacementTextRect; 156 FloatRect replacementTextRect;
157 Font font; 157 Font font;
158 TextRun run(""); 158 TextRun run("");
159 float textWidth; 159 float textWidth;
160 if (!getReplacementTextGeometry(paintOffset, contentRect, path, replacementT extRect, font, run, textWidth)) 160 if (!getReplacementTextGeometry(paintOffset, contentRect, path, replacementT extRect, font, run, textWidth))
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 { 287 {
288 return false; 288 return false;
289 } 289 }
290 290
291 bool RenderEmbeddedObject::canHaveChildren() const 291 bool RenderEmbeddedObject::canHaveChildren() const
292 { 292 {
293 return false; 293 return false;
294 } 294 }
295 295
296 } 296 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698