Skip to content
  • simon.fraser@apple.com's avatar
    Move displayID stuff from Widget to Chrome · 711a579a
    simon.fraser@apple.com authored
    https://bugs.webkit.org/show_bug.cgi?id=117944
    
    Reviewed by Anders Carlsson.
    
    In r151877 I polluted Widget with displayID-related stuff. This would
    be better on HostWindow, so move it there. This is a net code reduction,
    and eliminates PlatformScreenMac.h, and the NSScreen category.
    
    Source/WebCore:
    
    * WebCore.exp.in: Remove some functions from the exports list.
    * WebCore.xcodeproj/project.pbxproj: PlatformScreenMac.h is gone!
    * dom/Document.cpp:
    (WebCore::Document::requestAnimationFrame): Get the displayID from page->chrome()
    * page/Chrome.cpp:
    (WebCore::Chrome::Chrome): Initialize m_displayID.
    (WebCore::Chrome::displayID):
    (WebCore::Chrome::windowScreenDidChange): Code moved from Page; save the
    displayID, and tell all subframes that the displayID changed.
    * page/Chrome.h: Add displayID-related functions.
    * page/FrameView.cpp: Removed windowDisplayID().
    * page/FrameView.h: Ditto.
    * page/Page.cpp: Removed code.
    (WebCore::Page::Page):
    * page/Page.h:
    * platform/HostWindow.h: Added virtual displayID-related functions.
    * platform/Widget.cpp: Removed code.
    * platform/Widget.h: Ditto.
    * platform/mac/PlatformScreenMac.h: Removed.
    * platform/mac/PlatformScreenMac.mm: Removed the NSScreen category.
    (WebCore::displayIDFromScreen):
    (WebCore::screenForDisplayID):
    (WebCore::displayFromWidget):
    (WebCore::screenForWidget):
    * platform/mac/WidgetMac.mm: Removed windowDisplayID().
    * rendering/RenderLayerCompositor.cpp:
    (WebCore::RenderLayerCompositor::notifyFlushBeforeDisplayRefresh): Get
    the displayID via chrome().
    
    Source/WebKit/mac:
    
    * WebView/WebView.mm:
    (-[WebView doWindowDidChangeScreen]): Go via chrome().
    
    Source/WebKit2:
    
    * WebProcess/WebPage/WebPage.cpp:
    (WebKit::WebPage::windowScreenDidChange): Go via chrome().
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151926 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    711a579a