Title: [192830] trunk/Source/WebCore
Revision
192830
Author
timothy_hor...@apple.com
Date
2015-11-30 14:19:09 -0800 (Mon, 30 Nov 2015)

Log Message

Get rid of the legacy TextIndicatorWindow style
https://bugs.webkit.org/show_bug.cgi?id=151674

Reviewed by Anders Carlsson.

* page/TextIndicator.h:
* page/mac/TextIndicatorWindow.mm:
(-[WebTextIndicatorView initWithFrame:textIndicator:margin:offset:]): Deleted.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (192829 => 192830)


--- trunk/Source/WebCore/ChangeLog	2015-11-30 22:17:58 UTC (rev 192829)
+++ trunk/Source/WebCore/ChangeLog	2015-11-30 22:19:09 UTC (rev 192830)
@@ -1,3 +1,14 @@
+2015-11-30  Tim Horton  <timothy_hor...@apple.com>
+
+        Get rid of the legacy TextIndicatorWindow style
+        https://bugs.webkit.org/show_bug.cgi?id=151674
+
+        Reviewed by Anders Carlsson.
+
+        * page/TextIndicator.h:
+        * page/mac/TextIndicatorWindow.mm:
+        (-[WebTextIndicatorView initWithFrame:textIndicator:margin:offset:]): Deleted.
+
 2015-11-30  Brady Eidson  <beid...@apple.com>
 
         Modern IDB: Correct handling of cursors finishing iteration.

Modified: trunk/Source/WebCore/page/TextIndicator.h (192829 => 192830)


--- trunk/Source/WebCore/page/TextIndicator.h	2015-11-30 22:17:58 UTC (rev 192829)
+++ trunk/Source/WebCore/page/TextIndicator.h	2015-11-30 22:19:09 UTC (rev 192830)
@@ -32,12 +32,6 @@
 #include <wtf/RefCounted.h>
 #include <wtf/Vector.h>
 
-#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101000
-#define ENABLE_LEGACY_TEXT_INDICATOR_STYLE 1
-#else
-#define ENABLE_LEGACY_TEXT_INDICATOR_STYLE 0
-#endif
-
 namespace WebCore {
 
 class Frame;
@@ -107,11 +101,7 @@
     // FIXME: These are fairly Mac-specific, and they don't really belong here.
     // But they're needed at TextIndicator creation time, so they can't go in TextIndicatorWindow.
     // Maybe they can live in some Theme code somewhere?
-#if ENABLE(LEGACY_TEXT_INDICATOR_STYLE)
-    constexpr static float defaultHorizontalMargin { 3 };
-#else
     constexpr static float defaultHorizontalMargin { 2 };
-#endif
     constexpr static float defaultVerticalMargin { 1 };
 
     WEBCORE_EXPORT static Ref<TextIndicator> create(const TextIndicatorData&);

Modified: trunk/Source/WebCore/page/mac/TextIndicatorWindow.mm (192829 => 192830)


--- trunk/Source/WebCore/page/mac/TextIndicatorWindow.mm	2015-11-30 22:17:58 UTC (rev 192829)
+++ trunk/Source/WebCore/page/mac/TextIndicatorWindow.mm	2015-11-30 22:19:09 UTC (rev 192830)
@@ -42,14 +42,6 @@
 const CFTimeInterval timeBeforeFadeStarts = bounceAnimationDuration + 0.2;
 const CFTimeInterval fadeOutAnimationDuration = 0.3;
 
-#if ENABLE(LEGACY_TEXT_INDICATOR_STYLE)
-const CGFloat midBounceScale = 1.5;
-const CGFloat borderWidth = 1.0;
-const CGFloat cornerRadius = 3;
-const CGFloat dropShadowOffsetX = 0;
-const CGFloat dropShadowOffsetY = 1;
-const CGFloat dropShadowBlurRadius = 1.5;
-#else
 const CGFloat midBounceScale = 1.25;
 const CGFloat borderWidth = 0;
 const CGFloat cornerRadius = 0;
@@ -57,7 +49,6 @@
 const CGFloat dropShadowOffsetY = 1;
 const CGFloat dropShadowBlurRadius = 2;
 const CGFloat rimShadowBlurRadius = 1;
-#endif
 
 NSString *textLayerKey = @"TextLayer";
 NSString *dropShadowLayerKey = @"DropShadowLayer";
@@ -182,8 +173,6 @@
     RetainPtr<CGColorRef> dropShadowColor = [NSColor colorWithDeviceWhite:0 alpha:0.2].CGColor;
 
     RetainPtr<CGColorRef> borderColor = [NSColor colorWithDeviceRed:.96 green:.90 blue:0 alpha:1].CGColor;
-    RetainPtr<CGColorRef> gradientDarkColor = [NSColor colorWithDeviceRed:.929 green:.8 blue:0 alpha:1].CGColor;
-    RetainPtr<CGColorRef> gradientLightColor = [NSColor colorWithDeviceRed:.949 green:.937 blue:0 alpha:1].CGColor;
 
     Vector<FloatRect> textRectsInBoundingRectCoordinates = _textIndicator->textRectsInBoundingRectCoordinates();
 
@@ -222,7 +211,6 @@
         [bounceLayer addSublayer:dropShadowLayer.get()];
         [bounceLayer setValue:dropShadowLayer.get() forKey:dropShadowLayerKey];
 
-#if !ENABLE(LEGACY_TEXT_INDICATOR_STYLE)
         RetainPtr<CALayer> rimShadowLayer = adoptNS([[CALayer alloc] init]);
         [rimShadowLayer setDelegate:[WebActionDisablingCALayerDelegate shared]];
         [rimShadowLayer setFrame:yellowHighlightRect];
@@ -234,14 +222,8 @@
         [rimShadowLayer setFrame:yellowHighlightRect];
         [bounceLayer addSublayer:rimShadowLayer.get()];
         [bounceLayer setValue:rimShadowLayer.get() forKey:rimShadowLayerKey];
-#endif
 
-#if ENABLE(LEGACY_TEXT_INDICATOR_STYLE)
-        RetainPtr<CAGradientLayer> textLayer = adoptNS([[CAGradientLayer alloc] init]);
-        [textLayer setColors:@[ (id)gradientLightColor.get(), (id)gradientDarkColor.get() ]];
-#else
         RetainPtr<CALayer> textLayer = adoptNS([[CALayer alloc] init]);
-#endif
         [textLayer setBackgroundColor:highlightColor.get()];
         [textLayer setBorderColor:borderColor.get()];
         [textLayer setBorderWidth:borderWidth];
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to