Title: [164199] trunk/Source/WebCore
Revision
164199
Author
psola...@apple.com
Date
2014-02-16 16:50:37 -0800 (Sun, 16 Feb 2014)

Log Message

[iOS] WebKit crashes if text is copied to pasteboard with style containing text-shadow
https://bugs.webkit.org/show_bug.cgi?id=128888
<rdar://problem/16065699>

Reviewed by Anders Carlsson.

Use the correct class on iOS so that we don't crash.

* platform/mac/HTMLConverter.mm:
(_shadowForShadowStyle):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (164198 => 164199)


--- trunk/Source/WebCore/ChangeLog	2014-02-16 22:59:55 UTC (rev 164198)
+++ trunk/Source/WebCore/ChangeLog	2014-02-17 00:50:37 UTC (rev 164199)
@@ -1,3 +1,16 @@
+2014-02-16  Pratik Solanki  <psola...@apple.com>
+
+        [iOS] WebKit crashes if text is copied to pasteboard with style containing text-shadow
+        https://bugs.webkit.org/show_bug.cgi?id=128888
+        <rdar://problem/16065699>
+
+        Reviewed by Anders Carlsson.
+
+        Use the correct class on iOS so that we don't crash.
+
+        * platform/mac/HTMLConverter.mm:
+        (_shadowForShadowStyle):
+
 2014-02-16  Andreas Kling  <akl...@apple.com>
 
         Atomicize frequently identical ResourceResponse string members.

Modified: trunk/Source/WebCore/platform/mac/HTMLConverter.mm (164198 => 164199)


--- trunk/Source/WebCore/platform/mac/HTMLConverter.mm	2014-02-16 22:59:55 UTC (rev 164198)
+++ trunk/Source/WebCore/platform/mac/HTMLConverter.mm	2014-02-17 00:50:37 UTC (rev 164199)
@@ -137,6 +137,7 @@
 #define PlatformNSTextTab           getNSTextTabClass()
 #define PlatformColor               UIColor
 #define PlatformColorClass          getUIColorClass()
+#define PlatformNSColorClass        getNSColorClass()
 #define PlatformFont                UIFont
 #define PlatformFontClass           getUIFontClass()
 #else
@@ -150,6 +151,7 @@
 #define PlatformNSTextTab           NSTextTab
 #define PlatformColor               NSColor
 #define PlatformColorClass          NSColor
+#define PlatformNSColorClass        NSColor
 #define PlatformFont                NSFont
 #define PlatformFontClass           NSFont
 
@@ -274,7 +276,6 @@
 
 @interface NSColor : UIColor
 + (id)colorWithCalibratedRed:(CGFloat)red green:(CGFloat)green blue:(CGFloat)blue alpha:(CGFloat)alpha;
-+ (id)colorWithCalibratedWhite:(CGFloat)white alpha:(CGFloat)alpha;
 @end
 
 @interface UIFont
@@ -880,7 +881,7 @@
             CGFloat green = [[components objectAtIndex:1] floatValue] / 255;
             CGFloat blue = [[components objectAtIndex:2] floatValue] / 255;
             CGFloat alpha = ([components count] >= 4) ? [[components objectAtIndex:3] floatValue] / 255 : 1;
-            NSColor *shadowColor = [PlatformColorClass colorWithCalibratedRed:red green:green blue:blue alpha:alpha];
+            NSColor *shadowColor = [PlatformNSColorClass colorWithCalibratedRed:red green:green blue:blue alpha:alpha];
             NSSize shadowOffset;
             CGFloat shadowBlurRadius;
             firstRange = [shadowStyle rangeOfString:@"px"];
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to