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

Unified Diff: Source/core/html/HTMLDialogElement.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/HTMLDetailsElement.cpp ('k') | Source/core/html/HTMLElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLDialogElement.cpp
diff --git a/Source/core/html/HTMLDialogElement.cpp b/Source/core/html/HTMLDialogElement.cpp
index 7fd2454bae93c618aab00b219e910f688db5dc0d..fd25e3976b75b5e8df9a56071bcc6e84bb080bca 100644
--- a/Source/core/html/HTMLDialogElement.cpp
+++ b/Source/core/html/HTMLDialogElement.cpp
@@ -69,7 +69,7 @@ void HTMLDialogElement::close(const String& returnValue, ExceptionState& es)
void HTMLDialogElement::closeDialog(const String& returnValue)
{
setBooleanAttribute(openAttr, false);
- document()->removeFromTopLayer(this);
+ document().removeFromTopLayer(this);
m_topIsValid = false;
if (!returnValue.isNull())
@@ -93,7 +93,7 @@ PassRefPtr<RenderStyle> HTMLDialogElement::customStyleForRenderer()
void HTMLDialogElement::reposition()
{
// Layout because we need to know our ancestors' positions and our own height.
- document()->updateLayoutIgnorePendingStylesheets();
+ document().updateLayoutIgnorePendingStylesheets();
RenderBox* box = renderBox();
if (!box || !needsCenteredPositioning(box->style()))
@@ -101,7 +101,7 @@ void HTMLDialogElement::reposition()
// Set up dialog's position to be safe-centered in the viewport.
// FIXME: Figure out what to do in vertical writing mode.
- FrameView* frameView = document()->view();
+ FrameView* frameView = document().view();
int scrollTop = frameView->scrollOffset().height();
int visibleHeight = frameView->visibleContentRect(ScrollableArea::IncludeScrollbars).height();
m_top = scrollTop;
@@ -126,7 +126,7 @@ void HTMLDialogElement::showModal(ExceptionState& es)
es.throwDOMException(InvalidStateError);
return;
}
- document()->addToTopLayer(this);
+ document().addToTopLayer(this);
setBooleanAttribute(openAttr, true);
reposition();
}
« no previous file with comments | « Source/core/html/HTMLDetailsElement.cpp ('k') | Source/core/html/HTMLElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698