Changeset 125371 in webkit


Ignore:
Timestamp:
Aug 12, 2012 4:38:09 AM (12 years ago)
Author:
commit-queue@webkit.org
Message:

webkit fails IETC namespaces/prefix-007.xml
https://bugs.webkit.org/show_bug.cgi?id=86137

Patch by Takashi Sakamoto <tasak@google.com> on 2012-08-12
Reviewed by Eric Seidel.

Source/WebCore:

If a namespace prefix or default namespace is declared more than once
only the last declaration shall be used.

parseAddNamespace doesn't check return value of WTF::HashMap<>::add.
If the return value's isNewEntry is true, the new entry is added with
the specified value. However, if isNewEntry is false, it is required
to update the store value.

No new tests. ietestcenter/css3/namespaces/prefix-007.xml and
ietestcenter/css3/namespaces/prefix-010.xml covers this change.

  • css/StyleSheetContents.cpp:

(WebCore::StyleSheetContents::parserAddNamespace):
Modified to check m_namespaces.add's return value.
If the result says not a new entry, updated the value stored in
m_namespaces by using iterator in the result.

LayoutTests:

  • platform/chromium/TestExpectations:

Enabled the layout tests, ietestcenter/css3/namespaces/prefix-007.xml
and ietestcenter/css3/namespaces/prefix-010.xml.

  • platform/win/ietestcenter/css3/namespaces/prefix-007-expected.txt: Removed.
  • platform/win/ietestcenter/css3/namespaces/prefix-010-expected.txt: Removed.

Removed old expectations.

Location:
trunk
Files:
2 deleted
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r125354 r125371  
     12012-08-12  Takashi Sakamoto  <tasak@google.com>
     2
     3        webkit fails IETC namespaces/prefix-007.xml
     4        https://bugs.webkit.org/show_bug.cgi?id=86137
     5
     6        Reviewed by Eric Seidel.
     7
     8        * platform/chromium/TestExpectations:
     9        Enabled the layout tests, ietestcenter/css3/namespaces/prefix-007.xml
     10        and ietestcenter/css3/namespaces/prefix-010.xml.
     11        * platform/win/ietestcenter/css3/namespaces/prefix-007-expected.txt: Removed.
     12        * platform/win/ietestcenter/css3/namespaces/prefix-010-expected.txt: Removed.
     13        Removed old expectations.
     14
    1152012-08-11  Jon Lee  <jonlee@apple.com>
    216
  • trunk/LayoutTests/platform/chromium/TestExpectations

    r125280 r125371  
    31303130BUGWK85310 : ietestcenter/css3/valuesandunits/units-010.htm = IMAGE
    31313131// IETC namespace failures
    3132 BUGWK86137 : ietestcenter/css3/namespaces/prefix-007.xml = IMAGE
    3133 BUGWK86139 : ietestcenter/css3/namespaces/prefix-010.xml = IMAGE
    31343132BUGWK86142 : ietestcenter/css3/namespaces/syntax-021.xml = IMAGE
    31353133
  • trunk/Source/WebCore/ChangeLog

    r125368 r125371  
     12012-08-12  Takashi Sakamoto  <tasak@google.com>
     2
     3        webkit fails IETC namespaces/prefix-007.xml
     4        https://bugs.webkit.org/show_bug.cgi?id=86137
     5
     6        Reviewed by Eric Seidel.
     7
     8        If a namespace prefix or default namespace is declared more than once
     9        only the last declaration shall be used.
     10
     11        parseAddNamespace doesn't check return value of WTF::HashMap<>::add.
     12        If the return value's isNewEntry is true, the new entry is added with
     13        the specified value. However, if isNewEntry is false, it is required
     14        to update the store value.
     15
     16        No new tests. ietestcenter/css3/namespaces/prefix-007.xml and
     17        ietestcenter/css3/namespaces/prefix-010.xml covers this change.
     18
     19        * css/StyleSheetContents.cpp:
     20        (WebCore::StyleSheetContents::parserAddNamespace):
     21        Modified to check m_namespaces.add's return value.
     22        If the result says not a new entry, updated the value stored in
     23        m_namespaces by using iterator in the result.
     24
    1252012-08-12  Benjamin Poulain  <benjamin@webkit.org>
    226
  • trunk/Source/WebCore/css/StyleSheetContents.cpp

    r125265 r125371  
    251251    if (uri.isNull() || prefix.isNull())
    252252        return;
    253     m_namespaces.add(prefix, uri);
     253    PrefixNamespaceURIMap::AddResult result = m_namespaces.add(prefix, uri);
     254    if (result.isNewEntry)
     255        return;
     256    result.iterator->second = uri;
    254257}
    255258
Note: See TracChangeset for help on using the changeset viewer.