Changeset 202858 in webkit
- Timestamp:
- Jul 6, 2016 9:57:25 AM (8 years ago)
- Location:
- trunk/Source
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r202857 r202858 1 2016-07-06 Commit Queue <commit-queue@webkit.org> 2 3 Unreviewed, rolling out r202725. 4 https://bugs.webkit.org/show_bug.cgi?id=159473 5 6 didn't reduce coreui memory usage (Requested by kling on 7 #webkit). 8 9 Reverted changeset: 10 11 "[Mac] Get rid of the old timey rubber-banding linen pattern." 12 https://bugs.webkit.org/show_bug.cgi?id=159329 13 http://trac.webkit.org/changeset/202725 14 1 15 2016-07-06 Philippe Normand <pnormand@igalia.com> 2 16 -
trunk/Source/WebCore/platform/ScrollbarTheme.h
r202725 r202858 92 92 93 93 #if ENABLE(RUBBER_BANDING) 94 virtual void setUpOverhangAreasLayerContents(GraphicsLayer*, const Color&) { } 94 95 virtual void setUpContentShadowLayer(GraphicsLayer*) { } 95 96 #endif -
trunk/Source/WebCore/platform/graphics/GraphicsLayer.cpp
r202725 r202858 895 895 switch (customAppearance) { 896 896 case GraphicsLayer::CustomAppearance::NoCustomAppearance: ts << "none"; break; 897 case GraphicsLayer::CustomAppearance::ScrollingOverhang: ts << "scrolling-overhang"; break; 897 898 case GraphicsLayer::CustomAppearance::ScrollingShadow: ts << "scrolling-shadow"; break; 898 899 case GraphicsLayer::CustomAppearance::LightBackdropAppearance: ts << "light-backdrop"; break; -
trunk/Source/WebCore/platform/graphics/GraphicsLayer.h
r202725 r202858 482 482 virtual void setDebugBorder(const Color&, float /*borderWidth*/) { } 483 483 484 enum CustomAppearance { NoCustomAppearance, Scrolling Shadow, LightBackdropAppearance, DarkBackdropAppearance };484 enum CustomAppearance { NoCustomAppearance, ScrollingOverhang, ScrollingShadow, LightBackdropAppearance, DarkBackdropAppearance }; 485 485 virtual void setCustomAppearance(CustomAppearance customAppearance) { m_customAppearance = customAppearance; } 486 486 CustomAppearance customAppearance() const { return m_customAppearance; } -
trunk/Source/WebCore/platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm
r202725 r202858 952 952 case GraphicsLayer::LightBackdropAppearance: 953 953 case GraphicsLayer::DarkBackdropAppearance: 954 ScrollbarThemeMac::removeOverhangAreaBackground(platformLayer()); 954 955 ScrollbarThemeMac::removeOverhangAreaShadow(platformLayer()); 956 break; 957 case GraphicsLayer::ScrollingOverhang: 958 ScrollbarThemeMac::setUpOverhangAreaBackground(platformLayer()); 955 959 break; 956 960 case GraphicsLayer::ScrollingShadow: -
trunk/Source/WebCore/platform/mac/ScrollbarThemeMac.h
r202725 r202858 69 69 70 70 #if ENABLE(RUBBER_BANDING) 71 WEBCORE_EXPORT static void setUpOverhangAreaBackground(CALayer *, const Color& customBackgroundColor = Color()); 72 WEBCORE_EXPORT static void removeOverhangAreaBackground(CALayer *); 73 71 74 WEBCORE_EXPORT static void setUpOverhangAreaShadow(CALayer *); 72 75 WEBCORE_EXPORT static void removeOverhangAreaShadow(CALayer *); … … 90 93 91 94 #if ENABLE(RUBBER_BANDING) 95 void setUpOverhangAreasLayerContents(GraphicsLayer*, const Color&) override; 92 96 void setUpContentShadowLayer(GraphicsLayer*) override; 93 97 #endif -
trunk/Source/WebCore/platform/mac/ScrollbarThemeMac.mm
r202725 r202858 48 48 using namespace WebCore; 49 49 50 @interface NSColor (WebNSColorDetails) 51 + (NSImage *)_linenPatternImage; 52 @end 53 50 54 namespace WebCore { 51 55 … … 561 565 562 566 #if ENABLE(RUBBER_BANDING) 567 static RetainPtr<CGColorRef> linenBackgroundColor() 568 { 569 NSImage *image = nil; 570 CGImageRef cgImage = nullptr; 571 BEGIN_BLOCK_OBJC_EXCEPTIONS; 572 image = [NSColor _linenPatternImage]; 573 cgImage = [image CGImageForProposedRect:NULL context:NULL hints:nil]; 574 END_BLOCK_OBJC_EXCEPTIONS; 575 576 if (!cgImage) 577 return nullptr; 578 579 RetainPtr<CGPatternRef> pattern = adoptCF(wkCGPatternCreateWithImageAndTransform(cgImage, CGAffineTransformIdentity, wkPatternTilingNoDistortion)); 580 RetainPtr<CGColorSpaceRef> colorSpace = adoptCF(CGColorSpaceCreatePattern(0)); 581 582 const CGFloat alpha = 1.0; 583 return adoptCF(CGColorCreateWithPattern(colorSpace.get(), pattern.get(), &alpha)); 584 } 585 586 void ScrollbarThemeMac::setUpOverhangAreaBackground(CALayer *layer, const Color& customBackgroundColor) 587 { 588 static CGColorRef cachedLinenBackgroundColor = linenBackgroundColor().leakRef(); 589 // We operate on the CALayer directly here, since GraphicsLayer doesn't have the concept 590 // of pattern images, and we know that WebCore won't touch this layer. 591 layer.backgroundColor = customBackgroundColor.isValid() ? cachedCGColor(customBackgroundColor) : cachedLinenBackgroundColor; 592 } 593 594 void ScrollbarThemeMac::removeOverhangAreaBackground(CALayer *layer) 595 { 596 layer.backgroundColor = nil; 597 } 598 563 599 void ScrollbarThemeMac::setUpOverhangAreaShadow(CALayer *layer) 564 600 { … … 584 620 } 585 621 622 void ScrollbarThemeMac::setUpOverhangAreasLayerContents(GraphicsLayer* graphicsLayer, const Color& customBackgroundColor) 623 { 624 ScrollbarThemeMac::setUpOverhangAreaBackground(graphicsLayer->platformLayer(), customBackgroundColor); 625 } 626 586 627 void ScrollbarThemeMac::setUpContentShadowLayer(GraphicsLayer* graphicsLayer) 587 628 { -
trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp
r202725 r202858 3271 3271 3272 3272 m_layerForOverhangAreas->setBackgroundColor(m_rootExtendedBackgroundColor); 3273 3274 if (!m_rootExtendedBackgroundColor.isValid()) 3275 m_layerForOverhangAreas->setCustomAppearance(GraphicsLayer::ScrollingOverhang); 3273 3276 #endif 3274 3277 } … … 3291 3294 m_layerForOverhangAreas->setPosition(FloatPoint(0, topContentInset)); 3292 3295 m_layerForOverhangAreas->setAnchorPoint(FloatPoint3D()); 3293 m_layerForOverhangAreas->setBackgroundColor(m_renderView.frameView().documentBackgroundColor()); 3296 3297 if (m_renderView.frameView().frame().settings().backgroundShouldExtendBeyondPage()) 3298 m_layerForOverhangAreas->setBackgroundColor(m_renderView.frameView().documentBackgroundColor()); 3299 else 3300 m_layerForOverhangAreas->setCustomAppearance(GraphicsLayer::ScrollingOverhang); 3294 3301 3295 3302 // We want the overhang areas layer to be positioned below the frame contents, -
trunk/Source/WebKit2/ChangeLog
r202855 r202858 1 2016-07-06 Commit Queue <commit-queue@webkit.org> 2 3 Unreviewed, rolling out r202725. 4 https://bugs.webkit.org/show_bug.cgi?id=159473 5 6 didn't reduce coreui memory usage (Requested by kling on 7 #webkit). 8 9 Reverted changeset: 10 11 "[Mac] Get rid of the old timey rubber-banding linen pattern." 12 https://bugs.webkit.org/show_bug.cgi?id=159329 13 http://trac.webkit.org/changeset/202725 14 1 15 2016-07-06 Carlos Garcia Campos <cgarcia@igalia.com> 2 16 -
trunk/Source/WebKit2/Shared/mac/RemoteLayerTreePropertyApplier.mm
r202725 r202858 112 112 case GraphicsLayer::DarkBackdropAppearance: 113 113 case GraphicsLayer::LightBackdropAppearance: 114 ScrollbarThemeMac::removeOverhangAreaBackground(layer); 114 115 ScrollbarThemeMac::removeOverhangAreaShadow(layer); 116 break; 117 case GraphicsLayer::ScrollingOverhang: 118 ScrollbarThemeMac::setUpOverhangAreaBackground(layer); 115 119 break; 116 120 case GraphicsLayer::ScrollingShadow:
Note: See TracChangeset
for help on using the changeset viewer.