[SCM] WebKit Debian packaging branch, debian/experimental, updated. debian/1.3.8-1-142-g786665c
andersca at apple.com
andersca at apple.com
Mon Dec 27 16:25:41 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 36f2f52557c5f2b96aef5cb4297b44183cf44bc8
Author: andersca at apple.com <andersca at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Dec 21 00:35:16 2010 +0000
2010-12-20 Anders Carlsson <andersca at apple.com>
Reviewed by Sam Weinig.
Add a TextChecker class, hook up spelling and grammar toggling
https://bugs.webkit.org/show_bug.cgi?id=51363
* UIProcess/API/mac/WKView.mm:
(-[WKView validateUserInterfaceItem:]):
(-[WKView toggleContinuousSpellChecking:]):
(-[WKView toggleGrammarChecking:]):
* UIProcess/TextChecker.h: Added.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::unmarkAllMisspellings):
(WebKit::WebPageProxy::unmarkAllBadGrammar):
* UIProcess/WebPageProxy.h:
* UIProcess/mac/TextCheckerMac.mm: Added.
(WebKit::TextChecker::isContinuousSpellCheckingAllowed):
(WebKit::TextChecker::isContinuousSpellCheckingEnabled):
(WebKit::TextChecker::setContinuousSpellCheckingEnabled):
(WebKit::TextChecker::isGrammarCheckingEnabled):
(WebKit::TextChecker::setGrammarCheckingEnabled):
* UIProcess/qt/TextCheckerQt.cpp: Added.
(WebKit::TextChecker::isContinuousSpellCheckingAllowed):
(WebKit::TextChecker::isContinuousSpellCheckingEnabled):
(WebKit::TextChecker::setContinuousSpellCheckingEnabled):
(WebKit::TextChecker::isGrammarCheckingEnabled):
(WebKit::TextChecker::setGrammarCheckingEnabled):
* UIProcess/win/TextCheckerWin.cpp: Added.
(WebKit::TextChecker::isContinuousSpellCheckingAllowed):
(WebKit::TextChecker::isContinuousSpellCheckingEnabled):
(WebKit::TextChecker::setContinuousSpellCheckingEnabled):
(WebKit::TextChecker::isGrammarCheckingEnabled):
(WebKit::TextChecker::setGrammarCheckingEnabled):
* WebKit2.pro:
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::unmarkAllMisspellings):
(WebKit::WebPage::unmarkAllBadGrammar):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* win/WebKit2.vcproj:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@74376 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit2/ChangeLog b/WebKit2/ChangeLog
index 2f14b68..ad0e14d 100644
--- a/WebKit2/ChangeLog
+++ b/WebKit2/ChangeLog
@@ -2,6 +2,49 @@
Reviewed by Sam Weinig.
+ Add a TextChecker class, hook up spelling and grammar toggling
+ https://bugs.webkit.org/show_bug.cgi?id=51363
+
+ * UIProcess/API/mac/WKView.mm:
+ (-[WKView validateUserInterfaceItem:]):
+ (-[WKView toggleContinuousSpellChecking:]):
+ (-[WKView toggleGrammarChecking:]):
+ * UIProcess/TextChecker.h: Added.
+ * UIProcess/WebPageProxy.cpp:
+ (WebKit::WebPageProxy::unmarkAllMisspellings):
+ (WebKit::WebPageProxy::unmarkAllBadGrammar):
+ * UIProcess/WebPageProxy.h:
+ * UIProcess/mac/TextCheckerMac.mm: Added.
+ (WebKit::TextChecker::isContinuousSpellCheckingAllowed):
+ (WebKit::TextChecker::isContinuousSpellCheckingEnabled):
+ (WebKit::TextChecker::setContinuousSpellCheckingEnabled):
+ (WebKit::TextChecker::isGrammarCheckingEnabled):
+ (WebKit::TextChecker::setGrammarCheckingEnabled):
+ * UIProcess/qt/TextCheckerQt.cpp: Added.
+ (WebKit::TextChecker::isContinuousSpellCheckingAllowed):
+ (WebKit::TextChecker::isContinuousSpellCheckingEnabled):
+ (WebKit::TextChecker::setContinuousSpellCheckingEnabled):
+ (WebKit::TextChecker::isGrammarCheckingEnabled):
+ (WebKit::TextChecker::setGrammarCheckingEnabled):
+ * UIProcess/win/TextCheckerWin.cpp: Added.
+ (WebKit::TextChecker::isContinuousSpellCheckingAllowed):
+ (WebKit::TextChecker::isContinuousSpellCheckingEnabled):
+ (WebKit::TextChecker::setContinuousSpellCheckingEnabled):
+ (WebKit::TextChecker::isGrammarCheckingEnabled):
+ (WebKit::TextChecker::setGrammarCheckingEnabled):
+ * WebKit2.pro:
+ * WebKit2.xcodeproj/project.pbxproj:
+ * WebProcess/WebPage/WebPage.cpp:
+ (WebKit::WebPage::unmarkAllMisspellings):
+ (WebKit::WebPage::unmarkAllBadGrammar):
+ * WebProcess/WebPage/WebPage.h:
+ * WebProcess/WebPage/WebPage.messages.in:
+ * win/WebKit2.vcproj:
+
+2010-12-20 Anders Carlsson <andersca at apple.com>
+
+ Reviewed by Sam Weinig.
+
Flash plug-in does not work on YouTube video page when accelerated compositing is disabled
https://bugs.webkit.org/show_bug.cgi?id=51348
<rdar://problem/8787667>
diff --git a/WebKit2/UIProcess/API/mac/WKView.mm b/WebKit2/UIProcess/API/mac/WKView.mm
index 34dc324..21af4ae 100644
--- a/WebKit2/UIProcess/API/mac/WKView.mm
+++ b/WebKit2/UIProcess/API/mac/WKView.mm
@@ -38,6 +38,7 @@
#import "PDFViewController.h"
#import "PageClientImpl.h"
#import "RunLoop.h"
+#import "TextChecker.h"
#import "WKTextInputWindowController.h"
#import "WebContext.h"
#import "WebEventFactory.h"
@@ -311,11 +312,31 @@ WEBCORE_COMMAND(takeFindStringFromSelection)
- (BOOL)validateUserInterfaceItem:(id <NSValidatedUserInterfaceItem>)item
{
- String commandName = commandNameForSelector([item action]);
NSMenuItem *menuItem = (NSMenuItem *)item;
if (![menuItem isKindOfClass:[NSMenuItem class]])
return NO; // FIXME: We need to be able to handle other user interface elements.
+
+ SEL action = [item action];
+
+ if (action == @selector(toggleContinuousSpellChecking:)) {
+ bool checkMark = false;
+ bool returnValue = false;
+ if (TextChecker::isContinuousSpellCheckingAllowed())
+ checkMark = TextChecker::isContinuousSpellCheckingEnabled();
+ returnValue = true;
+
+ [menuItem setState:checkMark ? NSOnState : NSOffState];
+ return returnValue;
+ }
+
+ if (action == @selector(toggleGrammarChecking:)) {
+ bool checkMark = TextChecker::isGrammarCheckingEnabled();
+ [menuItem setState:checkMark ? NSOnState : NSOffState];
+ return YES;
+ }
+ String commandName = commandNameForSelector([item action]);
+
if (_data->_menuItemsMap.find(commandName) == _data->_menuItemsMap.end()) {
_data->_menuItemsMap.add(commandName, menuItem);
_data->_page->validateMenuItem(commandName);
@@ -324,6 +345,24 @@ WEBCORE_COMMAND(takeFindStringFromSelection)
return YES;
}
+- (IBAction)toggleContinuousSpellChecking:(id)sender
+{
+ bool spellCheckingEnabled = !TextChecker::isContinuousSpellCheckingEnabled();
+ TextChecker::setContinuousSpellCheckingEnabled(spellCheckingEnabled);
+
+ if (!spellCheckingEnabled)
+ _data->_page->unmarkAllMisspellings();
+}
+
+- (void)toggleGrammarChecking:(id)sender
+{
+ bool grammarCheckingEnabled = !TextChecker::isGrammarCheckingEnabled();
+ TextChecker::setGrammarCheckingEnabled(grammarCheckingEnabled);
+
+ if (!grammarCheckingEnabled)
+ _data->_page->unmarkAllBadGrammar();
+}
+
// Events
// Override this so that AppKit will send us arrow keys as key down events so we can
diff --git a/WebKit2/UIProcess/TextChecker.h b/WebKit2/UIProcess/TextChecker.h
new file mode 100644
index 0000000..c7e8521
--- /dev/null
+++ b/WebKit2/UIProcess/TextChecker.h
@@ -0,0 +1,43 @@
+/*
+ * Copyright (C) 2010 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.
+ */
+
+#ifndef TextChecker_h
+#define TextChecker_h
+
+namespace WebKit {
+
+class TextChecker {
+public:
+ static bool isContinuousSpellCheckingAllowed();
+ static bool isContinuousSpellCheckingEnabled();
+ static void setContinuousSpellCheckingEnabled(bool);
+
+ static bool isGrammarCheckingEnabled();
+ static void setGrammarCheckingEnabled(bool);
+};
+
+} // namespace WebKit
+
+#endif // TextChecker_h
diff --git a/WebKit2/UIProcess/WebPageProxy.cpp b/WebKit2/UIProcess/WebPageProxy.cpp
index 77b03b9..156aace 100644
--- a/WebKit2/UIProcess/WebPageProxy.cpp
+++ b/WebKit2/UIProcess/WebPageProxy.cpp
@@ -1543,6 +1543,16 @@ void WebPageProxy::didCancelForOpenPanel()
m_openPanelResultListener = 0;
}
+void WebPageProxy::unmarkAllMisspellings()
+{
+ process()->send(Messages::WebPage::UnmarkAllMisspellings(), m_pageID);
+}
+
+void WebPageProxy::unmarkAllBadGrammar()
+{
+ process()->send(Messages::WebPage::UnmarkAllBadGrammar(), m_pageID);
+}
+
void WebPageProxy::registerEditCommand(PassRefPtr<WebEditCommandProxy> commandProxy, UndoOrRedo undoOrRedo)
{
m_pageClient->registerEditCommand(commandProxy, undoOrRedo);
diff --git a/WebKit2/UIProcess/WebPageProxy.h b/WebKit2/UIProcess/WebPageProxy.h
index c80004f..5f75f64 100644
--- a/WebKit2/UIProcess/WebPageProxy.h
+++ b/WebKit2/UIProcess/WebPageProxy.h
@@ -294,6 +294,9 @@ public:
void findZoomableAreaForPoint(const WebCore::IntPoint&);
#endif
+ void unmarkAllMisspellings();
+ void unmarkAllBadGrammar();
+
private:
WebPageProxy(WebContext*, WebPageGroup*, uint64_t pageID);
diff --git a/WebKit2/UIProcess/mac/TextCheckerMac.mm b/WebKit2/UIProcess/mac/TextCheckerMac.mm
new file mode 100644
index 0000000..9579c93
--- /dev/null
+++ b/WebKit2/UIProcess/mac/TextCheckerMac.mm
@@ -0,0 +1,75 @@
+/*
+ * Copyright (C) 2010 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 "TextChecker.h"
+
+namespace WebKit {
+
+static bool continuousSpellCheckingEnabled;
+static bool grammarCheckingEnabled;
+
+bool TextChecker::isContinuousSpellCheckingAllowed()
+{
+ static bool allowContinuousSpellChecking = true;
+ static bool readAllowContinuousSpellCheckingDefault = false;
+
+ if (!readAllowContinuousSpellCheckingDefault) {
+ if ([[NSUserDefaults standardUserDefaults] objectForKey:@"NSAllowContinuousSpellChecking"])
+ allowContinuousSpellChecking = [[NSUserDefaults standardUserDefaults] boolForKey:@"NSAllowContinuousSpellChecking"];
+
+ readAllowContinuousSpellCheckingDefault = true;
+ }
+
+ return allowContinuousSpellChecking;
+}
+
+bool TextChecker::isContinuousSpellCheckingEnabled()
+{
+ return continuousSpellCheckingEnabled && isContinuousSpellCheckingAllowed();
+}
+
+void TextChecker::setContinuousSpellCheckingEnabled(bool isContinuousSpellCheckingEnabled)
+{
+ continuousSpellCheckingEnabled = isContinuousSpellCheckingEnabled;
+
+ // FIXME: preflight the spell checker.
+}
+
+bool TextChecker::isGrammarCheckingEnabled()
+{
+ return grammarCheckingEnabled;
+}
+
+void TextChecker::setGrammarCheckingEnabled(bool isGrammarCheckingEnabled)
+{
+ grammarCheckingEnabled = isGrammarCheckingEnabled;
+
+ [[NSSpellChecker sharedSpellChecker] updatePanels];
+
+ // We call preflightSpellChecker() when turning continuous spell checking on, but we don't need to do that here
+ // because grammar checking only occurs on code paths that already preflight spell checking appropriately.
+}
+
+} // namespace WebKit
diff --git a/WebKit2/UIProcess/qt/TextCheckerQt.cpp b/WebKit2/UIProcess/qt/TextCheckerQt.cpp
new file mode 100644
index 0000000..0bc1c81
--- /dev/null
+++ b/WebKit2/UIProcess/qt/TextCheckerQt.cpp
@@ -0,0 +1,63 @@
+/*
+ * Copyright (C) 2010 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 "TextChecker.h"
+
+#include "NotImplemented.h"
+
+namespace WebKit {
+
+bool TextChecker::isContinuousSpellCheckingAllowed()
+{
+ notImplemented();
+
+ return false;
+}
+
+bool TextChecker::isContinuousSpellCheckingEnabled()
+{
+ notImplemented();
+
+ return false;
+}
+
+void TextChecker::setContinuousSpellCheckingEnabled(bool isContinuousSpellCheckingEnabled)
+{
+ notImplemented();
+}
+
+bool TextChecker::isGrammarCheckingEnabled()
+{
+ notImplemented();
+
+ return false;
+}
+
+void TextChecker::setGrammarCheckingEnabled(bool isGrammarCheckingEnabled)
+{
+ notImplemented();
+}
+
+} // namespace WebKit
diff --git a/WebKit2/UIProcess/win/TextCheckerWin.cpp b/WebKit2/UIProcess/win/TextCheckerWin.cpp
new file mode 100644
index 0000000..0bc1c81
--- /dev/null
+++ b/WebKit2/UIProcess/win/TextCheckerWin.cpp
@@ -0,0 +1,63 @@
+/*
+ * Copyright (C) 2010 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 "TextChecker.h"
+
+#include "NotImplemented.h"
+
+namespace WebKit {
+
+bool TextChecker::isContinuousSpellCheckingAllowed()
+{
+ notImplemented();
+
+ return false;
+}
+
+bool TextChecker::isContinuousSpellCheckingEnabled()
+{
+ notImplemented();
+
+ return false;
+}
+
+void TextChecker::setContinuousSpellCheckingEnabled(bool isContinuousSpellCheckingEnabled)
+{
+ notImplemented();
+}
+
+bool TextChecker::isGrammarCheckingEnabled()
+{
+ notImplemented();
+
+ return false;
+}
+
+void TextChecker::setGrammarCheckingEnabled(bool isGrammarCheckingEnabled)
+{
+ notImplemented();
+}
+
+} // namespace WebKit
diff --git a/WebKit2/WebKit2.pro b/WebKit2/WebKit2.pro
index 60d6ea5..4839b8c 100644
--- a/WebKit2/WebKit2.pro
+++ b/WebKit2/WebKit2.pro
@@ -328,6 +328,7 @@ HEADERS += \
UIProcess/Plugins/PluginInfoStore.h \
UIProcess/ProcessModel.h \
UIProcess/ResponsivenessTimer.h \
+ UIProcess/TextChecker.h \
UIProcess/TiledDrawingAreaProxy.h \
UIProcess/VisitedLinkProvider.h \
UIProcess/WebContext.h \
@@ -555,6 +556,7 @@ SOURCES += \
UIProcess/qt/ChunkedUpdateDrawingAreaProxyQt.cpp \
UIProcess/qt/TiledDrawingAreaProxyQt.cpp \
UIProcess/qt/TiledDrawingAreaTileQt.cpp \
+ UIProcess/qt/TextCheckerQt.cpp \
UIProcess/qt/WebContextMenuProxyQt.cpp \
UIProcess/qt/WebContextQt.cpp \
UIProcess/qt/WebInspectorProxyQt.cpp \
diff --git a/WebKit2/WebKit2.xcodeproj/project.pbxproj b/WebKit2/WebKit2.xcodeproj/project.pbxproj
index cec3215..3b47df0 100644
--- a/WebKit2/WebKit2.xcodeproj/project.pbxproj
+++ b/WebKit2/WebKit2.xcodeproj/project.pbxproj
@@ -155,6 +155,8 @@
1A91010B1268C8CA001842F5 /* FindIndicatorWindow.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1A9101091268C8CA001842F5 /* FindIndicatorWindow.mm */; };
1AA1CC5D100FA1A10078DEBC /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1AA1CC5C100FA1A10078DEBC /* QuartzCore.framework */; };
1AA1CD07100FA1BA0078DEBC /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1AA1CD06100FA1BA0078DEBC /* Carbon.framework */; };
+ 1AA417CB12C00CCA002BE67B /* TextChecker.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AA417C912C00CCA002BE67B /* TextChecker.h */; };
+ 1AA417EF12C00D87002BE67B /* TextCheckerMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1AA417ED12C00D87002BE67B /* TextCheckerMac.mm */; };
1AA4792312A59FD9008236C3 /* PluginProcessMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1AA4792212A59FD9008236C3 /* PluginProcessMac.mm */; };
1AA479B012A5A436008236C3 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1AA1CD06100FA1BA0078DEBC /* Carbon.framework */; };
1AA56F2911E92BC80061B882 /* PluginController.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AA56F2811E92BC80061B882 /* PluginController.h */; };
@@ -807,6 +809,8 @@
1AA1C7DE100E846E0078DEBC /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = JavaScriptCore.framework; sourceTree = BUILT_PRODUCTS_DIR; };
1AA1CC5C100FA1A10078DEBC /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = /System/Library/Frameworks/QuartzCore.framework; sourceTree = "<absolute>"; };
1AA1CD06100FA1BA0078DEBC /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = /System/Library/Frameworks/Carbon.framework; sourceTree = "<absolute>"; };
+ 1AA417C912C00CCA002BE67B /* TextChecker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextChecker.h; sourceTree = "<group>"; };
+ 1AA417ED12C00D87002BE67B /* TextCheckerMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = TextCheckerMac.mm; sourceTree = "<group>"; };
1AA4792212A59FD9008236C3 /* PluginProcessMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = PluginProcessMac.mm; sourceTree = "<group>"; };
1AA56F2811E92BC80061B882 /* PluginController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PluginController.h; sourceTree = "<group>"; };
1AA5889011EE70400061B882 /* NetscapePluginStream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NetscapePluginStream.h; sourceTree = "<group>"; };
@@ -1897,6 +1901,7 @@
BC597074116591D000551FCA /* ProcessModel.h */,
BC111B08112F5E3C00337BAB /* ResponsivenessTimer.cpp */,
1A30066C1110F4F70031937C /* ResponsivenessTimer.h */,
+ 1AA417C912C00CCA002BE67B /* TextChecker.h */,
1A0F29E1120B44420053D1B9 /* VisitedLinkProvider.cpp */,
1A0F29E2120B44420053D1B9 /* VisitedLinkProvider.h */,
BC72BA1B11E64907001EB4EA /* WebBackForwardList.cpp */,
@@ -2305,6 +2310,7 @@
children = (
BC2651F511825EF800243E12 /* ChunkedUpdateDrawingAreaProxyMac.mm */,
0F5265BB11DD37860006D33C /* LayerBackedDrawingAreaProxyMac.mm */,
+ 1AA417ED12C00D87002BE67B /* TextCheckerMac.mm */,
1A1C648611F415B700553C19 /* WebContextMac.mm */,
51ACBB9E127A8F2C00D203B9 /* WebContextMenuProxyMac.h */,
51ACBB9F127A8F2C00D203B9 /* WebContextMenuProxyMac.mm */,
@@ -2756,6 +2762,7 @@
1A4A9AA812B7E796008FE984 /* WKTextInputWindowController.h in Headers */,
1A4A9C5612B816CF008FE984 /* NetscapePluginModule.h in Headers */,
1A4A9F3312B844E2008FE984 /* PluginQuirks.h in Headers */,
+ 1AA417CB12C00CCA002BE67B /* TextChecker.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -3178,6 +3185,7 @@
1A4A9AA912B7E796008FE984 /* WKTextInputWindowController.mm in Sources */,
1A4A9C5512B816CF008FE984 /* NetscapePluginModule.cpp in Sources */,
1A4A9C9A12B821CD008FE984 /* NetscapePluginModuleMac.mm in Sources */,
+ 1AA417EF12C00D87002BE67B /* TextCheckerMac.mm in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
diff --git a/WebKit2/WebProcess/WebPage/WebPage.cpp b/WebKit2/WebProcess/WebPage/WebPage.cpp
index 74f6f54..bf8dc71 100644
--- a/WebKit2/WebProcess/WebPage/WebPage.cpp
+++ b/WebKit2/WebProcess/WebPage/WebPage.cpp
@@ -1126,6 +1126,22 @@ void WebPage::didCancelForOpenPanel()
m_activeOpenPanelResultListener = 0;
}
+void WebPage::unmarkAllMisspellings()
+{
+ for (Frame* frame = m_page->mainFrame(); frame; frame = frame->tree()->traverseNext()) {
+ if (Document* document = frame->document())
+ document->markers()->removeMarkers(DocumentMarker::Spelling);
+ }
+}
+
+void WebPage::unmarkAllBadGrammar()
+{
+ for (Frame* frame = m_page->mainFrame(); frame; frame = frame->tree()->traverseNext()) {
+ if (Document* document = frame->document())
+ document->markers()->removeMarkers(DocumentMarker::Grammar);
+ }
+}
+
void WebPage::setTextForActivePopupMenu(int32_t index)
{
if (!m_activePopupMenu)
diff --git a/WebKit2/WebProcess/WebPage/WebPage.h b/WebKit2/WebProcess/WebPage/WebPage.h
index 6c4d94b..3339c3d 100644
--- a/WebKit2/WebProcess/WebPage/WebPage.h
+++ b/WebKit2/WebProcess/WebPage/WebPage.h
@@ -343,6 +343,9 @@ private:
void didChooseFilesForOpenPanel(const Vector<String>&);
void didCancelForOpenPanel();
+ void unmarkAllMisspellings();
+ void unmarkAllBadGrammar();
+
#if ENABLE(CONTEXT_MENUS)
void didSelectItemFromActiveContextMenu(const WebContextMenuItemData&);
#endif
diff --git a/WebKit2/WebProcess/WebPage/WebPage.messages.in b/WebKit2/WebProcess/WebPage/WebPage.messages.in
index 6643948..b898c14 100644
--- a/WebKit2/WebProcess/WebPage/WebPage.messages.in
+++ b/WebKit2/WebProcess/WebPage/WebPage.messages.in
@@ -97,6 +97,10 @@ messages -> WebPage {
DidChooseFilesForOpenPanel(Vector<WTF::String> fileURLs)
DidCancelForOpenPanel()
+ # Speling and grammer.
+ UnmarkAllMisspellings()
+ UnmarkAllBadGrammar()
+
SetWindowResizerSize(WebCore::IntSize intersectsView)
// FIXME: This a dummy message, to avoid breaking the build for platforms that don't require
diff --git a/WebKit2/win/WebKit2.vcproj b/WebKit2/win/WebKit2.vcproj
index ac7a182..ef21e27 100755
--- a/WebKit2/win/WebKit2.vcproj
+++ b/WebKit2/win/WebKit2.vcproj
@@ -1915,6 +1915,10 @@
>
</File>
<File
+ RelativePath="..\UIProcess\TextChecker.h"
+ >
+ </File>
+ <File
RelativePath="..\UIProcess\VisitedLinkProvider.cpp"
>
</File>
@@ -2505,6 +2509,10 @@
RelativePath="..\UIProcess\win\LayerBackedDrawingAreaProxyWin.cpp"
>
</File>
+ <File
+ RelativePath="..\UIProcess\win\TextCheckerWin.cpp"
+ >
+ </File>
<File
RelativePath="..\UIProcess\win\WebContextMenuProxyWin.cpp"
>
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list