Skip to content
  • bdakin@apple.com's avatar
    Need a way to test the tile cache with margins enabled · d99f20e7
    bdakin@apple.com authored
    https://bugs.webkit.org/show_bug.cgi?id=127194
    -and corresponding-
    <rdar://problem/15571327>
    
    Reviewed by Tim Horton.
    
    Source/WebCore: 
    
    This patch adds a new function to InternalSettings that will allow layout tests to 
    flip the setting Settings::setBackgroundShouldExtendBeyondPage(). This patch also         
    makes changing that setting take effect immediately. 
    
    To make this setting dynamic, we can no longer generate the Setting function, so 
    we have to export the symbol manually.
    * WebCore.exp.in:
    
    This new function on FrameView will call into RenderLayerBacking to add or remove 
    margins.
    * page/FrameView.cpp:
    (WebCore::FrameView::setBackgroundExtendsBeyondPage):
    * page/FrameView.h:
    
    Again, we’re no longer using the boiler-plate generated Setting functions, so now 
    we can call into FrameView to make the background extend.
    * page/Settings.cpp:
    (WebCore::Settings::Settings):
    (WebCore::Settings::setBackgroundShouldExtendBeyondPage):
    * page/Settings.h:
    (WebCore::Settings::backgroundShouldExtendBeyondPage):
    * page/Settings.in:
    
    Whenever tile margins are set, call setNeedsRevalidateTiles() to make the change 
    dynamic.
    * platform/graphics/ca/mac/TileController.mm:
    (WebCore::TileController::setTileMargins):
    
    Move the call to TiledBacking::setTileMargins() into a helper function so that the 
    same code can be used for FrameView.
    * rendering/RenderLayerBacking.cpp:
    (WebCore::RenderLayerBacking::RenderLayerBacking):
    (WebCore::RenderLayerBacking::setTiledBackingHasMargins):
    * rendering/RenderLayerBacking.h:
    
    New InternalSetting.
    * testing/InternalSettings.cpp:
    (WebCore::InternalSettings::setBackgroundShouldExtendBeyondPage):
    * testing/InternalSettings.h:
    * testing/InternalSettings.idl:
    
    Source/WebKit: 
    
    Attempt to keep Windows building.
    
    * WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in:
    
    LayoutTests: 
    
    * platform/mac-wk2/tiled-drawing/simple-document-with-margin-tiles-expected.txt: Added.
    * platform/mac-wk2/tiled-drawing/simple-document-with-margin-tiles.html: Added.
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162230 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    d99f20e7