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

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

Issue 202153005: Add isHTMLPlugInElement() helpers for consistency with other HTML elements (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Keep virtual function Created 6 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/page/FocusController.cpp ('k') | no next file » | 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) 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 10 matching lines...) Expand all
21 * 21 *
22 */ 22 */
23 23
24 #include "config.h" 24 #include "config.h"
25 #include "core/rendering/RenderEmbeddedObject.h" 25 #include "core/rendering/RenderEmbeddedObject.h"
26 26
27 #include "CSSValueKeywords.h" 27 #include "CSSValueKeywords.h"
28 #include "HTMLNames.h" 28 #include "HTMLNames.h"
29 #include "core/frame/LocalFrame.h" 29 #include "core/frame/LocalFrame.h"
30 #include "core/html/HTMLIFrameElement.h" 30 #include "core/html/HTMLIFrameElement.h"
31 #include "core/html/HTMLPlugInElement.h"
31 #include "core/page/Page.h" 32 #include "core/page/Page.h"
32 #include "core/frame/Settings.h" 33 #include "core/frame/Settings.h"
33 #include "core/plugins/PluginView.h" 34 #include "core/plugins/PluginView.h"
34 #include "core/rendering/LayoutRectRecorder.h" 35 #include "core/rendering/LayoutRectRecorder.h"
35 #include "core/rendering/PaintInfo.h" 36 #include "core/rendering/PaintInfo.h"
36 #include "core/rendering/RenderTheme.h" 37 #include "core/rendering/RenderTheme.h"
37 #include "core/rendering/RenderView.h" 38 #include "core/rendering/RenderView.h"
38 #include "platform/fonts/Font.h" 39 #include "platform/fonts/Font.h"
39 #include "platform/fonts/FontSelector.h" 40 #include "platform/fonts/FontSelector.h"
40 #include "platform/graphics/GraphicsContextStateSaver.h" 41 #include "platform/graphics/GraphicsContextStateSaver.h"
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 } 103 }
103 104
104 bool RenderEmbeddedObject::showsUnavailablePluginIndicator() const 105 bool RenderEmbeddedObject::showsUnavailablePluginIndicator() const
105 { 106 {
106 return m_showsUnavailablePluginIndicator; 107 return m_showsUnavailablePluginIndicator;
107 } 108 }
108 109
109 void RenderEmbeddedObject::paintContents(PaintInfo& paintInfo, const LayoutPoint & paintOffset) 110 void RenderEmbeddedObject::paintContents(PaintInfo& paintInfo, const LayoutPoint & paintOffset)
110 { 111 {
111 Element* element = toElement(node()); 112 Element* element = toElement(node());
112 if (!element || !element->isPluginElement()) 113 if (!isHTMLPlugInElement(element))
113 return; 114 return;
114 115
115 RenderPart::paintContents(paintInfo, paintOffset); 116 RenderPart::paintContents(paintInfo, paintOffset);
116 } 117 }
117 118
118 void RenderEmbeddedObject::paint(PaintInfo& paintInfo, const LayoutPoint& paintO ffset) 119 void RenderEmbeddedObject::paint(PaintInfo& paintInfo, const LayoutPoint& paintO ffset)
119 { 120 {
120 if (showsUnavailablePluginIndicator()) { 121 if (showsUnavailablePluginIndicator()) {
121 RenderReplaced::paint(paintInfo, paintOffset); 122 RenderReplaced::paint(paintInfo, paintOffset);
122 return; 123 return;
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 { 247 {
247 return false; 248 return false;
248 } 249 }
249 250
250 bool RenderEmbeddedObject::canHaveChildren() const 251 bool RenderEmbeddedObject::canHaveChildren() const
251 { 252 {
252 return false; 253 return false;
253 } 254 }
254 255
255 } 256 }
OLDNEW
« no previous file with comments | « Source/core/page/FocusController.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698