~ubuntu-branches/ubuntu/lucid/webkit/lucid-updates

« back to all changes in this revision

Viewing changes to WebCore/dom/NamedAttrMap.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Gustavo Noronha Silva
  • Date: 2010-01-06 21:25:06 UTC
  • mfrom: (1.2.6 upstream) (4.3.7 sid)
  • Revision ID: james.westby@ubuntu.com-20100106212506-gd0czn4zrwf1j19l
* New upstream release
- adds basic Content-Encoding support, thanks to soup
  (Closes: #529271)
- fixes over-advertising content types as supported by
  the media player (Closes: #559420)
* debian/control:
- updated libsoup build requirement (>= 2.28.2)
* debian/libwebkit-1.0-2.symbols:
- updated with new symbols
* debian/copyright:
- updated information since 1.1.17
* Imported patch from https://bugs.webkit.org/show_bug.cgi?id=30623
- I am shipping this patch because I believe it is correct, it is the
  way to go, it fixes a race, and it needs testing.

Show diffs side-by-side

added added

removed removed

Lines of Context:
130
130
        return 0;
131
131
    }
132
132
 
133
 
    if (a->name() == idAttr)
 
133
    if (attr->isId())
134
134
        m_element->updateId(old ? old->value() : nullAtom, a->value());
135
135
 
136
136
    // ### slightly inefficient - resizes attribute array twice.
155
155
        return 0;
156
156
    }
157
157
 
158
 
    RefPtr<Node> r = a->createAttrIfNeeded(m_element);
 
158
    RefPtr<Attr> r = a->createAttrIfNeeded(m_element);
159
159
 
160
 
    if (name == idAttr)
 
160
    if (r->isId())
161
161
        m_element->updateId(a->value(), nullAtom);
162
162
 
163
163
    removeAttribute(name);
242
242
 
243
243
    // If assigning the map changes the id attribute, we need to call
244
244
    // updateId.
245
 
    Attribute *oldId = getAttributeItem(idAttr);
246
 
    Attribute *newId = other.getAttributeItem(idAttr);
 
245
    Attribute* oldId = getAttributeItem(m_element->idAttributeName());
 
246
    Attribute* newId = other.getAttributeItem(m_element->idAttributeName());
247
247
 
248
248
    if (oldId || newId)
249
249
        m_element->updateId(oldId ? oldId->value() : nullAtom, newId ? newId->value() : nullAtom);