Backed out changeset a8ea98346a87 (bug 1562057) for reftest failures on contain-size-select-elem-002 . CLOSED TREE
authorNarcis Beleuzu <nbeleuzu@mozilla.com>
Fri, 11 Oct 2019 21:12:58 +0300
changeset 497311 c5e6477c3a245a97d4c3cdd5d3e406f8abaf94ad
parent 497310 3d1ed8b2fb91d2df8d01c9023ebc7c89967c7278
child 497312 31d32668afb5e427b8d50ffca875ee7c7faa4a41
push id97800
push usernbeleuzu@mozilla.com
push dateFri, 11 Oct 2019 18:14:19 +0000
treeherderautoland@c5e6477c3a24 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1562057
milestone71.0a1
backs outa8ea98346a87402b1c3ad4c892694d0de163a0b3
first release with
nightly linux32
c5e6477c3a24 / 71.0a1 / 20191011215012 / files
nightly linux64
c5e6477c3a24 / 71.0a1 / 20191011215012 / files
nightly mac
c5e6477c3a24 / 71.0a1 / 20191011215012 / files
nightly win32
c5e6477c3a24 / 71.0a1 / 20191011215012 / files
nightly win64
c5e6477c3a24 / 71.0a1 / 20191011215012 / files
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out changeset a8ea98346a87 (bug 1562057) for reftest failures on contain-size-select-elem-002 . CLOSED TREE
layout/forms/nsComboboxControlFrame.cpp
layout/reftests/w3c-css/submitted/contain/reftest.list
testing/web-platform/meta/css/css-contain/contain-size-select-001.html.ini
testing/web-platform/meta/css/css-contain/contain-size-select-002.html.ini
testing/web-platform/meta/css/vendor-imports/mozilla/mozilla-central-reftests/contain/contain-size-select-elem-002.html.ini
testing/web-platform/tests/html/rendering/non-replaced-elements/form-controls/select-sizing-001-ref.html
testing/web-platform/tests/html/rendering/non-replaced-elements/form-controls/select-sizing-001.html
--- a/layout/forms/nsComboboxControlFrame.cpp
+++ b/layout/forms/nsComboboxControlFrame.cpp
@@ -714,26 +714,19 @@ nscoord nsComboboxControlFrame::GetIntri
     nsIScrollableFrame* scrollable = do_QueryFrame(mListControlFrame);
     NS_ASSERTION(scrollable, "List must be a scrollable frame");
     scrollbarWidth = scrollable->GetNondisappearingScrollbarWidth(
         presContext, aRenderingContext, GetWritingMode());
   }
 
   const bool isContainSize = StyleDisplay()->IsContainSize();
   nscoord displayISize = 0;
-  if (MOZ_LIKELY(mDisplayFrame)) {
-    if (isContainSize) {
-      // Note: the "h" in "hPadding" here really means "inline-axis".
-      // Its struct uses "h" prefixes for historical reasons, but they're all
-      // for the inline-axis, not (necessarily) the horizontal axis.
-      displayISize = mDisplayFrame->IntrinsicISizeOffsets().hPadding;
-    } else {
-      displayISize = nsLayoutUtils::IntrinsicForContainer(aRenderingContext,
-                                                          mDisplayFrame, aType);
-    }
+  if (MOZ_LIKELY(mDisplayFrame) && !isContainSize) {
+    displayISize = nsLayoutUtils::IntrinsicForContainer(aRenderingContext,
+                                                        mDisplayFrame, aType);
   }
 
   if (mDropdownFrame) {
     nscoord dropdownContentISize;
     bool isUsingOverlayScrollbars =
         LookAndFeel::GetInt(LookAndFeel::eIntID_UseOverlayScrollbars) != 0;
     if (aType == nsLayoutUtils::MIN_ISIZE) {
       dropdownContentISize =
@@ -990,26 +983,19 @@ void nsComboboxControlFrame::HandleRedis
                                 NS_FRAME_IS_DIRTY);
 
   mInRedisplayText = false;
 }
 
 void nsComboboxControlFrame::ActuallyDisplayText(bool aNotify) {
   RefPtr<nsTextNode> displayContent = mDisplayContent;
   if (mDisplayedOptionTextOrPreview.IsEmpty()) {
-    // Have to use a space character of some sort for line-block-size
-    // calculations to be right. Also, the space character must be zero-width
-    // in order for the the inline-size calculations to be consistent between
-    // size-contained comboboxes vs. empty comboboxes.
-    //
-    // XXXdholbert Does this space need to be "non-breaking"? I'm not sure
-    // if it matters, but we previously had a comment here (added in 2002)
-    // saying "Have to use a non-breaking space for line-height calculations
-    // to be right". So I'll stick with a non-breaking space for now...
-    static const char16_t space = 0xFEFF;
+    // Have to use a non-breaking space for line-block-size calculations
+    // to be right
+    static const char16_t space = 0xA0;
     displayContent->SetText(&space, 1, aNotify);
   } else {
     displayContent->SetText(mDisplayedOptionTextOrPreview, aNotify);
   }
 }
 
 int32_t nsComboboxControlFrame::GetIndexOfDisplayArea() {
   return mDisplayedIndex;
--- a/layout/reftests/w3c-css/submitted/contain/reftest.list
+++ b/layout/reftests/w3c-css/submitted/contain/reftest.list
@@ -31,17 +31,17 @@ pref(layout.css.overflow-clip-box.enable
 fuzzy-if(webrender&&winWidget,0-24,0-2) == contain-size-inline-flex-001.html contain-size-inline-flex-001-ref.html # bug 1474093
 == contain-size-grid-001.html contain-size-grid-001-ref.html
 == contain-size-multicol-001.html contain-size-multicol-001-ref.html
 == contain-size-fieldset-001.html contain-size-fieldset-001-ref.html
 == contain-size-fieldset-002.html contain-size-fieldset-002-ref.html
 == contain-size-multicol-002.html contain-size-multicol-002-ref.html
 == contain-size-multicol-003.html contain-size-multicol-003-ref.html
 fuzzy-if(Android,0-4,0-4) == contain-size-select-elem-001.html contain-size-select-elem-001-ref.html # bug 1480862
-== contain-size-select-elem-002.html contain-size-select-elem-002-ref.html
+fails-if(!gtkWidget) == contain-size-select-elem-002.html contain-size-select-elem-002-ref.html # bug 1562057
 == contain-size-select-elem-003.html contain-size-select-elem-003-ref.html
 == contain-size-select-elem-004.html contain-size-select-elem-004-ref.html
 == contain-size-select-elem-005.html contain-size-select-elem-005-ref.html
 == contain-layout-overflow-001.html contain-layout-overflow-001-ref.html
 == contain-layout-overflow-002.html contain-layout-overflow-002-ref.html
 == contain-size-table-caption-001.html contain-size-table-caption-001-ref.html
 == contain-layout-stacking-context-001.html contain-paint-stacking-context-001-ref.html
 == contain-layout-formatting-context-float-001.html contain-paint-formatting-context-float-001-ref.html
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/meta/css/css-contain/contain-size-select-001.html.ini
@@ -0,0 +1,3 @@
+[contain-size-select-001.html]
+  expected: FAIL
+  bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1562057
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/meta/css/css-contain/contain-size-select-002.html.ini
@@ -0,0 +1,3 @@
+[contain-size-select-002.html]
+  expected: FAIL
+  bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1562057
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/meta/css/vendor-imports/mozilla/mozilla-central-reftests/contain/contain-size-select-elem-002.html.ini
@@ -0,0 +1,4 @@
+[contain-size-select-elem-002.html]
+  expected:
+    if os == "linux": PASS
+    FAIL
deleted file mode 100644
--- a/testing/web-platform/tests/html/rendering/non-replaced-elements/form-controls/select-sizing-001-ref.html
+++ /dev/null
@@ -1,59 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-  <meta charset="utf-8">
-  <title>Reference for sizing of select elements, with wide vs. empty option selected</title>
-  <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com">
-  <style>
-    select {
-      color: transparent;
-      margin: 1px;
-    }
-    div.customBorder > select {
-      /* This class is to let us test select elements *without* native theming
-         (for browsers that have both native and non-native controls): */
-      border: 3px solid black;
-    }
-  </style>
-</head>
-<body>
-  <div>
-    <select>
-      <option>some wide option</option>
-    </select>
-    <br>
-    <select>
-      <option>some wide option</option>
-    </select>
-    <br>
-    <select>
-      <option>some wide option</option>
-    </select>
-    <br>
-    <select>
-      <option>some wide option</option>
-    </select>
-  </div>
-
-  <!-- This is the same as above, but now with a custom border on the
-       select elements: -->
-  <div class="customBorder">
-    <select>
-      <option>some wide option</option>
-    </select>
-    <br>
-    <select>
-      <option>some wide option</option>
-    </select>
-    <br>
-    <select>
-      <option>some wide option</option>
-    </select>
-    <br>
-    <select>
-      <option>some wide option</option>
-    </select>
-  </div>
-
-</body>
-</html>
deleted file mode 100644
--- a/testing/web-platform/tests/html/rendering/non-replaced-elements/form-controls/select-sizing-001.html
+++ /dev/null
@@ -1,77 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-  <meta charset="utf-8">
-  <title>Test for sizing of select elements, with wide vs. empty option selected</title>
-  <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com">
-  <link rel="help" href="https://html.spec.whatwg.org/multipage/rendering.html#list-box">
-  <link rel="match" href="select-sizing-001-ref.html">
-  <style>
-    select {
-      color: transparent;
-      margin: 1px;
-    }
-    div.customBorder > select {
-      /* This class is to let us test select elements *without* native theming
-         (for browsers that have both native and non-native controls): */
-      border: 3px solid black;
-    }
-  </style>
-</head>
-<body>
-  <div>
-    <!-- Wide thing is 2nd, and not selected: -->
-    <select>
-      <option></option>
-      <option>some wide option</option>
-    </select>
-    <br>
-    <!-- Wide thing is 2nd, and selected: -->
-    <select>
-      <option></option>
-      <option selected>some wide option</option>
-    </select>
-    <br>
-    <!-- Wide thing is 1st, and selected (implicitly): -->
-    <select>
-      <option>some wide option</option>
-      <option></option>
-    </select>
-    <br>
-    <!-- Wide thing is 1st, and not selected: -->
-    <select>
-      <option>some wide option</option>
-      <option selected></option>
-    </select>
-  </div>
-
-  <!-- This is the same as above, but now with a custom border on the
-       select elements: -->
-  <div class="customBorder">
-    <!-- Wide thing is 2nd, and not selected: -->
-    <select>
-      <option></option>
-      <option>some wide option</option>
-    </select>
-    <br>
-    <!-- Wide thing is 2nd, and selected: -->
-    <select>
-      <option></option>
-      <option selected>some wide option</option>
-    </select>
-    <br>
-    <!-- Wide thing is 1st, and selected (implicitly): -->
-    <select>
-      <option>some wide option</option>
-      <option></option>
-    </select>
-    <br>
-    <!-- Wide thing is 1st, and not selected: -->
-    <select>
-      <option>some wide option</option>
-      <option selected></option>
-    </select>
-  </div>
-
-</body>
-</html>