Add support for using appearance:base [chromium/src : main]

0 views
Skip to first unread message

David Baron (Gerrit)

unread,
Oct 15, 2025, 3:24:01 PM (4 days ago) Oct 15
to David Baron, Luke, Chromium LUCI CQ, Alexis Menard, AyeAye, devtools-re...@chromium.org, blink-rev...@chromium.org, blink-re...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, kinuko...@chromium.org, zol...@webkit.org, blink-rev...@chromium.org, blink-revi...@chromium.org, apavlo...@chromium.org, blink-rev...@chromium.org, jmedle...@chromium.org, blink-revie...@chromium.org
Attention needed from Joey Arhar and Luke

David Baron voted and added 8 comments

Votes added by David Baron

Code-Review+1

8 comments

Patchset-level comments
File-level comment, Patchset 5 (Latest):
David Baron . resolved

LGTM with a bunch of comments

Commit Message
Line 9, Patchset 5 (Latest):This patch add some support for using appearance:base in addition to
David Baron . unresolved

```suggestion
This patch adds some support for using appearance:base in addition to
```

Line 11, Patchset 5 (Latest):elements when the flag is enabled.
David Baron . unresolved

Maybe mention earlier than this that the whole thing is behind a flag?

File third_party/blink/renderer/core/css/resolver/style_adjuster.cc
Line 520, Patchset 5 (Parent): if (select && !select->SupportsBaseAppearance()) {
builder.SetInBaseSelectAppearance(false);
} else {
builder.SetInBaseSelectAppearance(true);
}
David Baron . unresolved

The old code here seems wrong when `select` is null. I think the new code makes sense -- but is there anything to be careful of because you're fixing/changing this?

File third_party/blink/renderer/core/dom/element.h
Line 1829, Patchset 5 (Latest): virtual bool SupportsBaseAppearanceInternal(BaseAppearanceValue) const {
David Baron . unresolved

should `SupportsBaseAppearanceInternal` be in the `protected:` section?

File third_party/blink/renderer/core/html/forms/html_select_element.h
Line 286, Patchset 5 (Latest): static HTMLSelectElement* GetSelectForPopoverPickerElement(const Element*);
David Baron . unresolved

I think you've removed every use of `GetSelectForPopoverPickerElement` so you should remove it.

File third_party/blink/renderer/core/style/computed_style.h
Line 2947, Patchset 5 (Latest): (RuntimeEnabledFeatures::AppearanceBaseEnabled() &&
David Baron . unresolved

Is a flag check really needed here? I'd think maybe a `DCHECK()` would be sufficient, since an unsupported value shouldn't get through to here, I think.

File third_party/blink/renderer/core/style/computed_style.cc
Line 2979, Patchset 5 (Latest): (RuntimeEnabledFeatures::AppearanceBaseEnabled() &&
David Baron . unresolved

same here about flag checks

Open in Gerrit

Related details

Attention is currently required from:
  • Joey Arhar
  • Luke
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Ic77d02ea9cef146649a595752597ebeb787b6d62
Gerrit-Change-Number: 7032708
Gerrit-PatchSet: 5
Gerrit-Owner: Joey Arhar <jar...@chromium.org>
Gerrit-Reviewer: David Baron <dba...@chromium.org>
Gerrit-Reviewer: Joey Arhar <jar...@chromium.org>
Gerrit-Reviewer: Luke <lwa...@igalia.com>
Gerrit-CC: Alexis Menard <alexis...@intel.com>
Gerrit-Attention: Luke <lwa...@igalia.com>
Gerrit-Attention: Joey Arhar <jar...@chromium.org>
Gerrit-Comment-Date: Wed, 15 Oct 2025 19:23:56 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Joey Arhar (Gerrit)

unread,
Oct 17, 2025, 12:56:10 PM (2 days ago) Oct 17
to David Baron, Luke, Chromium LUCI CQ, Alexis Menard, AyeAye, devtools-re...@chromium.org, blink-rev...@chromium.org, blink-re...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, kinuko...@chromium.org, zol...@webkit.org, blink-rev...@chromium.org, blink-revi...@chromium.org, apavlo...@chromium.org, blink-rev...@chromium.org, jmedle...@chromium.org, blink-revie...@chromium.org
Attention needed from David Baron and Luke

Joey Arhar added 7 comments

Commit Message
Line 9, Patchset 5:This patch add some support for using appearance:base in addition to
David Baron . resolved

```suggestion
This patch adds some support for using appearance:base in addition to
```

Joey Arhar

Done

Line 11, Patchset 5:elements when the flag is enabled.
David Baron . resolved

Maybe mention earlier than this that the whole thing is behind a flag?

Joey Arhar

Done

File third_party/blink/renderer/core/css/resolver/style_adjuster.cc
Line 520, Patchset 5 (Parent): if (select && !select->SupportsBaseAppearance()) {
builder.SetInBaseSelectAppearance(false);
} else {
builder.SetInBaseSelectAppearance(true);
}
David Baron . unresolved

The old code here seems wrong when `select` is null. I think the new code makes sense -- but is there anything to be careful of because you're fixing/changing this?

Joey Arhar

Good catch. This change likely fixes the rendering of the following example when CustomizableSelectInPage is enabled:
```
data:text/html,<select multiple><option>normal</option><div style="appearance:base-select"><option style="appearance:base-select"><div>div</div><span>span</span>text
```
I could add a reftest for it if you think its worth testing.

File third_party/blink/renderer/core/dom/element.h
Line 1829, Patchset 5: virtual bool SupportsBaseAppearanceInternal(BaseAppearanceValue) const {
David Baron . resolved

should `SupportsBaseAppearanceInternal` be in the `protected:` section?

Joey Arhar

Done

File third_party/blink/renderer/core/html/forms/html_select_element.h
Line 286, Patchset 5: static HTMLSelectElement* GetSelectForPopoverPickerElement(const Element*);
David Baron . resolved

I think you've removed every use of `GetSelectForPopoverPickerElement` so you should remove it.

Joey Arhar

Done

File third_party/blink/renderer/core/style/computed_style.h
Line 2947, Patchset 5: (RuntimeEnabledFeatures::AppearanceBaseEnabled() &&
David Baron . resolved

Is a flag check really needed here? I'd think maybe a `DCHECK()` would be sufficient, since an unsupported value shouldn't get through to here, I think.

Joey Arhar

Done

File third_party/blink/renderer/core/style/computed_style.cc
Line 2979, Patchset 5: (RuntimeEnabledFeatures::AppearanceBaseEnabled() &&
David Baron . resolved

same here about flag checks

Joey Arhar

Done

Open in Gerrit

Related details

Attention is currently required from:
  • David Baron
  • Luke
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Ic77d02ea9cef146649a595752597ebeb787b6d62
Gerrit-Change-Number: 7032708
Gerrit-PatchSet: 6
Gerrit-Owner: Joey Arhar <jar...@chromium.org>
Gerrit-Reviewer: David Baron <dba...@chromium.org>
Gerrit-Reviewer: Joey Arhar <jar...@chromium.org>
Gerrit-Reviewer: Luke <lwa...@igalia.com>
Gerrit-CC: Alexis Menard <alexis...@intel.com>
Gerrit-Attention: Luke <lwa...@igalia.com>
Gerrit-Attention: David Baron <dba...@chromium.org>
Gerrit-Comment-Date: Fri, 17 Oct 2025 16:56:01 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: David Baron <dba...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy
Reply all
Reply to author
Forward
0 new messages