OLD | NEW |
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 2842 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2853 } | 2853 } |
2854 | 2854 |
2855 KURL Element::getURLAttribute(const QualifiedName& name) const | 2855 KURL Element::getURLAttribute(const QualifiedName& name) const |
2856 { | 2856 { |
2857 #if !ASSERT_DISABLED | 2857 #if !ASSERT_DISABLED |
2858 if (elementData()) { | 2858 if (elementData()) { |
2859 if (const Attribute* attribute = getAttributeItem(name)) | 2859 if (const Attribute* attribute = getAttributeItem(name)) |
2860 ASSERT(isURLAttribute(*attribute)); | 2860 ASSERT(isURLAttribute(*attribute)); |
2861 } | 2861 } |
2862 #endif | 2862 #endif |
2863 return document().completeURL(stripLeadingAndTrailingHTMLSpaces(getAttribute
(name))); | 2863 return treeScope().completeURL(stripLeadingAndTrailingHTMLSpaces(getAttribut
e(name))); |
2864 } | 2864 } |
2865 | 2865 |
2866 KURL Element::getNonEmptyURLAttribute(const QualifiedName& name) const | 2866 KURL Element::getNonEmptyURLAttribute(const QualifiedName& name) const |
2867 { | 2867 { |
2868 #if !ASSERT_DISABLED | 2868 #if !ASSERT_DISABLED |
2869 if (elementData()) { | 2869 if (elementData()) { |
2870 if (const Attribute* attribute = getAttributeItem(name)) | 2870 if (const Attribute* attribute = getAttributeItem(name)) |
2871 ASSERT(isURLAttribute(*attribute)); | 2871 ASSERT(isURLAttribute(*attribute)); |
2872 } | 2872 } |
2873 #endif | 2873 #endif |
2874 String value = stripLeadingAndTrailingHTMLSpaces(getAttribute(name)); | 2874 String value = stripLeadingAndTrailingHTMLSpaces(getAttribute(name)); |
2875 if (value.isEmpty()) | 2875 if (value.isEmpty()) |
2876 return KURL(); | 2876 return KURL(); |
2877 return document().completeURL(value); | 2877 return treeScope().completeURL(value); |
2878 } | 2878 } |
2879 | 2879 |
2880 int Element::getIntegralAttribute(const QualifiedName& attributeName) const | 2880 int Element::getIntegralAttribute(const QualifiedName& attributeName) const |
2881 { | 2881 { |
2882 return getAttribute(attributeName).string().toInt(); | 2882 return getAttribute(attributeName).string().toInt(); |
2883 } | 2883 } |
2884 | 2884 |
2885 void Element::setIntegralAttribute(const QualifiedName& attributeName, int value
) | 2885 void Element::setIntegralAttribute(const QualifiedName& attributeName, int value
) |
2886 { | 2886 { |
2887 setAttribute(attributeName, AtomicString::number(value)); | 2887 setAttribute(attributeName, AtomicString::number(value)); |
(...skipping 749 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3637 // Before doing so, we need to resolve issues in HTMLSelectElement::recalcLi
stItems | 3637 // Before doing so, we need to resolve issues in HTMLSelectElement::recalcLi
stItems |
3638 // and RenderMenuList::setText. See also https://bugs.webkit.org/show_bug.cg
i?id=88405 | 3638 // and RenderMenuList::setText. See also https://bugs.webkit.org/show_bug.cg
i?id=88405 |
3639 if (hasTagName(optionTag) || hasTagName(optgroupTag)) | 3639 if (hasTagName(optionTag) || hasTagName(optgroupTag)) |
3640 return false; | 3640 return false; |
3641 if (FullscreenElementStack::isActiveFullScreenElement(this)) | 3641 if (FullscreenElementStack::isActiveFullScreenElement(this)) |
3642 return false; | 3642 return false; |
3643 return true; | 3643 return true; |
3644 } | 3644 } |
3645 | 3645 |
3646 } // namespace WebCore | 3646 } // namespace WebCore |
OLD | NEW |