WebKit Bugzilla
Attachment 345920 Details for
Bug 188086
: Don't include WebPageProxy.h just for UndoOrRedo
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-188086-20180727094920.patch (text/plain), 31.84 KB, created by
Alex Christensen
on 2018-07-27 09:49:21 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Alex Christensen
Created:
2018-07-27 09:49:21 PDT
Size:
31.84 KB
patch
obsolete
>Index: Source/WebKit/ChangeLog >=================================================================== >--- Source/WebKit/ChangeLog (revision 234290) >+++ Source/WebKit/ChangeLog (working copy) >@@ -1,3 +1,44 @@ >+2018-07-27 Alex Christensen <achristensen@webkit.org> >+ >+ Don't include WebPageProxy.h just for UndoOrRedo >+ https://bugs.webkit.org/show_bug.cgi?id=188086 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * Shared/UndoOrRedo.h: Added. >+ * UIProcess/Cocoa/WebViewImpl.h: >+ * UIProcess/Cocoa/WebViewImpl.mm: >+ (WebKit::WebViewImpl::registerEditCommand): >+ * UIProcess/PageClient.h: >+ * UIProcess/WebEditCommandProxy.cpp: >+ (WebKit::WebEditCommandProxy::unapply): >+ (WebKit::WebEditCommandProxy::reapply): >+ * UIProcess/WebPageProxy.cpp: >+ (WebKit::WebPageProxy::registerEditCommandForUndo): >+ (WebKit::WebPageProxy::canUndoRedo): >+ (WebKit::WebPageProxy::executeUndoRedo): >+ (WebKit::WebPageProxy::canUndo): >+ (WebKit::WebPageProxy::canRedo): >+ * UIProcess/WebPageProxy.h: >+ * UIProcess/WebPageProxy.messages.in: >+ * UIProcess/ios/PageClientImplIOS.h: >+ * UIProcess/ios/PageClientImplIOS.mm: >+ (WebKit::PageClientImpl::registerEditCommand): >+ (WebKit::PageClientImpl::canUndoRedo): >+ (WebKit::PageClientImpl::executeUndoRedo): >+ * UIProcess/mac/PageClientImplMac.h: >+ * UIProcess/mac/PageClientImplMac.mm: >+ (WebKit::PageClientImpl::registerEditCommand): >+ (WebKit::PageClientImpl::canUndoRedo): >+ (WebKit::PageClientImpl::executeUndoRedo): >+ * UIProcess/mac/WebContextMenuProxyMac.mm: >+ * WebKit.xcodeproj/project.pbxproj: >+ * WebProcess/WebCoreSupport/WebEditorClient.cpp: >+ (WebKit::WebEditorClient::canUndo const): >+ (WebKit::WebEditorClient::canRedo const): >+ (WebKit::WebEditorClient::undo): >+ (WebKit::WebEditorClient::redo): >+ > 2018-07-26 Chris Dumez <cdumez@apple.com> > > Loading a file URL and then issuing a reload right away causes the load to fail due to sandboxing >Index: Source/WebKit/Shared/UndoOrRedo.h >=================================================================== >--- Source/WebKit/Shared/UndoOrRedo.h (nonexistent) >+++ Source/WebKit/Shared/UndoOrRedo.h (working copy) >@@ -0,0 +1,46 @@ >+/* >+ * 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 >+ >+#include <wtf/EnumTraits.h> >+ >+namespace WebKit { >+ >+enum class UndoOrRedo { Undo, Redo }; >+ >+} >+ >+namespace WTF { >+ >+template<> struct EnumTraits<WebKit::UndoOrRedo> { >+ using values = EnumValues< >+ WebKit::UndoOrRedo, >+ WebKit::UndoOrRedo::Undo, >+ WebKit::UndoOrRedo::Redo >+ >; >+}; >+ >+} >Index: Source/WebKit/UIProcess/DefaultUndoController.cpp >=================================================================== >--- Source/WebKit/UIProcess/DefaultUndoController.cpp (revision 234277) >+++ Source/WebKit/UIProcess/DefaultUndoController.cpp (working copy) >@@ -22,14 +22,15 @@ > #include "config.h" > #include "DefaultUndoController.h" > >+#include "UndoOrRedo.h" > #include "WebEditCommandProxy.h" > #include <wtf/RefPtr.h> > > namespace WebKit { > >-void DefaultUndoController::registerEditCommand(Ref<WebEditCommandProxy>&& command, WebPageProxy::UndoOrRedo undoOrRedo) >+void DefaultUndoController::registerEditCommand(Ref<WebEditCommandProxy>&& command, UndoOrRedo undoOrRedo) > { >- if (undoOrRedo == WebPageProxy::Undo) >+ if (undoOrRedo == UndoOrRedo::Undo) > m_undoStack.append(WTFMove(command)); > else > m_redoStack.append(WTFMove(command)); >@@ -41,18 +42,18 @@ void DefaultUndoController::clearAllEdit > m_redoStack.clear(); > } > >-bool DefaultUndoController::canUndoRedo(WebPageProxy::UndoOrRedo undoOrRedo) >+bool DefaultUndoController::canUndoRedo(UndoOrRedo undoOrRedo) > { >- if (undoOrRedo == WebPageProxy::Undo) >+ if (undoOrRedo == UndoOrRedo::Undo) > return !m_undoStack.isEmpty(); > > return !m_redoStack.isEmpty(); > } > >-void DefaultUndoController::executeUndoRedo(WebPageProxy::UndoOrRedo undoOrRedo) >+void DefaultUndoController::executeUndoRedo(UndoOrRedo undoOrRedo) > { > RefPtr<WebEditCommandProxy> command; >- if (undoOrRedo == WebPageProxy::Undo) { >+ if (undoOrRedo == UndoOrRedo::Undo) { > command = m_undoStack.last(); > m_undoStack.removeLast(); > command->unapply(); >Index: Source/WebKit/UIProcess/DefaultUndoController.h >=================================================================== >--- Source/WebKit/UIProcess/DefaultUndoController.h (revision 234277) >+++ Source/WebKit/UIProcess/DefaultUndoController.h (working copy) >@@ -19,20 +19,21 @@ > Boston, MA 02110-1301, USA. > */ > >-#ifndef DefaultUndoController_h >-#define DefaultUndoController_h >+#pragma once > > #include "WebEditCommandProxy.h" > #include "WebPageProxy.h" > > namespace WebKit { > >+enum class UndoOrRedo; >+ > class DefaultUndoController { > public: >- void registerEditCommand(Ref<WebEditCommandProxy>&&, WebPageProxy::UndoOrRedo); >+ void registerEditCommand(Ref<WebEditCommandProxy>&&, UndoOrRedo); > void clearAllEditCommands(); >- bool canUndoRedo(WebPageProxy::UndoOrRedo); >- void executeUndoRedo(WebPageProxy::UndoOrRedo); >+ bool canUndoRedo(UndoOrRedo); >+ void executeUndoRedo(UndoOrRedo); > > private: > typedef Vector<RefPtr<WebEditCommandProxy> > CommandVector; >@@ -41,5 +42,3 @@ private: > }; > > } // namespace WebKit >- >-#endif // DefaultUndoController_h >Index: Source/WebKit/UIProcess/PageClient.h >=================================================================== >--- Source/WebKit/UIProcess/PageClient.h (revision 234277) >+++ Source/WebKit/UIProcess/PageClient.h (working copy) >@@ -25,10 +25,11 @@ > > #pragma once > >+#include "LayerTreeContext.h" >+#include "SameDocumentNavigationType.h" > #include "ShareableBitmap.h" > #include "WebColorPicker.h" > #include "WebDataListSuggestionsDropdown.h" >-#include "WebPageProxy.h" > #include "WebPopupMenuProxy.h" > #include <WebCore/AlternativeTextClient.h> > #include <WebCore/EditorClient.h> >@@ -37,9 +38,12 @@ > #include <wtf/Forward.h> > > #if PLATFORM(COCOA) >+#include "LayerRepresentation.h" > #include "PluginComplexTextInputState.h" >+#include "WKFoundation.h" > > OBJC_CLASS CALayer; >+OBJC_CLASS _WKRemoteObjectRegistry; > > #if USE(APPKIT) > OBJC_CLASS WKView; >@@ -47,14 +51,38 @@ OBJC_CLASS NSTextAlternatives; > #endif > #endif > >+namespace API { >+class HitTestResult; >+class Object; >+class OpenPanelParameters; >+class SecurityOrigin; >+} >+ >+namespace IPC { >+class DataReference; >+} >+ > namespace WebCore { >+class Color; > class Cursor; >+class FloatBoxExtent; >+class FloatQuad; >+class Region; > class TextIndicator; > class WebMediaSessionManager; >+ >+enum class RouteSharingPolicy; >+enum class ScrollbarStyle; > enum class TextIndicatorWindowLifetime : uint8_t; > enum class TextIndicatorWindowDismissalAnimation : uint8_t; >+ >+struct DictionaryPopupInfo; > struct Highlight; >+struct TextIndicatorData; > struct ViewportAttributes; >+ >+template <typename> class RectEdges; >+using FloatBoxExtent = RectEdges<float>; > } > > #if ENABLE(DRAG_SUPPORT) >@@ -65,15 +93,30 @@ struct DragItem; > > namespace WebKit { > >+enum class UndoOrRedo; >+ >+class ContextMenuContextData; >+class DownloadProxy; > class DrawingAreaProxy; >+class NativeWebGestureEvent; > class NativeWebKeyboardEvent; > class NativeWebMouseEvent; >+class NativeWebWheelEvent; > class RemoteLayerTreeTransaction; >+class UserData; > class ViewSnapshot; >+class WebBackForwardListItem; > class WebContextMenuProxy; > class WebEditCommandProxy; >+class WebFrameProxy; >+class WebOpenPanelResultListenerProxy; >+class WebPageProxy; > class WebPopupMenuProxy; > >+struct AssistedNodeInformation; >+struct InteractionInformationAtPosition; >+struct WebHitTestResultData; >+ > #if ENABLE(TOUCH_EVENTS) > class NativeWebTouchEvent; > #endif >@@ -169,10 +212,10 @@ public: > virtual void setCursorHiddenUntilMouseMoves(bool) = 0; > virtual void didChangeViewportProperties(const WebCore::ViewportAttributes&) = 0; > >- virtual void registerEditCommand(Ref<WebEditCommandProxy>&&, WebPageProxy::UndoOrRedo) = 0; >+ virtual void registerEditCommand(Ref<WebEditCommandProxy>&&, UndoOrRedo) = 0; > virtual void clearAllEditCommands() = 0; >- virtual bool canUndoRedo(WebPageProxy::UndoOrRedo) = 0; >- virtual void executeUndoRedo(WebPageProxy::UndoOrRedo) = 0; >+ virtual bool canUndoRedo(UndoOrRedo) = 0; >+ virtual void executeUndoRedo(UndoOrRedo) = 0; > virtual void wheelEventWasNotHandledByWebCore(const NativeWebWheelEvent&) = 0; > #if PLATFORM(COCOA) > virtual void accessibilityWebProcessTokenReceived(const IPC::DataReference&) = 0; >Index: Source/WebKit/UIProcess/WebEditCommandProxy.cpp >=================================================================== >--- Source/WebKit/UIProcess/WebEditCommandProxy.cpp (revision 234277) >+++ Source/WebKit/UIProcess/WebEditCommandProxy.cpp (working copy) >@@ -26,6 +26,7 @@ > #include "config.h" > #include "WebEditCommandProxy.h" > >+#include "UndoOrRedo.h" > #include "WebPageMessages.h" > #include "WebPageProxy.h" > #include "WebProcessProxy.h" >@@ -56,7 +57,7 @@ void WebEditCommandProxy::unapply() > return; > > m_page->process().send(Messages::WebPage::UnapplyEditCommand(m_commandID), m_page->pageID(), IPC::SendOption::DispatchMessageEvenWhenWaitingForSyncReply); >- m_page->registerEditCommand(*this, WebPageProxy::Redo); >+ m_page->registerEditCommand(*this, UndoOrRedo::Redo); > } > > void WebEditCommandProxy::reapply() >@@ -65,7 +66,7 @@ void WebEditCommandProxy::reapply() > return; > > m_page->process().send(Messages::WebPage::ReapplyEditCommand(m_commandID), m_page->pageID(), IPC::SendOption::DispatchMessageEvenWhenWaitingForSyncReply); >- m_page->registerEditCommand(*this, WebPageProxy::Undo); >+ m_page->registerEditCommand(*this, UndoOrRedo::Undo); > } > > String WebEditCommandProxy::nameForEditAction(EditAction editAction) >Index: Source/WebKit/UIProcess/WebPageProxy.cpp >=================================================================== >--- Source/WebKit/UIProcess/WebPageProxy.cpp (revision 234277) >+++ Source/WebKit/UIProcess/WebPageProxy.cpp (working copy) >@@ -80,6 +80,7 @@ > #include "TextCheckerState.h" > #include "UIMessagePortChannelProvider.h" > #include "URLSchemeTaskParameters.h" >+#include "UndoOrRedo.h" > #include "UserMediaPermissionRequestProxy.h" > #include "UserMediaProcessManager.h" > #include "WKContextPrivate.h" >@@ -4915,7 +4916,7 @@ void WebPageProxy::compositionWasCancele > > void WebPageProxy::registerEditCommandForUndo(uint64_t commandID, uint32_t editAction) > { >- registerEditCommand(WebEditCommandProxy::create(commandID, static_cast<EditAction>(editAction), this), Undo); >+ registerEditCommand(WebEditCommandProxy::create(commandID, static_cast<EditAction>(editAction), this), UndoOrRedo::Undo); > } > > void WebPageProxy::registerInsertionUndoGrouping() >@@ -4925,15 +4926,14 @@ void WebPageProxy::registerInsertionUndo > #endif > } > >-void WebPageProxy::canUndoRedo(uint32_t action, bool& result) >+void WebPageProxy::canUndoRedo(UndoOrRedo action, bool& result) > { >- result = m_pageClient.canUndoRedo(static_cast<UndoOrRedo>(action)); >+ result = m_pageClient.canUndoRedo(action); > } > >-void WebPageProxy::executeUndoRedo(uint32_t action, bool& result) >+void WebPageProxy::executeUndoRedo(UndoOrRedo action) > { >- m_pageClient.executeUndoRedo(static_cast<UndoOrRedo>(action)); >- result = true; >+ m_pageClient.executeUndoRedo(action); > } > > void WebPageProxy::clearAllEditCommands() >@@ -5296,16 +5296,12 @@ void WebPageProxy::removeEditCommand(Web > > bool WebPageProxy::canUndo() > { >- bool result; >- canUndoRedo(Undo, result); >- return result; >+ return m_pageClient.canUndoRedo(UndoOrRedo::Undo); > } > > bool WebPageProxy::canRedo() > { >- bool result; >- canUndoRedo(Redo, result); >- return result; >+ return m_pageClient.canUndoRedo(UndoOrRedo::Redo); > } > > bool WebPageProxy::isValidEditCommand(WebEditCommandProxy* command) >Index: Source/WebKit/UIProcess/WebPageProxy.h >=================================================================== >--- Source/WebKit/UIProcess/WebPageProxy.h (revision 234277) >+++ Source/WebKit/UIProcess/WebPageProxy.h (working copy) >@@ -260,6 +260,7 @@ struct WebPopupItem; > struct URLSchemeTaskParameters; > > enum class ShouldProcessSwapIfPossible; >+enum class UndoOrRedo; > > #if USE(QUICK_LOOK) > class QuickLookDocumentData; >@@ -950,7 +951,6 @@ public: > virtual void exitAcceleratedCompositingMode(); > virtual void updateAcceleratedCompositingMode(const LayerTreeContext&); > >- enum UndoOrRedo { Undo, Redo }; > void addEditCommand(WebEditCommandProxy*); > void removeEditCommand(WebEditCommandProxy*); > bool isValidEditCommand(WebEditCommandProxy*); >@@ -1549,8 +1549,8 @@ private: > void registerEditCommandForUndo(uint64_t commandID, uint32_t editAction); > void registerInsertionUndoGrouping(); > void clearAllEditCommands(); >- void canUndoRedo(uint32_t action, bool& result); >- void executeUndoRedo(uint32_t action, bool& result); >+ void canUndoRedo(UndoOrRedo, bool& result); >+ void executeUndoRedo(UndoOrRedo); > > // Keyboard handling > #if PLATFORM(COCOA) >Index: Source/WebKit/UIProcess/WebPageProxy.messages.in >=================================================================== >--- Source/WebKit/UIProcess/WebPageProxy.messages.in (revision 234277) >+++ Source/WebKit/UIProcess/WebPageProxy.messages.in (working copy) >@@ -238,8 +238,8 @@ messages -> WebPageProxy { > RegisterEditCommandForUndo(uint64_t commandID, uint32_t editAction) > ClearAllEditCommands() > RegisterInsertionUndoGrouping() >- CanUndoRedo(uint32_t action) -> (bool result) >- ExecuteUndoRedo(uint32_t action) -> (bool result) >+ CanUndoRedo(enum WebKit::UndoOrRedo undoOrRedo) -> (bool result) >+ ExecuteUndoRedo(enum WebKit::UndoOrRedo undoOrRedo) -> () > > # Diagnostic messages logging > LogDiagnosticMessage(String message, String description, enum WebCore::ShouldSample shouldSample) >Index: Source/WebKit/UIProcess/Cocoa/WebViewImpl.h >=================================================================== >--- Source/WebKit/UIProcess/Cocoa/WebViewImpl.h (revision 234277) >+++ Source/WebKit/UIProcess/Cocoa/WebViewImpl.h (working copy) >@@ -28,10 +28,11 @@ > #if PLATFORM(MAC) > > #include "PluginComplexTextInputState.h" >+#include "ShareableBitmap.h" > #include "WKDragDestinationAction.h" > #include "WKLayoutMode.h" >-#include "WebPageProxy.h" > #include "_WKOverlayScrollbarStyle.h" >+#include <WebCore/ScrollTypes.h> > #include <WebCore/TextIndicatorWindow.h> > #include <WebCore/UserInterfaceLayoutDirection.h> > #include <pal/spi/cocoa/AVKitSPI.h> >@@ -55,6 +56,7 @@ OBJC_CLASS WKImmediateActionController; > OBJC_CLASS WKViewLayoutStrategy; > OBJC_CLASS WKWebView; > OBJC_CLASS WKWindowVisibilityObserver; >+OBJC_CLASS _WKRemoteObjectRegistry; > OBJC_CLASS _WKThumbnailView; > > #if HAVE(TOUCH_BAR) >@@ -67,6 +69,12 @@ OBJC_CLASS WKTextTouchBarItemController; > OBJC_CLASS WebPlaybackControlsManager; > #endif // HAVE(TOUCH_BAR) > >+namespace API { >+class HitTestResult; >+class Object; >+class PageConfiguration; >+} >+ > @protocol WebViewImplDelegate > > - (NSTextInputContext *)_web_superInputContext; >@@ -108,17 +116,24 @@ OBJC_CLASS WebPlaybackControlsManager; > > namespace WebCore { > struct DragItem; >-struct KeyPressCommand; >+struct KeypressCommand; > } > > namespace WebKit { > >+class PageClient; > class PageClientImpl; > class DrawingAreaProxy; > class ViewGestureController; >+class ViewSnapshot; >+class WebBackForwardListItem; > class WebEditCommandProxy; >+class WebFrameProxy; > class WebPageProxy; >+class WebProcessPool; > struct ColorSpaceData; >+struct WebHitTestResultData; >+enum class UndoOrRedo; > > typedef id <NSValidatedUserInterfaceItem> ValidationItem; > typedef Vector<RetainPtr<ValidationItem>> ValidationVector; >@@ -290,7 +305,7 @@ public: > bool isEditable() const; > bool executeSavedCommandBySelector(SEL); > void executeEditCommandForSelector(SEL, const String& argument = String()); >- void registerEditCommand(Ref<WebEditCommandProxy>&&, WebPageProxy::UndoOrRedo); >+ void registerEditCommand(Ref<WebEditCommandProxy>&&, UndoOrRedo); > void clearAllEditCommands(); > bool writeSelectionToPasteboard(NSPasteboard *, NSArray *types); > bool readSelectionFromPasteboard(NSPasteboard *); >Index: Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm >=================================================================== >--- Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm (revision 234277) >+++ Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm (working copy) >@@ -51,6 +51,7 @@ > #import "TextCheckerState.h" > #import "TiledCoreAnimationDrawingAreaProxy.h" > #import "UIGamepadProvider.h" >+#import "UndoOrRedo.h" > #import "ViewGestureController.h" > #import "WKBrowsingContextControllerInternal.h" > #import "WKFullScreenWindowController.h" >@@ -2570,13 +2571,13 @@ void WebViewImpl::executeEditCommandForS > m_page->executeEditCommand(commandNameForSelector(selector), argument); > } > >-void WebViewImpl::registerEditCommand(Ref<WebEditCommandProxy>&& command, WebPageProxy::UndoOrRedo undoOrRedo) >+void WebViewImpl::registerEditCommand(Ref<WebEditCommandProxy>&& command, UndoOrRedo undoOrRedo) > { > RetainPtr<WKEditCommandObjC> commandObjC = adoptNS([[WKEditCommandObjC alloc] initWithWebEditCommandProxy:command.ptr()]); > String actionName = WebEditCommandProxy::nameForEditAction(command->editAction()); > > NSUndoManager *undoManager = [m_view undoManager]; >- [undoManager registerUndoWithTarget:m_undoTarget.get() selector:((undoOrRedo == WebPageProxy::Undo) ? @selector(undoEditing:) : @selector(redoEditing:)) object:commandObjC.get()]; >+ [undoManager registerUndoWithTarget:m_undoTarget.get() selector:((undoOrRedo == UndoOrRedo::Undo) ? @selector(undoEditing:) : @selector(redoEditing:)) object:commandObjC.get()]; > if (!actionName.isEmpty()) > [undoManager setActionName:(NSString *)actionName]; > } >Index: Source/WebKit/UIProcess/ios/PageClientImplIOS.h >=================================================================== >--- Source/WebKit/UIProcess/ios/PageClientImplIOS.h (revision 234277) >+++ Source/WebKit/UIProcess/ios/PageClientImplIOS.h (working copy) >@@ -39,7 +39,9 @@ struct PromisedBlobInfo; > } > > namespace WebKit { >- >+ >+enum class UndoOrRedo; >+ > class PageClientImpl : public PageClientImplCocoa > #if ENABLE(FULLSCREEN_API) > , public WebFullScreenManagerProxyClient >@@ -76,10 +78,10 @@ private: > void setCursor(const WebCore::Cursor&) override; > void setCursorHiddenUntilMouseMoves(bool) override; > void didChangeViewportProperties(const WebCore::ViewportAttributes&) override; >- void registerEditCommand(Ref<WebEditCommandProxy>&&, WebPageProxy::UndoOrRedo) override; >+ void registerEditCommand(Ref<WebEditCommandProxy>&&, UndoOrRedo) override; > void clearAllEditCommands() override; >- bool canUndoRedo(WebPageProxy::UndoOrRedo) override; >- void executeUndoRedo(WebPageProxy::UndoOrRedo) override; >+ bool canUndoRedo(UndoOrRedo) override; >+ void executeUndoRedo(UndoOrRedo) override; > void accessibilityWebProcessTokenReceived(const IPC::DataReference&) override; > bool executeSavedCommandBySelector(const String& selector) override; > void updateSecureInputState() override; >Index: Source/WebKit/UIProcess/ios/PageClientImplIOS.mm >=================================================================== >--- Source/WebKit/UIProcess/ios/PageClientImplIOS.mm (revision 234277) >+++ Source/WebKit/UIProcess/ios/PageClientImplIOS.mm (working copy) >@@ -37,6 +37,7 @@ > #import "NavigationState.h" > #import "StringUtilities.h" > #import "UIKitSPI.h" >+#import "UndoOrRedo.h" > #import "ViewSnapshotStore.h" > #import "WKContentView.h" > #import "WKContentViewInteraction.h" >@@ -304,13 +305,13 @@ void PageClientImpl::didChangeViewportPr > notImplemented(); > } > >-void PageClientImpl::registerEditCommand(Ref<WebEditCommandProxy>&& command, WebPageProxy::UndoOrRedo undoOrRedo) >+void PageClientImpl::registerEditCommand(Ref<WebEditCommandProxy>&& command, UndoOrRedo undoOrRedo) > { > RetainPtr<WKEditCommandObjC> commandObjC = adoptNS([[WKEditCommandObjC alloc] initWithWebEditCommandProxy:command.copyRef()]); > String actionName = WebEditCommandProxy::nameForEditAction(command->editAction()); > > NSUndoManager *undoManager = [m_contentView undoManager]; >- [undoManager registerUndoWithTarget:m_undoTarget.get() selector:((undoOrRedo == WebPageProxy::Undo) ? @selector(undoEditing:) : @selector(redoEditing:)) object:commandObjC.get()]; >+ [undoManager registerUndoWithTarget:m_undoTarget.get() selector:((undoOrRedo == UndoOrRedo::Undo) ? @selector(undoEditing:) : @selector(redoEditing:)) object:commandObjC.get()]; > if (!actionName.isEmpty()) > [undoManager setActionName:(NSString *)actionName]; > } >@@ -327,14 +328,14 @@ void PageClientImpl::clearAllEditCommand > [[m_contentView undoManager] removeAllActionsWithTarget:m_undoTarget.get()]; > } > >-bool PageClientImpl::canUndoRedo(WebPageProxy::UndoOrRedo undoOrRedo) >+bool PageClientImpl::canUndoRedo(UndoOrRedo undoOrRedo) > { >- return (undoOrRedo == WebPageProxy::Undo) ? [[m_contentView undoManager] canUndo] : [[m_contentView undoManager] canRedo]; >+ return (undoOrRedo == UndoOrRedo::Undo) ? [[m_contentView undoManager] canUndo] : [[m_contentView undoManager] canRedo]; > } > >-void PageClientImpl::executeUndoRedo(WebPageProxy::UndoOrRedo undoOrRedo) >+void PageClientImpl::executeUndoRedo(UndoOrRedo undoOrRedo) > { >- return (undoOrRedo == WebPageProxy::Undo) ? [[m_contentView undoManager] undo] : [[m_contentView undoManager] redo]; >+ return (undoOrRedo == UndoOrRedo::Undo) ? [[m_contentView undoManager] undo] : [[m_contentView undoManager] redo]; > } > > void PageClientImpl::accessibilityWebProcessTokenReceived(const IPC::DataReference& data) >Index: Source/WebKit/UIProcess/mac/PageClientImplMac.h >=================================================================== >--- Source/WebKit/UIProcess/mac/PageClientImplMac.h (revision 234277) >+++ Source/WebKit/UIProcess/mac/PageClientImplMac.h (working copy) >@@ -91,10 +91,10 @@ private: > void setCursorHiddenUntilMouseMoves(bool) override; > void didChangeViewportProperties(const WebCore::ViewportAttributes&) override; > >- void registerEditCommand(Ref<WebEditCommandProxy>&&, WebPageProxy::UndoOrRedo) override; >+ void registerEditCommand(Ref<WebEditCommandProxy>&&, UndoOrRedo) override; > void clearAllEditCommands() override; >- bool canUndoRedo(WebPageProxy::UndoOrRedo) override; >- void executeUndoRedo(WebPageProxy::UndoOrRedo) override; >+ bool canUndoRedo(UndoOrRedo) override; >+ void executeUndoRedo(UndoOrRedo) override; > bool executeSavedCommandBySelector(const String& selector) override; > void startDrag(const WebCore::DragItem&, const ShareableBitmap::Handle& image) override; > void setPromisedDataForImage(const String& pasteboardName, Ref<WebCore::SharedBuffer>&& imageBuffer, const String& filename, const String& extension, const String& title, >Index: Source/WebKit/UIProcess/mac/PageClientImplMac.mm >=================================================================== >--- Source/WebKit/UIProcess/mac/PageClientImplMac.mm (revision 234277) >+++ Source/WebKit/UIProcess/mac/PageClientImplMac.mm (working copy) >@@ -39,6 +39,7 @@ > #import "NativeWebWheelEvent.h" > #import "NavigationState.h" > #import "StringUtilities.h" >+#import "UndoOrRedo.h" > #import "ViewGestureController.h" > #import "ViewSnapshotStore.h" > #import "WKAPICast.h" >@@ -330,7 +331,7 @@ void PageClientImpl::didChangeViewportPr > { > } > >-void PageClientImpl::registerEditCommand(Ref<WebEditCommandProxy>&& command, WebPageProxy::UndoOrRedo undoOrRedo) >+void PageClientImpl::registerEditCommand(Ref<WebEditCommandProxy>&& command, UndoOrRedo undoOrRedo) > { > m_impl->registerEditCommand(WTFMove(command), undoOrRedo); > } >@@ -347,14 +348,14 @@ void PageClientImpl::clearAllEditCommand > m_impl->clearAllEditCommands(); > } > >-bool PageClientImpl::canUndoRedo(WebPageProxy::UndoOrRedo undoOrRedo) >+bool PageClientImpl::canUndoRedo(UndoOrRedo undoOrRedo) > { >- return (undoOrRedo == WebPageProxy::Undo) ? [[m_view undoManager] canUndo] : [[m_view undoManager] canRedo]; >+ return (undoOrRedo == UndoOrRedo::Undo) ? [[m_view undoManager] canUndo] : [[m_view undoManager] canRedo]; > } > >-void PageClientImpl::executeUndoRedo(WebPageProxy::UndoOrRedo undoOrRedo) >+void PageClientImpl::executeUndoRedo(UndoOrRedo undoOrRedo) > { >- return (undoOrRedo == WebPageProxy::Undo) ? [[m_view undoManager] undo] : [[m_view undoManager] redo]; >+ return (undoOrRedo == UndoOrRedo::Undo) ? [[m_view undoManager] undo] : [[m_view undoManager] redo]; > } > > void PageClientImpl::startDrag(const WebCore::DragItem& item, const ShareableBitmap::Handle& image) >Index: Source/WebKit/UIProcess/mac/WebContextMenuProxyMac.mm >=================================================================== >--- Source/WebKit/UIProcess/mac/WebContextMenuProxyMac.mm (revision 234277) >+++ Source/WebKit/UIProcess/mac/WebContextMenuProxyMac.mm (working copy) >@@ -40,6 +40,7 @@ > #import "WebContextMenuItem.h" > #import "WebContextMenuItemData.h" > #import "WebContextMenuListenerProxy.h" >+#import "WebPageProxy.h" > #import "WebProcessProxy.h" > #import <WebCore/GraphicsContext.h> > #import <WebCore/IntRect.h> >Index: Source/WebKit/WebKit.xcodeproj/project.pbxproj >=================================================================== >--- Source/WebKit/WebKit.xcodeproj/project.pbxproj (revision 234277) >+++ Source/WebKit/WebKit.xcodeproj/project.pbxproj (working copy) >@@ -1278,6 +1278,7 @@ > 5C26958520043212005C439B /* WKOpenPanelParametersPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 5C26958420042F12005C439B /* WKOpenPanelParametersPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; }; > 5C298DA01C3DF02100470AFE /* PendingDownload.h in Headers */ = {isa = PBXBuildFile; fileRef = 5C298D9E1C3DEF2900470AFE /* PendingDownload.h */; }; > 5C3AEA8F1FE1F21F002318D3 /* WebsitePoliciesData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5C3AEA8E1FE1F1DF002318D3 /* WebsitePoliciesData.cpp */; }; >+ 5C4B9D8B210A8CCF008F14D1 /* UndoOrRedo.h in Headers */ = {isa = PBXBuildFile; fileRef = 5C4B9D8A210A8C46008F14D1 /* UndoOrRedo.h */; }; > 5C62FDF91EFC271C00CE072E /* WKURLSchemeTaskPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 5C62FDF81EFC263C00CE072E /* WKURLSchemeTaskPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; }; > 5C6CE6D11F59BC7A0007C6CB /* PageClientImplCocoa.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5C6CE6D01F59BC460007C6CB /* PageClientImplCocoa.mm */; }; > 5C7706741D1138380012700F /* WebSocketProvider.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5C7706731D111D8B0012700F /* WebSocketProvider.cpp */; }; >@@ -3835,6 +3836,7 @@ > 5C26958420042F12005C439B /* WKOpenPanelParametersPrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKOpenPanelParametersPrivate.h; sourceTree = "<group>"; }; > 5C298D9E1C3DEF2900470AFE /* PendingDownload.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PendingDownload.h; path = NetworkProcess/Downloads/PendingDownload.h; sourceTree = "<group>"; }; > 5C3AEA8E1FE1F1DF002318D3 /* WebsitePoliciesData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebsitePoliciesData.cpp; sourceTree = "<group>"; }; >+ 5C4B9D8A210A8C46008F14D1 /* UndoOrRedo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UndoOrRedo.h; sourceTree = "<group>"; }; > 5C62FDF81EFC263C00CE072E /* WKURLSchemeTaskPrivate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WKURLSchemeTaskPrivate.h; sourceTree = "<group>"; }; > 5C6CE6D01F59BC460007C6CB /* PageClientImplCocoa.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = PageClientImplCocoa.mm; sourceTree = "<group>"; }; > 5C6CE6D31F59EA350007C6CB /* PageClientImplCocoa.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PageClientImplCocoa.h; sourceTree = "<group>"; }; >@@ -5428,6 +5430,7 @@ > 2FD43B911FA006A10083F51C /* TouchBarMenuData.h */, > 2F809DD51FBD1BC9005FE63A /* TouchBarMenuItemData.cpp */, > 2F809DD91FBD1BF2005FE63A /* TouchBarMenuItemData.h */, >+ 5C4B9D8A210A8C46008F14D1 /* UndoOrRedo.h */, > 1A64245D12DE29A100CAAE2C /* UpdateInfo.cpp */, > 1A64245C12DE29A100CAAE2C /* UpdateInfo.h */, > 5C19A51E1FD0B14600EEA323 /* URLSchemeTaskParameters.cpp */, >@@ -9394,6 +9397,7 @@ > 515BE1A91D55293400DD7C68 /* UIGamepadProvider.h in Headers */, > CEE4AE2B1A5DCF430002F49B /* UIKitSPI.h in Headers */, > 513FFB8D201459B0002596EA /* UIMessagePortChannelProvider.h in Headers */, >+ 5C4B9D8B210A8CCF008F14D1 /* UndoOrRedo.h in Headers */, > 1A64245E12DE29A100CAAE2C /* UpdateInfo.h in Headers */, > 5C19A5201FD0B29500EEA323 /* URLSchemeTaskParameters.h in Headers */, > 1AC1336818565B5700F3EC05 /* UserData.h in Headers */, >Index: Source/WebKit/WebProcess/WebCoreSupport/WebEditorClient.cpp >=================================================================== >--- Source/WebKit/WebProcess/WebCoreSupport/WebEditorClient.cpp (revision 234277) >+++ Source/WebKit/WebProcess/WebCoreSupport/WebEditorClient.cpp (working copy) >@@ -27,6 +27,7 @@ > #include "WebEditorClient.h" > > #include "EditorState.h" >+#include "UndoOrRedo.h" > #include "WKBundlePageEditorClient.h" > #include "WebCoreArgumentCoders.h" > #include "WebFrame.h" >@@ -304,27 +305,25 @@ bool WebEditorClient::canPaste(Frame*, b > bool WebEditorClient::canUndo() const > { > bool result = false; >- m_page->sendSync(Messages::WebPageProxy::CanUndoRedo(static_cast<uint32_t>(WebPageProxy::Undo)), Messages::WebPageProxy::CanUndoRedo::Reply(result)); >+ m_page->sendSync(Messages::WebPageProxy::CanUndoRedo(UndoOrRedo::Undo), Messages::WebPageProxy::CanUndoRedo::Reply(result)); > return result; > } > > bool WebEditorClient::canRedo() const > { > bool result = false; >- m_page->sendSync(Messages::WebPageProxy::CanUndoRedo(static_cast<uint32_t>(WebPageProxy::Redo)), Messages::WebPageProxy::CanUndoRedo::Reply(result)); >+ m_page->sendSync(Messages::WebPageProxy::CanUndoRedo(UndoOrRedo::Redo), Messages::WebPageProxy::CanUndoRedo::Reply(result)); > return result; > } > > void WebEditorClient::undo() > { >- bool result = false; >- m_page->sendSync(Messages::WebPageProxy::ExecuteUndoRedo(static_cast<uint32_t>(WebPageProxy::Undo)), Messages::WebPageProxy::ExecuteUndoRedo::Reply(result)); >+ m_page->sendSync(Messages::WebPageProxy::ExecuteUndoRedo(UndoOrRedo::Undo), Messages::WebPageProxy::ExecuteUndoRedo::Reply()); > } > > void WebEditorClient::redo() > { >- bool result = false; >- m_page->sendSync(Messages::WebPageProxy::ExecuteUndoRedo(static_cast<uint32_t>(WebPageProxy::Redo)), Messages::WebPageProxy::ExecuteUndoRedo::Reply(result)); >+ m_page->sendSync(Messages::WebPageProxy::ExecuteUndoRedo(UndoOrRedo::Redo), Messages::WebPageProxy::ExecuteUndoRedo::Reply()); > } > > #if !PLATFORM(GTK) && !PLATFORM(COCOA) && !PLATFORM(WPE)
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 188086
:
345890
|
345909
|
345920
|
345924
|
345929
|
345947