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

Side by Side Diff: third_party/WebKit/Source/core/dom/Document.h

Issue 1866303002: Rename Document::hasPendingStyleRecalc to hasPendingVisualUpdate. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revise description of commit message Created 4 years, 8 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/Document.cpp » ('j') | 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) 2011 Google Inc. All rights reserved. 9 * Copyright (C) 2011 Google Inc. All rights reserved.
10 * 10 *
(...skipping 1074 matching lines...) Expand 10 before | Expand all | Expand 10 after
1085 bool isDocumentFragment() const = delete; // This will catch anyone doing an unnecessary check. 1085 bool isDocumentFragment() const = delete; // This will catch anyone doing an unnecessary check.
1086 bool isDocumentNode() const = delete; // This will catch anyone doing an unn ecessary check. 1086 bool isDocumentNode() const = delete; // This will catch anyone doing an unn ecessary check.
1087 bool isElementNode() const = delete; // This will catch anyone doing an unne cessary check. 1087 bool isElementNode() const = delete; // This will catch anyone doing an unne cessary check.
1088 1088
1089 ScriptedAnimationController& ensureScriptedAnimationController(); 1089 ScriptedAnimationController& ensureScriptedAnimationController();
1090 ScriptedIdleTaskController& ensureScriptedIdleTaskController(); 1090 ScriptedIdleTaskController& ensureScriptedIdleTaskController();
1091 void initSecurityContext(const DocumentInit&); 1091 void initSecurityContext(const DocumentInit&);
1092 SecurityContext& securityContext() final { return *this; } 1092 SecurityContext& securityContext() final { return *this; }
1093 EventQueue* getEventQueue() const final; 1093 EventQueue* getEventQueue() const final;
1094 1094
1095 // FIXME: Rename the StyleRecalc state to LayoutTreeUpdate. 1095 bool hasPendingVisualUpdate() const { return m_lifecycle.state() == Document Lifecycle::VisualUpdatePending; }
1096 bool hasPendingStyleRecalc() const { return m_lifecycle.state() == DocumentL ifecycle::VisualUpdatePending; }
1097 1096
1098 bool shouldScheduleLayoutTreeUpdate() const; 1097 bool shouldScheduleLayoutTreeUpdate() const;
1099 void scheduleLayoutTreeUpdate(); 1098 void scheduleLayoutTreeUpdate();
1100 1099
1101 bool needsFullLayoutTreeUpdate() const; 1100 bool needsFullLayoutTreeUpdate() const;
1102 1101
1103 void inheritHtmlAndBodyElementStyles(StyleRecalcChange); 1102 void inheritHtmlAndBodyElementStyles(StyleRecalcChange);
1104 1103
1105 bool dirtyElementsForLayerUpdate(); 1104 bool dirtyElementsForLayerUpdate();
1106 1105
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
1410 { 1409 {
1411 // The different (legacy) meta tags have different priorities based on the t ype 1410 // The different (legacy) meta tags have different priorities based on the t ype
1412 // regardless of which order they appear in the DOM. The priority is given b y the 1411 // regardless of which order they appear in the DOM. The priority is given b y the
1413 // ViewportDescription::Type enum. 1412 // ViewportDescription::Type enum.
1414 return origin >= m_legacyViewportDescription.type; 1413 return origin >= m_legacyViewportDescription.type;
1415 } 1414 }
1416 1415
1417 inline void Document::scheduleLayoutTreeUpdateIfNeeded() 1416 inline void Document::scheduleLayoutTreeUpdateIfNeeded()
1418 { 1417 {
1419 // Inline early out to avoid the function calls below. 1418 // Inline early out to avoid the function calls below.
1420 if (hasPendingStyleRecalc()) 1419 if (hasPendingVisualUpdate())
1421 return; 1420 return;
1422 if (shouldScheduleLayoutTreeUpdate() && needsLayoutTreeUpdate()) 1421 if (shouldScheduleLayoutTreeUpdate() && needsLayoutTreeUpdate())
1423 scheduleLayoutTreeUpdate(); 1422 scheduleLayoutTreeUpdate();
1424 } 1423 }
1425 1424
1426 DEFINE_TYPE_CASTS(Document, ExecutionContext, context, context->isDocument(), co ntext.isDocument()); 1425 DEFINE_TYPE_CASTS(Document, ExecutionContext, context, context->isDocument(), co ntext.isDocument());
1427 DEFINE_NODE_TYPE_CASTS(Document, isDocumentNode()); 1426 DEFINE_NODE_TYPE_CASTS(Document, isDocumentNode());
1428 1427
1429 #define DEFINE_DOCUMENT_TYPE_CASTS(thisType) \ 1428 #define DEFINE_DOCUMENT_TYPE_CASTS(thisType) \
1430 DEFINE_TYPE_CASTS(thisType, Document, document, document->is##thisType(), do cument.is##thisType()) 1429 DEFINE_TYPE_CASTS(thisType, Document, document, document->is##thisType(), do cument.is##thisType())
(...skipping 13 matching lines...) Expand all
1444 DEFINE_TYPE_CASTS(TreeScope, Document, document, true, true); 1443 DEFINE_TYPE_CASTS(TreeScope, Document, document, true, true);
1445 1444
1446 } // namespace blink 1445 } // namespace blink
1447 1446
1448 #ifndef NDEBUG 1447 #ifndef NDEBUG
1449 // Outside the WebCore namespace for ease of invocation from gdb. 1448 // Outside the WebCore namespace for ease of invocation from gdb.
1450 CORE_EXPORT void showLiveDocumentInstances(); 1449 CORE_EXPORT void showLiveDocumentInstances();
1451 #endif 1450 #endif
1452 1451
1453 #endif // Document_h 1452 #endif // Document_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/Document.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698