Diff
Modified: trunk/Source/WebCore/ChangeLog (94612 => 94613)
--- trunk/Source/WebCore/ChangeLog 2011-09-06 22:57:06 UTC (rev 94612)
+++ trunk/Source/WebCore/ChangeLog 2011-09-06 23:06:32 UTC (rev 94613)
@@ -1,3 +1,20 @@
+2011-09-06 Ryosuke Niwa <[email protected]>
+
+ Rename confirmCompositionWithoutDisturbingSelection to cancelComposition
+ https://bugs.webkit.org/show_bug.cgi?id=67569
+
+ Reviewed by Antonio Gomes.
+
+ Renamed Editor::confirmCompositionWithoutDisturbingSelection to Editor::cancelComposition.
+ Also renamed the shared function from confirmComposition to setComposition.
+
+ * WebCore.exp.in:
+ * editing/Editor.cpp:
+ (WebCore::Editor::confirmComposition):
+ (WebCore::Editor::cancelComposition):
+ (WebCore::Editor::setComposition):
+ * editing/Editor.h:
+
2011-09-06 Sam Weinig <[email protected]>
WebVTTTokenizer files in the wrong place in the Xcode project.
Modified: trunk/Source/WebCore/WebCore.exp.in (94612 => 94613)
--- trunk/Source/WebCore/WebCore.exp.in 2011-09-06 22:57:06 UTC (rev 94612)
+++ trunk/Source/WebCore/WebCore.exp.in 2011-09-06 23:06:32 UTC (rev 94613)
@@ -775,6 +775,7 @@
__ZN7WebCore6Editor14setCompositionERKN3WTF6StringERKNS1_6VectorINS_20CompositionUnderlineELm0EEEjj
__ZN7WebCore6Editor15pasteAsFragmentEN3WTF10PassRefPtrINS_16DocumentFragmentEEEbb
__ZN7WebCore6Editor16pasteAsPlainTextEv
+__ZN7WebCore6Editor17cancelCompositionEv
__ZN7WebCore6Editor17insertOrderedListEv
__ZN7WebCore6Editor18confirmCompositionERKN3WTF6StringE
__ZN7WebCore6Editor18confirmCompositionEv
@@ -804,7 +805,6 @@
__ZN7WebCore6Editor35setIgnoreCompositionSelectionChangeEb
__ZN7WebCore6Editor38commandIsSupportedFromMenuOrKeyBindingERKN3WTF6StringE
__ZN7WebCore6Editor3cutEv
-__ZN7WebCore6Editor44confirmCompositionWithoutDisturbingSelectionEv
__ZN7WebCore6Editor4copyEv
__ZN7WebCore6Editor5pasteEv
__ZN7WebCore6Editor6indentEv
Modified: trunk/Source/WebCore/editing/Editor.cpp (94612 => 94613)
--- trunk/Source/WebCore/editing/Editor.cpp 2011-09-06 22:57:06 UTC (rev 94612)
+++ trunk/Source/WebCore/editing/Editor.cpp 2011-09-06 23:06:32 UTC (rev 94613)
@@ -1469,30 +1469,29 @@
{
if (!m_compositionNode)
return;
- confirmComposition(m_compositionNode->data().substring(m_compositionStart, m_compositionEnd - m_compositionStart), false);
+ setComposition(m_compositionNode->data().substring(m_compositionStart, m_compositionEnd - m_compositionStart), ConfirmComposition);
}
-// FIXME: This function is poorly named. Callers of this function uses this function to cancel composition,
-// and don't expect it to insert the current composition as the name suggests.
-void Editor::confirmCompositionWithoutDisturbingSelection()
+void Editor::cancelComposition()
{
if (!m_compositionNode)
return;
- confirmComposition(emptyString(), true);
+ setComposition(emptyString(), CancelComposition);
}
void Editor::confirmComposition(const String& text)
{
- confirmComposition(text, false);
+ setComposition(text, ConfirmComposition);
}
-void Editor::confirmComposition(const String& text, bool preserveSelection)
+void Editor::setComposition(const String& text, SetCompositionMode mode)
{
+ ASSERT(mode == ConfirmComposition || mode == CancelComposition);
UserTypingGestureIndicator typingGestureIndicator(m_frame);
setIgnoreCompositionSelectionChange(true);
- if (preserveSelection)
+ if (mode == CancelComposition)
ASSERT(text == emptyString());
else
selectComposition();
@@ -1522,7 +1521,7 @@
insertTextForConfirmedComposition(text);
- if (preserveSelection) {
+ if (mode == CancelComposition) {
// An open typing command that disagrees about current selection would cause issues with typing later on.
TypingCommand::closeTyping(m_lastEditCommand.get());
}
Modified: trunk/Source/WebCore/editing/Editor.h (94612 => 94613)
--- trunk/Source/WebCore/editing/Editor.h 2011-09-06 22:57:06 UTC (rev 94612)
+++ trunk/Source/WebCore/editing/Editor.h 2011-09-06 23:06:32 UTC (rev 94613)
@@ -280,7 +280,7 @@
void setComposition(const String&, const Vector<CompositionUnderline>&, unsigned selectionStart, unsigned selectionEnd);
void confirmComposition();
void confirmComposition(const String&); // if no existing composition, replaces selection
- void confirmCompositionWithoutDisturbingSelection();
+ void cancelComposition();
PassRefPtr<Range> compositionRange() const;
bool getCompositionSelection(unsigned& selectionStart, unsigned& selectionEnd) const;
@@ -409,7 +409,8 @@
TextCheckingTypeMask resolveTextCheckingTypeMask(TextCheckingTypeMask);
void selectComposition();
- void confirmComposition(const String&, bool preserveSelection);
+ enum SetCompositionMode { ConfirmComposition, CancelComposition };
+ void setComposition(const String&, SetCompositionMode);
void setIgnoreCompositionSelectionChange(bool ignore);
PassRefPtr<Range> firstVisibleRange(const String&, FindOptions);
Modified: trunk/Source/WebKit/chromium/ChangeLog (94612 => 94613)
--- trunk/Source/WebKit/chromium/ChangeLog 2011-09-06 22:57:06 UTC (rev 94612)
+++ trunk/Source/WebKit/chromium/ChangeLog 2011-09-06 23:06:32 UTC (rev 94613)
@@ -1,3 +1,13 @@
+2011-09-06 Ryosuke Niwa <[email protected]>
+
+ Rename confirmCompositionWithoutDisturbingSelection to cancelComposition
+ https://bugs.webkit.org/show_bug.cgi?id=67569
+
+ Reviewed by Antonio Gomes.
+
+ * src/WebFrameImpl.cpp:
+ (WebKit::WebFrameImpl::unmarkText):
+
2011-09-06 Adam Barth <[email protected]>
[Chromium] Add WebFloatQuad.h for Android
Modified: trunk/Source/WebKit/chromium/src/WebFrameImpl.cpp (94612 => 94613)
--- trunk/Source/WebKit/chromium/src/WebFrameImpl.cpp 2011-09-06 22:57:06 UTC (rev 94612)
+++ trunk/Source/WebKit/chromium/src/WebFrameImpl.cpp 2011-09-06 23:06:32 UTC (rev 94613)
@@ -1088,7 +1088,7 @@
void WebFrameImpl::unmarkText()
{
- frame()->editor()->confirmCompositionWithoutDisturbingSelection();
+ frame()->editor()->cancelComposition();
}
bool WebFrameImpl::hasMarkedText() const
Modified: trunk/Source/WebKit/gtk/ChangeLog (94612 => 94613)
--- trunk/Source/WebKit/gtk/ChangeLog 2011-09-06 22:57:06 UTC (rev 94612)
+++ trunk/Source/WebKit/gtk/ChangeLog 2011-09-06 23:06:32 UTC (rev 94613)
@@ -1,3 +1,13 @@
+2011-09-06 Ryosuke Niwa <[email protected]>
+
+ Rename confirmCompositionWithoutDisturbingSelection to cancelComposition
+ https://bugs.webkit.org/show_bug.cgi?id=67569
+
+ Reviewed by Antonio Gomes.
+
+ * WebCoreSupport/EditorClientGtk.cpp:
+ (WebKit::EditorClient::respondToChangedSelection):
+
2011-08-30 Sheriff Bot <[email protected]>
Unreviewed, rolling out r94142, r94144, r94145, and r94148.
Modified: trunk/Source/WebKit/gtk/WebCoreSupport/EditorClientGtk.cpp (94612 => 94613)
--- trunk/Source/WebKit/gtk/WebCoreSupport/EditorClientGtk.cpp 2011-09-06 22:57:06 UTC (rev 94612)
+++ trunk/Source/WebKit/gtk/WebCoreSupport/EditorClientGtk.cpp 2011-09-06 23:06:32 UTC (rev 94613)
@@ -328,7 +328,7 @@
if (!targetFrame->editor()->getCompositionSelection(start, end)) {
// gtk_im_context_reset() clears the composition for us.
gtk_im_context_reset(priv->imContext.get());
- targetFrame->editor()->confirmCompositionWithoutDisturbingSelection();
+ targetFrame->editor()->cancelComposition();
}
}
Modified: trunk/Source/WebKit/mac/ChangeLog (94612 => 94613)
--- trunk/Source/WebKit/mac/ChangeLog 2011-09-06 22:57:06 UTC (rev 94612)
+++ trunk/Source/WebKit/mac/ChangeLog 2011-09-06 23:06:32 UTC (rev 94613)
@@ -1,3 +1,13 @@
+2011-09-06 Ryosuke Niwa <[email protected]>
+
+ Rename confirmCompositionWithoutDisturbingSelection to cancelComposition
+ https://bugs.webkit.org/show_bug.cgi?id=67569
+
+ Reviewed by Antonio Gomes.
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView _updateSelectionForInputManager]):
+
2011-09-05 Oliver Hunt <[email protected]>
An object's structure should reference the global object responsible for its creation
Modified: trunk/Source/WebKit/mac/WebView/WebHTMLView.mm (94612 => 94613)
--- trunk/Source/WebKit/mac/WebView/WebHTMLView.mm 2011-09-06 22:57:06 UTC (rev 94612)
+++ trunk/Source/WebKit/mac/WebView/WebHTMLView.mm 2011-09-06 23:06:32 UTC (rev 94613)
@@ -5940,7 +5940,7 @@
if (coreFrame->editor()->getCompositionSelection(start, end))
[[NSInputManager currentInputManager] markedTextSelectionChanged:NSMakeRange(start, end - start) client:self];
else {
- coreFrame->editor()->confirmCompositionWithoutDisturbingSelection();
+ coreFrame->editor()->cancelComposition();
[[NSInputManager currentInputManager] markedTextAbandoned:self];
}
}
Modified: trunk/Source/WebKit/win/ChangeLog (94612 => 94613)
--- trunk/Source/WebKit/win/ChangeLog 2011-09-06 22:57:06 UTC (rev 94612)
+++ trunk/Source/WebKit/win/ChangeLog 2011-09-06 23:06:32 UTC (rev 94613)
@@ -1,3 +1,13 @@
+2011-09-06 Ryosuke Niwa <[email protected]>
+
+ Rename confirmCompositionWithoutDisturbingSelection to cancelComposition
+ https://bugs.webkit.org/show_bug.cgi?id=67569
+
+ Reviewed by Antonio Gomes.
+
+ * WebView.cpp:
+ (WebView::resetIME):
+
2011-08-29 Alexey Proskuryakov <[email protected]>
DumpRenderTree should begin each test with an empty cookie store
Modified: trunk/Source/WebKit/win/WebView.cpp (94612 => 94613)
--- trunk/Source/WebKit/win/WebView.cpp 2011-09-06 22:57:06 UTC (rev 94612)
+++ trunk/Source/WebKit/win/WebView.cpp 2011-09-06 23:06:32 UTC (rev 94613)
@@ -5412,7 +5412,7 @@
void WebView::resetIME(Frame* targetFrame)
{
if (targetFrame)
- targetFrame->editor()->confirmCompositionWithoutDisturbingSelection();
+ targetFrame->editor()->cancelComposition();
if (HIMC hInputContext = getIMMContext()) {
IMMDict::dict().notifyIME(hInputContext, NI_COMPOSITIONSTR, CPS_CANCEL, 0);
Modified: trunk/Source/WebKit2/ChangeLog (94612 => 94613)
--- trunk/Source/WebKit2/ChangeLog 2011-09-06 22:57:06 UTC (rev 94612)
+++ trunk/Source/WebKit2/ChangeLog 2011-09-06 23:06:32 UTC (rev 94613)
@@ -1,3 +1,21 @@
+2011-09-06 Ryosuke Niwa <[email protected]>
+
+ Rename confirmCompositionWithoutDisturbingSelection to cancelComposition
+ https://bugs.webkit.org/show_bug.cgi?id=67569
+
+ Reviewed by Antonio Gomes.
+
+ * UIProcess/API/mac/WKView.mm:
+ (-[WKView resignFirstResponder]):
+ (-[WKView _updateTextInputStateIncludingSecureInputState:]):
+ * UIProcess/WebPageProxy.h:
+ * UIProcess/mac/WebPageProxyMac.mm:
+ (WebKit::WebPageProxy::cancelComposition):
+ * WebProcess/WebPage/WebPage.h:
+ * WebProcess/WebPage/WebPage.messages.in:
+ * WebProcess/WebPage/mac/WebPageMac.mm:
+ (WebKit::WebPage::cancelComposition):
+
2011-09-05 Oliver Hunt <[email protected]>
An object's structure should reference the global object responsible for its creation
Modified: trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm (94612 => 94613)
--- trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm 2011-09-06 22:57:06 UTC (rev 94612)
+++ trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm 2011-09-06 23:06:32 UTC (rev 94613)
@@ -323,7 +323,7 @@
_data->_inResignFirstResponder = true;
if (_data->_page->editorState().hasComposition && !_data->_page->editorState().shouldIgnoreCompositionSelectionChange)
- _data->_page->confirmCompositionWithoutDisturbingSelection();
+ _data->_page->cancelComposition();
[self _resetTextInputState];
if (!_data->_page->maintainsInactiveSelection())
@@ -2537,7 +2537,7 @@
if (!editorState.hasComposition || editorState.shouldIgnoreCompositionSelectionChange)
return;
- _data->_page->confirmCompositionWithoutDisturbingSelection();
+ _data->_page->cancelComposition();
[self _notifyInputContextAboutDiscardedComposition];
}
Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.h (94612 => 94613)
--- trunk/Source/WebKit2/UIProcess/WebPageProxy.h 2011-09-06 22:57:06 UTC (rev 94612)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.h 2011-09-06 23:06:32 UTC (rev 94613)
@@ -299,7 +299,7 @@
void setComposition(const String& text, Vector<WebCore::CompositionUnderline> underlines, uint64_t selectionStart, uint64_t selectionEnd, uint64_t replacementRangeStart, uint64_t replacementRangeEnd);
void confirmComposition();
- void confirmCompositionWithoutDisturbingSelection();
+ void cancelComposition();
bool insertText(const String& text, uint64_t replacementRangeStart, uint64_t replacementRangeEnd);
void getMarkedRange(uint64_t& location, uint64_t& length);
void getSelectedRange(uint64_t& location, uint64_t& length);
Modified: trunk/Source/WebKit2/UIProcess/mac/WebPageProxyMac.mm (94612 => 94613)
--- trunk/Source/WebKit2/UIProcess/mac/WebPageProxyMac.mm 2011-09-06 22:57:06 UTC (rev 94612)
+++ trunk/Source/WebKit2/UIProcess/mac/WebPageProxyMac.mm 2011-09-06 23:06:32 UTC (rev 94613)
@@ -163,12 +163,12 @@
process()->sendSync(Messages::WebPage::ConfirmComposition(), Messages::WebPage::ConfirmComposition::Reply(m_editorState), m_pageID);
}
-void WebPageProxy::confirmCompositionWithoutDisturbingSelection()
+void WebPageProxy::cancelComposition()
{
if (!isValid())
return;
- process()->sendSync(Messages::WebPage::ConfirmCompositionWithoutDisturbingSelection(), Messages::WebPage::ConfirmComposition::Reply(m_editorState), m_pageID);
+ process()->sendSync(Messages::WebPage::CancelComposition(), Messages::WebPage::ConfirmComposition::Reply(m_editorState), m_pageID);
}
bool WebPageProxy::insertText(const String& text, uint64_t replacementRangeStart, uint64_t replacementRangeEnd)
Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h (94612 => 94613)
--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h 2011-09-06 22:57:06 UTC (rev 94612)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h 2011-09-06 23:06:32 UTC (rev 94613)
@@ -337,7 +337,7 @@
void setComposition(const String& text, Vector<WebCore::CompositionUnderline> underlines, uint64_t selectionStart, uint64_t selectionEnd, uint64_t replacementRangeStart, uint64_t replacementRangeEnd, EditorState& newState);
void confirmComposition(EditorState& newState);
- void confirmCompositionWithoutDisturbingSelection(EditorState& newState);
+ void cancelComposition(EditorState& newState);
void insertText(const String& text, uint64_t replacementRangeStart, uint64_t replacementRangeEnd, bool& handled, EditorState& newState);
void getMarkedRange(uint64_t& location, uint64_t& length);
void getSelectedRange(uint64_t& location, uint64_t& length);
Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in (94612 => 94613)
--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in 2011-09-06 22:57:06 UTC (rev 94612)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in 2011-09-06 23:06:32 UTC (rev 94613)
@@ -194,7 +194,7 @@
# Text input.
SetComposition(WTF::String text, WTF::Vector<WebCore::CompositionUnderline> underlines, uint64_t selectionStart, uint64_t selectionEnd, uint64_t replacementRangeStart, uint64_t replacementRangeEnd) -> (WebKit::EditorState newState)
ConfirmComposition() -> (WebKit::EditorState newState)
- ConfirmCompositionWithoutDisturbingSelection() -> (WebKit::EditorState newState)
+ CancelComposition() -> (WebKit::EditorState newState)
InsertText(WTF::String text, uint64_t replacementRangeStart, uint64_t replacementRangeEnd) -> (bool handled, WebKit::EditorState newState)
GetMarkedRange() -> (uint64_t location, uint64_t length)
GetSelectedRange() -> (uint64_t location, uint64_t length)
Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm (94612 => 94613)
--- trunk/Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm 2011-09-06 22:57:06 UTC (rev 94612)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm 2011-09-06 23:06:32 UTC (rev 94613)
@@ -252,11 +252,11 @@
newState = editorState();
}
-void WebPage::confirmCompositionWithoutDisturbingSelection(EditorState& newState)
+void WebPage::cancelComposition(EditorState& newState)
{
Frame* frame = m_page->focusController()->focusedOrMainFrame();
- frame->editor()->confirmCompositionWithoutDisturbingSelection();
+ frame->editor()->cancelComposition();
newState = editorState();
}