Skip to content
  • bdakin@apple.com's avatar
    Fix for https://bugs.webkit.org/show_bug.cgi?id=48385 Add WebKit · 6df87f49
    bdakin@apple.com authored
    SPI to scale a WebView
    -and corresponding-
    <rdar://problem/8107667>
    
    Reviewed by Darin Adler.
    
    WebCore: 
    
    This patch adds SPI to Mac WebKit that scales the page by the given 
    scale factor. The scale factor is factored into the RenderStyle's 
    transform.
    
    Set the current pageScale for the document.
    * css/CSSStyleSelector.cpp:
    (WebCore::CSSStyleSelector::styleForDocument):
    
    Frame keeps track of the page scale factor. When 
    scalePage() is called, it modifies the RenderView's style to 
    include a transform of the appropriate scale and forces a style 
    recalc.
    * page/Frame.cpp:
    (WebCore::Frame::Frame):
    (WebCore::Frame::scalePage):
    * page/Frame.h:
    (WebCore::Frame::pageScaleFactor):
    * WebCore.exp.in:
    
    Add a scale to the transformation matrix.
    * rendering/style/RenderStyle.cpp:
    (WebCore::RenderStyle::setPageScaleTransform):
    * rendering/style/RenderStyle.h:
    
    WebKit/mac: 
    
    This patch adds SPI to Mac WebKit that scales the page by the given 
    scale factor.
    
    * WebView/WebView.mm:
    (-[WebView _scaleWebView:]):
    (-[WebView _viewScaleFactor]):
    * WebView/WebViewPrivate.h:
    
    WebKit2: 
    
    This patch adds SPI to Mac WebKit that scales the page by the given 
    scale factor.
    
    Implement scaleWebView(), which tells WebCore::Frame to scale, and 
    viewScaleFactor() which returns the current scale factor.
    * Shared/API/c/WKSharedAPICast.h:
    * UIProcess/API/C/WKPage.cpp:
    (WKPageScaleWebView):
    (WKPageGetViewScaleFactor):
    * UIProcess/API/C/WKPage.h:
    * UIProcess/WebPageProxy.cpp:
    (WebKit::WebPageProxy::WebPageProxy):
    (WebKit::WebPageProxy::scaleWebView):
    * UIProcess/WebPageProxy.h:
    (WebKit::WebPageProxy::viewScaleFactor):
    * WebProcess/WebPage/WebPage.cpp:
    (WebKit::WebPage::scaleWebView):
    (WebKit::WebPage::viewScaleFactor):
    * WebProcess/WebPage/WebPage.h:
    * WebProcess/WebPage/WebPage.messages.in:
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@70716 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    6df87f49