Commit 57b5000c authored by aestes@apple.com's avatar aestes@apple.com

Wrap uppercaseWord, lowercaseWord, and capitalizeWord with USE(APPKIT)

https://bugs.webkit.org/show_bug.cgi?id=88504

Reviewed by Dan Bernstein.

uppercaseWord, lowercaseWord, and capitalizeWord are methods declared
by NSResponder that subclasses are expected to implement. WebKit should
only support these implementations on platforms that use AppKit.

Source/WebCore:

* WebCore.exp.in:
* editing/Editor.cpp:
* editing/Editor.h:
* loader/EmptyClients.h:
* page/ContextMenuController.cpp:
* page/EditorClient.h:

Source/WebKit/mac:

* WebCoreSupport/WebEditorClient.h:
* WebCoreSupport/WebEditorClient.mm:

Source/WebKit2:

* UIProcess/WebPageProxy.h:
* WebProcess/WebCoreSupport/WebEditorClient.h:
* WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
* WebProcess/WebPage/WebPage.cpp:
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@119687 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 131945d1
2012-06-06 Andy Estes <aestes@apple.com>
Wrap uppercaseWord, lowercaseWord, and capitalizeWord with USE(APPKIT)
https://bugs.webkit.org/show_bug.cgi?id=88504
Reviewed by Dan Bernstein.
uppercaseWord, lowercaseWord, and capitalizeWord are methods declared
by NSResponder that subclasses are expected to implement. WebKit should
only support these implementations on platforms that use AppKit.
* WebCore.exp.in:
* editing/Editor.cpp:
* editing/Editor.h:
* loader/EmptyClients.h:
* page/ContextMenuController.cpp:
* page/EditorClient.h:
2012-06-06 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r119683.
......
......@@ -2121,7 +2121,7 @@ __ZN7WebCore23ApplicationCacheStorage26storeUpdatedQuotaForOriginEPKNS_14Securit
__ZN7WebCore23ApplicationCacheStorage5emptyEv
__ZNK7WebCore23ApplicationCacheStorage11maximumSizeEv
#ifndef BUILDING_ON_LEOPARD
#if USE(APPKIT)
__ZN7WebCore6Editor13lowercaseWordEv
__ZN7WebCore6Editor13uppercaseWordEv
__ZN7WebCore6Editor14capitalizeWordEv
......
......@@ -1116,7 +1116,7 @@ int Editor::spellCheckerDocumentTag()
return client() ? client()->spellCheckerDocumentTag() : 0;
}
#if PLATFORM(MAC)
#if USE(APPKIT)
void Editor::uppercaseWord()
{
......
......@@ -233,7 +233,7 @@ public:
void markMisspellingsAndBadGrammar(const VisibleSelection& spellingSelection, bool markGrammar, const VisibleSelection& grammarSelection);
void markAndReplaceFor(PassRefPtr<SpellCheckRequest>, const Vector<TextCheckingResult>&);
#if PLATFORM(MAC)
#if USE(APPKIT)
void uppercaseWord();
void lowercaseWord();
void capitalizeWord();
......
......@@ -474,7 +474,7 @@ public:
virtual NSURL* canonicalizeURLString(NSString*) { return 0; }
#endif
#if PLATFORM(MAC)
#if USE(APPKIT)
virtual void uppercaseWord() { }
virtual void lowercaseWord() { }
virtual void capitalizeWord() { }
......
......@@ -436,7 +436,7 @@ void ContextMenuController::contextMenuItemSelected(ContextMenuItem* item)
frame->editor()->showColorPanel();
break;
#endif
#if PLATFORM(MAC) && !defined(BUILDING_ON_LEOPARD)
#if USE(APPKIT)
case ContextMenuItemTagMakeUpperCase:
frame->editor()->uppercaseWord();
break;
......@@ -446,6 +446,8 @@ void ContextMenuController::contextMenuItemSelected(ContextMenuItem* item)
case ContextMenuItemTagCapitalize:
frame->editor()->capitalizeWord();
break;
#endif
#if PLATFORM(MAC)
case ContextMenuItemTagChangeBack:
frame->editor()->changeBackToReplacedString(m_hitTestResult.replacedString());
break;
......
......@@ -122,7 +122,7 @@ public:
virtual NSURL* canonicalizeURLString(NSString*) = 0;
#endif
#if PLATFORM(MAC)
#if USE(APPKIT)
virtual void uppercaseWord() = 0;
virtual void lowercaseWord() = 0;
virtual void capitalizeWord() = 0;
......
2012-06-06 Andy Estes <aestes@apple.com>
Wrap uppercaseWord, lowercaseWord, and capitalizeWord with USE(APPKIT)
https://bugs.webkit.org/show_bug.cgi?id=88504
Reviewed by Dan Bernstein.
uppercaseWord, lowercaseWord, and capitalizeWord are methods declared
by NSResponder that subclasses are expected to implement. WebKit should
only support these implementations on platforms that use AppKit.
* WebCoreSupport/WebEditorClient.h:
* WebCoreSupport/WebEditorClient.mm:
2012-06-05 Anders Carlsson <andersca@apple.com>
Build fix.
......
......@@ -76,9 +76,11 @@ public:
virtual NSURL* canonicalizeURL(NSURL*) OVERRIDE;
virtual NSURL* canonicalizeURLString(NSString*) OVERRIDE;
#if USE(APPKIT)
virtual void uppercaseWord() OVERRIDE;
virtual void lowercaseWord() OVERRIDE;
virtual void capitalizeWord() OVERRIDE;
#endif
#if USE(AUTOMATIC_TEXT_REPLACEMENT)
virtual void showSubstitutionsPanel(bool show) OVERRIDE;
......
......@@ -376,6 +376,7 @@ void WebEditorClient::setInsertionPasteboard(const String& pasteboardName)
[m_webView _setInsertionPasteboard:pasteboard];
}
#if USE(APPKIT)
void WebEditorClient::uppercaseWord()
{
[m_webView uppercaseWord:nil];
......@@ -390,6 +391,7 @@ void WebEditorClient::capitalizeWord()
{
[m_webView capitalizeWord:nil];
}
#endif
#if USE(AUTOMATIC_TEXT_REPLACEMENT)
void WebEditorClient::showSubstitutionsPanel(bool show)
......
2012-06-06 Andy Estes <aestes@apple.com>
Wrap uppercaseWord, lowercaseWord, and capitalizeWord with USE(APPKIT)
https://bugs.webkit.org/show_bug.cgi?id=88504
Reviewed by Dan Bernstein.
uppercaseWord, lowercaseWord, and capitalizeWord are methods declared
by NSResponder that subclasses are expected to implement. WebKit should
only support these implementations on platforms that use AppKit.
* UIProcess/WebPageProxy.h:
* WebProcess/WebCoreSupport/WebEditorClient.h:
* WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
* WebProcess/WebPage/WebPage.cpp:
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
2012-06-06 chandra Shekar Vallala <chandra.vallala@motorola.com>
[WK2-Gtk]Compilation errors with flag CONTEXT_MENUS=0
......
......@@ -606,11 +606,13 @@ public:
void advanceToNextMisspelling(bool startBeforeSelection) const;
void changeSpellingToWord(const String& word) const;
#if PLATFORM(MAC)
#if USE(APPKIT)
void uppercaseWord();
void lowercaseWord();
void capitalizeWord();
#endif
#if PLATFORM(MAC)
bool isSmartInsertDeleteEnabled() const { return m_isSmartInsertDeleteEnabled; }
void setSmartInsertDeleteEnabled(bool);
#endif
......
......@@ -100,7 +100,7 @@ private:
virtual NSURL* canonicalizeURLString(NSString*) OVERRIDE;
#endif
#if PLATFORM(MAC)
#if USE(APPKIT)
virtual void uppercaseWord() OVERRIDE;
virtual void lowercaseWord() OVERRIDE;
virtual void capitalizeWord() OVERRIDE;
......
......@@ -145,6 +145,7 @@ static void changeWordCase(WebPage* page, SEL selector)
page->replaceSelectionWithText(frame, [selectedString performSelector:selector]);
}
#if USE(APPKIT)
void WebEditorClient::uppercaseWord()
{
changeWordCase(m_page, @selector(uppercaseString));
......@@ -159,6 +160,7 @@ void WebEditorClient::capitalizeWord()
{
changeWordCase(m_page, @selector(capitalizedString));
}
#endif
#if USE(AUTOMATIC_TEXT_REPLACEMENT)
void WebEditorClient::showSubstitutionsPanel(bool)
......
......@@ -2404,7 +2404,7 @@ void WebPage::unmarkAllBadGrammar()
}
}
#if PLATFORM(MAC)
#if USE(APPKIT)
void WebPage::uppercaseWord()
{
m_page->focusController()->focusedOrMainFrame()->editor()->uppercaseWord();
......
......@@ -682,11 +682,13 @@ private:
void advanceToNextMisspelling(bool startBeforeSelection);
void changeSpellingToWord(const String& word);
#if PLATFORM(MAC)
#if USE(APPKIT)
void uppercaseWord();
void lowercaseWord();
void capitalizeWord();
#endif
#if PLATFORM(MAC)
void setSmartInsertDeleteEnabled(bool isSmartInsertDeleteEnabled) { m_isSmartInsertDeleteEnabled = isSmartInsertDeleteEnabled; }
#endif
......
......@@ -178,7 +178,7 @@ messages -> WebPage {
# Spelling and grammar.
AdvanceToNextMisspelling(bool startBeforeSelection)
ChangeSpellingToWord(WTF::String word)
#if PLATFORM(MAC)
#if USE(APPKIT)
UppercaseWord();
LowercaseWord();
CapitalizeWord();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment