summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLStyleElement.cpp16
-rw-r--r--chromium/third_party/WebKit/Source/core/html/HTMLStyleElement.h1
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGStyleElement.cpp16
-rw-r--r--chromium/third_party/WebKit/Source/core/svg/SVGStyleElement.h1
4 files changed, 16 insertions, 18 deletions
diff --git a/chromium/third_party/WebKit/Source/core/html/HTMLStyleElement.cpp b/chromium/third_party/WebKit/Source/core/html/HTMLStyleElement.cpp
index c6ef4ece6f6..39b314a4c3d 100644
--- a/chromium/third_party/WebKit/Source/core/html/HTMLStyleElement.cpp
+++ b/chromium/third_party/WebKit/Source/core/html/HTMLStyleElement.cpp
@@ -77,7 +77,14 @@ void HTMLStyleElement::FinishParsingChildren() {
Node::InsertionNotificationRequest HTMLStyleElement::InsertedInto(
ContainerNode* insertion_point) {
HTMLElement::InsertedInto(insertion_point);
- return kInsertionShouldCallDidNotifySubtreeInsertions;
+ if (isConnected()) {
+ if (StyleElement::ProcessStyleSheet(GetDocument(), *this) ==
+ StyleElement::kProcessingFatalError) {
+ NotifyLoadedSheetAndAllCriticalSubresources(
+ kErrorOccurredLoadingSubresource);
+ }
+ }
+ return kInsertionDone;
}
void HTMLStyleElement::RemovedFrom(ContainerNode* insertion_point) {
@@ -85,13 +92,6 @@ void HTMLStyleElement::RemovedFrom(ContainerNode* insertion_point) {
StyleElement::RemovedFrom(*this, insertion_point);
}
-void HTMLStyleElement::DidNotifySubtreeInsertionsToDocument() {
- if (StyleElement::ProcessStyleSheet(GetDocument(), *this) ==
- StyleElement::kProcessingFatalError)
- NotifyLoadedSheetAndAllCriticalSubresources(
- kErrorOccurredLoadingSubresource);
-}
-
void HTMLStyleElement::ChildrenChanged(const ChildrenChange& change) {
HTMLElement::ChildrenChanged(change);
if (StyleElement::ChildrenChanged(*this) ==
diff --git a/chromium/third_party/WebKit/Source/core/html/HTMLStyleElement.h b/chromium/third_party/WebKit/Source/core/html/HTMLStyleElement.h
index cea34b8db74..b420f03a15d 100644
--- a/chromium/third_party/WebKit/Source/core/html/HTMLStyleElement.h
+++ b/chromium/third_party/WebKit/Source/core/html/HTMLStyleElement.h
@@ -56,7 +56,6 @@ class CORE_EXPORT HTMLStyleElement final : public HTMLElement,
// overload from HTMLElement
void ParseAttribute(const AttributeModificationParams&) override;
InsertionNotificationRequest InsertedInto(ContainerNode*) override;
- void DidNotifySubtreeInsertionsToDocument() override;
void RemovedFrom(ContainerNode*) override;
void ChildrenChanged(const ChildrenChange&) override;
diff --git a/chromium/third_party/WebKit/Source/core/svg/SVGStyleElement.cpp b/chromium/third_party/WebKit/Source/core/svg/SVGStyleElement.cpp
index e3838ce5059..fef6d115e0f 100644
--- a/chromium/third_party/WebKit/Source/core/svg/SVGStyleElement.cpp
+++ b/chromium/third_party/WebKit/Source/core/svg/SVGStyleElement.cpp
@@ -105,14 +105,14 @@ void SVGStyleElement::FinishParsingChildren() {
Node::InsertionNotificationRequest SVGStyleElement::InsertedInto(
ContainerNode* insertion_point) {
SVGElement::InsertedInto(insertion_point);
- return kInsertionShouldCallDidNotifySubtreeInsertions;
-}
-
-void SVGStyleElement::DidNotifySubtreeInsertionsToDocument() {
- if (StyleElement::ProcessStyleSheet(GetDocument(), *this) ==
- StyleElement::kProcessingFatalError)
- NotifyLoadedSheetAndAllCriticalSubresources(
- kErrorOccurredLoadingSubresource);
+ if (isConnected()) {
+ if (StyleElement::ProcessStyleSheet(GetDocument(), *this) ==
+ StyleElement::kProcessingFatalError) {
+ NotifyLoadedSheetAndAllCriticalSubresources(
+ kErrorOccurredLoadingSubresource);
+ }
+ }
+ return kInsertionDone;
}
void SVGStyleElement::RemovedFrom(ContainerNode* insertion_point) {
diff --git a/chromium/third_party/WebKit/Source/core/svg/SVGStyleElement.h b/chromium/third_party/WebKit/Source/core/svg/SVGStyleElement.h
index 9a090b95f93..305fbdbd2e8 100644
--- a/chromium/third_party/WebKit/Source/core/svg/SVGStyleElement.h
+++ b/chromium/third_party/WebKit/Source/core/svg/SVGStyleElement.h
@@ -58,7 +58,6 @@ class SVGStyleElement final : public SVGElement, public StyleElement {
void ParseAttribute(const AttributeModificationParams&) override;
InsertionNotificationRequest InsertedInto(ContainerNode*) override;
- void DidNotifySubtreeInsertionsToDocument() override;
void RemovedFrom(ContainerNode*) override;
void ChildrenChanged(const ChildrenChange&) override;