Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(377)

Side by Side Diff: Source/core/dom/FullscreenElementStack.cpp

Issue 24773003: Rename Node::attached() to confusingAndOftenMisusedAttached() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/dom/ElementRareData.h ('k') | Source/core/dom/Node.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
350 } 350 }
351 351
352 void FullscreenElementStack::webkitWillEnterFullScreenForElement(Element* elemen t) 352 void FullscreenElementStack::webkitWillEnterFullScreenForElement(Element* elemen t)
353 { 353 {
354 if (!document()->attached()) 354 if (!document()->confusingAndOftenMisusedAttached())
355 return; 355 return;
356 356
357 ASSERT(element); 357 ASSERT(element);
358 358
359 // Protect against being called after the document has been removed from the page. 359 // Protect against being called after the document has been removed from the page.
360 if (!document()->page()) 360 if (!document()->page())
361 return; 361 return;
362 362
363 ASSERT(document()->page()->settings().fullScreenEnabled()); 363 ASSERT(document()->page()->settings().fullScreenEnabled());
364 364
(...skipping 19 matching lines...) Expand all
384 m_fullScreenElement->setContainsFullScreenElementOnAncestorsCrossingFrameBou ndaries(true); 384 m_fullScreenElement->setContainsFullScreenElementOnAncestorsCrossingFrameBou ndaries(true);
385 385
386 document()->recalcStyle(Force); 386 document()->recalcStyle(Force);
387 } 387 }
388 388
389 void FullscreenElementStack::webkitDidEnterFullScreenForElement(Element*) 389 void FullscreenElementStack::webkitDidEnterFullScreenForElement(Element*)
390 { 390 {
391 if (!m_fullScreenElement) 391 if (!m_fullScreenElement)
392 return; 392 return;
393 393
394 if (!document()->attached()) 394 if (!document()->confusingAndOftenMisusedAttached())
395 return; 395 return;
396 396
397 m_fullScreenElement->didBecomeFullscreenElement(); 397 m_fullScreenElement->didBecomeFullscreenElement();
398 398
399 m_fullScreenChangeDelayTimer.startOneShot(0); 399 m_fullScreenChangeDelayTimer.startOneShot(0);
400 } 400 }
401 401
402 void FullscreenElementStack::webkitWillExitFullScreenForElement(Element*) 402 void FullscreenElementStack::webkitWillExitFullScreenForElement(Element*)
403 { 403 {
404 if (!m_fullScreenElement) 404 if (!m_fullScreenElement)
405 return; 405 return;
406 406
407 if (!document()->attached()) 407 if (!document()->confusingAndOftenMisusedAttached())
408 return; 408 return;
409 409
410 m_fullScreenElement->willStopBeingFullscreenElement(); 410 m_fullScreenElement->willStopBeingFullscreenElement();
411 } 411 }
412 412
413 void FullscreenElementStack::webkitDidExitFullScreenForElement(Element*) 413 void FullscreenElementStack::webkitDidExitFullScreenForElement(Element*)
414 { 414 {
415 if (!m_fullScreenElement) 415 if (!m_fullScreenElement)
416 return; 416 return;
417 417
418 if (!document()->attached()) 418 if (!document()->confusingAndOftenMisusedAttached())
419 return; 419 return;
420 420
421 m_fullScreenElement->setContainsFullScreenElementOnAncestorsCrossingFrameBou ndaries(false); 421 m_fullScreenElement->setContainsFullScreenElementOnAncestorsCrossingFrameBou ndaries(false);
422 422
423 m_areKeysEnabledInFullScreen = false; 423 m_areKeysEnabledInFullScreen = false;
424 424
425 if (m_fullScreenRenderer) 425 if (m_fullScreenRenderer)
426 m_fullScreenRenderer->unwrapRenderer(); 426 m_fullScreenRenderer->unwrapRenderer();
427 427
428 m_fullScreenElement = 0; 428 m_fullScreenElement = 0;
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
554 if (!target) 554 if (!target)
555 target = fullscreen->webkitCurrentFullScreenElement(); 555 target = fullscreen->webkitCurrentFullScreenElement();
556 } 556 }
557 557
558 if (!target) 558 if (!target)
559 target = doc; 559 target = doc;
560 m_fullScreenChangeEventTargetQueue.append(target); 560 m_fullScreenChangeEventTargetQueue.append(target);
561 } 561 }
562 562
563 } // namespace WebCore 563 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/dom/ElementRareData.h ('k') | Source/core/dom/Node.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698