Changeset 82723 in webkit


Ignore:
Timestamp:
Apr 1, 2011 2:55:22 PM (13 years ago)
Author:
andersca@apple.com
Message:

2011-04-01 Anders Carlsson <andersca@apple.com>

Reviewed by Sam Weinig.

Shockwave plug-in doesn't accept mouse events
https://bugs.webkit.org/show_bug.cgi?id=57653
<rdar://problem/8483273>

Fix an unrelated bug found by the added test.

  • Plugins/WebBaseNetscapePluginView.mm: (-[WebBaseNetscapePluginView convertFromX:andY:space:toX:andY:space:]): Make sure to always set destX and destY.

2011-04-01 Anders Carlsson <andersca@apple.com>

Reviewed by Sam Weinig.

Shockwave plug-in doesn't accept mouse events
https://bugs.webkit.org/show_bug.cgi?id=57653
<rdar://problem/8483273>

Add a missing break.

  • WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm: (WebKit::NetscapePlugin::convertPoint):

2011-04-01 Anders Carlsson <andersca@apple.com>

Reviewed by Sam Weinig.

Shockwave plug-in doesn't accept mouse events
https://bugs.webkit.org/show_bug.cgi?id=57653
<rdar://problem/8483273>

Add test.

  • platform/mac/plugins/convert-point-expected.txt: Added.
  • platform/mac/plugins/convert-point.html: Added.

2011-02-09 Anders Carlsson <andersca@apple.com>

Reviewed by Sam Weinig.

Repro crash with Sony Google TV ad at Gizmodo
https://bugs.webkit.org/show_bug.cgi?id=54150
<rdar://problem/8782346>

Add a new plug-in test that runs JavaScript that destroys the plug-in from within its NPN_DestroyStream callback.

  • DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
  • DumpRenderTree/TestNetscapePlugIn/Tests/EvaluateJSDestroyingPluginFromDestroyStream.cpp: Added. (EvaluateJSDestroyingPluginFromDestroyStream::EvaluateJSDestroyingPluginFromDestroyStream): (EvaluateJSDestroyingPluginFromDestroyStream::NPP_Destroy): (EvaluateJSDestroyingPluginFromDestroyStream::NPP_DestroyStream):
  • DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePlugin.vcproj:
  • DumpRenderTree/qt/TestNetscapePlugin/TestNetscapePlugin.pro:
