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

13765 Коммитов

Автор SHA1 Сообщение Дата
Xidorn Quan e6414a0a93 Bug 1384001 - Reenable test_intersectionobservers.html. r=xidorn
MozReview-Commit-ID: 1duaKfd8ADd

--HG--
extra : rebase_source : dcfc6afd19b2c9c242f8cc636e10bfd2d326ce61
2017-08-17 13:35:37 +10:00
Phil Ringnalda 38ce1ea2a0 Backed out 10 changesets (bug 1390748) for build bustage
Backed out changeset 02b36ee5fb17 (bug 1390748)
Backed out changeset 84e8bf01c856 (bug 1390748)
Backed out changeset fc8989be30f3 (bug 1390748)
Backed out changeset 14d421ace6cc (bug 1390748)
Backed out changeset 7dadac869038 (bug 1390748)
Backed out changeset 0e77809e7bc2 (bug 1390748)
Backed out changeset bf78a8dce9c5 (bug 1390748)
Backed out changeset 5fa77990472e (bug 1390748)
Backed out changeset 5d3b637d2485 (bug 1390748)
Backed out changeset 634fe076d134 (bug 1390748)

MozReview-Commit-ID: Dxio8vXDCHg
2017-08-16 21:33:10 -07:00
Chris Pearce e927f10587 Bug 1390748 - Remove some unnecessary includes. r=jwwang
MozReview-Commit-ID: J3viRI4Q6LF

--HG--
extra : rebase_source : 6661db3a00fc8b378aedd456950fb819f699507b
2017-08-16 17:18:39 +12:00
Chris Pearce a0917579b4 Bug 1390748 - Pre-declare MediaDecoder in HTMLMediaElement. r=jwwang
I noticed that touching MediaDecoder rebuilds a lot of seemingly unrelated
code. This is because HTMLMediaElement includes MediaDecoder.h, and
HTMLMediaElement is included in a number of places. Having HTMLMediaElement.h
predeclare rather than include fixes it.

MozReview-Commit-ID: I0vrPgqvvge

--HG--
extra : rebase_source : 366d4e34e9c425b478b4c9058e27c9a32de36515
2017-08-15 17:09:06 +12:00
Xidorn Quan 179961b3c9 Bug 1383845 - Enable tests disabled for bug 1383845. r=TYLin
MozReview-Commit-ID: Glao9d9PiUF

--HG--
extra : rebase_source : cfc70fcb350a7ee8e325ba1bda0bcdead62d786e
2017-08-17 10:51:59 +10:00
Wes Kocher 9e13a44b54 Merge inbound to central, a=merge
MozReview-Commit-ID: GEfEDRZk5bo
2017-08-16 16:59:26 -07:00
Thomas Nguyen 33fb4a1505 Bug 1384493 - LoadStyleLink and LoadInlineStyle should use correct referrer policy. r=heycam
If the link element has referrerpolicy attribute, we should use policy in the
attribute with higher priority

MozReview-Commit-ID: GZZeRaoxPUw
2017-08-15 00:05:00 -04:00
Gabor Krizsanits 722233fed1 Bug 1376895 - Make preloaded browser use pre-existing content process. r=mconley
We want to avoid to have several cached content processes, one for each
preloaded browser (one per window) and one for the preallocated process.
For that we force the preloaded browser to choose an existing process and
during the first navigation in that tab, that leaves about:newtab, we re-run
the process selecting algorithm
2017-08-16 13:00:22 +02:00
Carsten "Tomcat" Book eea1986e03 merge mozilla-inbound to mozilla-central a=merge 2017-08-16 11:23:24 +02:00
Carsten "Tomcat" Book 1fc6e56a12 merge autoland to mozilla-central a=merge 2017-08-16 11:20:31 +02:00
Carsten "Tomcat" Book a478b0ef54 Backed out changeset adf5ed713e0d (bug 1376895) 2017-08-16 11:15:50 +02:00
Jan de Mooij 9a7bf50e92 Bug 1390159 - Remove throw-on-set setProperty hooks on WrappedNatives. r=mrbkap 2017-08-16 09:01:56 +02:00
Wes Kocher 7921644d1b Merge inbound to central, a=merge
MozReview-Commit-ID: 1DadhJTLBXN
2017-08-15 19:02:51 -07:00
Nicholas Nethercote 57d3dfdc07 Bug 1390404 - Use AllChildrenIterator to traverse DOM nodes when memory reporting. r=bholley.
This gets us coverage for anonymous nodes, which are currently missed.

MozReview-Commit-ID: KBOSXloteu6

--HG--
extra : rebase_source : 0f71c027f8bbbb0abd4d9e812b5d7369109e7ebc
2017-08-15 11:12:40 +10:00
Wes Kocher be24aec8e9 Merge m-c to inbound a=merge
MozReview-Commit-ID: JqsSD85rE4W
2017-08-15 19:15:22 -07:00
Ehsan Akhgari dea2e72d91 Bug 1390382 - Part 1: Inline Selection::IsCollapsed(); r=smaug 2017-08-15 18:57:14 -04:00
Ehsan Akhgari 604f6343ab Bug 1390626 - Part 2: Avoid using QueryInterface() to convert nsIDocument to nsIDOMDocument; r=smaug 2017-08-15 17:10:34 -04:00
Ehsan Akhgari 0b3dbd3a20 Bug 1390626 - Part 1: Bail out early if there are no selection listeners to notify; r=smaug 2017-08-15 17:10:34 -04:00
Michael Layzell 76fb615887 Bug 1384238 - Annotate BHR hangs which occur while there is a pending input event, r=smaug
MozReview-Commit-ID: HRPMw2IfEKB
2017-08-15 16:36:28 -04:00
Wes Kocher 3945278423 Merge m-c to autoland, a=merge
MozReview-Commit-ID: D96bIJACwZe
2017-08-15 19:16:12 -07:00
Bobby Holley d42f0733ac Bug 1389300 - Inherit style backend into NS_NewDOMDocument. r=smaug,r=heycam
Our current machinery for enabling stylo requires a docshell - if there isn't
one, we default to the Gecko style system.

When getComputedStyle operates on an element without a presshell, it uses the
caller's presshell instead. If the element has previously been styled with
one style system (but no longer has a presshell), and the caller uses a
different style backend, using the caller's style system can cause crashes when
we pull bits of cached data off the DOM (like cached style attributes).

So we want to throw when window.getComputedStyle(element) is called for a
(window, element) pair with different style backends (which is what the next
patch in this bug does).

However, that causes a few failures where stylo-backed documents try to do
getComputedStyle on an XHR document (which, without a docshell, will use the
gecko style system).

So this patch does some work to propagate the creator's style backend into
various docshell-less documents. This should allow both chrome (which uses gecko)
and content (which uses stylo) to use getComputedStyle on the response document
for XHRs they create.

Note that the second patch in this bug will make
chromeWin.getComputedStyle(contentObj) throw. If we discover code that does
that, we can just make it invoke the content's getComputedStyle method over Xrays.

MozReview-Commit-ID: 5OsmHJKq5Ui
2017-08-15 19:10:43 -07:00
Masatoshi Kimura 38894511bc Bug 1390106 - Stop using versioned scripts in dom. r=mrbkap
MozReview-Commit-ID: 89KvCoTAg3I

--HG--
extra : rebase_source : 24831fa454a1cc6fff70a9b1eb509d0f5aeb800a
2017-08-14 20:42:55 +09:00
Henri Sivonen 2607c163b1 Bug 1375701 - Atomize class attribute value in the parser in the innerHTML case. r=Ehsan
MozReview-Commit-ID: CKyGlzYS15e

--HG--
extra : rebase_source : 9ece88d9c85d98665413a7f9d730d7ff149d8486
2017-08-11 09:22:57 +03:00
Henri Sivonen 057b37715a Bug 1385272 - Make plaintext serializer not crash when a <tr> is a child of a <tr>. r=Ehsan
MozReview-Commit-ID: CMNIWYX8R07

--HG--
extra : rebase_source : 0b245f01c4c7aa4b78853534584876a23689826c
2017-08-14 14:24:51 +03:00
Sebastian Hengst 14cf46a41a Backed out changeset fabf345eec6e (bug 1375701) for bustage at parser/html/nsHtml5String.h:143:3: bad implicit conversion constructor for 'nsHtml5String'. r=backout on a CLOSED TREE 2017-08-15 16:28:10 +02:00
Henri Sivonen 6815b2d2c7 Bug 1375701 - Atomize class attribute value in the parser in the innerHTML case. r=Ehsan
MozReview-Commit-ID: CKyGlzYS15e

--HG--
extra : rebase_source : a66d3d1659aec509c50f3ca641c0eb1d87151104
2017-08-11 09:22:57 +03:00
Carsten "Tomcat" Book 6b36e00b7c merge mozilla-inbound to mozilla-central a=merge 2017-08-15 11:42:11 +02:00
Kris Maglione 0b7f63fe38 Bug 1390010: Part 2 - Allow JS callers to retrieve remoteType of message managers. r=krizsa
This gives JS callers access to the remote type of remote message managers.
There's currently no way for extensions to access this unless they have a
<browser> element to check the remoteType attribute of.

MozReview-Commit-ID: A8Y3ZSG3rt8

