Index: Source/core/rendering/RenderObject.cpp |
diff --git a/Source/core/rendering/RenderObject.cpp b/Source/core/rendering/RenderObject.cpp |
index 77b99b30e0ff38e48b956bd8632a847308beca28..59f97dabbfe9d19fe2f00920fef2ebff90ba30b9 100644 |
--- a/Source/core/rendering/RenderObject.cpp |
+++ b/Source/core/rendering/RenderObject.cpp |
@@ -1171,10 +1171,10 @@ void RenderObject::addPDFURLRect(GraphicsContext* context, const LayoutRect& rec |
const AtomicString& href = toElement(n)->getAttribute(hrefAttr); |
if (href.isNull()) |
return; |
- KURL url = n->document().completeURL(href); |
+ KURL url = n->treeScope().completeURL(href); |
if (!url.isValid()) |
return; |
- if (context->supportsURLFragments() && url.hasFragmentIdentifier() && equalIgnoringFragmentIdentifier(url, n->document().baseURL())) { |
+ if (context->supportsURLFragments() && url.hasFragmentIdentifier() && equalIgnoringFragmentIdentifier(url, n->treeScope().baseURL())) { |
String name = url.fragmentIdentifier(); |
if (document().findAnchor(name)) |
context->setURLFragmentForRect(name, pixelSnappedIntRect(rect)); |