Commit Graph

4227 Commits

Author SHA1 Message Date
Sylvestre Ledru
ef0bfc3822 Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-03-31 15:12:55 +00:00
Masayuki Nakano
3e64f2c30d Bug 1539356 - Mark EditorBase::InsertNodeTransaction() as MOZ_CAN_RUN_SCRIPT r=m_kato
This patch marks `EditorBase::InsertNodeTransaction()` **and** its callers as `MOZ_CAN_RUN_SCRIPT`.

Unfortunately, this patch tells us that some `GetSomething()` methods may destroy the editor since `HTMLEditRules::GetNodesForOperation()`, `HTMLEditRules::GetNodesFromPoint()` and `HTMLEditRules::GetNodesFromSelection()` may change the DOM tree.  Additionally, initialization methods may destroy the editor since it may insert a bogus `<br>` node.

Note that this patch also removes some unused methods. I.e., they are not result of some cleaning up the code. This patch just avoids marking unused methods as `MOZ_CAN_RUN_SCRIPT`.

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

--HG--
extra : moz-landing-system : lando
2019-03-30 11:55:29 +00:00
Oana Pop Rus
43fadb6745 Backed out changeset 447c87c2d139 (bug 1539356) on request of Jorg K. a=backout 2019-03-30 00:42:32 +02:00
Gijs Kruitbosch
a7991ad77c Bug 1538968 - don't register link updates for localization links in system-principal docs, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D24909

--HG--
extra : moz-landing-system : lando
2019-03-29 16:01:37 +00:00
Masayuki Nakano
de2d589e58 Bug 1540015 - part 3: Rename Document::GetShell() to Document::GetPresShell() and make it return PresShell* rather than nsIPresShell* r=smaug,emilio
This makes `Document::GetShell()` return `PresShell*` instead of `nsIPresShell`.

Additonally, "shell" is unclear ("docshell" vs. "presshell").  Therefore, this
also renames `Document::GetShell()` to `Document::GetPresShell()`.

Similarly, some other method names of `Document` are also renamed from
`*Shell*` to `*PresShell*`.

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

--HG--
extra : moz-landing-system : lando
2019-03-29 15:12:47 +00:00
Masayuki Nakano
e705b3211c Bug 1540015 - part 1: Make Document.h stop including nsIPresShell.h r=smaug
If `Document::GetShell()` returns `PresShell*` rather than `nsIPresShell`, it's
a good step to deCOMTaminate `PresShell`.

This patch makes `Document.h` stop including `nsIPresShell.h` since
`nsIPresShell.h` includes `Document.h` indirectly and that causes bustage
when we make `Document::GetShell()` return `PresShell*`.

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

--HG--
extra : moz-landing-system : lando
2019-03-29 15:11:04 +00:00
Dorel Luca
5a0fa68b78 Backed out 3 changesets (bug 1540015) for build bustage. CLOSED TREE
Backed out changeset 7b71c9da0214 (bug 1540015)
Backed out changeset 5723ddbc5c44 (bug 1540015)
Backed out changeset 9561d2c36fa5 (bug 1540015)
2019-03-29 16:14:26 +02:00
Masayuki Nakano
9273f25ce2 Bug 1540015 - part 3: Rename Document::GetShell() to Document::GetPresShell() and make it return PresShell* rather than nsIPresShell* r=smaug,emilio
This makes `Document::GetShell()` return `PresShell*` instead of `nsIPresShell`.

Additonally, "shell" is unclear ("docshell" vs. "presshell").  Therefore, this
also renames `Document::GetShell()` to `Document::GetPresShell()`.

Similarly, some other method names of `Document` are also renamed from
`*Shell*` to `*PresShell*`.

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

--HG--
extra : moz-landing-system : lando
2019-03-29 13:09:26 +00:00
Masayuki Nakano
854606257b Bug 1540015 - part 1: Make Document.h stop including nsIPresShell.h r=smaug
If `Document::GetShell()` returns `PresShell*` rather than `nsIPresShell`, it's
a good step to deCOMTaminate `PresShell`.

This patch makes `Document.h` stop including `nsIPresShell.h` since
`nsIPresShell.h` includes `Document.h` indirectly and that causes bustage
when we make `Document::GetShell()` return `PresShell*`.

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

--HG--
extra : moz-landing-system : lando
2019-03-29 12:12:20 +00:00
Masayuki Nakano
81b30d7143 Bug 1539356 - Mark EditorBase::InsertNodeTransaction() as MOZ_CAN_RUN_SCRIPT r=m_kato
This patch marks `EditorBase::InsertNodeTransaction()` **and** its callers as `MOZ_CAN_RUN_SCRIPT`.

