| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 4 * (C) 2001 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
| 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) | 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) |
| 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All r
ights reserved. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All r
ights reserved. |
| 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) | 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) |
| 8 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) | 8 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) |
| 9 * Copyright (C) 2013 Google Inc. All rights reserved. | 9 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 10 * | 10 * |
| (...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 233 addDocumentToFullScreenChangeEventQueue(currentDoc); | 233 addDocumentToFullScreenChangeEventQueue(currentDoc); |
| 234 continue; | 234 continue; |
| 235 } | 235 } |
| 236 | 236 |
| 237 // 4. Otherwise, do nothing for this document. It stays the same. | 237 // 4. Otherwise, do nothing for this document. It stays the same. |
| 238 } while (++current != docs.end()); | 238 } while (++current != docs.end()); |
| 239 | 239 |
| 240 // 5. Return, and run the remaining steps asynchronously. | 240 // 5. Return, and run the remaining steps asynchronously. |
| 241 // 6. Optionally, perform some animation. | 241 // 6. Optionally, perform some animation. |
| 242 m_areKeysEnabledInFullScreen = flags & Element::ALLOW_KEYBOARD_INPUT; | 242 m_areKeysEnabledInFullScreen = flags & Element::ALLOW_KEYBOARD_INPUT; |
| 243 document()->page()->chrome().client()->enterFullScreenForElement(element
); | 243 document()->page()->chrome().client().enterFullScreenForElement(element)
; |
| 244 | 244 |
| 245 // 7. Optionally, display a message indicating how the user can exit dis
playing the context object fullscreen. | 245 // 7. Optionally, display a message indicating how the user can exit dis
playing the context object fullscreen. |
| 246 return; | 246 return; |
| 247 } while (0); | 247 } while (0); |
| 248 | 248 |
| 249 m_fullScreenErrorEventTargetQueue.append(element ? element : document()->doc
umentElement()); | 249 m_fullScreenErrorEventTargetQueue.append(element ? element : document()->doc
umentElement()); |
| 250 m_fullScreenChangeDelayTimer.startOneShot(0); | 250 m_fullScreenChangeDelayTimer.startOneShot(0); |
| 251 } | 251 } |
| 252 | 252 |
| 253 void FullscreenElementStack::webkitCancelFullScreen() | 253 void FullscreenElementStack::webkitCancelFullScreen() |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 324 | 324 |
| 325 // 6. Return, and run the remaining steps asynchronously. | 325 // 6. Return, and run the remaining steps asynchronously. |
| 326 // 7. Optionally, perform some animation. | 326 // 7. Optionally, perform some animation. |
| 327 | 327 |
| 328 if (!document()->page()) | 328 if (!document()->page()) |
| 329 return; | 329 return; |
| 330 | 330 |
| 331 // Only exit out of full screen window mode if there are no remaining elemen
ts in the | 331 // Only exit out of full screen window mode if there are no remaining elemen
ts in the |
| 332 // full screen stack. | 332 // full screen stack. |
| 333 if (!newTop) { | 333 if (!newTop) { |
| 334 document()->page()->chrome().client()->exitFullScreenForElement(m_fullSc
reenElement.get()); | 334 document()->page()->chrome().client().exitFullScreenForElement(m_fullScr
eenElement.get()); |
| 335 return; | 335 return; |
| 336 } | 336 } |
| 337 | 337 |
| 338 // Otherwise, notify the chrome of the new full screen element. | 338 // Otherwise, notify the chrome of the new full screen element. |
| 339 document()->page()->chrome().client()->enterFullScreenForElement(newTop); | 339 document()->page()->chrome().client().enterFullScreenForElement(newTop); |
| 340 } | 340 } |
| 341 | 341 |
| 342 bool FullscreenElementStack::webkitFullscreenEnabled(Document* document) | 342 bool FullscreenElementStack::webkitFullscreenEnabled(Document* document) |
| 343 { | 343 { |
| 344 // 4. The fullscreenEnabled attribute must return true if the context object
and all ancestor | 344 // 4. The fullscreenEnabled attribute must return true if the context object
and all ancestor |
| 345 // browsing context's documents have their fullscreen enabled flag set, or f
alse otherwise. | 345 // browsing context's documents have their fullscreen enabled flag set, or f
alse otherwise. |
| 346 | 346 |
| 347 // Top-level browsing contexts are implied to have their allowFullScreen att
ribute set. | 347 // Top-level browsing contexts are implied to have their allowFullScreen att
ribute set. |
| 348 return isAttributeOnAllOwners(allowfullscreenAttr, webkitallowfullscreenAttr
, document->ownerElement()); | 348 return isAttributeOnAllOwners(allowfullscreenAttr, webkitallowfullscreenAttr
, document->ownerElement()); |
| 349 | 349 |
| (...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 559 if (!target) | 559 if (!target) |
| 560 target = fullscreen->webkitCurrentFullScreenElement(); | 560 target = fullscreen->webkitCurrentFullScreenElement(); |
| 561 } | 561 } |
| 562 | 562 |
| 563 if (!target) | 563 if (!target) |
| 564 target = doc; | 564 target = doc; |
| 565 m_fullScreenChangeEventTargetQueue.append(target); | 565 m_fullScreenChangeEventTargetQueue.append(target); |
| 566 } | 566 } |
| 567 | 567 |
| 568 } // namespace WebCore | 568 } // namespace WebCore |
| OLD | NEW |