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

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: enabling layout tests Created 7 years, 3 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 1335 matching lines...) Expand 10 before | Expand all | Expand 10 after
1346 if (hasRareData()) { 1346 if (hasRareData()) {
1347 ElementRareData* data = elementRareData(); 1347 ElementRareData* data = elementRareData();
1348 if (data->needsFocusAppearanceUpdateSoonAfterAttach()) { 1348 if (data->needsFocusAppearanceUpdateSoonAfterAttach()) {
1349 if (isFocusable() && document().focusedElement() == this) 1349 if (isFocusable() && document().focusedElement() == this)
1350 document().updateFocusAppearanceSoon(false /* don't restore sele ction */); 1350 document().updateFocusAppearanceSoon(false /* don't restore sele ction */);
1351 data->setNeedsFocusAppearanceUpdateSoonAfterAttach(false); 1351 data->setNeedsFocusAppearanceUpdateSoonAfterAttach(false);
1352 } 1352 }
1353 } 1353 }
1354 1354
1355 InspectorInstrumentation::didRecalculateStyleForElement(this); 1355 InspectorInstrumentation::didRecalculateStyleForElement(this);
1356
1357 if (FullscreenElementStack::isActiveFullScreenElement(this)) {
1358 if (FrameView* view = document().view())
esprehn 2013/09/13 02:46:07 All the null checks for view() look wrong in here.
trchen 2013/09/13 05:14:58 Okay I'll change it to ASSERT.
1359 view->setCurrentFullscreenRenderer(renderer());
1360 }
1356 } 1361 }
1357 1362
1358 void Element::unregisterNamedFlowContentNode() 1363 void Element::unregisterNamedFlowContentNode()
1359 { 1364 {
1360 if (RuntimeEnabledFeatures::cssRegionsEnabled() && inNamedFlow() && document ().renderView()) 1365 if (RuntimeEnabledFeatures::cssRegionsEnabled() && inNamedFlow() && document ().renderView())
1361 document().renderView()->flowThreadController()->unregisterNamedFlowCont entNode(this); 1366 document().renderView()->flowThreadController()->unregisterNamedFlowCont entNode(this);
1362 } 1367 }
1363 1368
1364 void Element::detach(const AttachContext& context) 1369 void Element::detach(const AttachContext& context)
1365 { 1370 {
1371 if (FullscreenElementStack::isActiveFullScreenElement(this)) {
1372 if (FrameView* view = document().view())
1373 view->setCurrentFullscreenRenderer(0);
1374 }
1375
1366 WidgetHierarchyUpdatesSuspensionScope suspendWidgetHierarchyUpdates; 1376 WidgetHierarchyUpdatesSuspensionScope suspendWidgetHierarchyUpdates;
1367 unregisterNamedFlowContentNode(); 1377 unregisterNamedFlowContentNode();
1368 cancelFocusAppearanceUpdate(); 1378 cancelFocusAppearanceUpdate();
1369 if (hasRareData()) { 1379 if (hasRareData()) {
1370 ElementRareData* data = elementRareData(); 1380 ElementRareData* data = elementRareData();
1371 data->setPseudoElement(BEFORE, 0); 1381 data->setPseudoElement(BEFORE, 0);
1372 data->setPseudoElement(AFTER, 0); 1382 data->setPseudoElement(AFTER, 0);
1373 data->setPseudoElement(BACKDROP, 0); 1383 data->setPseudoElement(BACKDROP, 0);
1374 data->clearComputedStyle(); 1384 data->clearComputedStyle();
1375 data->resetDynamicRestyleObservations(); 1385 data->resetDynamicRestyleObservations();
(...skipping 2256 matching lines...) Expand 10 before | Expand all | Expand 10 after
3632 } 3642 }
3633 return 0; 3643 return 0;
3634 } 3644 }
3635 3645
3636 Attribute* UniqueElementData::attributeItem(unsigned index) 3646 Attribute* UniqueElementData::attributeItem(unsigned index)
3637 { 3647 {
3638 ASSERT_WITH_SECURITY_IMPLICATION(index < length()); 3648 ASSERT_WITH_SECURITY_IMPLICATION(index < length());
3639 return &m_attributeVector.at(index); 3649 return &m_attributeVector.at(index);
3640 } 3650 }
3641 3651
3652 void Element::didBecomeFullscreenElement()
3653 {
3654 FrameView* view = document().view();
3655 if (!view)
esprehn 2013/09/13 02:46:07 It should be impossible to get here if there's no
trchen 2013/09/13 05:14:58 Will change to ASSERT too.
3656 return;
3657 view->setCurrentFullscreenRenderer(renderer());
3658 }
3659
3660 void Element::willStopBeingFullscreenElement()
3661 {
3662 FrameView* view = document().view();
3663 if (!view)
3664 return;
3665 view->setCurrentFullscreenRenderer(0);
3666 }
3667
3642 } // namespace WebCore 3668 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698