Unfortunately, this patch tells us that some `GetSomething()` methods may destroy the editor since `HTMLEditRules::GetNodesForOperation()`, `HTMLEditRules::GetNodesFromPoint()` and `HTMLEditRules::GetNodesFromSelection()` may change the DOM tree.  Additionally, initialization methods may destroy the editor since it may insert a bogus `<br>` node.

Note that this patch also removes some unused methods. I.e., they are not result of some cleaning up the code. This patch just avoids marking unused methods as `MOZ_CAN_RUN_SCRIPT`.

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

--HG--
extra : moz-landing-system : lando
2019-03-29 10:55:31 +00:00
Emilio Cobos Álvarez
530e4429f9 Bug 1539742 - Notify of appends to the right document when parsing into an already-adopted node. r=bzbarsky
nsContentSink used to decide that it was fine to not notify of silent appends to
a document from the parser if the node was not on our document already.

That's not ok, since if styling or layout have happened already on the document
we're getting inserted into nobody notices them, which is wrong.

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

--HG--
extra : moz-landing-system : lando
2019-03-29 09:55:10 +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
arthur.iakab
34ec76e11d Backed out 2 changesets (bug 1538968) for causing xpcshell failures on components/places/History.cpp CLOSED TREE
Backed out changeset afc9e5ce9971 (bug 1538968)
Backed out changeset 56e336b27bcb (bug 1538968)
2019-03-28 06:02:01 +02:00
Gijs Kruitbosch
670d39447f Bug 1538968 - don't register link updates for localization links in system-principal docs, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D24909

--HG--
extra : moz-landing-system : lando
2019-03-27 17:30:54 +00:00
Botond Ballo
573a6eaafa Bug 1538511 - Move nsIScrollableFrame::ScrollMode into a separate file. r=kats
This allows this enumeration to be used from nsIPresShell.h without introducing
a circular dependency.

Its new home in layout/base/ScrollTypes.h, included as mozilla/ScrollTypes.h.
Others similar enums can be added to that file if desired.

This patch also makes ScrollMode an enum class (as it's no longer nested
inside a class) and switches its enumerators to the |eName| naming convention.

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

--HG--
extra : moz-landing-system : lando
2019-03-25 23:17:20 +00:00
Alastor Wu
2cd2a3b167 Bug 1537554 - part2 : let track track handle adding current cue and other cue if it's not disable. r=jya
According to the spec [1], `current cues` and `other cues` should only contain cues from `hidden` or `showing` text tracks.

In this patch, text track would be responsible to add `current cues` and `other cues` to the cues list by calling `GetCurrentCuesAndOtherCues()`.

If the text track is disabled, then it won't add any cues to the cues list.

