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

Side by Side Diff: Source/web/WebNode.cpp

Issue 625073002: Merge RenderWidget into single subclass, RenderPart (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Address comments Created 6 years, 2 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/web/ContextMenuClientImpl.cpp ('k') | Source/web/WebViewImpl.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) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 24 matching lines...) Expand all
35 #include "core/dom/Document.h" 35 #include "core/dom/Document.h"
36 #include "core/dom/Element.h" 36 #include "core/dom/Element.h"
37 #include "core/dom/Node.h" 37 #include "core/dom/Node.h"
38 #include "core/dom/NodeList.h" 38 #include "core/dom/NodeList.h"
39 #include "core/dom/TagCollection.h" 39 #include "core/dom/TagCollection.h"
40 #include "core/editing/markup.h" 40 #include "core/editing/markup.h"
41 #include "core/events/Event.h" 41 #include "core/events/Event.h"
42 #include "core/html/HTMLCollection.h" 42 #include "core/html/HTMLCollection.h"
43 #include "core/html/HTMLElement.h" 43 #include "core/html/HTMLElement.h"
44 #include "core/rendering/RenderObject.h" 44 #include "core/rendering/RenderObject.h"
45 #include "core/rendering/RenderWidget.h" 45 #include "core/rendering/RenderPart.h"
46 #include "platform/Widget.h" 46 #include "platform/Widget.h"
47 #include "public/platform/WebString.h" 47 #include "public/platform/WebString.h"
48 #include "public/platform/WebVector.h" 48 #include "public/platform/WebVector.h"
49 #include "public/web/WebDOMEvent.h" 49 #include "public/web/WebDOMEvent.h"
50 #include "public/web/WebDocument.h" 50 #include "public/web/WebDocument.h"
51 #include "public/web/WebElement.h" 51 #include "public/web/WebElement.h"
52 #include "public/web/WebElementCollection.h" 52 #include "public/web/WebElementCollection.h"
53 #include "public/web/WebNodeList.h" 53 #include "public/web/WebNodeList.h"
54 #include "public/web/WebPluginContainer.h" 54 #include "public/web/WebPluginContainer.h"
55 #include "web/FrameLoaderClientImpl.h" 55 #include "web/FrameLoaderClientImpl.h"
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 return m_private->containsIncludingShadowDOM(other.m_private.get()); 223 return m_private->containsIncludingShadowDOM(other.m_private.get());
224 } 224 }
225 225
226 WebPluginContainer* WebNode::pluginContainer() const 226 WebPluginContainer* WebNode::pluginContainer() const
227 { 227 {
228 if (isNull()) 228 if (isNull())
229 return 0; 229 return 0;
230 const Node& coreNode = *constUnwrap<Node>(); 230 const Node& coreNode = *constUnwrap<Node>();
231 if (isHTMLObjectElement(coreNode) || isHTMLEmbedElement(coreNode)) { 231 if (isHTMLObjectElement(coreNode) || isHTMLEmbedElement(coreNode)) {
232 RenderObject* object = coreNode.renderer(); 232 RenderObject* object = coreNode.renderer();
233 if (object && object->isWidget()) { 233 if (object && object->isRenderPart()) {
234 Widget* widget = toRenderWidget(object)->widget(); 234 Widget* widget = toRenderPart(object)->widget();
235 if (widget && widget->isPluginContainer()) 235 if (widget && widget->isPluginContainer())
236 return toWebPluginContainerImpl(widget); 236 return toWebPluginContainerImpl(widget);
237 } 237 }
238 } 238 }
239 return 0; 239 return 0;
240 } 240 }
241 241
242 WebElement WebNode::shadowHost() const 242 WebElement WebNode::shadowHost() const
243 { 243 {
244 if (isNull()) 244 if (isNull())
(...skipping 12 matching lines...) Expand all
257 m_private = node; 257 m_private = node;
258 return *this; 258 return *this;
259 } 259 }
260 260
261 WebNode::operator PassRefPtrWillBeRawPtr<Node>() const 261 WebNode::operator PassRefPtrWillBeRawPtr<Node>() const
262 { 262 {
263 return m_private.get(); 263 return m_private.get();
264 } 264 }
265 265
266 } // namespace blink 266 } // namespace blink
OLDNEW
« no previous file with comments | « Source/web/ContextMenuClientImpl.cpp ('k') | Source/web/WebViewImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698