OLD | NEW |
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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 #include "WebPluginContainer.h" | 43 #include "WebPluginContainer.h" |
44 #include "WebPluginContainerImpl.h" | 44 #include "WebPluginContainerImpl.h" |
45 #include "bindings/v8/ExceptionState.h" | 45 #include "bindings/v8/ExceptionState.h" |
46 #include "core/dom/Document.h" | 46 #include "core/dom/Document.h" |
47 #include "core/dom/Element.h" | 47 #include "core/dom/Element.h" |
48 #include "core/dom/Node.h" | 48 #include "core/dom/Node.h" |
49 #include "core/dom/NodeList.h" | 49 #include "core/dom/NodeList.h" |
50 #include "core/editing/markup.h" | 50 #include "core/editing/markup.h" |
51 #include "core/events/Event.h" | 51 #include "core/events/Event.h" |
52 #include "core/html/HTMLCollection.h" | 52 #include "core/html/HTMLCollection.h" |
| 53 #include "core/html/HTMLElement.h" |
53 #include "core/rendering/RenderObject.h" | 54 #include "core/rendering/RenderObject.h" |
54 #include "core/rendering/RenderWidget.h" | 55 #include "core/rendering/RenderWidget.h" |
55 #include "platform/Widget.h" | 56 #include "platform/Widget.h" |
56 #include "public/platform/WebString.h" | 57 #include "public/platform/WebString.h" |
57 #include "public/platform/WebVector.h" | 58 #include "public/platform/WebVector.h" |
58 | 59 |
59 using namespace WebCore; | 60 using namespace WebCore; |
60 | 61 |
61 namespace blink { | 62 namespace blink { |
62 | 63 |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
229 bool WebNode::hasNonEmptyBoundingBox() const | 230 bool WebNode::hasNonEmptyBoundingBox() const |
230 { | 231 { |
231 m_private->document().updateLayoutIgnorePendingStylesheets(); | 232 m_private->document().updateLayoutIgnorePendingStylesheets(); |
232 return m_private->hasNonEmptyBoundingBox(); | 233 return m_private->hasNonEmptyBoundingBox(); |
233 } | 234 } |
234 | 235 |
235 WebPluginContainer* WebNode::pluginContainer() const | 236 WebPluginContainer* WebNode::pluginContainer() const |
236 { | 237 { |
237 if (isNull()) | 238 if (isNull()) |
238 return 0; | 239 return 0; |
239 const Node* coreNode = constUnwrap<Node>(); | 240 const Node& coreNode = *constUnwrap<Node>(); |
240 if (coreNode->hasTagName(HTMLNames::objectTag) || coreNode->hasTagName(HTMLN
ames::embedTag)) { | 241 if (isHTMLObjectElement(coreNode) || isHTMLEmbedElement(coreNode)) { |
241 RenderObject* object = coreNode->renderer(); | 242 RenderObject* object = coreNode.renderer(); |
242 if (object && object->isWidget()) { | 243 if (object && object->isWidget()) { |
243 Widget* widget = WebCore::toRenderWidget(object)->widget(); | 244 Widget* widget = WebCore::toRenderWidget(object)->widget(); |
244 if (widget && widget->isPluginContainer()) | 245 if (widget && widget->isPluginContainer()) |
245 return toWebPluginContainerImpl(widget); | 246 return toWebPluginContainerImpl(widget); |
246 } | 247 } |
247 } | 248 } |
248 return 0; | 249 return 0; |
249 } | 250 } |
250 | 251 |
251 WebElement WebNode::shadowHost() const | 252 WebElement WebNode::shadowHost() const |
(...skipping 14 matching lines...) Expand all Loading... |
266 m_private = node; | 267 m_private = node; |
267 return *this; | 268 return *this; |
268 } | 269 } |
269 | 270 |
270 WebNode::operator PassRefPtr<Node>() const | 271 WebNode::operator PassRefPtr<Node>() const |
271 { | 272 { |
272 return m_private.get(); | 273 return m_private.get(); |
273 } | 274 } |
274 | 275 |
275 } // namespace blink | 276 } // namespace blink |
OLD | NEW |