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

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

Issue 201403002: Use new is*Element() helper functions more in core/ code (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 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/fetch/FontResource.cpp ('k') | Source/core/frame/SmartClip.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/frame/FrameView.cpp
diff --git a/Source/core/frame/FrameView.cpp b/Source/core/frame/FrameView.cpp
index bb0492541323368e4641aef3a4acc42f7ba7b61b..3596a61d24ac1b3f2e593cd5175c07169eb68b45 100644
--- a/Source/core/frame/FrameView.cpp
+++ b/Source/core/frame/FrameView.cpp
@@ -275,7 +275,7 @@ void FrameView::init()
// Propagate the marginwidth/height and scrolling modes to the view.
Element* ownerElement = m_frame->ownerElement();
- if (ownerElement && (ownerElement->hasTagName(frameTag) || ownerElement->hasTagName(iframeTag))) {
+ if (ownerElement && (isHTMLFrameElement(*ownerElement) || isHTMLIFrameElement(*ownerElement))) {
HTMLFrameElementBase* frameElt = toHTMLFrameElementBase(ownerElement);
if (frameElt->scrollingMode() == ScrollbarAlwaysOff)
setCanHaveScrollbars(false);
@@ -594,7 +594,7 @@ void FrameView::calculateScrollbarModesForLayoutAndSetViewportRenderer(Scrollbar
if (!isSubtreeLayout()) {
Document* document = m_frame->document();
Node* body = document->body();
- if (body && body->renderer() && body->hasTagName(framesetTag)) {
+ if (isHTMLFrameSetElement(body) && body->renderer()) {
vMode = ScrollbarAlwaysOff;
hMode = ScrollbarAlwaysOff;
} else if (Element* viewportElement = document->viewportDefiningElement()) {
@@ -903,9 +903,9 @@ void FrameView::layout(bool allowSubtree)
Document* document = m_frame->document();
Node* body = document->body();
if (body && body->renderer()) {
- if (body->hasTagName(framesetTag)) {
+ if (isHTMLFrameSetElement(*body)) {
body->renderer()->setChildNeedsLayout();
- } else if (body->hasTagName(bodyTag)) {
+ } else if (isHTMLBodyElement(*body)) {
if (!m_firstLayout && m_size.height() != layoutSize().height() && body->renderer()->enclosingBox()->stretchesToViewport())
body->renderer()->setChildNeedsLayout();
}
@@ -1187,7 +1187,8 @@ void FrameView::addWidgetToUpdate(RenderEmbeddedObject& object)
ASSERT(isInPerformLayout());
// Tell the DOM element that it needs a widget update.
Node* node = object.node();
- if (node->hasTagName(objectTag) || node->hasTagName(embedTag))
+ ASSERT(node);
+ if (isHTMLObjectElement(*node) || isHTMLEmbedElement(*node))
toHTMLPlugInElement(node)->setNeedsWidgetUpdate(true);
m_widgetUpdateSet.add(&object);
« no previous file with comments | « Source/core/fetch/FontResource.cpp ('k') | Source/core/frame/SmartClip.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698