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

Unified Diff: Source/core/css/resolver/StyleAdjuster.cpp

Issue 440733002: Make adjustStyleForTagName take a HTMLElement parameter (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Patch for landing Created 6 years 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/css/resolver/StyleAdjuster.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/resolver/StyleAdjuster.cpp
diff --git a/Source/core/css/resolver/StyleAdjuster.cpp b/Source/core/css/resolver/StyleAdjuster.cpp
index b89efa29db5f8431d53608348e330ccbc5e27b04..9e9e9bbe46fc35bf31d3cac66d8acff38c17ae54 100644
--- a/Source/core/css/resolver/StyleAdjuster.cpp
+++ b/Source/core/css/resolver/StyleAdjuster.cpp
@@ -156,8 +156,8 @@ void StyleAdjuster::adjustRenderStyle(RenderStyle* style, RenderStyle* parentSty
ASSERT(parentStyle);
if (style->display() != NONE) {
- if (e)
- adjustStyleForTagName(style, parentStyle, *e);
+ if (e && e->isHTMLElement())
+ adjustStyleForHTMLElement(style, parentStyle, toHTMLElement(*e));
// Per the spec, position 'static' and 'relative' in the top layer compute to 'absolute'.
if (isInTopLayer(e, style) && (style->position() == StaticPosition || style->position() == RelativePosition))
@@ -323,7 +323,7 @@ void StyleAdjuster::adjustStyleForAlignment(RenderStyle& style, const RenderStyl
}
}
-void StyleAdjuster::adjustStyleForTagName(RenderStyle* style, RenderStyle* parentStyle, Element& element)
+void StyleAdjuster::adjustStyleForHTMLElement(RenderStyle* style, RenderStyle* parentStyle, HTMLElement& element)
{
// <div> and <span> are the most common elements on the web, we skip all the work for them.
if (isHTMLDivElement(element) || isHTMLSpanElement(element))
« no previous file with comments | « Source/core/css/resolver/StyleAdjuster.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698