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

Unified Diff: Source/core/dom/FullscreenElementStack.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/dom/FullscreenElementStack.h ('k') | Source/core/dom/LiveNodeList.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/FullscreenElementStack.cpp
diff --git a/Source/core/dom/FullscreenElementStack.cpp b/Source/core/dom/FullscreenElementStack.cpp
index 43ee0a7bcbfbd8c33ff1acac986bf5ec75edae72..5609f4d3aadb3719d80b1a2b79979d2a712b0fa4 100644
--- a/Source/core/dom/FullscreenElementStack.cpp
+++ b/Source/core/dom/FullscreenElementStack.cpp
@@ -52,7 +52,7 @@ static bool isAttributeOnAllOwners(const WebCore::QualifiedName& attribute, cons
do {
if (!(owner->hasAttribute(attribute) || owner->hasAttribute(prefixedAttribute)))
return false;
- } while ((owner = owner->document()->ownerElement()));
+ } while ((owner = owner->document().ownerElement()));
return true;
}
@@ -134,7 +134,7 @@ void FullscreenElementStack::documentWasDisposed()
bool FullscreenElementStack::fullScreenIsAllowedForElement(Element* element) const
{
ASSERT(element);
- return isAttributeOnAllOwners(allowfullscreenAttr, webkitallowfullscreenAttr, element->document()->ownerElement());
+ return isAttributeOnAllOwners(allowfullscreenAttr, webkitallowfullscreenAttr, element->document().ownerElement());
}
void FullscreenElementStack::requestFullScreenForElement(Element* element, unsigned short flags, FullScreenCheckType checkType)
@@ -199,7 +199,7 @@ void FullscreenElementStack::requestFullScreenForElement(Element* element, unsig
do {
docs.prepend(currentDoc);
- currentDoc = currentDoc->ownerElement() ? currentDoc->ownerElement()->document() : 0;
+ currentDoc = currentDoc->ownerElement() ? &currentDoc->ownerElement()->document() : 0;
} while (currentDoc);
// 4. For each document in docs, run these substeps:
@@ -304,7 +304,7 @@ void FullscreenElementStack::webkitExitFullscreen()
// If doc's fullscreen element stack is non-empty and the element now at the top is either
// not in a document or its node document is not doc, repeat this substep.
newTop = fullscreenElementFrom(currentDoc);
- if (newTop && (!newTop->inDocument() || newTop->document() != currentDoc))
+ if (newTop && (!newTop->inDocument() || &newTop->document() != currentDoc))
continue;
// 2. Queue a task to fire an event named fullscreenchange with its bubbles attribute set to true
@@ -314,7 +314,7 @@ void FullscreenElementStack::webkitExitFullscreen()
// 3. If doc's fullscreen element stack is empty and doc's browsing context has a browsing context
// container, set doc to that browsing context container's node document.
if (!newTop && currentDoc->ownerElement()) {
- currentDoc = currentDoc->ownerElement()->document();
+ currentDoc = &currentDoc->ownerElement()->document();
continue;
}
« no previous file with comments | « Source/core/dom/FullscreenElementStack.h ('k') | Source/core/dom/LiveNodeList.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698