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

Unified Diff: Source/core/html/FileInputType.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
« no previous file with comments | « Source/core/html/ColorInputType.cpp ('k') | Source/core/html/FormAssociatedElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/FileInputType.cpp
diff --git a/Source/core/html/FileInputType.cpp b/Source/core/html/FileInputType.cpp
index d1e533e544bc18cda9ceab49863b74f3349b86b4..43ab9bf2a57579f9dfc76ebc740274e07cccbe2e 100644
--- a/Source/core/html/FileInputType.cpp
+++ b/Source/core/html/FileInputType.cpp
@@ -153,7 +153,7 @@ void FileInputType::handleDOMActivateEvent(Event* event)
#if ENABLE(MEDIA_CAPTURE)
settings.useMediaCapture = input->capture();
#endif
- chrome->runOpenPanel(input->document()->frame(), newFileChooser(settings));
+ chrome->runOpenPanel(input->document().frame(), newFileChooser(settings));
}
event->setDefaultHandled();
}
@@ -256,7 +256,7 @@ bool FileInputType::isFileUpload() const
void FileInputType::createShadowSubtree()
{
ASSERT(element()->shadow());
- RefPtr<HTMLInputElement> button = HTMLInputElement::create(inputTag, element()->document(), 0, false);
+ RefPtr<HTMLInputElement> button = HTMLInputElement::create(inputTag, &element()->document(), 0, false);
button->setType(InputTypeNames::button());
button->setAttribute(valueAttr, element()->multiple() ? fileButtonChooseMultipleFilesLabel() : fileButtonChooseFileLabel());
button->setPart(AtomicString("-webkit-file-upload-button", AtomicString::ConstructFromLiteral));
« no previous file with comments | « Source/core/html/ColorInputType.cpp ('k') | Source/core/html/FormAssociatedElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698