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

Unified Diff: Source/core/html/ColorInputType.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/ClassList.cpp ('k') | Source/core/html/FileInputType.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/ColorInputType.cpp
diff --git a/Source/core/html/ColorInputType.cpp b/Source/core/html/ColorInputType.cpp
index 734ccc6ae4ed3eb0f2d7bb8330974fbbbf25ee76..e30d3dec0284e22ae2ace584cc3d9e60bd699049 100644
--- a/Source/core/html/ColorInputType.cpp
+++ b/Source/core/html/ColorInputType.cpp
@@ -118,10 +118,10 @@ void ColorInputType::createShadowSubtree()
{
ASSERT(element()->shadow());
- Document* document = element()->document();
- RefPtr<HTMLDivElement> wrapperElement = HTMLDivElement::create(document);
+ Document& document = element()->document();
+ RefPtr<HTMLDivElement> wrapperElement = HTMLDivElement::create(&document);
wrapperElement->setPart(AtomicString("-webkit-color-swatch-wrapper", AtomicString::ConstructFromLiteral));
- RefPtr<HTMLDivElement> colorSwatch = HTMLDivElement::create(document);
+ RefPtr<HTMLDivElement> colorSwatch = HTMLDivElement::create(&document);
colorSwatch->setPart(AtomicString("-webkit-color-swatch", AtomicString::ConstructFromLiteral));
wrapperElement->appendChild(colorSwatch.release());
element()->userAgentShadowRoot()->appendChild(wrapperElement.release());
@@ -208,7 +208,7 @@ HTMLElement* ColorInputType::shadowColorSwatch() const
IntRect ColorInputType::elementRectRelativeToRootView() const
{
- return element()->document()->view()->contentsToRootView(element()->pixelSnappedBoundingBox());
+ return element()->document().view()->contentsToRootView(element()->pixelSnappedBoundingBox());
}
Color ColorInputType::currentColor()
« no previous file with comments | « Source/core/html/ClassList.cpp ('k') | Source/core/html/FileInputType.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698