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

Unified Diff: Source/core/rendering/RenderBox.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/page/TouchDisambiguation.cpp ('k') | Source/core/rendering/RenderObject.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderBox.cpp
diff --git a/Source/core/rendering/RenderBox.cpp b/Source/core/rendering/RenderBox.cpp
index 3414934a20bfaf3edebc079894d2a98642b53af6..12153fe566e27d82512c247230417c7c1c459337 100644
--- a/Source/core/rendering/RenderBox.cpp
+++ b/Source/core/rendering/RenderBox.cpp
@@ -34,6 +34,7 @@
#include "core/editing/htmlediting.h"
#include "core/html/HTMLElement.h"
#include "core/html/HTMLFrameOwnerElement.h"
+#include "core/html/HTMLHtmlElement.h"
#include "core/page/Frame.h"
#include "core/page/FrameView.h"
#include "core/page/Page.h"
@@ -210,7 +211,7 @@ void RenderBox::styleWillChange(StyleDifference diff, const RenderStyle* newStyl
// The background of the root element or the body element could propagate up to
// the canvas. Just dirty the entire canvas when our style changes substantially.
if (diff >= StyleDifferenceRepaint && node() &&
- (node()->hasTagName(htmlTag) || node()->hasTagName(bodyTag))) {
+ (isHTMLHtmlElement(node()) || node()->hasTagName(bodyTag))) {
view()->repaint();
if (oldStyle->hasEntirelyFixedBackground() != newStyle->hasEntirelyFixedBackground())
@@ -348,12 +349,12 @@ void RenderBox::updateFromStyle()
// (1) The root element is <html>.
// (2) We are the primary <body> (can be checked by looking at document.body).
// (3) The root element has visible overflow.
- if (document()->documentElement()->hasTagName(htmlTag) &&
- document()->body() == node() &&
- document()->documentElement()->renderer()->style()->overflowX() == OVISIBLE)
+ if (isHTMLHtmlElement(document()->documentElement())
+ && document()->body() == node()
+ && document()->documentElement()->renderer()->style()->overflowX() == OVISIBLE)
boxHasOverflowClip = false;
}
-
+
// Check for overflow clip.
// It's sufficient to just check one direction, since it's illegal to have visible on only one overflow value.
if (boxHasOverflowClip) {
« no previous file with comments | « Source/core/page/TouchDisambiguation.cpp ('k') | Source/core/rendering/RenderObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698