Skip to content
  • adele@apple.com's avatar
    WebCore: Fix for https://bugs.webkit.org/show_bug.cgi?id=41721 · b9d22b1b
    adele@apple.com authored
    <rdar://problem/8158561> Missing plug-in indicator should have a pressed state
    
    Reviewed by Jon Honeycutt, Adam Roben, and Darin Adler.
    
    Test: plugins/clicking-missing-plugin-fires-delegate.html
    
    * html/HTMLPlugInElement.cpp:
    (WebCore::HTMLPlugInElement::HTMLPlugInElement): Initialize m_isCapturingMouseEvents.
    (WebCore::HTMLPlugInElement::detach): If we're still capturing when getting detached, clear the capturing node on the EventHandler.
    (WebCore::HTMLPlugInElement::defaultEventHandler): Call handleMissingPluginIndicatorEvent when the missing plugin indicator is showing.
    * html/HTMLPlugInElement.h:
    (WebCore::HTMLPlugInElement::isCapturingMouseEvents):
    (WebCore::HTMLPlugInElement::setIsCapturingMouseEvents):
    * page/ChromeClient.h:
    (WebCore::ChromeClient::shouldMissingPluginMessageBeButton): Added default implementation.
    * rendering/RenderEmbeddedObject.cpp:
    (WebCore::replacementTextRoundedRectPressedColor):
    (WebCore::RenderEmbeddedObject::RenderEmbeddedObject):
    (WebCore::RenderEmbeddedObject::setMissingPluginIndicatorIsPressed): Added.  Causes a repaint when the state changes.
    (WebCore::RenderEmbeddedObject::paintReplaced): Call getReplacementTextGeometry.
    (WebCore::RenderEmbeddedObject::getReplacementTextGeometry): Factored this out so it can be used in paintReplaced and in isInMissingPluginIndicator.
    (WebCore::RenderEmbeddedObject::isInMissingPluginIndicator): Hit test to see if the mouse event is in the missing plugin indicator.
    (WebCore::RenderEmbeddedObject::handleMissingPluginIndicatorEvent): Capture mouse events as needed and track the pressed appearance.
    * rendering/RenderEmbeddedObject.h:
    
    WebKit/mac: Fix for https://bugs.webkit.org/show_bug.cgi?id=41721
    <rdar://problem/8158561> Missing plug-in indicator should have a pressed state
    
    Reviewed by Jon Honeycutt, Adam Roben, and Darin Adler.
    
    Implement shouldMissingPluginMessageBeButton.
    
    * WebCoreSupport/WebChromeClient.h:
    * WebCoreSupport/WebChromeClient.mm:
    (WebChromeClient::shouldMissingPluginMessageBeButton):
    
    WebKit/win: Fix for https://bugs.webkit.org/show_bug.cgi?id=41721
    <rdar://problem/8158561> Missing plug-in indicator should have a pressed state
    
    Reviewed by Jon Honeycutt, Adam Roben, and Darin Adler.
    
    Implement shouldMissingPluginMessageBeButton.
    
    * WebCoreSupport/WebChromeClient.cpp: (WebChromeClient::shouldMissingPluginMessageBeButton):
    * WebCoreSupport/WebChromeClient.h:
    
    WebKitTools: Test infrastructure for https://bugs.webkit.org/show_bug.cgi?id=41721
    <rdar://problem/8158561> Missing plug-in indicator should have a pressed state
    
    Reviewed by Jon Honeycutt, Adam Roben, and Darin Adler.
    
    Log when the missing plugin button is pressed.
    
    * DumpRenderTree/mac/UIDelegate.mm:
    (-[UIDelegate webView:didPressMissingPluginButton:]):
    * DumpRenderTree/win/UIDelegate.cpp:
    (UIDelegate::QueryInterface):
    (UIDelegate::createWebViewWithRequest):
    (UIDelegate::drawBackground):
    (UIDelegate::decidePolicyForGeolocationRequest):
    (UIDelegate::didPressMissingPluginButton):
    * DumpRenderTree/win/UIDelegate.h:
    
    LayoutTests: Test for https://bugs.webkit.org/show_bug.cgi?id=41721
    <rdar://problem/8158561> Missing plug-in indicator should have a pressed state
    
    Reviewed by Jon Honeycutt, Adam Roben, and Darin Adler.
    
    * platform/gtk/Skipped:
    * platform/qt/Skipped:
    * plugins/clicking-missing-plugin-fires-delegate-expected.txt: Added.
    * plugins/clicking-missing-plugin-fires-delegate.html: Added.
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@62875 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    b9d22b1b