Changeset 70265 in webkit
- Timestamp:
- Oct 21, 2010 2:40:47 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r70263 r70265 1 2010-10-21 Adam Roben <aroben@apple.com> 2 3 Test that the plugin's HWND is invalidated when NPN_InvalidateRect is 4 called 5 6 Fixes <http://webkit.org/b/48086> <rdar://problem/8482944> Silverlight 7 doesn't repaint in WebKit2 8 9 Reviewed by Anders Carlsson. 10 11 * platform/win/plugins/npn-invalidate-rect-invalidates-window-expected.txt: Added. 12 * platform/win/plugins/npn-invalidate-rect-invalidates-window.html: Added. 13 1 14 2010-10-21 David Hyatt <hyatt@apple.com> 2 15 -
trunk/WebKit2/ChangeLog
r70261 r70265 1 2010-10-21 Adam Roben <aroben@apple.com> 2 3 Invalidate the plugin's HWND when NPN_InvalidateRect is called 4 5 Fixes <http://webkit.org/b/48086> <rdar://problem/8482944> Silverlight 6 doesn't repaint in WebKit2 7 8 Reviewed by Anders Carlsson. 9 10 * WebProcess/Plugins/Netscape/NetscapePlugin.cpp: 11 (WebKit::NetscapePlugin::invalidate): Call platformInvalidate before 12 invalidating via the PluginController. 13 14 * WebProcess/Plugins/Netscape/NetscapePlugin.h: Added platformInvalidate. 15 16 * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm: 17 (WebKit::NetscapePlugin::platformInvalidate): 18 * WebProcess/Plugins/Netscape/qt/NetscapePluginQt.cpp: 19 (WebKit::NetscapePlugin::platformInvalidate): 20 Stubbed out. 21 22 * WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp: 23 (WebKit::NetscapePlugin::platformInvalidate): If the plugin is 24 windowed, invalidate its HWND via ::InvalidateRect. 25 1 26 2010-10-21 Anders Carlsson <andersca@apple.com> 2 27 -
trunk/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.cpp
r70190 r70265 96 96 invalidRect->right - invalidRect->left, invalidRect->bottom - invalidRect->top); 97 97 98 if (platformInvalidate(rect)) 99 return; 100 98 101 m_pluginController->invalidate(rect); 99 102 } -
trunk/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.h
r69155 r70265 113 113 bool platformPostInitialize(); 114 114 void platformDestroy(); 115 bool platformInvalidate(const WebCore::IntRect&); 115 116 void platformGeometryDidChange(); 116 117 void platformPaint(WebCore::GraphicsContext*, const WebCore::IntRect& dirtyRect); -
trunk/WebKit2/WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm
r69985 r70265 161 161 } 162 162 163 bool NetscapePlugin::platformInvalidate(const IntRect&) 164 { 165 return false; 166 } 167 163 168 void NetscapePlugin::platformGeometryDidChange() 164 169 { -
trunk/WebKit2/WebProcess/Plugins/Netscape/qt/NetscapePluginQt.cpp
r68988 r70265 44 44 { 45 45 notImplemented(); 46 } 47 48 bool NetscapePlugin::platformInvalidate(const IntRect&) 49 { 50 notImplemented(); 51 return false; 46 52 } 47 53 -
trunk/WebKit2/WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp
r68988 r70265 94 94 } 95 95 96 bool NetscapePlugin::platformInvalidate(const IntRect& invalidRect) 97 { 98 if (!m_isWindowed) 99 return false; 100 101 RECT rect = invalidRect; 102 ::InvalidateRect(m_window, &rect, FALSE); 103 return true; 104 } 105 96 106 void NetscapePlugin::platformGeometryDidChange() 97 107 { -
trunk/WebKitTools/ChangeLog
r70264 r70265 1 2010-10-21 Adam Roben <aroben@apple.com> 2 3 Test that the plugin's HWND is invalidated when NPN_InvalidateRect is 4 called 5 6 Test for <http://webkit.org/b/48086> <rdar://problem/8482944> 7 Silverlight doesn't repaint in WebKit2 8 9 Reviewed by Anders Carlsson. 10 11 * DumpRenderTree/TestNetscapePlugIn/PluginTest.cpp: 12 (PluginTest::NPN_InvalidateRect): Added. Calls through to the browser. 13 (executeScript): Added. Asks the browser to evaluate the script. 14 15 (PluginTest::waitUntilDone): 16 (PluginTest::notifyDone): 17 Added. Calls through to layoutTestController. 18 19 * DumpRenderTree/TestNetscapePlugIn/PluginTest.h: Added 20 * NPN_InvalidateRect and waitUntilDone/notifyDone. 21 22 * DumpRenderTree/TestNetscapePlugIn/Tests/win/NPNInvalidateRectInvalidatesWindow.cpp: Added. 23 (TemporaryWindowMover::moveSucceeded): 24 (TemporaryWindowMover::TemporaryWindowMover): 25 (TemporaryWindowMover::~TemporaryWindowMover): 26 This class moves a window on-screen and shows it, then moves it back and hides it. 27 28 (NPNInvalidateRectInvalidatesWindow::NPNInvalidateRectInvalidatesWindow): 29 Initialize our members. 30 (NPNInvalidateRectInvalidatesWindow::~NPNInvalidateRectInvalidatesWindow): 31 Delete our window mover if it hasn't been deleted already. 32 (NPNInvalidateRectInvalidatesWindow::NPP_SetWindow): Subclass the 33 plugin HWND and move the test harness window on screen. 34 (NPNInvalidateRectInvalidatesWindow::wndProc): Call through to onPaint 35 when we get a WM_PAINT message. 36 (NPNInvalidateRectInvalidatesWindow::onPaint): Do the test and tell 37 LayoutTestController we're done. 38 (NPNInvalidateRectInvalidatesWindow::testInvalidateRect): Validate 39 ourselves, invalidate our lower-right quadrant via NPN_InvalidateRect, 40 then check that our HWND's invalid region is the rect that we 41 invalidated. 42 43 * DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePlugin.vcproj: 44 * Added NPNInvalidateRectInvalidatesWindow. 45 1 46 2010-10-21 Daniel Bates <dbates@rim.com> 2 47 -
trunk/WebKitTools/DumpRenderTree/TestNetscapePlugIn/PluginTest.cpp
r68891 r70265 27 27 28 28 #include <assert.h> 29 #include <string.h> 29 30 30 31 using namespace std; … … 66 67 } 67 68 69 void PluginTest::NPN_InvalidateRect(NPRect* invalidRect) 70 { 71 browser->invalidaterect(m_npp, invalidRect); 72 } 73 68 74 NPIdentifier PluginTest::NPN_GetStringIdentifier(const NPUTF8 *name) 69 75 { … … 91 97 } 92 98 99 static void executeScript(NPP npp, const char* script) 100 { 101 NPObject* windowScriptObject; 102 browser->getvalue(npp, NPNVWindowNPObject, &windowScriptObject); 103 104 NPString npScript; 105 npScript.UTF8Characters = script; 106 npScript.UTF8Length = strlen(script); 107 108 NPVariant browserResult; 109 browser->evaluate(npp, windowScriptObject, &npScript, &browserResult); 110 browser->releasevariantvalue(&browserResult); 111 } 112 113 void PluginTest::waitUntilDone() 114 { 115 executeScript(m_npp, "layoutTestController.waitUntilDone()"); 116 } 117 118 void PluginTest::notifyDone() 119 { 120 executeScript(m_npp, "layoutTestController.notifyDone()"); 121 } 122 93 123 void PluginTest::registerCreateTestFunction(const string& identifier, CreateTestFunction createTestFunction) 94 124 { -
trunk/WebKitTools/DumpRenderTree/TestNetscapePlugIn/PluginTest.h
r68891 r70265 61 61 62 62 // NPN functions. 63 void NPN_InvalidateRect(NPRect* invalidRect); 63 64 NPIdentifier NPN_GetStringIdentifier(const NPUTF8* name); 64 65 NPIdentifier NPN_GetIntIdentifier(int32_t intid); … … 88 89 89 90 const std::string& identifier() const { return m_identifier; } 91 92 void waitUntilDone(); 93 void notifyDone(); 90 94 91 95 // NPObject helper template. -
trunk/WebKitTools/DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePlugin.vcproj
r70190 r70265 399 399 </File> 400 400 <File 401 RelativePath="..\Tests\win\NPNInvalidateRectInvalidatesWindow.cpp" 402 > 403 </File> 404 <File 401 405 RelativePath="..\Tests\win\WindowGeometryInitializedBeforeSetWindow.cpp" 402 406 >
Note: See TracChangeset
for help on using the changeset viewer.