Location:
trunk
Files:
4 added
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r82721 r82723  
     12011-04-01  Anders Carlsson  <andersca@apple.com>
     2
     3        Reviewed by Sam Weinig.
     4
     5        Shockwave plug-in doesn't accept mouse events
     6        https://bugs.webkit.org/show_bug.cgi?id=57653
     7        <rdar://problem/8483273>
     8
     9        Add test.
     10
     11        * platform/mac/plugins/convert-point-expected.txt: Added.
     12        * platform/mac/plugins/convert-point.html: Added.
     13
    1142011-04-01  Dominic Cooney  <dominicc@google.com>
    215
  • trunk/Source/WebKit/mac/ChangeLog

    r82717 r82723  
     12011-04-01  Anders Carlsson  <andersca@apple.com>
     2
     3        Reviewed by Sam Weinig.
     4
     5        Shockwave plug-in doesn't accept mouse events
     6        https://bugs.webkit.org/show_bug.cgi?id=57653
     7        <rdar://problem/8483273>
     8
     9        Fix an unrelated bug found by the added test.
     10
     11        * Plugins/WebBaseNetscapePluginView.mm:
     12        (-[WebBaseNetscapePluginView convertFromX:andY:space:toX:andY:space:]):
     13        Make sure to always set destX and destY.
     14
    1152011-04-01  Alexey Proskuryakov  <ap@apple.com>
    216
  • trunk/Source/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm

    r75873 r82723  
    858858{
    859859    // Nothing to do
    860     if (sourceSpace == destSpace)
    861         return TRUE;
     860    if (sourceSpace == destSpace) {
     861        if (destX)
     862            *destX = sourceX;
     863        if (destY)
     864            *destY = sourceY;
     865        return YES;
     866    }
    862867   
    863868    NSPoint sourcePoint = NSMakePoint(sourceX, sourceY);
  • trunk/Source/WebKit2/ChangeLog

    r82719 r82723  
     12011-04-01  Anders Carlsson  <andersca@apple.com>
     2
     3        Reviewed by Sam Weinig.
     4
     5        Shockwave plug-in doesn't accept mouse events
     6        https://bugs.webkit.org/show_bug.cgi?id=57653
     7        <rdar://problem/8483273>
     8
     9        Add a missing break.
     10
     11        * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
     12        (WebKit::NetscapePlugin::convertPoint):
     13
    1142011-04-01  Sam Weinig  <sam@webkit.org>
    215
  • trunk/Source/WebKit2/WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm

    r82290 r82723  
    125125        sourceXInScreenSpace = sourceX;
    126126        sourceYInScreenSpace = flipScreenYCoordinate(sourceY);
     127        break;
    127128    default:
    128129        return false;
  • trunk/Tools/ChangeLog

    r82721 r82723  
     12011-02-09  Anders Carlsson  <andersca@apple.com>
     2
     3        Reviewed by Sam Weinig.
     4
     5        Repro crash with Sony Google TV ad at Gizmodo
     6        https://bugs.webkit.org/show_bug.cgi?id=54150
     7        <rdar://problem/8782346>
     8
     9        Add a new plug-in test that runs JavaScript that destroys the plug-in from within its NPN_DestroyStream callback.
     10
     11        * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
     12        * DumpRenderTree/TestNetscapePlugIn/Tests/EvaluateJSDestroyingPluginFromDestroyStream.cpp: Added.
     13        (EvaluateJSDestroyingPluginFromDestroyStream::EvaluateJSDestroyingPluginFromDestroyStream):
     14        (EvaluateJSDestroyingPluginFromDestroyStream::NPP_Destroy):
     15        (EvaluateJSDestroyingPluginFromDestroyStream::NPP_DestroyStream):
     16        * DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePlugin.vcproj:
     17        * DumpRenderTree/qt/TestNetscapePlugin/TestNetscapePlugin.pro:
     18
     19<<<<<<< .mine
     202011-04-01  Anders Carlsson  <andersca@apple.com>
     21
     22        Reviewed by Sam Weinig.
     23
     24        Shockwave plug-in doesn't accept mouse events
     25        https://bugs.webkit.org/show_bug.cgi?id=57653
     26        <rdar://problem/8483273>
     27
     28        Add a plug-in test.
     29
     30        * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
     31        * DumpRenderTree/TestNetscapePlugIn/PluginTest.cpp:
     32        (PluginTest::indicateTestFailure):
     33        Move code from NPDeallocateCalledBeforeNPShutdown::TestObject::~TestObject here.
     34
     35        (PluginTest::NPN_ConvertPoint):
     36        * DumpRenderTree/TestNetscapePlugIn/PluginTest.h:
     37        * DumpRenderTree/TestNetscapePlugIn/Tests/NPDeallocateCalledBeforeNPShutdown.cpp:
     38        (NPDeallocateCalledBeforeNPShutdown::TestObject::~TestObject):
     39        Call indicateTestFailure.
     40
     41        * DumpRenderTree/TestNetscapePlugIn/Tests/mac: Added.
     42        * DumpRenderTree/TestNetscapePlugIn/Tests/mac/ConvertPoint.cpp: Added.
     43        (ConvertPoint::ConvertPoint):
     44        (ConvertPoint::testConvert):
     45        (ConvertPoint::NPP_New):
     46
     47=======
    1482011-04-01  Dominic Cooney  <dominicc@google.com>
    249
     
    956        (LayoutTestController::shadowRoot):
    1057
     58>>>>>>> .r82722
    11592011-04-01  Sam Weinig  <sam@webkit.org>
    1260
  • trunk/Tools/DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj

    r81157 r82723  
    3737                1A215BE711F27658008AD0F5 /* DocumentOpenInDestroyStream.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A215A7511F26072008AD0F5 /* DocumentOpenInDestroyStream.cpp */; };
    3838                1A24BAA9120734EE00FBB059 /* NPRuntimeObjectFromDestroyedPlugin.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A24BAA8120734EE00FBB059 /* NPRuntimeObjectFromDestroyedPlugin.cpp */; };
     39                1A31EB3813466AC100017372 /* ConvertPoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A31EB3713466AC100017372 /* ConvertPoint.cpp */; };
    3940                1A3E28AA1311D73B00501349 /* GetURLWithJavaScriptURLDestroyingPlugin.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A3E28A91311D73B00501349 /* GetURLWithJavaScriptURLDestroyingPlugin.cpp */; };
    4041                1A8F02E80BB9B4EC008CFA34 /* TestObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A8F024C0BB9B056008CFA34 /* TestObject.h */; };
     
    210211                1A215A8011F2609C008AD0F5 /* PluginTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PluginTest.h; sourceTree = "<group>"; };
    211212                1A24BAA8120734EE00FBB059 /* NPRuntimeObjectFromDestroyedPlugin.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NPRuntimeObjectFromDestroyedPlugin.cpp; sourceTree = "<group>"; };
     213                1A31EB3713466AC100017372 /* ConvertPoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ConvertPoint.cpp; sourceTree = "<group>"; };
    212214                1A3E28A91311D73B00501349 /* GetURLWithJavaScriptURLDestroyingPlugin.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GetURLWithJavaScriptURLDestroyingPlugin.cpp; sourceTree = "<group>"; };
    213215                1A8F024C0BB9B056008CFA34 /* TestObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TestObject.h; sourceTree = "<group>"; };
     
    476478                        isa = PBXGroup;
    477479                        children = (
     480                                1A31EB3613466AC100017372 /* mac */,
    478481                                1A215A7511F26072008AD0F5 /* DocumentOpenInDestroyStream.cpp */,
    479482                                C0E720741281C828004EF533 /* EvaluateJSAfterRemovingPluginElement.cpp */,
     
    488491                        );
    489492                        path = Tests;
     493                        sourceTree = "<group>";
     494                };
     495                1A31EB3613466AC100017372 /* mac */ = {
     496                        isa = PBXGroup;
     497                        children = (
     498                                1A31EB3713466AC100017372 /* ConvertPoint.cpp */,
     499                        );
     500                        path = mac;
    490501                        sourceTree = "<group>";
    491502                };
     
    775786                                1A3E28AA1311D73B00501349 /* GetURLWithJavaScriptURLDestroyingPlugin.cpp in Sources */,
    776787                                1ACF898D132EF41C00E915D4 /* NPDeallocateCalledBeforeNPShutdown.cpp in Sources */,
     788                                1A31EB3813466AC100017372 /* ConvertPoint.cpp in Sources */,
    777789                        );
    778790                        runOnlyForDeploymentPostprocessing = 0;
  • trunk/Tools/DumpRenderTree/TestNetscapePlugIn/PluginTest.cpp

    r81157 r82723  
    7070}
    7171
     72void PluginTest::indicateTestFailure()
     73{
     74    // This should really be an assert, but there's no way for the test framework
     75    // to know that the plug-in process crashed, so we'll just sleep for a while
     76    // to ensure that the test times out.
     77#if defined(XP_WIN)
     78    ::Sleep(100000);
     79#else
     80    sleep(1000);
     81#endif
     82}
     83
    7284NPError PluginTest::NPP_New(NPMIMEType pluginType, uint16_t mode, int16_t argc, char *argn[], char *argv[], NPSavedData *saved)
    7385{
     
    136148}
    137149
     150#ifdef XP_MACOSX
     151bool PluginTest::NPN_ConvertPoint(double sourceX, double sourceY, NPCoordinateSpace sourceSpace, double *destX, double *destY, NPCoordinateSpace destSpace)
     152{
     153    return browser->convertpoint(m_npp, sourceX, sourceY, sourceSpace, destX, destY, destSpace);
     154}
     155#endif
     156
    138157void PluginTest::executeScript(const char* script)
    139158{
  • trunk/Tools/DumpRenderTree/TestNetscapePlugIn/PluginTest.h

    r81157 r82723  
    7474    NPObject* NPN_CreateObject(NPClass*);
    7575    bool NPN_RemoveProperty(NPObject*, NPIdentifier propertyName);
    76    
     76#ifdef XP_MACOSX
     77    bool NPN_ConvertPoint(double sourceX, double sourceY, NPCoordinateSpace sourceSpace, double *destX, double *destY, NPCoordinateSpace destSpace);
     78#endif
     79
    7780    void executeScript(const char*);
    7881
    7982    void registerNPShutdownFunction(void (*)());
     83
     84    static void indicateTestFailure();
    8085
    8186    template<typename TestClassTy> class Register {
  • trunk/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/NPDeallocateCalledBeforeNPShutdown.cpp

    r81160 r82723  
    4343        ~TestObject()
    4444        {
    45             // This should really be an assert, but there's no way for the test framework
    46             // to know that the plug-in process crashed, so we'll just sleep for a while
    47             // to ensure that the test times out.
    48             if (wasShutdownCalled) {
    49 #if defined(XP_WIN)
    50                 ::Sleep(100000);
    51 #else
    52                 sleep(1000);
    53 #endif
    54             }
     45            if (wasShutdownCalled)
     46                indicateTestFailure();
    5547        }
    5648    };
Note: See TracChangeset for help on using the changeset viewer.