Fix the 32-bit build.
authortimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 4 Dec 2014 21:10:49 +0000 (21:10 +0000)
committertimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 4 Dec 2014 21:10:49 +0000 (21:10 +0000)
* UIProcess/API/mac/WKView.mm:
(-[WKView _setTextIndicator:fadeOut:animationCompletionHandler:]):

* WebView/WebView.mm:
(-[WebView _setTextIndicator:fadeOut:animationCompletionHandler:]):

* page/mac/TextIndicatorWindow.h:
* page/mac/TextIndicatorWindow.mm:
(WebCore::TextIndicatorWindow::setTextIndicator):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@176811 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/page/mac/TextIndicatorWindow.h
Source/WebCore/page/mac/TextIndicatorWindow.mm
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/WebView/WebView.mm
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/mac/WKView.mm

index dfbe5f83d9fa282925b75f18a5e3fe0735529f03..97f8b3b44ab40e13241c662b011963d207cf9bb1 100644 (file)
@@ -1,3 +1,11 @@
+2014-12-04  Timothy Horton  <timothy_horton@apple.com>
+
+        Fix the 32-bit build.
+
+        * page/mac/TextIndicatorWindow.h:
+        * page/mac/TextIndicatorWindow.mm:
+        (WebCore::TextIndicatorWindow::setTextIndicator):
+
 2014-12-04  Tim Horton  <timothy_horton@apple.com>
 
         TextIndicator::createWithSelectionInFrame does synchronous IPC in WebKit2
index d4d1d22fa4e94722e44e6c135ee14eae11188169..49a4e65ad092ed289fe7c413bf6dd585b14c0036 100644 (file)
@@ -48,7 +48,7 @@ public:
     explicit TextIndicatorWindow(NSView *);
     ~TextIndicatorWindow();
 
-    void setTextIndicator(PassRefPtr<TextIndicator>, NSRect contentRect, bool fadeOut, std::function<void ()> animationCompletionHandler);
+    void setTextIndicator(PassRefPtr<TextIndicator>, CGRect contentRect, bool fadeOut, std::function<void ()> animationCompletionHandler);
 
 private:
     void closeWindow();
index ac1d0207afd0be0b3a29ec8fe0829affc28417ad..b2f50453ce6fad87f20c6c7caff38b8b67d4fbf5 100644 (file)
@@ -266,7 +266,7 @@ TextIndicatorWindow::~TextIndicatorWindow()
     closeWindow();
 }
 
-void TextIndicatorWindow::setTextIndicator(PassRefPtr<TextIndicator> textIndicator, NSRect contentRect, bool fadeOut, std::function<void ()> animationCompletionHandler)
+void TextIndicatorWindow::setTextIndicator(PassRefPtr<TextIndicator> textIndicator, CGRect contentRect, bool fadeOut, std::function<void ()> animationCompletionHandler)
 {
     if (m_textIndicator == textIndicator)
         return;
@@ -282,7 +282,7 @@ void TextIndicatorWindow::setTextIndicator(PassRefPtr<TextIndicator> textIndicat
     CGFloat horizontalMargin = std::max(dropShadowBlurRadius * 2 + horizontalBorder, contentRect.size.width * 2);
     CGFloat verticalMargin = std::max(dropShadowBlurRadius * 2 + verticalBorder, contentRect.size.height * 2);
 
-    contentRect = NSInsetRect(contentRect, -horizontalMargin, -verticalMargin);
+    contentRect = NSInsetRect(NSRectFromCGRect(contentRect), -horizontalMargin, -verticalMargin);
     NSRect windowContentRect = [NSWindow contentRectForFrameRect:NSIntegralRect(contentRect) styleMask:NSBorderlessWindowMask];
     m_textIndicatorWindow = adoptNS([[NSWindow alloc] initWithContentRect:windowContentRect styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:NO]);
 
index 7f03ab77bf761378439bfb132c496b1b5a989d1f..fb723e27a6f8466dd5b74ef7c288cf09f1355aab 100644 (file)
@@ -1,3 +1,10 @@
+2014-12-04  Timothy Horton  <timothy_horton@apple.com>
+
+        Fix the 32-bit build.
+
+        * WebView/WebView.mm:
+        (-[WebView _setTextIndicator:fadeOut:animationCompletionHandler:]):
+
 2014-12-04  Tim Horton  <timothy_horton@apple.com>
 
         TextIndicator::createWithSelectionInFrame does synchronous IPC in WebKit2
index 1278ccb47b6dbf841380d4d8679f8e6741964b8c..010bdab638cb307feab3196449f2ff0fcd736d0b 100644 (file)
@@ -8602,7 +8602,7 @@ static void glibContextIterationCallback(CFRunLoopObserverRef, CFRunLoopActivity
         _private->textIndicatorWindow = std::make_unique<TextIndicatorWindow>(self);
 
     NSRect contentRect = [self.window convertRectToScreen:textIndicator->textBoundingRectInWindowCoordinates()];
-    _private->textIndicatorWindow->setTextIndicator(textIndicator, contentRect, fadeOut, WTF::move(completionHandler));
+    _private->textIndicatorWindow->setTextIndicator(textIndicator, NSRectToCGRect(contentRect), fadeOut, WTF::move(completionHandler));
 }
 
 - (void)_clearTextIndicator
index 54aed910a8a2fa5fb1df0e8ab1eed024aea85001..8b7ec98b328edb4fb2210560885bf933faeb5f75 100644 (file)
@@ -1,3 +1,10 @@
+2014-12-04  Timothy Horton  <timothy_horton@apple.com>
+
+        Fix the 32-bit build.
+
+        * UIProcess/API/mac/WKView.mm:
+        (-[WKView _setTextIndicator:fadeOut:animationCompletionHandler:]):
+
 2014-12-04  Tim Horton  <timothy_horton@apple.com>
 
         TextIndicator::createWithSelectionInFrame does synchronous IPC in WebKit2
index 8f9e656395d7e445cfc7c71af0fcfffa4c0e6a56..5e72503275d33f2015a88aea0e6459d038ac1d99 100644 (file)
@@ -3082,7 +3082,7 @@ static void* keyValueObservingContext = &keyValueObservingContext;
         _data->_textIndicatorWindow = std::make_unique<TextIndicatorWindow>(self);
 
     NSRect contentRect = [self.window convertRectToScreen:[self convertRect:textIndicator->textBoundingRectInWindowCoordinates() toView:nil]];
-    _data->_textIndicatorWindow->setTextIndicator(textIndicator, contentRect, fadeOut, WTF::move(completionHandler));
+    _data->_textIndicatorWindow->setTextIndicator(textIndicator, NSRectToCGRect(contentRect), fadeOut, WTF::move(completionHandler));
 }
 
 - (void)_setTextIndicator:(PassRefPtr<TextIndicator>)textIndicator fadeOut:(BOOL)fadeOut