Changeset 65029 in webkit
- Timestamp:
- Aug 9, 2010 6:43:05 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r65019 r65029 1 2010-08-09 Sam Weinig <sam@webkit.org> 2 3 Reviewed by Geoffrey Garen. 4 5 Add zoom support for injected bundle 6 https://bugs.webkit.org/show_bug.cgi?id=43759 7 8 * platform/mac-wk2/Skipped: Remove now passing tests. 9 1 10 2010-08-09 Ryosuke Niwa <rniwa@webkit.org> 2 11 -
trunk/LayoutTests/platform/mac-wk2/Skipped
r64985 r65029 234 234 fast/css/hover-affects-child.html 235 235 fast/css/hover-subselector.html 236 fast/css/ignore-text-zoom.html237 236 fast/css/layerZOrderCrash.html 238 237 fast/css/list-item-pseudo-nocrash.html … … 243 242 fast/css/universal-hover-quirk.html 244 243 fast/css/user-drag-none.html 245 fast/css/zoom-body-scroll.html246 244 fast/dom/Document/CaretRangeFromPoint/caretRangeFromPoint-in-zoom-and-scroll.html 247 fast/dom/Document/CaretRangeFromPoint/hittest-relative-to-viewport.html248 fast/dom/elementFromPoint-relative-to-viewport.html249 245 fast/dom/HTMLTableColElement/resize-table-using-col-width.html 250 246 fast/dom/Node/mutation-blur.html … … 516 512 platform/mac/fast/forms/listbox-scrollbar-hit-test.html 517 513 platform/mac/fast/overflow/overflow-scrollbar-hit-test.html 518 plugins/createScriptableObject-before-start.html519 plugins/destroy-during-npp-new.html520 514 plugins/resize-from-plugin.html 521 515 scrollbars/overflow-custom-scrollbar-crash.html … … 580 574 svg/custom/stroke-width-click.svg 581 575 svg/custom/text-hit-test.svg 582 svg/custom/text-zoom.xhtml583 576 svg/custom/use-clipped-hit.svg 584 577 svg/custom/use-css-events.svg … … 807 800 svg/text/selection-doubleclick.svg 808 801 svg/text/selection-tripleclick.svg 809 svg/zoom/page/absolute-sized-document-no-scrollbars.svg810 svg/zoom/page/absolute-sized-document-scrollbars.svg811 svg/zoom/page/relative-sized-document-scrollbars.svg812 802 svg/zoom/page/zoom-coords-viewattr-01-b.svg 813 svg/zoom/page/zoom-foreignObject.svg814 svg/zoom/page/zoom-hixie-mixed-008.xml815 svg/zoom/page/zoom-hixie-mixed-009.xml816 svg/zoom/page/zoom-hixie-rendering-model-004.xhtml817 svg/zoom/page/zoom-svg-float-border-padding.xml818 svg/zoom/text/absolute-sized-document-no-scrollbars.svg819 svg/zoom/text/absolute-sized-document-scrollbars.svg820 svg/zoom/text/relative-sized-document-scrollbars.svg821 803 svg/zoom/text/zoom-coords-viewattr-01-b.svg 822 svg/zoom/text/zoom-foreignObject.svg823 svg/zoom/text/zoom-hixie-mixed-008.xml824 svg/zoom/text/zoom-hixie-mixed-009.xml825 svg/zoom/text/zoom-hixie-rendering-model-004.xhtml826 svg/zoom/text/zoom-svg-float-border-padding.xml827 804 828 805 # WebKitTestRunner needs to support layoutTestController.setXSSAuditorEnabled -
trunk/WebKit2/ChangeLog
r65021 r65029 1 2010-08-09 Sam Weinig <sam@webkit.org> 2 3 Reviewed by Geoffrey Garen. 4 5 Add zoom support for injected bundle 6 https://bugs.webkit.org/show_bug.cgi?id=43759 7 8 Add SPI to change the zoom factor for a page. 9 10 * WebProcess/InjectedBundle/API/c/WKBundleAPICast.h: 11 (toZoomMode): 12 * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp: 13 (WKBundlePageGetZoomFactor): 14 (WKBundlePageSetZoomFactor): 15 (WKBundlePageSetZoomMode): 16 * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h: 17 * WebProcess/WebPage/WebPage.cpp: 18 (WebKit::WebPage::zoomFactor): 19 (WebKit::WebPage::setZoomFactor): 20 (WebKit::WebPage::setZoomMode): 21 * WebProcess/WebPage/WebPage.h: 22 1 23 2010-08-06 Gavin Barraclough <barraclough@apple.com> 2 24 -
trunk/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleAPICast.h
r64788 r65029 29 29 #include "WKBundleBase.h" 30 30 #include "WKBundlePage.h" 31 #include "WKBundlePagePrivate.h" 31 32 #include <WebCore/EditorInsertAction.h> 32 33 #include <WebCore/TextAffinity.h> 34 #include <WebCore/ZoomMode.h> 33 35 34 36 namespace WebCore { … … 113 115 } 114 116 117 inline WebCore::ZoomMode toZoomMode(WKBundlePageZoomMode wkZoomMode) 118 { 119 switch (wkZoomMode) { 120 case kWKBundlePageZoomModeTextOnly: 121 return WebCore::ZoomTextOnly; 122 case kWKBundlePageZoomModePage: 123 return WebCore::ZoomPage; 124 } 125 126 ASSERT_NOT_REACHED(); 127 return WebCore::ZoomTextOnly; 128 } 129 115 130 #endif // WKBundleAPICast_h -
trunk/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.cpp
r64862 r65029 92 92 toWK(pageRef)->sendClose(); 93 93 } 94 95 float WKBundlePageGetZoomFactor(WKBundlePageRef pageRef) 96 { 97 return toWK(pageRef)->zoomFactor(); 98 } 99 100 void WKBundlePageSetZoomFactor(WKBundlePageRef pageRef, float zoomFactor) 101 { 102 toWK(pageRef)->setZoomFactor(zoomFactor); 103 } 104 105 void WKBundlePageSetZoomMode(WKBundlePageRef pageRef, WKBundlePageZoomMode zoomMode) 106 { 107 toWK(pageRef)->setZoomMode(toZoomMode(zoomMode)); 108 } -
trunk/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h
r64485 r65029 34 34 #endif 35 35 36 enum WKBundlePageZoomMode { 37 kWKBundlePageZoomModePage = 0, 38 kWKBundlePageZoomModeTextOnly = 1 39 }; 40 typedef enum WKBundlePageZoomMode WKBundlePageZoomMode; 41 36 42 WK_EXPORT bool WKBundlePageIsEditingCommandEnabled(WKBundlePageRef page, WKStringRef commandName); 37 43 WK_EXPORT void WKBundlePageClearMainFrameName(WKBundlePageRef page); … … 40 46 WK_EXPORT void WKBundlePageExecuteEditingCommand(WKBundlePageRef page, WKStringRef commandName, WKStringRef argument); 41 47 48 WK_EXPORT float WKBundlePageGetZoomFactor(WKBundlePageRef page); 49 WK_EXPORT void WKBundlePageSetZoomFactor(WKBundlePageRef page, float zoomFactor); 50 WK_EXPORT void WKBundlePageSetZoomMode(WKBundlePageRef page, WKBundlePageZoomMode zoomMode); 51 42 52 #ifdef __cplusplus 43 53 } -
trunk/WebKit2/WebProcess/WebPage/WebPage.cpp
r65021 r65029 311 311 } 312 312 313 float WebPage::zoomFactor() const 314 { 315 if (Frame* coreFrame = m_mainFrame->coreFrame()) { 316 if (FrameView* view = coreFrame->view()) 317 return view->zoomFactor(); 318 } 319 320 return 1.0f; 321 } 322 323 void WebPage::setZoomFactor(float zoomFactor) 324 { 325 if (Frame* coreFrame = m_mainFrame->coreFrame()) { 326 if (FrameView* view = coreFrame->view()) 327 return view->setZoomFactor(zoomFactor, m_page->settings()->zoomMode()); 328 } 329 } 330 331 void WebPage::setZoomMode(ZoomMode mode) 332 { 333 m_page->settings()->setZoomMode(mode); 334 } 335 313 336 // Events 314 337 -
trunk/WebKit2/WebProcess/WebPage/WebPage.h
r65021 r65029 35 35 #include <WebCore/FrameLoaderTypes.h> 36 36 #include <WebCore/IntRect.h> 37 #include <WebCore/ZoomMode.h> 37 38 #include <wtf/Forward.h> 38 39 #include <wtf/HashMap.h> … … 114 115 void clearMainFrameName(); 115 116 void sendClose(); 117 118 float zoomFactor() const; 119 void setZoomFactor(float); 120 void setZoomMode(WebCore::ZoomMode); 116 121 117 122 #if USE(ACCELERATED_COMPOSITING) … … 151 156 void platformPreferencesDidChange(const WebPreferencesStore&); 152 157 void didReceivePolicyDecision(WebFrame*, uint64_t listenerID, WebCore::PolicyAction policyAction); 153 158 154 159 WebCore::Page* m_page; 155 160 RefPtr<WebFrame> m_mainFrame; -
trunk/WebKitTools/ChangeLog
r65028 r65029 1 2010-08-09 Sam Weinig <sam@webkit.org> 2 3 Reviewed by Geoffrey Garen. 4 5 Add zoom support for injected bundle 6 https://bugs.webkit.org/show_bug.cgi?id=43759 7 8 Use zoom factor SPI to implement zoom related eventSender functions. 9 10 * WebKitTestRunner/InjectedBundle/Bindings/EventSendingController.idl: 11 * WebKitTestRunner/InjectedBundle/EventSendingController.cpp: 12 (WTR::EventSendingController::textZoomIn): 13 (WTR::EventSendingController::textZoomOut): 14 (WTR::EventSendingController::zoomPageIn): 15 (WTR::EventSendingController::zoomPageOut): 16 * WebKitTestRunner/InjectedBundle/EventSendingController.h: 17 * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp: 18 (WTR::InjectedBundlePage::reset): Reset zoom mode and level for each test. 19 1 20 2010-08-09 Gavin Barraclough <barraclough@apple.com> 2 21 -
trunk/WebKitTools/WebKitTestRunner/InjectedBundle/Bindings/EventSendingController.idl
r64985 r65029 35 35 36 36 // Zoom functions. 37 [CustomArgumentHandling] void textZoomIn(); // CustomArgumentHandling only to throw exception while not implemented.38 [CustomArgumentHandling] void textZoomOut(); // CustomArgumentHandling only to throw exception while not implemented.39 [CustomArgumentHandling] void zoomPageIn(); // CustomArgumentHandling only to throw exception while not implemented.40 [CustomArgumentHandling] void zoomPageOut(); // CustomArgumentHandling only to throw exception while not implemented.37 void textZoomIn(); 38 void textZoomOut(); 39 void zoomPageIn(); 40 void zoomPageOut(); 41 41 }; 42 42 -
trunk/WebKitTools/WebKitTestRunner/InjectedBundle/EventSendingController.cpp
r64985 r65029 27 27 28 28 #include "InjectedBundle.h" 29 #include "InjectedBundlePage.h" 29 30 #include "JSEventSendingController.h" 31 #include <WebKit2/WKBundlePage.h> 32 #include <WebKit2/WKBundlePagePrivate.h> 30 33 #include <WebKit2/WKBundlePrivate.h> 31 34 32 35 namespace WTR { 36 37 static const float ZoomMultiplierRatio = 1.2f; 33 38 34 39 PassRefPtr<EventSendingController> EventSendingController::create() … … 86 91 } 87 92 88 void EventSendingController::textZoomIn( JSContextRef context, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)93 void EventSendingController::textZoomIn() 89 94 { 90 setExceptionForString(context, exception, "EventSender.textZoomIn is not yet supported."); 95 WKBundlePageSetZoomMode(InjectedBundle::shared().page()->page(), kWKBundlePageZoomModeTextOnly); 96 float zoomFactor = WKBundlePageGetZoomFactor(InjectedBundle::shared().page()->page()); 97 WKBundlePageSetZoomFactor(InjectedBundle::shared().page()->page(), zoomFactor * ZoomMultiplierRatio); 91 98 } 92 99 93 void EventSendingController::textZoomOut( JSContextRef context, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)100 void EventSendingController::textZoomOut() 94 101 { 95 setExceptionForString(context, exception, "EventSender.textZoomOut is not yet supported."); 102 WKBundlePageSetZoomMode(InjectedBundle::shared().page()->page(), kWKBundlePageZoomModeTextOnly); 103 float zoomFactor = WKBundlePageGetZoomFactor(InjectedBundle::shared().page()->page()); 104 WKBundlePageSetZoomFactor(InjectedBundle::shared().page()->page(), zoomFactor / ZoomMultiplierRatio); 96 105 } 97 106 98 void EventSendingController::zoomPageIn( JSContextRef context, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)107 void EventSendingController::zoomPageIn() 99 108 { 100 setExceptionForString(context, exception, "EventSender.zoomPageIn is not yet supported."); 109 WKBundlePageSetZoomMode(InjectedBundle::shared().page()->page(), kWKBundlePageZoomModePage); 110 float zoomFactor = WKBundlePageGetZoomFactor(InjectedBundle::shared().page()->page()); 111 WKBundlePageSetZoomFactor(InjectedBundle::shared().page()->page(), zoomFactor * ZoomMultiplierRatio); 101 112 } 102 113 103 void EventSendingController::zoomPageOut( JSContextRef context, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)114 void EventSendingController::zoomPageOut() 104 115 { 105 setExceptionForString(context, exception, "EventSender.zoomPageOut is not yet supported."); 116 WKBundlePageSetZoomMode(InjectedBundle::shared().page()->page(), kWKBundlePageZoomModePage); 117 float zoomFactor = WKBundlePageGetZoomFactor(InjectedBundle::shared().page()->page()); 118 WKBundlePageSetZoomFactor(InjectedBundle::shared().page()->page(), zoomFactor / ZoomMultiplierRatio); 106 119 } 107 120 -
trunk/WebKitTools/WebKitTestRunner/InjectedBundle/EventSendingController.h
r64985 r65029 49 49 void leapForward(JSContextRef context, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception); 50 50 51 void textZoomIn(JSContextRef context, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception); 52 void textZoomOut(JSContextRef context, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception); 53 void zoomPageIn(JSContextRef context, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception); 54 void zoomPageOut(JSContextRef context, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception); 51 // Zoom functions. 52 void textZoomIn(); 53 void textZoomOut(); 54 void zoomPageIn(); 55 void zoomPageOut(); 55 56 56 57 private: -
trunk/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp
r64985 r65029 151 151 { 152 152 WKBundlePageClearMainFrameName(m_page); 153 154 WKBundlePageSetZoomFactor(m_page, 1.0f); 155 WKBundlePageSetZoomMode(m_page, kWKBundlePageZoomModePage); 153 156 } 154 157
Note: See TracChangeset
for help on using the changeset viewer.