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

Unified Diff: Source/core/dom/ElementRareData.h

Issue 183763027: Have ElementRareData::ensure*() methods return references (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 years, 10 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 | « Source/core/dom/Element.cpp ('k') | Source/core/dom/ElementRareData.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/ElementRareData.h
diff --git a/Source/core/dom/ElementRareData.h b/Source/core/dom/ElementRareData.h
index c3189379b3e96341787d15a303ca5f1c3a82cb71..40942a5743ee012179e069e56b5d8865e4556403 100644
--- a/Source/core/dom/ElementRareData.h
+++ b/Source/core/dom/ElementRareData.h
@@ -91,7 +91,7 @@ public:
unsigned childIndex() const { return m_childIndex; }
void setChildIndex(unsigned index) { m_childIndex = index; }
- CSSStyleDeclaration* ensureInlineCSSStyleDeclaration(Element* ownerElement);
+ CSSStyleDeclaration& ensureInlineCSSStyleDeclaration(Element* ownerElement);
void clearShadow() { m_shadow = nullptr; }
ElementShadow* shadow() const { return m_shadow.get(); }
@@ -137,11 +137,11 @@ public:
void setHasPendingResources(bool has) { m_hasPendingResources = has; }
bool hasInputMethodContext() const { return m_inputMethodContext; }
- InputMethodContext* ensureInputMethodContext(HTMLElement* element)
+ InputMethodContext& ensureInputMethodContext(HTMLElement* element)
{
if (!m_inputMethodContext)
m_inputMethodContext = InputMethodContext::create(element);
- return m_inputMethodContext.get();
+ return *m_inputMethodContext;
}
bool hasPseudoElements() const;
« no previous file with comments | « Source/core/dom/Element.cpp ('k') | Source/core/dom/ElementRareData.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698