Граф коммитов

510 Коммитов

Автор SHA1 Сообщение Дата
Edgar Chen 27a615f9f1 Bug 1552644 - Ignore the result from filepicker if the input type is not file; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D33494

--HG--
extra : moz-landing-system : lando
2019-06-03 15:13:34 +00:00
Emilio Cobos Álvarez 6917a38081 Bug 1555216 - Change the signature of BindToTree to be (BindContext&, nsINode& aParentNode). r=bzbarsky
BindContext was going to have way more information at first, but then I realized
that most of the things I wanted to know were basically a flag away using the
parent node.

Still I think it's worth it, now experimenting with BindToTree will only mean
adding a field to a struct that's included from a couple cpp files, instead of a
massive pain.

I also think this is clearer, and doing this highlights quite a few
inconsistencies in our code which I've left untouched, but commented with
FIXMEs.

Steps are:

$ for file in $(rg 'nsresult BindToTree\(' | cut -d : -f 1 | sort | uniq); do sed -i 's#nsresult BindToTree(Document\* aDocument, nsIContent\* aParent,#nsresult BindToTree(BindContext\&, nsINode\& aParent)#g' $file; done
$ for file in $(rg 'nsresult BindToTree\(' | cut -d : -f 1 | sort | uniq); do sed -i 's#                      nsIContent\* aBindingParent) override#override#g' $file; done
$ for file in $(rg '::BindToTree\(' | cut -d : -f 1 | sort | uniq); do sed -i 's#::BindToTree(Document\* aDocument, nsIContent\* aParent,#::BindToTree(BindContext\& aContext, nsINode\& aParent)#g' $file; done
$ for file in $(rg '::BindToTree\(' | cut -d : -f 1 | sort | uniq); do sed -i 's#nsIContent\* aBindingParent)##g' $file; done
$ for file in $(rg '::BindToTree\(' | cut -d : -f 1 | sort | uniq); do sed -i 's#::BindToTree(aDocument, aParent, aBindingParent)#::BindToTree(aContext, aParent)#g' $file; done
$ ./mach clang-format

Then manual fixups.

Depends on D32948

Differential Revision: https://phabricator.services.mozilla.com/D32949
2019-05-31 23:31:52 +02:00
Emilio Cobos Álvarez ff732c2cdf Bug 1555143 - Remove unused aDeep argument from UnbindFromTree. r=bzbarsky
$ for file in $(rg UnbindFromTree | cut -d : -f 1 | sort | uniq); do sed -i 's#UnbindFromTree(bool aDeep = true,#UnbindFromTree(#g' $file; done
$ for file in $(rg UnbindFromTree | cut -d : -f 1 | sort | uniq); do sed -i 's#UnbindFromTree(bool aDeep,#UnbindFromTree(#g' $file; done
$ for file in $(rg UnbindFromTree | cut -d : -f 1 | sort | uniq); do sed -i 's#UnbindFromTree(aDeep,#UnbindFromTree(#g' $file; done
$ ./mach clang-format

