Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(28)

Side by Side Diff: third_party/WebKit/Source/core/html/HTMLStyleElement.cpp

Issue 2644103005: Revert of Use Unthrottled instead of DOMManipulation in HTMLLinkElement/HTMLStyleElement (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLLinkElement.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 // TODO(hiroshige): Use DOMManipulation task runner. Unthrottled 120 TaskRunnerHelper::get(TaskType::DOMManipulation, &document())
121 // is temporarily used for fixing https://crbug.com/649942 only on M-56.
122 TaskRunnerHelper::get(TaskType::Unthrottled, &document())
123 ->postTask( 121 ->postTask(
124 BLINK_FROM_HERE, 122 BLINK_FROM_HERE,
125 WTF::bind( 123 WTF::bind(
126 &HTMLStyleElement::dispatchPendingEvent, wrapPersistent(this), 124 &HTMLStyleElement::dispatchPendingEvent, wrapPersistent(this),
127 WTF::passed(IncrementLoadEventDelayCount::create(document())))); 125 WTF::passed(IncrementLoadEventDelayCount::create(document()))));
128 m_firedLoad = true; 126 m_firedLoad = true;
129 } 127 }
130 128
131 bool HTMLStyleElement::disabled() const { 129 bool HTMLStyleElement::disabled() const {
132 if (!m_sheet) 130 if (!m_sheet)
133 return false; 131 return false;
134 132
135 return m_sheet->disabled(); 133 return m_sheet->disabled();
136 } 134 }
137 135
138 void HTMLStyleElement::setDisabled(bool setDisabled) { 136 void HTMLStyleElement::setDisabled(bool setDisabled) {
139 if (CSSStyleSheet* styleSheet = sheet()) 137 if (CSSStyleSheet* styleSheet = sheet())
140 styleSheet->setDisabled(setDisabled); 138 styleSheet->setDisabled(setDisabled);
141 } 139 }
142 140
143 DEFINE_TRACE(HTMLStyleElement) { 141 DEFINE_TRACE(HTMLStyleElement) {
144 StyleElement::trace(visitor); 142 StyleElement::trace(visitor);
145 HTMLElement::trace(visitor); 143 HTMLElement::trace(visitor);
146 } 144 }
147 145
148 } // namespace blink 146 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLLinkElement.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698