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

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

Issue 22454003: Support subtitles for native fullscreen video (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 4 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
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 Peter Kelly (pmk@post.com) 4 * (C) 2001 Peter Kelly (pmk@post.com)
5 * (C) 2001 Dirk Mueller (mueller@kde.org) 5 * (C) 2001 Dirk Mueller (mueller@kde.org)
6 * (C) 2007 David Smith (catfish.man@gmail.com) 6 * (C) 2007 David Smith (catfish.man@gmail.com)
7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc. All rights reserved. 7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc. All rights reserved.
8 * (C) 2007 Eric Seidel (eric@webkit.org) 8 * (C) 2007 Eric Seidel (eric@webkit.org)
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 1332 matching lines...) Expand 10 before | Expand all | Expand 10 after
1343 document()->updateFocusAppearanceSoon(false /* don't restore sel ection */); 1343 document()->updateFocusAppearanceSoon(false /* don't restore sel ection */);
1344 data->setNeedsFocusAppearanceUpdateSoonAfterAttach(false); 1344 data->setNeedsFocusAppearanceUpdateSoonAfterAttach(false);
1345 } 1345 }
1346 } 1346 }
1347 1347
1348 // FIXME: It doesn't appear safe to call didRecalculateStyleForElement when 1348 // FIXME: It doesn't appear safe to call didRecalculateStyleForElement when
1349 // not in a Document::recalcStyle. Since we're hopefully going to always 1349 // not in a Document::recalcStyle. Since we're hopefully going to always
1350 // lazyAttach in the future that problem should go away. 1350 // lazyAttach in the future that problem should go away.
1351 if (document()->inStyleRecalc()) 1351 if (document()->inStyleRecalc())
1352 InspectorInstrumentation::didRecalculateStyleForElement(this); 1352 InspectorInstrumentation::didRecalculateStyleForElement(this);
1353
1354 if (FullscreenElementStack::isActiveFullScreenElement(this)) {
1355 if (FrameView* view = document()->view())
1356 view->setCurrentFullscreenRenderer(renderer());
1357 }
1353 } 1358 }
1354 1359
1355 void Element::unregisterNamedFlowContentNode() 1360 void Element::unregisterNamedFlowContentNode()
1356 { 1361 {
1357 if (RuntimeEnabledFeatures::cssRegionsEnabled() && inNamedFlow() && document ()->renderView()) 1362 if (RuntimeEnabledFeatures::cssRegionsEnabled() && inNamedFlow() && document ()->renderView())
1358 document()->renderView()->flowThreadController()->unregisterNamedFlowCon tentNode(this); 1363 document()->renderView()->flowThreadController()->unregisterNamedFlowCon tentNode(this);
1359 } 1364 }
1360 1365
1361 void Element::detach(const AttachContext& context) 1366 void Element::detach(const AttachContext& context)
1362 { 1367 {
1368 if (FullscreenElementStack::isActiveFullScreenElement(this)) {
1369 if (FrameView* view = document()->view())
1370 view->setCurrentFullscreenRenderer(0);
1371 }
1372
1363 WidgetHierarchyUpdatesSuspensionScope suspendWidgetHierarchyUpdates; 1373 WidgetHierarchyUpdatesSuspensionScope suspendWidgetHierarchyUpdates;
1364 unregisterNamedFlowContentNode(); 1374 unregisterNamedFlowContentNode();
1365 cancelFocusAppearanceUpdate(); 1375 cancelFocusAppearanceUpdate();
1366 if (hasRareData()) { 1376 if (hasRareData()) {
1367 ElementRareData* data = elementRareData(); 1377 ElementRareData* data = elementRareData();
1368 data->setPseudoElement(BEFORE, 0); 1378 data->setPseudoElement(BEFORE, 0);
1369 data->setPseudoElement(AFTER, 0); 1379 data->setPseudoElement(AFTER, 0);
1370 data->setPseudoElement(BACKDROP, 0); 1380 data->setPseudoElement(BACKDROP, 0);
1371 data->setIsInCanvasSubtree(false); 1381 data->setIsInCanvasSubtree(false);
1372 data->resetComputedStyle(); 1382 data->resetComputedStyle();
(...skipping 2271 matching lines...) Expand 10 before | Expand all | Expand 10 after
3644 } 3654 }
3645 return 0; 3655 return 0;
3646 } 3656 }
3647 3657
3648 Attribute* UniqueElementData::attributeItem(unsigned index) 3658 Attribute* UniqueElementData::attributeItem(unsigned index)
3649 { 3659 {
3650 ASSERT_WITH_SECURITY_IMPLICATION(index < length()); 3660 ASSERT_WITH_SECURITY_IMPLICATION(index < length());
3651 return &m_attributeVector.at(index); 3661 return &m_attributeVector.at(index);
3652 } 3662 }
3653 3663
3664 void Element::didBecomeFullscreenElement()
3665 {
3666 FrameView* view = document()->view();
3667 if (!view)
3668 return;
3669 view->setCurrentFullscreenRenderer(renderer());
3670 }
3671
3672 void Element::willStopBeingFullscreenElement()
3673 {
3674 FrameView* view = document()->view();
3675 if (!view)
3676 return;
3677 view->setCurrentFullscreenRenderer(0);
3678 }
3679
3654 } // namespace WebCore 3680 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698