Changeset 151599 in webkit
- Timestamp:
- Jun 14, 2013, 10:09:49 AM (13 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 4 edited
-
ChangeLog (modified) (1 diff)
-
html/HTMLPlugInElement.h (modified) (3 diffs)
-
html/HTMLPlugInImageElement.cpp (modified) (2 diffs)
-
html/HTMLPlugInImageElement.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r151598 r151599 1 2013-06-14 Dean Jackson <dino@apple.com> 2 3 Clicking on snapshotting plug-ins does not restart them 4 https://bugs.webkit.org/show_bug.cgi?id=117620 5 <rdar://problem/13821729> 6 7 Follow-up review comments from Darin Adler, with some 8 discussion on IRC. 9 10 Sprinkle OVERRIDE on virtual functions where needed. Also 11 make sure that the Event is a MouseEvent before casting to it. 12 13 * html/HTMLPlugInElement.h: Move defaultEventHandler back to protected and add OVERRIDE. 14 * html/HTMLPlugInImageElement.cpp: 15 (WebCore::HTMLPlugInImageElement::defaultEventHandler): Check for MouseEvent and 16 use toMouseEvent(). 17 * html/HTMLPlugInImageElement.h: Sprinkle some OVERRIDEs, and move defaultEventHandler 18 to private. 19 1 20 2013-06-14 Timothy Hatcher <timothy@apple.com> 2 21 -
trunk/Source/WebCore/html/HTMLPlugInElement.h
r151576 r151599 81 81 virtual bool isPlugInImageElement() const { return false; } 82 82 83 virtual void defaultEventHandler(Event*);84 85 83 protected: 86 84 HTMLPlugInElement(const QualifiedName& tagName, Document*); … … 91 89 92 90 virtual bool useFallbackContent() const { return false; } 91 92 virtual void defaultEventHandler(Event*) OVERRIDE; 93 93 94 94 // Subclasses should use guardedDispatchBeforeLoadEvent instead of calling dispatchBeforeLoadEvent directly. … … 107 107 108 108 virtual bool isKeyboardFocusable(KeyboardEvent*) const OVERRIDE; 109 virtual bool isPluginElement() const ;109 virtual bool isPluginElement() const OVERRIDE; 110 110 111 111 RefPtr<JSC::Bindings::Instance> m_instance; -
trunk/Source/WebCore/html/HTMLPlugInImageElement.cpp
r151576 r151599 714 714 RenderObject* r = renderer(); 715 715 if (r && r->isEmbeddedObject()) { 716 if (isPlugInImageElement() && displayState() == WaitingForSnapshot && event-> type() == eventNames().clickEvent) {717 MouseEvent* mouseEvent = static_cast<MouseEvent*>(event);716 if (isPlugInImageElement() && displayState() == WaitingForSnapshot && event->isMouseEvent() && event->type() == eventNames().clickEvent) { 717 MouseEvent* mouseEvent = toMouseEvent(event); 718 718 if (mouseEvent->button() == LeftButton) { 719 719 userDidClickSnapshot(mouseEvent, true); … … 725 725 HTMLPlugInElement::defaultEventHandler(event); 726 726 } 727 727 728 728 } // namespace WebCore -
trunk/Source/WebCore/html/HTMLPlugInImageElement.h
r151576 r151599 126 126 virtual bool isRestartedPlugin() const OVERRIDE { return m_isRestartedPlugin; } 127 127 128 virtual void defaultEventHandler(Event*);129 130 128 private: 131 virtual RenderObject* createRenderer(RenderArena*, RenderStyle*) ;132 virtual bool willRecalcStyle(StyleChange) ;129 virtual RenderObject* createRenderer(RenderArena*, RenderStyle*) OVERRIDE; 130 virtual bool willRecalcStyle(StyleChange) OVERRIDE; 133 131 134 132 void didAddUserAgentShadowRoot(ShadowRoot*) OVERRIDE; 135 133 136 virtual void finishParsingChildren() ;134 virtual void finishParsingChildren() OVERRIDE; 137 135 138 136 void updateWidgetIfNecessary(); … … 149 147 150 148 void removeSnapshotTimerFired(Timer<HTMLPlugInImageElement>*); 149 150 virtual void defaultEventHandler(Event*) OVERRIDE; 151 151 152 152 bool m_needsWidgetUpdate;
Note:
See TracChangeset
for help on using the changeset viewer.