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

97 Коммитов

Автор SHA1 Сообщение Дата
Emilio Cobos Álvarez 92acdc30e3 Bug 1637335 - Make MozEditableElement.editor flush frames if needed. r=smaug
URLBarInput relies on it being non-null when created, but that may not
happen if we construct frames lazily without this patch.

Differential Revision: https://phabricator.services.mozilla.com/D74891
2020-05-12 22:32:18 +00:00
Timothy Gu 6407f13ce3 Bug 1628500 - Remove aIgnoreTabindex argument from Element::IsInteractiveHTMLContent(). r=edgar
This argument is set to true everywhere, and soon HTML will no longer consider
tabindex for interactive content: https://github.com/whatwg/html/pull/5457.

Differential Revision: https://phabricator.services.mozilla.com/D72568
2020-04-28 11:22:32 +00:00
Emilio Cobos Álvarez 5e3adf766b Bug 1401657 - Make editor value changes always notify. r=masayuki
Not doing so is unsound in some cases, see the two referenced bugs.

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

--HG--
extra : moz-landing-system : lando
2020-03-13 02:29:48 +00:00
Emilio Cobos Álvarez ad58a97570 Bug 1616620 - maxlength shouldn't apply to <input type=number>. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D63474

--HG--
extra : moz-landing-system : lando
2020-02-20 15:28:51 +00:00
Masayuki Nakano 18b65250c8 Bug 970802 - part 4: Make `TextControlState` dispatch "beforeinput" event if there is no `TextEditor` r=smaug
If `TextControlState` does not have `TextEditor` and its `SetValue()` is called
from `SetUserInput()`, `TextControlState` itself needs to dispatch `beforeinput`
event.

If the value is modified by `beforeinput` event listener, it's intended that
`preventDefault()` is called by the web apps.  However, the behavior in this
case is not mentioned by UI Events nor Input Events spec.  We should just file
a spec issue instead of emulating Chrome's behavior for now because it requires
more changes, but this case must be an edge case.
The spec issue is: https://github.com/w3c/input-events/issues/106

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

--HG--
extra : moz-landing-system : lando
2020-01-14 07:16:34 +00:00
Razvan Maries 0df75c8122 Backed out 5 changesets (bug 970802) for xpcshell perma fails. CLOSED TREE
Backed out changeset 5511edd700f7 (bug 970802)
Backed out changeset 1fb9cf2264b6 (bug 970802)
Backed out changeset 6b185296c742 (bug 970802)
Backed out changeset ce6853e64ed6 (bug 970802)
Backed out changeset aa9bd45c09b1 (bug 970802)
2020-01-14 04:41:15 +02:00
Masayuki Nakano f52c17a188 Bug 970802 - part 4: Make `TextControlState` dispatch "beforeinput" event if there is no `TextEditor` r=smaug
If `TextControlState` does not have `TextEditor` and its `SetValue()` is called
from `SetUserInput()`, `TextControlState` itself needs to dispatch `beforeinput`
event.

If the value is modified by `beforeinput` event listener, it's intended that
`preventDefault()` is called by the web apps.  However, the behavior in this
case is not mentioned by UI Events nor Input Events spec.  We should just file
a spec issue instead of emulating Chrome's behavior for now because it requires
more changes, but this case must be an edge case.
The spec issue is: https://github.com/w3c/input-events/issues/106

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

--HG--
extra : moz-landing-system : lando
2020-01-08 09:24:33 +00:00
Masayuki Nakano a2a7b27d8d Bug 1599971 - part 5: Mark `TextControlState::UnbindFromFrame()` as `MOZ_CAN_RUN_SCRIPT` r=m_kato,emilio
Note that `TextControlState::BindToFrame()` may also run script if it's
called without script blocker.  However, it shouldn't occur.  Therefore,
we don't need to mark it `MOZ_CAN_RUN_SCRIPT`, but we should check
script blocker existence with `MOZ_ASSERT`.

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

--HG--
extra : moz-landing-system : lando
2019-12-11 03:04:20 +00:00
Masayuki Nakano c13f925d16 Bug 1599971 - part 4: Mark `TextControlState::GetTextEditor()` as `MOZ_CAN_RUN_SCRIPT` r=m_kato
If `PreareEditor()` returns `NS_OK`, but if the instance is deleted at returning
from it, `GetTextEditor()` will access `mTextEditor`.  Therefore, this patch
makes `PrepareEditor()` return error if the instance is destroyed at its end.

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

--HG--
extra : moz-landing-system : lando
2019-12-11 03:03:31 +00:00
Masayuki Nakano f9203c9b66 Bug 1599971 - part 2: Mark `TextControlState::DeleteOrCacheForReuse()` and `TextControlState::Reuse()` as `MOZ_CAN_RUN_SCRIPT` r=m_kato
They are really complicated and can run script while the instance is being
destroyed.  Therefore, they should have their own `AutoTextControlHandlingState`
as "kungFuDeathGrip".

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

--HG--
extra : moz-landing-system : lando
2019-12-11 03:02:46 +00:00
Masayuki Nakano a26ed4b301 Bug 1599971 - part 1: Mark constructors of `AutoTextControlHandlingState` as `MOZ_CAN_RUN_SCRIPT` r=m_kato
The destructor of `AutoTextControlHandlingState`is marked as
`MOZ_CAN_RUN_SCRIPT`, but it's not checked at build time.  And this does not
need to be created when the method does not run script.  Therefore, we should
mark its constructor as `MOZ_CAN_RUN_SCRIPT` instead since it's stack only
class so that its constructor and destructor are always called from same
method.

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

--HG--
extra : moz-landing-system : lando
2019-12-11 03:01:37 +00:00
Masayuki Nakano 3f7057ece8 Bug 1597679 - part 3: Create methods to compare given string with values of `TextControlState`, `nsTextControlFrame`, `HTMLInputElement` and `HTMLTextAreaElement` r=smaug
For avoiding unnecessary copy of string buffer only for comparing setting
value and current value, especially with `nsAutoString`, this patch
creates `*Equals()` methods for every class.

And also this avoids to call `nsContentUtils::PlatformToDOMLineBreaks()` in
most paths.

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

--HG--
extra : moz-landing-system : lando
2019-11-25 06:35:17 +00:00
Masayuki Nakano 20699e2189 Bug 1597679 - part 2: Make `nsITextControlElement` inherit `nsGenericHTMLFormElementWithState` r=smaug
Sub classes of `nsITextControlElement` are only `HTMLInputElement` and
`HTMLTextAreaElement`. And both base class is
`nsGenericHTMLFormElementWithState`.  Therefore, we can make
`nsITextControlElement` inherit `nsGenericHTMLFormElementWithState` and
make `HTMLInputElement` and `HTMLTextAreaElement` inherit
`nsITextControlElement`.  Then, we can get rid of a lot of QI between
`nsINode`/`nsIContent`/`Element` and `nsITextControlElement` (and note that
some of them in a hot path).

Additionally, this patch renames `nsITextControlElement` to
`mozilla::TextControlElement`.

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

--HG--
rename : dom/html/nsITextControlElement.h => dom/html/TextControlElement.h
extra : moz-landing-system : lando
2019-11-25 06:35:15 +00:00
Coroiu Cristina 84bf2b6d25 Backed out 3 changesets (bug 1597679) for Android debug build bustage at build/src/dom/base/nsContentAreaDragDrop.cpp
Backed out changeset 6a73b58e0db4 (bug 1597679)
Backed out changeset 90a172eff2de (bug 1597679)
Backed out changeset d4a156cf28ff (bug 1597679)

--HG--
rename : dom/html/TextControlElement.h => dom/html/nsITextControlElement.h
2019-11-24 09:02:53 +02:00
Masayuki Nakano 12437404e1 Bug 1597679 - part 3: Create methods to compare given string with values of `TextControlState`, `nsTextControlFrame`, `HTMLInputElement` and `HTMLTextAreaElement` r=smaug
For avoiding unnecessary copy of string buffer only for comparing setting
value and current value, especially with `nsAutoString`, this patch
creates `*Equals()` methods for every class.

And also this avoids to call `nsContentUtils::PlatformToDOMLineBreaks()` in
most paths.

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

