Bug 1456590 Part 1: Omit line names from implicitly named areas, to avoid confusion. r=mats
authorBrad Werth <bwerth@mozilla.com>
Wed, 02 May 2018 16:24:20 -0700
changeset 472910 4701762470f24c26fce7f1e18cec46e6a7d15f29
parent 472909 23400e395408c6816d3afc0d4c192013b4cd8e69
child 472911 f872dc290835ab15139da3df23113165d263aa09
push id1728
push userjlund@mozilla.com
push dateMon, 18 Jun 2018 21:12:27 +0000
treeherdermozilla-release@c296fde26f5f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmats
bugs1456590
milestone61.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 1456590 Part 1: Omit line names from implicitly named areas, to avoid confusion. r=mats MozReview-Commit-ID: 3vK2MUeEuqw
dom/grid/GridLines.cpp
--- a/dom/grid/GridLines.cpp
+++ b/dom/grid/GridLines.cpp
@@ -140,16 +140,24 @@ GridLines::SetLineInfo(const ComputedGri
       const nsTArray<nsString>& possiblyDuplicateLineNames(
         aLineInfo->mNames.SafeElementAt(i, nsTArray<nsString>()));
 
       nsTArray<nsString> lineNames;
       AddLineNamesIfNotPresent(lineNames, possiblyDuplicateLineNames);
 
       // Add in names from grid areas where this line is used as a boundary.
       for (auto area : aAreas) {
+        // We specifically ignore line names from implicitly named areas,
+        // because it can be confusing for designers who might naturally use
+        // a named line of "-start" or "-end" and create an implicit named
+        // area without meaning to.
+        if (area->Type() == GridDeclaration::Implicit) {
+          continue;
+        }
+
         bool haveNameToAdd = false;
         nsAutoString nameToAdd;
         area->GetName(nameToAdd);
         if (aIsRow) {
           if (area->RowStart() == line1Index) {
             haveNameToAdd = true;
             nameToAdd.AppendLiteral("-start");
           } else if (area->RowEnd() == line1Index) {