In addition, in order to reduce the size of `other cues` (as actually we don't need to process all cues in the `other cues`), we use the time interval to only get the cues which are overlapping with the time interval.

[1] https://html.spec.whatwg.org/multipage/media.html#time-marches-on

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

--HG--
extra : moz-landing-system : lando
2019-03-26 07:50:50 +00:00
Alastor Wu
90bc3f5218 Bug 1537554 - part1 : add debug logs. r=jya
Differential Revision: https://phabricator.services.mozilla.com/D24473

--HG--
extra : moz-landing-system : lando
2019-03-26 02:52:22 +00:00
Boris Zbarsky
93d6619a30 Bug 1539204 part 2. Mark subject principal args in bindings as known-live. r=qdot
Differential Revision: https://phabricator.services.mozilla.com/D24927

--HG--
extra : moz-landing-system : lando
2019-03-26 21:57:12 +00:00
Masayuki Nakano
534fd23ca4 Bug 1533293 - part 2: Rewrite EditorBase::SelectEntireDocument() and its overrides r=m_kato
`EditorBase::SelectEntierDocument()` uses `Selection::Extend()` but it's too
slow.  It should use `Selection::SetStartAndEndInLimiter()` instead.

Additionally, `TextEditor::SelectEntierDocument()` shrink the result of
`EditorBase::SelectEntierDocument()` with `Selection::Extend()` if there is
a `moz-<br>` element.  So, `TextEditor::SelectEntinerDocument()` should set
its expected selection with a call for saving the runtime cost.

Then, we don't need to make `EditorBase::SelectEntierDocument()` as non-pure
virtual method.  So, this patch makes each its callers call
`Selection->SelectAllChildren()` directly.

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

--HG--
extra : moz-landing-system : lando
2019-03-26 10:06:43 +00:00
arthur.iakab
35c8a01713 Merge mozilla-central to autoland 2019-03-25 17:54:29 +02:00
dlee
9878ae650d Bug 1522412 - P2. Remove nsIChannel.LOAD_CLASSIFY_URI flag. r=Ehsan
nsIChannel.LOAD_CLASSIFY_URI is no longer required so we can remove it from
the codebase.
In the mean time, we add a new LOAD_BYPASS_URL_CLASSIFIER load flag for
channel creator to be able to force channel to bypass URL classifier check.
The use of the new LOAD_BYPASS_URL_CLASSIFIER flag will be addressed in
the other patches.

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

--HG--
extra : moz-landing-system : lando
2019-03-25 12:47:57 +00:00
shindli
b3ac60ff06 Merge inbound to mozilla-central. a=merge 2019-03-23 11:47:34 +02: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
Csoregi Natalia
0fb5d156aa Merge autoland to mozilla-central. a=merge 2019-03-21 12:39:38 +02:00
Noemi Erli
165f0d8c1c Backed out 3 changesets (bug 1533293) for causing Bug 1536595 a=backout
Backed out changeset d011dfe83683 (bug 1533293)
Backed out changeset e536f6e123d8 (bug 1533293)
Backed out changeset 19cff61f4fed (bug 1533293)
2019-03-20 13:29:17 +02:00
Boris Zbarsky
1c3e10afc5 Bug 1535384 part 1. Eliminate some easy cases of MOZ_CAN_RUN_SCRIPT_BOUNDARY on webidl callbacks. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D23771

--HG--
extra : moz-landing-system : lando
2019-03-19 05:24:39 +00:00
Mats Palmgren
c750eaac07 Bug 288704 part 2 - [css-lists] Implement display:list-item counters using a built-in 'list-item' CSS counter. r=emilio 2019-03-24 23:13:52 +01:00
Olli Pettay
4b409ef374 Bug 1535988 - Synthetic submit event should not trigger form submitting, r=baku
Differential Revision: https://phabricator.services.mozilla.com/D23925

--HG--
extra : moz-landing-system : lando
2019-03-19 06:30:28 +00:00
Emilio Cobos Álvarez
e66fb8488c Bug 1535165 - Use cbindgen for text-decoration-line. r=dholbert,boris
Differential Revision: https://phabricator.services.mozilla.com/D23412

--HG--
extra : moz-landing-system : lando
2019-03-18 17:58:16 +00:00
Masayuki Nakano
448571fd81 Bug 1533293 - part 2: Rewrite EditorBase::SelectEntireDocument() and its overrides r=m_kato
`EditorBase::SelectEntierDocument()` uses `Selection::Extend()` but it's too
slow.  It should use `Selection::SetStartAndEndInLimiter()` instead.

Additionally, `TextEditor::SelectEntierDocument()` shrink the result of
`EditorBase::SelectEntierDocument()` with `Selection::Extend()` if there is
a `moz-<br>` element.  So, `TextEditor::SelectEntinerDocument()` should set
its expected selection with a call for saving the runtime cost.

Then, we don't need to make `EditorBase::SelectEntierDocument()` as non-pure
virtual method.  So, this patch makes each its callers call
`Selection->SelectAllChildren()` directly.

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

--HG--
extra : moz-landing-system : lando
2019-03-18 01:51:53 +00:00
Sebastian Hengst
cee711baf9 Bug 1535353 - update Core :: DOM: * bugzilla product and component meta data in moz.build files after reorganization in bug 1533440 r=hsinyi
Differential Revision: https://phabricator.services.mozilla.com/D23546

--HG--
extra : moz-landing-system : lando
2019-03-17 23:13:22 +00:00
Andrea Marchesini
5bb6c49ba8 Bug 1535799 - nsIHttpChannel.isTrackingResource should be a method, r=Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D23765

--HG--
extra : moz-landing-system : lando
2019-03-17 06:55:50 +00:00
Emilio Cobos Álvarez
cc63c03558 Bug 1535438 - Remove Shadow DOM v0 APIs. r=smaug
Looks like these three APIs slipped through when shipping v1, but no other
vendor supports them, so no reason to be here.

I don't think there's any harm in letting the implementations keep living in
DocumentOrShadowRoot, but let me know if you think otherwise and I'll move them
to Document.

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

--HG--
extra : moz-landing-system : lando
2019-03-16 00:14:57 +00:00
Razvan Maries
3d59436341 Merge mozilla-central to autoland. a=merge on a CLOSED TREE 2019-03-15 05:48:49 +02:00
Alastor Wu
f8ebdadc67 Bug 1535223 - part3 : add log in TextTrack and TextTrackCue. r=jya
It would be helpful if we can also print the information in `TextTrack` and `TextTrackCue`.

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

--HG--
extra : moz-landing-system : lando
2019-03-14 23:25:10 +00:00
Alastor Wu
0b66618ffc Bug 1535223 - part2 : update TextTrackManager's logs. r=jya
Automatically print `TextTrackManager`'s address for the log marco, also update some exist logs.

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

--HG--
extra : moz-landing-system : lando
2019-03-14 23:24:32 +00:00
Alastor Wu
a0d0d81ceb Bug 1535223 - part1 : rename log module's name. r=jya
Use more general name `WebVTT` for this log module, which will include other debug logs in other files later.

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

--HG--
extra : moz-landing-system : lando
2019-03-14 23:21:28 +00:00
Dorel Luca
0e9ffb4c4f Merge mozilla-inbound to mozilla-central. a=merge 2019-03-14 18:25:40 +02: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
Sylvestre Ledru
4aa92e3091 Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D22514
2019-03-13 10:19:06 +01:00
Alastor Wu
b399b16f25 Bug 1533909 - part2 : add assertion to ensure we should always get a valid TextTrackCueList. r=jya
In this comparison, we only process `hidden` or `showing` track which should not return null TextTrackCueList.

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

--HG--
extra : moz-landing-system : lando
2019-03-13 05:28:44 +00:00
Alastor Wu
4c5f747109 Bug 1533909 - part1 : 'current cues' should not contain cues which are in the disable track. r=jya
According to the spec [1] step1, `current cues` should only contain cues which are in `hidden` or `showing` track.

[1] https://html.spec.whatwg.org/multipage/media.html#time-marches-on

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

--HG--
extra : moz-landing-system : lando
2019-03-13 05:33:30 +00:00
Boris Zbarsky
4ff91d4938 Bug 1506439 part 2. Stop creating a useless nsCOMPtr in DispatchInputEvent. r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D23068

--HG--
extra : moz-landing-system : lando
2019-03-13 02:34:48 +00:00
Mike Conley
a1f3599f4b Bug 1531101 - Fire UAWidget setup / change events when starting or stopping a visual clone of a <video> element. r=jya
Differential Revision: https://phabricator.services.mozilla.com/D22161

--HG--
extra : moz-landing-system : lando
2019-03-13 01:43:24 +00:00
Mike Conley
fbb2da4355 Bug 1531101 - Add method for stopping visual cloning of a video, and a read-only property to check cloning state. r=jya,Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D22160

--HG--
extra : moz-landing-system : lando
2019-03-13 01:43:07 +00:00
Boris Zbarsky
6d1f77b386 Bug 1534370 part 2. Annotate doCommand as MOZ_CAN_RUN_SCRIPT. r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D23041

--HG--
extra : moz-landing-system : lando
2019-03-12 01:57:42 +00:00
Boris Zbarsky
ccfb4f16b1 Bug 1534370 part 1. Annotate doCommandWithParams as MOZ_CAN_RUN_SCRIPT. r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D23036

--HG--
extra : moz-landing-system : lando
2019-03-13 00:43:48 +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
Alastor Wu
b78375bb8e Bug 1531863 - part3 : implement the 'show-poster-flag' for HTMLMediaElement. r=jya
According to the spec [1], implement the `show-poster-flag` which is used to decide whether we need to run `TimeMarchesOn` algorithm under certain situations.

[1] https://html.spec.whatwg.org/multipage/media.html#show-poster-flag

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

--HG--
extra : moz-landing-system : lando
2019-03-08 03:06:27 +00:00
Alastor Wu
5f410f2fce Bug 1531863 - part2 : handle text track mode changed in MediaElement. r=jya
In order to make the implementation more fitting with the spec, move the implementation of `pending-text-track-change-notification-flag` from text track list to media element.

In addition, it also help us not to expose the internal flag `show-poster` (which will be implemented in patch3) of media element when doing the related algorithm.

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

--HG--
extra : moz-landing-system : lando
2019-03-12 00:32:21 +00:00