--HG--
extra : moz-landing-system : lando
2019-11-24 05:38:16 +00:00
Masayuki Nakano eea1784f2d Bug 1597679 - part 2: Make `nsITextControlElement` inherit `nsGenericHTMLFormElementWithState` r=smaug
Sub classes of `nsITextControlElement` are only `HTMLInputElement` and
`HTMLTextAreaElement`. And both base class is
`nsGenericHTMLFormElementWithState`.  Therefore, we can make
`nsITextControlElement` inherit `nsGenericHTMLFormElementWithState` and
make `HTMLInputElement` and `HTMLTextAreaElement` inherit
`nsITextControlElement`.  Then, we can get rid of a lot of QI between
`nsINode`/`nsIContent`/`Element` and `nsITextControlElement` (and note that
some of them in a hot path).

Additionally, this patch renames `nsITextControlElement` to
`mozilla::TextControlElement`.

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

--HG--
rename : dom/html/nsITextControlElement.h => dom/html/TextControlElement.h
extra : moz-landing-system : lando
2019-11-24 05:38:02 +00:00
Masayuki Nakano 129b58687c Bug 1588745 - part 6: Post processing of setting value with TextEditor should be done before dispatching "input" event r=Ehsan
Currently, "input" event is fired when the `AutoScriptBlocker` in `SetValue()`
is deleted.  So, for keeping same behavior, the post processing after calling
`TextEditor` methods should be done before editor dispatches "input" event.

Fortunately, `TextInputListener::OnEditActionHandled()` is a good chance to
do that.  Therefore, this patch makes it notify `TextControlState` and
`AutoTextControlHandlingState`.

Note that ideally, each method of `TextEditor` should return
`NS_ERROR_OUT_OF_MEMORY` coming from
`AutoTextControlHandlingState::OnEditActionHandled()`.  However, it requires
a lot of changes in editor classes, and the case is really rare since editor
does not use fallible allocation.  Therefore, it must be okay to crash in
editor if `OnEditActionHandled()` returns `NS_ERROR_OUT_OF_MEMORY`.

Depends on D51395

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

--HG--
extra : moz-landing-system : lando
2019-11-03 02:50:00 +00:00
Masayuki Nakano f3bf8ed506 Bug 1588745 - part 3: Make `TextControlState` not deleted actually while it handles something r=Ehsan
Currently, nobody guarantees that `TextControlState` won't be deleted while
it handles something with `MOZ_CAN_RUN_SCRIPT` methods.

This patch hides its destructor (and constructor) for making only
`TextControlState` itself can delete its instances.  Then, if instance owner
wants to delete it while handling action(s), the oldest `AutoHandlingState`
will delete the `TextControlState`.

Depends on D51392

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

--HG--
extra : moz-landing-system : lando
2019-11-01 20:49:12 +00:00
Masayuki Nakano 91b4aa6851 Bug 1588745 - part 1: Rename `nsTextEditorState` to `mozilla::TextControlState` r=Ehsan
It should be in `mozilla` namespace and it manages not only `TextEditor`,
manages selection, selection controller and callback from editor. so that
I think it stores state of "text control widget". Therefore, I name it to
`TextControlState`.

And cleaning up the cpp file.

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

--HG--
rename : dom/html/nsTextEditorState.cpp => dom/html/TextControlState.cpp
rename : dom/html/nsTextEditorState.h => dom/html/TextControlState.h
extra : moz-landing-system : lando
2019-11-01 20:43:11 +00:00
Boris Zbarsky 4530e9a97e Bug 1560055 part 5. Fix various reflection cases that should be using GetUnsignedIntAttr but are using GetIntAttr. r=mccr8
It mostly works out, because we return an int32_t then just cast it to uint32_t,
but it would be better to return the right thing to start with.

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

--HG--
extra : moz-landing-system : lando
2019-06-28 20:57:44 +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
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
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
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
Masayuki Nakano 0acd37ec1d Bug 1504911 - part 4: Make all script for web content dispatch "input" event with proper event interface r=smaug
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
2018-11-20 14:35:38 +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
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
Nathan Froyd 846d8789ee Bug 1492894 - part 1 - make the node hierarchy consistently constructed with NodeInfo&&; r=mccr8
Various places in dom/ use the pattern:

  already_AddRefed<NodeInfo> ni = ...;

