Bug 1562269 - Serialize grid-auto-rows / grid-auto-columns with Servo. r=boris
authorEmilio Cobos Álvarez <emilio@crisal.io>
Thu, 27 Jun 2019 20:24:02 +0200
changeset 543425 2086a08e77feeeaddcff0399deef434ac2e8c17e
parent 543424 292c5fa99131a701ac56e1a055649a3fd160b0f9
child 543426 3669b147ccc6d3c10f742e6b72efcf9dbda99374
push id2131
push userffxbld-merge
push dateMon, 26 Aug 2019 18:30:20 +0000
treeherdermozilla-release@b19ffb3ca153 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersboris
bugs1562269
milestone69.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1562269 - Serialize grid-auto-rows / grid-auto-columns with Servo. r=boris Two less properties, now that we're not using nsStyleCoord for them we can do this. Unfortunately the grid resolved value code needs to serialize it still, so this doesn't remove as much code. Also fix the script since the generated file was renamed. Differential Revision: https://phabricator.services.mozilla.com/D36349
layout/style/ServoCSSPropList.mako.py
layout/style/nsComputedDOMStyle.cpp
layout/style/nsComputedDOMStyle.h
layout/style/tools/cleanup_computed_getters.py
--- a/layout/style/ServoCSSPropList.mako.py
+++ b/layout/style/ServoCSSPropList.mako.py
@@ -63,20 +63,16 @@ def method(prop):
 # TODO(emilio): Get this to zero.
 LONGHANDS_NOT_SERIALIZED_WITH_SERVO = [
     # Servo serializes one value when both are the same, a few tests expect two.
     "border-spacing",
 
     # Resolved value should be zero when the column-rule-style is none.
     "column-rule-width",
 
-    # Clamping (need to get rid of nsStyleCoord storage before removing these).
-    "grid-auto-columns",
-    "grid-auto-rows",
-
     # These resolve auto to zero in a few cases, but not all.
     "max-block-size",
     "max-height",
     "max-inline-size",
     "max-width",
     "min-block-size",
     "min-height",
     "min-inline-size",
--- a/layout/style/nsComputedDOMStyle.cpp
+++ b/layout/style/nsComputedDOMStyle.cpp
@@ -1583,24 +1583,16 @@ already_AddRefed<CSSValue> nsComputedDOM
             GetGridTrackSize(aTrackList.mTrackSizingFunctions[i]));
       }
     }
   }
 
   return valueList.forget();
 }
 
-already_AddRefed<CSSValue> nsComputedDOMStyle::DoGetGridAutoColumns() {
-  return GetGridTrackSize(StylePosition()->mGridAutoColumns);
-}
-
-already_AddRefed<CSSValue> nsComputedDOMStyle::DoGetGridAutoRows() {
-  return GetGridTrackSize(StylePosition()->mGridAutoRows);
-}
-
 already_AddRefed<CSSValue> nsComputedDOMStyle::DoGetGridTemplateColumns() {
   const ComputedGridTrackInfo* info = nullptr;
 
   nsGridContainerFrame* gridFrame =
       nsGridContainerFrame::GetGridFrameWithComputedInfo(mInnerFrame);
 
   if (gridFrame) {
     info = gridFrame->GetComputedTemplateColumns();
--- a/layout/style/nsComputedDOMStyle.h
+++ b/layout/style/nsComputedDOMStyle.h
@@ -227,18 +227,16 @@ class nsComputedDOMStyle final : public 
   already_AddRefed<CSSValue> DoGetTop();
   already_AddRefed<CSSValue> DoGetRight();
   already_AddRefed<CSSValue> DoGetBottom();
 
   /* Font properties */
   already_AddRefed<CSSValue> DoGetOsxFontSmoothing();
 
   /* Grid properties */
-  already_AddRefed<CSSValue> DoGetGridAutoColumns();
-  already_AddRefed<CSSValue> DoGetGridAutoRows();
   already_AddRefed<CSSValue> DoGetGridTemplateColumns();
   already_AddRefed<CSSValue> DoGetGridTemplateRows();
 
   /* StyleImageLayer properties */
   already_AddRefed<CSSValue> DoGetImageLayerPosition(
       const nsStyleImageLayers& aLayers);
 
   /* Mask properties */
--- a/layout/style/tools/cleanup_computed_getters.py
+++ b/layout/style/tools/cleanup_computed_getters.py
@@ -1,29 +1,29 @@
 #!/usr/bin/env python3
 
 """
 Script to remove unused getters in nsComputedDOMStyle.
 
 It needs to be run from the topsrcdir, and it requires passing in the objdir
-as first argument. It can only be run after nsComputedDOMStyleGenerated.cpp
+as first argument. It can only be run after nsComputedDOMStyleGenerated.inc
 is generated in the objdir.
 """
 
 import re
 import sys
 
 from pathlib import Path
 
 if len(sys.argv) != 2:
     print("Usage: {} objdir".format(sys.argv[0]))
     exit(1)
 
 generated = Path(sys.argv[1]) / "layout" / "style"
-generated = generated / "nsComputedDOMStyleGenerated.cpp"
+generated = generated / "nsComputedDOMStyleGenerated.inc"
 RE_GENERATED = re.compile(r"DoGet\w+")
 keeping = set()
 with generated.open() as f:
     for line in f:
         m = RE_GENERATED.search(line)
         if m is not None:
             keeping.add(m.group(0))