Changeset 202763 in webkit
- Timestamp:
- Jul 1, 2016 4:41:45 PM (8 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r202758 r202763 1 2016-07-01 Jer Noble <jer.noble@apple.com> 2 3 REGRESSION(r201405): Fullscreen video no longer enters low-power mode 4 https://bugs.webkit.org/show_bug.cgi?id=159220 5 <rdar://problem/26701056> 6 7 Reviewed by Beth Dakin. 8 9 In r201405, we removed the call to setTopContentInset(0) to avoid a flash 10 during repainting where the WebProcess still thought it had an inset and 11 the UIProcess did not, but the >0 inset breaks low power video playback 12 in fullscreen. So, instead, fix the repaint issue by setting a CALayer 13 fence which makes sure both the UIProcess and WebProcess paint simultaneously 14 after resizing and changing the top content inset. 15 16 This requires a new message from WebPageProxy -> WebPage: setTopContentInsetFenced(). 17 18 * UIProcess/WebPageProxy.cpp: 19 (WebKit::WebPageProxy::setTopContentInset): 20 * UIProcess/mac/WKFullScreenWindowController.h: 21 * UIProcess/mac/WKFullScreenWindowController.mm: 22 (-[WKFullScreenWindowController enterFullScreen:]): 23 (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]): 24 * WebProcess/WebPage/WebPage.cpp: 25 (WebKit::WebPage::setTopContentInsetFenced): 26 * WebProcess/WebPage/WebPage.h: 27 * WebProcess/WebPage/WebPage.messages.in: 28 1 29 2016-07-01 Dan Bernstein <mitz@apple.com> 2 30 -
trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp
r202575 r202763 1316 1316 m_topContentInset = contentInset; 1317 1317 1318 if (isValid()) 1319 m_process->send(Messages::WebPage::SetTopContentInset(contentInset), m_pageID); 1318 if (!isValid()) 1319 return; 1320 #if PLATFORM(COCOA) 1321 MachSendRight fence = m_drawingArea->createFence(); 1322 1323 auto fenceAttachment = IPC::Attachment(fence.leakSendRight(), MACH_MSG_TYPE_MOVE_SEND); 1324 m_process->send(Messages::WebPage::SetTopContentInsetFenced(contentInset, fenceAttachment), m_pageID); 1325 #else 1326 m_process->send(Messages::WebPage::SetTopContentInset(contentInset), m_pageID); 1327 #endif 1320 1328 } 1321 1329 -
trunk/Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.h
r201945 r202763 59 59 double _savedScale; 60 60 RefPtr<WebKit::VoidCallback> _repaintCallback; 61 float _savedTopContentInset; 61 62 } 62 63 -
trunk/Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.mm
r201945 r202763 221 221 NSResponder *webWindowFirstResponder = [[_webView window] firstResponder]; 222 222 [self _manager]->saveScrollPosition(); 223 _savedTopContentInset = _page->topContentInset(); 224 _page->setTopContentInset(0); 223 225 [[self window] setFrame:screenFrame display:NO]; 224 226 … … 241 243 NSView *contentView = [[self window] contentView]; 242 244 [_clipView addSubview:_webView positioned:NSWindowBelow relativeTo:nil]; 243 NSRect contentViewBounds = contentView.bounds; 244 contentViewBounds.size.height += _page->topContentInset(); 245 _webView.frame = contentViewBounds; 245 _webView.frame = NSInsetRect(contentView.bounds, 0, -_page->topContentInset()); 246 246 247 247 makeResponderFirstResponderIfDescendantOfView(self.window, webWindowFirstResponder, _webView); … … 305 305 _page->scalePage(_savedScale, IntPoint()); 306 306 [self _manager]->restoreScrollPosition(); 307 _page->setTopContentInset(_savedTopContentInset); 307 308 [self _manager]->didExitFullScreen(); 308 309 [self _manager]->setAnimatingFullScreen(false); -
trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp
r202728 r202763 2458 2458 } 2459 2459 2460 #if PLATFORM(COCOA) 2461 void WebPage::setTopContentInsetFenced(float contentInset, IPC::Attachment fencePort) 2462 { 2463 m_drawingArea->addFence(MachSendRight::create(fencePort.port())); 2464 2465 setTopContentInset(contentInset); 2466 2467 mach_port_deallocate(mach_task_self(), fencePort.port()); 2468 } 2469 #endif 2470 2460 2471 void WebPage::setTopContentInset(float contentInset) 2461 2472 { -
trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h
r202611 r202763 1054 1054 void setDrawsBackground(bool); 1055 1055 1056 #if PLATFORM(COCOA) 1057 void setTopContentInsetFenced(float, IPC::Attachment); 1058 #endif 1056 1059 void setTopContentInset(float); 1057 1060 -
trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in
r202347 r202763 30 30 SetDrawsBackground(bool drawsBackground) 31 31 32 #if PLATFORM(COCOA) 33 SetTopContentInsetFenced(float contentInset, IPC::Attachment fencePort) 34 #endif 32 35 SetTopContentInset(float contentInset) 33 36
Note: See TracChangeset
for help on using the changeset viewer.