Changeset 189959 in webkit
- Timestamp:
- Sep 17, 2015 6:58:40 PM (9 years ago)
- Location:
- trunk/Tools
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r189958 r189959 1 2015-09-17 Simon Fraser <simon.fraser@apple.com> 2 3 [iOS WK2] WTR fails to set the key window in the UIKit sense 4 https://bugs.webkit.org/show_bug.cgi?id=149325 5 6 Reviewed by Tim Horton. 7 8 -[WebKitTestRunnerWindow isKeyWindow] just returned _platformWebView->windowIsKey(). 9 This causes UIKit to bypass code that actually sets the key window, resulting in 10 [UIAppliation sharedApplication].keyWindow always being nil. 11 12 Fix by PlatformWebView::setWindowIsKey() actually call -makeKeyWindow, and having 13 -[WebKitTestRunnerWindow isKeyWindow] call super. 14 15 * WebKitTestRunner/PlatformWebView.h: 16 (WTR::PlatformWebView::setWindowIsKey): Deleted. 17 * WebKitTestRunner/efl/PlatformWebViewEfl.cpp: 18 (WTR::PlatformWebView::setWindowIsKey): 19 * WebKitTestRunner/gtk/PlatformWebViewGtk.cpp: 20 (WTR::PlatformWebView::setWindowIsKey): 21 * WebKitTestRunner/ios/PlatformWebViewIOS.mm: 22 (-[WebKitTestRunnerWindow isKeyWindow]): 23 (WTR::PlatformWebView::PlatformWebView): 24 (WTR::PlatformWebView::~PlatformWebView): 25 (WTR::PlatformWebView::setWindowIsKey): 26 * WebKitTestRunner/mac/PlatformWebViewMac.mm: 27 (WTR::PlatformWebView::setWindowIsKey): 28 1 29 2015-09-17 Simon Fraser <simon.fraser@apple.com> 2 30 -
trunk/Tools/WebKitTestRunner/PlatformWebView.h
r189668 r189959 78 78 void removeChromeInputField(); 79 79 void makeWebViewFirstResponder(); 80 void setWindowIsKey(bool isKey) { m_windowIsKey = isKey; }80 void setWindowIsKey(bool); 81 81 bool windowIsKey() const { return m_windowIsKey; } 82 82 -
trunk/Tools/WebKitTestRunner/efl/PlatformWebViewEfl.cpp
r189668 r189959 83 83 } 84 84 85 void PlatformWebView::setWindowIsKey(bool isKey) 86 { 87 m_windowIsKey = isKey; 88 } 89 85 90 void PlatformWebView::resizeTo(unsigned width, unsigned height) 86 91 { -
trunk/Tools/WebKitTestRunner/gtk/PlatformWebViewGtk.cpp
r189668 r189959 57 57 { 58 58 gtk_widget_destroy(m_window); 59 } 60 61 void PlatformWebView::setWindowIsKey(bool isKey) 62 { 63 m_windowIsKey = isKey; 59 64 } 60 65 -
trunk/Tools/WebKitTestRunner/ios/PlatformWebViewIOS.mm
r189669 r189959 56 56 return self; 57 57 } 58 58 59 - (BOOL)isKeyWindow 59 60 { 60 return _platformWebView ? _platformWebView->windowIsKey() : YES;61 return [super isKeyWindow] && (_platformWebView ? _platformWebView->windowIsKey() : YES); 61 62 } 62 63 … … 108 109 m_view = [[WKWebView alloc] initWithFrame:rect configuration:configuration]; 109 110 110 CGRect windowRect = rect; 111 m_window = [[WebKitTestRunnerWindow alloc] initWithFrame:windowRect]; 111 m_window = [[WebKitTestRunnerWindow alloc] initWithFrame:rect]; 112 112 m_window.platformWebView = this; 113 113 114 114 [m_window addSubview:m_view]; 115 115 [m_window makeKeyAndVisible]; 116 } 117 118 PlatformWebView::~PlatformWebView() 119 { 120 m_window.platformWebView = nil; 121 [m_view release]; 122 [m_window release]; 123 } 124 125 void PlatformWebView::setWindowIsKey(bool isKey) 126 { 127 m_windowIsKey = isKey; 128 if (isKey) 129 [m_window makeKeyWindow]; 116 130 } 117 131 … … 122 136 frame.size.height = height; 123 137 setWindowFrame(frame); 124 }125 126 PlatformWebView::~PlatformWebView()127 {128 m_window.platformWebView = 0;129 [m_view release];130 [m_window release];131 138 } 132 139 -
trunk/Tools/WebKitTestRunner/mac/PlatformWebViewMac.mm
r189669 r189959 146 146 } 147 147 148 void PlatformWebView::setWindowIsKey(bool isKey) 149 { 150 m_windowIsKey = isKey; 151 } 152 148 153 void PlatformWebView::resizeTo(unsigned width, unsigned height) 149 154 {
Note: See TracChangeset
for help on using the changeset viewer.