OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2005, 2008 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2004, 2005, 2008 Nikolas Zimmermann <zimmermann@kde.org> |
3 * Copyright (C) 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org> |
4 * | 4 * |
5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
9 * | 9 * |
10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 | 47 |
48 bool SVGTests::isValid() const | 48 bool SVGTests::isValid() const |
49 { | 49 { |
50 // No need to check requiredFeatures since hasFeature always returns true. | 50 // No need to check requiredFeatures since hasFeature always returns true. |
51 | 51 |
52 if (m_systemLanguage->isSpecified()) { | 52 if (m_systemLanguage->isSpecified()) { |
53 bool matchFound = false; | 53 bool matchFound = false; |
54 | 54 |
55 const Vector<String>& systemLanguage = m_systemLanguage->value()->values
(); | 55 const Vector<String>& systemLanguage = m_systemLanguage->value()->values
(); |
56 for (const auto& value : systemLanguage) { | 56 for (const auto& value : systemLanguage) { |
57 if (value == defaultLanguage().string().substring(0, 2)) { | 57 if (value == defaultLanguage().getString().substring(0, 2)) { |
58 matchFound = true; | 58 matchFound = true; |
59 break; | 59 break; |
60 } | 60 } |
61 } | 61 } |
62 | 62 |
63 if (!matchFound) | 63 if (!matchFound) |
64 return false; | 64 return false; |
65 } | 65 } |
66 | 66 |
67 if (!m_requiredExtensions->value()->values().isEmpty()) | 67 if (!m_requiredExtensions->value()->values().isEmpty()) |
68 return false; | 68 return false; |
69 | 69 |
70 return true; | 70 return true; |
71 } | 71 } |
72 | 72 |
73 bool SVGTests::isKnownAttribute(const QualifiedName& attrName) | 73 bool SVGTests::isKnownAttribute(const QualifiedName& attrName) |
74 { | 74 { |
75 return attrName == SVGNames::requiredFeaturesAttr | 75 return attrName == SVGNames::requiredFeaturesAttr |
76 || attrName == SVGNames::requiredExtensionsAttr | 76 || attrName == SVGNames::requiredExtensionsAttr |
77 || attrName == SVGNames::systemLanguageAttr; | 77 || attrName == SVGNames::systemLanguageAttr; |
78 } | 78 } |
79 | 79 |
80 } // namespace blink | 80 } // namespace blink |
OLD | NEW |