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

Unified Diff: Source/web/WebPageSerializer.cpp

Issue 200723002: Use new is*Element() helper functions more in web/ code (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Use same assertion as in operator->() 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/web/WebNode.cpp ('k') | Source/web/WebPageSerializerImpl.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/WebPageSerializer.cpp
diff --git a/Source/web/WebPageSerializer.cpp b/Source/web/WebPageSerializer.cpp
index ac543d6b2c368cefdac827f7c9f1d0be2be9777d..4df430c537fe381963c7aec7df378899ca23688d 100644
--- a/Source/web/WebPageSerializer.cpp
+++ b/Source/web/WebPageSerializer.cpp
@@ -109,9 +109,10 @@ void retrieveResourcesForElement(Element* element,
Vector<KURL>* frameURLs,
Vector<KURL>* resourceURLs)
{
+ ASSERT(element);
// If the node is a frame, we'll process it later in retrieveResourcesForFrame.
- if ((element->hasTagName(HTMLNames::iframeTag) || element->hasTagName(HTMLNames::frameTag)
- || element->hasTagName(HTMLNames::objectTag) || element->hasTagName(HTMLNames::embedTag))
+ if ((isHTMLIFrameElement(*element) || isHTMLFrameElement(*element)
+ || isHTMLObjectElement(*element) || isHTMLEmbedElement(*element))
&& element->isFrameOwnerElement()) {
if (LocalFrame* frame = toHTMLFrameOwnerElement(element)->contentFrame()) {
if (!visitedFrames->contains(frame))
« no previous file with comments | « Source/web/WebNode.cpp ('k') | Source/web/WebPageSerializerImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698