| 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 | 5 * Copyright (C) 2003, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights |
| 6 * reserved. | 6 * reserved. |
| 7 * Copyright (C) 2009 Rob Buis (rwlbuis@gmail.com) | 7 * Copyright (C) 2009 Rob Buis (rwlbuis@gmail.com) |
| 8 * Copyright (C) 2011 Google Inc. All rights reserved. | 8 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 } else if (name == scopeAttr) { | 92 } else if (name == scopeAttr) { |
| 93 m_scope = value; | 93 m_scope = value; |
| 94 process(); | 94 process(); |
| 95 } else if (name == disabledAttr) { | 95 } else if (name == disabledAttr) { |
| 96 UseCounter::count(document(), UseCounter::HTMLLinkElementDisabled); | 96 UseCounter::count(document(), UseCounter::HTMLLinkElementDisabled); |
| 97 if (LinkStyle* link = linkStyle()) | 97 if (LinkStyle* link = linkStyle()) |
| 98 link->setDisabledState(!value.isNull()); | 98 link->setDisabledState(!value.isNull()); |
| 99 } else { | 99 } else { |
| 100 if (name == titleAttr) { | 100 if (name == titleAttr) { |
| 101 if (LinkStyle* link = linkStyle()) | 101 if (LinkStyle* link = linkStyle()) |
| 102 link->setSheetTitle(value, StyleEngine::UpdateActiveSheets); | 102 link->setSheetTitle(value); |
| 103 } | 103 } |
| 104 | 104 |
| 105 HTMLElement::parseAttribute(name, oldValue, value); | 105 HTMLElement::parseAttribute(name, oldValue, value); |
| 106 } | 106 } |
| 107 } | 107 } |
| 108 | 108 |
| 109 bool HTMLLinkElement::shouldLoadLink() { | 109 bool HTMLLinkElement::shouldLoadLink() { |
| 110 return isInDocumentTree() || (isConnected() && m_relAttribute.isStyleSheet()); | 110 return isInDocumentTree() || (isConnected() && m_relAttribute.isStyleSheet()); |
| 111 } | 111 } |
| 112 | 112 |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 210 if (!insertionPoint->isConnected()) | 210 if (!insertionPoint->isConnected()) |
| 211 return; | 211 return; |
| 212 | 212 |
| 213 m_linkLoader->released(); | 213 m_linkLoader->released(); |
| 214 | 214 |
| 215 if (!wasConnected) { | 215 if (!wasConnected) { |
| 216 DCHECK(!linkStyle() || !linkStyle()->hasSheet()); | 216 DCHECK(!linkStyle() || !linkStyle()->hasSheet()); |
| 217 return; | 217 return; |
| 218 } | 218 } |
| 219 document().styleEngine().removeStyleSheetCandidateNode(*this); | 219 document().styleEngine().removeStyleSheetCandidateNode(*this); |
| 220 | |
| 221 StyleSheet* removedSheet = sheet(); | |
| 222 | |
| 223 if (m_link) | 220 if (m_link) |
| 224 m_link->ownerRemoved(); | 221 m_link->ownerRemoved(); |
| 225 | |
| 226 document().styleEngine().setNeedsActiveStyleUpdate(removedSheet, | |
| 227 FullStyleUpdate); | |
| 228 } | 222 } |
| 229 | 223 |
| 230 void HTMLLinkElement::finishParsingChildren() { | 224 void HTMLLinkElement::finishParsingChildren() { |
| 231 m_createdByParser = false; | 225 m_createdByParser = false; |
| 232 HTMLElement::finishParsingChildren(); | 226 HTMLElement::finishParsingChildren(); |
| 233 } | 227 } |
| 234 | 228 |
| 235 bool HTMLLinkElement::styleSheetIsLoading() const { | 229 bool HTMLLinkElement::styleSheetIsLoading() const { |
| 236 return linkStyle() && linkStyle()->styleSheetIsLoading(); | 230 return linkStyle() && linkStyle()->styleSheetIsLoading(); |
| 237 } | 231 } |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 360 LinkLoaderClient::trace(visitor); | 354 LinkLoaderClient::trace(visitor); |
| 361 DOMTokenListObserver::trace(visitor); | 355 DOMTokenListObserver::trace(visitor); |
| 362 } | 356 } |
| 363 | 357 |
| 364 DEFINE_TRACE_WRAPPERS(HTMLLinkElement) { | 358 DEFINE_TRACE_WRAPPERS(HTMLLinkElement) { |
| 365 visitor->traceWrappers(m_relList); | 359 visitor->traceWrappers(m_relList); |
| 366 HTMLElement::traceWrappers(visitor); | 360 HTMLElement::traceWrappers(visitor); |
| 367 } | 361 } |
| 368 | 362 |
| 369 } // namespace blink | 363 } // namespace blink |
| OLD | NEW |