WebCore:
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 30 Jul 2009 00:13:50 +0000 (00:13 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 30 Jul 2009 00:13:50 +0000 (00:13 +0000)
2009-07-29  Ryosuke Niwa  <rniwa@webkit.org>

        Reviewed by Justin Garcia.

        REGRESSION(r46370-46426): /editing/style/remove-underline-from-stylesheet.html fails
        https://bugs.webkit.org/show_bug.cgi?id=27809

        The patch primarily rebaselines the tests but also fixes the bug in currentlyHasStyle.
        To determine that a particular text decoration is present, currentlyHasStyle should refer to
        -webkit-text-decorations-in-effect to take care of styles set by u, s, strike tags and ancestors' CSS.
        We also need to update layout to accommodate the changes made within ApplyStyleCommand.

        * editing/ApplyStyleCommand.cpp: ditto
        (WebCore::StyleChange::currentlyHasStyle): ditto

LayoutTests:

2009-07-29  Ryosuke Niwa  <rniwa@webkit.org>

        Reviewed by Justin Garcia.

        REGRESSION(r46370-46426): /editing/style/remove-underline-from-stylesheet.html fails
        https://bugs.webkit.org/show_bug.cgi?id=27809

        Since new behavior is consistent with Firefox, we rebaseline the test cases.
        The patch converts remove-underline-from-stylesheet and remove-underline-in-bold to dumpAsText tests
        with markup printed explicitly because pixel tests did not detect the disappearance of underline.

        * editing/style/remove-underline-from-stylesheet-expected.txt: Added.
        * editing/style/remove-underline-from-stylesheet.html:
        * editing/style/remove-underline-in-bold-expected.txt: Added.
        * editing/style/remove-underline-in-bold.html:
        * platform/mac/editing/style/remove-underline-from-stylesheet-expected.checksum: Removed.
        * platform/mac/editing/style/remove-underline-from-stylesheet-expected.png: Removed.
        * platform/mac/editing/style/remove-underline-from-stylesheet-expected.txt: Removed.
        * platform/mac/editing/style/remove-underline-in-bold-expected.checksum: Removed.
        * platform/mac/editing/style/remove-underline-in-bold-expected.png: Removed.
        * platform/mac/editing/style/remove-underline-in-bold-expected.txt: Removed.
        * platform/qt/editing/style/remove-underline-from-stylesheet-expected.txt: Removed.
        * platform/qt/editing/style/remove-underline-in-bold-expected.txt: Removed.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@46567 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 files changed:
LayoutTests/ChangeLog
LayoutTests/editing/style/remove-underline-from-stylesheet-expected.txt [moved from LayoutTests/platform/mac/editing/style/remove-underline-from-stylesheet-expected.txt with 91% similarity]
LayoutTests/editing/style/remove-underline-from-stylesheet.html
LayoutTests/editing/style/remove-underline-in-bold-expected.txt [moved from LayoutTests/platform/mac/editing/style/remove-underline-in-bold-expected.txt with 91% similarity]
LayoutTests/editing/style/remove-underline-in-bold.html
LayoutTests/platform/mac/editing/style/remove-underline-from-stylesheet-expected.checksum [deleted file]
LayoutTests/platform/mac/editing/style/remove-underline-from-stylesheet-expected.png [deleted file]
LayoutTests/platform/mac/editing/style/remove-underline-in-bold-expected.checksum [deleted file]
LayoutTests/platform/mac/editing/style/remove-underline-in-bold-expected.png [deleted file]
LayoutTests/platform/qt/editing/style/remove-underline-from-stylesheet-expected.txt [deleted file]
LayoutTests/platform/qt/editing/style/remove-underline-in-bold-expected.txt [deleted file]
WebCore/ChangeLog
WebCore/editing/ApplyStyleCommand.cpp

index 443c36f..2f437f7 100644 (file)
@@ -1,3 +1,27 @@
+2009-07-29  Ryosuke Niwa  <rniwa@webkit.org>
+
+        Reviewed by Justin Garcia.
+
+        REGRESSION(r46370-46426): /editing/style/remove-underline-from-stylesheet.html fails
+        https://bugs.webkit.org/show_bug.cgi?id=27809
+
+        Since new behavior is consistent with Firefox, we rebaseline the test cases.
+        The patch converts remove-underline-from-stylesheet and remove-underline-in-bold to dumpAsText tests
+        with markup printed explicitly because pixel tests did not detect the disappearance of underline.
+
+        * editing/style/remove-underline-from-stylesheet-expected.txt: Added.
+        * editing/style/remove-underline-from-stylesheet.html:
+        * editing/style/remove-underline-in-bold-expected.txt: Added.
+        * editing/style/remove-underline-in-bold.html:
+        * platform/mac/editing/style/remove-underline-from-stylesheet-expected.checksum: Removed.
+        * platform/mac/editing/style/remove-underline-from-stylesheet-expected.png: Removed.
+        * platform/mac/editing/style/remove-underline-from-stylesheet-expected.txt: Removed.
+        * platform/mac/editing/style/remove-underline-in-bold-expected.checksum: Removed.
+        * platform/mac/editing/style/remove-underline-in-bold-expected.png: Removed.
+        * platform/mac/editing/style/remove-underline-in-bold-expected.txt: Removed.
+        * platform/qt/editing/style/remove-underline-from-stylesheet-expected.txt: Removed.
+        * platform/qt/editing/style/remove-underline-in-bold-expected.txt: Removed.
+
 2009-07-29  Darin Adler  <darin@apple.com>
 
         * platform/gtk/Skipped: Added ol-start-parsing.html since it has no result yet.
@@ -68,20 +68,7 @@ EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotificatio
 EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 0 of #text > DIV > BODY > HTML > #document to 6 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
-layer at (0,0) size 800x600
-  RenderView at (0,0) size 800x600
-layer at (0,0) size 800x600
-  RenderBlock {HTML} at (0,0) size 800x600
-    RenderBody {BODY} at (8,8) size 784x584
-      RenderBlock {DIV} at (0,0) size 784x56 [border: (2px solid #FF0000)]
-        RenderInline {SPAN} at (0,0) size 78x28
-          RenderText {#text} at (14,14) size 78x28
-            text run at (14,14) width 78: "xxxxxx "
-        RenderText {#text} at (92,14) size 72x28
-          text run at (92,14) width 72: "xxxxxx"
-        RenderInline {SPAN} at (0,0) size 78x28
-          RenderText {#text} at (164,14) size 78x28
-            text run at (164,14) width 78: " xxxxxx"
-          RenderInline {SPAN} at (0,0) size 0x28
-selection start: position 0 of child 1 {#text} of child 1 {DIV} of child 1 {BODY} of child 0 {HTML} of document
-selection end:   position 6 of child 1 {#text} of child 1 {DIV} of child 1 {BODY} of child 0 {HTML} of document
+This tests removing underline from stylesheet. For consistency, underline should NOT be removed (see bug 27809).
+
+xxxxxx xxxxxx xxxxxx
+xxxxxx xxxxxx xxxxxx<span id="test"></span>
index fdc86a0..95cb6ad 100644 (file)
@@ -14,6 +14,8 @@
 <script>
 
 function editingTest() {
+    if (window.layoutTestController)
+         layoutTestController.dumpAsText();
     for (i = 0; i < 6; i++)
         typeCharacterCommand();
     typeCharacterCommand(' ');
@@ -26,6 +28,7 @@ function editingTest() {
     moveSelectionBackwardByWordCommand();
     extendSelectionForwardByWordCommand();
     underlineCommand();
+    document.body.appendChild(document.createTextNode(document.getElementById('root').innerHTML));
 }
 
 </script>
@@ -33,6 +36,7 @@ function editingTest() {
 <title>Editing Test</title> 
 </head> 
 <body>
+<p>This tests removing underline from stylesheet.  For consistency, underline should NOT be removed (see bug 27809).</p>
 <div contenteditable id="root" class="editing">
 <span id="test"></span>
 </div>
@@ -68,21 +68,5 @@ EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotificatio
 EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 0 of #text > B > DIV > BODY > HTML > #document to 6 of #text > B > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
-layer at (0,0) size 800x600
-  RenderView at (0,0) size 800x600
-layer at (0,0) size 800x600
-  RenderBlock {HTML} at (0,0) size 800x600
-    RenderBody {BODY} at (8,8) size 784x584
-      RenderBlock {DIV} at (0,0) size 784x56 [border: (2px solid #FF0000)]
-        RenderInline {B} at (0,0) size 78x28
-          RenderText {#text} at (14,14) size 78x28
-            text run at (14,14) width 78: "xxxxxx "
-        RenderInline {B} at (0,0) size 72x28
-          RenderText {#text} at (92,14) size 72x28
-            text run at (92,14) width 72: "xxxxxx"
-        RenderInline {B} at (0,0) size 78x28
-          RenderText {#text} at (164,14) size 78x28
-            text run at (164,14) width 78: " xxxxxx"
-        RenderInline {SPAN} at (0,0) size 0x28
-selection start: position 0 of child 0 {#text} of child 1 {B} of child 1 {DIV} of child 1 {BODY} of child 0 {HTML} of document
-selection end:   position 6 of child 0 {#text} of child 1 {B} of child 1 {DIV} of child 1 {BODY} of child 0 {HTML} of document
+xxxxxx xxxxxx xxxxxx
+<b style="text-decoration: underline;">xxxxxx </b><b>xxxxxx</b><b style="text-decoration: underline;"> xxxxxx</b><span id="test"></span>
index 1f3ea2a..196fc65 100644 (file)
@@ -13,6 +13,8 @@
 <script>
 
 function editingTest() {
+    if (window.layoutTestController)
+         layoutTestController.dumpAsText();
     underlineCommand();
     boldCommand();
     for (i = 0; i < 6; i++)
@@ -27,6 +29,7 @@ function editingTest() {
     moveSelectionBackwardByWordCommand();
     extendSelectionForwardByWordCommand();
     underlineCommand();
+    document.body.appendChild(document.createTextNode(document.getElementById('root').innerHTML));
 }
 
 </script>
diff --git a/LayoutTests/platform/mac/editing/style/remove-underline-from-stylesheet-expected.checksum b/LayoutTests/platform/mac/editing/style/remove-underline-from-stylesheet-expected.checksum
deleted file mode 100644 (file)
index cae7691..0000000
+++ /dev/null
@@ -1 +0,0 @@
-7f32131a12ecf062689dd68114f656bf
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/editing/style/remove-underline-from-stylesheet-expected.png b/LayoutTests/platform/mac/editing/style/remove-underline-from-stylesheet-expected.png
deleted file mode 100644 (file)
index efe74e4..0000000
Binary files a/LayoutTests/platform/mac/editing/style/remove-underline-from-stylesheet-expected.png and /dev/null differ
diff --git a/LayoutTests/platform/mac/editing/style/remove-underline-in-bold-expected.checksum b/LayoutTests/platform/mac/editing/style/remove-underline-in-bold-expected.checksum
deleted file mode 100644 (file)
index 553a7e5..0000000
+++ /dev/null
@@ -1 +0,0 @@
-ee6fc9e341efa6407e4a75954413c33d
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/editing/style/remove-underline-in-bold-expected.png b/LayoutTests/platform/mac/editing/style/remove-underline-in-bold-expected.png
deleted file mode 100644 (file)
index f13271e..0000000
Binary files a/LayoutTests/platform/mac/editing/style/remove-underline-in-bold-expected.png and /dev/null differ
diff --git a/LayoutTests/platform/qt/editing/style/remove-underline-from-stylesheet-expected.txt b/LayoutTests/platform/qt/editing/style/remove-underline-from-stylesheet-expected.txt
deleted file mode 100644 (file)
index 103c596..0000000
+++ /dev/null
@@ -1,88 +0,0 @@
-EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of DIV > BODY > HTML > #document to 3 of DIV > BODY > HTML > #document
-EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of DIV > BODY > HTML > #document to 0 of DIV > BODY > HTML > #document toDOMRange:range from 1 of #text > DIV > BODY > HTML > #document to 1 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 1 of #text > DIV > BODY > HTML > #document to 1 of #text > DIV > BODY > HTML > #document toDOMRange:range from 2 of #text > DIV > BODY > HTML > #document to 2 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 2 of #text > DIV > BODY > HTML > #document to 2 of #text > DIV > BODY > HTML > #document toDOMRange:range from 3 of #text > DIV > BODY > HTML > #document to 3 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 3 of #text > DIV > BODY > HTML > #document to 3 of #text > DIV > BODY > HTML > #document toDOMRange:range from 4 of #text > DIV > BODY > HTML > #document to 4 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 4 of #text > DIV > BODY > HTML > #document to 4 of #text > DIV > BODY > HTML > #document toDOMRange:range from 5 of #text > DIV > BODY > HTML > #document to 5 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 5 of #text > DIV > BODY > HTML > #document to 5 of #text > DIV > BODY > HTML > #document toDOMRange:range from 6 of #text > DIV > BODY > HTML > #document to 6 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 6 of #text > DIV > BODY > HTML > #document to 6 of #text > DIV > BODY > HTML > #document toDOMRange:range from 7 of #text > DIV > BODY > HTML > #document to 7 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 7 of #text > DIV > BODY > HTML > #document to 7 of #text > DIV > BODY > HTML > #document toDOMRange:range from 8 of #text > DIV > BODY > HTML > #document to 8 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 8 of #text > DIV > BODY > HTML > #document to 8 of #text > DIV > BODY > HTML > #document toDOMRange:range from 9 of #text > DIV > BODY > HTML > #document to 9 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 9 of #text > DIV > BODY > HTML > #document to 9 of #text > DIV > BODY > HTML > #document toDOMRange:range from 10 of #text > DIV > BODY > HTML > #document to 10 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 10 of #text > DIV > BODY > HTML > #document to 10 of #text > DIV > BODY > HTML > #document toDOMRange:range from 11 of #text > DIV > BODY > HTML > #document to 11 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 11 of #text > DIV > BODY > HTML > #document to 11 of #text > DIV > BODY > HTML > #document toDOMRange:range from 12 of #text > DIV > BODY > HTML > #document to 12 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 12 of #text > DIV > BODY > HTML > #document to 12 of #text > DIV > BODY > HTML > #document toDOMRange:range from 13 of #text > DIV > BODY > HTML > #document to 13 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 13 of #text > DIV > BODY > HTML > #document to 13 of #text > DIV > BODY > HTML > #document toDOMRange:range from 14 of #text > DIV > BODY > HTML > #document to 14 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 14 of #text > DIV > BODY > HTML > #document to 14 of #text > DIV > BODY > HTML > #document toDOMRange:range from 15 of #text > DIV > BODY > HTML > #document to 15 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 15 of #text > DIV > BODY > HTML > #document to 15 of #text > DIV > BODY > HTML > #document toDOMRange:range from 16 of #text > DIV > BODY > HTML > #document to 16 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 16 of #text > DIV > BODY > HTML > #document to 16 of #text > DIV > BODY > HTML > #document toDOMRange:range from 17 of #text > DIV > BODY > HTML > #document to 17 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 17 of #text > DIV > BODY > HTML > #document to 17 of #text > DIV > BODY > HTML > #document toDOMRange:range from 18 of #text > DIV > BODY > HTML > #document to 18 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 18 of #text > DIV > BODY > HTML > #document to 18 of #text > DIV > BODY > HTML > #document toDOMRange:range from 19 of #text > DIV > BODY > HTML > #document to 19 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 19 of #text > DIV > BODY > HTML > #document to 19 of #text > DIV > BODY > HTML > #document toDOMRange:range from 20 of #text > DIV > BODY > HTML > #document to 20 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 0 of #text > DIV > BODY > HTML > #document to 6 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
-layer at (0,0) size 800x600
-  RenderView at (0,0) size 800x600
-layer at (0,0) size 800x600
-  RenderBlock {HTML} at (0,0) size 800x600
-    RenderBody {BODY} at (8,8) size 784x584
-      RenderBlock {DIV} at (0,0) size 784x60 [border: (2px solid #FF0000)]
-        RenderInline {SPAN} at (0,0) size 79x31
-          RenderText {#text} at (14,14) size 79x31
-            text run at (14,14) width 79: "xxxxxx "
-        RenderText {#text} at (93,14) size 72x31
-          text run at (93,14) width 72: "xxxxxx"
-        RenderInline {SPAN} at (0,0) size 79x31
-          RenderText {#text} at (165,14) size 79x31
-            text run at (165,14) width 79: " xxxxxx"
-          RenderText {#text} at (0,0) size 0x0
-          RenderInline {SPAN} at (0,0) size 0x0
-selection start: position 0 of child 1 {#text} of child 1 {DIV} of child 1 {BODY} of child 0 {HTML} of document
-selection end:   position 6 of child 1 {#text} of child 1 {DIV} of child 1 {BODY} of child 0 {HTML} of document
diff --git a/LayoutTests/platform/qt/editing/style/remove-underline-in-bold-expected.txt b/LayoutTests/platform/qt/editing/style/remove-underline-in-bold-expected.txt
deleted file mode 100644 (file)
index 9d7f6ea..0000000
+++ /dev/null
@@ -1,88 +0,0 @@
-EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of DIV > BODY > HTML > #document to 3 of DIV > BODY > HTML > #document
-EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of DIV > BODY > HTML > #document to 0 of DIV > BODY > HTML > #document toDOMRange:range from 1 of #text > B > SPAN > DIV > BODY > HTML > #document to 1 of #text > B > SPAN > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 1 of #text > B > SPAN > DIV > BODY > HTML > #document to 1 of #text > B > SPAN > DIV > BODY > HTML > #document toDOMRange:range from 2 of #text > B > SPAN > DIV > BODY > HTML > #document to 2 of #text > B > SPAN > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 2 of #text > B > SPAN > DIV > BODY > HTML > #document to 2 of #text > B > SPAN > DIV > BODY > HTML > #document toDOMRange:range from 3 of #text > B > SPAN > DIV > BODY > HTML > #document to 3 of #text > B > SPAN > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 3 of #text > B > SPAN > DIV > BODY > HTML > #document to 3 of #text > B > SPAN > DIV > BODY > HTML > #document toDOMRange:range from 4 of #text > B > SPAN > DIV > BODY > HTML > #document to 4 of #text > B > SPAN > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 4 of #text > B > SPAN > DIV > BODY > HTML > #document to 4 of #text > B > SPAN > DIV > BODY > HTML > #document toDOMRange:range from 5 of #text > B > SPAN > DIV > BODY > HTML > #document to 5 of #text > B > SPAN > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 5 of #text > B > SPAN > DIV > BODY > HTML > #document to 5 of #text > B > SPAN > DIV > BODY > HTML > #document toDOMRange:range from 6 of #text > B > SPAN > DIV > BODY > HTML > #document to 6 of #text > B > SPAN > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 6 of #text > B > SPAN > DIV > BODY > HTML > #document to 6 of #text > B > SPAN > DIV > BODY > HTML > #document toDOMRange:range from 7 of #text > B > SPAN > DIV > BODY > HTML > #document to 7 of #text > B > SPAN > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 7 of #text > B > SPAN > DIV > BODY > HTML > #document to 7 of #text > B > SPAN > DIV > BODY > HTML > #document toDOMRange:range from 8 of #text > B > SPAN > DIV > BODY > HTML > #document to 8 of #text > B > SPAN > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 8 of #text > B > SPAN > DIV > BODY > HTML > #document to 8 of #text > B > SPAN > DIV > BODY > HTML > #document toDOMRange:range from 9 of #text > B > SPAN > DIV > BODY > HTML > #document to 9 of #text > B > SPAN > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 9 of #text > B > SPAN > DIV > BODY > HTML > #document to 9 of #text > B > SPAN > DIV > BODY > HTML > #document toDOMRange:range from 10 of #text > B > SPAN > DIV > BODY > HTML > #document to 10 of #text > B > SPAN > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 10 of #text > B > SPAN > DIV > BODY > HTML > #document to 10 of #text > B > SPAN > DIV > BODY > HTML > #document toDOMRange:range from 11 of #text > B > SPAN > DIV > BODY > HTML > #document to 11 of #text > B > SPAN > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 11 of #text > B > SPAN > DIV > BODY > HTML > #document to 11 of #text > B > SPAN > DIV > BODY > HTML > #document toDOMRange:range from 12 of #text > B > SPAN > DIV > BODY > HTML > #document to 12 of #text > B > SPAN > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 12 of #text > B > SPAN > DIV > BODY > HTML > #document to 12 of #text > B > SPAN > DIV > BODY > HTML > #document toDOMRange:range from 13 of #text > B > SPAN > DIV > BODY > HTML > #document to 13 of #text > B > SPAN > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 13 of #text > B > SPAN > DIV > BODY > HTML > #document to 13 of #text > B > SPAN > DIV > BODY > HTML > #document toDOMRange:range from 14 of #text > B > SPAN > DIV > BODY > HTML > #document to 14 of #text > B > SPAN > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 14 of #text > B > SPAN > DIV > BODY > HTML > #document to 14 of #text > B > SPAN > DIV > BODY > HTML > #document toDOMRange:range from 15 of #text > B > SPAN > DIV > BODY > HTML > #document to 15 of #text > B > SPAN > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 15 of #text > B > SPAN > DIV > BODY > HTML > #document to 15 of #text > B > SPAN > DIV > BODY > HTML > #document toDOMRange:range from 16 of #text > B > SPAN > DIV > BODY > HTML > #document to 16 of #text > B > SPAN > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 16 of #text > B > SPAN > DIV > BODY > HTML > #document to 16 of #text > B > SPAN > DIV > BODY > HTML > #document toDOMRange:range from 17 of #text > B > SPAN > DIV > BODY > HTML > #document to 17 of #text > B > SPAN > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 17 of #text > B > SPAN > DIV > BODY > HTML > #document to 17 of #text > B > SPAN > DIV > BODY > HTML > #document toDOMRange:range from 18 of #text > B > SPAN > DIV > BODY > HTML > #document to 18 of #text > B > SPAN > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 18 of #text > B > SPAN > DIV > BODY > HTML > #document to 18 of #text > B > SPAN > DIV > BODY > HTML > #document toDOMRange:range from 19 of #text > B > SPAN > DIV > BODY > HTML > #document to 19 of #text > B > SPAN > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 19 of #text > B > SPAN > DIV > BODY > HTML > #document to 19 of #text > B > SPAN > DIV > BODY > HTML > #document toDOMRange:range from 20 of #text > B > SPAN > DIV > BODY > HTML > #document to 20 of #text > B > SPAN > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 0 of #text > B > DIV > BODY > HTML > #document to 6 of #text > B > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
-layer at (0,0) size 800x600
-  RenderView at (0,0) size 800x600
-layer at (0,0) size 800x600
-  RenderBlock {HTML} at (0,0) size 800x600
-    RenderBody {BODY} at (8,8) size 784x584
-      RenderBlock {DIV} at (0,0) size 784x61 [border: (2px solid #FF0000)]
-        RenderInline {B} at (0,0) size 85x33
-          RenderText {#text} at (14,14) size 85x33
-            text run at (14,14) width 85: "xxxxxx "
-        RenderInline {B} at (0,0) size 78x33
-          RenderText {#text} at (99,14) size 78x33
-            text run at (99,14) width 78: "xxxxxx"
-        RenderInline {B} at (0,0) size 85x33
-          RenderText {#text} at (177,14) size 85x33
-            text run at (177,14) width 85: " xxxxxx"
-        RenderInline {SPAN} at (0,0) size 0x31
-selection start: position 0 of child 0 {#text} of child 1 {B} of child 1 {DIV} of child 1 {BODY} of child 0 {HTML} of document
-selection end:   position 6 of child 0 {#text} of child 1 {B} of child 1 {DIV} of child 1 {BODY} of child 0 {HTML} of document
index 6a33693..c7bd64a 100644 (file)
@@ -1,3 +1,18 @@
+2009-07-29  Ryosuke Niwa  <rniwa@webkit.org>
+
+        Reviewed by Justin Garcia.
+
+        REGRESSION(r46370-46426): /editing/style/remove-underline-from-stylesheet.html fails
+        https://bugs.webkit.org/show_bug.cgi?id=27809
+
+        The patch primarily rebaselines the tests but also fixes the bug in currentlyHasStyle.
+        To determine that a particular text decoration is present, currentlyHasStyle should refer to
+        -webkit-text-decorations-in-effect to take care of styles set by u, s, strike tags and ancestors' CSS.
+        We also need to update layout to accommodate the changes made within ApplyStyleCommand.
+
+        * editing/ApplyStyleCommand.cpp: ditto
+        (WebCore::StyleChange::currentlyHasStyle): ditto
+
 2009-07-29  Yong Li  <yong.li@torchmobile.com>
 
         Reviewed by George Staikos.
index 36cd823..738a5c3 100644 (file)
@@ -231,8 +231,11 @@ bool StyleChange::currentlyHasStyle(const Position &pos, const CSSProperty *prop
     RefPtr<CSSValue> value;
     if (property->id() == CSSPropertyFontSize)
         value = style->getFontSizeCSSValuePreferringKeyword();
+    // We need to use -webkit-text-decorations-in-effect to take care of text decorations set by u, s, and strike
+    else if (property->id() == CSSPropertyTextDecoration)
+        value = style->getPropertyCSSValue(CSSPropertyWebkitTextDecorationsInEffect);
     else
-        value = style->getPropertyCSSValue(property->id(), DoNotUpdateLayout);
+        value = style->getPropertyCSSValue(property->id());
     if (!value)
         return false;
     return equalIgnoringCase(value->cssText(), property->value()->cssText());