Unreviewed, rolling out r192181.
authorryanhaddad@apple.com <ryanhaddad@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 10 Nov 2015 00:55:28 +0000 (00:55 +0000)
committerryanhaddad@apple.com <ryanhaddad@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 10 Nov 2015 00:55:28 +0000 (00:55 +0000)
This change causes asserts on mac-wk1 debug testers

Reverted changeset:

"Fixed crash loading Mozilla layout test
editor/libeditor/crashtests/431086-1.xhtml."
https://bugs.webkit.org/show_bug.cgi?id=150252
http://trac.webkit.org/changeset/192181

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

LayoutTests/ChangeLog
LayoutTests/editing/execCommand/150252-expected.txt [deleted file]
LayoutTests/editing/execCommand/150252.xhtml [deleted file]
LayoutTests/editing/execCommand/150252_minimal-expected.txt [deleted file]
LayoutTests/editing/execCommand/150252_minimal.xhtml [deleted file]
Source/WebCore/ChangeLog
Source/WebCore/editing/ios/EditorIOS.mm
Source/WebCore/editing/mac/EditorMac.mm

index 3ab82ad..c0c2bac 100644 (file)
@@ -1,3 +1,16 @@
+2015-11-09  Ryan Haddad  <ryanhaddad@apple.com>
+
+        Unreviewed, rolling out r192181.
+
+        This change causes asserts on mac-wk1 debug testers
+
+        Reverted changeset:
+
+        "Fixed crash loading Mozilla layout test
+        editor/libeditor/crashtests/431086-1.xhtml."
+        https://bugs.webkit.org/show_bug.cgi?id=150252
+        http://trac.webkit.org/changeset/192181
+
 2015-11-09  Jiewen Tan  <jiewen_tan@apple.com>
 
         Crash when right clicking in input box with -webkit-user-select: none
diff --git a/LayoutTests/editing/execCommand/150252-expected.txt b/LayoutTests/editing/execCommand/150252-expected.txt
deleted file mode 100644 (file)
index 6025c93..0000000
+++ /dev/null
@@ -1 +0,0 @@
-This test passes if it doesn't crash. https://bugs.webkit.org/show_bug.cgi?id=150252
diff --git a/LayoutTests/editing/execCommand/150252.xhtml b/LayoutTests/editing/execCommand/150252.xhtml
deleted file mode 100644 (file)
index e8a1578..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-<div id="150252" xmlns="http://www.w3.org/1999/xhtml">
-
-<script type="text/javascript">
-
-function boom()
-{
-  if (window.testRunner)
-    testRunner.dumpAsText();
-
-  var r = document.documentElement;
-  r.style.position = "absolute";
-  r.contentEditable = "true";
-  r.focus();
-  r.contentEditable = "false";
-  r.focus();
-  r.contentEditable = "true";
-  document.execCommand("subscript", false, null);
-  r.contentEditable = "false";
-  document.getElementById("150252").innerHTML = "This test passes if it doesn't crash. https://bugs.webkit.org/show_bug.cgi?id=150252";
-}
-
-window.addEventListener("load", boom, false);
-
-</script>
-
-</div>
diff --git a/LayoutTests/editing/execCommand/150252_minimal-expected.txt b/LayoutTests/editing/execCommand/150252_minimal-expected.txt
deleted file mode 100644 (file)
index 6025c93..0000000
+++ /dev/null
@@ -1 +0,0 @@
-This test passes if it doesn't crash. https://bugs.webkit.org/show_bug.cgi?id=150252
diff --git a/LayoutTests/editing/execCommand/150252_minimal.xhtml b/LayoutTests/editing/execCommand/150252_minimal.xhtml
deleted file mode 100644 (file)
index be77aea..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-<div id="150252" xmlns="http://www.w3.org/1999/xhtml">
-
-<script>
-
-if (window.testRunner)
-    testRunner.dumpAsText();
-
-document.documentElement.contentEditable = "true";
-document.documentElement.focus();
-document.execCommand("superscript", false, null);
-document.getElementById("150252").innerHTML = "This test passes if it doesn't crash. https://bugs.webkit.org/show_bug.cgi?id=150252";
-
-</script>
-
-</div>
index 61771de..128853b 100644 (file)
@@ -1,3 +1,16 @@
+2015-11-09  Ryan Haddad  <ryanhaddad@apple.com>
+
+        Unreviewed, rolling out r192181.
+
+        This change causes asserts on mac-wk1 debug testers
+
+        Reverted changeset:
+
+        "Fixed crash loading Mozilla layout test
+        editor/libeditor/crashtests/431086-1.xhtml."
+        https://bugs.webkit.org/show_bug.cgi?id=150252
+        http://trac.webkit.org/changeset/192181
+
 2015-11-09  Jiewen Tan  <jiewen_tan@apple.com>
 
         Crash when right clicking in input box with -webkit-user-select: none
index ed9a359..afd12b2 100644 (file)
@@ -192,13 +192,13 @@ const Font* Editor::fontForSelection(bool& hasMultipleFonts) const
         RenderStyle* style = styleForSelectionStart(&m_frame, nodeToRemove); // sets nodeToRemove
 
         const Font* result = nullptr;
-        if (style) {
+        if (style)
             result = &style->fontCascade().primaryFont();
-            if (nodeToRemove) {
-                ExceptionCode ec;
-                nodeToRemove->remove(ec);
-                ASSERT(!ec);
-            }
+
+        if (nodeToRemove) {
+            ExceptionCode ec;
+            nodeToRemove->remove(ec);
+            ASSERT(!ec);
         }
 
         return result;
index 2558a65..37f9c1d 100644 (file)
@@ -118,11 +118,11 @@ const Font* Editor::fontForSelection(bool& hasMultipleFonts) const
         RenderStyle* style = styleForSelectionStart(&m_frame, nodeToRemove); // sets nodeToRemove
 
         const Font* result = nullptr;
-        if (style) {
+        if (style)
             result = &style->fontCascade().primaryFont();
-            if (nodeToRemove)
-                nodeToRemove->remove(ASSERT_NO_EXCEPTION);
-        }
+
+        if (nodeToRemove)
+            nodeToRemove->remove(ASSERT_NO_EXCEPTION);
 
         return result;
     }