Open Bug 1887430 Opened 1 year ago Updated 9 months ago

Failing WPT css/css-ui/user-select-none-in-editable.html

Categories

(Core :: Layout: Form Controls, defect)

defect

Tracking

()

People

(Reporter: twisniewski, Unassigned)

References

(Depends on 1 open bug, Blocks 1 open bug, )

Details

[Mass-triaging the batch of recently filed "Failing WPT" bugs as S3. If you want to filter out this bugmail, you can search for the string "volatile knot".]

Severity: -- → S3

Live link to test: http://wpt.live/css/css-ui/user-select-none-in-editable.html

It looks like the issue here is that we're honoring user-select:none in the editable element, when we should not, per this spec text (which depends on support for the contain value for this property):

The used value is the same as the computed value, except:
on editable elements where the used value is always contain regardless of the computed value

https://drafts.csswg.org/css-ui/#valdef-user-select-none

Depends on: 1036853

Hmm, it looks like we've already got a special-case that purports to implement the spec text that I quoted in comment 2:

https://searchfox.org/mozilla-central/rev/a965e3c683ecc035dee1de72bd33a8d91b1203ed/layout/generic/nsIFrame.cpp#4600,4605-4610,4617-4621

static StyleUserSelect UsedUserSelect(const nsIFrame* aFrame) {
...
  // Per https://drafts.csswg.org/css-ui-4/#content-selection:
  //
  // The used value is the same as the computed value, except:
  //
  //    1 - on editable elements where the used value is always 'contain'
  //        regardless of the computed value
...
  if (aFrame->IsTextInputFrame() || IsEditingHost(aFrame)) {
    // We don't implement 'contain' itself, but we make 'text' behave as
    // 'contain' for contenteditable and <input> / <textarea> elements anyway so
    // this is ok.
    return StyleUserSelect::Text;

Anyway, this is a breadcrumb to take a look at here... either we're not triggering this^ return statement for some reason, or the alluded-to we make 'text' behave as 'contain' code isn't working properly.

You need to log in before you can comment on or make changes to this bug.