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

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

Issue 327323002: Start removing the double-negative !ASSERT_DISABLED (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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
« no previous file with comments | « Source/core/dom/DocumentLifecycle.cpp ('k') | Source/core/dom/Node.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 2585 matching lines...) Expand 10 before | Expand all | Expand 10 after
2596 DOMStringMap& Element::dataset() 2596 DOMStringMap& Element::dataset()
2597 { 2597 {
2598 ElementRareData& rareData = ensureElementRareData(); 2598 ElementRareData& rareData = ensureElementRareData();
2599 if (!rareData.dataset()) 2599 if (!rareData.dataset())
2600 rareData.setDataset(DatasetDOMStringMap::create(this)); 2600 rareData.setDataset(DatasetDOMStringMap::create(this));
2601 return *rareData.dataset(); 2601 return *rareData.dataset();
2602 } 2602 }
2603 2603
2604 KURL Element::getURLAttribute(const QualifiedName& name) const 2604 KURL Element::getURLAttribute(const QualifiedName& name) const
2605 { 2605 {
2606 #if !ASSERT_DISABLED 2606 #if ASSERT_ENABLED
2607 if (elementData()) { 2607 if (elementData()) {
2608 if (const Attribute* attribute = findAttributeByName(name)) 2608 if (const Attribute* attribute = findAttributeByName(name))
2609 ASSERT(isURLAttribute(*attribute)); 2609 ASSERT(isURLAttribute(*attribute));
2610 } 2610 }
2611 #endif 2611 #endif
2612 return document().completeURL(stripLeadingAndTrailingHTMLSpaces(getAttribute (name))); 2612 return document().completeURL(stripLeadingAndTrailingHTMLSpaces(getAttribute (name)));
2613 } 2613 }
2614 2614
2615 KURL Element::getNonEmptyURLAttribute(const QualifiedName& name) const 2615 KURL Element::getNonEmptyURLAttribute(const QualifiedName& name) const
2616 { 2616 {
2617 #if !ASSERT_DISABLED 2617 #if ASSERT_ENABLED
2618 if (elementData()) { 2618 if (elementData()) {
2619 if (const Attribute* attribute = findAttributeByName(name)) 2619 if (const Attribute* attribute = findAttributeByName(name))
2620 ASSERT(isURLAttribute(*attribute)); 2620 ASSERT(isURLAttribute(*attribute));
2621 } 2621 }
2622 #endif 2622 #endif
2623 String value = stripLeadingAndTrailingHTMLSpaces(getAttribute(name)); 2623 String value = stripLeadingAndTrailingHTMLSpaces(getAttribute(name));
2624 if (value.isEmpty()) 2624 if (value.isEmpty())
2625 return KURL(); 2625 return KURL();
2626 return document().completeURL(value); 2626 return document().completeURL(value);
2627 } 2627 }
(...skipping 695 matching lines...) Expand 10 before | Expand all | Expand 10 after
3323 3323
3324 void Element::trace(Visitor* visitor) 3324 void Element::trace(Visitor* visitor)
3325 { 3325 {
3326 if (hasRareData()) 3326 if (hasRareData())
3327 visitor->trace(elementRareData()); 3327 visitor->trace(elementRareData());
3328 3328
3329 ContainerNode::trace(visitor); 3329 ContainerNode::trace(visitor);
3330 } 3330 }
3331 3331
3332 } // namespace WebCore 3332 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/dom/DocumentLifecycle.cpp ('k') | Source/core/dom/Node.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698