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

Unified Diff: third_party/WebKit/Source/core/dom/Element.cpp

Issue 1876843002: Introduce few const getters for dom classes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/core/dom/Element.h ('k') | third_party/WebKit/Source/core/dom/ElementRareData.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/dom/Element.cpp
diff --git a/third_party/WebKit/Source/core/dom/Element.cpp b/third_party/WebKit/Source/core/dom/Element.cpp
index 4d84f904586ca1e1b7fd7475ac9b7994b915b215..4b9f2ef9431dfb580a9542cf95c5a54ffea52f96 100644
--- a/third_party/WebKit/Source/core/dom/Element.cpp
+++ b/third_party/WebKit/Source/core/dom/Element.cpp
@@ -204,6 +204,11 @@ inline ElementRareData* Element::elementRareData() const
return static_cast<ElementRareData*>(rareData());
}
+ElementRareData* Element::maybeElementRareData() const
+{
+ return hasRareData() ? static_cast<ElementRareData*>(rareData()) : nullptr;
+}
+
inline ElementRareData& Element::ensureElementRareData()
{
return static_cast<ElementRareData&>(ensureRareData());
« no previous file with comments | « third_party/WebKit/Source/core/dom/Element.h ('k') | third_party/WebKit/Source/core/dom/ElementRareData.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698