Changeset 208207 in webkit
- Timestamp:
- Oct 31, 2016, 7:43:47 PM (8 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r208204 r208207 1 2016-10-31 Simon Fraser <simon.fraser@apple.com> 2 3 Make UIScriptController::zoomToScale() work on Mac WK1 and WK2 4 https://bugs.webkit.org/show_bug.cgi?id=164238 5 6 Reviewed by Dean Jackson. 7 8 * fast/zooming/uiscript-zooming-expected.txt: Added. 9 * fast/zooming/uiscript-zooming.html: Added. 10 * platform/ios-simulator-wk1/TestExpectations: 11 1 12 2016-10-31 Joseph Pecoraro <pecoraro@apple.com> 2 13 -
trunk/LayoutTests/platform/ios-simulator-wk1/TestExpectations
r207155 r208207 100 100 editing/unsupported-content/table-type-after.html 101 101 editing/unsupported-content/table-type-before.html 102 103 # Zooming works differently in iOS DRT 104 fast/zooming/uiscript-zooming.html [ Failure ] 102 105 103 106 # FIXME: Tests that fail due to lack of textInputController <rdar://problem/5106287> -
trunk/Source/WebCore/ChangeLog
r208206 r208207 1 2016-10-31 Simon Fraser <simon.fraser@apple.com> 2 3 Make UIScriptController::zoomToScale() work on Mac WK1 and WK2 4 https://bugs.webkit.org/show_bug.cgi?id=164238 5 6 Reviewed by Dean Jackson. 7 8 Test: fast/zooming/uiscript-zooming.html 9 10 Expose pageScaleFactor() for tests. 11 12 * testing/Internals.cpp: 13 (WebCore::Internals::pageScaleFactor): 14 * testing/Internals.h: 15 * testing/Internals.idl: 16 1 17 2016-10-31 Myles C. Maxfield <mmaxfield@apple.com> 2 18 -
trunk/Source/WebCore/testing/Internals.cpp
r208149 r208207 2018 2018 } 2019 2019 2020 ExceptionOr<float> Internals::pageScaleFactor() const 2021 { 2022 Document* document = contextDocument(); 2023 if (!document || !document->page()) 2024 return Exception { INVALID_ACCESS_ERR }; 2025 2026 return document->page()->pageScaleFactor(); 2027 } 2028 2020 2029 ExceptionOr<void> Internals::setPageScaleFactor(float scaleFactor, int x, int y) 2021 2030 { -
trunk/Source/WebCore/testing/Internals.h
r208145 r208207 285 285 ExceptionOr<String> pageSizeAndMarginsInPixels(int pageNumber, int width, int height, int marginTop, int marginRight, int marginBottom, int marginLeft) const; 286 286 287 ExceptionOr<float> pageScaleFactor() const; 288 287 289 ExceptionOr<void> setPageScaleFactor(float scaleFactor, int x, int y); 288 290 ExceptionOr<void> setPageZoomFactor(float); -
trunk/Source/WebCore/testing/Internals.idl
r208135 r208207 279 279 280 280 [MayThrowException] void setPageScaleFactor(unrestricted float scaleFactor, long x, long y); 281 [MayThrowException] float pageScaleFactor(); 282 281 283 [MayThrowException] void setPageZoomFactor(unrestricted float zoomFactor); 282 284 [MayThrowException] void setTextZoomFactor(unrestricted float zoomFactor); -
trunk/Tools/ChangeLog
r208205 r208207 1 2016-10-31 Simon Fraser <simon.fraser@apple.com> 2 3 Make UIScriptController::zoomToScale() work on Mac WK1 and WK2 4 https://bugs.webkit.org/show_bug.cgi?id=164238 5 6 Reviewed by Dean Jackson. 7 8 Implement UIScriptController::zoomToScale() for WTR and DRT on Mac. 9 10 * DumpRenderTree/mac/UIScriptControllerMac.mm: 11 (WTR::UIScriptController::zoomToScale): 12 * TestRunnerShared/UIScriptContext/UIScriptController.cpp: 13 * WebKitTestRunner/mac/UIScriptControllerMac.mm: 14 (WTR::UIScriptController::zoomToScale): 15 1 16 2016-10-31 Dewei Zhu <dewei_zhu@apple.com> 2 17 -
trunk/Tools/DumpRenderTree/mac/UIScriptControllerMac.mm
r208143 r208207 27 27 #import "UIScriptController.h" 28 28 29 #import "DumpRenderTree.h" 29 30 #import "UIScriptContext.h" 31 #import <WebKit/WebKit.h> 32 #import <WebKit/WebViewPrivate.h> 30 33 31 34 #if PLATFORM(MAC) … … 48 51 } 49 52 53 void UIScriptController::zoomToScale(double scale, JSValueRef callback) 54 { 55 unsigned callbackID = m_context->prepareForAsyncTask(callback, CallbackTypeNonPersistent); 56 57 WebView *webView = [mainFrame webView]; 58 [webView _scaleWebView:scale atOrigin:NSZeroPoint]; 59 60 dispatch_async(dispatch_get_main_queue(), ^ { 61 if (!m_context) 62 return; 63 m_context->asyncTaskComplete(callbackID); 64 }); 65 } 66 50 67 } 51 68 -
trunk/Tools/TestRunnerShared/UIScriptContext/UIScriptController.cpp
r208143 r208207 158 158 } 159 159 160 #if !PLATFORM(COCOA) 161 void UIScriptController::zoomToScale(double, JSValueRef) 162 { 163 } 164 #endif 165 160 166 #if !PLATFORM(IOS) 161 void UIScriptController::zoomToScale(double, JSValueRef)162 {163 }164 165 167 void UIScriptController::touchDownAtPoint(long x, long y, long touchCount, JSValueRef) 166 168 { -
trunk/Tools/WebKitTestRunner/mac/UIScriptControllerMac.mm
r208143 r208207 67 67 } 68 68 69 void UIScriptController::zoomToScale(double scale, JSValueRef callback) 70 { 71 #if WK_API_ENABLED 72 unsigned callbackID = m_context->prepareForAsyncTask(callback, CallbackTypeNonPersistent); 73 74 auto* webView = TestController::singleton().mainWebView()->platformView(); 75 [webView _setPageScale:scale withOrigin:CGPointZero]; 76 77 [webView _doAfterNextPresentationUpdate: ^ { 78 if (!m_context) 79 return; 80 m_context->asyncTaskComplete(callbackID); 81 }]; 82 #else 83 UNUSED_PARAM(scale); 84 UNUSED_PARAM(callback); 85 #endif 69 86 } 87 88 } // namespace WTR
Note:
See TracChangeset
for help on using the changeset viewer.