And fix the two callers and little use of the aDeep argument (see the "Manual
changes" patch attached to bug).

Differential Revision: https://phabricator.services.mozilla.com/D32898

--HG--
extra : moz-landing-system : lando
2019-05-28 22:47:08 +00:00
Masayuki Nakano 1fb845d129 Bug 1543315 - part 17: Mark PresShell::HandleDOMEventWithTarget() as MOZ_CAN_RUN_SCRIPT r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D30494

--HG--
extra : moz-landing-system : lando
2019-05-09 20:21:28 +00:00
Masayuki Nakano 663f37d827 Bug 1547618 - Make dom use mozilla::PresShell rather than via nsIPresShell r=smaug
Additionally, this patch makes `nsContentUtils::DispatchXULCommand()` because
it guarantees the lifetime of **only** `PresShell` in it.  So, we need to check
the lifetime of each argument at each caller here.

Differential Revision: https://phabricator.services.mozilla.com/D29199

--HG--
extra : moz-landing-system : lando
2019-04-30 01:35:30 +00:00
Masayuki Nakano f3bcf4c6d1 Bug 1547418 - Make CapturingContentInfo a private struct of PresShell and move APIs for it from nsIPresShell to PresShell r=smaug
`CapturingContentInfo` struct is used only in `PresShell.cpp` so that we can
make it a private struct of `PresShell` if we move all users of them,
i.e., API to access them, from `nsIPresShell` to `PresShell`.

Differential Revision: https://phabricator.services.mozilla.com/D29111

--HG--
extra : moz-landing-system : lando
2019-04-30 00:26:57 +00:00
Masayuki Nakano 5932f01d53 Bug 1545342 - part 1: Create mozilla/PresShellForwards.h and move global enums/constants in nsIPresShell.h and mozilla/PresShell.h into the new one r=smaug
This patch creates new header, `mozilla/PresShellForwards.h`.  It should have
all forward declarations of global class/struct in `nsIPresShell.h` and
`mozilla/PresShell.h`.

Additionally, this moves all `enum`s and `constant`s in them into the new file
with changing them to `enum class`es.

This will make other headers which require only specific types in the header
files not include them.

Differential Revision: https://phabricator.services.mozilla.com/D28605

--HG--
extra : moz-landing-system : lando
2019-04-25 05:02:20 +00:00
Srujana Peddinti b44e48bff4 Bug 1259660 - Moved mozilla::WidgetMosueEventBase::buttonType in MouseEvents.h to mozilla::MouseButton in EventForwards.h, and mozilla::WidgetMouseEventBase::buttonsFlag to mozilla::MouseButtonsFlag r=masayuki
Moved mozilla::WidgetMosueEventBase::buttonType in MouseEvents.h to mozilla::MouseButton in EventForwards.h, and mozilla::WidgetMouseEventBase::buttonsFlag to mozilla::MouseButtonsFlag so that any referer in header files do not need to include MouseEvents.h only for referring them. Instead, they just need to include EventForwards.h. Now when MouseEvents.h is changed, the rebuild speed becomes faster.

Differential Revision: https://phabricator.services.mozilla.com/D25325

--HG--
extra : moz-landing-system : lando
2019-04-21 20:13:34 +00:00
Srujana Peddinti 5f185eb5aa Bug 1259660 - Cleaned up WidgetMouseEventBase by renaming WidgetMouseEventBase::button to WidgetMouseEventBase::mButton. r=masayuki
Renamed all class member instances from WidgetMouseEventBase::button to WidgetMouseEventBase::mButton.

Differential Revision: https://phabricator.services.mozilla.com/D25309

--HG--
extra : moz-landing-system : lando
2019-04-21 18:17:10 +00:00
Srujana Peddinti 614949385a Bug 1259660 - Cleaned up WidgetMouseEventBase by renaming WidgetMouseEventBase::buttons to WidgetMouseEventBase::mButtons r=masayuki
Renamed all class member instances from  WidgetMouseEventBase::buttons to WidgetMouseEventBase::mButtons

Differential Revision: https://phabricator.services.mozilla.com/D25297

--HG--
extra : moz-landing-system : lando
2019-04-21 19:42:37 +00:00
Ian Moody be1cc378ed Bug 1379466 - Make editor listen for auxclick mouse events. r=smaug,masayuki
Editable elements will no longer get click events for non-primary mouse buttons
since they are being unshipped from the web in favour of auxclick events.
Listen for auxclick as well so middle-click paste still works.
Don't stop propagation after middle-click paste, instead ignore clicks on
contenteditable elements in ClickHandlerChild.
Update test_middle_click_paste.html for the new behaviour.

Also remove the mNoContentDispatch overrides in HTMLInputElement and
HTMLTextAreaElement that were needed for middle-pasting.

Differential Revision: https://phabricator.services.mozilla.com/D26792

--HG--
extra : moz-landing-system : lando
2019-04-18 12:57:36 +00:00
Mirko Brodesser ed491dbad1 Bug 1374045: add 'preventScroll' option to HTMLElement's, SVGElement's and XULElement's 'focus' method r=smaug
- Remove expectation that 'preventScroll.html' fails.

- Use '[NoInterfaceObject] interface' workaround to simulate missing 'mixin' support.

Differential Revision: https://phabricator.services.mozilla.com/D26922

--HG--
extra : moz-landing-system : lando
2019-04-12 08:16:47 +00:00
Emilio Cobos Álvarez 3dd5ef8fd1 Bug 505355 - Simplify focus handling for file inputs. r=smaug
This is closer to what other UAs do, it's simpler, and fixes the bug.

It looks like the complexity of multiple buttons or what not is related to
bug 1188880, which is WONTFIX. We no longer have multiple buttons in the same
file input, so this is better IMO.

Differential Revision: https://phabricator.services.mozilla.com/D26825
2019-04-10 22:52:03 +02:00
Emilio Cobos Álvarez 08173e4af8 Bug 1543161 - Simplify some rules used for file inputs. r=mats
There's only one button in a file input. This used to be an
input[type="button"].

There's no point in using more specific rules or such, the regular UA rules just
work, and content can't style this button so it can't be overriden.

This should be an idempotent patch.

Differential Revision: https://phabricator.services.mozilla.com/D26753
2019-04-10 22:51:47 +02:00
Andrea Marchesini 0ca645f0d6 Bug 1534351 - HTMLInputElement should always allow popups for system principal, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D26671

--HG--
extra : moz-landing-system : lando
2019-04-09 19:27:15 +00:00
Brindusan Cristian aac73a89d3 Backed out changeset 2647a23c02bf (bug 1534351) for mochitest failures at test_multipleFilePicker.html. CLOSED TREE
--HG--
extra : histedit_source : aa91bdf0dd2666052949d80d9910e03a0d787598
2019-04-09 20:45:05 +03:00
Andrea Marchesini f9fecdc909 Bug 1534351 - HTMLInputElement should always allow popups for system principal, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D26671

--HG--
extra : moz-landing-system : lando
2019-04-09 14:25:58 +00:00
Mirko Brodesser 6b88118d6b Bug 1540632: change exception and correct setting selectionStart/End/Direction for type change of '<input>' element r=smaug
- Change exception when setting '<input type="file">'s value according to spec.

- Set 'selectionStart', 'selectionEnd', 'selectionDirection' according
  to https://html.spec.whatwg.org/multipage/input.html#signal-a-type-change.

- Minorly update nsTextEditorState's documentation.

Differential Revision: https://phabricator.services.mozilla.com/D26183

--HG--
extra : moz-landing-system : lando
2019-04-09 06:42:15 +00:00
Masayuki Nakano 4204b59128 Bug 1540963 - Make nsIControllerCommandTable builtinclass and make its users use nsControllerCommandTable directly r=bzbarsky
`nsIControllerCommandTable` isn't implemented with JS even in comm-central nor
BlueGriffon.  Therefore, we can make it a builtinclass.

Additionally, it's inherited only by nsControllerCommandTable.  So, all users
in C++ can treat the concrete class directly.

Differential Revision: https://phabricator.services.mozilla.com/D25727

--HG--
extra : moz-landing-system : lando
2019-04-03 12:52:14 +00:00
Masayuki Nakano 9165a150a1 Bug 1540930 - Make nsPresContext use mozilla::PresShell directly rather than via nsIPresShell r=emilio
`nsPresContext` should use `mozilla::PresShell` directly instead of
`nsIPresShell`.  This patch makes it.

Unfortunately, `nsPresContext` and `nsIFrame` have `PresShell()`.  Therefore,
we cannot use `PresShell*` in its methods so that this patch uses `mozilla::`
namespace prefix.

It might be better to rename them as `PresShellPtr()` in another bug.

Differential Revision: https://phabricator.services.mozilla.com/D25721

--HG--
extra : moz-landing-system : lando
2019-04-03 12:40:26 +00:00
Masayuki Nakano ba2e73ec4f Bug 1539172 - Make nsContentUtils::DispatchInputEvent() notify content of valid state change of input element r=smaug
When `nsContentUtils::DispatchInputEvent()` dispatches `input` event, the
editor's value was changed by somebody.  In this case, it needs to update
the valid state **and** notify to update the style.

(Note that I'm not sure whether this is right approach.)

Differential Revision: https://phabricator.services.mozilla.com/D25029

--HG--
extra : moz-landing-system : lando
2019-03-28 23:40:18 +00:00
Mirko Brodesser 7558681ee9 Bug 1446722: set default value for 'mFocusedValue' for the html input elements 'date' and 'time'. r=smaug
In order to trigger the 'onchange' event when resetting the 'date' or
'time' html input elements.

Differential Revision: https://phabricator.services.mozilla.com/D24206

--HG--
extra : moz-landing-system : lando
2019-03-22 10:52:06 +00:00
Emilio Cobos Álvarez 5aa8533517 Bug 1533963 - Use a single RestyleHint representation. r=heycam
Differential Revision: https://phabricator.services.mozilla.com/D22828

--HG--
extra : moz-landing-system : lando
2019-03-14 11:47:50 +00:00
Boris Zbarsky 5bf2e408e6 Bug 1534608. MOZ_CAN_RUN_SCRIPT should disallow non-stack refptr arguments. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D23217

--HG--
extra : moz-landing-system : lando
2019-03-13 00:30:11 +00:00
Ryan Hunt 00e98538aa Bug 1523969 part 6 - Move method definition inline comments to new line in 'dom/'. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D21106

--HG--
extra : rebase_source : ea3f51c2c11247114deccbc86e90fb02b8a97257
2019-02-25 16:05:29 -06:00
Emilio Cobos Álvarez 39d3da7fd5 Bug 1528644 - Internal value changes shouldn't change validity state. r=masayuki
Even less so on reframe, where it's just unsound to do so. I had to give a value
to eSetValue_Internal, since otherwise I cannot check for its presence. I can
further special-case the reframe case if you prefer.

Differential Revision: https://phabricator.services.mozilla.com/D20133

--HG--
extra : moz-landing-system : lando
2019-02-19 09:25:55 +00:00
Masayuki Nakano da6598c374 Bug 1524212 - Make nsContentUtils::DispatchInputEvent() update HTMLInputElement.validationMessage before dispatching "input" event r=smaug
"input" event listener may want to check HTMLInputElement.validationMessage.
However, due to moving "input" event dispatcher from
HTMLInputElement::SetUserInput() to editor, HTMLInputElement::SetValueInternal()
updates it **after** dispatching "input" event.

This patch makes nsContentUtils::DispatchInputEvent() guarantees to update
validationMessage value before dispatching every event.  On the other hand,
SetValueInternal() may be called without "input" event dispatchers.  Therefore,
it needs to keep updating validationMessage value in such cases.

Differential Revision: https://phabricator.services.mozilla.com/D19126

--HG--
extra : moz-landing-system : lando
2019-02-08 22:17:10 +00:00
Timothy Guan-tin Chien ccf133638c Bug 1507895 - Part II, Remove the datetimebox binding r=smaug
This patch removes the datetimebox binding and always use
UA Widget for the job.

Depends on D17571

Differential Revision: https://phabricator.services.mozilla.com/D17572

--HG--
extra : moz-landing-system : lando
2019-01-28 18:32:39 +00:00
Dylan Roeh 44dab4cd06 Bug 1514364 - Add appendRawFilter to nsIFilePicker to expose actual accept filters to GV for onFilePrompt. r=snorp, smaug 2019-01-24 10:21:05 -06:00
Edgar Chen 2f22be013f Bug 1512297 - Do not need to clear image broken state in BindToTree call; r=smaug
ImageLoadingContent will take care of updating element to correct state, we don't need to do this.
Especially for HTMLImageElement, because it may not reload the image after BindToTree (
e.g. the selected source isn't changed), clearing broken state may put element into
incorrect state.

The original code seems from https://bugzilla.mozilla.org/show_bug.cgi?id=491063#c32
for a performance reason, however I test the http://mozilla.pettay.fi/moztests/1x1image.html
again on recent codebase, I don't see difference with/without applying this patch.

--HG--
extra : rebase_source : 2de29cced4ad0a18a5a6908641305203cc88a5f4
2018-12-20 13:59:34 +01:00
Timothy Guan-tin Chien 28b5c3416c Bug 1514040 - Dispatch events to hidden datetimebox UA Widget r=smaug
The XBL binding implementation relied on nsDateTimeControlFrame to call into
its nsIDateTimeInputArea implementation. This is correct because the XBL binding
is only constructed when the element has a frame. If the value is set while the
element is hidden, the XBL binding will pick up the correct value during construction.

That is not the case for UA Widget. As it is constructed when the DOM is attached,
relying on nsDateTimeControlFrame to send an event when attributes change means
the event won't be sent to the already constructed UA Widget.

This patch fixes that by moving the event dispatching calls originating from
HTMLInputElement out of nsDateTimeControlFrame, so they will behave correctly in
the absence of the frame.

I've also moved the gut of nsDateTimeControlFrame::HasBadInput() to
DateTimeInputTypeBase::HasBadInput(). Content script should be allowed to validate
the input without the frame.

Sadly this means the XBL implementation and the UA Widget implementation
have further diverged. The complexity should go away when we could finally
remove the XBL implementation.

nsDateTimeControlFrame still dispatches a few events to UA Widget, in
AttributeChanged() and SyncDisabledState(), as they are originated from the layout.

The name of the events in AttributeChanged() are incorrect though -- I am correcting
that in this patch too.

Differential Revision: https://phabricator.services.mozilla.com/D15601

--HG--
extra : moz-landing-system : lando
2019-01-04 21:53:51 +00:00
Emilio Cobos Álvarez d2ed260822 Bug 1517241 - Rename nsIDocument to mozilla::dom::Document. r=smaug
Summary: Really sorry for the size of the patch. It's mostly automatic
s/nsIDocument/Document/ but I had to fix up in a bunch of places manually to
add the right namespacing and such.

Overall it's not a very interesting patch I think.

nsDocument.cpp turns into Document.cpp, nsIDocument.h into Document.h and
nsIDocumentInlines.h into DocumentInlines.h.

I also changed a bunch of nsCOMPtr usage to RefPtr, but not all of it.

While fixing up some of the bits I also removed some unneeded OwnerDoc() null
checks and such, but I didn't do anything riskier than that.
2019-01-03 17:48:33 +01:00
Emilio Cobos Álvarez 63814207cb Bug 1516853 - Merge nsIDocument and nsDocument. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D15498

--HG--
extra : moz-landing-system : lando
2018-12-31 14:10:19 +00:00
Sylvestre Ledru cccdda3c2a Bug 1516555 - Reformat everything to the Google coding style r=Ehsan
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D15426

--HG--
extra : moz-landing-system : lando
2018-12-28 15:48:06 +00:00
Matthew Noorenberghe 40455b7a34 Bug 1330228 - Use HasBeenTypePassword to skip saving to presentation state. r=baku
Differential Revision: https://phabricator.services.mozilla.com/D15148

--HG--
extra : moz-landing-system : lando
2018-12-21 16:44:37 +00:00
Olli Pettay 34fc8f6cc6 Bug 1330228 - Expose a chrome-only API indicating whether an <input> was ever type=password r=baku
Cache whether an input was ever type=password so consumers can handle sites which toggle password visibility and don't want to save the value of the field.

Differential Revision: https://phabricator.services.mozilla.com/D15145

--HG--
extra : moz-landing-system : lando
2018-12-21 16:43:23 +00:00
Andrea Marchesini 04882192be Bug 1515345 - No notification bar when filePickers are blocked, r=smaug 2018-12-20 01:46:43 +01:00
Andrea Marchesini 9cc643f6d3 Bug 1513895 - Unify PopupBlocker algorithm in 1 single file, r=smaug 2018-12-16 10:21:16 +01:00
Timothy Guan-tin Chien 3913ded230 Bug 1510848 - Do not unattach UA Widget Shadow Root if the element is already re-attached to the tree r=emilio,smaug
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
2018-12-15 02:48:46 +00:00
Olli Pettay b977d23eb2 Bug 1089326, make <button> hit testing similar to other elements which may have some content, and for click target find the common (interactive) ancestor, r=masayuki
--HG--
extra : rebase_source : 80caab4e074d552c38b62842fe3102fb6735dfd9
2018-12-11 23:35:40 +02:00
Andrea Marchesini 294ac3e81c Bug 1459264 - Allow just 1 FilePicker per event, r=smaug 2018-12-12 01:00:05 +01:00
Sylvestre Ledru 265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Timothy Guan-tin Chien 3c5974c14a Bug 1508000 - Dispatch UAWidgetUnbindFromTree event before calling nsGenericHTMLElement::UnbindFromTree() r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D12205

--HG--
rename : toolkit/content/tests/widgets/test_ua_widget.html => toolkit/content/tests/widgets/test_ua_widget_sandbox.html
extra : moz-landing-system : lando
2018-11-28 02:29:38 +00:00
Ehsan Akhgari 6099c9f67b Bug 1508472 - Part 1: First batch of comment fix-ups in preparation for the tree reformat r=sylvestre
This is a best effort attempt at ensuring that the adverse impact of
reformatting the entire tree over the comments would be minimal.  I've used a
combination of strategies including disabling of formatting, some manual
formatting and some changes to formatting to work around some clang-format
limitations.

Differential Revision: https://phabricator.services.mozilla.com/D13046

--HG--
extra : moz-landing-system : lando
2018-11-27 10:08:58 +00:00
Masayuki Nakano cc3adb8c9e Bug 1504911 - part 2: Make nsTextEditorState::SetValue() dispatch "input" event if it's called for handling part of user input r=smaug
When editor is modified as part of user action, aFlags of
nsTextEditorState::SetValue() includes eSetValue_BySetUserInput.  In this case,
TextEditor (if there is) or the method itself (if there is no editor yet)
should dispatch "input" event by themselves because we will need to initialize
InputEvents more since we're going to implement Input Event specs.

Note that even with this patch, password field stops dispatching "input" event
with call of HTMLInputElement::SetUserInput().  This is caused by a hidden bug
of TextEditRules.   This will be fixed in a following patch.

Differential Revision: https://phabricator.services.mozilla.com/D12245

--HG--
extra : moz-landing-system : lando
2018-11-20 22:06:37 +00:00
Masayuki Nakano abe138f771 Bug 1504911 - part 1: Make all "input" event dispatcher in C++ use new utility method r=smaug
Currently, a lot of code dispatch "input" event and some of them dispatch
"input" event with wrong interface and/or values.  Therefore this patch
creates nsContentUtils::DispatchInputEvent() to make all of them dispatch
correct event.

Unfortunately, due to bug 1506439, we cannot set pointer to refcountable
classes of MOZ_CAN_RUN_SCRIPT method to nullptr.  Therefore, this patch
creates temporary RefPtr<TextEditor> a lot even though it makes damage to
the performance if it's in a hot path.

This patch makes eEditorInput event dispatched with
InternalEditorInputEvent when "input" event should be dispatched with
dom::InputEvent.  However, this patch uses WidgetEvent whose message is
eUnidentifiedEvent and setting WidgetEvent::mSpecifiedEventType to
nsGkAtoms::oninput when "input" event should be dispatched with
dom::Event because we need to keep that eEditorInput and
InternalEditorInputEvent are mapped each other.

Differential Revision: https://phabricator.services.mozilla.com/D12244

--HG--
extra : moz-landing-system : lando
2018-11-21 03:59:02 +00:00
Timothy Guan-tin Chien 720f2da242 Bug 1496242 - Part II, Convert datetimebox to UA Widget r=dholbert,jaws,smaug
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
2018-11-03 05:31:05 +00:00
Timothy Guan-tin Chien 3856b5e646 Bug 1496242 - Part I, Simplify nsIDateTimeInputArea interface r=mconley,smaug
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
2018-11-02 23:29:42 +00:00
Marcos Cáceres dcf8ad3c00 Bug 329509 - allow dispatching event when element is disabled. r=annevk,smaug
Allow untrusted Events and Custom events to be dispatched at disabled form element. This is for interop and some developers have asked for this.

Differential Revision: https://phabricator.services.mozilla.com/D10000

--HG--
extra : moz-landing-system : lando
2018-10-31 08:55:33 +00:00
Nicholas Nethercote 36c48819d1 Bug 1451169 - Use `nsStaticAtom*` instead of `nsStaticAtom**` in Element.h. r=baku
--HG--
extra : rebase_source : db09f7ab93a1c41ace03a645623f78a27ecfff8c
2018-04-03 13:21:06 +10:00