Title: [176695] trunk/Source/WebKit/mac
- Revision
- 176695
- Author
- [email protected]
- Date
- 2014-12-02 15:41:23 -0800 (Tue, 02 Dec 2014)
Log Message
Loading Lookup causes http/tests/cache/post-redirect-get.php to fail
https://bugs.webkit.org/show_bug.cgi?id=139204
<rdar://problem/19120929>
Reviewed by Anders Carlsson.
* WebView/WebView.mm:
(-[WebView _commonInitializationWithFrameName:groupName:]):
(-[WebView _showDictionaryLookupPopup:]):
* WebView/WebViewData.h:
Work around this by delaying the softlinking (and setting up the notification
observer) until we actually need it. There's still an underlying bug, but
this will fix the test.
Modified Paths
Diff
Modified: trunk/Source/WebKit/mac/ChangeLog (176694 => 176695)
--- trunk/Source/WebKit/mac/ChangeLog 2014-12-02 22:05:33 UTC (rev 176694)
+++ trunk/Source/WebKit/mac/ChangeLog 2014-12-02 23:41:23 UTC (rev 176695)
@@ -1,3 +1,18 @@
+2014-12-02 Tim Horton <[email protected]>
+
+ Loading Lookup causes http/tests/cache/post-redirect-get.php to fail
+ https://bugs.webkit.org/show_bug.cgi?id=139204
+
+ Reviewed by Anders Carlsson.
+
+ * WebView/WebView.mm:
+ (-[WebView _commonInitializationWithFrameName:groupName:]):
+ (-[WebView _showDictionaryLookupPopup:]):
+ * WebView/WebViewData.h:
+ Work around this by delaying the softlinking (and setting up the notification
+ observer) until we actually need it. There's still an underlying bug, but
+ this will fix the test.
+
2014-12-02 Beth Dakin <[email protected]>
Yet another build fix.
Modified: trunk/Source/WebKit/mac/WebView/WebView.mm (176694 => 176695)
--- trunk/Source/WebKit/mac/WebView/WebView.mm 2014-12-02 22:05:33 UTC (rev 176694)
+++ trunk/Source/WebKit/mac/WebView/WebView.mm 2014-12-02 23:41:23 UTC (rev 176695)
@@ -1029,9 +1029,6 @@
#if !PLATFORM(IOS)
[self _registerDraggedTypes];
-
- if (canLoadLUNotificationPopoverWillClose())
- [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_dictionaryLookupPopoverWillClose:) name:getLUNotificationPopoverWillClose() object:nil];
#endif
[self _setIsVisible:[self _isViewVisible]];
@@ -8621,7 +8618,12 @@
// Convert to screen coordinates.
textBaselineOrigin = [self.window convertRectToScreen:NSMakeRect(textBaselineOrigin.x, textBaselineOrigin.y, 0, 0)].origin;
- if (canLoadLUTermOptionDisableSearchTermIndicator()) {
+ if (canLoadLUTermOptionDisableSearchTermIndicator() && canLoadLUNotificationPopoverWillClose()) {
+ if (!_private->hasInitializedLookupObserver) {
+ [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_dictionaryLookupPopoverWillClose:) name:getLUNotificationPopoverWillClose() object:nil];
+ _private->hasInitializedLookupObserver = YES;
+ }
+
RetainPtr<NSMutableDictionary> mutableOptions = adoptNS([dictionaryPopupInfo.options mutableCopy]);
if (!mutableOptions)
mutableOptions = adoptNS([[NSMutableDictionary alloc] init]);
Modified: trunk/Source/WebKit/mac/WebView/WebViewData.h (176694 => 176695)
--- trunk/Source/WebKit/mac/WebView/WebViewData.h 2014-12-02 22:05:33 UTC (rev 176694)
+++ trunk/Source/WebKit/mac/WebView/WebViewData.h 2014-12-02 23:41:23 UTC (rev 176695)
@@ -152,6 +152,7 @@
WebActionMenuController *actionMenuController;
#endif // __MAC_OS_X_VERSION_MIN_REQUIRED >= 101000
std::unique_ptr<WebCore::TextIndicatorWindow> textIndicatorWindow;
+ BOOL hasInitializedLookupObserver;
#endif // PLATFORM(MAC)
BOOL allowsUndo;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes