| 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, 2010 Apple Inc. All rights reserved. | 5 * Copyright (C) 2003, 2010 Apple Inc. All rights reserved. |
| 6 * (C) 2007 Rob Buis (buis@kde.org) | 6 * (C) 2007 Rob Buis (buis@kde.org) |
| 7 * | 7 * |
| 8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 dispatchEvent(Event::create(m_loadedSheet ? EventTypeNames::load | 110 dispatchEvent(Event::create(m_loadedSheet ? EventTypeNames::load |
| 111 : EventTypeNames::error)); | 111 : EventTypeNames::error)); |
| 112 } | 112 } |
| 113 | 113 |
| 114 void HTMLStyleElement::notifyLoadedSheetAndAllCriticalSubresources( | 114 void HTMLStyleElement::notifyLoadedSheetAndAllCriticalSubresources( |
| 115 LoadedSheetErrorStatus errorStatus) { | 115 LoadedSheetErrorStatus errorStatus) { |
| 116 bool isLoadEvent = errorStatus == NoErrorLoadingSubresource; | 116 bool isLoadEvent = errorStatus == NoErrorLoadingSubresource; |
| 117 if (m_firedLoad && isLoadEvent) | 117 if (m_firedLoad && isLoadEvent) |
| 118 return; | 118 return; |
| 119 m_loadedSheet = isLoadEvent; | 119 m_loadedSheet = isLoadEvent; |
| 120 TaskRunnerHelper::get(TaskType::DOMManipulation, &document()) | 120 // TODO(hiroshige): Use DOMManipulation task runner. Unthrottled |
| 121 // is temporarily used for fixing https://crbug.com/649942 only on M-56. |
| 122 TaskRunnerHelper::get(TaskType::Unthrottled, &document()) |
| 121 ->postTask( | 123 ->postTask( |
| 122 BLINK_FROM_HERE, | 124 BLINK_FROM_HERE, |
| 123 WTF::bind( | 125 WTF::bind( |
| 124 &HTMLStyleElement::dispatchPendingEvent, wrapPersistent(this), | 126 &HTMLStyleElement::dispatchPendingEvent, wrapPersistent(this), |
| 125 WTF::passed(IncrementLoadEventDelayCount::create(document())))); | 127 WTF::passed(IncrementLoadEventDelayCount::create(document())))); |
| 126 m_firedLoad = true; | 128 m_firedLoad = true; |
| 127 } | 129 } |
| 128 | 130 |
| 129 bool HTMLStyleElement::disabled() const { | 131 bool HTMLStyleElement::disabled() const { |
| 130 if (!m_sheet) | 132 if (!m_sheet) |
| 131 return false; | 133 return false; |
| 132 | 134 |
| 133 return m_sheet->disabled(); | 135 return m_sheet->disabled(); |
| 134 } | 136 } |
| 135 | 137 |
| 136 void HTMLStyleElement::setDisabled(bool setDisabled) { | 138 void HTMLStyleElement::setDisabled(bool setDisabled) { |
| 137 if (CSSStyleSheet* styleSheet = sheet()) | 139 if (CSSStyleSheet* styleSheet = sheet()) |
| 138 styleSheet->setDisabled(setDisabled); | 140 styleSheet->setDisabled(setDisabled); |
| 139 } | 141 } |
| 140 | 142 |
| 141 DEFINE_TRACE(HTMLStyleElement) { | 143 DEFINE_TRACE(HTMLStyleElement) { |
| 142 StyleElement::trace(visitor); | 144 StyleElement::trace(visitor); |
| 143 HTMLElement::trace(visitor); | 145 HTMLElement::trace(visitor); |
| 144 } | 146 } |
| 145 | 147 |
| 146 } // namespace blink | 148 } // namespace blink |
| OLD | NEW |