Commit Graph

2595 Commits

Author SHA1 Message Date
Wes Kocher
e02435a31e Backed out changeset 77af189b5c49 (bug 1373984) for build bustage in nsHtml5Parser.cpp a=backout CLOSED TREE
MozReview-Commit-ID: 6kBmU71j2To
2017-06-25 05:10:14 -07:00
Cameron McCormack
deae2413d6 Bug 1291515 - Part 1: Introduce a pref for <style scoped>. r=bholley,dbaron
MozReview-Commit-ID: 1J9IvPrC0xh

--HG--
extra : rebase_source : 2c3a139cc5e4e223e5b9b7892020c96df2cf264c
2017-06-21 09:25:43 +08:00
Masatoshi Kimura
241039fd97 Bug 1373984 - Turn nsIDocument::mCharacterSet into mozilla::NotNull<const mozilla::Encoding*>. r=hsivonen
MozReview-Commit-ID: GF0YXDwfA14

--HG--
extra : rebase_source : 09da1685795583513bf019d61c58230c2c4d298d
extra : source : 49249788c0dee331ac2989dc39f0505d965a7bd8
2017-06-18 20:37:50 +09:00
Carsten "Tomcat" Book
5f51e5596e merge mozilla-inbound to mozilla-central a=merge 2017-06-23 11:28:19 +02:00
Mats Palmgren
3ae8e80f81 Bug 1375075 - Remove a FlushPendingNotifications that we don't need anymore. r=cpearce
The code that needed it was removed in bug 1325053.

MozReview-Commit-ID: 8P60SOpqyPq
2017-06-23 02:03:09 +02:00
Mats Palmgren
c3f48d9dd2 Bug 1374875 - Use simpler mutation observer than nsRange for media elements. r=cpearce
MozReview-Commit-ID: FVPdHC6tBXg
2017-06-23 02:03:08 +02:00
Carsten "Tomcat" Book
7fa56f5378 Merge mozilla-central to autoland 2017-06-22 14:11:46 +02:00
Florian Quèze
5b8f8b884c Bug 1374282 - script generated patch to remove Promise.defer calls, r=Mossop. 2017-06-22 12:51:42 +02:00
Florian Quèze
66f6d259bc Bug 1374282 - script generated patch to remove Task.jsm calls, r=Mossop. 2017-06-22 12:51:42 +02:00
Carsten "Tomcat" Book
4f3bc4dba8 merge mozilla-inbound to mozilla-central a=merge 2017-06-22 12:47:40 +02:00
Makoto Kato
19d01399e6 Bug 1360162 - Don't call UpdateOverlayTextVisibility twice by input.value setter when input element has focus. r=masayuki
When editor has focus, input.value setter will call UpdateOverlayTextVisibility via nsTextInputListener::EditAction -> nsTextControlFrame::SetValueChanged at first.  But SetValue will call UpdateOverlayTextVisibility again via ValueWasChanged.

So it is unnecessary to call UpdateOverlayTextVisibility on nsTextEditorState::SetValue when we have the editor.

MozReview-Commit-ID: Hw3Bh64Euo6

--HG--
extra : rebase_source : f33132e668fff48230f79990802a3d7e23e85207
2017-06-21 13:10:58 +09:00
JW Wang
61f7ca2479 Bug 1374930. P3 - move Clone() down to ChannelMediaDecoder for clone is possible only for those use channel-based resource. r=cpearce
MozReview-Commit-ID: Ci2kbts2pkQ

--HG--
extra : rebase_source : 3a2e70ca4bf56e1c73b7faff8e183211787a96bf
extra : source : 682cb949adae4683ae1cbbfbb4c457b83cb1fddc
2017-06-20 18:10:27 +08:00
JW Wang
1aa2d7bbd7 Bug 1374930. P2 - add an entry only after FinishDecoderSetup() succeeds. r=cpearce
MozReview-Commit-ID: 6MKRhVIZ4Z6