which is supposed to be disallowed by our static analysis code, but
isn't, for whatever reason.  To fix our static analysis code, we need to
eliminate instances of the above pattern.

Unfortunately, eliminating this pattern requires restructuring how Nodes
are created.  Most Node subclasses take `already_AddRefed<NodeInfo>&` in
their constructors, and a few accept `already_AddRefed<NodeInfo>&&`.  We
need to enforce the latter pattern consistently, which requires changing
dozens of source files.
2018-09-21 16:45:49 -04:00
Emilio Cobos Álvarez 1fbd784d00 Bug 1481601 - Remove now-useless aPreallocateChildren from nsINode::Clone() and friends. r=bzbarsky
Since sed on multiple lines ended up being such a pain and I didn't end up
writing a script for this because I didn't think it'd end up being so boring, I
may have made a couple cleanups here and there as well...

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

--HG--
extra : moz-landing-system : lando
2018-08-08 23:58:44 +00:00
Emilio Cobos Álvarez 8f34c12e14 Bug 1479860: Remove unused aCompileEventHandlers argument from BindToTree. r=bz
Mostly automatic via sed. Only parts which I touched manually (apart from a
couple ones where I fixed indentation or which had mispelled arguments) are the
callers. I may have removed a couple redundant `virtual` keywords as well when
I started to do it manually, I can revert those if wanted.

Most of them are just removing the argument, but in Element.cpp I also added an
assertion for GetBindingParent when binding the ShadowRoot's kids (the binding
parent is set from the ShadowRoot constructor, and I don't think we bind a
shadow tree during unlink or what not which could cause a behavior difference).

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

MozReview-Commit-ID: 2oIgatty2HU
2018-08-01 10:42:54 +02:00
Emilio Cobos Álvarez 47ebd819b3 Bug 1449806: Merge {Servo,Generic}SpecifiedValues into MappedDeclarations. r=xidorn
The idea would be that this header is only included in cpp files, thus it's ok
to include ServoBindings, etc.

MozReview-Commit-ID: EgQEsR0cZd4
2018-06-25 11:14:39 +02:00
Boris Zbarsky 640e7f7112 Bug 1465875 part 5. Eliminate nsIDOMNSEditableElement. r=qdot 2018-06-01 22:35:23 -04:00
Boris Zbarsky 15b087c696 Bug 1465875 part 4. Eliminate random mentions of nsIDOMNSEditableElement. r=qdot 2018-06-01 22:35:23 -04:00
Boris Zbarsky 36ff5f731b Bug 1456169 part 3. Remove the now-unnecessary nsITextControlElement::GetPreviewNode. r=emilio
MozReview-Commit-ID: 3goF5VXvQap
2018-04-24 02:17:18 -04:00
Boris Zbarsky f82660f831 Bug 1456169 part 2. Remove the now-unnecessary nsITextControlElement::GetPlaceholderNode. r=emilio
MozReview-Commit-ID: FcVbeHEwkMz
2018-04-24 02:17:17 -04:00
Boris Zbarsky ca622386bd Bug 1456169 part 1. Remove the now-unnecessary nsITextControlElement::GetRootEditorNode. r=emilio
MozReview-Commit-ID: 6DYEtQMTCRF
2018-04-24 02:17:17 -04:00
Nika Layzell 242c9ce313 Bug 1438026 - Part 3: Replace nsPresState with the new PresState type, r=baku 2018-04-10 17:49:44 -04:00
Boris Zbarsky 14f26fccf6 Bug 1449631 part 8. Remove nsIDOMEventTarget::GetEventTargetParent. r=smaug
MozReview-Commit-ID: 5wQ2LYrjUxf
2018-04-05 13:42:41 -04:00
Boris Zbarsky 0aa422913e Bug 1449404 part 4. Get rid of a few virtual nsIContent methods. r=mccr8
The HasTextForTranslation implementation was just moved, with the nodetype
check up front dropped because that's enforced statically now.
2018-03-28 18:01:47 -04:00
Boris Zbarsky 258352c8a8 Bug 1447098 part 2. Rename the NS_IMPL_FROMCONTENT macros to NS_IMPL_FROMNODE. r=mystor 2018-03-21 17:39:04 -04:00
Kris Maglione 1c66345e09 Bug 1415352: Part 1a - Pass subject principal through to ParseAttribute. r=bz
This is necessary in order to parse style attributes using the subject
principal of the caller, rather than defaulting to the page principal.

