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

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

Issue 2078143002: Make plugin elements return false from canStartSelection. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix readonly-disabled-text-selection for changes in r401155 Created 4 years, 6 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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 } 95 }
96 } 96 }
97 m_persistedPluginWidget = widget; 97 m_persistedPluginWidget = widget;
98 } 98 }
99 99
100 bool HTMLPlugInElement::canProcessDrag() const 100 bool HTMLPlugInElement::canProcessDrag() const
101 { 101 {
102 return pluginWidget() && pluginWidget()->isPluginView() && toPluginView(plug inWidget())->canProcessDrag(); 102 return pluginWidget() && pluginWidget()->isPluginView() && toPluginView(plug inWidget())->canProcessDrag();
103 } 103 }
104 104
105 bool HTMLPlugInElement::canStartSelection() const
106 {
107 return useFallbackContent() && Node::canStartSelection();
108 }
109
105 bool HTMLPlugInElement::willRespondToMouseClickEvents() 110 bool HTMLPlugInElement::willRespondToMouseClickEvents()
106 { 111 {
107 if (isDisabledFormControl()) 112 if (isDisabledFormControl())
108 return false; 113 return false;
109 LayoutObject* r = layoutObject(); 114 LayoutObject* r = layoutObject();
110 return r && (r->isEmbeddedObject() || r->isLayoutPart()); 115 return r && (r->isEmbeddedObject() || r->isLayoutPart());
111 } 116 }
112 117
113 void HTMLPlugInElement::removeAllEventListeners() 118 void HTMLPlugInElement::removeAllEventListeners()
114 { 119 {
(...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after
598 603
599 void HTMLPlugInElement::lazyReattachIfNeeded() 604 void HTMLPlugInElement::lazyReattachIfNeeded()
600 { 605 {
601 if (!useFallbackContent() && needsWidgetUpdate() && layoutObject() && !isIma geType()) { 606 if (!useFallbackContent() && needsWidgetUpdate() && layoutObject() && !isIma geType()) {
602 lazyReattachIfAttached(); 607 lazyReattachIfAttached();
603 setPersistedPluginWidget(nullptr); 608 setPersistedPluginWidget(nullptr);
604 } 609 }
605 } 610 }
606 611
607 } // namespace blink 612 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLPlugInElement.h ('k') | third_party/WebKit/Source/web/tests/WebViewTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698