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

Unified Diff: Source/core/html/canvas/CanvasRenderingContext2D.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/ValidationMessage.cpp ('k') | Source/core/html/canvas/CanvasStyle.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/canvas/CanvasRenderingContext2D.cpp
diff --git a/Source/core/html/canvas/CanvasRenderingContext2D.cpp b/Source/core/html/canvas/CanvasRenderingContext2D.cpp
index f774c4a10f621bb785fcd5303c3ea3b74f64a384..53ca1f26d97cd5f24a177087bd6a1221de412da1 100644
--- a/Source/core/html/canvas/CanvasRenderingContext2D.cpp
+++ b/Source/core/html/canvas/CanvasRenderingContext2D.cpp
@@ -736,7 +736,7 @@ void CanvasRenderingContext2D::setStrokeColor(const String& color)
if (color == state().m_unparsedStrokeColor)
return;
realizeSaves();
- setStrokeStyle(CanvasStyle::createFromString(color, canvas()->document()));
+ setStrokeStyle(CanvasStyle::createFromString(color, &canvas()->document()));
modifiableState().m_unparsedStrokeColor = color;
}
@@ -778,7 +778,7 @@ void CanvasRenderingContext2D::setFillColor(const String& color)
if (color == state().m_unparsedFillColor)
return;
realizeSaves();
- setFillStyle(CanvasStyle::createFromString(color, canvas()->document()));
+ setFillStyle(CanvasStyle::createFromString(color, &canvas()->document()));
modifiableState().m_unparsedFillColor = color;
}
@@ -2306,7 +2306,7 @@ void CanvasRenderingContext2D::inflateStrokeRect(FloatRect& rect) const
const Font& CanvasRenderingContext2D::accessFont()
{
- canvas()->document()->updateStyleIfNeeded();
+ canvas()->document().updateStyleIfNeeded();
if (!state().m_realizedFont)
setFont(state().m_unparsedFont);
@@ -2351,7 +2351,7 @@ void CanvasRenderingContext2D::drawSystemFocusRing(Element* element)
// Note: we need to check document->focusedElement() rather than just calling
// element->focused(), because element->focused() isn't updated until after
// focus events fire.
- if (element->document() && element->document()->focusedElement() == element)
+ if (element->document().focusedElement() == element)
drawFocusRing(m_path);
}
@@ -2388,7 +2388,7 @@ void CanvasRenderingContext2D::updateFocusRingAccessibility(const Path& path, El
// bounding box with the accessible object. Do this even if the element
// isn't focused because assistive technology might try to explore the object's
// location before it gets focus.
- if (AXObjectCache* axObjectCache = element->document()->existingAXObjectCache()) {
+ if (AXObjectCache* axObjectCache = element->document().existingAXObjectCache()) {
if (AccessibilityObject* obj = axObjectCache->getOrCreate(element)) {
// Get the bounding rect and apply transformations.
FloatRect bounds = m_path.boundingRect();
« no previous file with comments | « Source/core/html/ValidationMessage.cpp ('k') | Source/core/html/canvas/CanvasStyle.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698