Skip to content

Commit

Permalink
Remove DateInputInlineBlock flag
Browse files Browse the repository at this point in the history
This has been enabled by default for long enough that we can remove the
flag now.

Bug: 41462748
Change-Id: I54d644c6b49a33da0a3046dcee101c0eed9fcd5b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5515549
Reviewed-by: Kent Tamura <tkent@chromium.org>
Commit-Queue: Joey Arhar <jarhar@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1297164}
  • Loading branch information
josepharhar authored and Chromium LUCI CQ committed May 6, 2024
1 parent 1e49b23 commit 75cc1a5
Show file tree
Hide file tree
Showing 19 changed files with 10 additions and 361 deletions.
1 change: 0 additions & 1 deletion third_party/blink/public/blink_resources.grd
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
</if>
<include name="IDR_UASTYLE_PERMISSION_ELEMENT_CSS" file="../renderer/core/html/resources/permission.css" flattenhtml="true" type="BINDATA" compress="brotli"/>
<include name="IDR_UASTYLE_THEME_INPUT_MULTIPLE_FIELDS_CSS" file="../renderer/core/html/resources/input_multiple_fields.css" type="BINDATA" compress="brotli"/>
<include name="IDR_UASTYLE_THEME_INPUT_MULTIPLE_FIELDS_INLINE_FLEX_CSS" file="../renderer/core/html/resources/input_multiple_fields_inline_flex.css" type="BINDATA" compress="brotli"/>
<include name="IDR_UASTYLE_THEME_FORCED_COLORS_CSS" file="../renderer/core/html/resources/forced_colors.css" type="BINDATA" compress="brotli"/>
<include name="IDR_UASTYLE_SELECTLIST_CSS" file="../renderer/core/html/resources/selectlist.css" flattenhtml="true" type="BINDATA" compress="brotli"/>
<include name="IDR_UASTYLE_STYLABLE_SELECT_CSS" file="../renderer/core/html/resources/stylable_select.css" type="BINDATA" compress="brotli"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,7 @@ HTMLFormElement* InputTypeView::FormForSubmission() const {
LayoutObject* InputTypeView::CreateLayoutObject(
const ComputedStyle& style) const {
// Avoid LayoutInline, which can be split to multiple lines.
if (RuntimeEnabledFeatures::DateInputInlineBlockEnabled() &&
style.IsDisplayInlineType() && !style.IsDisplayReplacedType()) {
if (style.IsDisplayInlineType() && !style.IsDisplayReplacedType()) {
return MakeGarbageCollected<LayoutNGBlockFlow>(&GetElement());
}
return LayoutObject::CreateObject(&GetElement(), style);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -396,19 +396,7 @@ void MultipleFieldsTemporalInputTypeView::Blur() {

void MultipleFieldsTemporalInputTypeView::AdjustStyle(
ComputedStyleBuilder& builder) {
if (!RuntimeEnabledFeatures::DateInputInlineBlockEnabled()) {
EDisplay original_display = builder.Display();
EDisplay new_display = original_display;
if (original_display == EDisplay::kInline ||
original_display == EDisplay::kInlineBlock) {
new_display = EDisplay::kInlineFlex;
} else if (original_display == EDisplay::kBlock) {
new_display = EDisplay::kFlex;
}
builder.SetDisplay(new_display);
} else {
builder.SetShouldIgnoreOverflowPropertyForInlineBlockBaseline();
}
builder.SetShouldIgnoreOverflowPropertyForInlineBlockBaseline();
builder.SetDirection(ComputedTextDirection());
}

Expand All @@ -418,15 +406,13 @@ void MultipleFieldsTemporalInputTypeView::CreateShadowSubtree() {
Document& document = GetElement().GetDocument();
ContainerNode* container = GetElement().UserAgentShadowRoot();

if (RuntimeEnabledFeatures::DateInputInlineBlockEnabled()) {
auto* container_div = MakeGarbageCollected<HTMLDivElement>(document);
container_div->SetShadowPseudoId(
shadow_element_names::kPseudoInternalDatetimeContainer);
container_div->SetInlineStyleProperty(CSSPropertyID::kUnicodeBidi,
CSSValueID::kNormal);
GetElement().UserAgentShadowRoot()->AppendChild(container_div);
container = container_div;
}
auto* container_div = MakeGarbageCollected<HTMLDivElement>(document);
container_div->SetShadowPseudoId(
shadow_element_names::kPseudoInternalDatetimeContainer);
container_div->SetInlineStyleProperty(CSSPropertyID::kUnicodeBidi,
CSSValueID::kNormal);
GetElement().UserAgentShadowRoot()->AppendChild(container_div);
container = container_div;

container->AppendChild(
MakeGarbageCollected<DateTimeEditElement, Document&,
Expand Down

This file was deleted.

10 changes: 1 addition & 9 deletions third_party/blink/renderer/core/layout/layout_theme_default.cc
Original file line number Diff line number Diff line change
Expand Up @@ -79,19 +79,11 @@ String LayoutThemeDefault::ExtraDefaultStyleSheet() {
? UncompressResourceAsASCIIString(
IDR_UASTYLE_THEME_INPUT_MULTIPLE_FIELDS_CSS)
: String();
String multiple_fields_inline_flex_style_sheet =
RuntimeEnabledFeatures::InputMultipleFieldsUIEnabled() &&
!RuntimeEnabledFeatures::DateInputInlineBlockEnabled()
? UncompressResourceAsASCIIString(
IDR_UASTYLE_THEME_INPUT_MULTIPLE_FIELDS_INLINE_FLEX_CSS)
: String();
StringBuilder builder;
builder.ReserveCapacity(extra_style_sheet.length() +
multiple_fields_style_sheet.length() +
multiple_fields_inline_flex_style_sheet.length());
multiple_fields_style_sheet.length());
builder.Append(extra_style_sheet);
builder.Append(multiple_fields_style_sheet);
builder.Append(multiple_fields_inline_flex_style_sheet);
return builder.ToString();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1106,13 +1106,6 @@
origin_trial_allows_third_party: true,
origin_trial_type: "deprecation",
},
{
// Makes the default display value of date type <input> elements
// inline-block for cross-browser compatibility. Enabled in M122, should
// be safe to remove in M126.
name: "DateInputInlineBlock",
status: "stable",
},
{
// This is a killswitch for the `serializable` attribute on declarative
// shadow roots. It should be removed in M125 (March 18, 2024) assuming
Expand Down
16 changes: 0 additions & 16 deletions third_party/blink/web_tests/VirtualTestSuites
Original file line number Diff line number Diff line change
Expand Up @@ -2180,22 +2180,6 @@
"args": ["--disable-features=OptionElementAlwaysUseLabel"],
"expires": "Jul 1, 2024"
},
{
"prefix": "date-input-inline-block-disabled",
"owners": ["jarhar@chromium.org", "tkent@chromium.org"],
"platforms": ["Linux"],
"bases": [
"external/wpt/html/rendering/non-replaced-elements/form-controls/resets.html",
"fast/forms/suggested-value.html",
"fast/forms/date/date-appearance-pseudo-elements.html",
"fast/forms/month/month-appearance-pseudo-elements.html",
"fast/forms/time/time-appearance-pseudo-elements.html",
"fast/forms/week/week-appearance-pseudo-elements.html"
],
"args": ["--disable-blink-features=DateInputInlineBlock",
"--disable-threaded-compositing", "--disable-threaded-animation"],
"expires": "Oct 1, 2024"
},
{
"prefix": "disable-device-id-pointer-event",
"platforms": ["Linux", "Mac", "Win"],
Expand Down

This file was deleted.

Binary file not shown.
Binary file not shown.

This file was deleted.

Binary file not shown.
Binary file not shown.

This file was deleted.

Binary file not shown.
Binary file not shown.
Loading

0 comments on commit 75cc1a5

Please sign in to comment.