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

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

Issue 2605173002: Call checkCompleted() synchronously in HTMLStyleElement::dispatchPendingEvent() (Closed)
Patch Set: Rebase 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
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 * Copyright (C) 2003, 2010 Apple Inc. ALl rights reserved. 4 * Copyright (C) 2003, 2010 Apple Inc. ALl rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 26 matching lines...) Expand all
37 37
38 public: 38 public:
39 static HTMLStyleElement* create(Document&, bool createdByParser); 39 static HTMLStyleElement* create(Document&, bool createdByParser);
40 ~HTMLStyleElement() override; 40 ~HTMLStyleElement() override;
41 41
42 using StyleElement::sheet; 42 using StyleElement::sheet;
43 43
44 bool disabled() const; 44 bool disabled() const;
45 void setDisabled(bool); 45 void setDisabled(bool);
46 46
47 void dispatchPendingEvent(std::unique_ptr<IncrementLoadEventDelayCount>);
48
49 DECLARE_VIRTUAL_TRACE(); 47 DECLARE_VIRTUAL_TRACE();
50 48
51 private: 49 private:
52 HTMLStyleElement(Document&, bool createdByParser); 50 HTMLStyleElement(Document&, bool createdByParser);
53 51
52 // Always call this asynchronously because this can cause synchronous
53 // Document load event and JavaScript execution.
54 void dispatchPendingEvent(std::unique_ptr<IncrementLoadEventDelayCount>);
55
54 // overload from HTMLElement 56 // overload from HTMLElement
55 void parseAttribute(const AttributeModificationParams&) override; 57 void parseAttribute(const AttributeModificationParams&) override;
56 InsertionNotificationRequest insertedInto(ContainerNode*) override; 58 InsertionNotificationRequest insertedInto(ContainerNode*) override;
57 void didNotifySubtreeInsertionsToDocument() override; 59 void didNotifySubtreeInsertionsToDocument() override;
58 void removedFrom(ContainerNode*) override; 60 void removedFrom(ContainerNode*) override;
59 void childrenChanged(const ChildrenChange&) override; 61 void childrenChanged(const ChildrenChange&) override;
60 62
61 void finishParsingChildren() override; 63 void finishParsingChildren() override;
62 64
63 bool sheetLoaded() override { return StyleElement::sheetLoaded(document()); } 65 bool sheetLoaded() override { return StyleElement::sheetLoaded(document()); }
64 void notifyLoadedSheetAndAllCriticalSubresources( 66 void notifyLoadedSheetAndAllCriticalSubresources(
65 LoadedSheetErrorStatus) override; 67 LoadedSheetErrorStatus) override;
66 void startLoadingDynamicSheet() override { 68 void startLoadingDynamicSheet() override {
67 StyleElement::startLoadingDynamicSheet(document()); 69 StyleElement::startLoadingDynamicSheet(document());
68 } 70 }
69 71
70 const AtomicString& media() const override; 72 const AtomicString& media() const override;
71 const AtomicString& type() const override; 73 const AtomicString& type() const override;
72 74
73 bool m_firedLoad; 75 bool m_firedLoad;
74 bool m_loadedSheet; 76 bool m_loadedSheet;
75 }; 77 };
76 78
77 } // namespace blink 79 } // namespace blink
78 80
79 #endif // HTMLStyleElement_h 81 #endif // HTMLStyleElement_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698