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

Side by Side Diff: Source/core/dom/Element.cpp

Issue 394353002: Replace tests of ASSERT_ENABLED with ENABLE(ASSERT). (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Peter Kelly (pmk@post.com) 4 * (C) 2001 Peter Kelly (pmk@post.com)
5 * (C) 2001 Dirk Mueller (mueller@kde.org) 5 * (C) 2001 Dirk Mueller (mueller@kde.org)
6 * (C) 2007 David Smith (catfish.man@gmail.com) 6 * (C) 2007 David Smith (catfish.man@gmail.com)
7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc. All rights reserved. 7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc. All rights reserved.
8 * (C) 2007 Eric Seidel (eric@webkit.org) 8 * (C) 2007 Eric Seidel (eric@webkit.org)
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 2624 matching lines...) Expand 10 before | Expand all | Expand 10 after
2635 // <link> implement URLUtils? 2635 // <link> implement URLUtils?
2636 if (isHTMLAnchorElement(*this) || isHTMLAreaElement(*this) || isHTMLLinkElem ent(*this)) 2636 if (isHTMLAnchorElement(*this) || isHTMLAreaElement(*this) || isHTMLLinkElem ent(*this))
2637 return getURLAttribute(hrefAttr); 2637 return getURLAttribute(hrefAttr);
2638 if (isSVGAElement(*this)) 2638 if (isSVGAElement(*this))
2639 return getURLAttribute(XLinkNames::hrefAttr); 2639 return getURLAttribute(XLinkNames::hrefAttr);
2640 return KURL(); 2640 return KURL();
2641 } 2641 }
2642 2642
2643 KURL Element::getURLAttribute(const QualifiedName& name) const 2643 KURL Element::getURLAttribute(const QualifiedName& name) const
2644 { 2644 {
2645 #if ASSERT_ENABLED 2645 #if ENABLE(ASSERT)
2646 if (elementData()) { 2646 if (elementData()) {
2647 if (const Attribute* attribute = attributes().find(name)) 2647 if (const Attribute* attribute = attributes().find(name))
2648 ASSERT(isURLAttribute(*attribute)); 2648 ASSERT(isURLAttribute(*attribute));
2649 } 2649 }
2650 #endif 2650 #endif
2651 return document().completeURL(stripLeadingAndTrailingHTMLSpaces(getAttribute (name))); 2651 return document().completeURL(stripLeadingAndTrailingHTMLSpaces(getAttribute (name)));
2652 } 2652 }
2653 2653
2654 KURL Element::getNonEmptyURLAttribute(const QualifiedName& name) const 2654 KURL Element::getNonEmptyURLAttribute(const QualifiedName& name) const
2655 { 2655 {
2656 #if ASSERT_ENABLED 2656 #if ENABLE(ASSERT)
2657 if (elementData()) { 2657 if (elementData()) {
2658 if (const Attribute* attribute = attributes().find(name)) 2658 if (const Attribute* attribute = attributes().find(name))
2659 ASSERT(isURLAttribute(*attribute)); 2659 ASSERT(isURLAttribute(*attribute));
2660 } 2660 }
2661 #endif 2661 #endif
2662 String value = stripLeadingAndTrailingHTMLSpaces(getAttribute(name)); 2662 String value = stripLeadingAndTrailingHTMLSpaces(getAttribute(name));
2663 if (value.isEmpty()) 2663 if (value.isEmpty())
2664 return KURL(); 2664 return KURL();
2665 return document().completeURL(value); 2665 return document().completeURL(value);
2666 } 2666 }
(...skipping 701 matching lines...) Expand 10 before | Expand all | Expand 10 after
3368 { 3368 {
3369 #if ENABLE(OILPAN) 3369 #if ENABLE(OILPAN)
3370 if (hasRareData()) 3370 if (hasRareData())
3371 visitor->trace(elementRareData()); 3371 visitor->trace(elementRareData());
3372 visitor->trace(m_elementData); 3372 visitor->trace(m_elementData);
3373 #endif 3373 #endif
3374 ContainerNode::trace(visitor); 3374 ContainerNode::trace(visitor);
3375 } 3375 }
3376 3376
3377 } // namespace WebCore 3377 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698