--HG--
extra : rebase_source : e024922522da9a30265f05e9a8dbf7529dfe1d81
2017-08-13 18:58:23 -07:00
Xidorn Quan c40f44ef9b Bug 1370508 - Enable stylo on generic XML documents. r=heycam
MozReview-Commit-ID: 4XQ9RPQ7oa1

--HG--
extra : rebase_source : 74e411e2280e818fc1fbd2efda677565cfa2f8b6
2017-08-09 19:57:33 +10:00
Michael Kaply 73bafcec5e Bug 1389168 - Remove unnecessary IBM license text. r=gerv
MozReview-Commit-ID: 8HdaBppsJsc

--HG--
extra : rebase_source : 617c17b1162265e44810597fa69d533316da1a6b
2017-08-16 16:10:56 -05:00
Kris Maglione 08ac1de819 Bug 1357589: Part 1 - Use the correct default remote type for content-created tabs/windows. r=mconley r=mystor
When creating new windows/tabs from the content process, we currently choose
the default remote type based on the referrer URI, rather than the actual
remote type of the opener. While this generally works, it fails when opening
windows from URLs (particularly in iframes) which are opened in process types
other than their default process type, since the initial about:blank load gets
redirected to a new process before the child process has a chance to load its
actual target URI.

Using the actual remote type of the child opening the window fixes this
problem for URLs which are capable of being loaded into the child's process
type.

MozReview-Commit-ID: ClxVGxu52Lf

--HG--
extra : rebase_source : 3a029d207dac0b08eb7c7ce7737adfd9c1c96892
2017-08-16 15:11:59 -07:00
Wes Kocher cb3e58d017 Merge m-c to inbound, a=merge
MozReview-Commit-ID: ENNd2QVktmQ
2017-08-16 17:07:52 -07:00
Luke Wagner 9b038447f4 Bug 1347644 - Simplify/rename JS::AsyncTask (r=till,bkelly,mccr8)
MozReview-Commit-ID: BahNzYPv0AO
2017-08-16 14:38:53 -05:00
Aryeh Gregor 6bdc69c563 Bug 718711 - Don't return selections for documents that don't have them; r=smaug
Per spec, getSelection() should return null when the document is not
associated with a browsing context.

MozReview-Commit-ID: B6QbLWVmfcF

--HG--
extra : rebase_source : 4826ba52726ac413bc8c4b95cc309da7ce7986ab
2017-08-13 14:17:28 +03:00
Aryeh Gregor 2340265246 Bug 718711 - getSelection() should exist for XML documents; r=smaug
The spec puts it on the Document interface, not HTMLDocument, so it
should apply to XML documents as well.  In general we want APIs to be
available for all types of documents unless there's a specific reason
not to.

Tests submitted upstream:
https://github.com/w3c/web-platform-tests/pull/6804

MozReview-Commit-ID: A0QDxpONNCE

