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 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
5 * Copyright (C) 2003, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv
ed. | 5 * Copyright (C) 2003, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv
ed. |
6 * Copyright (C) 2009 Rob Buis (rwlbuis@gmail.com) | 6 * Copyright (C) 2009 Rob Buis (rwlbuis@gmail.com) |
7 * Copyright (C) 2011 Google Inc. All rights reserved. | 7 * Copyright (C) 2011 Google Inc. All rights reserved. |
8 * | 8 * |
9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 { | 138 { |
139 ASSERT(iconSizes.isEmpty()); | 139 ASSERT(iconSizes.isEmpty()); |
140 if (value.isEmpty()) | 140 if (value.isEmpty()) |
141 return; | 141 return; |
142 if (value.is8Bit()) | 142 if (value.is8Bit()) |
143 parseSizes(value.characters8(), value.length(), iconSizes); | 143 parseSizes(value.characters8(), value.length(), iconSizes); |
144 else | 144 else |
145 parseSizes(value.characters16(), value.length(), iconSizes); | 145 parseSizes(value.characters16(), value.length(), iconSizes); |
146 } | 146 } |
147 | 147 |
148 inline HTMLLinkElement::HTMLLinkElement(Document& document, bool createdByParser
) | 148 inline HTMLLinkElement::HTMLLinkElement(Document& document, bool createdByParser
, bool alreadyStarted) |
149 : HTMLElement(linkTag, document) | 149 : HTMLElement(linkTag, document) |
150 , m_linkLoader(LinkLoader::create(this)) | 150 , m_linkLoader(LinkLoader::create(this)) |
151 , m_sizes(DOMSettableTokenList::create(this)) | 151 , m_sizes(DOMSettableTokenList::create(this)) |
152 , m_relList(RelList::create(this)) | 152 , m_relList(RelList::create(this)) |
153 , m_createdByParser(createdByParser) | 153 , m_createdByParser(createdByParser) |
| 154 , m_alreadyStarted(alreadyStarted) |
154 , m_isInShadowTree(false) | 155 , m_isInShadowTree(false) |
155 { | 156 { |
156 } | 157 } |
157 | 158 |
158 PassRefPtrWillBeRawPtr<HTMLLinkElement> HTMLLinkElement::create(Document& docume
nt, bool createdByParser) | 159 PassRefPtrWillBeRawPtr<HTMLLinkElement> HTMLLinkElement::create(Document& docume
nt, bool createdByParser, bool alreadyStarted) |
159 { | 160 { |
160 return adoptRefWillBeNoop(new HTMLLinkElement(document, createdByParser)); | 161 return adoptRefWillBeNoop(new HTMLLinkElement(document, createdByParser, alr
eadyStarted)); |
161 } | 162 } |
162 | 163 |
163 HTMLLinkElement::~HTMLLinkElement() | 164 HTMLLinkElement::~HTMLLinkElement() |
164 { | 165 { |
165 #if !ENABLE(OILPAN) | 166 #if !ENABLE(OILPAN) |
166 m_sizes->setObserver(nullptr); | 167 m_sizes->setObserver(nullptr); |
167 m_link.clear(); | 168 m_link.clear(); |
168 if (inDocument()) | 169 if (inDocument()) |
169 document().styleEngine().removeStyleSheetCandidateNode(this); | 170 document().styleEngine().removeStyleSheetCandidateNode(this); |
170 linkLoadEventSender().cancelEvent(this); | 171 linkLoadEventSender().cancelEvent(this); |
(...skipping 617 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
788 } | 789 } |
789 | 790 |
790 DEFINE_TRACE(LinkStyle) | 791 DEFINE_TRACE(LinkStyle) |
791 { | 792 { |
792 visitor->trace(m_sheet); | 793 visitor->trace(m_sheet); |
793 LinkResource::trace(visitor); | 794 LinkResource::trace(visitor); |
794 ResourceOwner<StyleSheetResource>::trace(visitor); | 795 ResourceOwner<StyleSheetResource>::trace(visitor); |
795 } | 796 } |
796 | 797 |
797 } // namespace blink | 798 } // namespace blink |
OLD | NEW |