| 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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 && !wouldLoadAsNetscapePlugin(m_url, m_serviceType) | 159 && !wouldLoadAsNetscapePlugin(m_url, m_serviceType) |
| 160 && !m_isDelayingLoadEvent) { | 160 && !m_isDelayingLoadEvent) { |
| 161 m_isDelayingLoadEvent = true; | 161 m_isDelayingLoadEvent = true; |
| 162 document().incrementLoadEventDelayCount(); | 162 document().incrementLoadEventDelayCount(); |
| 163 document().loadPluginsSoon(); | 163 document().loadPluginsSoon(); |
| 164 } | 164 } |
| 165 } | 165 } |
| 166 | 166 |
| 167 void HTMLPlugInElement::updateWidget() | 167 void HTMLPlugInElement::updateWidget() |
| 168 { | 168 { |
| 169 RefPtrWillBeRawPtr<HTMLPlugInElement> protector(this); | 169 RawPtr<HTMLPlugInElement> protector(this); |
| 170 updateWidgetInternal(); | 170 updateWidgetInternal(); |
| 171 if (m_isDelayingLoadEvent) { | 171 if (m_isDelayingLoadEvent) { |
| 172 m_isDelayingLoadEvent = false; | 172 m_isDelayingLoadEvent = false; |
| 173 document().decrementLoadEventDelayCount(); | 173 document().decrementLoadEventDelayCount(); |
| 174 } | 174 } |
| 175 } | 175 } |
| 176 | 176 |
| 177 void HTMLPlugInElement::removedFrom(ContainerNode* insertionPoint) | 177 void HTMLPlugInElement::removedFrom(ContainerNode* insertionPoint) |
| 178 { | 178 { |
| 179 // If we've persisted the plugin and we're removed from the tree then | 179 // If we've persisted the plugin and we're removed from the tree then |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 354 // FIXME: Mouse down and scroll events are passed down to plugin via custom | 354 // FIXME: Mouse down and scroll events are passed down to plugin via custom |
| 355 // code in EventHandler; these code paths should be united. | 355 // code in EventHandler; these code paths should be united. |
| 356 | 356 |
| 357 LayoutObject* r = layoutObject(); | 357 LayoutObject* r = layoutObject(); |
| 358 if (!r || !r->isLayoutPart()) | 358 if (!r || !r->isLayoutPart()) |
| 359 return; | 359 return; |
| 360 if (r->isEmbeddedObject()) { | 360 if (r->isEmbeddedObject()) { |
| 361 if (toLayoutEmbeddedObject(r)->showsUnavailablePluginIndicator()) | 361 if (toLayoutEmbeddedObject(r)->showsUnavailablePluginIndicator()) |
| 362 return; | 362 return; |
| 363 } | 363 } |
| 364 RefPtrWillBeRawPtr<Widget> widget = toLayoutPart(r)->widget(); | 364 RawPtr<Widget> widget = toLayoutPart(r)->widget(); |
| 365 if (!widget) | 365 if (!widget) |
| 366 return; | 366 return; |
| 367 widget->handleEvent(event); | 367 widget->handleEvent(event); |
| 368 if (event->defaultHandled()) | 368 if (event->defaultHandled()) |
| 369 return; | 369 return; |
| 370 HTMLFrameOwnerElement::defaultEventHandler(event); | 370 HTMLFrameOwnerElement::defaultEventHandler(event); |
| 371 } | 371 } |
| 372 | 372 |
| 373 LayoutPart* HTMLPlugInElement::layoutPartForJSBindings() const | 373 LayoutPart* HTMLPlugInElement::layoutPartForJSBindings() const |
| 374 { | 374 { |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 502 | 502 |
| 503 WTF_LOG(Plugins, "%p Plugin URL: %s", this, m_url.utf8().data()); | 503 WTF_LOG(Plugins, "%p Plugin URL: %s", this, m_url.utf8().data()); |
| 504 WTF_LOG(Plugins, " Loaded URL: %s", url.string().utf8().data()); | 504 WTF_LOG(Plugins, " Loaded URL: %s", url.string().utf8().data()); |
| 505 m_loadedUrl = url; | 505 m_loadedUrl = url; |
| 506 | 506 |
| 507 if (m_persistedPluginWidget) { | 507 if (m_persistedPluginWidget) { |
| 508 setWidget(m_persistedPluginWidget.release()); | 508 setWidget(m_persistedPluginWidget.release()); |
| 509 } else { | 509 } else { |
| 510 bool loadManually = document().isPluginDocument() && !document().contain
sPlugins(); | 510 bool loadManually = document().isPluginDocument() && !document().contain
sPlugins(); |
| 511 FrameLoaderClient::DetachedPluginPolicy policy = requireLayoutObject ? F
rameLoaderClient::FailOnDetachedPlugin : FrameLoaderClient::AllowDetachedPlugin; | 511 FrameLoaderClient::DetachedPluginPolicy policy = requireLayoutObject ? F
rameLoaderClient::FailOnDetachedPlugin : FrameLoaderClient::AllowDetachedPlugin; |
| 512 RefPtrWillBeRawPtr<Widget> widget = frame->loader().client()->createPlug
in(this, url, paramNames, paramValues, mimeType, loadManually, policy); | 512 RawPtr<Widget> widget = frame->loader().client()->createPlugin(this, url
, paramNames, paramValues, mimeType, loadManually, policy); |
| 513 if (!widget) { | 513 if (!widget) { |
| 514 if (layoutObject && !layoutObject->showsUnavailablePluginIndicator()
) | 514 if (layoutObject && !layoutObject->showsUnavailablePluginIndicator()
) |
| 515 layoutObject->setPluginUnavailabilityReason(LayoutEmbeddedObject
::PluginMissing); | 515 layoutObject->setPluginUnavailabilityReason(LayoutEmbeddedObject
::PluginMissing); |
| 516 return false; | 516 return false; |
| 517 } | 517 } |
| 518 | 518 |
| 519 if (layoutObject) | 519 if (layoutObject) |
| 520 setWidget(widget); | 520 setWidget(widget); |
| 521 else | 521 else |
| 522 setPersistedPluginWidget(widget.get()); | 522 setPersistedPluginWidget(widget.get()); |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 614 return openShadowRoot(); | 614 return openShadowRoot(); |
| 615 } | 615 } |
| 616 | 616 |
| 617 void HTMLPlugInElement::lazyReattachIfNeeded() | 617 void HTMLPlugInElement::lazyReattachIfNeeded() |
| 618 { | 618 { |
| 619 if (!useFallbackContent() && needsWidgetUpdate() && layoutObject() && !isIma
geType()) | 619 if (!useFallbackContent() && needsWidgetUpdate() && layoutObject() && !isIma
geType()) |
| 620 lazyReattachIfAttached(); | 620 lazyReattachIfAttached(); |
| 621 } | 621 } |
| 622 | 622 |
| 623 } // namespace blink | 623 } // namespace blink |
| OLD | NEW |