This commit makes two significant changes:
1. Refactors AutofillProfileAutoComplete Logic to AutoCompleteChild:
Migrates logic from AutofillProfileAutoComplete to AutoCompleteChild,
transitioning state management from a per-process to a per-frame basis.
This lays the groundwork for future support of autofill functionality
across iframes.
2. Implements the Concept of "Autocomplete Entry Providers":
Introduces a framework for autocomplete providers (e.g., FormAutofill, LoginManager, FormHistory)
to integrate with the autocomplete system through a set of APIs, including:
JSWindowActorChild:
- string actorName()
- bool shouldSearchForAutoComplete(element);
- jsval getAutoCompleteSearchOption(element);
- jsval recordToAutoCompleteResult(searchString, element, record);
JSWindowActorParent:
- searchAutoCompleteEntries(searchString, options)
Besides implement the above API, autocomplete provider must use `markAsAutoCompletableField` in
AutoCompleteChild to register fields for autocomplete, enabling the FormFillController to
initiate autocomplete searches when users click on the input field.
Note: This patch only integrates FormAutofill, integrating FormHistory and
LoginManager will be in other patches.
Differential Revision: https://phabricator.services.mozilla.com/D205444
Right now, we don't use top level transparent windows (they're
completely unused).
This removes some code that causes trouble when reintroducing them.
Depends on D207297
Differential Revision: https://phabricator.services.mozilla.com/D207298
No behavior change intended. I plan to use this to hide the titlebar
buttons when drawing to the titlebar (we currently draw on top of them).
But seems worth factoring out regardless.
Differential Revision: https://phabricator.services.mozilla.com/D207297
When `BASESCRIPT`, `SELFHOSTLAZY`, and `NATIVE_JIT_ENTRY` are placed into adjacent
flags, the immediate for `FunctionFlags::HasJitEntryFlags()` can be encoded directly
into the test-condition.
Before this change:
```
ldr w16, [x12, #24]
mov w17, #0x460
tst w16, w17
b.eq -> 1030f
```
The immediate `0x460` for `FunctionFlags::HasJitEntryFlags()` needs be moved into
a scratch register.
After this change:
```
ldr w16, [x12, #24]
tst w16, #0xe0
b.eq -> 1030f
```
The immediate `0xe0` for `FunctionFlags::HasJitEntryFlags()` is encoded directly
into the test-condition.
Depends on D207135
Differential Revision: https://phabricator.services.mozilla.com/D207136
Always include `NATIVE_JIT_ENTRY` to keep `MacroAssembler::branchIfFunctionHas{No,}JitEntry()`
consistent with `FunctionFlags::hasJitEntry()`.
Differential Revision: https://phabricator.services.mozilla.com/D207135
CodeGenerator.cpp:
Split `emitCallNative` into two methods, so we can reuse it for `emitApplyNative`.
Also add some comments how `NativeExitFrameLayout` is constructed on the stack and
add an assertion that the native C++ function returned an object when constructing.
`emitCallNative` uses `setupAlignedABICall`, so we now need to align the Value
arguments, this happens through the new `emitAlignStackForApplyNative` method.
LIR-shared.h, Lowering.cpp:
The callee doesn't need to be stored which frees up one register, so we can
allocate an additional temp-register. This matches the approach taken for
`LCallNative`. The additional temp register is needed, because `emitCallNative`
requires four registers.
VMFunctions:
- Remove no longer used `InvokeNativeFunction`.
Differential Revision: https://phabricator.services.mozilla.com/D207005
This implements the behavior proposed in https://github.com/w3c/csswg-drafts/issues/10193.
Pending discussion of the issue there, and as input to that eventual debate, I'd like to
try enabling this behavior on Nightly to see how it goes in the wild.
This results in a bunch of failures on existing reftests, in an entirely predictable way,
because any text with letter-spacing gets offset slightly, and no longer matches with
references that assumed glyphs remain flush-left in their advance. If we do adopt the
symmetrical model across the web platform, corresponding test adjustments will be needed.
(We also get a few new passes, on tests involving letter-spacing + bidi, which is the case
where our legacy behavior is particularly poor, and the symmetrical model resolves the
issues.)
For the time being, with the pref change only on Nightly, I propose to just add pref
overrides in the manifests for the affected tests so that they stay green for both Nightly
and non-Nightly builds.
Differential Revision: https://phabricator.services.mozilla.com/D207421
Ths patch introduces a new class called `CrossShadowBoundaryRange` to
make cross shadow boundary range related stuff can be isolated into a
single class.
It also tweaks a few functions along the call stack, the goal here
is to make sure nsContentUtils::IsPointInSelection can detect points
in ShadowDOM selection.
There's an additional change to `SelectionUtils.sys.mjs` to make sure
the correct context menu items are displayed when the current selection
crosses the boundary.
Differential Revision: https://phabricator.services.mozilla.com/D204080
Adds the functionality to try another source language from the
unsupported language error state in the SelectTranslationsPanel.
Differential Revision: https://phabricator.services.mozilla.com/D207200
Removes test cases that open the panel to an idle state by
opening to an unsupported language, to instead make room for
the real "unsupported language" tests for the functionality
added in this patch stack.
Differential Revision: https://phabricator.services.mozilla.com/D207098
Allows the SelectTranslationsPanel to have the same
from-language and to-language selected, in which case
the source text will be passed through unaltered as
the same-language translation.
Differential Revision: https://phabricator.services.mozilla.com/D207029
Refactors some of the SelectTranslationsPanel test
assertions to explicitly wait for the panel to fire
an event upon changing state.
Differential Revision: https://phabricator.services.mozilla.com/D207028
Adds the ability for the Translator abstraction to be
a PassthroughTranslator in the case where the source
language and the target language are the same and the
consumer wants the behavior of passing the source text
directly through as a same-language translation.
Differential Revision: https://phabricator.services.mozilla.com/D207027
When picking nodes while holding Shift, we're calling
nodesFromRect, which returns a list of nodes, in no
particular order.
Instead of randomly picking the first one in the list,
return the first one that is not a parent of any of the
other matching elements.
This should potentially give us the deepest element (even
if in some situation we might miss "deeper" nodes from other
branches than the first "only child").
Differential Revision: https://phabricator.services.mozilla.com/D207256