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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutObject.cpp

Issue 2151933003: Change WTF::TemporaryChange to be an alias for AutoReset (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: TemporaryChange -> AutoReset Created 4 years, 5 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
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) 2000 Dirk Mueller (mueller@kde.org) 4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) 5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. All rights reserv ed. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. All rights reserv ed.
7 * Copyright (C) 2009 Google Inc. All rights reserved. 7 * Copyright (C) 2009 Google Inc. All rights reserved.
8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
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 3451 matching lines...) Expand 10 before | Expand all | Expand 10 after
3462 m_bitfields.setShouldInvalidateSelection(false); 3462 m_bitfields.setShouldInvalidateSelection(false);
3463 } 3463 }
3464 3464
3465 bool LayoutObject::isAllowedToModifyLayoutTreeStructure(Document& document) 3465 bool LayoutObject::isAllowedToModifyLayoutTreeStructure(Document& document)
3466 { 3466 {
3467 return DeprecatedDisableModifyLayoutTreeStructureAsserts::canModifyLayoutTre eStateInAnyState() 3467 return DeprecatedDisableModifyLayoutTreeStructureAsserts::canModifyLayoutTre eStateInAnyState()
3468 || document.lifecycle().stateAllowsLayoutTreeMutations(); 3468 || document.lifecycle().stateAllowsLayoutTreeMutations();
3469 } 3469 }
3470 3470
3471 DeprecatedDisableModifyLayoutTreeStructureAsserts::DeprecatedDisableModifyLayout TreeStructureAsserts() 3471 DeprecatedDisableModifyLayoutTreeStructureAsserts::DeprecatedDisableModifyLayout TreeStructureAsserts()
3472 : m_disabler(gModifyLayoutTreeStructureAnyState, true) 3472 : m_disabler(&gModifyLayoutTreeStructureAnyState, true)
3473 { 3473 {
3474 } 3474 }
3475 3475
3476 bool DeprecatedDisableModifyLayoutTreeStructureAsserts::canModifyLayoutTreeState InAnyState() 3476 bool DeprecatedDisableModifyLayoutTreeStructureAsserts::canModifyLayoutTreeState InAnyState()
3477 { 3477 {
3478 return gModifyLayoutTreeStructureAnyState; 3478 return gModifyLayoutTreeStructureAnyState;
3479 } 3479 }
3480 3480
3481 DisablePaintInvalidationStateAsserts::DisablePaintInvalidationStateAsserts() 3481 DisablePaintInvalidationStateAsserts::DisablePaintInvalidationStateAsserts()
3482 : m_disabler(gDisablePaintInvalidationStateAsserts, true) 3482 : m_disabler(&gDisablePaintInvalidationStateAsserts, true)
3483 { 3483 {
3484 } 3484 }
3485 3485
3486 namespace { 3486 namespace {
3487 3487
3488 // TODO(trchen): Use std::function<void, LayoutObject&> when available. 3488 // TODO(trchen): Use std::function<void, LayoutObject&> when available.
3489 template <typename LayoutObjectTraversalFunctor> 3489 template <typename LayoutObjectTraversalFunctor>
3490 void traverseNonCompositingDescendants(LayoutObject&, const LayoutObjectTraversa lFunctor&); 3490 void traverseNonCompositingDescendants(LayoutObject&, const LayoutObjectTraversa lFunctor&);
3491 3491
3492 template <typename LayoutObjectTraversalFunctor> 3492 template <typename LayoutObjectTraversalFunctor>
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
3678 const blink::LayoutObject* root = object1; 3678 const blink::LayoutObject* root = object1;
3679 while (root->parent()) 3679 while (root->parent())
3680 root = root->parent(); 3680 root = root->parent();
3681 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); 3681 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0);
3682 } else { 3682 } else {
3683 WTFLogAlways("%s", "Cannot showLayoutTree. Root is (nil)"); 3683 WTFLogAlways("%s", "Cannot showLayoutTree. Root is (nil)");
3684 } 3684 }
3685 } 3685 }
3686 3686
3687 #endif 3687 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698