| OLD | NEW |
| 1 /** | 1 /** |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 4 * (C) 2000 Stefan Schimanski (1Stein@gmx.de) | 4 * (C) 2000 Stefan Schimanski (1Stein@gmx.de) |
| 5 * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc. | 5 * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc. |
| 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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 bool HTMLPlugInElement::willRespondToMouseClickEvents() { | 152 bool HTMLPlugInElement::willRespondToMouseClickEvents() { |
| 153 if (isDisabledFormControl()) | 153 if (isDisabledFormControl()) |
| 154 return false; | 154 return false; |
| 155 LayoutObject* r = layoutObject(); | 155 LayoutObject* r = layoutObject(); |
| 156 return r && (r->isEmbeddedObject() || r->isLayoutPart()); | 156 return r && (r->isEmbeddedObject() || r->isLayoutPart()); |
| 157 } | 157 } |
| 158 | 158 |
| 159 void HTMLPlugInElement::removeAllEventListeners() { | 159 void HTMLPlugInElement::removeAllEventListeners() { |
| 160 HTMLFrameOwnerElement::removeAllEventListeners(); | 160 HTMLFrameOwnerElement::removeAllEventListeners(); |
| 161 if (LayoutPart* layoutObject = existingLayoutPart()) { | 161 if (LayoutPart* layoutObject = existingLayoutPart()) { |
| 162 if (FrameViewBase* frameViewBase = layoutObject->widget()) | 162 if (FrameViewBase* frameViewBase = layoutObject->frameViewBase()) |
| 163 frameViewBase->eventListenersRemoved(); | 163 frameViewBase->eventListenersRemoved(); |
| 164 } | 164 } |
| 165 } | 165 } |
| 166 | 166 |
| 167 void HTMLPlugInElement::didMoveToNewDocument(Document& oldDocument) { | 167 void HTMLPlugInElement::didMoveToNewDocument(Document& oldDocument) { |
| 168 if (m_imageLoader) | 168 if (m_imageLoader) |
| 169 m_imageLoader->elementDidMoveToNewDocument(); | 169 m_imageLoader->elementDidMoveToNewDocument(); |
| 170 HTMLFrameOwnerElement::didMoveToNewDocument(oldDocument); | 170 HTMLFrameOwnerElement::didMoveToNewDocument(oldDocument); |
| 171 } | 171 } |
| 172 | 172 |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 334 plugin = pluginWidget(); | 334 plugin = pluginWidget(); |
| 335 | 335 |
| 336 if (plugin) | 336 if (plugin) |
| 337 m_pluginWrapper = frame->script().createPluginWrapper(plugin); | 337 m_pluginWrapper = frame->script().createPluginWrapper(plugin); |
| 338 } | 338 } |
| 339 return m_pluginWrapper.get(); | 339 return m_pluginWrapper.get(); |
| 340 } | 340 } |
| 341 | 341 |
| 342 FrameViewBase* HTMLPlugInElement::pluginWidget() const { | 342 FrameViewBase* HTMLPlugInElement::pluginWidget() const { |
| 343 if (LayoutPart* layoutPart = layoutPartForJSBindings()) | 343 if (LayoutPart* layoutPart = layoutPartForJSBindings()) |
| 344 return layoutPart->widget(); | 344 return layoutPart->frameViewBase(); |
| 345 return nullptr; | 345 return nullptr; |
| 346 } | 346 } |
| 347 | 347 |
| 348 bool HTMLPlugInElement::isPresentationAttribute( | 348 bool HTMLPlugInElement::isPresentationAttribute( |
| 349 const QualifiedName& name) const { | 349 const QualifiedName& name) const { |
| 350 if (name == widthAttr || name == heightAttr || name == vspaceAttr || | 350 if (name == widthAttr || name == heightAttr || name == vspaceAttr || |
| 351 name == hspaceAttr || name == alignAttr) | 351 name == hspaceAttr || name == alignAttr) |
| 352 return true; | 352 return true; |
| 353 return HTMLFrameOwnerElement::isPresentationAttribute(name); | 353 return HTMLFrameOwnerElement::isPresentationAttribute(name); |
| 354 } | 354 } |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 387 // code in EventHandler; these code paths should be united. | 387 // code in EventHandler; these code paths should be united. |
| 388 | 388 |
| 389 LayoutObject* r = layoutObject(); | 389 LayoutObject* r = layoutObject(); |
| 390 if (!r || !r->isLayoutPart()) | 390 if (!r || !r->isLayoutPart()) |
| 391 return; | 391 return; |
| 392 if (r->isEmbeddedObject()) { | 392 if (r->isEmbeddedObject()) { |
| 393 if (LayoutEmbeddedItem(toLayoutEmbeddedObject(r)) | 393 if (LayoutEmbeddedItem(toLayoutEmbeddedObject(r)) |
| 394 .showsUnavailablePluginIndicator()) | 394 .showsUnavailablePluginIndicator()) |
| 395 return; | 395 return; |
| 396 } | 396 } |
| 397 FrameViewBase* frameViewBase = toLayoutPart(r)->widget(); | 397 FrameViewBase* frameViewBase = toLayoutPart(r)->frameViewBase(); |
| 398 if (!frameViewBase) | 398 if (!frameViewBase) |
| 399 return; | 399 return; |
| 400 frameViewBase->handleEvent(event); | 400 frameViewBase->handleEvent(event); |
| 401 if (event->defaultHandled()) | 401 if (event->defaultHandled()) |
| 402 return; | 402 return; |
| 403 HTMLFrameOwnerElement::defaultEventHandler(event); | 403 HTMLFrameOwnerElement::defaultEventHandler(event); |
| 404 } | 404 } |
| 405 | 405 |
| 406 LayoutPart* HTMLPlugInElement::layoutPartForJSBindings() const { | 406 LayoutPart* HTMLPlugInElement::layoutPartForJSBindings() const { |
| 407 // Needs to load the plugin immediatedly because this function is called | 407 // Needs to load the plugin immediatedly because this function is called |
| (...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 650 | 650 |
| 651 void HTMLPlugInElement::lazyReattachIfNeeded() { | 651 void HTMLPlugInElement::lazyReattachIfNeeded() { |
| 652 if (!useFallbackContent() && needsPluginUpdate() && layoutObject() && | 652 if (!useFallbackContent() && needsPluginUpdate() && layoutObject() && |
| 653 !isImageType()) { | 653 !isImageType()) { |
| 654 lazyReattachIfAttached(); | 654 lazyReattachIfAttached(); |
| 655 setPersistedPluginWidget(nullptr); | 655 setPersistedPluginWidget(nullptr); |
| 656 } | 656 } |
| 657 } | 657 } |
| 658 | 658 |
| 659 } // namespace blink | 659 } // namespace blink |
| OLD | NEW |