MozReview-Commit-ID: GIshajQ28la

--HG--
extra : rebase_source : 5dba46f61d70ec647cae16383b62961ac72d2f47
2017-11-01 20:35:52 -07:00
Matthew Noorenberghe f8961d0aed Bug 1020698 - Implement @autocomplete for <textarea>. r=baku
The dom.forms.autocomplete.formautofill check in nsContentUtils::InternalSerializeAutocompleteAttribute
will control if values other than "on" and "off" are supported.

MozReview-Commit-ID: 48X3OzvuOpV

--HG--
rename : dom/html/test/forms/test_input_autocomplete.html => dom/html/test/forms/test_autocomplete.html
extra : rebase_source : b759672d2e9ef3b1e63fd999d149cf753df60539
2017-11-08 21:35:04 -08:00
Kyle Machulis be815f3caf Bug 1412437 - Remove nsIDOMHTMLTextAreaElement; r=bz
MozReview-Commit-ID: JAON7Rd7IAo
2017-11-01 14:28:22 -07:00
Kris Maglione 4275cd1039 Bug 1406278: Part 1 - Pass subject principal to SetAttribute and friends. r=bz
In order to tailor certain security checks to the caller that is attempting to
load a particular piece of content, we need to be able to attach an
appropriate triggering principal to the corresponding requests. Since most
HTML content is loaded based on attribute values, that means capturing the
subject principal of the caller who sets those attributes, which means making
it available to AfterSetAttr hooks.

MozReview-Commit-ID: BMDL2Uepg0X

--HG--
extra : rebase_source : 25e438c243700a9368c393e40e3a6002d968d6c8
2017-10-09 14:33:38 -07:00
Nicholas Nethercote d225f7151b Bug 1400460 - Rename nsIAtom as nsAtom. r=hiro.
(Path is actually r=froydnj.)

Bug 1400459 devirtualized nsIAtom so that it is no longer a subclass of
nsISupports. This means that nsAtom is now a better name for it than nsIAtom.

MozReview-Commit-ID: 91U22X2NydP

--HG--
rename : xpcom/ds/nsIAtom.h => xpcom/ds/nsAtom.h
extra : rebase_source : ac3e904a21b8b48e74534fff964f1623ee937c67
2017-10-03 09:05:19 +11:00
Emilio Cobos Álvarez b4949a9204 Bug 1401706: Move ownership of editor anon content to nsTextControlFrame. r=Ehsan
MozReview-Commit-ID: 4QpbarX5dvf
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>

--HG--
extra : rebase_source : f2bd73c696bc3e7937a8e6c365c9ef31a6888524
2017-09-22 02:18:30 +02:00
Olli Pettay 4f57f848d4 Bug 1397904 - nsTextControlFrame::SetValueChanged is too QI heavy, r=baku
--HG--
extra : rebase_source : caeef7fcee84688f99ab8bb0802ce550f8c08d1d
2017-09-08 14:07:22 +01:00
Masayuki Nakano b3c33d13ad Bug 1395146 - part1: Get rid of nsITextControlElement::IsPlainTextControl() and nsTextEditorState::IsPlainTextEditor() r=smaug
nsTextEditorState::GetValue() refers nsITextControlElement::IsPlainTextControl()
via nsTextEditorState::IsPlainTextEditor().  However, it always returns true and
virtual call with QI.  So, we should get rid of these unnecessary methods.

MozReview-Commit-ID: 3gHdGrzlys4

--HG--
extra : rebase_source : a1be33a18e93e64b8cc87e4f12d5e494b14520bf
2017-08-30 18:57:55 +09:00