Commit Graph
36 Commits
Author SHA1 Message Date
Emilio Cobos Álvarez 34b249c82e Bug 2031757 - Rejigger text input / textarea rendering to make field-sizing easier. r=layout-reviewers,devtools-reviewers,fxview-reviewers,firefox-style-system-reviewers,ochameau,jsudiaman,dshin
This also should fix bug 1881942 (placeholder is now scrollable
alongside the textarea).

This makes nsTextControlFrame a subclass of ScrollContainerFrame (with
an inner block), and tweaks layout to match.

It lays out the inner content using block layout and align-content,
rather than bespoke reflow primitives. This makes field-sizing trivial
to implement on top.

This is a bit scary, but simpler in most ways. In particular, it needs
to teach ScrollContainerFrame of the button, because that goes outside
the scrollable area, like scrollbars. That said it needs less
special-cases added than those removed, and it should also be faster
(needs less frames to layout an input with placeholder etc), and match
other browsers better.

The general set-up is:

  <text-control-editing-root/>
  <placeholder/>
  <autofill-preview/>

text-control-editing-root is always inline-block and always displayed
(since it's what grabs the focus / shows the caret). If the
autofill-preview or placeholder are displayed, the editing-root is
zero-width and clipped (note that for placeholder that's guaranteed
because placeholder is only shown with an empty value, but
autofill-preview needs it).

placeholder and autofill-preview are hidden via `display` rather than
visibility. This doesn't make a difference with this patch but it
matters for bug 1977176.

Caret painting needs an extra hop to paint atop the placeholder (no
observable behavior change, but worth calling out).

There is one subtle behavior change, which is that single-line inputs
never report scrollable overflow in the block axis. This matches other
browsers (see the tweak in nsBlockFrame's overflow computation) and is
needed to avoid regressing scrollable-overflow-padding-input.html.

The changes in window_composition_text_querycontent.xhtml are needed
because before this patch, the height of the control editing root was
always the height of the whole textarea. The characters you're composing
might legitimately be taller than the line. Bump the line height so that
that doesn't happen in this test.

Differential Revision: https://phabricator.services.mozilla.com/D293666
2026-04-16 17:09:40 +00:00
Serban Stanca 5d4176345b Revert "Bug 2031757 - Rejigger text input / textarea rendering to make field-sizing easier. r=layout-reviewers,devtools-reviewers,fxview-reviewers,firefox-style-system-reviewers,ochameau,jsudiaman,dshin" for causing several failures.
This reverts commit 81ef425716.
2026-04-16 09:31:32 +00:00
Emilio Cobos Álvarez 81ef425716 Bug 2031757 - Rejigger text input / textarea rendering to make field-sizing easier. r=layout-reviewers,devtools-reviewers,fxview-reviewers,firefox-style-system-reviewers,ochameau,jsudiaman,dshin
This also should fix bug 1881942 (placeholder is now scrollable
alongside the textarea).

This makes nsTextControlFrame a subclass of ScrollContainerFrame (with
an inner block), and tweaks layout to match.

It lays out the inner content using block layout and align-content,
rather than bespoke reflow primitives. This makes field-sizing trivial
to implement on top.

This is a bit scary, but simpler in most ways. In particular, it needs
to teach ScrollContainerFrame of the button, because that goes outside
the scrollable area, like scrollbars. That said it needs less
special-cases added than those removed, and it should also be faster
(needs less frames to layout an input with placeholder etc), and match
other browsers better.

The general set-up is:

  <text-control-editing-root/>
  <placeholder/>
  <autofill-preview/>

text-control-editing-root is always inline-block and always displayed
(since it's what grabs the focus / shows the caret). If the
autofill-preview or placeholder are displayed, the editing-root is
zero-width and clipped (note that for placeholder that's guaranteed
because placeholder is only shown with an empty value, but
autofill-preview needs it).

placeholder and autofill-preview are hidden via `display` rather than
visibility. This doesn't make a difference with this patch but it
matters for bug 1977176.

Caret painting needs an extra hop to paint atop the placeholder (no
observable behavior change, but worth calling out).

There is one subtle behavior change, which is that single-line inputs
never report scrollable overflow in the block axis. This matches other
browsers (see the tweak in nsBlockFrame's overflow computation) and is
needed to avoid regressing scrollable-overflow-padding-input.html.

The changes in window_composition_text_querycontent.xhtml are needed
because before this patch, the height of the control editing root was
always the height of the whole textarea. The characters you're composing
might legitimately be taller than the line. Bump the line height so that
that doesn't happen in this test.

Differential Revision: https://phabricator.services.mozilla.com/D293666
2026-04-16 08:10:39 +00:00
agoloman dfead40619 Revert "Bug 2031757 - Rejigger text input / textarea rendering to make field-sizing easier. r=layout-reviewers,devtools-reviewers,fxview-reviewers,firefox-style-system-reviewers,ochameau,jsudiaman,dshin" for causing crashtest assertions @399262.html.
This reverts commit 51d51c3b33.
2026-04-16 00:28:13 +00:00
Emilio Cobos Álvarez 51d51c3b33 Bug 2031757 - Rejigger text input / textarea rendering to make field-sizing easier. r=layout-reviewers,devtools-reviewers,fxview-reviewers,firefox-style-system-reviewers,ochameau,jsudiaman,dshin
This also should fix bug 1881942 (placeholder is now scrollable
alongside the textarea).

This makes nsTextControlFrame a subclass of ScrollContainerFrame (with
an inner block), and tweaks layout to match.

It lays out the inner content using block layout and align-content,
rather than bespoke reflow primitives. This makes field-sizing trivial
to implement on top.

This is a bit scary, but simpler in most ways. In particular, it needs
to teach ScrollContainerFrame of the button, because that goes outside
the scrollable area, like scrollbars. That said it needs less
special-cases added than those removed, and it should also be faster
(needs less frames to layout an input with placeholder etc), and match
other browsers better.

The general set-up is:

  <text-control-editing-root/>
  <placeholder/>
  <autofill-preview/>

text-control-editing-root is always inline-block and always displayed
(since it's what grabs the focus / shows the caret). If the
autofill-preview or placeholder are displayed, the editing-root is
zero-width and clipped (note that for placeholder that's guaranteed
because placeholder is only shown with an empty value, but
autofill-preview needs it).

placeholder and autofill-preview are hidden via `display` rather than
visibility. This doesn't make a difference with this patch but it
matters for bug 1977176.

Caret painting needs an extra hop to paint atop the placeholder (no
observable behavior change, but worth calling out).

There is one subtle behavior change, which is that single-line inputs
never report scrollable overflow in the block axis. This matches other
browsers (see the tweak in nsBlockFrame's overflow computation) and is
needed to avoid regressing scrollable-overflow-padding-input.html.

The changes in window_composition_text_querycontent.xhtml are needed
because before this patch, the height of the control editing root was
always the height of the whole textarea. The characters you're composing
might legitimately be taller than the line. Bump the line height so that
that doesn't happen in this test.

Differential Revision: https://phabricator.services.mozilla.com/D293666
2026-04-15 23:25:11 +00:00
Eitan Isaacson 809deced26 Bug 1992028 - Implement details-from attribute. r=Jamie
This allows ATs to distinguish the source of details relations.

Differential Revision: https://phabricator.services.mozilla.com/D271153
2025-11-04 20:20:00 +00:00
Emilio Cobos Álvarez fd1f57b58d Bug 1873301 - Remove nsHTMLButtonControlFrame. r=dholbert,layout-reviewers,dshin
This removes the implementation of nsHTMLButtonControlFrame, instead
reusing nsBlockFrame + align-content (or the relevant display type for
flex / grid / columns / etc).

This matches what Blink does and, for the most part, it is trivial.
It requires moving some special cases around, and override inline flow
display, tho so that buttons don't suddenly start fragmenting in the
inline axis.

It adds a tiny fix for a writing-mode mismatch in
nsBlockFrame::AlignContent(), covered by
layout/reftests/writing-mode/1138356-1-button-contents-alignment.html

containing-block-change-button tests are tweaked to avoid overflowing
the 600px viewport from WPT reftests causing scrollbar fuzziness.

contain-layout-baseline-005.html removes the <select> element just like
https://chromium-review.googlesource.com/c/chromium/src/+/5479489
removed the <button>s, since they align the same now, added a test for
that.

Differential Revision: https://phabricator.services.mozilla.com/D257149
2025-07-15 11:05:54 +00:00
James Teh 5081580270 Bug 1863480: Expose all relations via xpcAccessible::GetRelations. r=morgan,devtools-reviewers,nchevobbe
Previously, only an outdated hard-coded subset was being exposed.
This meant that missing relations such as details and error message were not exposed in the DevTools Accessibility Inspector.
We now expose all relations in the RelationType enum so we don't need to keep this up to date.

Differential Revision: https://phabricator.services.mozilla.com/D193008
2023-11-09 05:19:01 +00:00
Mark Banner 0666077666 Bug 1826062 - Automatic fixes for upgrading Prettier to 2.8.8. r=mossop,perftest-reviewers,webcompat-reviewers,geckoview-reviewers,denschub,devtools-reviewers,sparky,calu
Differential Revision: https://phabricator.services.mozilla.com/D177027
2023-05-20 12:26:53 +00:00
Mark Banner 91fde42f7b Bug 1826062 - Automatic fixes for Prettier 2.0.5 upgrade. r=mossop,perftest-reviewers,webcompat-reviewers,geckoview-reviewers,denschub,devtools-reviewers,sparky,owlish
Differential Revision: https://phabricator.services.mozilla.com/D177025
2023-05-20 12:26:49 +00:00
James Teh 3472c75c31 Bug 1572512: Use ComputedARIARole for Dev Tools. r=eeejay,devtools-reviewers,nchevobbe
Dev Tools is primarily targeted at web developers.
Web developers are most comfortable with ARIA roles, rather than Gecko internal role strings.
This is especially true for landmarks, which map to a single landmark role in Gecko, but most Dev Tools users expect separate ARIA roles: main, navigation, etc.
We fall back to a Gecko role string for roles which can't be mapped to ARIA; e.g. iframe.

Differential Revision: https://phabricator.services.mozilla.com/D175585
2023-04-25 07:06:35 +00:00
Stanca Serban 13b7e5c226 Backed out 8 changesets (bug 1828816, bug 1822112, bug 1572512, bug 1824935) for causing multiple failures. CLOSED TREE
Backed out changeset 8886f7011919 (bug 1822112)
Backed out changeset df566bce405d (bug 1828816)
Backed out changeset 5857e8ef63e1 (bug 1828816)
Backed out changeset 50324d39e9c1 (bug 1822112)
Backed out changeset 7f6bee1959fb (bug 1572512)
Backed out changeset 4effd0bdc4db (bug 1824935)
Backed out changeset a8faf17fcce8 (bug 1824935)
Backed out changeset 0370b0032eb6 (bug 1824935)
2023-04-25 07:45:58 +03:00
James Teh 4a20455360 Bug 1572512: Use ComputedARIARole for Dev Tools. r=eeejay,devtools-reviewers,nchevobbe
Dev Tools is primarily targeted at web developers.
Web developers are most comfortable with ARIA roles, rather than Gecko internal role strings.
This is especially true for landmarks, which map to a single landmark role in Gecko, but most Dev Tools users expect separate ARIA roles: main, navigation, etc.
We fall back to a Gecko role string for roles which can't be mapped to ARIA; e.g. iframe.

Differential Revision: https://phabricator.services.mozilla.com/D175585
2023-04-24 23:35:51 +00:00
Eitan Isaacson 1924886ca7 Bug 1672694 - P1: Query layout for selectable text state. r=morgan,Jamie,yzen
The SELECTABLE_TEXT state is currently under-utilized and probably wrong, since it simply relies on testing if a hypertext has any text. A more correct reflection of the state should be taken from layout's IsSelectable method.

Note, even if an element is styled `user-select: none`, the text will still be keyboard selectable if it is editable (eg. input or contenteditable), so we should consider that SELECTABLE_TEXT.

Differential Revision: https://phabricator.services.mozilla.com/D95783
2020-11-04 19:56:55 +00:00
Yura Zenevich ceede50b11 Bug 1599806 - update accessibility actors tests to support parent accessibility actor. r=ochameau
Differential Revision: https://phabricator.services.mozilla.com/D58808
2020-03-06 16:28:27 +00:00
Yura Zenevich 54fd6b45fe Bug 1599806 - Move accessible walker creation into accessibility front's bootsrap method. Do not explicitly destroy accessibility walker front and let accessibility actor manage its lifecycle fully. r=ochameau,jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D58027
2020-02-21 04:34:58 +00:00
Victor Porof 2221048633 Bug 1561435 - Format devtools/server/, a=automatic-formatting
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D35891
2019-07-05 11:26:00 +02:00
Emilio Cobos Álvarez aedb5dc6a7 Bug 1539469 - Make all input elements display: inline-block, for compat with other UAs. r=mats
See https://github.com/whatwg/html/issues/4082 for the data and some comments
from Boris and David.

I didn't look into fixing the font-inflation reftests, see bug 1540176 for that.

Differential Revision: https://phabricator.services.mozilla.com/D25566
2019-06-04 15:39:47 +00:00
Yura Zenevich 0b6423c88b Bug 1546555 - make AccessibleActor form data a smallest set of accessible data necessary for the a11y panel to work. Allow for fetching full accessible object data via new hydrate method. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D28752
2019-04-27 13:33:17 +00:00
Yura Zenevich ff8d41f043 Bug 1507870 - add support for taking a snapshot of the subtree of the accessible object. r=pbro
MozReview-Commit-ID: JdZe0N3ot4c

Differential Revision: https://phabricator.services.mozilla.com/D12502
2018-11-30 14:55:12 +00:00
Mark Banner 3d6aaad3f5 Bug 1486741 - Enable ESLint rule comma-dangle for all of mozilla-central (automatic fixes). r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D8389
2018-10-19 12:55:39 +00:00
Yura Zenevich 85875eca92 Bug 1492866 - add accessible relations to accessibility panel sidebar. r=pbro
MozReview-Commit-ID: 5u8SRnlnFyN

Differential Revision: https://phabricator.services.mozilla.com/D7208
2018-10-11 14:51:35 +00:00
Ciure Andrei 80116c980d Backed out changeset 2084a929ec4c (bug 1492866) for browser_accessibility_walker.js faiures CLOSED TREE 2018-10-10 23:46:13 +03:00
Yura Zenevich 41a027c596 Bug 1492866 - add accessible relations to accessibility panel sidebar. r=pbro
MozReview-Commit-ID: 5u8SRnlnFyN

Differential Revision: https://phabricator.services.mozilla.com/D7208
2018-10-10 19:18:03 +00:00
yulia 8cf0c5f96e Bug 1487428 - Use target.getFront in server browser tests; r=ochameau
Differential Revision: https://phabricator.services.mozilla.com/D6768
2018-09-28 05:46:29 +00:00
Bogdan Tara f1651eb098 Backed out changeset e7624782898d (bug 1487428) for test_inspector-insert.html failures CLOSED TREE 2018-09-27 23:38:04 +03:00
yulia 1cded80d53 Bug 1487428 - Use target.getFront in server browser tests; r=ochameau
Differential Revision: https://phabricator.services.mozilla.com/D6768
2018-09-27 15:18:08 +00:00
Yura Zenevich d9fd59545e Bug 1467643 - remove 'help' accessibility property from accessibility inspector. r=pbro
MozReview-Commit-ID: LtmD38VC8sN
2018-06-19 10:17:19 -04:00
Yura Zenevich 80bc0e87cc Bug 1467381 - check Accessible::AccessKey and Accessible::KeyboardShortcut when filling up keyboardShortcut for accessible actor. r=pbro
MozReview-Commit-ID: IkqfyL5cGGh
2018-06-19 09:52:07 -04:00
Julian Descottes 82711b9a8f Bug 1454696 - Run eslint --fix for prefer-const;r=yulia
MozReview-Commit-ID: F6xUXCgdRE4
2018-06-01 12:36:09 +02:00
J. Ryan Stinnett 8d1c817851 Bug 1443081 - Apply spacing via eslint --fix for DevTools. r=jdescottes
MozReview-Commit-ID: 2RVNt140Zte
2018-03-12 13:44:41 -05:00
Yura Zenevich 41c7179427 Bug 1428430 - added enable, disable, highlighter, picker a11y functionality. r=pbro, ochameau
MozReview-Commit-ID: 7QsY75oJCtW
2018-03-09 10:01:55 -05:00
Dorel Luca 08edc9df4a Backed out 2 changesets (bug 1428430) for devtools failure on /builds/worker/workspace/build/src/accessible/base/nsAccessibilityService.cpp:1045 on a CLOSED TREE
Backed out changeset 7d9813d8cb47 (bug 1428430)
Backed out changeset a638660a49fa (bug 1428430)
2018-03-02 01:48:52 +02:00
Yura Zenevich dcd6b5e7d8 Bug 1428430 - added enable, disable, highlighter, picker a11y functionality. r=pbro, ochameau
MozReview-Commit-ID: 7QsY75oJCtW
2018-03-01 10:06:14 -05:00
Alexandre Poirot 007c1005e2 Bug 1437828 - Convert Task.jsm to async/await in devtools/server. r=jryans
MozReview-Commit-ID: I1GlhEdco3H
2018-02-13 03:36:40 -08:00
Yura Zenevich 195a6537f6 Bug 1151468 - add accessibility spec/actor/front to devtools. r=pbro
MozReview-Commit-ID: Ln1R8e04mGR
2017-08-31 23:11:23 -04:00