Changeset 121872 in webkit
- Timestamp:
- Jul 4, 2012 3:06:39 PM (12 years ago)
- Location:
- trunk/Source/WebKit/blackberry
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/blackberry/Api/WebPage.cpp
r121824 r121872 6601 6601 } 6602 6602 6603 } 6604 } 6603 void WebPagePrivate::applySizeOverride(int overrideWidth, int overrideHeight) 6604 { 6605 m_client->requestUpdateViewport(overrideWidth, overrideHeight); 6606 } 6607 6608 void WebPagePrivate::setTextZoomFactor(float textZoomFactor) 6609 { 6610 if (!m_mainFrame) 6611 return; 6612 6613 m_mainFrame->setTextZoomFactor(textZoomFactor); 6614 } 6615 } 6616 } -
trunk/Source/WebKit/blackberry/Api/WebPageClient.h
r121626 r121872 127 127 virtual void zoomChanged(bool isMinZoomed, bool isMaxZoomed, bool isAtInitialZoom, double newZoom) const = 0; 128 128 129 virtual void requestUpdateViewport(int width, int height) = 0; 130 129 131 virtual void setPageTitle(const unsigned short* title, unsigned titleLength) = 0; 130 132 -
trunk/Source/WebKit/blackberry/Api/WebPage_p.h
r121626 r121872 441 441 void setInspectorOverlayClient(WebCore::InspectorOverlay::InspectorOverlayClient*); 442 442 443 void applySizeOverride(int overrideWidth, int overrideHeight); 444 void setTextZoomFactor(float); 445 443 446 WebPage* m_webPage; 444 447 WebPageClient* m_client; -
trunk/Source/WebKit/blackberry/ChangeLog
r121824 r121872 1 2012-07-04 Hanna Ma <Hanma@rim.com> 2 3 [BlackBerry] Implement device metrics for blackberry. 4 https://bugs.webkit.org/show_bug.cgi?id=90494 5 RIM PR #159034 6 7 Reviewed by Rob Buis. 8 9 Implement calls to the application to change the device metrics for 10 the web inspector. 11 12 * Api/WebPage.cpp: 13 (BlackBerry::WebKit::WebPagePrivate::applySizeOverride): 14 (WebKit): 15 (BlackBerry::WebKit::WebPagePrivate::setTextZoomFactor): 16 * Api/WebPage_p.h: 17 (WebPagePrivate): 18 * WebCoreSupport/InspectorClientBlackBerry.cpp: 19 (WebCore::InspectorClientBlackBerry::InspectorClientBlackBerry): 20 (WebCore::InspectorClientBlackBerry::canOverrideDeviceMetrics): 21 (WebCore): 22 (WebCore::InspectorClientBlackBerry::overrideDeviceMetrics): 23 (WebCore::InspectorClientBlackBerry::supportsFrameInstrumentation): 24 * WebCoreSupport/InspectorClientBlackBerry.h: 25 (InspectorClientBlackBerry): 26 1 27 2012-07-03 Leo Yang <leo.yang@torchmobile.com.cn> 2 28 -
trunk/Source/WebKit/blackberry/WebCoreSupport/InspectorClientBlackBerry.cpp
r121013 r121872 86 86 } 87 87 88 bool InspectorClientBlackBerry::canOverrideDeviceMetrics() 89 { 90 return true; 91 } 92 93 void InspectorClientBlackBerry::overrideDeviceMetrics(int width, int height, float fontScaleFactor, bool) 94 { 95 // Note: when width and height = 0, and fontScaleFactor = 1, this is the signal for restoring to default size. 96 m_webPagePrivate->applySizeOverride(width, height); 97 m_webPagePrivate->setTextZoomFactor(fontScaleFactor); 98 } 99 100 bool InspectorClientBlackBerry::supportsFrameInstrumentation() 101 { 102 return true; 103 } 104 88 105 void InspectorClientBlackBerry::updateInspectorStateCookie(const String& cookie) 89 106 { -
trunk/Source/WebKit/blackberry/WebCoreSupport/InspectorClientBlackBerry.h
r119046 r121872 54 54 virtual void paintInspectorOverlay(WebCore::GraphicsContext&); 55 55 56 virtual bool canOverrideDeviceMetrics(); 57 virtual void overrideDeviceMetrics(int, int, float, bool); 58 virtual bool supportsFrameInstrumentation(); 59 56 60 virtual void updateInspectorStateCookie(const String&); 57 61
Note: See TracChangeset
for help on using the changeset viewer.