Diff
Modified: trunk/Source/WebCore/ChangeLog (223290 => 223291)
--- trunk/Source/WebCore/ChangeLog 2017-10-13 18:17:51 UTC (rev 223290)
+++ trunk/Source/WebCore/ChangeLog 2017-10-13 18:23:12 UTC (rev 223291)
@@ -1,3 +1,18 @@
+2017-10-13 Alex Christensen <achristen...@webkit.org>
+
+ Remove Editor::simplifyMarkup
+ https://bugs.webkit.org/show_bug.cgi?id=178271
+
+ Reviewed by Wenson Hsieh.
+
+ An API test became flaky, and it turns out this isn't used anywhere, so let's remove it!
+ It was used in Mountain Lion, Mavericks, and Yosemite, but not since then.
+ See <rdar://problem/10726177>
+
+ * editing/Editor.cpp:
+ (WebCore::Editor::simplifyMarkup): Deleted.
+ * editing/Editor.h:
+
2017-10-13 Jer Noble <jer.no...@apple.com>
Unreviewed build fix; forward declare the type of IOSurfaceRef.
Modified: trunk/Source/WebCore/editing/Editor.cpp (223290 => 223291)
--- trunk/Source/WebCore/editing/Editor.cpp 2017-10-13 18:17:51 UTC (rev 223290)
+++ trunk/Source/WebCore/editing/Editor.cpp 2017-10-13 18:23:12 UTC (rev 223291)
@@ -82,7 +82,6 @@
#include "ReplaceSelectionCommand.h"
#include "Settings.h"
#include "ShadowRoot.h"
-#include "SimplifyMarkupCommand.h"
#include "SpellChecker.h"
#include "SpellingCorrectionCommand.h"
#include "StaticPasteboard.h"
@@ -1415,24 +1414,6 @@
setStartNewKillRingSequence(false);
}
-void Editor::simplifyMarkup(Node* startNode, Node* endNode)
-{
- if (!startNode)
- return;
- if (endNode) {
- if (&startNode->document() != &endNode->document())
- return;
- // check if start node is before endNode
- Node* node = startNode;
- while (node && node != endNode)
- node = NodeTraversal::next(*node);
- if (!node)
- return;
- }
-
- SimplifyMarkupCommand::create(document(), startNode, endNode ? NodeTraversal::next(*endNode) : nullptr)->apply();
-}
-
void Editor::copyURL(const URL& url, const String& title)
{
copyURL(url, title, *Pasteboard::createForCopyAndPaste());
Modified: trunk/Source/WebCore/editing/Editor.h (223290 => 223291)
--- trunk/Source/WebCore/editing/Editor.h 2017-10-13 18:17:51 UTC (rev 223290)
+++ trunk/Source/WebCore/editing/Editor.h 2017-10-13 18:23:12 UTC (rev 223291)
@@ -428,8 +428,6 @@
void updateMarkersForWordsAffectedByEditing(bool onlyHandleWordsContainingSelection);
void deletedAutocorrectionAtPosition(const Position&, const String& originalString);
- WEBCORE_EXPORT void simplifyMarkup(Node* startNode, Node* endNode);
-
EditorParagraphSeparator defaultParagraphSeparator() const { return m_defaultParagraphSeparator; }
void setDefaultParagraphSeparator(EditorParagraphSeparator separator) { m_defaultParagraphSeparator = separator; }
Vector<String> dictationAlternativesForMarker(const DocumentMarker&);
Modified: trunk/Source/WebKitLegacy/mac/ChangeLog (223290 => 223291)
--- trunk/Source/WebKitLegacy/mac/ChangeLog 2017-10-13 18:17:51 UTC (rev 223290)
+++ trunk/Source/WebKitLegacy/mac/ChangeLog 2017-10-13 18:23:12 UTC (rev 223291)
@@ -1,3 +1,13 @@
+2017-10-13 Alex Christensen <achristen...@webkit.org>
+
+ Remove Editor::simplifyMarkup
+ https://bugs.webkit.org/show_bug.cgi?id=178271
+
+ Reviewed by Wenson Hsieh.
+
+ * WebView/WebView.mm:
+ (-[WebView _simplifyMarkup:endNode:]):
+
2017-10-12 Chris Dumez <cdu...@apple.com>
[Mac] Add support for MouseEvent.buttons
Modified: trunk/Source/WebKitLegacy/mac/WebView/WebView.mm (223290 => 223291)
--- trunk/Source/WebKitLegacy/mac/WebView/WebView.mm 2017-10-13 18:17:51 UTC (rev 223290)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebView.mm 2017-10-13 18:23:12 UTC (rev 223291)
@@ -8532,13 +8532,6 @@
- (void)_simplifyMarkup:(DOMNode *)startNode endNode:(DOMNode *)endNode
{
- Frame* coreFrame = core([self mainFrame]);
- if (!coreFrame || !startNode)
- return;
- Node* coreStartNode= core(startNode);
- if (&coreStartNode->document() != coreFrame->document())
- return;
- return coreFrame->editor().simplifyMarkup(coreStartNode, core(endNode));
}
@end
Modified: trunk/Tools/ChangeLog (223290 => 223291)
--- trunk/Tools/ChangeLog 2017-10-13 18:17:51 UTC (rev 223290)
+++ trunk/Tools/ChangeLog 2017-10-13 18:23:12 UTC (rev 223291)
@@ -1,3 +1,13 @@
+2017-10-13 Alex Christensen <achristen...@webkit.org>
+
+ Remove Editor::simplifyMarkup
+ https://bugs.webkit.org/show_bug.cgi?id=178271
+
+ Reviewed by Wenson Hsieh.
+
+ * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
+ * TestWebKitAPI/Tests/mac/SimplifyMarkup.mm: Removed.
+
2017-10-11 Gustavo Noronha Silva <gustavo.noro...@collabora.co.uk>
[GLib] WebKitNavigationAction should tell whether it is a redirect
Modified: trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj (223290 => 223291)
--- trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj 2017-10-13 18:17:51 UTC (rev 223290)
+++ trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj 2017-10-13 18:23:12 UTC (rev 223291)
@@ -409,7 +409,6 @@
7CCE7ECA1A411A7E00447C4C /* RenderedImageFromDOMRange.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3722C8681461E03E00C45D00 /* RenderedImageFromDOMRange.mm */; };
7CCE7ECB1A411A7E00447C4C /* SetAndUpdateCacheModel.mm in Sources */ = {isa = PBXBuildFile; fileRef = 261516D515B0E60500A2C201 /* SetAndUpdateCacheModel.mm */; };
7CCE7ECC1A411A7E00447C4C /* SetDocumentURI.mm in Sources */ = {isa = PBXBuildFile; fileRef = 52B8CF9515868CF000281053 /* SetDocumentURI.mm */; };
- 7CCE7ECD1A411A7E00447C4C /* SimplifyMarkup.mm in Sources */ = {isa = PBXBuildFile; fileRef = C540F775152E4DA000A40C8C /* SimplifyMarkup.mm */; };
7CCE7ECE1A411A7E00447C4C /* StopLoadingFromDidFinishLoading.mm in Sources */ = {isa = PBXBuildFile; fileRef = 291861FD17BD4DC700D4E41E /* StopLoadingFromDidFinishLoading.mm */; };
7CCE7ECF1A411A7E00447C4C /* StopLoadingFromDidReceiveResponse.mm in Sources */ = {isa = PBXBuildFile; fileRef = E194E1BA177E5145009C4D4E /* StopLoadingFromDidReceiveResponse.mm */; };
7CCE7ED01A411A7E00447C4C /* StringByEvaluatingJavaScriptFromString.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3799AD3914120A43005EB0C6 /* StringByEvaluatingJavaScriptFromString.mm */; };
@@ -1664,7 +1663,6 @@
C507E8A614C6545B005D6B3B /* InspectorBar.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = InspectorBar.mm; sourceTree = "<group>"; };
C5101C4E176B8BB900EE9B15 /* findRanges.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = findRanges.html; sourceTree = "<group>"; };
C51AFB98169F49FF009CCF66 /* FindMatches.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = FindMatches.mm; sourceTree = "<group>"; };
- C540F775152E4DA000A40C8C /* SimplifyMarkup.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = SimplifyMarkup.mm; sourceTree = "<group>"; };
C540F783152E5A7800A40C8C /* verboseMarkup.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = verboseMarkup.html; sourceTree = "<group>"; };
C54237ED16B8955800E638FC /* PasteboardNotifications_Bundle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PasteboardNotifications_Bundle.cpp; sourceTree = "<group>"; };
C54237EE16B8955800E638FC /* PasteboardNotifications.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = PasteboardNotifications.mm; sourceTree = "<group>"; };
@@ -2779,7 +2777,6 @@
3722C8681461E03E00C45D00 /* RenderedImageFromDOMRange.mm */,
261516D515B0E60500A2C201 /* SetAndUpdateCacheModel.mm */,
52B8CF9515868CF000281053 /* SetDocumentURI.mm */,
- C540F775152E4DA000A40C8C /* SimplifyMarkup.mm */,
291861FD17BD4DC700D4E41E /* StopLoadingFromDidFinishLoading.mm */,
E194E1BA177E5145009C4D4E /* StopLoadingFromDidReceiveResponse.mm */,
3799AD3914120A43005EB0C6 /* StringByEvaluatingJavaScriptFromString.mm */,
@@ -3437,7 +3434,6 @@
7CCE7F141A411AE600447C4C /* ShouldKeepCurrentBackForwardListItemInList.cpp in Sources */,
37BCA61C1B596BA9002012CA /* ShouldOpenExternalURLsInNewWindowActions.mm in Sources */,
7C83E0C51D0A654600FEBCF3 /* ShrinkToFit.mm in Sources */,
- 7CCE7ECD1A411A7E00447C4C /* SimplifyMarkup.mm in Sources */,
2DFF7B6D1DA487AF00814614 /* SnapshotStore.mm in Sources */,
0F4FFA9E1ED3AA8500F7111F /* SnapshotViaRenderInContext.mm in Sources */,
7CCE7F151A411AE600447C4C /* SpacebarScrolling.cpp in Sources */,
Deleted: trunk/Tools/TestWebKitAPI/Tests/mac/SimplifyMarkup.mm (223290 => 223291)
--- trunk/Tools/TestWebKitAPI/Tests/mac/SimplifyMarkup.mm 2017-10-13 18:17:51 UTC (rev 223290)
+++ trunk/Tools/TestWebKitAPI/Tests/mac/SimplifyMarkup.mm 2017-10-13 18:23:12 UTC (rev 223291)
@@ -1,111 +0,0 @@
-/*
- * Copyright (C) 2012 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "PlatformUtilities.h"
-#include "PlatformWebView.h"
-#include <wtf/RetainPtr.h>
-
-#import <WebKit/DOM.h>
-#import <WebKit/WebViewPrivate.h>
-
-@interface SimplifyMarkupTest : NSObject <WebFrameLoadDelegate> {
-}
-@end
-
-static bool didFinishLoad;
-
-@implementation SimplifyMarkupTest
-
-- (void)webView:(WebView *)sender didFinishLoadForFrame:(WebFrame *)frame
-{
- didFinishLoad = true;
-}
-@end
-
-namespace TestWebKitAPI {
-
-TEST(WebKitLegacy, SimplifyMarkupTest)
-{
- RetainPtr<WebView> webView1 = adoptNS([[WebView alloc] initWithFrame:NSMakeRect(0, 0, 120, 200) frameName:nil groupName:nil]);
- RetainPtr<WebView> webView2 = adoptNS([[WebView alloc] initWithFrame:NSMakeRect(0, 0, 120, 200) frameName:nil groupName:nil]);
- RetainPtr<SimplifyMarkupTest> testController = adoptNS([SimplifyMarkupTest new]);
-
- webView1.get().frameLoadDelegate = testController.get();
- [[webView1.get() mainFrame] loadRequest:[NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"verboseMarkup" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]]];
-
- Util::run(&didFinishLoad);
- didFinishLoad = false;
-
- webView2.get().frameLoadDelegate = testController.get();
- [[webView2.get() mainFrame] loadRequest:[NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"verboseMarkup" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]]];
-
- Util::run(&didFinishLoad);
- didFinishLoad = false;
-
- DOMDocument *document1 = webView1.get().mainFrameDocument;
- NSString* markupBefore = [[document1 body] innerHTML];
- DOMDocument *document2 = webView2.get().mainFrameDocument;
-
- // If start is after end, nothing is done
- DOMNode *start = [document1 getElementById:@"test2"];
- DOMNode *end = [document1 getElementById:@"test1"];
-
- [webView1.get() _simplifyMarkup:[document1 body] endNode:end];
- NSString* markupAfter = [[document1 body] innerHTML];
-
- EXPECT_WK_STREQ(markupBefore, markupAfter);
- EXPECT_EQ([markupBefore length], [markupAfter length]);
-
- // If the two nodes are not in the same webView, nothing is done.
- start = [document1 getElementById:@"test1"];
- end = [document2 getElementById:@"test2"];
- [webView1.get() _simplifyMarkup:start endNode:end];
- markupAfter = [[document1 body] innerHTML];
-
- EXPECT_WK_STREQ(markupBefore, markupAfter);
- EXPECT_EQ([markupBefore length], [markupAfter length]);
-
- // If the two nodes are not in the same document, nothing is done.
- DOMHTMLFrameElement* frame = (DOMHTMLFrameElement *)[document1 getElementById:@"test3"];
- end = [[frame contentDocument] firstChild];
-
- [webView1.get() _simplifyMarkup:start endNode:end];
- markupAfter = [[document1 body] innerHTML];
-
- EXPECT_WK_STREQ(markupBefore, markupAfter);
- EXPECT_EQ([markupBefore length], [markupAfter length]);
-
- // If the nodes are in the same webView, same document and in the right order,
- // we should have a simplified markup.
- [webView1.get() _simplifyMarkup:[document1 body] endNode:nil];
- markupAfter = [[document1 body] innerHTML];
- // We only verify that the markup has changed and that it is less verbose
- // then the original version.
- // The accuracy of the operation is tested by the DRT tests already.
- EXPECT_GT([markupBefore length], [markupAfter length]);
-}
-
-} // namespace TestWebKitAPI