Commit 119e3dab authored by eseidel's avatar eseidel

2007-01-15 Eric Seidel <eric@webkit.org>

        Reviewed by rwlbuis.

        Make isValid check not malloc 3 SVGStringLists for every element.
        
        No test possible, performance fix only.

        * ksvg2/svg/SVGTests.cpp:
        (WebCore::SVGTests::isValid):


git-svn-id: svn://svn.chromium.org/blink/trunk@18860 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent c431efb8
2007-01-15 Eric Seidel <eric@webkit.org>
Reviewed by rwlbuis.
Make isValid check not malloc 3 SVGStringLists for every element.
No test possible, performance fix only.
* ksvg2/svg/SVGTests.cpp:
(WebCore::SVGTests::isValid):
2007-01-15 Rob Buis <buis@kde.org>
Reviewed by Eric.
......@@ -27,7 +38,7 @@
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::paintChildren):
2007-01-15 Eric Seidel <eric@eseidel.com>
2007-01-15 Eric Seidel <eric@webkit.org>
Reviewed by mjs.
......
......@@ -73,20 +73,21 @@ bool SVGTests::isValid() const
{
ExceptionCode ec = 0;
SVGStringList* list = requiredFeatures();
for (unsigned long i = 0; i < list->numberOfItems(); i++) {
String value = list->getItem(i, ec);
if (m_features) {
for (unsigned long i = 0; i < m_features->numberOfItems(); i++) {
String value = m_features->getItem(i, ec);
if (value.isEmpty() || !DOMImplementation::instance()->hasFeature(value, String()))
return false;
}
}
list = systemLanguage();
for (unsigned long i = 0; i < list->numberOfItems(); i++)
if (list->getItem(i, ec) != defaultLanguage().substring(0, 2))
if (m_systemLanguage) {
for (unsigned long i = 0; i < m_systemLanguage->numberOfItems(); i++)
if (m_systemLanguage->getItem(i, ec) != defaultLanguage().substring(0, 2))
return false;
}
list = requiredExtensions();
if (list->numberOfItems() > 0)
if (m_extensions && m_extensions->numberOfItems() > 0)
return false;
return true;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment