Closed Bug 1867743 Opened 2 years ago Closed 3 months ago

[popover] support popover=hint

Categories

(Core :: DOM: Core & HTML, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
149 Branch
Size Estimate XS
Tracking Status
relnote-firefox --- 149+
firefox149 --- fixed

People

(Reporter: zsun, Assigned: keithamus)

References

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

Details

(Keywords: dev-doc-complete, parity-chrome, parity-safari, Whiteboard: [platform-feature], [wptsync upstream])

User Story

web-feature: popover-hint

Attachments

(8 files, 1 obsolete file)

48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review

Spec in discussion:
https://github.com/whatwg/html/pull/9778

Test affected:
popover-types-with-hints.tentative.html

Blocks: popover
Assignee: nobody → mozilla
Status: NEW → ASSIGNED
User Story: (updated)
Whiteboard: [platform-feature]
Size Estimate: --- → XS

These methods are never used in the codebase.

Adding code comments reflecting each line of the spec helps us confirm
behaviour adheres to existing spec, highlights where we're diverging,
and also shows us where we need to introduce new behaviour. It also
provides a snapshot - if the spec introduces new prose we can easily see
where we're out of date.

This commit has no functional changes, it's just code comments.

This splits out the HidePopoverStackUntil function from HideAllPopoversUntil.
Splitting this out isn't strictly necessary as it's only called once at current,
but as we support popover=hint it'll need to be called twice, and having it
split out also makes it clearer when checking our code against the spec.

As a consequence of this split, the closeAllOpenPopovers lambda also
needs to be split into a function - CloseEntirePopoverList. This
is a separate algorithm in the spec, but also it's called from both
HidePopoverStackUntil and HideAllPopoversUntil.

PopoverOpenedInMode forces popovers to have a fixed state during their opened
lifetime, which may be different from the attribute state. They can use the
PopoverAttributeState as they can only be opened in modes that match their
attribute state.

This change introduces this new mode in the minimum ally viable way -
introducing it just for the check in HideAllPopoversUntil step 7; and the
callsites where it is set.

Some of the steps in ShowPopover were already implemented, but in slightly
different ways compared to the current state of the spec. This commit moves
those particular lines of code around to be more aligned to the spec, in
preparation for popover=hint.

There are no functional changes in this commit, behaviour should be
identical.

The methods CloseEntirePopoverList, HidePopoverStackUntil, AutoPopoverList, and
IsAutoPopover all either take a popover list (of hint or auto) or have
equivalent methods (e.g. HintPopoverList). In order to introduce popover=hint,
this change refactors these methods to take a PopoverAttributeState which
determines the "opened in mode" to filter the popover list by, ensuring that
these methods can act on either Auto or Hint popovers.

This change has no behavioural changes - everything should function the
same - but it is preparatory work for popover=hint.

Attachment #9405540 - Attachment description: WIP: Bug 1867743 - Add popover=hint r?#dom-core → Bug 1867743 - Part 7: Implement popover=hint r?#dom-core
Pushed by kcirkel@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/6d5ada44aabf https://hg.mozilla.org/integration/autoland/rev/9c7385b8d7a8 Part 6: Refactor popover methods to no longer hardcode to Auto mode r=dom-core,smaug
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Status: REOPENED → ASSIGNED
Attachment #9533220 - Attachment description: WIP: Bug 1867743 - Part 8: Implement accessible relations for hint popovers → Bug 1867743 - Part 8: Implement accessible relations for hint popovers r?#accessibility-frontend-reviewers
Target Milestone: 148 Branch → 149 Branch
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/57491 for changes under testing/web-platform/tests
Whiteboard: [platform-feature] → [platform-feature], [wptsync upstream]
Pushed by sstanca@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/f0c9c81272c3 https://hg.mozilla.org/integration/autoland/rev/210a5405219d Revert "Bug 1867743 - Part 7: Implement popover=hint r=dom-core,smaug" for causing linting opt failures.

Reverted this because it was causing linting opt failures.

  • Revert link
  • Push with failures
  • Failure Log
  • Failure line: TEST-UNEXPECTED-ERROR | /builds/worker/checkouts/gecko/testing/web-platform/tests/html/semantics/popovers/WEB_FEATURES.yml:0 | The WEB_FEATURES.yml file references a test that does not exist: '!popover-light-dismiss-hint.html' (MISSING-WEB-FEATURES-FILE)
Flags: needinfo?(mozilla)
Upstream PR merged by moz-wptsync-bot
Flags: needinfo?(mozilla)
Pushed by agoloman@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/9e0669996cc1 https://hg.mozilla.org/integration/autoland/rev/ed0c67da9bae Revert "Bug 1867743 - Part 8: Implement accessible relations for hint popovers r=accessibility-platform-reviewers,Jamie" for causing ba failures @browser_relations_domain_popoverinvokerisdetails.js.

Backed out for causing ba failures @browser_relations_domain_popoverinvokerisdetails.js.

Flags: needinfo?(mozilla)
Flags: needinfo?(mozilla)
Attachment #9405540 - Attachment description: Bug 1867743 - Part 7: Implement popover=hint r?#dom-core → Bug 1867743 - Part 7: Implement popover=hint r=dom-core,smaug
Attachment #9533220 - Attachment description: Bug 1867743 - Part 8: Implement accessible relations for hint popovers r?#accessibility-frontend-reviewers → Bug 1867743 - Part 8: Implement accessible relations for hint popovers r=accessibility-platform-reviewers,Jamie
Pushed by nfay@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/daf8354afc54 https://hg.mozilla.org/integration/autoland/rev/3f9b4a1f848c Revert "Bug 1867743 - Part 8: Implement accessible relations for hint popovers r=accessibility-platform-reviewers,Jamie" for causing reftest failures @ GlobalStyleSheetCache.cpp

Backed out for causing reftest failures @ GlobalStyleSheetCache.cpp

Backout link

Push with failures

Failure log

Failure log - bc

Flags: needinfo?(mozilla)
Flags: needinfo?(mozilla)
Status: ASSIGNED → RESOLVED
Closed: 4 months ago3 months ago
Resolution: --- → FIXED

Please request an addition to 149 release notes, thanks.
https://wiki.mozilla.org/Release_Management/Release_Notes_Nomination

Flags: needinfo?(mozilla)

Release Note Request (optional, but appreciated)
[Why is this notable]: Added support for popover=hint
[Affects Firefox for Android]: Yes
[Suggested wording]: Added support for popover=hint
[Links (documentation, blog post, etc)]: https://developer.mozilla.org/en-US/docs/Web/API/Popover_API/Using#using_hint_popover_state

relnote-firefox: --- → ?
Flags: needinfo?(mozilla)

Note added to our 149 nightly release notes in the Web Platform section with this wording:

Added support for the HTML attribute popover="hint".

I am keeping the relnote-firefox? flag set until we include this note in our final 149 release notes, thanks.

QA Whiteboard: [qa-triage-done-c150/b149]

Related issues and pull requests

A patch has been attached on this bug, which was already closed. Filing a separate bug will ensure better tracking. If this was not by mistake and further action is needed, please alert the appropriate party. (Or: if the patch doesn't change behavior -- e.g. landing a test case, or fixing a typo -- then feel free to disregard this message)

Depends on: 2029974
Attachment #9557321 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: