зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1738663 - Remove some unneeded special-cases in GenerateComputedDOMStyleGenerated. r=layout-reviewers,mats
Depends on D130018 Differential Revision: https://phabricator.services.mozilla.com/D130026
This commit is contained in:
Родитель
7c1b2c19fd
Коммит
72849955db
|
@ -34,22 +34,9 @@ static constexpr Entry kEntries[] = {
|
|||
return False
|
||||
return True
|
||||
|
||||
# Some special cases we may get rid of later. See bug 1471423.
|
||||
def method(p):
|
||||
if p.id.startswith("margin_"):
|
||||
return "{}Width".format(p.method)
|
||||
if p.id.startswith("_moz_"):
|
||||
method = p.method[3:]
|
||||
else:
|
||||
method = p.method
|
||||
if p.id.startswith("_moz_outline_radius_"):
|
||||
method = method.replace("left", "Left")
|
||||
method = method.replace("right", "Right")
|
||||
return method
|
||||
|
||||
def getter_entry(p):
|
||||
if has_cpp_getter(p):
|
||||
return "DoGet" + method(p)
|
||||
return "DoGet" + p.method
|
||||
# Put a dummy getter here instead of nullptr because MSVC seems
|
||||
# to have bug which ruins the table when we put nullptr for
|
||||
# pointer-to-member-function. See bug 1471426.
|
||||
|
|
|
@ -1317,7 +1317,7 @@ already_AddRefed<nsROCSSPrimitiveValue> nsComputedDOMStyle::MatrixToCSSValue(
|
|||
return val.forget();
|
||||
}
|
||||
|
||||
already_AddRefed<CSSValue> nsComputedDOMStyle::DoGetOsxFontSmoothing() {
|
||||
already_AddRefed<CSSValue> nsComputedDOMStyle::DoGetMozOsxFontSmoothing() {
|
||||
if (nsContentUtils::ShouldResistFingerprinting(
|
||||
mPresShell->GetPresContext()->GetDocShell())) {
|
||||
return nullptr;
|
||||
|
@ -1794,20 +1794,20 @@ already_AddRefed<CSSValue> nsComputedDOMStyle::DoGetBorderRightWidth() {
|
|||
return GetBorderWidthFor(eSideRight);
|
||||
}
|
||||
|
||||
already_AddRefed<CSSValue> nsComputedDOMStyle::DoGetMarginTopWidth() {
|
||||
return GetMarginWidthFor(eSideTop);
|
||||
already_AddRefed<CSSValue> nsComputedDOMStyle::DoGetMarginTop() {
|
||||
return GetMarginFor(eSideTop);
|
||||
}
|
||||
|
||||
already_AddRefed<CSSValue> nsComputedDOMStyle::DoGetMarginBottomWidth() {
|
||||
return GetMarginWidthFor(eSideBottom);
|
||||
already_AddRefed<CSSValue> nsComputedDOMStyle::DoGetMarginBottom() {
|
||||
return GetMarginFor(eSideBottom);
|
||||
}
|
||||
|
||||
already_AddRefed<CSSValue> nsComputedDOMStyle::DoGetMarginLeftWidth() {
|
||||
return GetMarginWidthFor(eSideLeft);
|
||||
already_AddRefed<CSSValue> nsComputedDOMStyle::DoGetMarginLeft() {
|
||||
return GetMarginFor(eSideLeft);
|
||||
}
|
||||
|
||||
already_AddRefed<CSSValue> nsComputedDOMStyle::DoGetMarginRightWidth() {
|
||||
return GetMarginWidthFor(eSideRight);
|
||||
already_AddRefed<CSSValue> nsComputedDOMStyle::DoGetMarginRight() {
|
||||
return GetMarginFor(eSideRight);
|
||||
}
|
||||
|
||||
already_AddRefed<CSSValue> nsComputedDOMStyle::DoGetLineHeight() {
|
||||
|
@ -2174,8 +2174,7 @@ already_AddRefed<CSSValue> nsComputedDOMStyle::GetBorderWidthFor(
|
|||
return val.forget();
|
||||
}
|
||||
|
||||
already_AddRefed<CSSValue> nsComputedDOMStyle::GetMarginWidthFor(
|
||||
mozilla::Side aSide) {
|
||||
already_AddRefed<CSSValue> nsComputedDOMStyle::GetMarginFor(Side aSide) {
|
||||
RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
|
||||
|
||||
auto& margin = StyleMargin()->mMargin.Get(aSide);
|
||||
|
|
|
@ -193,7 +193,7 @@ class nsComputedDOMStyle final : public nsDOMCSSDeclaration,
|
|||
|
||||
already_AddRefed<CSSValue> GetBorderWidthFor(mozilla::Side aSide);
|
||||
|
||||
already_AddRefed<CSSValue> GetMarginWidthFor(mozilla::Side aSide);
|
||||
already_AddRefed<CSSValue> GetMarginFor(mozilla::Side aSide);
|
||||
|
||||
already_AddRefed<CSSValue> GetTransformValue(const mozilla::StyleTransform&);
|
||||
|
||||
|
@ -230,7 +230,7 @@ class nsComputedDOMStyle final : public nsDOMCSSDeclaration,
|
|||
already_AddRefed<CSSValue> DoGetBottom();
|
||||
|
||||
/* Font properties */
|
||||
already_AddRefed<CSSValue> DoGetOsxFontSmoothing();
|
||||
already_AddRefed<CSSValue> DoGetMozOsxFontSmoothing();
|
||||
|
||||
/* Grid properties */
|
||||
already_AddRefed<CSSValue> DoGetGridTemplateColumns();
|
||||
|
@ -259,10 +259,10 @@ class nsComputedDOMStyle final : public nsDOMCSSDeclaration,
|
|||
already_AddRefed<CSSValue> DoGetBorderRightWidth();
|
||||
|
||||
/* Margin Properties */
|
||||
already_AddRefed<CSSValue> DoGetMarginTopWidth();
|
||||
already_AddRefed<CSSValue> DoGetMarginBottomWidth();
|
||||
already_AddRefed<CSSValue> DoGetMarginLeftWidth();
|
||||
already_AddRefed<CSSValue> DoGetMarginRightWidth();
|
||||
already_AddRefed<CSSValue> DoGetMarginTop();
|
||||
already_AddRefed<CSSValue> DoGetMarginBottom();
|
||||
already_AddRefed<CSSValue> DoGetMarginLeft();
|
||||
already_AddRefed<CSSValue> DoGetMarginRight();
|
||||
|
||||
/* Text Properties */
|
||||
already_AddRefed<CSSValue> DoGetLineHeight();
|
||||
|
|
Загрузка…
Ссылка в новой задаче