<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[195059] trunk</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/195059">195059</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2016-01-14 09:50:12 -0800 (Thu, 14 Jan 2016)</dd>
</dl>
<h3>Log Message</h3>
<pre>Unreviewed, rolling out <a href="http://trac.webkit.org/projects/webkit/changeset/195002">r195002</a>.
https://bugs.webkit.org/show_bug.cgi?id=153098
Crashes many/most editing tests (Requested by ap on #webkit).
Reverted changeset:
"WK2: Request completion candidates when needed"
https://bugs.webkit.org/show_bug.cgi?id=153040
http://trac.webkit.org/changeset/195002</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsplatformmacfastdomfocuscontenteditableexpectedtxt">trunk/LayoutTests/platform/mac/fast/dom/focus-contenteditable-expected.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreeditingEditorcpp">trunk/Source/WebCore/editing/Editor.cpp</a></li>
<li><a href="#trunkSourceWebCoreeditingEditorh">trunk/Source/WebCore/editing/Editor.h</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2SharedEditorStatecpp">trunk/Source/WebKit2/Shared/EditorState.cpp</a></li>
<li><a href="#trunkSourceWebKit2SharedEditorStateh">trunk/Source/WebKit2/Shared/EditorState.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessCocoaWebViewImplh">trunk/Source/WebKit2/UIProcess/Cocoa/WebViewImpl.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessCocoaWebViewImplmm">trunk/Source/WebKit2/UIProcess/Cocoa/WebViewImpl.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebPageProxycpp">trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebPageProxyh">trunk/Source/WebKit2/UIProcess/WebPageProxy.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageWebPageh">trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageWebPagemessagesin">trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPagemacWebPageMacmm">trunk/Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm</a></li>
</ul>
<h3>Removed Paths</h3>
<ul>
<li>trunk/LayoutTests/platform/mac-wk1/fast/dom/</li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (195058 => 195059)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-01-14 17:32:24 UTC (rev 195058)
+++ trunk/LayoutTests/ChangeLog        2016-01-14 17:50:12 UTC (rev 195059)
</span><span class="lines">@@ -1,3 +1,16 @@
</span><ins>+2016-01-14 Commit Queue <commit-queue@webkit.org>
+
+ Unreviewed, rolling out r195002.
+ https://bugs.webkit.org/show_bug.cgi?id=153098
+
+ Crashes many/most editing tests (Requested by ap on #webkit).
+
+ Reverted changeset:
+
+ "WK2: Request completion candidates when needed"
+ https://bugs.webkit.org/show_bug.cgi?id=153040
+ http://trac.webkit.org/changeset/195002
+
</ins><span class="cx"> 2016-01-14 Martin Robinson <mrobinson@igalia.com>
</span><span class="cx">
</span><span class="cx"> [GTK] [EFL] Hyphenation can never work in practice due to requirements on lang tags
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacfastdomfocuscontenteditableexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac/fast/dom/focus-contenteditable-expected.txt (195058 => 195059)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/fast/dom/focus-contenteditable-expected.txt        2016-01-14 17:32:24 UTC (rev 195058)
+++ trunk/LayoutTests/platform/mac/fast/dom/focus-contenteditable-expected.txt        2016-01-14 17:50:12 UTC (rev 195059)
</span><span class="lines">@@ -6,7 +6,7 @@
</span><span class="cx"> RenderBlock (anonymous) at (0,0) size 769x36
</span><span class="cx"> RenderText {#text} at (0,0) size 509x18
</span><span class="cx"> text run at (0,0) width 509: "This test will try to call focus() on a contenteditable div, and then a normal div. "
</span><del>- RenderBR {BR} at (0,0) size 0x0
</del><ins>+ RenderBR {BR} at (508,14) size 1x0
</ins><span class="cx"> RenderText {#text} at (0,18) size 379x18
</span><span class="cx"> text run at (0,18) width 379: "The window should scroll to reveal the contenteditable div."
</span><span class="cx"> RenderBlock {DIV} at (0,36) size 500x800
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (195058 => 195059)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-01-14 17:32:24 UTC (rev 195058)
+++ trunk/Source/WebCore/ChangeLog        2016-01-14 17:50:12 UTC (rev 195059)
</span><span class="lines">@@ -1,3 +1,16 @@
</span><ins>+2016-01-14 Commit Queue <commit-queue@webkit.org>
+
+ Unreviewed, rolling out r195002.
+ https://bugs.webkit.org/show_bug.cgi?id=153098
+
+ Crashes many/most editing tests (Requested by ap on #webkit).
+
+ Reverted changeset:
+
+ "WK2: Request completion candidates when needed"
+ https://bugs.webkit.org/show_bug.cgi?id=153040
+ http://trac.webkit.org/changeset/195002
+
</ins><span class="cx"> 2016-01-14 Martin Robinson <mrobinson@igalia.com>
</span><span class="cx">
</span><span class="cx"> [GTK] [EFL] Hyphenation can never work in practice due to requirements on lang tags
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingEditorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/Editor.cpp (195058 => 195059)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/Editor.cpp        2016-01-14 17:32:24 UTC (rev 195058)
+++ trunk/Source/WebCore/editing/Editor.cpp        2016-01-14 17:50:12 UTC (rev 195059)
</span><span class="lines">@@ -3533,43 +3533,6 @@
</span><span class="cx"> return checkingTypes;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-static RefPtr<Range> candidateRangeForSelection(Frame& frame)
-{
- const VisibleSelection& selection = frame.selection().selection();
- return selection.isCaret() ? wordRangeFromPosition(selection.start()) : frame.selection().toNormalizedRange();
-}
-
-static bool candidateWouldReplaceText(const VisibleSelection& selection)
-{
- // If the character behind the caret in the current selection is anything but a space or a newline then we should
- // replace the whole current word with the candidate.
- UChar32 characterAfterSelection, characterBeforeSelection, twoCharacterBeforeSelection = 0;
- charactersAroundPosition(selection.visibleStart(), characterAfterSelection, characterBeforeSelection, twoCharacterBeforeSelection);
- return !(characterBeforeSelection == '\0' || characterBeforeSelection == '\n' || characterBeforeSelection == ' ');
-}
-
-String Editor::stringForCandidateRequest() const
-{
- const VisibleSelection& selection = m_frame.selection().selection();
- RefPtr<Range> rangeForCurrentlyTypedString = candidateRangeForSelection(m_frame);
- if (rangeForCurrentlyTypedString && candidateWouldReplaceText(selection))
- return plainText(rangeForCurrentlyTypedString.get());
-
- return String();
-}
-
-void Editor::handleAcceptedCandidate(TextCheckingResult acceptedCandidate)
-{
- const VisibleSelection& selection = m_frame.selection().selection();
- RefPtr<Range> candidateRange = candidateRangeForSelection(m_frame);
-
- if (candidateWouldReplaceText(selection))
- m_frame.selection().setSelectedRange(candidateRange.get(), UPSTREAM, true);
-
- insertText(acceptedCandidate.replacement, 0);
- insertText(String(" "), 0);
-}
-
</del><span class="cx"> bool Editor::unifiedTextCheckerEnabled() const
</span><span class="cx"> {
</span><span class="cx"> return WebCore::unifiedTextCheckerEnabled(&m_frame);
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingEditorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/Editor.h (195058 => 195059)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/Editor.h        2016-01-14 17:32:24 UTC (rev 195058)
+++ trunk/Source/WebCore/editing/Editor.h        2016-01-14 17:50:12 UTC (rev 195059)
</span><span class="lines">@@ -455,9 +455,6 @@
</span><span class="cx"> const Vector<RefPtr<Range>>& detectedTelephoneNumberRanges() const { return m_detectedTelephoneNumberRanges; }
</span><span class="cx"> #endif
</span><span class="cx">
</span><del>- WEBCORE_EXPORT String stringForCandidateRequest() const;
- WEBCORE_EXPORT void handleAcceptedCandidate(TextCheckingResult);
-
</del><span class="cx"> private:
</span><span class="cx"> class WebContentReader;
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (195058 => 195059)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2016-01-14 17:32:24 UTC (rev 195058)
+++ trunk/Source/WebKit2/ChangeLog        2016-01-14 17:50:12 UTC (rev 195059)
</span><span class="lines">@@ -1,3 +1,16 @@
</span><ins>+2016-01-14 Commit Queue <commit-queue@webkit.org>
+
+ Unreviewed, rolling out r195002.
+ https://bugs.webkit.org/show_bug.cgi?id=153098
+
+ Crashes many/most editing tests (Requested by ap on #webkit).
+
+ Reverted changeset:
+
+ "WK2: Request completion candidates when needed"
+ https://bugs.webkit.org/show_bug.cgi?id=153040
+ http://trac.webkit.org/changeset/195002
+
</ins><span class="cx"> 2016-01-14 Gyuyoung Kim <gyuyoung.kim@webkit.org>
</span><span class="cx">
</span><span class="cx"> [EFL][GTK][SeccompFilter] Fix build break when enabling --seccomp-filters
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedEditorStatecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/EditorState.cpp (195058 => 195059)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/EditorState.cpp        2016-01-14 17:32:24 UTC (rev 195058)
+++ trunk/Source/WebKit2/Shared/EditorState.cpp        2016-01-14 17:50:12 UTC (rev 195059)
</span><span class="lines">@@ -43,7 +43,7 @@
</span><span class="cx"> encoder << hasComposition;
</span><span class="cx"> encoder << isMissingPostLayoutData;
</span><span class="cx">
</span><del>-#if PLATFORM(IOS) || PLATFORM(GTK) || PLATFORM(MAC)
</del><ins>+#if PLATFORM(IOS) || PLATFORM(GTK)
</ins><span class="cx"> if (!isMissingPostLayoutData)
</span><span class="cx"> m_postLayoutData.encode(encoder);
</span><span class="cx"> #endif
</span><span class="lines">@@ -84,7 +84,7 @@
</span><span class="cx"> if (!decoder.decode(result.isMissingPostLayoutData))
</span><span class="cx"> return false;
</span><span class="cx">
</span><del>-#if PLATFORM(IOS) || PLATFORM(GTK) || PLATFORM(MAC)
</del><ins>+#if PLATFORM(IOS) || PLATFORM(GTK)
</ins><span class="cx"> if (!result.isMissingPostLayoutData) {
</span><span class="cx"> if (!PostLayoutData::decode(decoder, result.postLayoutData()))
</span><span class="cx"> return false;
</span><span class="lines">@@ -103,55 +103,42 @@
</span><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-#if PLATFORM(IOS) || PLATFORM(GTK) || PLATFORM(MAC)
</del><ins>+#if PLATFORM(IOS) || PLATFORM(GTK)
</ins><span class="cx"> void EditorState::PostLayoutData::encode(IPC::ArgumentEncoder& encoder) const
</span><span class="cx"> {
</span><del>-#if PLATFORM(IOS) || PLATFORM(GTK)
</del><span class="cx"> encoder << typingAttributes;
</span><span class="cx"> encoder << caretRectAtStart;
</span><del>-#endif
-#if PLATFORM(IOS) || PLATFORM(MAC)
- encoder << selectionClipRect;
- encoder << selectedTextLength;
-#endif
</del><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx"> encoder << caretRectAtEnd;
</span><ins>+ encoder << selectionClipRect;
</ins><span class="cx"> encoder << selectionRects;
</span><span class="cx"> encoder << wordAtSelection;
</span><ins>+ encoder << selectedTextLength;
</ins><span class="cx"> encoder << characterAfterSelection;
</span><span class="cx"> encoder << characterBeforeSelection;
</span><span class="cx"> encoder << twoCharacterBeforeSelection;
</span><span class="cx"> encoder << isReplaceAllowed;
</span><span class="cx"> encoder << hasContent;
</span><span class="cx"> #endif
</span><del>-#if PLATFORM(MAC)
- encoder << candidateRequestStartPosition;
- encoder << paragraphContextForCandidateRequest;
- encoder << stringForCandidateRequest;
-#endif
</del><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool EditorState::PostLayoutData::decode(IPC::ArgumentDecoder& decoder, PostLayoutData& result)
</span><span class="cx"> {
</span><del>-#if PLATFORM(IOS) || PLATFORM(GTK)
</del><span class="cx"> if (!decoder.decode(result.typingAttributes))
</span><span class="cx"> return false;
</span><span class="cx"> if (!decoder.decode(result.caretRectAtStart))
</span><span class="cx"> return false;
</span><del>-#endif
-#if PLATFORM(IOS) || PLATFORM(MAC)
- if (!decoder.decode(result.selectionClipRect))
- return false;
- if (!decoder.decode(result.selectedTextLength))
- return false;
-#endif
</del><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx"> if (!decoder.decode(result.caretRectAtEnd))
</span><span class="cx"> return false;
</span><ins>+ if (!decoder.decode(result.selectionClipRect))
+ return false;
</ins><span class="cx"> if (!decoder.decode(result.selectionRects))
</span><span class="cx"> return false;
</span><span class="cx"> if (!decoder.decode(result.wordAtSelection))
</span><span class="cx"> return false;
</span><ins>+ if (!decoder.decode(result.selectedTextLength))
+ return false;
</ins><span class="cx"> if (!decoder.decode(result.characterAfterSelection))
</span><span class="cx"> return false;
</span><span class="cx"> if (!decoder.decode(result.characterBeforeSelection))
</span><span class="lines">@@ -163,19 +150,9 @@
</span><span class="cx"> if (!decoder.decode(result.hasContent))
</span><span class="cx"> return false;
</span><span class="cx"> #endif
</span><del>-#if PLATFORM(MAC)
- if (!decoder.decode(result.candidateRequestStartPosition))
- return false;
</del><span class="cx">
</span><del>- if (!decoder.decode(result.paragraphContextForCandidateRequest))
- return false;
-
- if (!decoder.decode(result.stringForCandidateRequest))
- return false;
-#endif
-
</del><span class="cx"> return true;
</span><span class="cx"> }
</span><del>-#endif // PLATFORM(IOS) || PLATFORM(GTK) || PLATFORM(MAC)
</del><ins>+#endif
</ins><span class="cx">
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedEditorStateh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/EditorState.h (195058 => 195059)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/EditorState.h        2016-01-14 17:32:24 UTC (rev 195058)
+++ trunk/Source/WebKit2/Shared/EditorState.h        2016-01-14 17:50:12 UTC (rev 195059)
</span><span class="lines">@@ -62,31 +62,22 @@
</span><span class="cx"> String markedText;
</span><span class="cx"> #endif
</span><span class="cx">
</span><del>-#if PLATFORM(IOS) || PLATFORM(GTK) || PLATFORM(MAC)
- struct PostLayoutData {
</del><span class="cx"> #if PLATFORM(IOS) || PLATFORM(GTK)
</span><ins>+ struct PostLayoutData {
</ins><span class="cx"> uint32_t typingAttributes { AttributeNone };
</span><span class="cx"> WebCore::IntRect caretRectAtStart;
</span><del>-#endif
-#if PLATFORM(IOS) || PLATFORM(MAC)
- WebCore::IntRect selectionClipRect;
- uint64_t selectedTextLength { 0 };
-#endif
</del><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx"> WebCore::IntRect caretRectAtEnd;
</span><ins>+ WebCore::IntRect selectionClipRect;
</ins><span class="cx"> Vector<WebCore::SelectionRect> selectionRects;
</span><span class="cx"> String wordAtSelection;
</span><ins>+ uint64_t selectedTextLength { 0 };
</ins><span class="cx"> UChar32 characterAfterSelection { 0 };
</span><span class="cx"> UChar32 characterBeforeSelection { 0 };
</span><span class="cx"> UChar32 twoCharacterBeforeSelection { 0 };
</span><span class="cx"> bool isReplaceAllowed { false };
</span><span class="cx"> bool hasContent { false };
</span><span class="cx"> #endif
</span><del>-#if PLATFORM(MAC)
- uint64_t candidateRequestStartPosition { 0 };
- String paragraphContextForCandidateRequest;
- String stringForCandidateRequest;
-#endif
</del><span class="cx">
</span><span class="cx"> void encode(IPC::ArgumentEncoder&) const;
</span><span class="cx"> static bool decode(IPC::ArgumentDecoder&, PostLayoutData&);
</span><span class="lines">@@ -94,18 +85,18 @@
</span><span class="cx">
</span><span class="cx"> const PostLayoutData& postLayoutData() const;
</span><span class="cx"> PostLayoutData& postLayoutData();
</span><del>-#endif // PLATFORM(IOS) || PLATFORM(GTK) || PLATFORM(MAC)
</del><ins>+#endif // PLATFORM(IOS) || PLATFORM(GTK)
</ins><span class="cx">
</span><span class="cx"> void encode(IPC::ArgumentEncoder&) const;
</span><span class="cx"> static bool decode(IPC::ArgumentDecoder&, EditorState&);
</span><span class="cx">
</span><del>-#if PLATFORM(IOS) || PLATFORM(GTK) || PLATFORM(MAC)
</del><ins>+#if PLATFORM(IOS) || PLATFORM(GTK)
</ins><span class="cx"> private:
</span><span class="cx"> PostLayoutData m_postLayoutData;
</span><span class="cx"> #endif
</span><span class="cx"> };
</span><span class="cx">
</span><del>-#if PLATFORM(IOS) || PLATFORM(GTK) || PLATFORM(MAC)
</del><ins>+#if PLATFORM(IOS) || PLATFORM(GTK)
</ins><span class="cx"> inline auto EditorState::postLayoutData() -> PostLayoutData&
</span><span class="cx"> {
</span><span class="cx"> ASSERT_WITH_MESSAGE(!isMissingPostLayoutData, "Attempt to access post layout data before receiving it");
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessCocoaWebViewImplh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/Cocoa/WebViewImpl.h (195058 => 195059)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Cocoa/WebViewImpl.h        2016-01-14 17:32:24 UTC (rev 195058)
+++ trunk/Source/WebKit2/UIProcess/Cocoa/WebViewImpl.h        2016-01-14 17:50:12 UTC (rev 195059)
</span><span class="lines">@@ -294,10 +294,6 @@
</span><span class="cx"> void lowercaseWord();
</span><span class="cx"> void capitalizeWord();
</span><span class="cx">
</span><del>-#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200
- void requestCandidatesForSelectionIfNeeded();
-#endif
-
</del><span class="cx"> void preferencesDidChange();
</span><span class="cx">
</span><span class="cx"> void setTextIndicator(WebCore::TextIndicator&, WebCore::TextIndicatorWindowLifetime = WebCore::TextIndicatorWindowLifetime::Permanent);
</span><span class="lines">@@ -502,11 +498,6 @@
</span><span class="cx">
</span><span class="cx"> Vector<NSTouch *> touchesOrderedByAge();
</span><span class="cx">
</span><del>-#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200
- void handleRequestedCandidates(NSInteger sequenceNumber, NSArray<NSTextCheckingResult *> *candidates);
- void handleAcceptedCandidate(NSTextCheckingResult *acceptedCandidate);
-#endif
-
</del><span class="cx"> NSView <WebViewImplDelegate> *m_view;
</span><span class="cx"> std::unique_ptr<PageClient> m_pageClient;
</span><span class="cx"> Ref<WebPageProxy> m_page;
</span><span class="lines">@@ -619,10 +610,6 @@
</span><span class="cx">
</span><span class="cx"> Vector<RetainPtr<id <NSObject, NSCopying>>> m_activeTouchIdentities;
</span><span class="cx"> RetainPtr<NSArray> m_lastTouches;
</span><del>-
-#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200
- String m_lastStringForCandidateRequest;
-#endif
</del><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessCocoaWebViewImplmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/Cocoa/WebViewImpl.mm (195058 => 195059)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Cocoa/WebViewImpl.mm        2016-01-14 17:32:24 UTC (rev 195058)
+++ trunk/Source/WebKit2/UIProcess/Cocoa/WebViewImpl.mm        2016-01-14 17:50:12 UTC (rev 195059)
</span><span class="lines">@@ -75,7 +75,6 @@
</span><span class="cx"> #import <WebCore/LookupSPI.h>
</span><span class="cx"> #import <WebCore/NSApplicationSPI.h>
</span><span class="cx"> #import <WebCore/NSImmediateActionGestureRecognizerSPI.h>
</span><del>-#import <WebCore/NSSpellCheckerSPI.h>
</del><span class="cx"> #import <WebCore/NSTextFinderSPI.h>
</span><span class="cx"> #import <WebCore/NSWindowSPI.h>
</span><span class="cx"> #import <WebCore/PlatformEventFactoryMac.h>
</span><span class="lines">@@ -1724,10 +1723,6 @@
</span><span class="cx"> void WebViewImpl::selectionDidChange()
</span><span class="cx"> {
</span><span class="cx"> updateFontPanelIfNeeded();
</span><del>-#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200
- if (!m_page->editorState().isMissingPostLayoutData)
- requestCandidatesForSelectionIfNeeded();
-#endif
</del><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebViewImpl::startObservingFontPanel()
</span><span class="lines">@@ -2093,90 +2088,6 @@
</span><span class="cx"> m_page->capitalizeWord();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200
-void WebViewImpl::requestCandidatesForSelectionIfNeeded()
-{
- const EditorState& editorState = m_page->editorState();
- if (!editorState.isContentEditable)
- return;
-
- auto& postLayoutData = editorState.postLayoutData();
- m_lastStringForCandidateRequest = postLayoutData.stringForCandidateRequest;
-
- NSRange rangeForCandidates = NSMakeRange(postLayoutData.candidateRequestStartPosition, postLayoutData.selectedTextLength);
- NSTextCheckingTypes checkingTypes = NSTextCheckingTypeSpelling | NSTextCheckingTypeReplacement | NSTextCheckingTypeCorrection;
- auto weakThis = createWeakPtr();
- [[NSSpellChecker sharedSpellChecker] requestCandidatesForSelectedRange:rangeForCandidates inString:postLayoutData.paragraphContextForCandidateRequest types:checkingTypes options:nil inSpellDocumentWithTag:spellCheckerDocumentTag() completionHandler:[weakThis](NSInteger sequenceNumber, NSArray<NSTextCheckingResult *> *candidates) {
- dispatch_async(dispatch_get_main_queue(), ^{
- if (!weakThis)
- return;
- weakThis->handleRequestedCandidates(sequenceNumber, candidates);
- });
- }];
-}
-
-void WebViewImpl::handleRequestedCandidates(NSInteger sequenceNumber, NSArray<NSTextCheckingResult *> *candidates)
-{
- const EditorState& editorState = m_page->editorState();
- if (!editorState.isContentEditable)
- return;
-
- auto& postLayoutData = editorState.postLayoutData();
- if (m_lastStringForCandidateRequest != postLayoutData.stringForCandidateRequest)
- return;
-
- auto weakEditor = m_weakPtrFactory.createWeakPtr();
- [[NSSpellChecker sharedSpellChecker] showCandidates:candidates forString:postLayoutData.stringForCandidateRequest inRect:postLayoutData.selectionClipRect view:m_view completionHandler:[weakEditor](NSTextCheckingResult *acceptedCandidate) {
- dispatch_async(dispatch_get_main_queue(), ^{
- if (!weakEditor)
- return;
- weakEditor->handleAcceptedCandidate(acceptedCandidate);
- });
- }];
-}
-
-static WebCore::TextCheckingResult textCheckingResultFromNSTextCheckingResult(NSTextCheckingResult *nsResult)
-{
- WebCore::TextCheckingResult result;
-
- // FIXME: Right now we only request candidates for spelling, replacement, and correction, but we plan to
- // support more types, and we will have to update this at that time.
- switch ([nsResult resultType]) {
- case NSTextCheckingTypeSpelling:
- result.type = WebCore::TextCheckingTypeSpelling;
- break;
- case NSTextCheckingTypeReplacement:
- result.type = WebCore::TextCheckingTypeReplacement;
- break;
- case NSTextCheckingTypeCorrection:
- result.type = WebCore::TextCheckingTypeCorrection;
- break;
- default:
- result.type = WebCore::TextCheckingTypeNone;
- }
-
- NSRange resultRange = [nsResult range];
- result.location = resultRange.location;
- result.length = resultRange.length;
- result.replacement = [nsResult replacementString];
-
- return result;
-}
-
-void WebViewImpl::handleAcceptedCandidate(NSTextCheckingResult *acceptedCandidate)
-{
- const EditorState& editorState = m_page->editorState();
- if (!editorState.isContentEditable)
- return;
-
- auto& postLayoutData = editorState.postLayoutData();
- if (m_lastStringForCandidateRequest != postLayoutData.stringForCandidateRequest)
- return;
-
- m_page->handleAcceptedCandidate(textCheckingResultFromNSTextCheckingResult(acceptedCandidate));
-}
-#endif // __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200
-
</del><span class="cx"> void WebViewImpl::preferencesDidChange()
</span><span class="cx"> {
</span><span class="cx"> BOOL needsViewFrameInWindowCoordinates = m_page->preferences().pluginsEnabled();
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp (195058 => 195059)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp        2016-01-14 17:32:24 UTC (rev 195058)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp        2016-01-14 17:50:12 UTC (rev 195059)
</span><span class="lines">@@ -6010,11 +6010,6 @@
</span><span class="cx"> uint64_t callbackID = m_callbacks.put(voidCallback.release());
</span><span class="cx"> m_nextViewStateChangeCallbacks.append(callbackID);
</span><span class="cx"> }
</span><del>-
-void WebPageProxy::handleAcceptedCandidate(WebCore::TextCheckingResult acceptedCandidate)
-{
- m_process->send(Messages::WebPage::HandleAcceptedCandidate(acceptedCandidate), m_pageID);
-}
</del><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> void WebPageProxy::imageOrMediaDocumentSizeChanged(const WebCore::IntSize& newSize)
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.h (195058 => 195059)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.h        2016-01-14 17:32:24 UTC (rev 195058)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.h        2016-01-14 17:50:12 UTC (rev 195059)
</span><span class="lines">@@ -1027,8 +1027,6 @@
</span><span class="cx"> void* immediateActionAnimationControllerForHitTestResult(RefPtr<API::HitTestResult>, uint64_t, RefPtr<API::Object>);
</span><span class="cx">
</span><span class="cx"> void installViewStateChangeCompletionHandler(void(^completionHandler)());
</span><del>-
- void handleAcceptedCandidate(WebCore::TextCheckingResult);
</del><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> #if PLATFORM(EFL) && HAVE(ACCESSIBILITY) && defined(HAVE_ECORE_X)
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebPageh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h (195058 => 195059)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h        2016-01-14 17:32:24 UTC (rev 195058)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h        2016-01-14 17:50:12 UTC (rev 195059)
</span><span class="lines">@@ -1142,8 +1142,6 @@
</span><span class="cx"> void dataDetectorsDidPresentUI(WebCore::PageOverlay::PageOverlayID);
</span><span class="cx"> void dataDetectorsDidChangeUI(WebCore::PageOverlay::PageOverlayID);
</span><span class="cx"> void dataDetectorsDidHideUI(WebCore::PageOverlay::PageOverlayID);
</span><del>-
- void handleAcceptedCandidate(WebCore::TextCheckingResult);
</del><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> void setShouldDispatchFakeMouseMoveEvents(bool dispatch) { m_shouldDispatchFakeMouseMoveEvents = dispatch; }
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebPagemessagesin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in (195058 => 195059)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in        2016-01-14 17:32:24 UTC (rev 195058)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in        2016-01-14 17:50:12 UTC (rev 195059)
</span><span class="lines">@@ -404,7 +404,6 @@
</span><span class="cx"> DataDetectorsDidPresentUI(WebCore::PageOverlay::PageOverlayID pageOverlay)
</span><span class="cx"> DataDetectorsDidChangeUI(WebCore::PageOverlay::PageOverlayID pageOverlay)
</span><span class="cx"> DataDetectorsDidHideUI(WebCore::PageOverlay::PageOverlayID pageOverlay)
</span><del>- HandleAcceptedCandidate(struct WebCore::TextCheckingResult acceptedCandidate)
</del><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> SetShouldDispatchFakeMouseMoveEvents(bool shouldDispatchFakeMouseMoveEvents)
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPagemacWebPageMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm (195058 => 195059)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm        2016-01-14 17:32:24 UTC (rev 195058)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm        2016-01-14 17:50:12 UTC (rev 195059)
</span><span class="lines">@@ -118,45 +118,10 @@
</span><span class="cx"> [m_mockAccessibilityElement setWebPage:nullptr];
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void WebPage::platformEditorState(Frame& frame, EditorState& result, IncludePostLayoutDataHint shouldIncludePostLayoutData) const
</del><ins>+void WebPage::platformEditorState(Frame& frame, EditorState& result, IncludePostLayoutDataHint) const
</ins><span class="cx"> {
</span><del>- if (shouldIncludePostLayoutData == IncludePostLayoutDataHint::No) {
- result.isMissingPostLayoutData = true;
- return;
- }
-
- const VisibleSelection& selection = frame.selection().selection();
- RefPtr<Range> selectedRange = selection.toNormalizedRange();
- if (!selectedRange)
- return;
-
- auto& postLayoutData = result.postLayoutData();
- VisiblePosition selectionStart = selection.visibleStart();
- VisiblePosition selectionEnd = selection.visibleEnd();
- VisiblePosition paragraphStart = startOfParagraph(selectionStart);
- VisiblePosition paragraphEnd = endOfParagraph(selectionEnd);
-
- postLayoutData.candidateRequestStartPosition = TextIterator::rangeLength(makeRange(paragraphStart, selectionStart).get());
- postLayoutData.selectedTextLength = TextIterator::rangeLength(makeRange(paragraphStart, selectionEnd).get()) - postLayoutData.candidateRequestStartPosition;
- postLayoutData.paragraphContextForCandidateRequest = plainText(makeRange(paragraphStart, paragraphEnd).get());
- postLayoutData.stringForCandidateRequest = frame.editor().stringForCandidateRequest();
-
- IntRect rectForSelectionCandidates;
- Vector<FloatQuad> quads;
- selectedRange->absoluteTextQuads(quads);
- if (!quads.isEmpty())
- postLayoutData.selectionClipRect = frame.view()->contentsToWindow(quads[0].enclosingBoundingBox());
</del><span class="cx"> }
</span><span class="cx">
</span><del>-void WebPage::handleAcceptedCandidate(WebCore::TextCheckingResult acceptedCandidate)
-{
- Frame* frame = m_page->focusController().focusedFrame();
- if (!frame)
- return;
-
- frame->editor().handleAcceptedCandidate(acceptedCandidate);
-}
-
</del><span class="cx"> NSObject *WebPage::accessibilityObjectForMainFramePlugin()
</span><span class="cx"> {
</span><span class="cx"> if (!m_page)
</span></span></pre>
</div>
</div>
</body>
</html>