Title: [169925] trunk/Tools
Revision
169925
Author
[email protected]
Date
2014-06-12 17:55:54 -0700 (Thu, 12 Jun 2014)

Log Message

[iOS] Fix the view being half offscreen in WebKitTestRunner on iOS
https://bugs.webkit.org/show_bug.cgi?id=133835

Reviewed by Tim Horton.

Don't do the _fakeOrigin stuff when -initWithFrame: is calling -setFrame:

* WebKitTestRunner/ios/PlatformWebViewIOS.mm:
(-[WebKitTestRunnerWindow initWithFrame:]):
(-[WebKitTestRunnerWindow setFrame:]):

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (169924 => 169925)


--- trunk/Tools/ChangeLog	2014-06-13 00:55:53 UTC (rev 169924)
+++ trunk/Tools/ChangeLog	2014-06-13 00:55:54 UTC (rev 169925)
@@ -1,3 +1,16 @@
+2014-06-12  Simon Fraser  <[email protected]>
+
+        [iOS] Fix the view being half offscreen in WebKitTestRunner on iOS
+        https://bugs.webkit.org/show_bug.cgi?id=133835
+
+        Reviewed by Tim Horton.
+        
+        Don't do the _fakeOrigin stuff when -initWithFrame: is calling -setFrame:
+
+        * WebKitTestRunner/ios/PlatformWebViewIOS.mm:
+        (-[WebKitTestRunnerWindow initWithFrame:]):
+        (-[WebKitTestRunnerWindow setFrame:]):
+
 2014-06-12  Carlos Alberto Lopez Perez  <[email protected]>
 
         [GTK] Performance tests should be always ran with WKTR.

Modified: trunk/Tools/WebKitTestRunner/ios/PlatformWebViewIOS.mm (169924 => 169925)


--- trunk/Tools/WebKitTestRunner/ios/PlatformWebViewIOS.mm	2014-06-13 00:55:53 UTC (rev 169924)
+++ trunk/Tools/WebKitTestRunner/ios/PlatformWebViewIOS.mm	2014-06-13 00:55:54 UTC (rev 169925)
@@ -35,6 +35,7 @@
 @interface WebKitTestRunnerWindow : UIWindow {
     WTR::PlatformWebView* _platformWebView;
     CGPoint _fakeOrigin;
+    BOOL _initialized;
 }
 @property (nonatomic, assign) WTR::PlatformWebView* platformWebView;
 @end
@@ -68,6 +69,13 @@
 @implementation WebKitTestRunnerWindow
 @synthesize platformWebView = _platformWebView;
 
+- (id)initWithFrame:(CGRect)frame
+{
+    if ((self = [super initWithFrame:frame]))
+        _initialized = YES;
+
+    return self;
+}
 - (BOOL)isKeyWindow
 {
     return _platformWebView ? _platformWebView->windowIsKey() : YES;
@@ -78,9 +86,13 @@
     _fakeOrigin = point;
 }
 
-// FIXME: these frame gyrations cause the window to go half offscreen.
 - (void)setFrame:(CGRect)windowFrame
 {
+    if (!_initialized) {
+        [super setFrame:windowFrame];
+        return;
+    }
+
     CGRect currentFrame = [super frame];
 
     _fakeOrigin = windowFrame.origin;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to