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

Unified Diff: Source/core/html/shadow/PasswordGeneratorButtonElement.cpp

Issue 23819007: Have Node::document() return a reference instead of a pointer (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on master Created 7 years, 4 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
Index: Source/core/html/shadow/PasswordGeneratorButtonElement.cpp
diff --git a/Source/core/html/shadow/PasswordGeneratorButtonElement.cpp b/Source/core/html/shadow/PasswordGeneratorButtonElement.cpp
index bcc124fa10f9d353432d2842c5d08a69ac0db3e0..dfe3d7213fe42a5bcceb755e57a6802c98676d7a 100644
--- a/Source/core/html/shadow/PasswordGeneratorButtonElement.cpp
+++ b/Source/core/html/shadow/PasswordGeneratorButtonElement.cpp
@@ -89,13 +89,13 @@ void PasswordGeneratorButtonElement::decorate(HTMLInputElement* input)
getDecorationRootAndDecoratedRoot(input, decorationRoot, existingRoot);
ASSERT(decorationRoot);
ASSERT(existingRoot);
- RefPtr<HTMLDivElement> box = HTMLDivElement::create(input->document());
+ RefPtr<HTMLDivElement> box = HTMLDivElement::create(&input->document());
decorationRoot->appendChild(box);
box->setInlineStyleProperty(CSSPropertyDisplay, CSSValueFlex);
box->setInlineStyleProperty(CSSPropertyAlignItems, CSSValueCenter);
ASSERT(existingRoot->childNodeCount() == 1);
toHTMLElement(existingRoot->firstChild())->setInlineStyleProperty(CSSPropertyFlexGrow, 1.0, CSSPrimitiveValue::CSS_NUMBER);
- box->appendChild(HTMLShadowElement::create(HTMLNames::shadowTag, input->document()));
+ box->appendChild(HTMLShadowElement::create(HTMLNames::shadowTag, &input->document()));
setInlineStyleProperty(CSSPropertyDisplay, CSSValueNone);
box->appendChild(this);
}
@@ -171,7 +171,7 @@ void PasswordGeneratorButtonElement::defaultEventHandler(Event* event)
RefPtr<PasswordGeneratorButtonElement> protector(this);
if (event->type() == eventNames().clickEvent) {
- if (Page* page = document()->page())
+ if (Page* page = document().page())
page->chrome().client().openPasswordGenerator(input.get());
event->setDefaultHandled();
}
« no previous file with comments | « Source/core/html/shadow/MediaControlsChromium.cpp ('k') | Source/core/html/shadow/PickerIndicatorElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698