--HG--
extra : rebase_source : 0c84863b455c3e9748aedcfb562920f8679e358c
2017-08-10 16:53:42 +03:00
Milan Sreckovic 8ad3e52a49 Bug 1387514: Upgrade BaseRect (derived classes) width and height direct member variable use to instead use Width()/SetWidth() and Height()/SetHeight() in dom/*. r=overholt
MozReview-Commit-ID: B9YWmM3C1oX

--HG--
extra : rebase_source : d7c27de968295ee13ece8bda23798cb215d60a4b
2017-08-14 08:30:10 -04:00
Masayuki Nakano 5791416beb Bug 1388004 - part3: nsINode::GetSelectionRootContent() should use HTMLEditor r=smaug
nsINode::GetSelectionRootContent() uses nsIEditor since nsContentUtils::GetHTMLEditor() returned nsIEditor.  Therefore, it needed to use GetEditorRootContent() to retrieve the editor root element as nsIContent*.

Now, it can use HTMLEditor and HTMLEditor::GetRoot() returns the editor root element as nsIContent* directly.  So, it should use HTMLEditor instead.

MozReview-Commit-ID: I937a5TuxVD

--HG--
extra : rebase_source : 5c00be8b590ca3d4d4290a69eef1e2e177ee069d
2017-08-07 17:00:44 +09:00
Masayuki Nakano b11e66f8da Bug 1388004 - part1: Make nsContentUtils::GetHTMLEditor() return HTMLEditor* rather than nsIEditor* r=smaug
nsContentUtils::GetHTMLEditor() currently returns nsIEditor* since editor of doc shell may be any type of editors such as TextEditor or editor object which is implemented by JS.  However, nsIEditor is now a builtin class.  So, it can return HTMLEditor.

MozReview-Commit-ID: 3YoFOplZa7W

--HG--
extra : rebase_source : 46f42d23babd64bf0a5003e66e8fe3b9e0bd7166
2017-08-07 16:33:59 +09:00
Sebastian Hengst 49882abddb merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: CExKztwYFsz
2017-08-14 11:57:21 +02:00
johndai1984 59be6e40c0 Bug 1299363 - Part 5-2: Implement new upgrade steps. r=bz, r=wchen
MozReview-Commit-ID: 34fIWSKUqyp

--HG--
extra : rebase_source : 3d7af3b1b262ab16c8d70e7389c0534c9261f3f0
extra : histedit_source : 8fd8debbc337ba260c4ec6384026a796bfd00021
2017-08-13 16:40:37 +08:00
Nicholas Nethercote 57c26c9834 Bug 1387956 - Overhaul ComputedValues measurement, and add style structs measurement. r=bholley.
This patch moves measurement of ComputedValues objects from Rust to C++.
Measurement now happens (a) via DOM elements and (b) remaining elements via
the frame tree. Likewise for the style structs hanging off ComputedValues
objects.

Here is an example of the output.

> ├──27,600,448 B (26.49%) -- active/window(https://en.wikipedia.org/wiki/Barack_Obama)
> │  ├──12,772,544 B (12.26%) -- layout
> │  │  ├───4,483,744 B (04.30%) -- frames
> │  │  │   ├──1,653,552 B (01.59%) ── nsInlineFrame
> │  │  │   ├──1,415,760 B (01.36%) ── nsTextFrame
> │  │  │   ├────431,376 B (00.41%) ── nsBlockFrame
> │  │  │   ├────340,560 B (00.33%) ── nsHTMLScrollFrame
> │  │  │   ├────302,544 B (00.29%) ── nsContinuingTextFrame
> │  │  │   ├────156,408 B (00.15%) ── nsBulletFrame
> │  │  │   ├─────73,024 B (00.07%) ── nsPlaceholderFrame
> │  │  │   ├─────27,656 B (00.03%) ── sundries
> │  │  │   ├─────23,520 B (00.02%) ── nsTableCellFrame
> │  │  │   ├─────16,704 B (00.02%) ── nsImageFrame
> │  │  │   ├─────15,488 B (00.01%) ── nsTableRowFrame
> │  │  │   ├─────13,776 B (00.01%) ── nsTableColFrame
> │  │  │   └─────13,376 B (00.01%) ── nsTableFrame
> │  │  ├───3,412,192 B (03.28%) -- servo-style-structs
> │  │  │   ├──1,288,224 B (01.24%) ── Display
> │  │  │   ├────742,400 B (00.71%) ── Position
> │  │  │   ├────308,736 B (00.30%) ── Font
> │  │  │   ├────226,512 B (00.22%) ── Background
> │  │  │   ├────218,304 B (00.21%) ── TextReset
> │  │  │   ├────214,896 B (00.21%) ── Text
> │  │  │   ├────130,560 B (00.13%) ── Border
> │  │  │   ├─────81,408 B (00.08%) ── UIReset
> │  │  │   ├─────61,440 B (00.06%) ── Padding
> │  │  │   ├─────38,176 B (00.04%) ── UserInterface
> │  │  │   ├─────29,232 B (00.03%) ── Margin
> │  │  │   ├─────21,824 B (00.02%) ── sundries
> │  │  │   ├─────20,080 B (00.02%) ── Color
> │  │  │   ├─────20,080 B (00.02%) ── Column
> │  │  │   └─────10,320 B (00.01%) ── Effects
> │  │  ├───2,227,680 B (02.14%) -- computed-values
> │  │  │   ├──1,182,928 B (01.14%) ── non-dom
> │  │  │   └──1,044,752 B (01.00%) ── dom
> │  │  ├───1,500,016 B (01.44%) ── text-runs
> │  │  ├─────492,640 B (00.47%) ── line-boxes
> │  │  ├─────326,688 B (00.31%) ── frame-properties
> │  │  ├─────301,760 B (00.29%) ── pres-shell
> │  │  ├──────27,648 B (00.03%) ── pres-contexts
> │  │  └─────────176 B (00.00%) ── style-sets

The 'servo-style-structs' and 'computed-values' sub-trees are new. (Prior to
this patch, ComputedValues under DOM elements were tallied under the the
'dom/element-nodes' sub-tree, and ComputedValues not under DOM element were
ignored.) 'servo-style-structs/sundries' aggregates all the style structs that
are smaller than 8 KiB.

Other notable things done by the patch are as follows.

- It significantly changes the signatures of the methods measuring nsINode and
  its subclasses, in order to handle the tallying of style structs separately
  from element-nodes. Likewise for nsIFrame.

- It renames the 'layout/style-structs' sub-tree as
  'layout/gecko-style-structs', to clearly distinguish it from the new
  'layout/servo-style-structs' sub-tree.

- It adds some FFI functions to access various Rust-side data structures from
  C++ code.

- There is a nasty hack used twice to measure Arcs, by stepping backwards from
  an interior pointer to a base pointer. It works, but I want to replace it
  with something better eventually. The "XXX WARNING" comments have details.

- It makes DMD print a line to the console if it sees a pointer it doesn't
  recognise. This is useful for detecting when we are measuring an interior
  pointer instead of a base pointer, which is bad but easy to do when Arcs are
  involved.

- It removes the Rust code for measuring CVs, because it's now all done on the
  C++ side.

MozReview-Commit-ID: BKebACLKtCi

--HG--
extra : rebase_source : 4d9a8c6b198a0ff025b811759a6bfa9f33a260ba
2017-08-11 16:37:33 +10:00
Sebastian Hengst d98ea1f774 merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: FzIkMLHbOh2
2017-08-14 01:30:32 +02:00
Aryeh Gregor 99a150fe57 Bug 1359397 - Don't allow Selection in nodes not in the document; r=masayuki
This matches the spec and Chrome, and seems to bring us closer to Edge
and WebKit as well.  It also matches our own behavior for addRange(),
which was changed in bug 1341137.

For collapse and selectAllChildren, we match the tests and browsers, but
the spec is incorrect at the time of this writing:
https://github.com/w3c/selection-api/pull/86

The removeAllRanges test hadn't been updated for the spec change.

MozReview-Commit-ID: DTK8283k5IP

--HG--
extra : rebase_source : 54701e7136c33ebce651d5f74c3dc1d8b944f9a3
2017-08-10 15:02:08 +03:00
Aryeh Gregor 3fd5dfdd58 Bug 1175033 - Support custom use counters that can be incremented from C++; r=froydnj
MozReview-Commit-ID: 7uFDgmM2zqs

--HG--
extra : rebase_source : 0c456c35162d33da1c72f82ee982d0eef23f5e3d
2017-08-08 17:01:27 +03:00
Sebastian Hengst 9c7e09c9d3 merge mozilla-central to autoland. r=merge a=merge 2017-08-13 01:06:57 +02:00
Sebastian Hengst 56c035fa36 merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: 4cZJ3qFjvPY
2017-08-12 23:49:21 +02:00
Bobby Holley 1cf62db957 Bug 1389681 - Move NoteDirty* to Element. r=emilio
MozReview-Commit-ID: KvKAEuYkssx
2017-08-12 10:12:28 -07:00
Nicholas Nethercote 9ab2597a8d Bug 1387956 (part 2) - Overhaul handling of nsWindowSizes. r=mccr8.
This patch does the following.

- Moves nsWindowSizes from nsWindowMemoryReporter.h to its own file,
  nsWindowSizes.h, so it can be included more widely without exposing
  nsWindowMemoryReporter.

- Merges nsArenaMemoryStats.h (which defines nsTabSizes and nsArenaMemoryStats)
  into nsWindowSizes.h.

- Renames nsArenaMemoryStats as nsArenaSizes, and nsWindowSizes::mArenaStats as
  nsWindowSizes::mArenaSizes. This is the more usual naming scheme for such
  types.

- Renames FRAME_ID_STAT_FIELD as NS_ARENA_SIZES_FIELD.

- Passes nsWindowSizes to PresShell::AddSizeOfIncludingThis() and
  nsPresArena::AddSizeOfExcludingThis(), instead of a bunch of smaller things.
  One nice consequence is that the odd nsArenaMemoryStats::mOther field is no
  longer necessary, because we can update nsWindowSizes::mLayoutPresShellSize
  directly in nsPresArena::AddSizeOfExcludingThis().

- Adds |const| to a few methods.

MozReview-Commit-ID: EpgFWKFqy7Y
2017-08-10 14:14:09 +10:00
Nicholas Nethercote 764c284800 Bug 1387956 (part 1) - Change |nsWindowSizes*| arguments to |nsWindowSizes&|. r=mccr8.
This makes it clear they are never null.

MozReview-Commit-ID: H4i8uqZs48H

--HG--
extra : rebase_source : c7ada64881f015c68eaee2fbfad901f806cab833
2017-08-10 14:13:22 +10:00
Wes Kocher 5a4357c768 Merge inbound to central, a=merge
MozReview-Commit-ID: GArkKmOFIVH
2017-08-11 13:15:33 -07:00
Sebastian Hengst cd718a6989 Backed out changeset 0aca62e914cf (bug 1376895) for asserting IsSafeToRun(), at dist\include\mozilla/SchedulerGroup.h:81 e.g. in mochitest dom/events/test/test_bug336682_1.html on Windows 10 x64. r=backout 2017-08-11 14:48:27 +02:00
Gabor Krizsanits 272b1a18ac Bug 1376895 - Make preloaded browser use pre-existing content process. r=mconley
We want to avoid to have several cached content processes, one for each
preloaded browser (one per window) and one for the preallocated process.
For that we force the preloaded browser to choose an existing process and
during the first navigation in that tab, that leaves about:newtab, we re-run
the process selecting algorithm
2017-08-11 12:44:11 +02:00
Cameron McCormack fdf6f9c5ef Bug 1384741 - Part 1: Add facility to buffer up CSP violation reports. r=bz
MozReview-Commit-ID: G4JLTmP1wD7
2017-08-07 10:09:32 +08:00
Sebastian Hengst b3269bec34 Backed out changeset 685802013f43 (bug 1389460) for OS X bustage at widget/cocoa/nsMenuX.mm:364: no member named 'DispatchDOMEvent' in 'nsIContent'. r=backout 2017-08-11 17:46:42 +02:00
Masatoshi Kimura 58d29db70b Bug 1389460 - Remove @deprecated nsIDOMEventTarget.DispatchDOMEvent. r=smaug
MozReview-Commit-ID: E88DZK5sfwx

--HG--
extra : rebase_source : 63300d87c0496394d3f75cb76bc47c75d640d369
2017-08-07 02:28:52 +09:00
Bobby Holley c9e1098a70 Bug 1389385 - Require a presshell to set descendant bits. r=emilio
We're going to start tracking the restyle root on the presshell, so we'll need
one. This should be fine, since if the presshell doesn't exist yet we can't
have done the initial style, and if it's already been destroyed we don't need
restyle state anymore.

MozReview-Commit-ID: EfNVloI9ENQ
2017-08-11 18:18:22 -07:00
Bobby Holley 3e308bd38d Bug 1389385 - Rearrange dirty noting to operate on the element rather than the parent. r=emilio
This will allow us to scope restyle roots more tightly.

MozReview-Commit-ID: 2t2lp5sKBHH
2017-08-11 18:18:22 -07:00
Bobby Holley ff0b8d0ebf Bug 1389385 - Generalize C++ NoteDirtyDescendants logic and add equivalent APIs for the animation bit. r=emilio
MozReview-Commit-ID: 8K0uDibfoZS
2017-08-11 18:17:49 -07:00
Bobby Holley c52ef0e259 Bug 1389385 - Move NoteDirtyDescendantsForServo out of line. r=emilio
This function is large enough that it doesn't really make sense to have inline,
and we'll be adding more to it in the coming patches.

MozReview-Commit-ID: AnDfzwsMvNy
2017-08-11 18:17:49 -07:00
Masatoshi Kimura dec070e4cf Bug 1389460 - Remove @deprecated nsIDOMEventTarget.DispatchDOMEvent. r=smaug
MozReview-Commit-ID: E88DZK5sfwx

--HG--
extra : rebase_source : 64e1a47c9366a970f20ec459dde9b379a207e802
2017-08-07 02:28:52 +09:00
Lennart Grahl c2ebc3e45e Bug 979417 - Implement EOR when receiving and explicit EOR when sending on data channels (including DCEP). r=drno,jesup
This allows sending and receiving arbitrarily (we limit to 1 GiB atm) sized
messages while not relying on the deprecated PPID fragmentation/reassembly
mode. The code already supports the ndata extension but it's not activated,
yet. Without the SCTP ndata extension, a large data channel message will
monopolise the SCTP association. While this is a problem, it is a temporary
solution until the extension is being activated. Keep in mind that every
application that uses data channels currently does fragmentation/reassembly on
application-level and it's unlikely that this will change until the popular
implementations (libwebrtc) implement EOR as well. Moreover, until the WebRTC
API specifies an API that hands over partial messages, doing application-level
fragmentation/reassembly is still useful for very large messages (sadly).

We fall back to PPID-based fragmentation/reassembly mode IFF a=max-message-size
is not set in the SDP and the negotiated amount of SCTP inbound streams is
exactly 256. Other implementations should avoid using this combination (to be
precise, other implementations should send a=max-message-size).

It also changes behaviour of RTCDataChannel.send which now raises TypeError in
case the message is too large for the other peer to receive. This is a
necessity to ensure that implementations that do not look at the EOR flag when
receiving are always able to receive our messages. Even if these
implementations do not set a=max-message-size, we use a safe default value (64
KiB, dictated by the spec) that every implementation should be able to receive,
with or without EOR support.

* Due to the use of explicit EOR, this required some major refactoring of all
  send-related and deferred sending functions (which is now a lot less
  complex). There's now only one place where `usrsctp_sendv` is being used.
* All data channel messages and DCEP messages will be sent without copying them
  first. Only in case this fails (e.g. usrsctp's buffer is full), the message
  will be copied and added to a buffer queue.
* Queued data channel messages will now be re-sent fairly (round-robin).
* Maximum message size and the PPID-based fragmentation are configurable using
  about:config (media.peerconnection.sctp.force_ppid_fragmentation and
  media.peerconnection.sctp.force_maximum_message_size).
* Enable interleaving of incoming messages for different streams (preparation
  for SCTP ndata, has no effect until it is enabled).
* Enable interleaving of outgoing messages (disabled if SCTP ndata has not been
  negotiated).
* Add pending messages flag to reduce performance impact from frequent calls to
  SendDeferredMessages.
* Handle partial delivery events (for cases where a partially delivered message
  is being aborted).
* Close a data channel/the connection in case the message is too large to be
  handled (this is only applied in cases where the remote peer ignores our
  announced local maximum message size).
* Various size_t to uint32_t conversions (message length) and back should be
  safe now.
* Remove aUsingDtls/mUsingDtls from DataChannelConnection.
* Set maximum message size in SDP and in the data channel stack.
* Replace implicit NS_ENSURE_*'s with explicit NS_WARN_IF's.
* Add SetMaxMessageSize method for late-applying those signalling parameters
  when a data channel has been created before the remote SDP was available.
* Limit remote maximum message size and add a GetMaxMessageSize method for a
  future implementation of RTCSctpTransport.maxMessageSize.

MozReview-Commit-ID: FlmZrpC5zVI

--HG--
extra : rebase_source : 54e1b838c788a3abbded4fb32fe7c2788f8a9bc0
2017-07-26 13:18:54 +02:00
Ed Lee 15dc2228b6 Bug 1335057 - Fix intermittent bug1058164.js test timed out by conditionally waiting. r=mconley
MozReview-Commit-ID: LRhV0IbHt5b

--HG--
extra : rebase_source : f5d92a9d179aeca6f206a8a5bca98b0fe767b1c7
2017-08-10 10:41:19 -07:00
Masatoshi Kimura 8e852a4fe6 Bug 865664 - Remove deprecated nsIDOMWindowUtils.getOuterWindowWithId. r=bz
MozReview-Commit-ID: By0a88Gu4p4

--HG--
extra : rebase_source : 744e9f9f9bcec2b739bc8a4ecd24d1bb43967a37
2017-08-07 00:31:02 +09:00
Stone Shih f5cb5ecde2 Backed out changeset 07b66fb75c71 (bug 1351148) 2017-08-11 15:19:37 +08:00
Henri Sivonen 3d387ac082 Bug 483155 - Put content creator function pointers onto nsHtml5ElementName. r=smaug
MozReview-Commit-ID: E2AAx7Zz2UF

--HG--
extra : rebase_source : 1b85ba3b1c699e71e6ecacf4d1dc4271f3416b08
2017-07-04 11:00:03 +03:00
Sebastian Hengst 56587adeab Backed out changeset 5b706cd241cb (bug 483155) for Valgrind failure on Linux x64 opt. r=backout 2017-08-11 10:48:10 +02:00
Henri Sivonen dacb0e05f1 Bug 483155 - Put content creator function pointers onto nsHtml5ElementName. r=smaug
MozReview-Commit-ID: E2AAx7Zz2UF

--HG--
extra : rebase_source : 989c11459e16076a043aa7311c95941686e86ef7
2017-07-04 11:00:03 +03:00
Wes Kocher cff9e9b197 Merge m-c to autoland, a=merge
MozReview-Commit-ID: 2YvHbITn9w3
2017-08-10 18:25:34 -07:00
Wes Kocher 936a9461f6 Merge inbound to m-c a=merge
MozReview-Commit-ID: KRQeIGmhAPA
2017-08-10 18:14:34 -07:00
Wes Kocher 1dfa5bfe06 Backed out changeset 93151fa47fcf (bug 1376895) for permafailing test_frameNavigation.html a=backout
MozReview-Commit-ID: 88VukVNkZHW

--HG--
extra : source : 93cf457d27d97667ff50dcf6aaeb7f0560708fae
2017-08-10 14:20:01 -07:00
Sebastian Hengst 51d351f567 merge mozilla-central to mozilla-inbound. r=merge a=merge 2017-08-10 17:41:11 +02:00
Gabor Krizsanits 02da6c0726 Bug 1376895 - Make preloaded browser use pre-existing content process. r=mconley
We want to avoid to have several cached content processes, one for each
preloaded browser (one per window) and one for the preallocated process.
For that we force the preloaded browser to choose an existing process and
during the first navigation in that tab, that leaves about:newtab, we re-run
the process selecting algorithm
2017-08-10 16:48:11 +02:00
Sebastian Hengst 7f85daeb2a Backed out changeset e9985564e081 (bug 1388162) for failing chrome's test_animation_performance_warning.html | preserve-3d transform. r=backout 2017-08-10 14:40:20 +02:00
Sebastian Hengst 6a474244a8 Backed out changeset 78d87b59f5a7 (bug 1370508) for unexpected pass of wpt-reftest /css/css-namespaces-3/syntax-013.xml. r=backout on a CLOSED TREE 2017-08-10 10:23:22 +02:00
Matt Woodrow 95f2e31f88 Bug 1388162 - Add a Destroy function to nsDisplayItem to use instead of manually invoking the destructor, this will allow us to recycle them in the future. r=mstange 2017-08-07 16:07:43 +12:00
Masayuki Nakano 9bd3a7d128 Bug 1387406 - part4: nsFrameLoader should treat editor as HTMLEditor r=smaug
Editor treated in nsFrameLoader is always HTMLEditor.  So, it should treat the editor as is.

MozReview-Commit-ID: 7bZMbLGKsED

--HG--
extra : rebase_source : 47c22423062cd724551ad3b4fde168e03891b4c7
2017-08-07 15:02:16 +09:00
Masayuki Nakano bc9b8f0f01 Bug 1387406 - part3: nsFocusManager should treat editor as HTMLEditor r=smaug
Editor treated by nsFocusManager is always HTMLEditor.  So, it should treat the editor as is.

MozReview-Commit-ID: Di1k2dlLodV

--HG--
extra : rebase_source : 49abc56f0a271cdf559adde468d8460ab1ba7aac
2017-08-07 14:55:58 +09:00
Brad Werth 4e918570ee Bug 1387243 Part 1: Split nsDocument::EndLoad into a part that runs unconditionally, and a part that runs only when there is a matching BeginLoad call. r=bz
MozReview-Commit-ID: 8Pn6i2f0cez

--HG--
extra : rebase_source : 21897c0ea16d263c297783a6393ee7725c1106c9
2017-08-03 16:27:22 -07:00
Aryeh Gregor be9bccc716 Bug 1388746 - Do not split start/end text nodes in deleteContents/extractContents; r=smaug
If a range endpoint is in the middle of a text node, and you call
deleteContents() or extractContents(), the spec says to delete the data
from the node.  In the case of extractContents(), the new text node
that's inserted into the DocumentFragment is a clone with its data set
to the bit that was deleted.
<https://dom.spec.whatwg.org/#dom-range-deletecontents>
<https://dom.spec.whatwg.org/#dom-range-extractcontents>

We don't do this.  Instead, we split the text node.  Then the bit to
delete is deleted naturally at a later stage together with all the other
nodes.

The result is the same, but on the way there we do a bunch more node
mutations.  This causes extra mutation records, which cause us to fail a
WPT test.  Chrome passes.  Changing to match the spec actually reduces
our lines of code anyway.

MozReview-Commit-ID: FTTV5yNSj71

--HG--
extra : rebase_source : 8d5f36c68c71db0700f0b86d1a73462759f922e8
2017-08-09 17:39:06 +03:00
Makoto Kato 4418d7d986 Bug 1381710 - Selection.addRange will be failure with dynamic table insertion. r=tnikkel
When range is selected table element, Selection.addRange uses nsFrameSelection.  If frame isn't constructed yet, addRange throws NS_ERROR_FAILURE even if table element isn't editable element.

When getting nsITableCellLayout, we should flush frame to construct cell frame.

MozReview-Commit-ID: 9qWwW46RYNL

--HG--
extra : rebase_source : 708e78af457a28bc273b83015f78950a5bee232e
2017-07-18 16:54:31 +09:00
Xidorn Quan a0b8a2c68d Bug 1370508 - Enable stylo on generic XML documents. r=heycam
MozReview-Commit-ID: 4XQ9RPQ7oa1

--HG--
extra : rebase_source : f5ffeaa615076035215f5ac1b9b39aa5cb15d618
2017-08-09 19:57:33 +10:00
Xidorn Quan 58e5987209 Bug 1383992 part 1 - Disable failing mochitests. r=heycam
MozReview-Commit-ID: J9LoovJJJgM

--HG--
extra : rebase_source : a5ed4b2a11c293c50d642c3a0da6831ce5a885a1
extra : source : 8d97565b7dedaef3b46e65b92b1ca1e0598d2a76
extra : histedit_source : 72834d0bc485e78cb8c1de357e4b545d7e6408f5
2017-08-09 08:31:26 +10:00
Ryan VanderMeulen 6eb7aef00e Merge m-c to autoland. a=merge 2017-08-09 18:51:26 -04:00
Ryan VanderMeulen 2e6670c78e Merge autoland to m-c. a=merge 2017-08-09 18:47:59 -04:00
Carsten "Tomcat" Book bb29fe249d Merge mozilla-central to autoland 2017-08-09 12:31:56 +02:00
Carsten "Tomcat" Book c329d562fb merge mozilla-inbound to mozilla-central a=merge 2017-08-09 11:37:08 +02:00
Henry Chang d9fddc6423 Bug 1388606 - Test case for ensuring data:font is treated same-origin. r=ckerschb
We try to load a data:font and apply to some text in the test case. In case
data:font is treated different origin, the font will not load and the
test would fail.

MozReview-Commit-ID: LWYWJOoWL71

--HG--
extra : rebase_source : e4e133c16c75ecee80293c17703a03c7ce1ef18b
2017-08-09 16:39:44 +08:00
Nicholas Nethercote d4e19d954a Bug 1388253 - Convert nsTextFormatter:[v]smprintf() use to [v]ssprintf(). r=erahm.
[v]ssprintf() is just a better way of doing things.

--HG--
extra : rebase_source : 25337787b9557f8a7080a67645dba70609a8f646
2017-08-09 10:41:14 +10:00
Wes Kocher 7651bde05c Merge m-c to inbound, a=merge
MozReview-Commit-ID: 9Abf0fILvvK
2017-08-08 15:16:00 -07:00
Wes Kocher 650baf5c45 Merge inbound to central, a=merge
MozReview-Commit-ID: HpVAbc2vi78
2017-08-08 15:14:28 -07:00
Eric Rahm 01f545fea7 Bug 1386825 - Part 1: Remove MOZ_B2G from dom. r=bkelly
MozReview-Commit-ID: 1zzP2r01B7U
2017-08-08 14:41:05 -07:00
Carsten "Tomcat" Book 635b24e121 Merge mozilla-central to autoland 2017-08-08 13:25:29 +02:00
Carsten "Tomcat" Book 0f16d437cc merge mozilla-inbound to mozilla-central a=merge 2017-08-08 13:18:14 +02:00
Henry Chang 0038962d8f Bug 1387983 - Fix test case for data:stylesheet same origin check. r=heycam
MozReview-Commit-ID: 1U7Aw9X13uF

--HG--
extra : rebase_source : 5cb424d70567a42df0d6521961474a89fd9d87d2
extra : source : 540b354d289a34c48b0fd2e43da3e3f6ae1aae2e
2017-08-07 16:36:35 +08:00
Bobby Holley 813d290b57 Bug 1387499 - Clear the servo bits when dropping servo data. r=emilio
This fixes the testcase in the bug, which removes and reinserts
some elements. Our invariants require us not to set the dirty
descendants bits on unstyled elements.

MozReview-Commit-ID: 1eESZjNSURG
2017-08-09 09:20:59 -07:00
Xidorn Quan 9e809e01c2 Bug 1377158 - (Part 1) Set style backend to stylo when SVG is used as an image. r=heycam
MozReview-Commit-ID: 9FnA8X84h87

--HG--
extra : rebase_source : 49a6140c4c78c35f755710934c798ce46dafa213
2017-08-03 11:24:55 +10:00
Tim Huang 7af48eb06f Bug 1369309 - Part 3: Making the media statistics reports a spoofed value when fingerprinting resistance is enabled. r=cpearce, r=arthuredelstein
This patch makes the media statistics report values with a fixed frames per second
and a dynamic dropped ratio when resistance fingerprinting is enabled. The dropped
rate is decided by the video resolution that it will report a fixed dropped rate
when the video resolution is greater than 480p. And It will report a zero dropped
rate if the video is below or equal to 480p. In addition, it adds three new prefs
that allow us to change the value of frames per second, the dropped ratio and the
threshold of target video resolution. The three prefs are
'privacy.resistFingerprinting.video_frames_per_sec', 'privacy.resistFingerprinting.video_dropped_ratio'
and 'privacy.resistFingerprinting.target_video_res'. The default values of them
are 30, 5 and 480, which means 30 frames per second, 5 percent dropped ratio and
480p.

This also adds a new helper function 'nsContentUtils::ShouldResistFingerprinting(nsIDocument* aDoc)'
for checking whether fingerprinting resistance is enabled for a given docuemnt.
If it is a chrome document, this function will indicate that fingerprinting
resistance is not enabled regardless of the pref 'privacy.resistFingerprinting'.
If it is a content document, the result will depend on the pref.

MozReview-Commit-ID: FbSuRq6Zdnn

--HG--
extra : rebase_source : a62a1be19d9b38520f9eed7164fb258e3354d228
2017-07-17 15:13:55 +08:00
Blake Kaplan 263a31a811 Bug 1374460 - Remove all code related to showModalDialog. r=smaug
MozReview-Commit-ID: GCGwBfIx2SJ

--HG--
extra : rebase_source : 44108de8ebbd9c0d8ed9ab69d50ad973c4883b6e
2017-07-13 16:42:03 -07:00
Henry Chang 55356f4f83 Bug 1355746 - Part 2. Polish IdleTaskRunner and reuse it for background parsing. r=smaug
This patch is mainly to make IdleTaskRunner reusable by nsHtml5TreeOpExecutor.
The only necessary work to that purpose is to remove the dependency of
sShuttingDown, which was a static variable in nsJSEnvironment.cpp.
The idea is to have a "MayStopProcessing" as a callback for the consumer to
return sShuttingDown.

In addition to sShuttingDown, we use std::function<bool()> as the runner
main callback type.

MozReview-Commit-ID: FT2X1unSvPS

--HG--
extra : rebase_source : 3fe2d4f597f53e9a90f3dc8d5009df04240534ba
extra : intermediate-source : 41f6715c344ce26f7820cecb2544db8c50dca796
extra : source : 042f10937305e34245bdaf75dcb816db7738254e
2017-07-12 09:23:15 +08:00
Henry Chang fab3d4644c Bug 1355746 - Part 1. Rename CollectRunner to IdleTaskRunner and move to xpcom/threads/IdleTaskRunner.h/cpp r=smaug
Nothing is changed in this patch except for renaming and code move around.
The strategy is to have the final file setup in this patch without any
detail change. The actual code change will be in the next patch so that
we can focus on reviewing the diff in the next patch regarding IdleTaskRunner.

MozReview-Commit-ID: 4Bul9mZ7z1n

--HG--
extra : rebase_source : b978da3a3c68da58f9fd93502bcc4295acd699ce
extra : source : 833d4b69accbf7d1d60f9f11d807ee37d608b6fe
2017-08-07 13:50:47 +08:00
Alphan Chen 252278116e Bug 1362075 - Correct window.open() URL failure exception. r=ehsan
--HG--
extra : rebase_source : 6a9e42e6b6528890631c89b14684578cc8475364
2017-08-08 02:07:00 +02:00
Tooru Fujisawa e50adffb61 Bug 1379842 - Check content principal when dragging and dropping from browser. r=smaug 2017-08-10 09:43:35 +09:00
Mantaroh Yoshinaga fc6de5f2b5 Bug 1383512 - Skip test_user_select.html on windows of opt and pgo. r=gbrown
This patch skip the test_user_select.html test since windows build of
pgo/opt will fail this test sometimes on try.
This is temporaly solution until clarifying the reason of it.
(We track it on same bug).

MozReview-Commit-ID: BlwdoYxNTxP

--HG--
extra : rebase_source : 7201de141da43a3fd395a7f8ba4fdfb9fad1e6bf
2017-08-09 12:55:58 +09:00
Aryeh Gregor ee2971cce8 Bug 1388775 - extractContents should copy nodes in tree order, not backwards; r=smaug
Per spec, Range.prototype.extractNodes() should copy the nodes in tree
order:

https://dom.spec.whatwg.org/#dom-range-extractcontents

Gecko instead copies them in reverse order.  This causes us to fail a
wpt MutationObserver test.

MozReview-Commit-ID: 8MYXGhDsJCd

--HG--
extra : rebase_source : 94fb2e96370e575906ba9927d904561744a1d7bb
2017-08-09 18:40:21 +03:00
Blake Kaplan 3e5081b1b0 Bug 1374460 - Remove mochitests using showModalDialog. r=smaug
MozReview-Commit-ID: 5vLjdti5oW8

--HG--
extra : rebase_source : a731afcacc8ea35e9120cce4fb47d444fbdf4efa
2017-06-08 11:44:24 -07:00
Wes Kocher 223f322400 Merge m-c to autoland a=merge
MozReview-Commit-ID: 2qLtb79Nlhs
2017-08-08 15:26:30 -07:00
Aryeh Gregor ac0f3aab46 Bug 1388132 - Enable use counter for XMLDocument.async; r=francois,smaug
This API is not implemented by other browsers and we want to ensure
there isn't significant usage before removing it.

MozReview-Commit-ID: Kb3HyJW6hGB

--HG--
extra : rebase_source : deb7013ef20194fa9282dbe4390d37e8c2efc68e
2017-08-08 14:00:06 +03:00
Wes Kocher 7a772df5bf Merge m-c to inbound, a=merge
MozReview-Commit-ID: BYZASFIrXxp
2017-08-14 17:58:17 -07:00
Wes Kocher 20689fef47 Backed out 2 changesets (bug 1376895) for breaking browser_identity_UI.js with assertions in nsPermissionManager.cpp a=backout
Backed out changeset 620d01ac103a (bug 1376895)
Backed out changeset 3a06ab7fda1a (bug 1376895)

MozReview-Commit-ID: 2C8kUg77dz8
2017-08-14 13:13:45 -07:00
Gabor Krizsanits a53261ca24 Bug 1376895 - Make preloaded browser use pre-existing content process. r=mconley
We want to avoid to have several cached content processes, one for each
preloaded browser (one per window) and one for the preallocated process.
For that we force the preloaded browser to choose an existing process and
during the first navigation in that tab, that leaves about:newtab, we re-run
the process selecting algorithm
2017-08-15 14:05:17 +02:00
Ryan VanderMeulen cc7a4548cc Backed out 3 changesets (bug 1376038) to see if it affects the ghost window numbers in bug 1388111.
Backed out changeset b89df6ea668a (bug 1376038)
Backed out changeset ae6472c17577 (bug 1376038)
Backed out changeset 8c99b4e8e6c1 (bug 1376038)
2017-08-07 21:11:42 -04:00
Ryan VanderMeulen 49ca431715 Backed out changeset c8f400fc23a7 (bug 1384337) 2017-08-07 21:10:28 -04:00
Wes Kocher 6211964f2b Merge m-c to inbound, a=merge
MozReview-Commit-ID: FevzakV3RlU
2017-08-07 15:26:13 -07:00
Wes Kocher cf8f3268a1 Merge inbound to central, a=merge
MozReview-Commit-ID: 5tBON9YUdAO
2017-08-07 15:23:46 -07:00
Jonathan Kew 5aac49cb16 Bug 1385395 - Use flag bits in the nsGenericDOMDataNode to record whether nsTextFrame-related properties are present, so we don't perform unnecessary hashtable lookups in CharacterDataChanged etc. r=dbaron 2017-08-07 23:13:30 +01:00
Carsten "Tomcat" Book a24b9505f9 Merge mozilla-central to autoland 2017-08-07 13:16:54 +02:00
Carsten "Tomcat" Book e54b14cf9a merge mozilla-inbound to mozilla-central a=merge 2017-08-07 12:56:05 +02:00
Hiroyuki Ikezoe 0f0a5e0807 Bug 1387910 - Set content property other than neither 'normal' nor 'none' to generate pseudo element properly. r=boris
MozReview-Commit-ID: AAGCZOXFMOk

--HG--
extra : rebase_source : ceff586cd85d9662bcfd235d884c2db90a1ddec8
2017-08-07 11:35:36 +09:00
Dragana Damjanovic dd.mozilla@gmail.com 23c8b30d23 Bug 1381282 - Change nsScriptErrorBase::InitWithWindowID so that it does not call GetSensitiveInfoHiddenSpec as much as now. r=bz r=valentin 2017-08-07 15:56:30 +02:00
Nicholas Nethercote f941156987 Bug 1386600 - Change nsIStringBundle methods to return |AString| instead of |wstring|. r=emk,sr=dbaron.
This removes about 2/3 of the occurrences of nsXPIDLString in the tree. The
places where nsXPIDLStrings are null-checked are replaced with |rv| checks.

The patch also removes a couple of unused declarations from
nsIStringBundle.idl.

Note that nsStringBundle::GetStringFromNameHelper() was merged into
GetStringFromName(), because they both would have had the same signature.

--HG--
extra : rebase_source : ac40bc31c2a4997f2db0bd5069cc008757a2df6d
2017-08-04 14:40:52 +10:00
Yoshi Huang d970f62650 Bug 1366209 - rewrite dom/base/test/test_bug331959.html. r=smaug 2017-08-07 10:13:04 +08:00
Matthew Noorenberghe 7da630dcc5 Bug 1387634 - Update unsupported @autocomplete token list to reflect the autofill MVP. r=smaug
Also remove stale expected failures for region and locality.

MozReview-Commit-ID: 7McvaCWfY3a

--HG--
extra : rebase_source : e94b5e30df85f911fe8f5ce52dbd6459efbc92df
2017-08-04 16:15:31 -07:00
Aryeh Gregor b39b65ff8e Bug 1363658 - Serializing doctypes should omit internal subset; r=hsivonen
Changes to match spec, Chrome, and Safari.  The spec was discussed and
is what we want -- we already expand entities from the internal subset
when parsing, so there's no need to remember their definitions.  Indeed
it seems like it would make sense to alter the parser to throw away the
internal subset entirely at the end of parsing.

MozReview-Commit-ID: LDvYAqSZkgE

--HG--
extra : rebase_source : 928722b51d931a3c1ce358b2346c5e535bfa16df
2017-08-03 15:33:55 +03:00
Masatoshi Kimura 8b713b2b0f Bug 1375125 - Stop using nsILocalFile in the tree. r=froydnj
This mechanically replaces nsILocalFile with nsIFile in
*.js, *.jsm, *.sjs, *.html, *.xul, *.xml, and *.py.

MozReview-Commit-ID: 4ecl3RZhOwC

--HG--
extra : rebase_source : 412880ea27766118c38498d021331a3df6bccc70
2017-08-04 17:49:22 +09:00
Henri Sivonen 41573b4bfd Bug 1048191 - Remove capability to generate entities other than quot, amp, gt, lt and nbsp. r=emk.
MozReview-Commit-ID: CHQQzPHxrus

--HG--
extra : rebase_source : 0fad8c86a374c29ab9f691b53f6495aa8287cb65
2017-08-04 12:37:53 +03:00
Cameron McCormack 5a641131b9 Bug 1384824 - Part 1: Lazily clear stale Servo element data from a document when its pres shell changes. r=bholley
MozReview-Commit-ID: 1c566PRqFpe
2017-08-04 19:26:04 +10:00
Kate McKinley 092434c08c Bug 1376651 - Pass the nsIScriptElement instead of allocating a string every time r=ckerschb
Change the interface to GetAlowsInline to take an nsISupports* instead
of a string, and pass the nsIScriptElement directly. If we don't have an
element, then pass nullptr or the mock string created as an
nsISupportsString.

MozReview-Commit-ID: pgIMxtplsi

--HG--
extra : rebase_source : 4691643bb67ff6c78a74a4886a04c4816cff6219
2017-07-27 11:01:24 -07:00
Andrew McCreight 8085e87bc3 Bug 379797 - Various dump() methods should check browser.dom.window.dump.enabled. r=krizsa
Checking this pref to avoid log spam in opt builds, in sandboxes, JS
components, and whatever uses nsFrameMessageManager's dump method.

This does mean that on Windows in an opt build when a debugger is
present a debug string will no longer be printed unless the pref is
set, but I think that is consistent with the non-Windows behavior.

MozReview-Commit-ID: FWLAzBRVhlx

--HG--
extra : rebase_source : cc5669f422729788f1ebc300d4450290913a3055
2017-08-02 11:56:33 -07:00
Sebastian Hengst f442f9745e merge mozilla-central to autoland. r=merge a=merge 2017-08-04 19:31:08 +02:00
Sebastian Hengst 765cc1b925 merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: JhesEg4Bxjy
2017-08-04 19:28:27 +02:00
Jessica Jong 7ec4d944d8 Bug 1386969 - Change nsIRadioGroupContainer::Add/RemoveToRadioGroup() to take HTMLInputElement* as argument. r=bz
Currently, these two functions take nsIFormControl* as argument, but we only
pass HTMLInputElements to it, so we can change it to take HTMLInputElement* to
avoid overhead in casting.

MozReview-Commit-ID: CHG0F3xWCVF

--HG--
extra : amend_source : 6052bfec33bb8aa7d92e31b242757ed265256002
2017-08-03 02:39:00 -04:00
Ehsan Akhgari c6b7fe866d Bug 1386485 - Part 3: Devirtualize EditorBase::AsTextEditor()/AsHTMLEditor(); r=masayuki 2017-08-04 03:47:14 -04:00
Jim Chen a06134bff6 Bug 1383242 - Properly compare node to traversal range under different modes; r=smaug
When the node borders one of the range bounds, `NodeIsInTraversalRange`
should return different results depending on whether it's in pre mode or
not.

>  <div><br></div>
>       \__/

In this pre mode example, the node <br> is within the range, and the
node position (which is at the start of the node in pre mode) and the
start bound are both (<div>, 0). Therefore, it shows the start bound
should be inclusive in pre mode.

>  <div><br></div>
>  \___/

In this pre mode example, the node <br> is outside of the range, yet the
node position and the end bound are both (<div>, 0). Therefore, it shows
the end bound should be exclusive in pre mode.

>  <div><br></div>
>           \____/

in this post mode example, the node <br> is outside of the range, yet
the node position (which is at the end of the node in post mode) and the
start bound are both (<div>, 1). Therefore, it shows the start bound
should be exclusive in post mode.

>  <div><br></div>
>       \__/

In this post mode example, the node <br> is within the range, and the
node position and the end bound are both (<div>, 1). Therefore, it shows
the end bound should be inclusive in post mode.

In summary, the correct pre mode bound check is `start <= node < end`,
and the correct post mode bound check is `start < node <= end`. This
patch fixes `NodeIsInTraversalRange` to have the correct bounds check.

MozReview-Commit-ID: IjJN1ua6jQ9

--HG--
extra : rebase_source : 5d976071820dec15492470713258339ed36493da
2017-08-02 13:48:09 -04:00
Wes Kocher e371c2bbf3 Merge m-c to inbound, a=merge CLOSED TREE
MozReview-Commit-ID: AHCROxMdKPB
2017-08-03 18:13:23 -07:00
Wes Kocher 2196b718d3 Merge inbound to central, a=merge
MozReview-Commit-ID: DlSLhaepjeU
2017-08-03 18:06:53 -07:00
Ehsan Akhgari cf4e6a817c Bug 1386411 - Part 7: Inline EditorBase::GetSelection(); r=masayuki 2017-08-03 17:06:31 -04:00
Ehsan Akhgari dd8fbce0c9 Bug 1386411 - Part 6: Add a more efficient nsISelectionController::GetSelection() API for retrieving native Selection objects; r=bzbarsky
This API avoids needless refcounting and QueryInterface overhead.
2017-08-03 17:05:24 -04:00
Ehsan Akhgari 697fb3f83d Bug 1386411 - Part 4: Don't store the document as a weak reference on EditorBase; r=masayuki
This one also doesn't need to be a weak reference, and can be a strong
reference that the cycle collector knows about instead.
2017-08-03 17:05:21 -04:00
Ehsan Akhgari 7fe0be04ed Bug 1386411 - Part 3: Inline some helper functions in Selection.cpp; r=bzbarsky 2017-08-03 17:05:19 -04:00
Ehsan Akhgari 1774c1cc7d Bug 1386411 - Part 2: Devirtualize and inline nsISelection::AsSelection(); r=bzbarsky
nsISelection is builtinclass, so this method doesn't need to be virtual.
2017-08-03 17:05:17 -04:00
Jim Mathies 57d9bf0aee Bug 1360666 - Update IME state when nsObjectLoadingContent content changes type from 'loading' to a valid content type. r=masayuki
MozReview-Commit-ID: JC3YGS75gpN
2017-08-03 14:07:14 -05:00
Christoph Kerschbaumer a00054e565 Bug 1363629: Convert test_bug518104 to comply with new data: URI inheritance model. r=smaug 2017-08-03 21:00:22 +02:00
Jessica Jong 9829ff506e Bug 1385478 - Part 1: Use IsRequired/Required() to get the current required state. r=bz
IsRequired() helper function returns the current 'required' state of the
element, that is, whether its required attribute is set or not. This will be
used only for input elements that @required applies.
2017-08-03 01:23:00 -04:00
Amy Chung 1f101b071c Bug 1331680 - Part 1: Send required cookies to the content process on demand. r=jdm 2017-08-03 19:00:41 +08:00
Sebastian Hengst 50d2d60772 merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: 5MywkQxECqB
2017-08-03 11:46:00 +02:00
Brad Werth d073eb9bda Bug 1383296 Part 1: Remove all uses of the nsCSSValue::Serialization enum, now that it no longer has multiple values. r=heycam
MozReview-Commit-ID: n6px5hNHtB

--HG--
extra : rebase_source : 6269a9d52e0282d0391276dc1b9ee26dbde7b985
2017-07-21 17:26:35 -07:00
Yoshi Huang c65e15f19c Bug 1381728 - Part 1 : <object data="data:text/html,...> should have unique opaque origin. r=smaug 2017-08-03 09:38:09 +08:00
Wes Kocher 8de77914f5 Backed out changeset bcd223309de8 (bug 1360666) for asserting in stylo reftests a=backout
MozReview-Commit-ID: HH3rwDwvYyz
2017-08-02 18:14:56 -07:00
Wes Kocher 851b59bdbe Merge m-c to inbound a=merge
MozReview-Commit-ID: 1p4eNdfSz9p
2017-08-02 17:46:32 -07:00
Wes Kocher baf6cddc4c Merge inbound to central, a=merge
MozReview-Commit-ID: 9NFjSEt96iT
2017-08-02 17:11:51 -07:00
Junior Hsu f5763f3363 Bug 1384506 - Disable rcwn in test_urgent_start.html. r=tt 2017-08-01 19:55:00 -04:00
Tim Taubert 26a7909744 Bug 1373672 - Part 1: Filter events from dynamic docShells in Gecko before they reach SessionStore event handlers r=smaug,mystor 2017-08-02 19:08:04 +02:00
Jim Mathies 37050ac3cc Bug 1360666 - Update IME state when nsObjectLoadingContent content changes type from 'loading' to a valid content type. r=masayuki
MozReview-Commit-ID: 2cjJ5SvJsTa
2017-08-02 15:31:55 -05:00
Masatoshi Kimura f143125cc2 Bug 1326520 - Rename nsIURI.path to pathQueryRef. r=valentin.gosu
MozReview-Commit-ID: DqJdTGopR9G

--HG--
extra : rebase_source : e8c9eb03468c075b79013b6e0bd8b367229c24cd
2017-07-29 20:50:21 +09:00
Nicholas Nethercote f5c5231809 Bug 1382955 (part 1) - Remove MozPowerManager and related things. r=bz,gsvelto.
This includes the FactoryReset stuff.
2017-08-02 10:04:36 +10:00
Masatoshi Kimura 90da924fda Bug 1375123 - Remove nsIDOMWindowInternal. r=Ehsan
MozReview-Commit-ID: 2jjGFsxsLTz

--HG--
extra : rebase_source : 5cb538ff53369cb724b0d336de1e74dd8a7d35c1
2017-08-03 20:33:51 +09:00
Masatoshi Kimura 866d87ee67 Bug 1361579 - Remove nsISimpleContentPolicy. r=Ehsan
MozReview-Commit-ID: BsjkGpTpe8I

--HG--
extra : rebase_source : 640807623fc70797932a0ee592b887d5c134b5f9
2017-08-03 17:50:00 +09:00
Sebastian Hengst 5e6e6641de Backed out changeset 5dd6f04aea59 (bug 1383780) for failing crashtests on stylo. r=backout on a CLOSED TREE 2017-08-02 13:27:08 +02:00
Xidorn Quan 61c08a894b Bug 1383780 - Null-check return value of SVGUseElement::GetContentURLData before returning. r=bz
MozReview-Commit-ID: 19X22AVQ4Gg

--HG--
extra : rebase_source : 35ed42fc87eea22fa62f90e997ea90ad41e7f9ea
2017-08-02 12:07:58 +10:00
Nicholas Nethercote cc91deea30 Bug 1383977 - stylo: Measure Elements and ComputedValues. r=manishearth.
The patch provides FFI access to Gecko's SeenPtrs type from Rust, in order to
record what has already been measured when measuring Arcs. (The SeenPtrs must
be initialized on the Gecko side because the same table is reused for measuring
all Elements within a window, because Elements can share ComputedValues.) I
have confirmed with DMD that this is working correctly.

The patch also introduces MallocSizeOfRepeats, which is like MallocSizeOf but
takes a SizeOfState, which holds a SeenPtrs table.

MozReview-Commit-ID: DHS8zvCsEdQ

--HG--
extra : rebase_source : acf4d7909abf6ceb1719331ccf2e33137eb6dc91
2017-07-19 10:30:53 +10:00
Ehsan Akhgari 35184e2a47 Bug 1384658 - Correctly account for openers that are the same as the parent window; r=qdot 2017-08-01 00:42:51 -04:00
Nicholas Nethercote d18fdecf67 Bug 1384834 (part 1) - Remove remaining uses of nsAdoptingString. r=erahm.
--HG--
extra : rebase_source : c81ee11b9d08198a000979760a8e29a01e9498d0
2017-07-28 11:21:45 +10:00
Ehsan Akhgari 50fd0b7a62 Bug 1385533 - Reserve space for one pointer in the mMutationObservers array on node slots; r=smaug
This helps avoid allocations for the first mutation observer (for example, Range)
created by a caller.
2017-07-31 17:12:38 -04:00
Kris Maglione f55d5b792a Bug 1383367: Part 1 - Add JS helper to determine if a layout flush is required. r=mconley
This lets us decide whether to defer operations if they might trigger a
reflow.

MozReview-Commit-ID: 4M13HKAuZ7M

--HG--
extra : source : 6679237a46723432264361b5542454bb91d4831e
extra : intermediate-source : 46d1fa12a0829046f2bee4ffd10d7af38616bba9
2017-07-24 20:07:39 -07:00
Ehsan Akhgari 1052f3e0f4 Bug 1385521 - Inline the check for common argument in the callers of GetCommonAncestorInternal(); r=baku 2017-07-31 11:29:08 -04:00
Paul Adenot de32f92b5b Bug 1384835 - Fix the build for a single remaining callsite that was landed on autoland. irc-r=marco
MozReview-Commit-ID: EbEsahXIwY3

--HG--
extra : rebase_source : 2f0504211ccd2d16f8b44cd769be3857a77ee682
2017-07-31 12:13:28 +02:00
Sebastian Hengst 915c63c332 merge mozilla-central to mozilla-inbound. r=merge a=merge 2017-07-31 11:28:37 +02:00
Nicholas Nethercote 72c884bf74 Bug 1384835 (part 3, attempt 2) - Remove the Preferences::Get*CString() variants that return nsAdoptingCString. r=froydnj.
--HG--
extra : rebase_source : d317b25be2ec21d1a60d25da3689e46cdce0b649
2017-07-31 14:28:48 +10:00
Nicholas Nethercote d4f9aa5530 Bug 1384835 (part 2, attempt 2) - Remove the Preferences::Get*String() variants that return nsAdoptingString. r=froydnj.
--HG--
extra : rebase_source : 6c24fbacb03d4adebe5f22b5e7fc60b069913f20
2017-07-31 14:23:50 +10:00
Nicholas Nethercote 581214bd8b Bug 1384835 (part 1, attempt 2) - Use nsA[C]String references instead of pointers for outparams of Get*String() pref functions. r=froydnj.
--HG--
extra : rebase_source : fe566945a55c281d8290634a5b55bed19415c839
2017-07-31 10:52:51 +10:00
Sebastian Hengst 9901cfb056 Backed out changeset 46d1fa12a082 (bug 1383367) for failing browser_windowopen_reflows.js after merge, especially on OS X. r=backout a=backout
MozReview-Commit-ID: B4wxvVgTP1Q
2017-07-30 14:08:38 +02:00
Kyle Machulis 2533883d04 Bug 1279218 - Rename HTMLSharedObjectElement to HTMLEmbedElement; r=bz
MozReview-Commit-ID: KkvRkFXAX30

--HG--
rename : dom/html/HTMLSharedObjectElement.cpp => dom/html/HTMLEmbedElement.cpp
rename : dom/html/HTMLSharedObjectElement.h => dom/html/HTMLEmbedElement.h
extra : rebase_source : 460c2a018e2a737b6397e8306127d73bc017d8da
2017-07-28 21:35:43 -07:00
Kyle Machulis d812ac4e87 Bug 1279218 - Additional applet tag logic removal; r=bz
I've been having problems with interdiffs on mozreview lately, so for
ease of review, this patch is being submitted as a seperate patch for
review. Once it is r+'d, it will be folded into the first patch in
this set before landing.

MozReview-Commit-ID: CS9MngaXlBd

--HG--
extra : rebase_source : 6a86fd4f7a66e73497a756976a2562d183002a2a
2017-07-28 16:44:39 -07:00
Kyle Machulis ef8d138ba7 Bug 1279218 - Remove tests related to the applet tag; r=bz
MozReview-Commit-ID: FzzA5Qic4Uq

--HG--
extra : rebase_source : 64206ee3e5073bafd822b23040fe6e24dda3463f
2017-07-10 16:15:16 -07:00
Kyle Machulis 7eb9927ed4 Bug 1279218 - Remove Applet/Java support from nsObjectLoadingContent; r=bsmedberg,bz
MozReview-Commit-ID: AY6lYwS6NEU

--HG--
extra : rebase_source : deb4a6861a5d5e72e0ab18c64e5e1125d4bc4f05
2017-07-27 19:21:18 -07:00
Kyle Machulis ffa9be1bed Bug 1279218 - Remove Applet tag; r=bz
Removes applet tag interfaces, and changes HTML5 parser to output
HTMLUnknownElement when tag is found. Removes tag process from various
places in the browser.

MozReview-Commit-ID: 2zHhK2U2esX

--HG--
extra : rebase_source : d06ecaffd1cb656301e29b900bafde4c68a4606e
2017-07-10 16:00:30 -07:00
Bill McCloskey 55f153be76 Bug 1383328 - Use TabGroup as event target for browser-status-filter (r=smaug)
MozReview-Commit-ID: HOSmqr5Vpwh
2017-07-28 13:11:59 -07:00
Kris Maglione 3a3d52a233 Bug 1383367: Part 1 - Add JS helper to determine if a layout flush is required. r=mconley
This lets us decide whether to defer operations if they might trigger a
reflow.

MozReview-Commit-ID: 4M13HKAuZ7M

--HG--
extra : source : 6679237a46723432264361b5542454bb91d4831e
2017-07-24 20:07:39 -07:00
Ehsan Akhgari 8e7275d330 Bug 1385369 - Reserve 1 space in Selection::mRanges; r=qdot
Most selections on the Web end up with one Range inside them.
By reserving the space for this one range inline, we can avoid the
allocator pressure in a lot of hot code when manipulating the
Selection object.
2017-07-28 15:27:57 -04:00
Stone Shih 393c62eba7 Bug 1351148 Part3: Synthesize native input events with priority. f=kats,smaug. r=smaug.
The test helper_touch_action_regions.html uses nsDOMWindowUtils to synthesize native input events and creates some runnables to trigger the test. It expects the runnables which synthesize native input events are processed first, then the runnables to continue the test, and finally the input events are forwarded from chrome process to content process. Enabling event prioritization may change the execution order.
Wraps those runnables to synthesize native input events as priority=input and dispatches those runnables to continue the test with priority=input to make sure the execution order is as expected.

MozReview-Commit-ID: 8hkaB1FRW9T
2017-05-19 15:41:24 +08:00
Stone Shih b15ea606eb Bug 1351148 Part3: Synthesize native input events with priority. f=kats,smaug. r=smaug.
The test helper_touch_action_regions.html uses nsDOMWindowUtils to synthesize native input events and creates some runnables to trigger the test. It expects the runnables which synthesize native input events are processed first, then the runnables to continue the test, and finally the input events are forwarded from chrome process to content process. Enabling event prioritization may change the execution order.
Wraps those runnables to synthesize native input events as priority=input and dispatches those runnables to continue the test with priority=input to make sure the execution order is as expected.

MozReview-Commit-ID: 8hkaB1FRW9T
2017-05-19 15:41:24 +08:00
Ehsan Akhgari 4396fda529 Bug 1385389 - Do not delete the common ancestor ranges hashtable in nsRange::UnregisterCommonAncestor() because chances are we need to recreate it shortly after; r=smaug 2017-08-14 12:31:15 -04:00
Gabor Krizsanits 7f2b53e79a Bug 1376895 - Make preloaded browser use pre-existing content process. r=mconley
We want to avoid to have several cached content processes, one for each
preloaded browser (one per window) and one for the preallocated process.
For that we force the preloaded browser to choose an existing process and
during the first navigation in that tab, that leaves about:newtab, we re-run
the process selecting algorithm
2017-08-14 17:42:05 +02:00
Wes Kocher 623f36f0f8 Merge m-c to autoland, a=merge
MozReview-Commit-ID: CxCNV7W0utC
2017-08-07 15:26:40 -07:00
Kirk Steuber 260150bd23 Bug 1377377 - Preload string bundles during idle time r=smaug
MozReview-Commit-ID: H0hNHmzBWhO

--HG--
extra : rebase_source : dd83a3d97f5f1245ec4e18dde65b58d610fbfccc
2017-08-04 09:26:04 -07:00
Bobby Holley 1bd3bc937c Bug 1386110 - Use a smart pointer to reliably de-register NAC regardless of how it goes away. r=masayuki
MozReview-Commit-ID: HTSu5BjxD8I
2017-08-03 20:26:11 -07:00
Bobby Holley 693c0c370f Bug 1386110 - Use a strong reference for ManualNAC. r=masayuki
This is belt-and-suspenders.

MozReview-Commit-ID: H1W7RZeGQYy
2017-08-03 20:26:09 -07:00
Wes Kocher db7d003ae0 Merge m-c to autoland a=merge CLOSED TREE
MozReview-Commit-ID: Ko3lhAvzMJN
2017-08-03 18:22:09 -07:00
Aryeh Gregor ca4b09e233 Bug 1359157 - Support Selection.type from spec; r=smaug
All other browsers already support it, more or less interoperably.

MozReview-Commit-ID: 4VoOeqBoKI0

--HG--
extra : rebase_source : fdd5198cc5fe8c2175242ddcc170947e7ca592b9
2017-08-03 17:13:24 +03:00
Sebastian Hengst 6389867b7c Backed out changeset 1d87b1dc4ce2 (bug 1272697) for failing mochitest test_interfaces.html for 'ByteLengthQueuingStrategy' and wpts, e.g. general.dedicatedworker.html. r=backout on a CLOSED TREE 2017-07-28 20:20:50 +02:00
Andreas Farre 8378e81e6d Bug 1385238 - Reset execution budget when background state changes. r=bkelly 2017-07-28 09:31:00 -04:00
Till Schneidereit dec687b07c Bug 1272697 - Part 2: Add runtime pref to enable streams. r=baku,jonco
MozReview-Commit-ID: 5OSxbcd3jQB
2017-07-28 17:48:12 +02:00
Carsten "Tomcat" Book 139661e8e4 Merge mozilla-central to mozilla-inbound 2017-07-28 15:25:58 +02:00
Carsten "Tomcat" Book 892bedca2e merge mozilla-inbound to mozilla-central a=merge 2017-07-28 15:24:39 +02:00
Sebastian Hengst d7527a414d Backed out changeset 07b534f44740 (bug 1384835) for failing xpcshell's security/manager/ssl/tests/unit/test_cert_sha1.js checkCertErrorGenericAtTime on Linux x64 debug. r=backout 2017-07-28 10:30:29 +02:00
Sebastian Hengst 1d708511f0 Backed out changeset 5df4d8778602 (bug 1384835) 2017-07-28 10:29:29 +02:00
Sebastian Hengst 744a0a216b Backed out changeset ef5feef07bed (bug 1384835) 2017-07-28 10:29:24 +02:00
Sebastian Hengst 9077ac8886 Backed out changeset a57d8f30d1bf (bug 1383982) for build bustage at nsGlobalWindow.cpp:13826: 'class nsWindowSizes' has no member named 'mMallocSizeOf'. r=backout 2017-07-28 09:50:48 +02:00
Carsten "Tomcat" Book 28bdd40776 Merge mozilla-central to mozilla-inbound 2017-07-28 09:48:24 +02:00
Carsten "Tomcat" Book dc05a1ce7b Backed out changeset 6679237a4672 (bug 1383367) for conflicting with m-c to m-i merge 2017-07-28 09:45:42 +02:00