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

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: 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 3450 matching lines...) Expand 10 before | Expand all | Expand 10 after
3461 m_bitfields.setShouldInvalidateSelection(false); 3461 m_bitfields.setShouldInvalidateSelection(false);
3462 } 3462 }
3463 3463
3464 bool LayoutObject::isAllowedToModifyLayoutTreeStructure(Document& document) 3464 bool LayoutObject::isAllowedToModifyLayoutTreeStructure(Document& document)
3465 { 3465 {
3466 return DeprecatedDisableModifyLayoutTreeStructureAsserts::canModifyLayoutTre eStateInAnyState() 3466 return DeprecatedDisableModifyLayoutTreeStructureAsserts::canModifyLayoutTre eStateInAnyState()
3467 || document.lifecycle().stateAllowsLayoutTreeMutations(); 3467 || document.lifecycle().stateAllowsLayoutTreeMutations();
3468 } 3468 }
3469 3469
3470 DeprecatedDisableModifyLayoutTreeStructureAsserts::DeprecatedDisableModifyLayout TreeStructureAsserts() 3470 DeprecatedDisableModifyLayoutTreeStructureAsserts::DeprecatedDisableModifyLayout TreeStructureAsserts()
3471 : m_disabler(gModifyLayoutTreeStructureAnyState, true) 3471 : m_disabler(&gModifyLayoutTreeStructureAnyState, true)
3472 { 3472 {
3473 } 3473 }
3474 3474
3475 bool DeprecatedDisableModifyLayoutTreeStructureAsserts::canModifyLayoutTreeState InAnyState() 3475 bool DeprecatedDisableModifyLayoutTreeStructureAsserts::canModifyLayoutTreeState InAnyState()
3476 { 3476 {
3477 return gModifyLayoutTreeStructureAnyState; 3477 return gModifyLayoutTreeStructureAnyState;
3478 } 3478 }
3479 3479
3480 DisablePaintInvalidationStateAsserts::DisablePaintInvalidationStateAsserts() 3480 DisablePaintInvalidationStateAsserts::DisablePaintInvalidationStateAsserts()
3481 : m_disabler(gDisablePaintInvalidationStateAsserts, true) 3481 : m_disabler(&gDisablePaintInvalidationStateAsserts, true)
3482 { 3482 {
3483 } 3483 }
3484 3484
3485 namespace { 3485 namespace {
3486 3486
3487 // TODO(trchen): Use std::function<void, LayoutObject&> when available. 3487 // TODO(trchen): Use std::function<void, LayoutObject&> when available.
3488 template <typename LayoutObjectTraversalFunctor> 3488 template <typename LayoutObjectTraversalFunctor>
3489 void traverseNonCompositingDescendants(LayoutObject&, const LayoutObjectTraversa lFunctor&); 3489 void traverseNonCompositingDescendants(LayoutObject&, const LayoutObjectTraversa lFunctor&);
3490 3490
3491 template <typename LayoutObjectTraversalFunctor> 3491 template <typename LayoutObjectTraversalFunctor>
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
3677 const blink::LayoutObject* root = object1; 3677 const blink::LayoutObject* root = object1;
3678 while (root->parent()) 3678 while (root->parent())
3679 root = root->parent(); 3679 root = root->parent();
3680 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); 3680 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0);
3681 } else { 3681 } else {
3682 WTFLogAlways("%s", "Cannot showLayoutTree. Root is (nil)"); 3682 WTFLogAlways("%s", "Cannot showLayoutTree. Root is (nil)");
3683 } 3683 }
3684 } 3684 }
3685 3685
3686 #endif 3686 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698