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

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

Issue 2596343002: Use Unthrottled instead of DOMManipulation in HTMLLinkElement/HTMLStyleElement (Closed)
Patch Set: Use Unthrottled 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 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
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