| 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 Apple Inc. All rights
reserved. | 7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 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 677 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 688 if (isEventHandlerAttribute(attributeName)) { | 688 if (isEventHandlerAttribute(attributeName)) { |
| 689 m_attributeMap->m_attributes.remove(i); | 689 m_attributeMap->m_attributes.remove(i); |
| 690 continue; | 690 continue; |
| 691 } | 691 } |
| 692 | 692 |
| 693 if (isAttributeToRemove(attributeName, m_attributeMap->m_attribu
tes[i]->value())) | 693 if (isAttributeToRemove(attributeName, m_attributeMap->m_attribu
tes[i]->value())) |
| 694 m_attributeMap->m_attributes[i]->setValue(nullAtom); | 694 m_attributeMap->m_attributes[i]->setValue(nullAtom); |
| 695 i++; | 695 i++; |
| 696 } | 696 } |
| 697 } | 697 } |
| 698 unsigned len = m_attributeMap->length(); | 698 // Store the set of attributes that changed on the stack in case |
| 699 for (unsigned i = 0; i < len; i++) | 699 // attributeChanged mutates m_attributeMap. |
| 700 attributeChanged(m_attributeMap->m_attributes[i].get()); | 700 Vector<RefPtr<Attribute> > attributes; |
| 701 m_attributeMap->copyAttributesToVector(attributes); |
| 702 for (Vector<RefPtr<Attribute> >::iterator iter = attributes.begin(); ite
r != attributes.end(); ++iter) |
| 703 attributeChanged(iter->get()); |
| 701 // FIXME: What about attributes that were in the old map that are not in
the new map? | 704 // FIXME: What about attributes that were in the old map that are not in
the new map? |
| 702 } | 705 } |
| 703 } | 706 } |
| 704 | 707 |
| 705 bool Element::hasAttributes() const | 708 bool Element::hasAttributes() const |
| 706 { | 709 { |
| 707 if (!isStyleAttributeValid()) | 710 if (!isStyleAttributeValid()) |
| 708 updateStyleAttribute(); | 711 updateStyleAttribute(); |
| 709 | 712 |
| 710 #if ENABLE(SVG) | 713 #if ENABLE(SVG) |
| (...skipping 905 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1616 #endif | 1619 #endif |
| 1617 | 1620 |
| 1618 #if ENABLE(FULLSCREEN_API) | 1621 #if ENABLE(FULLSCREEN_API) |
| 1619 void Element::webkitRequestFullScreen(unsigned short flags) | 1622 void Element::webkitRequestFullScreen(unsigned short flags) |
| 1620 { | 1623 { |
| 1621 document()->webkitRequestFullScreenForElement(this, flags); | 1624 document()->webkitRequestFullScreenForElement(this, flags); |
| 1622 } | 1625 } |
| 1623 #endif | 1626 #endif |
| 1624 | 1627 |
| 1625 } // namespace WebCore | 1628 } // namespace WebCore |
| OLD | NEW |