--HG--
extra : rebase_source : ab5a8551a1a054eba93be85c602b954ab15f9d8e
extra : intermediate-source : 75c4be291a53f119a30f40b3ae555a5ce7a0544f
extra : source : 20dd0be1d8d4f7838a0aff0755ad14e00a1d6eb0
2017-06-20 15:27:45 +08:00
Wes Kocher
ac0fd2038c Merge inbound to m-c a=merge
MozReview-Commit-ID: 3LXFVwSoMvs
2017-06-21 17:58:17 -07:00
Masayuki Nakano
5af13a8f29 Bug 1374207 - part5: nsTextControlFrame should use TextEditor instead of nsIEditor r=smaug
MozReview-Commit-ID: Eh6Cp546bXT

--HG--
extra : rebase_source : 1bb83361b72af61434a91eb08aba09e79a1dd976
2017-06-19 23:47:02 +09:00
Masayuki Nakano
9f1aec970a Bug 1374207 - part4: Element classes should use TextEditor class instead of nIEditor r=smaug
Unfortunately, nsGenericHTMLElement::GetAssociatedEditor() cannot use concrete classes because it may return nsIEditor which is set via nsIDocShell.editor.  The editor set to nsIDocShell may be implemented by JS since nsIEditor isn't marked as builtinclass.

MozReview-Commit-ID: 6GY9LOYp4hM

--HG--
extra : rebase_source : 3e0464067b30daf8254805458c5358d7ea644be8
2017-06-22 15:21:31 +09:00
Masayuki Nakano
7ad4ad3aab Bug 1374207 - part1: nsTextEditorState should use mozilla::TextEditor instead of editor interfaces r=smaug
Using concrete class rather than interface classes (nsI*Editor) will allow to reduce QI and some virtual calls.  Therefore, Editor classes should be used as concrete class as far as possible.

Unfortunately, if classes referring editor are initialized via scriptable interface, we cannot do this because nsI*Editor is still not marked as builtinclass.  Therefore, their editor may be implemented by JS.  E.g., inline nsIInlineSpellChecker.init() and nsIDocShell.editor.  Such remaining cases should be fixed after nsI*Editor classes are marked as builtinclass.

Note that this patch also creates nsIdentifierMapEntry.h which is separated from nsDocument.h because ShadowRoot.h needs the class but exposing nsDocument.h to the global and includes it causes bustage on Linux and Android.  Therefore, for fixing the include hell, this patch touches them and ContentChild.cpp.

MozReview-Commit-ID: i6fLWw6Qeo

--HG--
rename : dom/base/nsDocument.h => dom/base/nsIdentifierMapEntry.h
extra : rebase_source : c57bdfc1c13775acdcfd4732d8157d04d6b6613f
2017-06-20 22:57:08 +09:00
Carsten "Tomcat" Book
8a1350b5a6 Backed out changeset 4f6302a98ae4 (bug 1372405)
--HG--
extra : rebase_source : 41632f3158e88e692809731394a683d065a73dfb
2017-06-21 13:59:26 +02:00
Chris Peterson
c0d253195d Bug 1373525 - dom/html: Remove unused member function Revoke() of HTMLCanvasElement Runnables. r=baku
dom/html/HTMLCanvasElement.cpp:1369:12 [-Wunused-member-function] unused member function 'Revoke'
dom/html/HTMLCanvasElement.cpp:1411:12 [-Wunused-member-function] unused member function 'Revoke'

MozReview-Commit-ID: 1fmfUIO8VR6

--HG--
extra : source : 4c2087ccc105ad859c0ec0000db6032498d394ba
extra : intermediate-source : 75a8b5c0dc389d1a97b19d6b063f0b7b881931fc
extra : histedit_source : d026af384d4d282fa7c9f73a39f1f749112ce75d
2017-06-15 00:56:18 -07:00
Masatoshi Kimura
bdc7c83579 Bug 1374629 - Add mozilla::NotNull to mozilla::Encoding constant declarations. r=froydnj,hsivonen
MozReview-Commit-ID: s1sYrq6tqm

--HG--
extra : rebase_source : 0ffeab4554408fc6e28bd18478121aad73439a30
2017-06-20 22:04:18 +09:00
Blake Kaplan
4aafd09754 Bug 981796 - Make tests that use showModalDialog pass. r=smaug
Annoyingly, setting the pref doesn't magically make the function appear on the
current window, so we create an iframe and retrieve it from there.

MozReview-Commit-ID: 9fOr4YJOzXh

--HG--
extra : rebase_source : d23643b388538955cc831a3b6e1473232ab5498a
2017-06-16 12:41:01 -07:00
Ehsan Akhgari
4eac977034 Bug 1373857 - Part 3: Optimize the PostHandleEvent() events that we dispatch for checkboxes and radiocontrols when they get toggled in order to make it use direct WidgetEvent dispatch; r=smaug 2017-06-20 13:59:52 -04:00
Carsten "Tomcat" Book
7a237f7900 Backed out changeset f9147bef9fc6 (bug 1236512) 2017-06-20 14:30:34 +02:00
Edgar Chen
2ae9d877a0 Bug 1236512 - Part 3: Set docShellIsActive to false when browser window is fully covered by another application; r=mconley
MozReview-Commit-ID: DLsmWp1h8pa
2017-06-05 14:56:00 +08:00
Carsten "Tomcat" Book
013fb0680e merge mozilla-inbound to mozilla-central a=merge 2017-06-20 11:26:40 +02:00
Wes Kocher
17a16ffd2f Merge m-c to inbound, a=merge
MozReview-Commit-ID: Gf5xDaCWnPi
2017-06-19 17:34:36 -07:00
Wes Kocher
57da9036bb Merge inbound to central, a=merge
MozReview-Commit-ID: KZoJHLFuTwT
2017-06-19 17:30:02 -07:00
Boris Zbarsky
633b9f4d31 Bug 1373798 part 3. Rewrite our existing checks for the state of the "dir" attr on top of the new event state flags. r=mystor
MozReview-Commit-ID: LpCYABK5ZRN
2017-06-19 23:24:59 -04:00
Boris Zbarsky
8afc692082 Bug 1373798 part 2. Introduce event state flags that track the state of an element's "dir" attribute. r=mystor
MozReview-Commit-ID: EDCV2fUWGmX
2017-06-19 23:24:59 -04:00
Boris Zbarsky
e925cebd5b Bug 1373798 part 1. Stop calling SetHasDirAuto/ClearHasDirAuto in input element code. r=mystor
The old setup unset the HasDirAuto flag when changing the "dir" attr away from
the value "auto", and reset it when setting it to "auto", before calling
SetDirectionalityFromValue.  But SetDirectionalityFromValue doesn't depend on
the HasDirAuto flag, and that flag is set correctly for us by nsGenericElement,
so we don't have to manage it ourselves at all.

The callers outside BeforeSetAttr/AfterSetAttr just preserved the flag value, so
there's no behavior change at all for them.

MozReview-Commit-ID: AC8uV3cOtH2
2017-06-19 23:24:59 -04:00
Wes Kocher
976d5437f9 Merge m-c to autoland, a=merge
MozReview-Commit-ID: 6A96Fe0GPjw
2017-06-19 17:37:53 -07:00
Wes Kocher
3923267017 Backed out 4 changesets (bug 981796) for android failures in test_bug414291.html a=backout
Backed out changeset fe6569eae4ef (bug 981796)
Backed out changeset eca1651af3d3 (bug 981796)
Backed out changeset 5a1e684a1494 (bug 981796)
Backed out changeset 7f91ff196c93 (bug 981796)

