Title: [148525] trunk/Source/WebKit/mac
Revision
148525
Author
[email protected]
Date
2013-04-16 11:25:38 -0700 (Tue, 16 Apr 2013)

Log Message

REGRESSION(r146025): WebKit applications can't apply underline or strike through
https://bugs.webkit.org/show_bug.cgi?id=114662

Reviewed by Enrica Casucci.

Use -webkit- prefixes to apply underline. There should be no further compatibility issues
since -khtml- was used only internally to pass the information down to WebCore.

Unfortunately, we can't test this code like any other font panel bug.

In the long run, we need to add some abstraction layer around font panel to make this testable
or else we'll keep regressing this feature.

* WebView/WebHTMLView.mm:
(-[WebHTMLView _styleFromFontAttributes:]):
(-[WebHTMLView _styleForAttributeChange:]):

Modified Paths

Diff

Modified: trunk/Source/WebKit/mac/ChangeLog (148524 => 148525)


--- trunk/Source/WebKit/mac/ChangeLog	2013-04-16 18:08:14 UTC (rev 148524)
+++ trunk/Source/WebKit/mac/ChangeLog	2013-04-16 18:25:38 UTC (rev 148525)
@@ -1,3 +1,22 @@
+2013-04-15  Ryosuke Niwa  <[email protected]>
+
+        REGRESSION(r146025): WebKit applications can't apply underline or strike through
+        https://bugs.webkit.org/show_bug.cgi?id=114662
+
+        Reviewed by Enrica Casucci.
+
+        Use -webkit- prefixes to apply underline. There should be no further compatibility issues
+        since -khtml- was used only internally to pass the information down to WebCore.
+
+        Unfortunately, we can't test this code like any other font panel bug.
+
+        In the long run, we need to add some abstraction layer around font panel to make this testable
+        or else we'll keep regressing this feature.
+
+        * WebView/WebHTMLView.mm:
+        (-[WebHTMLView _styleFromFontAttributes:]):
+        (-[WebHTMLView _styleForAttributeChange:]):
+
 2013-04-15  Anders Carlsson  <[email protected]>
 
         plugins/get-url-beforeunload-destroys-plugin.html crashes in WebKit1

Modified: trunk/Source/WebKit/mac/WebView/WebHTMLView.mm (148524 => 148525)


--- trunk/Source/WebKit/mac/WebView/WebHTMLView.mm	2013-04-16 18:08:14 UTC (rev 148524)
+++ trunk/Source/WebKit/mac/WebView/WebHTMLView.mm	2013-04-16 18:25:38 UTC (rev 148525)
@@ -4336,11 +4336,11 @@
     int underlineInt = [[dictionary objectForKey:NSUnderlineStyleAttributeName] intValue];
     // FIXME: Underline wins here if we have both (see bug 3790443).
     if (strikethroughInt == NSUnderlineStyleNone && underlineInt == NSUnderlineStyleNone)
-        [style setProperty:@"-khtml-text-decorations-in-effect" value:@"none" priority:@""];
+        [style setProperty:@"-webkit-text-decorations-in-effect" value:@"none" priority:@""];
     else if (underlineInt == NSUnderlineStyleNone)
-        [style setProperty:@"-khtml-text-decorations-in-effect" value:@"line-through" priority:@""];
+        [style setProperty:@"-webkit-text-decorations-in-effect" value:@"line-through" priority:@""];
     else
-        [style setProperty:@"-khtml-text-decorations-in-effect" value:@"underline" priority:@""];
+        [style setProperty:@"-webkit-text-decorations-in-effect" value:@"underline" priority:@""];
 
     return style;
 }
@@ -4588,10 +4588,10 @@
     int sb = [[b objectForKey:NSStrikethroughStyleAttributeName] intValue];
     if (sa == sb) {
         if (sa == NSUnderlineStyleNone)
-            [style setProperty:@"-khtml-text-decorations-in-effect" value:@"none" priority:@""]; 
+            [style setProperty:@"-webkit-text-decorations-in-effect" value:@"none" priority:@""];
             // we really mean "no line-through" rather than "none"
         else
-            [style setProperty:@"-khtml-text-decorations-in-effect" value:@"line-through" priority:@""];
+            [style setProperty:@"-webkit-text-decorations-in-effect" value:@"line-through" priority:@""];
             // we really mean "add line-through" rather than "line-through"
     }
 
@@ -4610,10 +4610,10 @@
     int ub = [[b objectForKey:NSUnderlineStyleAttributeName] intValue];
     if (ua == ub) {
         if (ua == NSUnderlineStyleNone)
-            [style setProperty:@"-khtml-text-decorations-in-effect" value:@"none" priority:@""];
+            [style setProperty:@"-webkit-text-decorations-in-effect" value:@"none" priority:@""];
             // we really mean "no underline" rather than "none"
         else
-            [style setProperty:@"-khtml-text-decorations-in-effect" value:@"underline" priority:@""];
+            [style setProperty:@"-webkit-text-decorations-in-effect" value:@"underline" priority:@""];
             // we really mean "add underline" rather than "underline"
     }
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to