Diff
Modified: trunk/Source/WebKit/ChangeLog (221701 => 221702)
--- trunk/Source/WebKit/ChangeLog 2017-09-06 20:51:02 UTC (rev 221701)
+++ trunk/Source/WebKit/ChangeLog 2017-09-06 20:54:36 UTC (rev 221702)
@@ -1,3 +1,16 @@
+2017-09-06 Alex Christensen <achristen...@webkit.org>
+
+ Unreviewed, rolling out r221694.
+
+ broke build
+
+ Reverted changeset:
+
+ "Add WKUIDelegatePrivate equivalent of WKPageUIClient's
+ pinnedStateDidChange"
+ https://bugs.webkit.org/show_bug.cgi?id=176474
+ http://trac.webkit.org/changeset/221694
+
2017-09-06 Ryan Haddad <ryanhad...@apple.com>
Unreviewed, rolling out r221461.
Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm (221701 => 221702)
--- trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm 2017-09-06 20:51:02 UTC (rev 221701)
+++ trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm 2017-09-06 20:54:36 UTC (rev 221702)
@@ -5281,21 +5281,6 @@
return _impl->pageExtendedBackgroundColor();
}
-- (_WKRectEdge)_pinnedState
-{
- return _impl->pinnedState();
-}
-
-- (_WKRectEdge)_rubberBandingEnabled
-{
- return _impl->rubberBandingEnabled();
-}
-
-- (void)_setRubberBandingEnabled:(_WKRectEdge)state
-{
- _impl->setRubberBandingEnabled(state);
-}
-
- (id)_immediateActionAnimationControllerForHitTestResult:(_WKHitTestResult *)hitTestResult withType:(_WKImmediateActionType)type userData:(id<NSSecureCoding>)userData
{
return nil;
Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h (221701 => 221702)
--- trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h 2017-09-06 20:51:02 UTC (rev 221701)
+++ trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h 2017-09-06 20:54:36 UTC (rev 221702)
@@ -80,15 +80,6 @@
_WKImmediateActionTelLink
} WK_API_AVAILABLE(macosx(10.12));
-typedef NS_OPTIONS(NSInteger, _WKRectEdge) {
- _WKRectEdgeNone = 0,
- _WKRectEdgeLeft = 1 << CGRectMinXEdge,
- _WKRectEdgeTop = 1 << CGRectMinYEdge,
- _WKRectEdgeRight = 1 << CGRectMaxXEdge,
- _WKRectEdgeBottom = 1 << CGRectMaxYEdge,
- _WKRectEdgeAll = _WKRectEdgeLeft | _WKRectEdgeTop | _WKRectEdgeRight | _WKRectEdgeBottom,
-} WK_API_AVAILABLE(macosx(WK_MAC_TBA));
-
#endif
@class WKBrowsingContextHandle;
@@ -247,10 +238,6 @@
- (void)_accessibilityDidGetSpeakSelectionContent:(NSString *)content WK_API_AVAILABLE(ios(WK_IOS_TBA));
#else
-
-@property (nonatomic, readonly) _WKRectEdge _pinnedState;
-@property (nonatomic, setter=_setRubberBandingEnabled:) _WKRectEdge _rubberBandingEnabled;
-
@property (readonly) NSColor *_pageExtendedBackgroundColor;
@property (nonatomic, setter=_setDrawsBackground:) BOOL _drawsBackground;
@property (nonatomic, setter=_setTopContentInset:) CGFloat _topContentInset;
Modified: trunk/Source/WebKit/UIProcess/Cocoa/WebViewImpl.h (221701 => 221702)
--- trunk/Source/WebKit/UIProcess/Cocoa/WebViewImpl.h 2017-09-06 20:51:02 UTC (rev 221701)
+++ trunk/Source/WebKit/UIProcess/Cocoa/WebViewImpl.h 2017-09-06 20:54:36 UTC (rev 221702)
@@ -23,7 +23,8 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
-#pragma once
+#ifndef WebViewImpl_h
+#define WebViewImpl_h
#if PLATFORM(MAC)
@@ -41,8 +42,6 @@
#include <wtf/WeakPtr.h>
#include <wtf/text/WTFString.h>
-using _WKRectEdge = NSInteger;
-
OBJC_CLASS NSAccessibilityRemoteUIElement;
OBJC_CLASS NSImmediateActionGestureRecognizer;
OBJC_CLASS NSTextInputContext;
@@ -237,10 +236,6 @@
void setUnderlayColor(NSColor *);
NSColor *underlayColor() const;
NSColor *pageExtendedBackgroundColor() const;
-
- _WKRectEdge pinnedState();
- _WKRectEdge rubberBandingEnabled();
- void setRubberBandingEnabled(_WKRectEdge);
void setOverlayScrollbarStyle(std::optional<WebCore::ScrollbarOverlayStyle> scrollbarStyle);
std::optional<WebCore::ScrollbarOverlayStyle> overlayScrollbarStyle() const;
@@ -737,3 +732,5 @@
} // namespace WebKit
#endif // PLATFORM(MAC)
+
+#endif // WebViewImpl_h
Modified: trunk/Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm (221701 => 221702)
--- trunk/Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm 2017-09-06 20:51:02 UTC (rev 221701)
+++ trunk/Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm 2017-09-06 20:54:36 UTC (rev 221702)
@@ -57,7 +57,7 @@
#import "WKPrintingView.h"
#import "WKTextInputWindowController.h"
#import "WKViewLayoutStrategy.h"
-#import "WKWebViewPrivate.h"
+#import "WKWebView.h"
#import "WebBackForwardList.h"
#import "WebEditCommandProxy.h"
#import "WebEventFactory.h"
@@ -4844,42 +4844,6 @@
mouseMovedInternal(event);
}
-_WKRectEdge WebViewImpl::pinnedState()
-{
- _WKRectEdge state = _WKRectEdgeNone;
- if (m_page->isPinnedToLeftSide())
- state |= _WKRectEdgeLeft;
- if (m_page->isPinnedToRightSide())
- state |= _WKRectEdgeRight;
- if (m_page->isPinnedToTopSide())
- state |= _WKRectEdgeTop;
- if (m_page->isPinnedToBottomSide())
- state |= _WKRectEdgeBottom;
- return state;
-}
-
-_WKRectEdge WebViewImpl::rubberBandingEnabled()
-{
- _WKRectEdge state = _WKRectEdgeNone;
- if (m_page->rubberBandsAtLeft())
- state |= _WKRectEdgeLeft;
- if (m_page->rubberBandsAtRight())
- state |= _WKRectEdgeRight;
- if (m_page->rubberBandsAtTop())
- state |= _WKRectEdgeTop;
- if (m_page->rubberBandsAtBottom())
- state |= _WKRectEdgeBottom;
- return state;
-}
-
-void WebViewImpl::setRubberBandingEnabled(_WKRectEdge state)
-{
- m_page->setRubberBandsAtLeft(state & _WKRectEdgeLeft);
- m_page->setRubberBandsAtRight(state & _WKRectEdgeRight);
- m_page->setRubberBandsAtTop(state & _WKRectEdgeTop);
- m_page->setRubberBandsAtBottom(state & _WKRectEdgeBottom);
-}
-
void WebViewImpl::mouseDown(NSEvent *event)
{
if (m_ignoresNonWheelEvents)
Modified: trunk/Source/WebKit/UIProcess/PageClient.h (221701 => 221702)
--- trunk/Source/WebKit/UIProcess/PageClient.h 2017-09-06 20:51:02 UTC (rev 221701)
+++ trunk/Source/WebKit/UIProcess/PageClient.h 2017-09-06 20:54:36 UTC (rev 221702)
@@ -346,8 +346,6 @@
virtual void didChangeBackgroundColor() = 0;
virtual void isPlayingAudioWillChange() = 0;
virtual void isPlayingAudioDidChange() = 0;
- virtual void pinnedStateWillChange() { };
- virtual void pinnedStateDidChange() { };
#if PLATFORM(MAC)
virtual void didPerformImmediateActionHitTest(const WebHitTestResultData&, bool contentPreventsDefault, API::Object*) = 0;
Modified: trunk/Source/WebKit/UIProcess/WebPageProxy.cpp (221701 => 221702)
--- trunk/Source/WebKit/UIProcess/WebPageProxy.cpp 2017-09-06 20:51:02 UTC (rev 221701)
+++ trunk/Source/WebKit/UIProcess/WebPageProxy.cpp 2017-09-06 20:54:36 UTC (rev 221702)
@@ -5966,12 +5966,10 @@
void WebPageProxy::didChangeScrollOffsetPinningForMainFrame(bool pinnedToLeftSide, bool pinnedToRightSide, bool pinnedToTopSide, bool pinnedToBottomSide)
{
- m_pageClient.pinnedStateWillChange();
m_mainFrameIsPinnedToLeftSide = pinnedToLeftSide;
m_mainFrameIsPinnedToRightSide = pinnedToRightSide;
m_mainFrameIsPinnedToTopSide = pinnedToTopSide;
m_mainFrameIsPinnedToBottomSide = pinnedToBottomSide;
- m_pageClient.pinnedStateDidChange();
m_uiClient->pinnedStateDidChange(*this);
}
Modified: trunk/Source/WebKit/UIProcess/mac/PageClientImplMac.h (221701 => 221702)
--- trunk/Source/WebKit/UIProcess/mac/PageClientImplMac.h 2017-09-06 20:51:02 UTC (rev 221701)
+++ trunk/Source/WebKit/UIProcess/mac/PageClientImplMac.h 2017-09-06 20:54:36 UTC (rev 221702)
@@ -117,9 +117,6 @@
virtual WebCore::IntRect rootViewToAccessibilityScreen(const WebCore::IntRect&) = 0;
#endif
- void pinnedStateWillChange() final;
- void pinnedStateDidChange() final;
-
CGRect boundsOfLayerInLayerBackedWindowCoordinates(CALayer *) const override;
void doneWithKeyEvent(const NativeWebKeyboardEvent&, bool wasEventHandled) override;
Modified: trunk/Source/WebKit/UIProcess/mac/PageClientImplMac.mm (221701 => 221702)
--- trunk/Source/WebKit/UIProcess/mac/PageClientImplMac.mm 2017-09-06 20:51:02 UTC (rev 221701)
+++ trunk/Source/WebKit/UIProcess/mac/PageClientImplMac.mm 2017-09-06 20:54:36 UTC (rev 221702)
@@ -402,20 +402,6 @@
return toUserSpace(rect, [m_view window]);
}
-void PageClientImpl::pinnedStateWillChange()
-{
-#if WK_API_ENABLED
- [m_webView willChangeValueForKey:@"_pinnedState"];
-#endif
-}
-
-void PageClientImpl::pinnedStateDidChange()
-{
-#if WK_API_ENABLED
- [m_webView didChangeValueForKey:@"_pinnedState"];
-#endif
-}
-
IntPoint PageClientImpl::screenToRootView(const IntPoint& point)
{
#pragma clang diagnostic push
Modified: trunk/Tools/ChangeLog (221701 => 221702)
--- trunk/Tools/ChangeLog 2017-09-06 20:51:02 UTC (rev 221701)
+++ trunk/Tools/ChangeLog 2017-09-06 20:54:36 UTC (rev 221702)
@@ -1,3 +1,16 @@
+2017-09-06 Alex Christensen <achristen...@webkit.org>
+
+ Unreviewed, rolling out r221694.
+
+ broke build
+
+ Reverted changeset:
+
+ "Add WKUIDelegatePrivate equivalent of WKPageUIClient's
+ pinnedStateDidChange"
+ https://bugs.webkit.org/show_bug.cgi?id=176474
+ http://trac.webkit.org/changeset/221694
+
2017-09-06 Per Arne Vollan <pvol...@apple.com>
[Win] test-webkitpy test timeout_context_unittest is failing.
Modified: trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/UIDelegate.mm (221701 => 221702)
--- trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/UIDelegate.mm 2017-09-06 20:51:02 UTC (rev 221701)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/UIDelegate.mm 2017-09-06 20:54:36 UTC (rev 221702)
@@ -249,32 +249,6 @@
TestWebKitAPI::Util::run(&done);
}
-@interface PinnedStateObserver : NSObject <WKUIDelegatePrivate>
-@end
-
-@implementation PinnedStateObserver
-
-- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary<NSString *, id> *)change context:(void *)context
-{
- EXPECT_TRUE([keyPath isEqualToString:NSStringFromSelector(@selector(_pinnedState))]);
- EXPECT_TRUE([[object class] isEqual:[TestWKWebView class]]);
- EXPECT_EQ([[change objectForKey:NSKeyValueChangeOldKey] integerValue], _WKRectEdgeAll);
- EXPECT_EQ([[change objectForKey:NSKeyValueChangeNewKey] integerValue], _WKRectEdgeLeft | _WKRectEdgeRight);
- EXPECT_TRUE(context == nullptr);
- done = true;
-}
-
-@end
-
-TEST(WebKit, PinnedState)
-{
- auto webView = adoptNS([[TestWKWebView alloc] initWithFrame:CGRectMake(0, 0, 800, 600)]);
- auto observer = adoptNS([[PinnedStateObserver alloc] init]);
- [webView addObserver:observer.get() forKeyPath:@"_pinnedState" options:NSKeyValueObservingOptionNew | NSKeyValueObservingOptionOld context:nil];
- [webView loadHTMLString:@"<body _onload_='scroll(100, 100)' style='height:10000vh;'/>" baseURL:[NSURL URLWithString:@"http://example.com/"]];
- TestWebKitAPI::Util::run(&done);
-}
-
static NSEvent *tabEvent(NSWindow *window, NSEventType type, NSEventModifierFlags flags)
{
return [NSEvent keyEventWithType:type location:NSMakePoint(5, 5) modifierFlags:flags timestamp:GetCurrentEventTime() windowNumber:[window windowNumber] context:[NSGraphicsContext currentContext] characters:@"\t" charactersIgnoringModifiers:@"\t" isARepeat:NO keyCode:0];