Changeset 78010 in webkit
- Timestamp:
- Feb 8, 2011 7:30:30 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r78008 r78010 1 2011-02-08 Sailesh Agrawal <sail@chromium.org> 2 3 Reviewed by Kenneth Russell. 4 5 Invalidate rect doesn't work for windowless plugins on Chromium 6 https://bugs.webkit.org/show_bug.cgi?id=53117 7 8 Added a test to make sure that NPN_InvalidateRect() works correctly for windowless plugins. 9 10 * plugins/invalidate_rect-expected.txt: Added. 11 * plugins/invalidate_rect.html: Added. 12 1 13 2011-02-08 Mihai Parparita <mihaip@chromium.org> 2 14 -
trunk/LayoutTests/platform/chromium/test_expectations.txt
r78006 r78010 3244 3244 BUG_LOISLO : fast/invalid/residual-style.html = TEXT 3245 3245 BUG_LOIDLO : html5lib/runner.html = TEXT 3246 3247 BUGWK54051 MAC : plugins/invalidate_rect.html = FAIL -
trunk/Source/WebKit/chromium/ChangeLog
r77963 r78010 1 2011-02-08 Sailesh Agrawal <sail@chromium.org> 2 3 Reviewed by Kenneth Russell. 4 5 Invalidate rect doesn't work for windowless plugins on Chromium 6 https://bugs.webkit.org/show_bug.cgi?id=53117 7 8 Invalidate rect for windowless plugins wasn't working if the web page was composited. 9 10 The problem was that the invalidate call was causing simply dirtying the LayerChromium layers. Since the plugin was windowless this didn't cause the plugin to be repainted. 11 12 Fix was to copy the invalidate code from WebCore/plugins/PluginView.cpp/PluginView::invalidateWindowlessPluginRect() which does the correct thing. 13 14 Tested my fix on Windows and Mac and verified that the movie on http://apple.com/appltv correctly plays. Verified that windowed plugins still correctly draw as well. 15 16 * src/WebPluginContainerImpl.cpp: 17 (WebKit::WebPluginContainerImpl::invalidateRect): 18 1 19 2011-02-08 Adam Barth <abarth@webkit.org> 2 20 -
trunk/Source/WebKit/chromium/src/WebPluginContainerImpl.cpp
r77660 r78010 130 130 return; 131 131 132 IntRect damageRect = convertToContainingWindow(rect); 133 134 // Get our clip rect and intersect with it to ensure we don't invalidate 135 // too much. 136 IntRect clipRect = parent()->windowClipRect(); 137 damageRect.intersect(clipRect); 138 139 parent()->hostWindow()->invalidateContentsAndWindow(damageRect, false /*immediate*/); 132 RenderBox* renderer = toRenderBox(m_element->renderer()); 133 134 IntRect dirtyRect = rect; 135 dirtyRect.move(renderer->borderLeft() + renderer->paddingLeft(), 136 renderer->borderTop() + renderer->paddingTop()); 137 renderer->repaintRectangle(dirtyRect); 140 138 } 141 139 -
trunk/Tools/ChangeLog
r77998 r78010 1 2011-02-08 Sailesh Agrawal <sail@chromium.org> 2 3 Reviewed by Kenneth Russell. 4 5 Invalidate rect doesn't work for windowless plugins on Chromium 6 https://bugs.webkit.org/show_bug.cgi?id=53117 7 8 Added two new utility methods. 9 - layoutTestController.displayInvalidatedRegion() does a paint of any area that has been invalidated. This is different from layoutTestController.display() which explicitly invalidates the entire page then paints. 10 - plugin.invalidateRect(left, top, right, bottom) - invalidates the given rect 11 This is used to test that invalidating a rect correctly causes a repaint of the plugin. 12 13 * DumpRenderTree/LayoutTestController.cpp: 14 (displayInvalidatedRegionCallback): 15 (LayoutTestController::staticFunctions): 16 * DumpRenderTree/LayoutTestController.h: 17 * DumpRenderTree/TestNetscapePlugIn/PluginObject.cpp: 18 (invalidateRect): 19 (pluginInvoke): 20 * DumpRenderTree/chromium/LayoutTestController.cpp: 21 (LayoutTestController::LayoutTestController): 22 (LayoutTestController::displayInvalidatedRegion): 23 * DumpRenderTree/chromium/LayoutTestController.h: 24 * Scripts/webkitpy/layout_tests/port/chromium_gpu.py: 25 1 26 2011-02-08 Dirk Pranke <dpranke@chromium.org> 2 27 -
trunk/Tools/DumpRenderTree/LayoutTestController.cpp
r75966 r78010 446 446 } 447 447 448 static JSValueRef displayInvalidatedRegionCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) 449 { 450 // Has mac & windows implementation 451 LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject)); 452 // LayoutTestController::display() only renders the invalidated region so 453 // we can just use that. 454 controller->display(); 455 456 return JSValueMakeUndefined(context); 457 } 458 448 459 static JSValueRef encodeHostNameCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) 449 460 { … … 1981 1992 { "dispatchPendingLoadRequests", dispatchPendingLoadRequestsCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 1982 1993 { "display", displayCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 1994 { "displayInvalidatedRegion", displayInvalidatedRegionCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 1983 1995 { "dumpApplicationCacheDelegateCallbacks", dumpApplicationCacheDelegateCallbacksCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 1984 1996 { "dumpAsText", dumpAsTextCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, -
trunk/Tools/DumpRenderTree/LayoutTestController.h
r75966 r78010 60 60 void dispatchPendingLoadRequests(); 61 61 void display(); 62 void displayInvalidatedRegion(); 62 63 void execCommand(JSStringRef name, JSStringRef value); 63 64 bool findString(JSContextRef, JSStringRef, JSObjectRef optionsArray); -
trunk/Tools/DumpRenderTree/TestNetscapePlugIn/PluginObject.cpp
r73226 r78010 200 200 ID_RESIZE_TO, 201 201 ID_NORMALIZE, 202 ID_INVALIDATE_RECT, 202 203 NUM_METHOD_IDENTIFIERS 203 204 }; … … 240 241 "setStatus", 241 242 "resizeTo", 242 "normalize" 243 "normalize", 244 "invalidateRect" 243 245 }; 244 246 … … 987 989 } 988 990 991 static bool invalidateRect(PluginObject* obj, const NPVariant* args, uint32_t argCount, NPVariant* result) 992 { 993 if (argCount != 4) 994 return false; 995 996 NPRect rect; 997 rect.left = NPVARIANT_TO_DOUBLE(args[0]); 998 rect.top = NPVARIANT_TO_DOUBLE(args[1]); 999 rect.right = NPVARIANT_TO_DOUBLE(args[2]); 1000 rect.bottom = NPVARIANT_TO_DOUBLE(args[3]); 1001 1002 browser->invalidaterect(obj->npp, &rect); 1003 return true; 1004 } 989 1005 990 1006 static bool pluginInvoke(NPObject* header, NPIdentifier name, const NPVariant* args, uint32_t argCount, NPVariant* result) … … 1102 1118 if (name == pluginMethodIdentifiers[ID_NORMALIZE]) 1103 1119 return normalizeOverride(plugin, args, argCount, result); 1120 if (name == pluginMethodIdentifiers[ID_INVALIDATE_RECT]) 1121 return invalidateRect(plugin, args, argCount, result); 1104 1122 1105 1123 return false; -
trunk/Tools/DumpRenderTree/chromium/LayoutTestController.cpp
r77875 r78010 90 90 bindMethod("disableImageLoading", &LayoutTestController::disableImageLoading); 91 91 bindMethod("display", &LayoutTestController::display); 92 bindMethod("displayInvalidatedRegion", &LayoutTestController::displayInvalidatedRegion); 92 93 bindMethod("dumpAsText", &LayoutTestController::dumpAsText); 93 94 bindMethod("dumpBackForwardList", &LayoutTestController::dumpBackForwardList); … … 1085 1086 } 1086 1087 1088 void LayoutTestController::displayInvalidatedRegion(const CppArgumentList& arguments, CppVariant* result) 1089 { 1090 WebViewHost* host = m_shell->webViewHost(); 1091 host->paintInvalidatedRegion(); 1092 host->displayRepaintMask(); 1093 result->setNull(); 1094 } 1095 1087 1096 void LayoutTestController::testRepaint(const CppArgumentList&, CppVariant* result) 1088 1097 { -
trunk/Tools/DumpRenderTree/chromium/LayoutTestController.h
r76620 r78010 251 251 void setMainFrameIsFirstResponder(const CppArgumentList&, CppVariant*); 252 252 void display(const CppArgumentList&, CppVariant*); 253 void displayInvalidatedRegion(const CppArgumentList&, CppVariant*); 253 254 void testRepaint(const CppArgumentList&, CppVariant*); 254 255 void repaintSweepHorizontally(const CppArgumentList&, CppVariant*); -
trunk/Tools/Scripts/webkitpy/layout_tests/port/chromium_gpu.py
r77666 r78010 79 79 # in running the tests there. 80 80 paths += ['fast/canvas', 'canvas/philip'] 81 # invalidate_rect.html tests a bug in the compositor. 82 # See https://bugs.webkit.org/show_bug.cgi?id=53117 83 paths += ['plugins/invalidate_rect.html'] 81 84 return test_files.find(port, paths) 82 85
Note: See TracChangeset
for help on using the changeset viewer.