This event is used for shield-study which has finished, so we could remove it.
Differential Revision: https://phabricator.services.mozilla.com/D14810
--HG--
extra : moz-landing-system : lando
Use more proper name for actor which will handle all autoplay related events.
Differential Revision: https://phabricator.services.mozilla.com/D14796
--HG--
rename : toolkit/actors/AudibleAutoplayChild.jsm => toolkit/actors/AutoplayChild.jsm
extra : moz-landing-system : lando
This patch moves all UA Widget calls to helper functions in Element.cpp. The helper function AttachAndSetUAShadowRoot sets the shadow root in a runnable, so that it is in the same order of NotifyUAWidget* runnables.
Differential Revision: https://phabricator.services.mozilla.com/D13479
--HG--
extra : moz-landing-system : lando
This patch move the actual widget construction to a onsetup method, allow UAWidgetsChild to hold the reference of the widget instance even if the actual setup (happens in the onsetup call) throws. With the reference of the widget kept, UAWidgetsChild will finally able to call its destructor later on.
Depends on D13607
Differential Revision: https://phabricator.services.mozilla.com/D13608
--HG--
extra : moz-landing-system : lando
I missed the failure in browser_selectpopup_colors.js since it doesn't run on
Linux. Fix the getComputedStyle usage in that code by using
getDefaultComputedStyle, which is what it really wants.
Also, do a bit of cleanup while at it: uaBackgroundColor was unused, and uaColor
was wrong (we don't override the ua color of the <option> element, it just
inherits, so it's the same as the <select> color, and that's what we were
comparing it against anyway).
Differential Revision: https://phabricator.services.mozilla.com/D13956
I missed the failure in browser_selectpopup_colors.js since it doesn't run on
Linux. Fix the getComputedStyle usage in that code by using
getDefaultComputedStyle, which is what it really wants.
Also, do a bit of cleanup while at it: uaBackgroundColor was unused, and uaColor
was wrong (we don't override the ua color of the <option> element, it just
inherits, so it's the same as the <select> color, and that's what we were
comparing it against anyway).
Differential Revision: https://phabricator.services.mozilla.com/D13956
Currently, some "input" event dispatchers in our script dispatch "input" event
with UIEvent. This is completely wrong. For conforming to HTML spec, Event
is proper event. Additionally, for conforming to Input Events, InputEvent
is proper event only on <textarea> or <input> element which has a single line
editor.
For making us to maintain easier, this patch adds new API, "isInputEventTarget"
to MozEditableElement which returns true when "input" event dispatcher should
use InputEvent for the input element.
Finally, this makes some dispatchers use setUserInput() instead of
setting value and dispatching event by themselves. This also makes
us to maintain them easier.
Note that this does not touch "input" event dispatchers which dispatch events
only for chrome (such as URL bar, some pages in about: scheme) for making
this change safer as far as possible.
Differential Revision: https://phabricator.services.mozilla.com/D12247
--HG--
extra : moz-landing-system : lando
This patch moves the marquee bindings from xbl-marquee.xml to marquee.js and converts them to a UA Widget.
The contenteditable bindings are dropped, replaced with a styling rule that will fix the position of the scrolling text.
Inline styles have been moved to the stylesheet so usage of display: -moz-box can continue to be parsed.
test_bug840098.html is deleted because it is only valid under the context of in-content XBL bindings.
Differential Revision: https://phabricator.services.mozilla.com/D10385
--HG--
rename : layout/style/xbl-marquee/xbl-marquee.css => toolkit/content/widgets/marquee.css
rename : layout/style/xbl-marquee/xbl-marquee.xml => toolkit/content/widgets/marquee.js
extra : moz-landing-system : lando
This patch moves the marquee bindings from xbl-marquee.xml to marquee.js and converts them to a UA Widget.
The contenteditable bindings are dropped, replaced with a styling rule that will fix the position of the scrolling text.
Inline styles have been moved to the stylesheet so usage of display: -moz-box can continue to be parsed.
test_bug840098.html is deleted because it is only valid under the context of in-content XBL bindings.
Differential Revision: https://phabricator.services.mozilla.com/D10385
--HG--
rename : layout/style/xbl-marquee/xbl-marquee.css => toolkit/content/widgets/marquee.css
rename : layout/style/xbl-marquee/xbl-marquee.xml => toolkit/content/widgets/marquee.js
extra : moz-landing-system : lando
In order to know whether we have temporary autoplay permission without creating a request, we need to
cache its state in the outer window so that we can get the correct returned value for AutoplayPolicy::IsAllowedToPlay().
Differential Revision: https://phabricator.services.mozilla.com/D7013
--HG--
extra : moz-landing-system : lando
Since temporary permissions are only stored in the front-end side, we can't know whether we have
allowed page to autoplay or not without sending a request. Therefore, we want to notify the back-end
side when the temporary permissions changed.
Differential Revision: https://phabricator.services.mozilla.com/D7011
--HG--
extra : moz-landing-system : lando
This patch modifies UAWidgetsChild so that when the call into the UA Widget
script throws, it could correctly clean up the Shadow DOM, to avoid leaving
the DOM in a half-broken state.
This is needed because of bug 1506300 will cause the constructor of the videocontrols
UA Widget to throw, in our specific test case.
This exception also happens when the videocontrols XBL binding initializes,
but the way the XBL service calls into the XBL binding allow it to reach a usable
but a half-broken state, while our current approach will cause the UA Widget DOM
to be inserted twice, and layout to assert.
The new clean-up approach here will make UA Widget completely absent when the
constructor throws until the cause of the exception is fixed.
Differential Revision: https://phabricator.services.mozilla.com/D11542
--HG--
extra : moz-landing-system : lando
This patch modifies UAWidgetsChild so that when the call into the UA Widget
script throws, it could correctly clean up the Shadow DOM, to avoid leaving
the DOM in a half-broken state.
This is needed because of bug 1506300 will cause the constructor of the videocontrols
UA Widget to throw, in our specific test case.
This exception also happens when the videocontrols XBL binding initializes,
but the way the XBL service calls into the XBL binding allow it to reach a usable
but a half-broken state, while our current approach will cause the UA Widget DOM
to be inserted twice, and layout to assert.
The new clean-up approach here will make UA Widget completely absent when the
constructor throws until the cause of the exception is fixed.
Differential Revision: https://phabricator.services.mozilla.com/D11542
--HG--
extra : moz-landing-system : lando
Part I of bug 1496242 was not implemented correctly as it accesses the
nsIDateTimeInputArea methods directly on the <datetimebox> element object.
This won't work because the XBL binding is run in a non-chrome scope.
The methods it implemented are exposed thus had to be accessed via
wrappedJSObject.
Object pass to setValueFromPicker() therefore has to clone into the content scope.
We can be sure that the methods called are implemented by the XBL binding,
because the web content should not have access to <datetimebox>, which is a NAC.
A small clean-up is included in the patch also, removing the useless 3rd argument
to the CustomEvent constructor.
Tests related to the datetime input is duplicated and run with UA Widget disabled
to ensure the XBL binding continue to work.
Differential Revision: https://phabricator.services.mozilla.com/D10947
--HG--
rename : dom/html/test/forms/chrome.ini => dom/html/test/forms/xbl/chrome.ini
rename : dom/html/test/forms/mochitest.ini => dom/html/test/forms/xbl/mochitest.ini
rename : dom/html/test/forms/test_autocompleteinfo.html => dom/html/test/forms/xbl/test_autocompleteinfo.html
rename : dom/html/test/forms/test_input_attributes_reflection.html => dom/html/test/forms/xbl/test_input_attributes_reflection.html
rename : dom/html/test/forms/test_input_date_bad_input.html => dom/html/test/forms/xbl/test_input_date_bad_input.html
rename : dom/html/test/forms/test_input_date_key_events.html => dom/html/test/forms/xbl/test_input_date_key_events.html
rename : dom/html/test/forms/test_input_datetime_focus_blur.html => dom/html/test/forms/xbl/test_input_datetime_focus_blur.html
rename : dom/html/test/forms/test_input_datetime_focus_blur_events.html => dom/html/test/forms/xbl/test_input_datetime_focus_blur_events.html
rename : dom/html/test/forms/test_input_datetime_focus_state.html => dom/html/test/forms/xbl/test_input_datetime_focus_state.html
rename : dom/html/test/forms/test_input_datetime_input_change_events.html => dom/html/test/forms/xbl/test_input_datetime_input_change_events.html
rename : dom/html/test/forms/test_input_datetime_tabindex.html => dom/html/test/forms/xbl/test_input_datetime_tabindex.html
rename : dom/html/test/forms/test_input_defaultValue.html => dom/html/test/forms/xbl/test_input_defaultValue.html
rename : dom/html/test/forms/test_input_sanitization.html => dom/html/test/forms/xbl/test_input_sanitization.html
rename : dom/html/test/forms/test_input_textarea_set_value_no_scroll.html => dom/html/test/forms/xbl/test_input_textarea_set_value_no_scroll.html
rename : dom/html/test/forms/test_input_time_key_events.html => dom/html/test/forms/xbl/test_input_time_key_events.html
rename : dom/html/test/forms/test_input_time_sec_millisec_field.html => dom/html/test/forms/xbl/test_input_time_sec_millisec_field.html
rename : dom/html/test/forms/test_input_types_pref.html => dom/html/test/forms/xbl/test_input_types_pref.html
rename : dom/html/test/forms/test_input_typing_sanitization.html => dom/html/test/forms/xbl/test_input_typing_sanitization.html
rename : dom/html/test/forms/test_label_input_controls.html => dom/html/test/forms/xbl/test_label_input_controls.html
rename : dom/html/test/forms/test_max_attribute.html => dom/html/test/forms/xbl/test_max_attribute.html
rename : dom/html/test/forms/test_min_attribute.html => dom/html/test/forms/xbl/test_min_attribute.html
rename : dom/html/test/forms/test_mozistextfield.html => dom/html/test/forms/xbl/test_mozistextfield.html
rename : dom/html/test/forms/test_novalidate_attribute.html => dom/html/test/forms/xbl/test_novalidate_attribute.html
rename : dom/html/test/forms/test_pattern_attribute.html => dom/html/test/forms/xbl/test_pattern_attribute.html
rename : dom/html/test/forms/test_required_attribute.html => dom/html/test/forms/xbl/test_required_attribute.html
rename : dom/html/test/forms/test_step_attribute.html => dom/html/test/forms/xbl/test_step_attribute.html
rename : dom/html/test/forms/test_stepup_stepdown.html => dom/html/test/forms/xbl/test_stepup_stepdown.html
rename : dom/html/test/forms/test_textarea_attributes_reflection.html => dom/html/test/forms/xbl/test_textarea_attributes_reflection.html
rename : dom/html/test/forms/test_validation.html => dom/html/test/forms/xbl/test_validation.html
rename : dom/html/test/forms/test_validation_not_in_doc.html => dom/html/test/forms/xbl/test_validation_not_in_doc.html
rename : dom/html/test/forms/test_valueAsDate_pref.html => dom/html/test/forms/xbl/test_valueAsDate_pref.html
rename : dom/html/test/forms/test_valueasdate_attribute.html => dom/html/test/forms/xbl/test_valueasdate_attribute.html
rename : dom/html/test/forms/test_valueasnumber_attribute.html => dom/html/test/forms/xbl/test_valueasnumber_attribute.html
rename : toolkit/content/tests/browser/browser_datetime_datepicker.js => toolkit/content/tests/browser/xbl/browser_datetime_datepicker.js
extra : moz-landing-system : lando
Part I of bug 1496242 was not implemented correctly as it accesses the
nsIDateTimeInputArea methods directly on the <datetimebox> element object.
This won't work because the XBL binding is run in a non-chrome scope.
The methods it implemented are exposed thus had to be accessed via
wrappedJSObject.
Object pass to setValueFromPicker() therefore has to clone into the content scope.
We can be sure that the methods called are implemented by the XBL binding,
because the web content should not have access to <datetimebox>, which is a NAC.
A small clean-up is included in the patch also, removing the useless 3rd argument
to the CustomEvent constructor.
Tests related to the datetime input is duplicated and run with UA Widget disabled
to ensure the XBL binding continue to work.
Differential Revision: https://phabricator.services.mozilla.com/D10947
--HG--
rename : dom/html/test/forms/chrome.ini => dom/html/test/forms/xbl/chrome.ini
rename : dom/html/test/forms/mochitest.ini => dom/html/test/forms/xbl/mochitest.ini
rename : dom/html/test/forms/test_autocompleteinfo.html => dom/html/test/forms/xbl/test_autocompleteinfo.html
rename : dom/html/test/forms/test_input_attributes_reflection.html => dom/html/test/forms/xbl/test_input_attributes_reflection.html
rename : dom/html/test/forms/test_input_date_bad_input.html => dom/html/test/forms/xbl/test_input_date_bad_input.html
rename : dom/html/test/forms/test_input_date_key_events.html => dom/html/test/forms/xbl/test_input_date_key_events.html
rename : dom/html/test/forms/test_input_datetime_focus_blur.html => dom/html/test/forms/xbl/test_input_datetime_focus_blur.html
rename : dom/html/test/forms/test_input_datetime_focus_blur_events.html => dom/html/test/forms/xbl/test_input_datetime_focus_blur_events.html
rename : dom/html/test/forms/test_input_datetime_focus_state.html => dom/html/test/forms/xbl/test_input_datetime_focus_state.html
rename : dom/html/test/forms/test_input_datetime_input_change_events.html => dom/html/test/forms/xbl/test_input_datetime_input_change_events.html
rename : dom/html/test/forms/test_input_datetime_tabindex.html => dom/html/test/forms/xbl/test_input_datetime_tabindex.html
rename : dom/html/test/forms/test_input_defaultValue.html => dom/html/test/forms/xbl/test_input_defaultValue.html
rename : dom/html/test/forms/test_input_sanitization.html => dom/html/test/forms/xbl/test_input_sanitization.html
rename : dom/html/test/forms/test_input_textarea_set_value_no_scroll.html => dom/html/test/forms/xbl/test_input_textarea_set_value_no_scroll.html
rename : dom/html/test/forms/test_input_time_key_events.html => dom/html/test/forms/xbl/test_input_time_key_events.html
rename : dom/html/test/forms/test_input_time_sec_millisec_field.html => dom/html/test/forms/xbl/test_input_time_sec_millisec_field.html
rename : dom/html/test/forms/test_input_types_pref.html => dom/html/test/forms/xbl/test_input_types_pref.html
rename : dom/html/test/forms/test_input_typing_sanitization.html => dom/html/test/forms/xbl/test_input_typing_sanitization.html
rename : dom/html/test/forms/test_label_input_controls.html => dom/html/test/forms/xbl/test_label_input_controls.html
rename : dom/html/test/forms/test_max_attribute.html => dom/html/test/forms/xbl/test_max_attribute.html
rename : dom/html/test/forms/test_min_attribute.html => dom/html/test/forms/xbl/test_min_attribute.html
rename : dom/html/test/forms/test_mozistextfield.html => dom/html/test/forms/xbl/test_mozistextfield.html
rename : dom/html/test/forms/test_novalidate_attribute.html => dom/html/test/forms/xbl/test_novalidate_attribute.html
rename : dom/html/test/forms/test_pattern_attribute.html => dom/html/test/forms/xbl/test_pattern_attribute.html
rename : dom/html/test/forms/test_required_attribute.html => dom/html/test/forms/xbl/test_required_attribute.html
rename : dom/html/test/forms/test_step_attribute.html => dom/html/test/forms/xbl/test_step_attribute.html
rename : dom/html/test/forms/test_stepup_stepdown.html => dom/html/test/forms/xbl/test_stepup_stepdown.html
rename : dom/html/test/forms/test_textarea_attributes_reflection.html => dom/html/test/forms/xbl/test_textarea_attributes_reflection.html
rename : dom/html/test/forms/test_validation.html => dom/html/test/forms/xbl/test_validation.html
rename : dom/html/test/forms/test_validation_not_in_doc.html => dom/html/test/forms/xbl/test_validation_not_in_doc.html
rename : dom/html/test/forms/test_valueAsDate_pref.html => dom/html/test/forms/xbl/test_valueAsDate_pref.html
rename : dom/html/test/forms/test_valueasdate_attribute.html => dom/html/test/forms/xbl/test_valueasdate_attribute.html
rename : dom/html/test/forms/test_valueasnumber_attribute.html => dom/html/test/forms/xbl/test_valueasnumber_attribute.html
rename : toolkit/content/tests/browser/browser_datetime_datepicker.js => toolkit/content/tests/browser/xbl/browser_datetime_datepicker.js
extra : moz-landing-system : lando
This patch converts datetimebox.xml to datetimebox.js and loads it as a UA Widget,
while touches things here and there to make it work.
In HTMLInputElement manages the lifecycle of the datetimebox UA Widget.
It is loaded when in <input> has type date or time, or have its type switch to date or time.
nsDateTimeControlFrame is changed so that when UA Widget is enabled,
it would not generate <xul:datetimebox>.
Like bug 1483972, a check is added in nsCSSFrameConstructor::CreateGeneratedContentItem()
to make sure we don't generate pseudo content inside <input>.
Assertions in IntlUtils is changed to allow UAWidget to call the methods.
Depends on D9056
Differential Revision: https://phabricator.services.mozilla.com/D9057
--HG--
rename : toolkit/content/widgets/datetimebox.xml => toolkit/content/widgets/datetimebox.js
extra : moz-landing-system : lando
This patch simplifies the nsIDateTimeInputArea interface, implemented by the
datetimebox bindings, to a point that is easier to convert it to dispatch events,
by doing the following:
- hasBadInput() is re-implemented in C++ in nsIDateTimeControlFrame since
C++ needs the return value synchronously.
- SetValueFromPicker() and SetPickerState() are avoided completed since they
are simply called by HTMLInputElement methods exposed to the frame
script. They are avoided by having the frame script access the NAC and call
the nsIDateTimeInputArea methods directly.
- Merge setEditAttribute() and removeEditAttribute() to updateEditAttributes()
which takes no arguments, and have the method access the attribute values by
reading the values from <input>.
This patch is a scaled-down version of the patch proposed in bug 1456833.
The event approach is only usable in UA Widget version of datetimebox because
there is no way to avoid leaking events to the document without Shadow DOM.
Differential Revision: https://phabricator.services.mozilla.com/D9056
--HG--
extra : moz-landing-system : lando
By using the API from bug 1493984 and setting allFrames=true we can establish a direct communication between the actor in the subframe and the DateTimePickerParent.
Differential Revision: https://phabricator.services.mozilla.com/D8015
--HG--
extra : moz-landing-system : lando
Support for finding text in a page is now determined by a blacklist of locations, simplifying handling in multi-process mode and restoring the intended behavior.
Differential Revision: https://phabricator.services.mozilla.com/D8005
--HG--
extra : rebase_source : 129f3d4e3cdd3673251ed7a3cc58101dd3cb0c91
This moves UAWidgetsChild.jsm from browser to toolkit so that
Fennec and Reftest could pick it up.
Differential Revision: https://phabricator.services.mozilla.com/D5085
--HG--
rename : browser/actors/UAWidgetsChild.jsm => toolkit/actors/UAWidgetsChild.jsm
extra : moz-landing-system : lando
If the pref browser.fission.simulate is true, the event dispatcher in ActorManagerChild will not dispatch events to actors that aren't associated with the same window as the event's target.
In addition, when that pref is on, the actors associated with sub-frames will have their content property bound to the correct content window, that might differ from the message manager's window (which is always related to the top level).
Then, in order to write Fission-compatible code, that specific actor will need to be declared with allFrames = true, meaning that it wants to be instantiated for every frame, and not just top-level ones
Differential Revision: https://phabricator.services.mozilla.com/D6358
--HG--
extra : moz-landing-system : lando
nsISHEntry.index is readonly, but if you pass `true` as getEntryAtIndex()'s
second argument, nsISHEntry.index will be modified. This is pretty gross.
This patch changes `index` so it's not readonly (because it's not!) and removes
getEntryAtIndex()'s second argument.
--HG--
extra : rebase_source : c519d77fcc1c3bda2f260b5888ce9cd0f6cfdab5
Automatic changes by ESLint, except for manual corrections for .xml files.
Differential Revision: https://phabricator.services.mozilla.com/D4439
--HG--
extra : moz-landing-system : lando
The AudibleAutoplayMediaOccurredObserver which I added in bug1476701 was incorrectly removed by bug1472491, it's used to notify audible autoplay event for the shield study and we should add it back.
Differential Revision: https://phabricator.services.mozilla.com/D3930
--HG--
extra : moz-landing-system : lando