Changeset 202532 in webkit
- Timestamp:
- Jun 27, 2016, 6:44:41 PM (9 years ago)
- Location:
- trunk
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/LayoutTests/ChangeLog ¶
r202531 r202532 1 2016-06-27 Simon Fraser <simon.fraser@apple.com> 2 3 [iOS] Make DumpRenderTree and WebKitTestRunner in the simulator use render server snapshotting 4 https://bugs.webkit.org/show_bug.cgi?id=159077 5 6 Reviewed by Tim Horton. 7 8 fast/harness/snapshot-captures-compositing.html passes now. 9 10 * platform/ios-simulator-wk2/TestExpectations: 11 1 12 2016-06-27 Benjamin Poulain <benjamin@webkit.org> 2 13 -
TabularUnified trunk/LayoutTests/platform/ios-simulator-wk2/TestExpectations ¶
r202525 r202532 1900 1900 1901 1901 webkit.org/b/157990 [ Release ] mathml/wbr-in-mroot-crash.html [ Pass Timeout ] 1902 1903 webkit.org/b/159077 fast/harness/snapshot-captures-compositing.html [ ImageOnlyFailure ] -
TabularUnified trunk/Source/WebKit2/ChangeLog ¶
r202529 r202532 1 2016-06-27 Simon Fraser <simon.fraser@apple.com> 2 3 [iOS] Make DumpRenderTree and WebKitTestRunner in the simulator use render server snapshotting 4 https://bugs.webkit.org/show_bug.cgi?id=159077 5 6 Reviewed by Tim Horton. 7 8 Fix WebPageProxy::forceRepaint() to correctly wait for the next commit from the web process, 9 which is necessary for UI-side compositing. 10 11 * UIProcess/WebPageProxy.cpp: 12 (WebKit::WebPageProxy::forceRepaint): 13 1 14 2016-06-27 Joseph Pecoraro <pecoraro@apple.com> 2 15 -
TabularUnified trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp ¶
r202511 r202532 2889 2889 } 2890 2890 2891 uint64_t callbackID = callback->callbackID(); 2892 m_callbacks.put(callback); 2891 std::function<void (CallbackBase::Error)> didForceRepaintCallback = [this, callback](CallbackBase::Error error) { 2892 callAfterNextPresentationUpdate([callback](CallbackBase::Error error) { 2893 if (error != CallbackBase::Error::None) { 2894 callback->invalidate(error); 2895 return; 2896 } 2897 2898 callback->performCallback(); 2899 }); 2900 }; 2901 2902 uint64_t callbackID = m_callbacks.put(didForceRepaintCallback, m_process->throttler().backgroundActivityToken()); 2893 2903 m_drawingArea->waitForBackingStoreUpdateOnNextPaint(); 2894 2904 m_process->send(Messages::WebPage::ForceRepaint(callbackID), m_pageID); -
TabularUnified trunk/Tools/ChangeLog ¶
r202523 r202532 1 2016-06-27 Simon Fraser <simon.fraser@apple.com> 2 3 [iOS] Make DumpRenderTree and WebKitTestRunner in the simulator use render server snapshotting 4 https://bugs.webkit.org/show_bug.cgi?id=159077 5 6 Reviewed by Tim Horton. 7 8 Re-enable render server snapshotting for iOS WTR via the change in InjectedBundlePage.cpp. 9 10 Fix WebPageProxy::forceRepaint() to correctly wait for the next commit from the web process, 11 which is necessary for UI-side compositing. 12 13 Add some null checks to fix issues when the WKWebView gets resized to be empty, which 14 seems to happen for some tests that call window.resizeTo(). 15 16 * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp: 17 (WTR::InjectedBundlePage::dump): Deleted. 18 * WebKitTestRunner/TestInvocation.cpp: 19 (WTR::TestInvocation::dumpResults): 20 * WebKitTestRunner/cg/TestInvocationCG.cpp: 21 (WTR::createCGContextFromImage): 22 (WTR::computeMD5HashStringForContext): 23 (WTR::TestInvocation::dumpPixelsAndCompareWithExpected): 24 * WebKitTestRunner/ios/PlatformWebViewIOS.mm: 25 (WTR::PlatformWebView::windowSnapshotImage): 26 1 27 2016-06-27 Gyuyoung Kim <gyuyoung.kim@webkit.org> 2 28 -
TabularUnified trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp ¶
r202412 r202532 896 896 897 897 if (injectedBundle.shouldDumpPixels() && injectedBundle.testRunner()->shouldDumpPixels()) { 898 #if PLATFORM(IOS)899 // PlatformWebView::windowSnapshotImage() has timing problems, so use WebProcess snapshots for now.900 bool shouldCreateSnapshot = true;901 #else902 898 bool shouldCreateSnapshot = injectedBundle.testRunner()->isPrinting(); 903 #endif904 899 if (shouldCreateSnapshot) { 905 900 WKSnapshotOptions options = kWKSnapshotOptionsShareable; -
TabularUnified trunk/Tools/WebKitTestRunner/TestInvocation.cpp ¶
r202511 r202532 249 249 return; 250 250 } 251 251 252 WKRetainPtr<WKImageRef> windowSnapshot = TestController::singleton().mainWebView()->windowSnapshotImage(); 252 ASSERT(windowSnapshot);253 253 dumpPixelsAndCompareWithExpected(windowSnapshot.get(), m_repaintRects.get(), TestInvocation::SnapshotResultType::WebView); 254 254 } -
TabularUnified trunk/Tools/WebKitTestRunner/cg/TestInvocationCG.cpp ¶
r198242 r202532 58 58 RetainPtr<CGColorSpaceRef> colorSpace = adoptCF(CGColorSpaceCreateDeviceRGB()); 59 59 CGContextRef context = CGBitmapContextCreate(0, pixelsWide, pixelsHigh, 8, rowBytes, colorSpace.get(), kCGImageAlphaPremultipliedFirst | kCGBitmapByteOrder32Host); 60 if (!context) 61 return nullptr; 60 62 61 62 63 CGContextDrawImage(context, CGRectMake(0, 0, pixelsWide, pixelsHigh), image.get()); 63 64 64 return context; 65 65 } … … 67 67 void computeMD5HashStringForContext(CGContextRef bitmapContext, char hashString[33]) 68 68 { 69 if (!bitmapContext) { 70 WTFLogAlways("computeMD5HashStringForContext: context is null\n"); 71 return; 72 } 69 73 ASSERT(CGBitmapContextGetBitsPerPixel(bitmapContext) == 32); // ImageDiff assumes 32 bit RGBA, we must as well. 70 74 size_t pixelsHigh = CGBitmapContextGetHeight(bitmapContext); … … 145 149 void TestInvocation::dumpPixelsAndCompareWithExpected(WKImageRef image, WKArrayRef repaintRects, SnapshotResultType snapshotType) 146 150 { 151 if (!image) { 152 WTFLogAlways("dumpPixelsAndCompareWithExpected: image is null\n"); 153 return; 154 } 155 147 156 RetainPtr<CGContextRef> context = adoptCF(createCGContextFromImage(image)); 157 if (!context) { 158 WTFLogAlways("dumpPixelsAndCompareWithExpected: context is null\n"); 159 return; 160 } 148 161 149 162 // A non-null repaintRects array means we're doing a repaint test. -
TabularUnified trunk/Tools/WebKitTestRunner/ios/PlatformWebViewIOS.mm ¶
r202411 r202532 213 213 int bufferWidth = ceil(viewSize.width * deviceScaleFactor); 214 214 int bufferHeight = ceil(viewSize.height * deviceScaleFactor); 215 if (!bufferWidth || !bufferHeight) { 216 WTFLogAlways("Being asked for snapshot of view with width %d height %d\n", bufferWidth, bufferHeight); 217 return nullptr; 218 } 215 219 216 220 CARenderServerBufferRef buffer = CARenderServerCreateBuffer(bufferWidth, bufferHeight);
Note:
See TracChangeset
for help on using the changeset viewer.