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

Side by Side Diff: third_party/WebKit/Source/core/html/HTMLPlugInElement.cpp

Issue 2384273007: reflow comments in core/html/*.{cpp,h},core/html/imports (Closed)
Patch Set: Created 4 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
OLDNEW
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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 }; 69 };
70 70
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 ,
85 m_needsWidgetUpdate(!createdByParser), 84 m_needsWidgetUpdate(!createdByParser),
86 m_shouldPreferPlugInsForImages(preferPlugInsForImagesOption == 85 m_shouldPreferPlugInsForImages(preferPlugInsForImagesOption ==
87 ShouldPreferPlugInsForImages) {} 86 ShouldPreferPlugInsForImages) {}
88 87
89 HTMLPlugInElement::~HTMLPlugInElement() { 88 HTMLPlugInElement::~HTMLPlugInElement() {
90 DCHECK(!m_pluginWrapper); // cleared in detachLayoutTree() 89 DCHECK(!m_pluginWrapper); // cleared in detachLayoutTree()
91 DCHECK(!m_isDelayingLoadEvent); 90 DCHECK(!m_isDelayingLoadEvent);
92 } 91 }
93 92
94 DEFINE_TRACE(HTMLPlugInElement) { 93 DEFINE_TRACE(HTMLPlugInElement) {
(...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after
535 return false; 534 return false;
536 } 535 }
537 536
538 if (!layoutItem.isNull()) 537 if (!layoutItem.isNull())
539 setWidget(widget); 538 setWidget(widget);
540 else 539 else
541 setPersistedPluginWidget(widget); 540 setPersistedPluginWidget(widget);
542 } 541 }
543 542
544 document().setContainsPlugins(); 543 document().setContainsPlugins();
545 // 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?
546 setNeedsCompositingUpdate(); 546 setNeedsCompositingUpdate();
547 // 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.
548 if (Page* page = document().frame()->page()) { 549 if (Page* page = document().frame()->page()) {
549 if (ScrollingCoordinator* scrollingCoordinator = 550 if (ScrollingCoordinator* scrollingCoordinator =
550 page->scrollingCoordinator()) 551 page->scrollingCoordinator())
551 scrollingCoordinator->notifyGeometryChanged(); 552 scrollingCoordinator->notifyGeometryChanged();
552 } 553 }
553 return true; 554 return true;
554 } 555 }
555 556
556 bool HTMLPlugInElement::shouldUsePlugin(const KURL& url, 557 bool HTMLPlugInElement::shouldUsePlugin(const KURL& url,
557 const String& mimeType, 558 const String& mimeType,
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
640 641
641 void HTMLPlugInElement::lazyReattachIfNeeded() { 642 void HTMLPlugInElement::lazyReattachIfNeeded() {
642 if (!useFallbackContent() && needsWidgetUpdate() && layoutObject() && 643 if (!useFallbackContent() && needsWidgetUpdate() && layoutObject() &&
643 !isImageType()) { 644 !isImageType()) {
644 lazyReattachIfAttached(); 645 lazyReattachIfAttached();
645 setPersistedPluginWidget(nullptr); 646 setPersistedPluginWidget(nullptr);
646 } 647 }
647 } 648 }
648 649
649 } // namespace blink 650 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698