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

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

Issue 1049513003: Add error dispatch events to SVGStyleElement (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixes Created 5 years, 8 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
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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 } 136 }
137 137
138 void HTMLStyleElement::dispatchPendingEvent(StyleEventSender* eventSender) 138 void HTMLStyleElement::dispatchPendingEvent(StyleEventSender* eventSender)
139 { 139 {
140 ASSERT_UNUSED(eventSender, eventSender == &styleLoadEventSender()); 140 ASSERT_UNUSED(eventSender, eventSender == &styleLoadEventSender());
141 dispatchEvent(Event::create(m_loadedSheet ? EventTypeNames::load : EventType Names::error)); 141 dispatchEvent(Event::create(m_loadedSheet ? EventTypeNames::load : EventType Names::error));
142 } 142 }
143 143
144 void HTMLStyleElement::notifyLoadedSheetAndAllCriticalSubresources(LoadedSheetEr rorStatus errorStatus) 144 void HTMLStyleElement::notifyLoadedSheetAndAllCriticalSubresources(LoadedSheetEr rorStatus errorStatus)
145 { 145 {
146 if (m_firedLoad) 146 if (m_firedLoad && errorStatus == NoErrorLoadingSubresource)
147 return; 147 return;
148 m_loadedSheet = (errorStatus == NoErrorLoadingSubresource); 148 m_loadedSheet = (errorStatus == NoErrorLoadingSubresource);
149 styleLoadEventSender().dispatchEventSoon(this); 149 styleLoadEventSender().dispatchEventSoon(this);
150 m_firedLoad = true; 150 m_firedLoad = true;
151 } 151 }
152 152
153 bool HTMLStyleElement::disabled() const 153 bool HTMLStyleElement::disabled() const
154 { 154 {
155 if (!m_sheet) 155 if (!m_sheet)
156 return false; 156 return false;
157 157
158 return m_sheet->disabled(); 158 return m_sheet->disabled();
159 } 159 }
160 160
161 void HTMLStyleElement::setDisabled(bool setDisabled) 161 void HTMLStyleElement::setDisabled(bool setDisabled)
162 { 162 {
163 if (CSSStyleSheet* styleSheet = sheet()) 163 if (CSSStyleSheet* styleSheet = sheet())
164 styleSheet->setDisabled(setDisabled); 164 styleSheet->setDisabled(setDisabled);
165 } 165 }
166 166
167 DEFINE_TRACE(HTMLStyleElement) 167 DEFINE_TRACE(HTMLStyleElement)
168 { 168 {
169 StyleElement::trace(visitor); 169 StyleElement::trace(visitor);
170 HTMLElement::trace(visitor); 170 HTMLElement::trace(visitor);
171 } 171 }
172 172
173 } 173 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698