Changeset 119321 in webkit
- Timestamp:
- Jun 2, 2012 7:52:55 AM (12 years ago)
- Location:
- trunk/Source/WebKit/blackberry
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/blackberry/Api/WebPage.cpp
r119239 r119321 358 358 , m_cursorEventMode(ProcessedCursorEvents) 359 359 , m_touchEventMode(ProcessedTouchEvents) 360 #endif 361 #if ENABLE(FULLSCREEN_API) 362 , m_xScrollOffsetPriorGoingFullScreen(-1) 360 363 #endif 361 364 , m_currentCursor(Platform::CursorNone) … … 6084 6087 enterFullscreenForNode(element); 6085 6088 } else { 6089 // When an element goes fullscreen, it gets cloned and added to a higher index 6090 // wrapper/container node, created out of the DOM tree. This wrapper is fixed 6091 // position, but since our fixed position logic respects only the 'y' coordinate, 6092 // we temporarily scroll the WebPage to x:0 so that the wrapper gets properly 6093 // positioned. The original scroll position is restored once element leaves fullscreen. 6094 WebCore::IntPoint scrollPosition = m_mainFrame->view()->scrollPosition(); 6095 m_xScrollOffsetPriorGoingFullScreen = scrollPosition.x(); 6096 m_mainFrame->view()->setScrollPosition(WebCore::IntPoint(0, scrollPosition.y())); 6097 6086 6098 // No fullscreen video widget has been made available by the Browser 6087 6099 // chrome, or this is not a video element. The webkitRequestFullScreen … … 6104 6116 exitFullscreenForNode(element); 6105 6117 } else { 6118 // When leaving fullscreen mode, we need to restore the 'x' scroll position 6119 // prior going full screen. 6120 WebCore::IntPoint scrollPosition = m_mainFrame->view()->scrollPosition(); 6121 m_mainFrame->view()->setScrollPosition( 6122 WebCore::IntPoint(m_xScrollOffsetPriorGoingFullScreen, scrollPosition.y())); 6123 m_xScrollOffsetPriorGoingFullScreen = -1; 6124 6106 6125 // This is where we would restore the browser's chrome 6107 6126 // if hidden above. -
trunk/Source/WebKit/blackberry/Api/WebPage_p.h
r119239 r119321 491 491 #endif 492 492 493 #if ENABLE(FULLSCREEN_API) 494 int m_xScrollOffsetPriorGoingFullScreen; 495 #endif 496 493 497 Platform::BlackBerryCursor m_currentCursor; 494 498 -
trunk/Source/WebKit/blackberry/ChangeLog
r119320 r119321 1 2012-06-02 Antonio Gomes <agomes@rim.com> 2 3 [BlackBerry] browser video player fullscreen mode (portrait) - out of screen/focus - cannot navigate or use the buttons on the screen (PART II) 4 https://bugs.webkit.org/show_bug.cgi?id=88019 5 6 Reviewed by George Staikos. 7 8 When an element goes fullscreen, its wrapper/container obeys all 9 BlackBerry specific fixed position customizations: we fixed 10 against Y, but not X. Then, in order to have the wrapper element 11 properly positioned when entering fullscreen mode, we 12 temporarily scroll x to 0. 13 14 The original x scroll position is restored when we leave 15 fullscreen. 16 17 * Api/WebPage.cpp: 18 (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate): 19 (BlackBerry::WebKit::WebPagePrivate::enterFullScreenForElement): 20 (BlackBerry::WebKit::WebPagePrivate::exitFullScreenForElement): 21 * Api/WebPage_p.h: 22 (WebPagePrivate): 23 1 24 2012-06-02 Antonio Gomes <agomes@rim.com> 2 25
Note: See TracChangeset
for help on using the changeset viewer.