MozReview-Commit-ID: COSf2kvo6c7
2017-06-19 16:41:55 -07:00
Wes Kocher
84816f4647 Backed out 5 changesets (bug 1373798) for browser_parseable_css.js failures a=backout CLOSED TREE
Backed out changeset ef2e6aa3ae88 (bug 1373798)
Backed out changeset 0970ac62b245 (bug 1373798)
Backed out changeset dc19b4db7e51 (bug 1373798)
Backed out changeset a5dd7744170e (bug 1373798)
Backed out changeset 2c8752c4b6fb (bug 1373798)

MozReview-Commit-ID: J1WkPvRqELs
2017-06-19 15:56:47 -07:00
Jessica Jong
fdb38c21da Bug 1372369 - Part 2: Set validity state to 'bad input' when the entered date value is invalid. r=smaug
If all fields in date/time input box are available but the input element's
value is empty, implies that it has been sanitized. In this case, we'll set the
'bad input' validity state. If any of the fields is cleared, we'll remove the
'bad input' validity state, as incomplete field does not imply 'bad input'.

MozReview-Commit-ID: 4EBpH5CWqXM
2017-06-19 01:13:00 -04:00
Jessica Jong
2adbf19dee Bug 1372369 - Part 1: Update input element's value when all fields are available and let DOM HTMLInputElement sanitize it. r=smaug
In this patch, we change it so that we always set the input element's value
once all fields are available and let DOM HTMLInputElement sanitize it. The
value after sanitization is not updated in the displayed input box, but may
display an error message (this will be done in Part 2) if needed.
Also, when any of the field's value is deleted, we will set input element's
value back to the empty string, so that a value is not accidentally submitted.

MozReview-Commit-ID: 9NAL8UlkoBK
2017-06-16 02:09:00 -04:00
Olli Pettay
8e6b3075e6 Bug 1374117 - nsTextEditorState::UpdateOverlayTextVisibility should use BoolVarCache, r=ehsan 2017-06-19 22:32:21 +03:00
Emilio Cobos Álvarez
f7a6c272b7 Bug 1370802: There's actually no need for lang to be lowercased. r=heycam
MozReview-Commit-ID: KwtbLqR9Y81

--HG--
extra : rebase_source : 644eadfb0d20e5ee5e1b26eab348903e8033b868
2017-06-17 02:27:59 +02:00
Emilio Cobos Álvarez
f6dc661b5b Bug 1370802: Parse lang attributes as atoms. r=heycam
MozReview-Commit-ID: Cnq3wB7aVB1

--HG--
extra : rebase_source : fa0252b78381bf023ab08bf2d9fd13d4c0ed57a1
2017-06-15 21:48:26 +02:00
Blake Kaplan
d8f53f83da Bug 981796 - Make tests that use showModalDialog pass. r=smaug
Annoyingly, setting the pref doesn't magically make the function appear on the
current window, so we create an iframe and retrieve it from there.

MozReview-Commit-ID: 9fOr4YJOzXh

--HG--
extra : rebase_source : d23643b388538955cc831a3b6e1473232ab5498a
2017-06-16 12:41:01 -07:00
Boris Zbarsky
0abd585823 Bug 1373798 part 3. Rewrite our existing checks for the state of the "dir" attr on top of the new event state flags. r=mystor
MozReview-Commit-ID: LpCYABK5ZRN

--HG--
extra : rebase_source : 2771f8fb377b051b8dc8d93d08a2360817331f21
2017-06-19 14:42:01 -04:00
Boris Zbarsky
54df8acf71 Bug 1373798 part 2. Introduce event state flags that track the state of an element's "dir" attribute. r=mystor
MozReview-Commit-ID: EDCV2fUWGmX

