| 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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 } // anonymous namespace | 71 } // anonymous namespace |
| 72 | 72 |
| 73 HTMLPlugInElement::HTMLPlugInElement( | 73 HTMLPlugInElement::HTMLPlugInElement( |
| 74 const QualifiedName& tagName, | 74 const QualifiedName& tagName, |
| 75 Document& doc, | 75 Document& doc, |
| 76 bool createdByParser, | 76 bool createdByParser, |
| 77 PreferPlugInsForImagesOption preferPlugInsForImagesOption) | 77 PreferPlugInsForImagesOption preferPlugInsForImagesOption) |
| 78 : HTMLFrameOwnerElement(tagName, doc), | 78 : HTMLFrameOwnerElement(tagName, doc), |
| 79 m_isDelayingLoadEvent(false), | 79 m_isDelayingLoadEvent(false), |
| 80 // m_needsWidgetUpdate(!createdByParser) allows HTMLObjectElement to delay | 80 // m_needsWidgetUpdate(!createdByParser) allows HTMLObjectElement to delay |
| 81 // widget updates until after all children are parsed. For HTMLEmbedElemen
t | 81 // widget updates until after all children are parsed. For |
| 82 // this delay is unnecessary, but it is simpler to make both classes share | 82 // HTMLEmbedElement this delay is unnecessary, but it is simpler to make |
| 83 // the same codepath in this class. | 83 // both classes share the same codepath in this class. |
| 84 m_needsWidgetUpdate(!createdByParser), | 84 m_needsWidgetUpdate(!createdByParser), |
| 85 m_shouldPreferPlugInsForImages(preferPlugInsForImagesOption == | 85 m_shouldPreferPlugInsForImages(preferPlugInsForImagesOption == |
| 86 ShouldPreferPlugInsForImages) {} | 86 ShouldPreferPlugInsForImages) {} |
| 87 | 87 |
| 88 HTMLPlugInElement::~HTMLPlugInElement() { | 88 HTMLPlugInElement::~HTMLPlugInElement() { |
| 89 DCHECK(!m_pluginWrapper); // cleared in detachLayoutTree() | 89 DCHECK(!m_pluginWrapper); // cleared in detachLayoutTree() |
| 90 DCHECK(!m_isDelayingLoadEvent); | 90 DCHECK(!m_isDelayingLoadEvent); |
| 91 } | 91 } |
| 92 | 92 |
| 93 DEFINE_TRACE(HTMLPlugInElement) { | 93 DEFINE_TRACE(HTMLPlugInElement) { |
| (...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 534 return false; | 534 return false; |
| 535 } | 535 } |
| 536 | 536 |
| 537 if (!layoutItem.isNull()) | 537 if (!layoutItem.isNull()) |
| 538 setWidget(widget); | 538 setWidget(widget); |
| 539 else | 539 else |
| 540 setPersistedPluginWidget(widget); | 540 setPersistedPluginWidget(widget); |
| 541 } | 541 } |
| 542 | 542 |
| 543 document().setContainsPlugins(); | 543 document().setContainsPlugins(); |
| 544 // TODO(esprehn): WebPluginContainerImpl::setWebLayer also schedules a composi
ting update, do we need both? | 544 // TODO(esprehn): WebPluginContainerImpl::setWebLayer also schedules a |
| 545 // compositing update, do we need both? |
| 545 setNeedsCompositingUpdate(); | 546 setNeedsCompositingUpdate(); |
| 546 // Make sure any input event handlers introduced by the plugin are taken into
account. | 547 // Make sure any input event handlers introduced by the plugin are taken into |
| 548 // account. |
| 547 if (Page* page = document().frame()->page()) { | 549 if (Page* page = document().frame()->page()) { |
| 548 if (ScrollingCoordinator* scrollingCoordinator = | 550 if (ScrollingCoordinator* scrollingCoordinator = |
| 549 page->scrollingCoordinator()) | 551 page->scrollingCoordinator()) |
| 550 scrollingCoordinator->notifyGeometryChanged(); | 552 scrollingCoordinator->notifyGeometryChanged(); |
| 551 } | 553 } |
| 552 return true; | 554 return true; |
| 553 } | 555 } |
| 554 | 556 |
| 555 bool HTMLPlugInElement::shouldUsePlugin(const KURL& url, | 557 bool HTMLPlugInElement::shouldUsePlugin(const KURL& url, |
| 556 const String& mimeType, | 558 const String& mimeType, |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 639 | 641 |
| 640 void HTMLPlugInElement::lazyReattachIfNeeded() { | 642 void HTMLPlugInElement::lazyReattachIfNeeded() { |
| 641 if (!useFallbackContent() && needsWidgetUpdate() && layoutObject() && | 643 if (!useFallbackContent() && needsWidgetUpdate() && layoutObject() && |
| 642 !isImageType()) { | 644 !isImageType()) { |
| 643 lazyReattachIfAttached(); | 645 lazyReattachIfAttached(); |
| 644 setPersistedPluginWidget(nullptr); | 646 setPersistedPluginWidget(nullptr); |
| 645 } | 647 } |
| 646 } | 648 } |
| 647 | 649 |
| 648 } // namespace blink | 650 } // namespace blink |
| OLD | NEW |