| 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, 2012, 2013 Apple Inc.
All rights reserved. | 7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 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 974 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 985 { | 985 { |
| 986 if (!elementData()) | 986 if (!elementData()) |
| 987 return Vector<RefPtr<Attr>>(); | 987 return Vector<RefPtr<Attr>>(); |
| 988 synchronizeAllAttributes(); | 988 synchronizeAllAttributes(); |
| 989 Vector<RefPtr<Attr>> attributes; | 989 Vector<RefPtr<Attr>> attributes; |
| 990 for (const Attribute& attribute : elementData()->attributes()) | 990 for (const Attribute& attribute : elementData()->attributes()) |
| 991 attributes.append(Attr::create(attribute.name(), attribute.value())); | 991 attributes.append(Attr::create(attribute.name(), attribute.value())); |
| 992 return attributes; | 992 return attributes; |
| 993 } | 993 } |
| 994 | 994 |
| 995 void Element::setAttributes(const Vector<RefPtr<Attr>>& attrs, ExceptionState& e
s) |
| 996 { |
| 997 for (const auto& attr : attrs) { |
| 998 setAttribute(attr->name(), attr->value(), es); |
| 999 if (es.had_exception()) |
| 1000 return; |
| 1001 } |
| 1002 } |
| 1003 |
| 995 void Element::focus(bool restorePreviousSelection, FocusType type) | 1004 void Element::focus(bool restorePreviousSelection, FocusType type) |
| 996 { | 1005 { |
| 997 if (!inDocument()) | 1006 if (!inDocument()) |
| 998 return; | 1007 return; |
| 999 | 1008 |
| 1000 if (document().focusedElement() == this) | 1009 if (document().focusedElement() == this) |
| 1001 return; | 1010 return; |
| 1002 | 1011 |
| 1003 if (!document().isActive()) | 1012 if (!document().isActive()) |
| 1004 return; | 1013 return; |
| (...skipping 551 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1556 return false; | 1565 return false; |
| 1557 if (treeScope().scopedStyleResolver().hasSelectorForId(idValue)) | 1566 if (treeScope().scopedStyleResolver().hasSelectorForId(idValue)) |
| 1558 return true; | 1567 return true; |
| 1559 // Host rules could also have effects. | 1568 // Host rules could also have effects. |
| 1560 if (ShadowRoot* shadowRoot = this->shadowRoot()) | 1569 if (ShadowRoot* shadowRoot = this->shadowRoot()) |
| 1561 return shadowRoot->scopedStyleResolver().hasSelectorForId(idValue); | 1570 return shadowRoot->scopedStyleResolver().hasSelectorForId(idValue); |
| 1562 return false; | 1571 return false; |
| 1563 } | 1572 } |
| 1564 | 1573 |
| 1565 } // namespace blink | 1574 } // namespace blink |
| OLD | NEW |