Changeset 201904 in webkit
- Timestamp:
- Jun 9, 2016 8:31:00 PM (8 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r201902 r201904 1 2016-06-09 Zalan Bujtas <zalan@apple.com> 2 3 Add testing support for 3x device scale factor. 4 https://bugs.webkit.org/show_bug.cgi?id=158597 5 6 Reviewed by Simon Fraser. 7 8 Set 3x device scale factor on the test canvas when the test url is prefixed with hidpi-3x-. 9 10 * fast/hidpi/hidpi-3x-device-pixel-ratio-expected.txt: Added. 11 * fast/hidpi/hidpi-3x-device-pixel-ratio.html: Added. 12 1 13 2016-06-09 Ryosuke Niwa <rniwa@webkit.org> 2 14 -
trunk/Tools/ChangeLog
r201879 r201904 1 2016-06-09 Zalan Bujtas <zalan@apple.com> 2 3 Add testing support for 3x device scale factor. 4 https://bugs.webkit.org/show_bug.cgi?id=158597 5 6 Reviewed by Simon Fraser. 7 8 Set 3x device scale factor on the test canvas when the test url is prefixed with hidpi-3x-. 9 10 * DumpRenderTree/mac/DumpRenderTree.mm: 11 (changeWindowScaleIfNeeded): 12 * WebKitTestRunner/TestController.cpp: 13 (WTR::TestController::updateWindowScaleForTest): 14 * WebKitTestRunner/TestOptions.cpp: 15 (WTR::deviceScaleFactorForTest): 16 (WTR::TestOptions::TestOptions): 17 (WTR::isHiDPITestPath): Deleted. 18 * WebKitTestRunner/TestOptions.h: 19 1 20 2016-06-09 Michael Catanzaro <mcatanzaro@igalia.com> 2 21 -
trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm
r201863 r201904 1622 1622 static void changeWindowScaleIfNeeded(const char* testPathOrUR) 1623 1623 { 1624 bool hasHighDPIWindow = [[[mainFrame webView] window] backingScaleFactor] != 1;1625 1624 WTF::String localPathOrUrl = String(testPathOrUR); 1626 bool needsHighDPIWindow = localPathOrUrl.findIgnoringCase("/hidpi-") != notFound; 1627 if (hasHighDPIWindow == needsHighDPIWindow) 1625 float currentScaleFactor = [[[mainFrame webView] window] backingScaleFactor]; 1626 float requiredScaleFactor = 1; 1627 if (localPathOrUrl.findIgnoringCase("/hidpi-3x-") != notFound) 1628 requiredScaleFactor = 3; 1629 else if (localPathOrUrl.findIgnoringCase("/hidpi-") != notFound) 1630 requiredScaleFactor = 2; 1631 if (currentScaleFactor == requiredScaleFactor) 1628 1632 return; 1629 1630 CGFloat newScaleFactor = needsHighDPIWindow ? 2 : 1;1631 1633 // When the new scale factor is set on the window first, WebView doesn't see it as a new scale and stops propagating the behavior change to WebCore::Page. 1632 gTestRunner->setBackingScaleFactor( newScaleFactor);1633 [[[mainFrame webView] window] _setWindowResolution: newScaleFactor displayIfChanged:YES];1634 gTestRunner->setBackingScaleFactor(requiredScaleFactor); 1635 [[[mainFrame webView] window] _setWindowResolution:requiredScaleFactor displayIfChanged:YES]; 1634 1636 } 1635 1637 #endif -
trunk/Tools/WebKitTestRunner/TestController.cpp
r201464 r201904 991 991 void TestController::updateWindowScaleForTest(PlatformWebView* view, const TestInvocation& test) 992 992 { 993 view->changeWindowScaleIfNeeded(test.options(). isHiDPITest ? 2 : 1);993 view->changeWindowScaleIfNeeded(test.options().deviceScaleFactor); 994 994 } 995 995 -
trunk/Tools/WebKitTestRunner/TestOptions.cpp
r190335 r201904 57 57 } 58 58 59 static bool isHiDPITestPath(const std::string& pathOrURL)59 static float deviceScaleFactorForTest(const std::string& pathOrURL) 60 60 { 61 return pathContains(pathOrURL, "/hidpi-"); 61 if (pathContains(pathOrURL, "/hidpi-3x-")) 62 return 3; 63 if (pathContains(pathOrURL, "/hidpi-")) 64 return 2; 65 return 1; 62 66 } 63 67 … … 66 70 , useFixedLayout(shouldUseFixedLayout(pathOrURL)) 67 71 , isSVGTest(isSVGTestPath(pathOrURL)) 68 , isHiDPITest(isHiDPITestPath(pathOrURL))72 , deviceScaleFactor(deviceScaleFactorForTest(pathOrURL)) 69 73 { 70 74 } -
trunk/Tools/WebKitTestRunner/TestOptions.h
r200423 r201904 39 39 bool useFixedLayout { false }; 40 40 bool isSVGTest { false }; 41 bool isHiDPITest { false };42 41 bool useDataDetection { false }; 43 42 bool useMockScrollbars { true }; 44 43 bool needsSiteSpecificQuirks { false }; 45 44 45 float deviceScaleFactor { 1 }; 46 46 Vector<String> overrideLanguages; 47 47
Note: See TracChangeset
for help on using the changeset viewer.