Commit 6550c238 authored by Alexandru Michis's avatar Alexandru Michis
Browse files

Backed out changeset 998af7ced46f (bug 1711437) for causing Bug 1719963. a=backout

parent 76babf22
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -12876,7 +12876,8 @@ already_AddRefed<Document> Document::CreateStaticClone(
    RefPtr<StyleSheet> sheet = SheetAt(i);
    if (sheet) {
      if (sheet->IsApplicable()) {
        RefPtr<StyleSheet> clonedSheet = sheet->Clone(nullptr, clonedDoc);
        RefPtr<StyleSheet> clonedSheet =
            sheet->Clone(nullptr, nullptr, clonedDoc, nullptr);
        NS_WARNING_ASSERTION(clonedSheet, "Cloning a stylesheet didn't work!");
        if (clonedSheet) {
          clonedDoc->AddStyleSheet(clonedSheet);
@@ -12890,7 +12891,8 @@ already_AddRefed<Document> Document::CreateStaticClone(
    auto& sheets = mAdditionalSheets[additionalSheetType(t)];
    for (StyleSheet* sheet : sheets) {
      if (sheet->IsApplicable()) {
        RefPtr<StyleSheet> clonedSheet = sheet->Clone(nullptr, clonedDoc);
        RefPtr<StyleSheet> clonedSheet =
            sheet->Clone(nullptr, nullptr, clonedDoc, nullptr);
        NS_WARNING_ASSERTION(clonedSheet, "Cloning a stylesheet didn't work!");
        if (clonedSheet) {
          clonedDoc->AddAdditionalStyleSheet(additionalSheetType(t),
+2 −1
Original line number Diff line number Diff line
@@ -104,7 +104,8 @@ void ShadowRoot::CloneInternalDataFrom(ShadowRoot* aOther) {
  for (size_t i = 0; i < sheetCount; ++i) {
    StyleSheet* sheet = aOther->SheetAt(i);
    if (sheet->IsApplicable()) {
      RefPtr<StyleSheet> clonedSheet = sheet->Clone(nullptr, this);
      RefPtr<StyleSheet> clonedSheet =
          sheet->Clone(nullptr, nullptr, this, nullptr);
      if (clonedSheet) {
        AppendStyleSheet(*clonedSheet.get());
      }
+1 −1
Original line number Diff line number Diff line
@@ -17,5 +17,5 @@ interface CSSImportRule : CSSRule {
  [SameObject, PutForwards=mediaText] readonly attribute MediaList? media;
  // Per spec, the .styleSheet is never null, but in our implementation it can
  // be.  See <https://bugzilla.mozilla.org/show_bug.cgi?id=1326509>.
  [SameObject, BinaryName="styleSheetForBindings"] readonly attribute CSSStyleSheet? styleSheet;
  [SameObject] readonly attribute CSSStyleSheet? styleSheet;
};
+0 −6
Original line number Diff line number Diff line
@@ -45,12 +45,6 @@ void ServoStyleRuleMap::SheetAdded(StyleSheet& aStyleSheet) {
  }
}

void ServoStyleRuleMap::SheetCloned(StyleSheet& aStyleSheet) {
  // Invalidate all data inside. We could probably track down all the individual
  // rules that changed etc, but it doesn't seem worth it.
  mTable.Clear();
}

void ServoStyleRuleMap::SheetRemoved(StyleSheet& aStyleSheet) {
  // Invalidate all data inside. This isn't strictly necessary since
  // we should always get update from document before new queries come.
+0 −1
Original line number Diff line number Diff line
@@ -36,7 +36,6 @@ class ServoStyleRuleMap {

  void SheetAdded(StyleSheet&);
  void SheetRemoved(StyleSheet&);
  void SheetCloned(StyleSheet&);

  void RuleAdded(StyleSheet& aStyleSheet, css::Rule&);
  void RuleRemoved(StyleSheet& aStyleSheet, css::Rule&);
Loading