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

Side by Side Diff: third_party/WebKit/Source/core/dom/DocumentLifecycle.cpp

Issue 2528113002: [PAUSED] Add a scope for disallowing style update when calling hasEditableStyle (Closed)
Patch Set: use DISALLOW_COPY_AND_ASSIGN Created 4 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 | « third_party/WebKit/Source/core/dom/DocumentLifecycle.h ('k') | 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) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 DocumentLifecycle& lifecycle) { 74 DocumentLifecycle& lifecycle) {
75 m_savedCount = s_allowThrottlingCount; 75 m_savedCount = s_allowThrottlingCount;
76 s_allowThrottlingCount = 0; 76 s_allowThrottlingCount = 0;
77 } 77 }
78 78
79 DocumentLifecycle::DisallowThrottlingScope::~DisallowThrottlingScope() { 79 DocumentLifecycle::DisallowThrottlingScope::~DisallowThrottlingScope() {
80 s_allowThrottlingCount = m_savedCount; 80 s_allowThrottlingCount = m_savedCount;
81 } 81 }
82 82
83 DocumentLifecycle::DocumentLifecycle() 83 DocumentLifecycle::DocumentLifecycle()
84 : m_state(Uninitialized), m_detachCount(0), m_disallowTransitionCount(0) {} 84 : m_state(Uninitialized),
85 m_detachCount(0),
86 m_disallowTransitionCount(0),
87 m_disallowStyleRecalcCount(0) {}
85 88
86 DocumentLifecycle::~DocumentLifecycle() {} 89 DocumentLifecycle::~DocumentLifecycle() {}
87 90
88 #if DCHECK_IS_ON() 91 #if DCHECK_IS_ON()
89 92
90 bool DocumentLifecycle::canAdvanceTo(LifecycleState nextState) const { 93 bool DocumentLifecycle::canAdvanceTo(LifecycleState nextState) const {
91 if (stateTransitionDisallowed()) 94 if (stateTransitionDisallowed())
92 return false; 95 return false;
93 96
94 // We can stop from anywhere. 97 // We can stop from anywhere.
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 DEBUG_STRING_CASE(Stopping); 348 DEBUG_STRING_CASE(Stopping);
346 DEBUG_STRING_CASE(Stopped); 349 DEBUG_STRING_CASE(Stopped);
347 } 350 }
348 351
349 NOTREACHED(); 352 NOTREACHED();
350 return "Unknown"; 353 return "Unknown";
351 } 354 }
352 #endif 355 #endif
353 356
354 } // namespace blink 357 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/DocumentLifecycle.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698