WebKit Bugzilla
Attachment 358074 Details for
Bug 193034
: Add support for using the current text selection as the find string on iOS
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
WIP patch
bug-193034-20181225215156.patch (text/plain), 38.18 KB, created by
Wenson Hsieh
on 2018-12-25 21:51:56 PST
(
hide
)
Description:
WIP patch
Filename:
MIME Type:
Creator:
Wenson Hsieh
Created:
2018-12-25 21:51:56 PST
Size:
38.18 KB
patch
obsolete
>Subversion Revision: 239547 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 8ecfee1d2c9f6197df758209640135c8423828f2..de6392e103877d11c7eb715b016a86f951b609f2 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,24 @@ >+2018-12-25 Wenson Hsieh <wenson_hsieh@apple.com> >+ >+ Add support for using the current text selection as the find string on iOS >+ https://bugs.webkit.org/show_bug.cgi?id=193034 >+ <rdar://problem/45138739> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * editing/Editor.cpp: >+ (WebCore::Editor::canCopyExcludingStandaloneImages const): >+ * editing/Editor.h: >+ * editing/EditorCommand.cpp: >+ (WebCore::createCommandMap): >+ * editing/cocoa/EditorCocoa.mm: >+ (WebCore::Editor::takeFindStringFromSelection): >+ * editing/mac/EditorMac.mm: >+ (WebCore::Editor::canCopyExcludingStandaloneImages): Deleted. >+ (WebCore::Editor::takeFindStringFromSelection): Deleted. >+ * loader/EmptyClients.cpp: >+ * page/EditorClient.h: >+ > 2018-12-22 Carlos Garcia Campos <cgarcia@igalia.com> > > [HarfBuzz] Width not correctly reported as 0 for zero font size >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index effac72476161450c545a3d9a8c37982911091c1..d3884be2c9ce458478523a2d914cb9d02aa0b6d3 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,35 @@ >+2018-12-25 Wenson Hsieh <wenson_hsieh@apple.com> >+ >+ Add support for using the current text selection as the find string on iOS >+ https://bugs.webkit.org/show_bug.cgi?id=193034 >+ <rdar://problem/45138739> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * SourcesCocoa.txt: >+ * UIProcess/API/Cocoa/WKWebView.mm: >+ (-[WKWebView _takeFindStringFromSelection:]): >+ (+[WKWebView _stringForFindInPage]): >+ (+[WKWebView _clearStringForFindInPage]): >+ * UIProcess/API/Cocoa/WKWebViewPrivate.h: >+ * UIProcess/WebPageProxy.h: >+ * UIProcess/WebPageProxy.messages.in: >+ * UIProcess/WebProcessPool.h: >+ * UIProcess/ios/GlobalFindInPageState.cpp: Copied from Source/WebKit/WebProcess/WebCoreSupport/ios/WebEditorClientIOS.mm. >+ (WebKit::globalStringForFindInPage): >+ (WebKit::updateStringForFindInPage): >+ (WebKit::stringForFindInPage): >+ * UIProcess/ios/GlobalFindInPageState.h: Copied from Source/WebKit/WebProcess/WebCoreSupport/ios/WebEditorClientIOS.mm. >+ * UIProcess/ios/WebPageProxyIOS.mm: >+ (WebKit::WebPageProxy::updateStringForFindInPage): >+ * WebKit.xcodeproj/project.pbxproj: >+ * WebProcess/WebCoreSupport/WebEditorClient.h: >+ * WebProcess/WebCoreSupport/ios/WebEditorClientIOS.mm: >+ (WebKit::WebEditorClient::updateStringForFindInPage): >+ * WebProcess/WebPage/WebPage.h: >+ * WebProcess/WebPage/ios/WebPageIOS.mm: >+ (WebKit::WebPage::updateStringForFindInPage): >+ > 2018-12-23 Wenson Hsieh <wenson_hsieh@apple.com> > > [iOS] Remove some unnecessary editing SPI after <rdar://problem/46047546> >diff --git a/Source/WebKitLegacy/mac/ChangeLog b/Source/WebKitLegacy/mac/ChangeLog >index 441bb0930ed9d9b6f60860a73543105936f85eee..913f6ccad3f8dbb7cbb657f07a1fa91803b4e45a 100644 >--- a/Source/WebKitLegacy/mac/ChangeLog >+++ b/Source/WebKitLegacy/mac/ChangeLog >@@ -1,3 +1,13 @@ >+2018-12-25 Wenson Hsieh <wenson_hsieh@apple.com> >+ >+ Add support for using the current text selection as the find string on iOS >+ https://bugs.webkit.org/show_bug.cgi?id=193034 >+ <rdar://problem/45138739> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * WebCoreSupport/WebEditorClient.h: >+ > 2018-12-20 Yusuke Suzuki <yusukesuzuki@slowstart.org> > > Use Ref<> as much as possible >diff --git a/Source/WebCore/editing/Editor.cpp b/Source/WebCore/editing/Editor.cpp >index a5e8584f4ae8772314f63f3417bc0cd6e46176fd..8d17137bfd5476bceb4e9bd72e370fa4f538160d 100644 >--- a/Source/WebCore/editing/Editor.cpp >+++ b/Source/WebCore/editing/Editor.cpp >@@ -4256,4 +4256,10 @@ RefPtr<HTMLImageElement> Editor::insertEditableImage() > return InsertEditableImageCommand::insertEditableImage(document()); > } > >+bool Editor::canCopyExcludingStandaloneImages() const >+{ >+ auto& selection = m_frame.selection().selection(); >+ return selection.isRange() && !selection.isInPasswordField(); >+} >+ > } // namespace WebCore >diff --git a/Source/WebCore/editing/Editor.h b/Source/WebCore/editing/Editor.h >index 7cad22098526006f9cc89c1ce0e279422ec7385f..05cc1b82aeac140b40930df6f37ea54955c63f46 100644 >--- a/Source/WebCore/editing/Editor.h >+++ b/Source/WebCore/editing/Editor.h >@@ -485,9 +485,8 @@ public: > #if PLATFORM(COCOA) > WEBCORE_EXPORT String stringSelectionForPasteboard(); > String stringSelectionForPasteboardWithImageAltText(); >-#if !PLATFORM(IOS_FAMILY) >- bool canCopyExcludingStandaloneImages(); > void takeFindStringFromSelection(); >+#if !PLATFORM(IOS_FAMILY) > WEBCORE_EXPORT void readSelectionFromPasteboard(const String& pasteboardName); > WEBCORE_EXPORT void replaceNodeFromPasteboard(Node*, const String& pasteboardName); > WEBCORE_EXPORT RefPtr<SharedBuffer> dataSelectionForPasteboard(const String& pasteboardName); >@@ -495,6 +494,8 @@ public: > WEBCORE_EXPORT void replaceSelectionWithAttributedString(NSAttributedString *, MailBlockquoteHandling = MailBlockquoteHandling::RespectBlockquote); > #endif > >+ bool canCopyExcludingStandaloneImages() const; >+ > String clientReplacementURLForResource(Ref<SharedBuffer>&& resourceData, const String& mimeType); > > #if !PLATFORM(WIN) >diff --git a/Source/WebCore/editing/EditorCommand.cpp b/Source/WebCore/editing/EditorCommand.cpp >index 9fdac1d6119538ace3d4bf8c0ee3179f47c8bd31..0b3bbb9be69569eb82cf054dc24c715e7e4ad438 100644 >--- a/Source/WebCore/editing/EditorCommand.cpp >+++ b/Source/WebCore/editing/EditorCommand.cpp >@@ -1102,13 +1102,15 @@ static bool executeSwapWithMark(Frame& frame, Event*, EditorCommandSource, const > return true; > } > >-#if PLATFORM(MAC) >+#if PLATFORM(COCOA) >+ > static bool executeTakeFindStringFromSelection(Frame& frame, Event*, EditorCommandSource, const String&) > { > frame.editor().takeFindStringFromSelection(); > return true; > } >-#endif >+ >+#endif // PLATFORM(COCOA) > > static bool executeToggleBold(Frame& frame, Event*, EditorCommandSource source, const String&) > { >@@ -1367,12 +1369,14 @@ static bool enabledRedo(Frame& frame, Event*, EditorCommandSource) > return frame.editor().canRedo(); > } > >-#if PLATFORM(MAC) >+#if PLATFORM(COCOA) >+ > static bool enabledTakeFindStringFromSelection(Frame& frame, Event*, EditorCommandSource) > { > return frame.editor().canCopyExcludingStandaloneImages(); > } >-#endif >+ >+#endif // PLATFORM(COCOA) > > static bool enabledUndo(Frame& frame, Event*, EditorCommandSource) > { >@@ -1718,7 +1722,7 @@ static const CommandMap& createCommandMap() > { "PasteGlobalSelection", { executePasteGlobalSelection, supportedFromMenuOrKeyBinding, enabledPaste, stateNone, valueNull, notTextInsertion, allowExecutionWhenDisabled } }, > #endif > >-#if PLATFORM(MAC) >+#if PLATFORM(COCOA) > { "TakeFindStringFromSelection", { executeTakeFindStringFromSelection, supportedFromMenuOrKeyBinding, enabledTakeFindStringFromSelection, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } }, > #endif > }; >diff --git a/Source/WebCore/editing/cocoa/EditorCocoa.mm b/Source/WebCore/editing/cocoa/EditorCocoa.mm >index 5de716fa1ac4a9b69c85f0966ba293bfabb26bfc..c1813c86aa163a3eede54e48d3eb05830420bb9f 100644 >--- a/Source/WebCore/editing/cocoa/EditorCocoa.mm >+++ b/Source/WebCore/editing/cocoa/EditorCocoa.mm >@@ -55,6 +55,7 @@ > #import "markup.h" > #import <pal/spi/cocoa/NSAttributedStringSPI.h> > #import <pal/spi/cocoa/NSKeyedArchiverSPI.h> >+#import <pal/system/Sound.h> > #import <wtf/BlockObjCExceptions.h> > #import <wtf/cocoa/NSURLExtras.h> > >@@ -223,4 +224,28 @@ RefPtr<DocumentFragment> Editor::webContentFromPasteboard(Pasteboard& pasteboard > return WTFMove(reader.fragment); > } > >+void Editor::takeFindStringFromSelection() >+{ >+ if (!canCopyExcludingStandaloneImages()) { >+ PAL::systemBeep(); >+ return; >+ } >+ >+ auto stringFromSelection = m_frame.displayStringModifiedByEncoding(selectedTextForDataTransfer()); >+#if PLATFORM(MAC) >+ Vector<String> types; >+ types.append(String(legacyStringPasteboardType())); >+ ALLOW_DEPRECATED_DECLARATIONS_BEGIN >+ platformStrategies()->pasteboardStrategy()->setTypes(types, NSFindPboard); >+ platformStrategies()->pasteboardStrategy()->setStringForType(WTFMove(stringFromSelection), legacyStringPasteboardType(), NSFindPboard); >+ ALLOW_DEPRECATED_DECLARATIONS_END >+#else >+ if (auto* client = this->client()) { >+ // Since the find pasteboard doesn't exist on iOS, WebKit maintains its own notion of the latest find string, >+ // which SPI clients may respect when presenting find-in-page UI. >+ client->updateStringForFindInPage(stringFromSelection); >+ } >+#endif >+} >+ > } >diff --git a/Source/WebCore/editing/mac/EditorMac.mm b/Source/WebCore/editing/mac/EditorMac.mm >index 3fe6f4e7e452125b51fa1fc7d48061c2c46bb77d..6971f0097438beb4493cf210d255d071d2608b0d 100644 >--- a/Source/WebCore/editing/mac/EditorMac.mm >+++ b/Source/WebCore/editing/mac/EditorMac.mm >@@ -55,7 +55,6 @@ > #import "WebNSAttributedStringExtras.h" > #import "markup.h" > #import <AppKit/AppKit.h> >-#import <pal/system/Sound.h> > #import <wtf/cocoa/NSURLExtras.h> > > namespace WebCore { >@@ -98,27 +97,6 @@ void Editor::pasteWithPasteboard(Pasteboard* pasteboard, OptionSet<PasteOption> > client()->setInsertionPasteboard(String()); > } > >-bool Editor::canCopyExcludingStandaloneImages() >-{ >- const VisibleSelection& selection = m_frame.selection().selection(); >- return selection.isRange() && !selection.isInPasswordField(); >-} >- >-void Editor::takeFindStringFromSelection() >-{ >- if (!canCopyExcludingStandaloneImages()) { >- PAL::systemBeep(); >- return; >- } >- >- Vector<String> types; >- types.append(String(legacyStringPasteboardType())); >- ALLOW_DEPRECATED_DECLARATIONS_BEGIN >- platformStrategies()->pasteboardStrategy()->setTypes(types, NSFindPboard); >- platformStrategies()->pasteboardStrategy()->setStringForType(m_frame.displayStringModifiedByEncoding(selectedTextForDataTransfer()), legacyStringPasteboardType(), NSFindPboard); >- ALLOW_DEPRECATED_DECLARATIONS_END >-} >- > void Editor::readSelectionFromPasteboard(const String& pasteboardName) > { > Pasteboard pasteboard(pasteboardName); >diff --git a/Source/WebCore/loader/EmptyClients.cpp b/Source/WebCore/loader/EmptyClients.cpp >index a28ec68cd39d44514ce7266a8378bf133b6cabf2..ff69fcc195ff19f889b5cb35c2f8c7136d0082bb 100644 >--- a/Source/WebCore/loader/EmptyClients.cpp >+++ b/Source/WebCore/loader/EmptyClients.cpp >@@ -215,6 +215,7 @@ private: > int getPasteboardItemsCount() final { return 0; } > RefPtr<DocumentFragment> documentFragmentFromDelegate(int) final { return nullptr; } > bool performsTwoStepPaste(DocumentFragment*) final { return false; } >+ void updateStringForFindInPage(const String&) final { } > #endif > > bool performTwoStepDrop(DocumentFragment&, Range&, bool) final { return false; } >diff --git a/Source/WebCore/page/EditorClient.h b/Source/WebCore/page/EditorClient.h >index a65d80cea0f27daf4bfd28a5ad08ea0a64c4648b..48ed7ce4683e98143e55afd0a071c82ef24e8dc4 100644 >--- a/Source/WebCore/page/EditorClient.h >+++ b/Source/WebCore/page/EditorClient.h >@@ -134,6 +134,7 @@ public: > virtual int getPasteboardItemsCount() = 0; > virtual RefPtr<DocumentFragment> documentFragmentFromDelegate(int index) = 0; > virtual bool performsTwoStepPaste(DocumentFragment*) = 0; >+ virtual void updateStringForFindInPage(const String&) = 0; > #endif > > #if PLATFORM(COCOA) >diff --git a/Source/WebKit/SourcesCocoa.txt b/Source/WebKit/SourcesCocoa.txt >index 9d7cc5cc6c4e71c4bc63cd1fbf3424df47a3fc4c..0a5e988604d392f4de2989712b7a9c495c29f637 100644 >--- a/Source/WebKit/SourcesCocoa.txt >+++ b/Source/WebKit/SourcesCocoa.txt >@@ -371,6 +371,7 @@ UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm > > UIProcess/ios/DragDropInteractionState.mm > UIProcess/ios/EditableImageController.mm >+UIProcess/ios/GlobalFindInPageState.cpp > UIProcess/ios/InputViewUpdateDeferrer.mm > UIProcess/ios/PageClientImplIOS.mm > UIProcess/ios/PencilKitSoftLink.mm >diff --git a/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm b/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm >index 6d893965eb345cb6813dfe7f0c64c4d321b6da6b..a031f132a808c32dab19fdfd3b3cbd9e91e94c8f 100644 >--- a/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm >+++ b/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm >@@ -37,6 +37,7 @@ > #import "FindClient.h" > #import "FrontBoardServicesSPI.h" > #import "FullscreenClient.h" >+#import "GlobalFindInPageState.h" > #import "IconLoadingDelegate.h" > #import "LegacySessionStateCoding.h" > #import "Logging.h" >@@ -4442,6 +4443,15 @@ - (void)_setEditable:(BOOL)editable > #endif > } > >+- (void)_takeFindStringFromSelection:(id)sender >+{ >+#if PLATFORM(MAC) >+ [self takeFindStringFromSelection:sender]; >+#else >+ _page->executeEditCommand("TakeFindStringFromSelection"_s); >+#endif >+} >+ > - (_WKRemoteObjectRegistry *)_remoteObjectRegistry > { > #if PLATFORM(MAC) >@@ -4700,6 +4710,16 @@ - (UITextInputAssistantItem *)inputAssistantItem > return [_contentView inputAssistantItemForWebView]; > } > >++ (NSString *)_stringForFindInPage >+{ >+ return WebKit::stringForFindInPage(); >+} >+ >++ (void)_clearStringForFindInPage >+{ >+ WebKit::updateStringForFindInPage(emptyString()); >+} >+ > #endif > > - (NSData *)_sessionStateData >diff --git a/Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h b/Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h >index 88b5635be8fe6a0bb2e5d3cf62c7bf62f6c786bd..b7d6bfbae41a911a83f49b13a0124b5673becb43 100644 >--- a/Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h >+++ b/Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h >@@ -215,6 +215,7 @@ typedef NS_OPTIONS(NSUInteger, _WKRectEdge) { > - (IBAction)_changeListType:(id)sender WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA)); > - (IBAction)_pasteAsQuotation:(id)sender WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA)); > - (IBAction)_pasteAndMatchStyle:(id)sender WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA)); >+- (IBAction)_takeFindStringFromSelection:(id)sender WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA)); > > #if TARGET_OS_IPHONE > >@@ -256,6 +257,9 @@ typedef NS_OPTIONS(NSUInteger, _WKRectEdge) { > > @property (nonatomic, setter=_setDragInteractionPolicy:) _WKDragInteractionPolicy _dragInteractionPolicy WK_API_AVAILABLE(ios(11.0)); > >+@property (class, nonatomic, readonly) NSString *_stringForFindInPage WK_API_AVAILABLE(ios(WK_IOS_TBA)); >++ (void)_clearStringForFindInPage WK_API_AVAILABLE(ios(WK_IOS_TBA)); >+ > - (void)_beginInteractiveObscuredInsetsChange; > - (void)_endInteractiveObscuredInsetsChange; > - (void)_hideContentUntilNextUpdate; >diff --git a/Source/WebKit/UIProcess/WebPageProxy.h b/Source/WebKit/UIProcess/WebPageProxy.h >index 01bea50d4f2f281903dd61f9cfe408dfcc02b3ad..0911d6517520c28d961b04b804bbf01082d5d91a 100644 >--- a/Source/WebKit/UIProcess/WebPageProxy.h >+++ b/Source/WebKit/UIProcess/WebPageProxy.h >@@ -1720,6 +1720,8 @@ private: > void interpretKeyEvent(const EditorState&, bool isCharEvent, bool& handled); > void showPlaybackTargetPicker(bool hasVideo, const WebCore::IntRect& elementRect, WebCore::RouteSharingPolicy, const String&); > void selectionRectsCallback(const Vector<WebCore::SelectionRect>&, CallbackID); >+ >+ void updateStringForFindInPage(const String&); > #endif > #if PLATFORM(GTK) > void printFinishedCallback(const WebCore::ResourceError&, CallbackID); >diff --git a/Source/WebKit/UIProcess/WebPageProxy.messages.in b/Source/WebKit/UIProcess/WebPageProxy.messages.in >index 1e4518f71c41fd1e628886fc03e3512f018aa1c9..464c0332771b21e995d2a5027549b6415a33d2f9 100644 >--- a/Source/WebKit/UIProcess/WebPageProxy.messages.in >+++ b/Source/WebKit/UIProcess/WebPageProxy.messages.in >@@ -416,6 +416,8 @@ messages -> WebPageProxy { > > EnableInspectorNodeSearch() > DisableInspectorNodeSearch() >+ >+ UpdateStringForFindInPage(String findString) > #endif > > DidChangeInspectorFrontendCount(uint64_t count) >diff --git a/Source/WebKit/UIProcess/WebProcessPool.h b/Source/WebKit/UIProcess/WebProcessPool.h >index 1a161acc421bd3d9ea6f19819ef502f1d9b4428f..b476b2381dc3d3fd121d1e53caaddf2483bde192 100644 >--- a/Source/WebKit/UIProcess/WebProcessPool.h >+++ b/Source/WebKit/UIProcess/WebProcessPool.h >@@ -474,6 +474,11 @@ public: > bool sandboxEnabled() const { return m_sandboxEnabled; }; > #endif > >+#if PLATFORM(IOS_FAMILY) >+ const String& stringForFindInPage() const { return m_stringForFindInPage; } >+ void setStringForFindInPage(const String& string) { m_stringForFindInPage = string; } >+#endif >+ > private: > void platformInitialize(); > >@@ -729,6 +734,10 @@ private: > #if PLATFORM(GTK) || PLATFORM(WPE) > bool m_sandboxEnabled { false }; > #endif >+ >+#if PLATFORM(IOS_FAMILY) >+ String m_stringForFindInPage; >+#endif > }; > > template<typename T> >diff --git a/Source/WebKit/UIProcess/ios/GlobalFindInPageState.cpp b/Source/WebKit/UIProcess/ios/GlobalFindInPageState.cpp >new file mode 100644 >index 0000000000000000000000000000000000000000..1bbb1a88c6f4d0f95fc16de89c3a5716da92ea1b >--- /dev/null >+++ b/Source/WebKit/UIProcess/ios/GlobalFindInPageState.cpp >@@ -0,0 +1,53 @@ >+/* >+ * Copyright (C) 2018 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. >+ */ >+ >+#import "config.h" >+#import "GlobalFindInPageState.h" >+ >+#if PLATFORM(IOS_FAMILY) >+ >+#import <wtf/text/WTFString.h> >+ >+namespace WebKit { >+ >+static String& globalStringForFindInPage() >+{ >+ static NeverDestroyed<String> string; >+ return string.get(); >+} >+ >+void updateStringForFindInPage(const String& string) >+{ >+ globalStringForFindInPage() = string; >+} >+ >+const String& stringForFindInPage() >+{ >+ return globalStringForFindInPage(); >+} >+ >+} // namespace WebKit >+ >+#endif // PLATFORM(IOS_FAMILY) >diff --git a/Source/WebKit/UIProcess/ios/GlobalFindInPageState.h b/Source/WebKit/UIProcess/ios/GlobalFindInPageState.h >new file mode 100644 >index 0000000000000000000000000000000000000000..9e8b985b7c2308348d914e51b10d75973f744535 >--- /dev/null >+++ b/Source/WebKit/UIProcess/ios/GlobalFindInPageState.h >@@ -0,0 +1,41 @@ >+/* >+ * Copyright (C) 2018 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. >+ */ >+ >+#pragma once >+ >+#if PLATFORM(IOS_FAMILY) >+ >+namespace WTF { >+class String; >+} >+ >+namespace WebKit { >+ >+void updateStringForFindInPage(const WTF::String&); >+const WTF::String& stringForFindInPage(); >+ >+} // namespace WebKit >+ >+#endif // PLATFORM(IOS_FAMILY) >diff --git a/Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm b/Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm >index f6d304b81061b5ad418806bd89d6b767af4dbbc2..a521b7bcd51262e33f41a2c2264b2728c52c59d6 100644 >--- a/Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm >+++ b/Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm >@@ -31,6 +31,7 @@ > #import "APIUIClient.h" > #import "DataReference.h" > #import "EditingRange.h" >+#import "GlobalFindInPageState.h" > #import "InteractionInformationAtPosition.h" > #import "Logging.h" > #import "NativeWebKeyboardEvent.h" >@@ -226,6 +227,14 @@ void WebPageProxy::resendLastVisibleContentRects() > m_process->send(Messages::ViewUpdateDispatcher::VisibleContentRectUpdate(m_pageID, m_lastVisibleContentRectUpdate), 0); > } > >+void WebPageProxy::updateStringForFindInPage(const String& string) >+{ >+ if (!isValid()) >+ return; >+ >+ WebKit::updateStringForFindInPage(string); >+} >+ > static inline float adjustedUnexposedEdge(float documentEdge, float exposedRectEdge, float factor) > { > if (exposedRectEdge < documentEdge) >diff --git a/Source/WebKit/WebKit.xcodeproj/project.pbxproj b/Source/WebKit/WebKit.xcodeproj/project.pbxproj >index 4da02fab5127a1f4677f9e220e3123010345a37a..9b52d84da65f498afa7a2b7906865a6d0e44507b 100644 >--- a/Source/WebKit/WebKit.xcodeproj/project.pbxproj >+++ b/Source/WebKit/WebKit.xcodeproj/project.pbxproj >@@ -75,9 +75,9 @@ > 005D158F18E4C4EB00734619 /* _WKFindDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 005D158E18E4C4EB00734619 /* _WKFindDelegate.h */; settings = {ATTRIBUTES = (Private, ); }; }; > 00B9661618E24CBA00CE1F88 /* APIFindClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 00B9661518E24CBA00CE1F88 /* APIFindClient.h */; }; > 00B9661A18E25AE100CE1F88 /* FindClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 00B9661818E25AE100CE1F88 /* FindClient.h */; }; >+ 07297F9F1C17AA1A015F0735 /* PersistencyUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = 07321F9D1C17BBEA223F0735 /* PersistencyUtils.h */; }; > 07297F9F1C17BBEA003F0735 /* UserMediaPermissionCheckProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = 07297F9D1C17BBEA003F0735 /* UserMediaPermissionCheckProxy.h */; }; > 07297F9F1C17BBEA015F0735 /* DeviceIdHashSaltStorage.h in Headers */ = {isa = PBXBuildFile; fileRef = 07297F9D1C17BBEA223F0735 /* DeviceIdHashSaltStorage.h */; }; >- 07297F9F1C17AA1A015F0735 /* PersistencyUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = 07321F9D1C17BBEA223F0735 /* PersistencyUtils.h */; }; > 07297FA31C186ADB003F0735 /* WKUserMediaPermissionCheck.h in Headers */ = {isa = PBXBuildFile; fileRef = 07297FA11C186ADB003F0735 /* WKUserMediaPermissionCheck.h */; settings = {ATTRIBUTES = (Private, ); }; }; > 074E75FE1DF2211900D318EC /* UserMediaProcessManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 074E75FB1DF1FD1300D318EC /* UserMediaProcessManager.h */; }; > 076E884E1A13CADF005E90FC /* APIContextMenuClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 076E884D1A13CADF005E90FC /* APIContextMenuClient.h */; }; >@@ -738,6 +738,7 @@ > 2EA7B3D12026CEF8009CE5AC /* WKNumberPadViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 2EA7B3CF2026CEF8009CE5AC /* WKNumberPadViewController.h */; }; > 2EA7B3D52026CF23009CE5AC /* WKNumberPadView.h in Headers */ = {isa = PBXBuildFile; fileRef = 2EA7B3D32026CF23009CE5AC /* WKNumberPadView.h */; }; > 2EB6FC01203021960017E619 /* WKTimePickerViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 2EB6FBFF203021960017E619 /* WKTimePickerViewController.h */; }; >+ 2EE4054521D30379001662F9 /* GlobalFindInPageState.h in Headers */ = {isa = PBXBuildFile; fileRef = 2EE4054321D30379001662F9 /* GlobalFindInPageState.h */; }; > 2F8336861FA139DF00C6E080 /* TouchBarMenuData.h in Headers */ = {isa = PBXBuildFile; fileRef = 2FD43B911FA006A10083F51C /* TouchBarMenuData.h */; }; > 310999C7146C9E3D0029DEB9 /* WebNotificationClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 31099968146C71F50029DEB9 /* WebNotificationClient.h */; }; > 312C0C4A146DDC8A0016C911 /* WKNotificationProvider.h in Headers */ = {isa = PBXBuildFile; fileRef = 312C0C49146DDC8A0016C911 /* WKNotificationProvider.h */; settings = {ATTRIBUTES = (Private, ); }; }; >@@ -1038,8 +1039,8 @@ > 57DCEDC3214F114C0016B847 /* MockLocalService.h in Headers */ = {isa = PBXBuildFile; fileRef = 57DCEDC1214F114C0016B847 /* MockLocalService.h */; }; > 57DCEDC7214F18300016B847 /* MockLocalConnection.h in Headers */ = {isa = PBXBuildFile; fileRef = 57DCEDC5214F18300016B847 /* MockLocalConnection.h */; }; > 57DCEDCB214F4E420016B847 /* MockAuthenticatorManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 57DCEDC9214F4E420016B847 /* MockAuthenticatorManager.h */; }; >- 58E977DF21C49A00005D92A6 /* NetworkHTTPSUpgradeChecker.h in Headers */ = {isa = PBXBuildFile; fileRef = 58E977DD21C49A00005D92A6 /* NetworkHTTPSUpgradeChecker.h */; }; > 587743A621C30BBE00AE9084 /* HTTPSUpgradeList.db in Resources */ = {isa = PBXBuildFile; fileRef = 587743A421C30AD800AE9084 /* HTTPSUpgradeList.db */; }; >+ 58E977DF21C49A00005D92A6 /* NetworkHTTPSUpgradeChecker.h in Headers */ = {isa = PBXBuildFile; fileRef = 58E977DD21C49A00005D92A6 /* NetworkHTTPSUpgradeChecker.h */; }; > 5C0B17781E7C880E00E9123C /* NetworkSocketStreamMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5C0B17741E7C879C00E9123C /* NetworkSocketStreamMessageReceiver.cpp */; }; > 5C0B17791E7C882100E9123C /* WebSocketStreamMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5C0B17761E7C879C00E9123C /* WebSocketStreamMessageReceiver.cpp */; }; > 5C1426ED1C23F80900D41183 /* NetworkProcessCreationParameters.h in Headers */ = {isa = PBXBuildFile; fileRef = 5C1426E31C23F80500D41183 /* NetworkProcessCreationParameters.h */; }; >@@ -1856,14 +1857,14 @@ > 00B9661518E24CBA00CE1F88 /* APIFindClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = APIFindClient.h; sourceTree = "<group>"; }; > 00B9661718E25AE100CE1F88 /* FindClient.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = FindClient.mm; sourceTree = "<group>"; }; > 00B9661818E25AE100CE1F88 /* FindClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FindClient.h; sourceTree = "<group>"; }; >+ 0729455C1C1711EA003F0735 /* PersistencyUtils.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PersistencyUtils.cpp; sourceTree = "<group>"; }; > 07297F9C1C1711EA003F0735 /* DeviceIdHashSaltStorage.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DeviceIdHashSaltStorage.cpp; sourceTree = "<group>"; }; > 07297F9C1C17BBEA003F0735 /* UserMediaPermissionCheckProxy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UserMediaPermissionCheckProxy.cpp; sourceTree = "<group>"; }; > 07297F9D1C17BBEA003F0735 /* UserMediaPermissionCheckProxy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UserMediaPermissionCheckProxy.h; sourceTree = "<group>"; }; > 07297F9D1C17BBEA223F0735 /* DeviceIdHashSaltStorage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DeviceIdHashSaltStorage.h; sourceTree = "<group>"; }; >- 0729455C1C1711EA003F0735 /* PersistencyUtils.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PersistencyUtils.cpp; sourceTree = "<group>"; }; >- 07321F9D1C17BBEA223F0735 /* PersistencyUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PersistencyUtils.h; sourceTree = "<group>"; }; > 07297FA01C186ADB003F0735 /* WKUserMediaPermissionCheck.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WKUserMediaPermissionCheck.cpp; sourceTree = "<group>"; }; > 07297FA11C186ADB003F0735 /* WKUserMediaPermissionCheck.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKUserMediaPermissionCheck.h; sourceTree = "<group>"; }; >+ 07321F9D1C17BBEA223F0735 /* PersistencyUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PersistencyUtils.h; sourceTree = "<group>"; }; > 074E75FB1DF1FD1300D318EC /* UserMediaProcessManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UserMediaProcessManager.h; sourceTree = "<group>"; }; > 074E75FC1DF2002400D318EC /* UserMediaProcessManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UserMediaProcessManager.cpp; sourceTree = "<group>"; }; > 074E76001DF7075D00D318EC /* MediaDeviceSandboxExtensions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MediaDeviceSandboxExtensions.cpp; sourceTree = "<group>"; }; >@@ -2818,6 +2819,8 @@ > 2EA7B3D42026CF23009CE5AC /* WKNumberPadView.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = WKNumberPadView.mm; path = ios/forms/WKNumberPadView.mm; sourceTree = "<group>"; }; > 2EB6FBFF203021960017E619 /* WKTimePickerViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = WKTimePickerViewController.h; path = ios/forms/WKTimePickerViewController.h; sourceTree = "<group>"; }; > 2EB6FC00203021960017E619 /* WKTimePickerViewController.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = WKTimePickerViewController.mm; path = ios/forms/WKTimePickerViewController.mm; sourceTree = "<group>"; }; >+ 2EE4054221D30379001662F9 /* GlobalFindInPageState.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GlobalFindInPageState.cpp; path = ios/GlobalFindInPageState.cpp; sourceTree = "<group>"; }; >+ 2EE4054321D30379001662F9 /* GlobalFindInPageState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GlobalFindInPageState.h; path = ios/GlobalFindInPageState.h; sourceTree = "<group>"; }; > 2F809DD51FBD1BC9005FE63A /* TouchBarMenuItemData.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TouchBarMenuItemData.cpp; sourceTree = "<group>"; }; > 2F809DD91FBD1BF2005FE63A /* TouchBarMenuItemData.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TouchBarMenuItemData.h; sourceTree = "<group>"; }; > 2FD43B911FA006A10083F51C /* TouchBarMenuData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TouchBarMenuData.h; sourceTree = "<group>"; }; >@@ -3406,9 +3409,9 @@ > 57DCEDC6214F18300016B847 /* MockLocalConnection.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = MockLocalConnection.mm; sourceTree = "<group>"; }; > 57DCEDC9214F4E420016B847 /* MockAuthenticatorManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MockAuthenticatorManager.h; sourceTree = "<group>"; }; > 57DCEDCD214F51680016B847 /* MockAuthenticatorManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MockAuthenticatorManager.cpp; sourceTree = "<group>"; }; >+ 587743A421C30AD800AE9084 /* HTTPSUpgradeList.db */ = {isa = PBXFileReference; lastKnownFileType = file; name = HTTPSUpgradeList.db; path = DerivedSources/WebKit2/HTTPSUpgradeList.db; sourceTree = BUILT_PRODUCTS_DIR; }; > 58E977DC21C499FE005D92A6 /* NetworkHTTPSUpgradeChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NetworkHTTPSUpgradeChecker.cpp; sourceTree = "<group>"; }; > 58E977DD21C49A00005D92A6 /* NetworkHTTPSUpgradeChecker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NetworkHTTPSUpgradeChecker.h; sourceTree = "<group>"; }; >- 587743A421C30AD800AE9084 /* HTTPSUpgradeList.db */ = {isa = PBXFileReference; lastKnownFileType = file; name = HTTPSUpgradeList.db; path = DerivedSources/WebKit2/HTTPSUpgradeList.db; sourceTree = BUILT_PRODUCTS_DIR; }; > 5C0B17741E7C879C00E9123C /* NetworkSocketStreamMessageReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = NetworkSocketStreamMessageReceiver.cpp; path = DerivedSources/WebKit2/NetworkSocketStreamMessageReceiver.cpp; sourceTree = BUILT_PRODUCTS_DIR; }; > 5C0B17751E7C879C00E9123C /* NetworkSocketStreamMessages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NetworkSocketStreamMessages.h; path = DerivedSources/WebKit2/NetworkSocketStreamMessages.h; sourceTree = BUILT_PRODUCTS_DIR; }; > 5C0B17761E7C879C00E9123C /* WebSocketStreamMessageReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WebSocketStreamMessageReceiver.cpp; path = DerivedSources/WebKit2/WebSocketStreamMessageReceiver.cpp; sourceTree = BUILT_PRODUCTS_DIR; }; >@@ -5806,6 +5809,8 @@ > 2D5875BD219B53150070B9AA /* EditableImageController.h */, > 2D5875BB219B28A50070B9AA /* EditableImageController.messages.in */, > 2D5875BE219B53150070B9AA /* EditableImageController.mm */, >+ 2EE4054221D30379001662F9 /* GlobalFindInPageState.cpp */, >+ 2EE4054321D30379001662F9 /* GlobalFindInPageState.h */, > 2DD45ADC1E5F8972006C355F /* InputViewUpdateDeferrer.h */, > 2DD45ADD1E5F8972006C355F /* InputViewUpdateDeferrer.mm */, > 0F0C365D18C110A500F607D7 /* LayerRepresentation.mm */, >@@ -9019,6 +9024,7 @@ > BC06F44A12DBD1F5002D78DE /* GeolocationPermissionRequestManagerProxy.h in Headers */, > BC06F43A12DBCCFB002D78DE /* GeolocationPermissionRequestProxy.h in Headers */, > 2DA944A41884E4F000ED86DB /* GestureTypes.h in Headers */, >+ 2EE4054521D30379001662F9 /* GlobalFindInPageState.h in Headers */, > 2DA049B8180CCD0A00AAFA9E /* GraphicsLayerCARemote.h in Headers */, > C0CE72AD1247E78D00BC0EC4 /* HandleMessage.h in Headers */, > 1AC75A1B1B3368270056745B /* HangDetectionDisabler.h in Headers */, >diff --git a/Source/WebKit/WebProcess/WebCoreSupport/WebEditorClient.h b/Source/WebKit/WebProcess/WebCoreSupport/WebEditorClient.h >index 4b5a6d3addb443e9800f0a5547bb979fc64d80ba..16804cb89909ecc8726d1db6506979b687163cee 100644 >--- a/Source/WebKit/WebProcess/WebCoreSupport/WebEditorClient.h >+++ b/Source/WebKit/WebProcess/WebCoreSupport/WebEditorClient.h >@@ -173,6 +173,7 @@ private: > int getPasteboardItemsCount() final; > RefPtr<WebCore::DocumentFragment> documentFragmentFromDelegate(int index) final; > bool performsTwoStepPaste(WebCore::DocumentFragment*) final; >+ void updateStringForFindInPage(const String&) final; > #endif > > bool performTwoStepDrop(WebCore::DocumentFragment&, WebCore::Range&, bool isMove) final; >diff --git a/Source/WebKit/WebProcess/WebCoreSupport/ios/WebEditorClientIOS.mm b/Source/WebKit/WebProcess/WebCoreSupport/ios/WebEditorClientIOS.mm >index c60438c4e5bcbb4a43c83b85d441912ec4774627..2212325e0e6b5bd4b696496714c3427192fda913 100644 >--- a/Source/WebKit/WebProcess/WebCoreSupport/ios/WebEditorClientIOS.mm >+++ b/Source/WebKit/WebProcess/WebCoreSupport/ios/WebEditorClientIOS.mm >@@ -86,6 +86,11 @@ bool WebEditorClient::performsTwoStepPaste(WebCore::DocumentFragment*) > return false; > } > >+void WebEditorClient::updateStringForFindInPage(const String& findString) >+{ >+ m_page->updateStringForFindInPage(findString); >+} >+ > void WebEditorClient::overflowScrollPositionChanged() > { > m_page->didChangeSelection(); >diff --git a/Source/WebKit/WebProcess/WebPage/WebPage.h b/Source/WebKit/WebProcess/WebPage/WebPage.h >index fc4ea1dfb94264ca1b97bfd8965320e402e07111..34ddff5150b0a6212ba2b6087f5d796bc57065e5 100644 >--- a/Source/WebKit/WebProcess/WebPage/WebPage.h >+++ b/Source/WebKit/WebProcess/WebPage/WebPage.h >@@ -939,6 +939,8 @@ public: > const WebCore::ViewportConfiguration& viewportConfiguration() const { return m_viewportConfiguration; } > > void hardwareKeyboardAvailabilityChanged(); >+ >+ void updateStringForFindInPage(const String&); > #endif > > #if ENABLE(IOS_TOUCH_EVENTS) >diff --git a/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm b/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm >index 90658056389737ef9caa5ffd61e8edaadf79cce9..6298ce95dc74a0c5b6f10b1e10a705445a424c01 100644 >--- a/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm >+++ b/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm >@@ -3125,6 +3125,11 @@ void WebPage::hardwareKeyboardAvailabilityChanged() > focusedFrame->eventHandler().capsLockStateMayHaveChanged(); > } > >+void WebPage::updateStringForFindInPage(const String& findString) >+{ >+ send(Messages::WebPageProxy::UpdateStringForFindInPage(findString)); >+} >+ > #if USE(QUICK_LOOK) > void WebPage::didReceivePasswordForQuickLookDocument(const String& password) > { >diff --git a/Source/WebKitLegacy/mac/WebCoreSupport/WebEditorClient.h b/Source/WebKitLegacy/mac/WebCoreSupport/WebEditorClient.h >index 8464059c4952b96f614b7d5453a751585d8e4ab5..0a3624e57c471c625a32696402c23ba4e64b99ab 100644 >--- a/Source/WebKitLegacy/mac/WebCoreSupport/WebEditorClient.h >+++ b/Source/WebKitLegacy/mac/WebCoreSupport/WebEditorClient.h >@@ -144,6 +144,7 @@ private: > int getPasteboardItemsCount() final; > RefPtr<WebCore::DocumentFragment> documentFragmentFromDelegate(int index) final; > bool performsTwoStepPaste(WebCore::DocumentFragment*) final; >+ void updateStringForFindInPage(const String&) final { } > #endif > > bool performTwoStepDrop(WebCore::DocumentFragment&, WebCore::Range& destination, bool isMove) final;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 193034
:
358074
|
358076
|
358082
|
358085
|
358097
|
358099
|
358242