Chromium Code Reviews| 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 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 252 } | 252 } |
| 253 | 253 |
| 254 void HTMLLinkElement::enableIfExitTransitionStyle() | 254 void HTMLLinkElement::enableIfExitTransitionStyle() |
| 255 { | 255 { |
| 256 if (m_relAttribute.isTransitionExitingStylesheet()) { | 256 if (m_relAttribute.isTransitionExitingStylesheet()) { |
| 257 if (LinkStyle* link = linkStyle()) | 257 if (LinkStyle* link = linkStyle()) |
| 258 link->setDisabledState(false); | 258 link->setDisabledState(false); |
| 259 } | 259 } |
| 260 } | 260 } |
| 261 | 261 |
| 262 void HTMLLinkElement::disableIfExitTransitionStyle() | |
| 263 { | |
| 264 if (m_relAttribute.isTransitionExitingStylesheet()) { | |
| 265 if (LinkStyle* link = linkStyle()) | |
| 266 link->setDisabledState(true); | |
| 267 } | |
| 268 } | |
| 269 | |
| 262 Node::InsertionNotificationRequest HTMLLinkElement::insertedInto(ContainerNode* insertionPoint) | 270 Node::InsertionNotificationRequest HTMLLinkElement::insertedInto(ContainerNode* insertionPoint) |
| 263 { | 271 { |
| 264 if (insertionPoint->inDocument()) { | 272 if (insertionPoint->inDocument()) { |
| 265 V8DOMActivityLogger* activityLogger = V8DOMActivityLogger::currentActivi tyLoggerIfIsolatedWorld(); | 273 V8DOMActivityLogger* activityLogger = V8DOMActivityLogger::currentActivi tyLoggerIfIsolatedWorld(); |
| 266 if (activityLogger) { | 274 if (activityLogger) { |
| 267 Vector<String> argv; | 275 Vector<String> argv; |
| 268 argv.append("link"); | 276 argv.append("link"); |
| 269 argv.append(fastGetAttribute(relAttr)); | 277 argv.append(fastGetAttribute(relAttr)); |
| 270 argv.append(fastGetAttribute(hrefAttr)); | 278 argv.append(fastGetAttribute(hrefAttr)); |
| 271 activityLogger->logEvent("blinkAddElement", argv.size(), argv.data() ); | 279 activityLogger->logEvent("blinkAddElement", argv.size(), argv.data() ); |
| (...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 652 | 660 |
| 653 if (m_sheet) | 661 if (m_sheet) |
| 654 m_sheet->setDisabled(disabled); | 662 m_sheet->setDisabled(disabled); |
| 655 | 663 |
| 656 // Load the sheet, since it's never been loaded before. | 664 // Load the sheet, since it's never been loaded before. |
| 657 if (!m_sheet && m_disabledState == EnabledViaScript) { | 665 if (!m_sheet && m_disabledState == EnabledViaScript) { |
| 658 if (m_owner->shouldProcessStyle()) | 666 if (m_owner->shouldProcessStyle()) |
| 659 process(); | 667 process(); |
| 660 } else { | 668 } else { |
| 661 // FIXME: We don't have enough knowledge here to know if we should c all addedStyleSheet() or removedStyleSheet(). | 669 // FIXME: We don't have enough knowledge here to know if we should c all addedStyleSheet() or removedStyleSheet(). |
| 662 m_owner->document().styleResolverChanged(); | 670 if (m_owner->relAttribute().isTransitionExitingStylesheet()) |
| 671 m_owner->document().styleResolverChanged(AnalyzedStyleUpdate); | |
|
esprehn
2014/10/15 18:01:26
Why are transition sheets special? This doesn't se
Zhen Wang
2014/10/15 19:50:58
The default is FullStyleUpdate. We need AnalyzedSt
esprehn
2014/10/15 20:19:07
ditto.
Zhen Wang
2014/10/15 23:04:41
ditto
Zhen Wang
2014/12/03 17:54:29
This is fixed by resetIsTransitionDocument now.
| |
| 672 else | |
| 673 m_owner->document().styleResolverChanged(); | |
| 663 } | 674 } |
| 664 } | 675 } |
| 665 } | 676 } |
| 666 | 677 |
| 667 void LinkStyle::process() | 678 void LinkStyle::process() |
| 668 { | 679 { |
| 669 ASSERT(m_owner->shouldProcessStyle()); | 680 ASSERT(m_owner->shouldProcessStyle()); |
| 670 String type = m_owner->typeValue().lower(); | 681 String type = m_owner->typeValue().lower(); |
| 671 LinkRequestBuilder builder(m_owner); | 682 LinkRequestBuilder builder(m_owner); |
| 672 | 683 |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 746 removePendingSheet(); | 757 removePendingSheet(); |
| 747 } | 758 } |
| 748 | 759 |
| 749 void LinkStyle::trace(Visitor* visitor) | 760 void LinkStyle::trace(Visitor* visitor) |
| 750 { | 761 { |
| 751 visitor->trace(m_sheet); | 762 visitor->trace(m_sheet); |
| 752 LinkResource::trace(visitor); | 763 LinkResource::trace(visitor); |
| 753 } | 764 } |
| 754 | 765 |
| 755 } // namespace blink | 766 } // namespace blink |
| OLD | NEW |