Commit 3e31b63b authored by Butkovits Atila's avatar Butkovits Atila
Browse files

Backed out 2 changesets (bug 1763644, bug 1762474)for causing failures at...

Backed out 2 changesets (bug 1763644, bug 1762474)for causing failures at idlharness.html. CLOSED TREE

Backed out changeset 6c5ac0c99219 (bug 1762474)
Backed out changeset 8b625593255f (bug 1763644)
parent 7e468f92
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -10,5 +10,6 @@
// https://drafts.csswg.org/css-conditional/#the-cssconditionrule-interface
[Exposed=Window]
interface CSSConditionRule : CSSGroupingRule {
  readonly attribute UTF8String conditionText;
  [SetterThrows]
  attribute UTF8String conditionText;
};
+0 −14
Original line number Diff line number Diff line
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
 * You can obtain one at http://mozilla.org/MPL/2.0/.
 *
 * The origin of this IDL file is
 * https://drafts.csswg.org/css-contain-3/#the-csscontainerrule-interface
 */

// https://drafts.csswg.org/css-contain-3/#the-csscontainerrule-interface
[Exposed=Window, Pref="layout.css.container-queries.enabled"]
interface CSSContainerRule : CSSConditionRule {
};
+0 −1
Original line number Diff line number Diff line
@@ -475,7 +475,6 @@ WEBIDL_FILES = [
    "CSS.webidl",
    "CSSAnimation.webidl",
    "CSSConditionRule.webidl",
    "CSSContainerRule.webidl",
    "CSSCounterStyleRule.webidl",
    "CSSFontFaceRule.webidl",
    "CSSFontFeatureValuesRule.webidl",
+0 −2
Original line number Diff line number Diff line
@@ -86,7 +86,6 @@ void ServoStyleRuleMap::RuleRemoved(StyleSheet& aStyleSheet,
    case StyleCssRuleType::Media:
    case StyleCssRuleType::Supports:
    case StyleCssRuleType::LayerBlock:
    case StyleCssRuleType::Container:
    case StyleCssRuleType::Document: {
      // See the comment in StyleSheetRemoved.
      mTable.Clear();
@@ -123,7 +122,6 @@ void ServoStyleRuleMap::FillTableFromRule(css::Rule& aRule) {
    case StyleCssRuleType::LayerBlock:
    case StyleCssRuleType::Media:
    case StyleCssRuleType::Supports:
    case StyleCssRuleType::Container:
    case StyleCssRuleType::Document: {
      auto& rule = static_cast<css::GroupRule&>(aRule);
      if (ServoCSSRuleList* ruleList = rule.GetCssRules()) {

layout/style/CSSContainerRule.cpp

deleted100644 → 0
+0 −77
Original line number Diff line number Diff line
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

#include "mozilla/dom/CSSContainerRule.h"

#include "mozilla/css/GroupRule.h"
#include "mozilla/dom/CSSContainerRuleBinding.h"
#include "mozilla/ServoBindings.h"

using namespace mozilla::css;

namespace mozilla::dom {

CSSContainerRule::CSSContainerRule(RefPtr<RawServoContainerRule> aRawRule,
                                   StyleSheet* aSheet, css::Rule* aParentRule,
                                   uint32_t aLine, uint32_t aColumn)
    : css::ConditionRule(Servo_ContainerRule_GetRules(aRawRule).Consume(),
                         aSheet, aParentRule, aLine, aColumn),
      mRawRule(std::move(aRawRule)) {}

CSSContainerRule::~CSSContainerRule() = default;

NS_IMPL_ADDREF_INHERITED(CSSContainerRule, ConditionRule)
NS_IMPL_RELEASE_INHERITED(CSSContainerRule, ConditionRule)

// QueryInterface implementation for ContainerRule
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(CSSContainerRule)
NS_INTERFACE_MAP_END_INHERITING(ConditionRule)

#ifdef DEBUG
/* virtual */
void CSSContainerRule::List(FILE* out, int32_t aIndent) const {
  nsAutoCString str;
  for (int32_t i = 0; i < aIndent; i++) {
    str.AppendLiteral("  ");
  }
  Servo_ContainerRule_Debug(mRawRule, &str);
  fprintf_stderr(out, "%s\n", str.get());
}
#endif

StyleCssRuleType CSSContainerRule::Type() const {
  return StyleCssRuleType::Container;
}

void CSSContainerRule::GetConditionText(nsACString& aConditionText) {
  Servo_ContainerRule_GetConditionText(mRawRule, &aConditionText);
}

/* virtual */
void CSSContainerRule::GetCssText(nsACString& aCssText) const {
  Servo_ContainerRule_GetCssText(mRawRule, &aCssText);
}

void CSSContainerRule::SetRawAfterClone(RefPtr<RawServoContainerRule> aRaw) {
  mRawRule = std::move(aRaw);

  css::ConditionRule::SetRawAfterClone(
      Servo_ContainerRule_GetRules(mRawRule).Consume());
}

/* virtual */
size_t CSSContainerRule::SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const {
  // TODO Implement this!
  return aMallocSizeOf(this);
}

/* virtual */
JSObject* CSSContainerRule::WrapObject(JSContext* aCx,
                                       JS::Handle<JSObject*> aGivenProto) {
  return CSSContainerRule_Binding::Wrap(aCx, this, aGivenProto);
}

}  // namespace mozilla::dom
Loading