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

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

Issue 816953002: Remove unnecessary sync style recalc for fullscreen. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years 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
« no previous file with comments | « no previous file | no next file » | 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 422 matching lines...) Expand 10 before | Expand all | Expand 10 after
433 if (shouldCreatePlaceholder) { 433 if (shouldCreatePlaceholder) {
434 m_savedPlaceholderFrameRect = toRenderBox(renderer)->frameRect(); 434 m_savedPlaceholderFrameRect = toRenderBox(renderer)->frameRect();
435 m_savedPlaceholderRenderStyle = RenderStyle::clone(renderer->style()); 435 m_savedPlaceholderRenderStyle = RenderStyle::clone(renderer->style());
436 } 436 }
437 437
438 if (m_fullScreenElement != document()->documentElement()) 438 if (m_fullScreenElement != document()->documentElement())
439 RenderFullScreen::wrapRenderer(renderer, renderer ? renderer->parent() : 0, document()); 439 RenderFullScreen::wrapRenderer(renderer, renderer ? renderer->parent() : 0, document());
440 440
441 m_fullScreenElement->setContainsFullScreenElementOnAncestorsCrossingFrameBou ndaries(true); 441 m_fullScreenElement->setContainsFullScreenElementOnAncestorsCrossingFrameBou ndaries(true);
442 442
443 // FIXME: This should not call updateStyleIfNeeded.
444 document()->setNeedsStyleRecalc(SubtreeStyleChange, StyleChangeReasonForTrac ing::create(StyleChangeReason::FullScreen)); 443 document()->setNeedsStyleRecalc(SubtreeStyleChange, StyleChangeReasonForTrac ing::create(StyleChangeReason::FullScreen));
445 document()->updateRenderTreeIfNeeded();
446 444
447 m_fullScreenElement->didBecomeFullscreenElement(); 445 m_fullScreenElement->didBecomeFullscreenElement();
448 446
449 if (document()->frame()) 447 if (document()->frame())
450 document()->frame()->eventHandler().scheduleHoverStateUpdate(); 448 document()->frame()->eventHandler().scheduleHoverStateUpdate();
451 449
452 m_eventQueueTimer.startOneShot(0, FROM_HERE); 450 m_eventQueueTimer.startOneShot(0, FROM_HERE);
453 } 451 }
454 452
455 void Fullscreen::didExitFullScreenForElement(Element*) 453 void Fullscreen::didExitFullScreenForElement(Element*)
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
604 void Fullscreen::trace(Visitor* visitor) 602 void Fullscreen::trace(Visitor* visitor)
605 { 603 {
606 visitor->trace(m_fullScreenElement); 604 visitor->trace(m_fullScreenElement);
607 visitor->trace(m_fullScreenElementStack); 605 visitor->trace(m_fullScreenElementStack);
608 visitor->trace(m_fullScreenRenderer); 606 visitor->trace(m_fullScreenRenderer);
609 visitor->trace(m_eventQueue); 607 visitor->trace(m_eventQueue);
610 DocumentSupplement::trace(visitor); 608 DocumentSupplement::trace(visitor);
611 } 609 }
612 610
613 } // namespace blink 611 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698