Skip to content
  • fsamuel@chromium.org's avatar
    [Chromium] Plumb DPI info into PlatformScreen · a33350a3
    fsamuel@chromium.org authored
    https://bugs.webkit.org/show_bug.cgi?id=70556
    
    Source/WebCore:
    
    Reviewed by Darin Fisher.
    
    Make DPI information accessible from WebKit through
    PlatformScreen. This is useful when making scaling
    computations on various devices (e.g. Viewport meta tag).
    
    This patch adds DPI plumbing on Chromium Win/Mac/Linux
    platforms.
    
    * page/Screen.cpp:
    (WebCore::Screen::horizontalDPI):
    (WebCore::Screen::verticalDPI):
    * page/Screen.h:
    * platform/PlatformScreen.h:
    * platform/chromium/PlatformScreenChromium.cpp:
    (WebCore::screenHorizontalDPI):
    (WebCore::screenVerticalDPI):
    * platform/chromium/PlatformSupport.h:
    * platform/efl/PlatformScreenEfl.cpp:
    (WebCore::screenHorizontalDPI):
    (WebCore::screenVerticalDPI):
    * platform/gtk/PlatformScreenGtk.cpp:
    (WebCore::screenHorizontalDPI):
    (WebCore::screenVerticalDPI):
    * platform/mac/PlatformScreenMac.mm:
    (WebCore::screenHorizontalDPI):
    (WebCore::screenVerticalDPI):
    * platform/qt/PlatformScreenQt.cpp:
    (WebCore::screenHorizontalDPI):
    (WebCore::screenVerticalDPI):
    * platform/win/PlatformScreenWin.cpp:
    (WebCore::screenHorizontalDPI):
    (WebCore::screenVerticalDPI):
    
    Source/WebKit/chromium:
    
    Reviewed by Darin Fisher.
    
    Make DPI information accessible from WebKit through
    PlatformScreen. This is useful when making scaling
    computations on various devices (e.g. Viewport meta tag).
    
    This patch adds DPI plumbing on Chromium Win/Mac/Linux
    platforms.
    
    * public/WebScreenInfo.h:
    (WebKit::WebScreenInfo::WebScreenInfo):
    * src/PlatformSupport.cpp:
    (WebCore::PlatformSupport::screenHorizontalDPI):
    (WebCore::PlatformSupport::screenVerticalDPI):
    * src/mac/WebScreenInfoFactory.mm:
    (WebKit::WebScreenInfoFactory::screenInfo):
    * src/win/WebScreenInfoFactory.cpp:
    (WebKit::WebScreenInfoFactory::screenInfo):
    * src/x11/WebScreenInfoFactory.cpp:
    (WebKit::WebScreenInfoFactory::screenInfo):
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@102301 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    a33350a3