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

Unified Diff: Source/core/page/PrintContext.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/page/PointerLockController.cpp ('k') | Source/core/page/SpatialNavigation.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/page/PrintContext.cpp
diff --git a/Source/core/page/PrintContext.cpp b/Source/core/page/PrintContext.cpp
index a8c284079f400d914a25f1dc2edc710dc8c8cbcd..0803a419c2df806d5206973287e1021cbc2e82d2 100644
--- a/Source/core/page/PrintContext.cpp
+++ b/Source/core/page/PrintContext.cpp
@@ -239,13 +239,13 @@ int PrintContext::pageNumberForElement(Element* element, const FloatSize& pageSi
{
// Make sure the element is not freed during the layout.
RefPtr<Element> elementRef(element);
- element->document()->updateLayout();
+ element->document().updateLayout();
RenderBoxModelObject* box = enclosingBoxModelObject(element->renderer());
if (!box)
return -1;
- Frame* frame = element->document()->frame();
+ Frame* frame = element->document().frame();
FloatRect pageRect(FloatPoint(0, 0), pageSizeInPixels);
PrintContext printContext(frame);
printContext.begin(pageRect.width(), pageRect.height());
@@ -274,12 +274,12 @@ void PrintContext::collectLinkedDestinations(Node* node)
const AtomicString& href = toElement(node)->getAttribute(HTMLNames::hrefAttr);
if (href.isNull())
return;
- KURL url = node->document()->completeURL(href);
+ KURL url = node->document().completeURL(href);
if (!url.isValid())
return;
- if (url.hasFragmentIdentifier() && equalIgnoringFragmentIdentifier(url, node->document()->baseURL())) {
+ if (url.hasFragmentIdentifier() && equalIgnoringFragmentIdentifier(url, node->document().baseURL())) {
String name = url.fragmentIdentifier();
- Element* element = node->document()->findAnchor(name);
+ Element* element = node->document().findAnchor(name);
if (element)
m_linkedDestinations.set(name, element);
}
« no previous file with comments | « Source/core/page/PointerLockController.cpp ('k') | Source/core/page/SpatialNavigation.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698