--HG--
extra : rebase_source : b2e588d6aab951eeb46b5b1e9321c82c83e0afa4
2017-06-19 14:41:58 -04:00
Boris Zbarsky
b569a120dc Bug 1373798 part 1. Stop calling SetHasDirAuto/ClearHasDirAuto in input element code. r=mystor
The old setup unset the HasDirAuto flag when changing the "dir" attr away from
the value "auto", and reset it when setting it to "auto", before calling
SetDirectionalityFromValue.  But SetDirectionalityFromValue doesn't depend on
the HasDirAuto flag, and that flag is set correctly for us by nsGenericElement,
so we don't have to manage it ourselves at all.

The callers outside BeforeSetAttr/AfterSetAttr just preserved the flag value, so
there's no behavior change at all for them.

MozReview-Commit-ID: AC8uV3cOtH2

--HG--
extra : rebase_source : c71739095e4b65e7db10f6174a875891f97738d6
2017-06-19 14:41:48 -04:00
Kirk Steuber
ce6f58ef1b Bug 1373744 - Change nsGenericHTMLElement::CopyInnerTo to call SetParsedAttr instead of SetInlineStyleDeclaration r=bz
Currently, nsGenericHTMLElement::CopyInnerTo uses SetInlineStyleDeclaration to clone CSS attributes. However, if we used SetParsedAttr instead, the declaration block would be addref'ed instead of being cloned.

We need to mark the declaration block as immutable in that situation so that the attribute is copied on write.

MozReview-Commit-ID: QMm23bfwqD

--HG--
extra : rebase_source : a7d8596e2f52bef21e56b9a979638c970be4c603
2017-06-16 14:43:45 -07:00
Makoto Kato
23c3e741f1 Bug 1368888 - Don't get previous value twice in input.value setter. r=smaug
We get previous input.value twice in HTMLInputElement::SetValue and nsTextEditorState::SetValue when setting input.value.  Since nsTextEditorState::GetValue uses DocumentEncoder, it is expensive.  So we should use old value as parameter of nsTextEditorState::SetValue if possible.

MozReview-Commit-ID: A1UPfETTVCn

--HG--
extra : rebase_source : f751289b42b4d9d5c389042f688c53bde47d1620
2017-06-14 18:21:01 +09:00
Masatoshi Kimura
838ccc4108 Bug 1369025 - Remove mozilla::dom::EncodingUtils. r=hsivonen
MozReview-Commit-ID: 5O5WtxbmATQ

--HG--
rename : dom/encoding/encodingsgroups.properties => intl/locale/encodingsgroups.properties
extra : rebase_source : 13143b43ee745b618e05ed1b6991d69781c2767d
2017-06-17 11:54:40 +09:00
Masatoshi Kimura
9865b2fdeb Bug 1369020 - Remove nsContentUtils::ConvertStringFromEncoding and nsContentUtils::CheckForBOM. r=hsivonen
MozReview-Commit-ID: E0w8BsP1Rof

--HG--
extra : rebase_source : db95e1e7fc60c9b9c8e6d7fcc5329421ec97e811
2017-06-16 21:11:03 +09:00
Wes Kocher
39066d6984 Merge inbound to central, a=merge
MozReview-Commit-ID: 2k4filK9zyX
2017-06-16 17:58:58 -07:00
Kirk Steuber
25f3dbc5bc Bug 1357645 - Clone attributes rather than reparsing when possible r=bz
Now that the side effects of parsing have been relocated to BeforeSetAttr and AfterSetAttr (Bug 1365092), we can easily switch nsGenericHTMLElement::CopyInnerTo from reparsing attributes to cloning them. They are still reparsed, however, in the case where the owning document is changing since Base URIs may have changed.

MozReview-Commit-ID: 2TlUUyBx6bL

--HG--
extra : rebase_source : b581e797a24230d012cf79c1fc567c05d9acc746
2017-06-15 09:56:18 -07:00
John Dai
2675b61900 Bug 556743 - Update web-platform tests for labels attribute. r=smaug 2017-06-05 06:27:00 -04:00
John Dai
005cba50ea Bug 556743 - Implement the labels attribute. r=smaug 2017-06-15 20:04:00 -04:00