| 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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 #include "sky/engine/platform/EventDispatchForbiddenScope.h" | 80 #include "sky/engine/platform/EventDispatchForbiddenScope.h" |
| 81 #include "sky/engine/tonic/dart_state.h" | 81 #include "sky/engine/tonic/dart_state.h" |
| 82 #include "sky/engine/wtf/BitVector.h" | 82 #include "sky/engine/wtf/BitVector.h" |
| 83 #include "sky/engine/wtf/HashFunctions.h" | 83 #include "sky/engine/wtf/HashFunctions.h" |
| 84 #include "sky/engine/wtf/text/CString.h" | 84 #include "sky/engine/wtf/text/CString.h" |
| 85 #include "sky/engine/wtf/text/StringBuilder.h" | 85 #include "sky/engine/wtf/text/StringBuilder.h" |
| 86 #include "sky/engine/wtf/text/TextPosition.h" | 86 #include "sky/engine/wtf/text/TextPosition.h" |
| 87 | 87 |
| 88 namespace blink { | 88 namespace blink { |
| 89 | 89 |
| 90 PassRefPtr<Element> Element::create(Document& document, const AtomicString& tagN
ame) | |
| 91 { | |
| 92 DCHECK(DartState::Current()) << "This function should be used only by the bi
ndings"; | |
| 93 RefPtr<Element> element = create(QualifiedName(tagName), &document); | |
| 94 // TODO(abarth): We should remove these states because elements are never | |
| 95 // waiting for upgrades. | |
| 96 element->setCustomElementState(Element::WaitingForUpgrade); | |
| 97 element->setCustomElementState(Element::Upgraded); | |
| 98 return element.release(); | |
| 99 } | |
| 100 | |
| 101 PassRefPtr<Element> Element::create(const QualifiedName& tagName, Document* docu
ment) | 90 PassRefPtr<Element> Element::create(const QualifiedName& tagName, Document* docu
ment) |
| 102 { | 91 { |
| 103 return adoptRef(new Element(tagName, document, CreateElement)); | 92 return adoptRef(new Element(tagName, document, CreateElement)); |
| 104 } | 93 } |
| 105 | 94 |
| 106 Element::Element(const QualifiedName& tagName, Document* document, ConstructionT
ype type) | 95 Element::Element(const QualifiedName& tagName, Document* document, ConstructionT
ype type) |
| 107 : ContainerNode(document, type) | 96 : ContainerNode(document, type) |
| 108 , m_tagName(tagName) | 97 , m_tagName(tagName) |
| 109 { | 98 { |
| 110 } | 99 } |
| (...skipping 1456 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1567 return false; | 1556 return false; |
| 1568 if (treeScope().scopedStyleResolver().hasSelectorForId(idValue)) | 1557 if (treeScope().scopedStyleResolver().hasSelectorForId(idValue)) |
| 1569 return true; | 1558 return true; |
| 1570 // Host rules could also have effects. | 1559 // Host rules could also have effects. |
| 1571 if (ShadowRoot* shadowRoot = this->shadowRoot()) | 1560 if (ShadowRoot* shadowRoot = this->shadowRoot()) |
| 1572 return shadowRoot->scopedStyleResolver().hasSelectorForId(idValue); | 1561 return shadowRoot->scopedStyleResolver().hasSelectorForId(idValue); |
| 1573 return false; | 1562 return false; |
| 1574 } | 1563 } |
| 1575 | 1564 |
| 1576 } // namespace blink | 1565 } // namespace blink |
| OLD | NEW |