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

Unified Diff: Source/core/page/FrameView.cpp

Issue 19098002: Introduce isHTMLHtmlElement and toHTMLHtmlElement (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 7 years, 5 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/parser/HTMLTreeBuilder.cpp ('k') | Source/core/page/TouchDisambiguation.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/page/FrameView.cpp
diff --git a/Source/core/page/FrameView.cpp b/Source/core/page/FrameView.cpp
index 78d15edec0626caa101195df5f1f58164bd71f9c..87eb49aa554d87f2efdd5814e55fe8bf391fc41b 100644
--- a/Source/core/page/FrameView.cpp
+++ b/Source/core/page/FrameView.cpp
@@ -37,6 +37,7 @@
#include "core/dom/OverflowEvent.h"
#include "core/editing/FrameSelection.h"
#include "core/html/HTMLFrameElement.h"
+#include "core/html/HTMLHtmlElement.h"
#include "core/html/HTMLPlugInImageElement.h"
#include "core/inspector/InspectorInstrumentation.h"
#include "core/loader/FrameLoader.h"
@@ -615,7 +616,7 @@ void FrameView::applyPaginationToViewport()
Node* body = document->body();
if (body && body->renderer()) {
if (body->hasTagName(bodyTag))
- documentOrBodyRenderer = documentRenderer->style()->overflowX() == OVISIBLE && documentElement->hasTagName(htmlTag) ? body->renderer() : documentRenderer;
+ documentOrBodyRenderer = documentRenderer->style()->overflowX() == OVISIBLE && isHTMLHtmlElement(documentElement) ? body->renderer() : documentRenderer;
}
Pagination pagination;
@@ -669,7 +670,7 @@ void FrameView::calculateScrollbarModesForLayout(ScrollbarMode& hMode, Scrollbar
} else if (body->hasTagName(bodyTag)) {
// It's sufficient to just check the X overflow,
// since it's illegal to have visible in only one direction.
- RenderObject* o = rootRenderer->style()->overflowX() == OVISIBLE && document->documentElement()->hasTagName(htmlTag) ? body->renderer() : rootRenderer;
+ RenderObject* o = rootRenderer->style()->overflowX() == OVISIBLE && isHTMLHtmlElement(document->documentElement()) ? body->renderer() : rootRenderer;
applyOverflowToViewport(o, hMode, vMode);
}
} else if (rootRenderer)
« no previous file with comments | « Source/core/html/parser/HTMLTreeBuilder.cpp ('k') | Source/core/page/TouchDisambiguation.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698