Commit Graph

68132 Commits

Author SHA1 Message Date
Paul Morris
c3a3d09307 Bug 1531870 - [de-xbl] convert popup binding to custom element; r=bgrins
For now, only add the MozMenuPopup base class to MozElements,
and don't define a custom element for it with
`customElements.define`. This is to help avoid conflicts in
de-xbl work. (See the bug for details.)

Includes a function to do 'manual slotting', moving child
elements into place. Dynamically adding, modifying, or
removing child nodes after the element is connected needs
to be handled manually as well.

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

--HG--
rename : toolkit/content/widgets/popup.xml => toolkit/content/widgets/menupopup.js
extra : moz-landing-system : lando
2019-03-30 00:05:08 +00:00
Cameron McCormack
3357fd0d3a Bug 1474793 - Part 13: Build and use shared memory user agent style sheets in parent and content processes. r=emilio,kmag
MozReview-Commit-ID: JasksR7F22Z

Depends on D17199

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

--HG--
extra : moz-landing-system : lando
2019-03-30 00:23:49 +00:00
Cameron McCormack
12c03087aa Bug 1474793 - Part 12: Add FFI API to create a StyleSheet backed by shared data. r=emilio
Depends on D17198

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

--HG--
extra : moz-landing-system : lando
2019-03-30 00:16:29 +00:00
Cameron McCormack
3a08c03925 Bug 1474793 - Part 11: Add FFI API to use SharedMemoryBuilder. r=emilio
Depends on D17197

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

--HG--
extra : moz-landing-system : lando
2019-03-30 00:16:27 +00:00
Cameron McCormack
7649df02be Bug 1474793 - Part 2: Allow references to static C++ URLExtraData objects from Rust UrlExtraData. r=emilio
Each user agent style sheet has a unique URLExtraData object containing
its URL, but since they are refcounted objects, we can't share them
easily across processes.  Rather than adding support for copying them
into a shared memory buffer like we will do with the Rust objects, here
we just set up a static array of URLExtraData objects per UA style
sheet.  The array will be filled in in a later patch.

Rust UrlExtraData objects, once they are transformed into their
sharable form and copied into the shared memory buffer, will reference
them by an index.

Depends on D17181

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

--HG--
extra : moz-landing-system : lando
2019-03-30 00:15:43 +00:00
Cameron McCormack
d8182ca20a Bug 1474793 - Part 1: Add a UserAgentStyleSheetID enum based on UserAgentStyleSheetList.h. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D17181

--HG--
extra : moz-landing-system : lando
2019-03-30 00:15:41 +00:00
Alex Gaynor
44989b091f Bug 1540190 - replace the AnimationData IPDL union with native Maybe syntax; r=kats
Differential Revision: https://phabricator.services.mozilla.com/D25425

--HG--
extra : moz-landing-system : lando
2019-03-29 19:54:14 +00:00
Emilio Cobos Álvarez
9ebd6eb639 Bug 1538732 - Don't let inspector change random content state. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D25417

--HG--
extra : moz-landing-system : lando
2019-03-29 17:20:39 +00:00
Daniel Holbert
f4e0af6db7 Bug 1514843 part 3: Add more testcases for 'contain:size' on scrollable elements. r=TYLin
This patch adds tweaked copies of the testcases from the prior patch,
exercising the other relevant values for the 'overflow' property (for 'hidden'
and 'auto', rather than 'scroll').

Depends on D25155

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

--HG--
rename : layout/reftests/w3c-css/submitted/contain/contain-size-block-002-ref.html => layout/reftests/w3c-css/submitted/contain/contain-size-block-003-ref.html
rename : layout/reftests/w3c-css/submitted/contain/contain-size-block-002.html => layout/reftests/w3c-css/submitted/contain/contain-size-block-003.html
rename : layout/reftests/w3c-css/submitted/contain/contain-size-block-002-ref.html => layout/reftests/w3c-css/submitted/contain/contain-size-block-004-ref.html
rename : layout/reftests/w3c-css/submitted/contain/contain-size-block-002.html => layout/reftests/w3c-css/submitted/contain/contain-size-block-004.html
rename : layout/reftests/w3c-css/submitted/contain/contain-size-inline-block-002-ref.html => layout/reftests/w3c-css/submitted/contain/contain-size-inline-block-003-ref.html
rename : layout/reftests/w3c-css/submitted/contain/contain-size-inline-block-002.html => layout/reftests/w3c-css/submitted/contain/contain-size-inline-block-003.html
rename : layout/reftests/w3c-css/submitted/contain/contain-size-inline-block-002-ref.html => layout/reftests/w3c-css/submitted/contain/contain-size-inline-block-004-ref.html
rename : layout/reftests/w3c-css/submitted/contain/contain-size-inline-block-002.html => layout/reftests/w3c-css/submitted/contain/contain-size-inline-block-004.html
extra : moz-landing-system : lando
2019-03-29 22:01:25 +00:00
Daniel Holbert
beda2208c9 Bug 1514843 part 2: Honor 'contain:size' for scrollable elements. r=TYLin
'contain:size' just means we should size these elements as if they had no
contents -- i.e. wherever we derive the size of the scrollable frame from the
size of its contents, we should pretend that its contents had zero size.

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

--HG--
rename : layout/reftests/w3c-css/submitted/contain/contain-size-block-001.html => layout/reftests/w3c-css/submitted/contain/contain-size-block-002.html
rename : layout/reftests/w3c-css/submitted/contain/contain-size-inline-block-001.html => layout/reftests/w3c-css/submitted/contain/contain-size-inline-block-002.html
extra : moz-landing-system : lando
2019-03-29 22:08:34 +00:00
Daniel Holbert
15e2bb5e48 Bug 1514843 part 1: Slight refactoring of scrollframe sizing, to use a helper variable for child size. r=TYLin
This patch doesn't affect behavior. It just makes it easier for the next patch
in this series to implement contain:size for scrollframes (by conditionally
setting the new helper variable to 0,0 if we have contain:size).

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

--HG--
extra : moz-landing-system : lando
2019-03-29 21:21:04 +00:00
Oana Pop Rus
dc9eba46cc Merge mozilla-central to autoland. a=merge CLOSED TREE 2019-03-30 00:05:29 +02:00
Oana Pop Rus
a759d6f62b Merge inbound to mozilla-central. a=merge 2019-03-29 23:54:39 +02:00
Daniel Holbert
c7d7937517 Bug 1503173: When deciding whether a flex item needs a final reflow, check RELATIVE_BSIZE state bit on its children. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D25441

--HG--
extra : moz-landing-system : lando
2019-03-29 21:50: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
b7fbcf781f Bug 1540015 - part 2: Make nsPresContext.h stop including nsIPresShel.h and nsIPresShellInlines.h r=smaug
`*Inlines.h` shouldn't be included by another header file, but `nsPresContext.h`
does it.  This causes include-hell which blocks the following fix.

Additionally, it causes an include hell between `PresShell.h` vs.
`nsIPresShell.h` and `nsPresContext.h if `Document.h` includes `PresShell.h`.
Therefore, this patch also solves this include hell with adding
`nsPresContextInlines.h`.

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

--HG--
extra : moz-landing-system : lando
2019-03-29 15:11:22 +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
2137fa4b14 Bug 1540015 - part 2: Make nsPresContext.h stop including nsIPresShel.h and nsIPresShellInlines.h r=smaug
`*Inlines.h` shouldn't be included by another header file, but `nsPresContext.h`
does it.  This causes include-hell which blocks the following fix.

Additionally, it causes an include hell between `PresShell.h` vs.
`nsIPresShell.h` and `nsPresContext.h if `Document.h` includes `PresShell.h`.
Therefore, this patch also solves this include hell with adding
`nsPresContextInlines.h`.

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

--HG--
extra : moz-landing-system : lando
2019-03-29 12:13:08 +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
Emilio Cobos Álvarez
859ca6ad05 Bug 1540093 - Unship line-height: -moz-block-height. r=mats
They're only used in forms.css, and only for some anonymous content, which are
not content-accessible in the first place.

The only place where this could be exposed is calling
getComputedStyle(input, "::placeholder"), so I think this should be pretty safe,
but I've added a pref just in case.

While at it, also derive the Parse implementation. Less code is better.

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

--HG--
extra : moz-landing-system : lando
2019-03-29 11:11:27 +00:00
Daniel Varga
bd12eaff99 Backed out changeset 005d447749ec (bug 1370646) mochitest failure at layout/style/test/test_font_loading_api.html. On a CLOSED TREE 2019-03-29 10:38:13 +02:00
violet
e93691e85b Bug 1370646 - Honor the maxTextRunSize if it's within reasonable range r=heycam
If the maximal and minimal font-size in a SVGTextFrame have a huge difference,
previously we chose mFontSizeScaleFactor to satisfy the minimal one. That's
problematic, because the maximal one might be a reasonable size, while the minimal
one is extremely small. We should honor the maximal one if this is the case.

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

--HG--
extra : moz-landing-system : lando
2019-03-29 07:01:10 +00:00
Hiroyuki Ikezoe
63484d1fba Bug 1141387 - Set image.animation_mode=none to avoid the animated GIF is advanced to the next frame. r=heycam
The animated GIF in background-blending-image-color-gif.html has two animation
frames, the one is a red rectangle, the other is a green rectangle.  The reftest
is supposed to take the snapshot during the time where the animation frame is
the red rectangle (the first frame) and the frame duration is 1000ms.  So if we
take over 1000ms there for some reasons, say on slow platforms, before taking
the snapshot, the reftet fails.

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

--HG--
extra : moz-landing-system : lando
2019-03-29 05:58:25 +00:00
Gurzau Raul
ce6fed5354 Backed out changeset 0c32d04c0665 (bug 1529492) for reftest failures at /bugs/1529492-1.html on a CLOSED TREE. 2019-03-29 06:10:50 +02:00
Cameron McCormack
97109f9916 Bug 1529492 - Disable caret clamping if transforms are present. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D25194

--HG--
extra : moz-landing-system : lando
2019-03-28 23:33:40 +00:00
Emilio Cobos Álvarez
c752cecc84 Bug 1538589 - Fix ::marker invalidation when we need to potentially insert a marker as a result of a style change. r=mats
Differential Revision: https://phabricator.services.mozilla.com/D24888

--HG--
extra : moz-landing-system : lando
2019-03-28 13:50:13 +00:00
Mark Banner
dba6983e75 Bug 1415265 - Remove now unnecessary .eslintrc.js files or entries. r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D23850

--HG--
extra : moz-landing-system : lando
2019-03-28 09:38:14 +00:00
Botond Ballo
0bdba92de2 Bug 1539687 - Do not limit visual smooth scrolling to the layout scroll range. r=kats
Differential Revision: https://phabricator.services.mozilla.com/D25176

--HG--
extra : moz-landing-system : lando
2019-03-28 06:27:40 +00:00
Hiroyuki Ikezoe
9db5bc51b8 Bug 1519013 - Shrink the content to display size if user has never changed the site resolution. r=botond
elementFromPoint-002.html, elementFromPoint-003.html and dialog-showModal.html
use document.elementFromPoint with a given point which is calculated from the
value returned by getBoundingClientRect() for a 100% width element.  Before
this change, the given point is outside of view because there is no viewport
meta tag in the documents so that elementFromPoint fails.  After this change, the
documents fit to the visual viewport so that elementFromPoint works as expected.

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

--HG--
extra : moz-landing-system : lando
2019-03-28 03:04:59 +00:00
Hiroyuki Ikezoe
c0d7962f08 Bug 1519013 - Introduce nsIPresShell::IsResolutionUpdatedByApz to tell whether the resolution has never been changed by APZ. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D16154

--HG--
extra : moz-landing-system : lando
2019-03-28 03:04:59 +00:00
Cameron McCormack
126b79c729 Bug 1534240 - Boost loading priority of CSS images similarly to how we do for HTML images. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D24814

--HG--
extra : moz-landing-system : lando
2019-03-28 02:54:16 +00:00
Cameron McCormack
e90bcb5786 Bug 1535874 - Don't clear out nsStyleSheetService::gInstance when random other nsStyleSheetService objects are destroyed. r=boris
Differential Revision: https://phabricator.services.mozilla.com/D23815

--HG--
extra : moz-landing-system : lando
2019-03-27 22:40:14 +00:00
Edwin Gao
4b22eba76a Bug 1536365, 1536363 - fine tune expected outcome of reftests on windows10-aarch64 r=jmaher
Relocated the `fuzzy-if` conditions for windows10-aarch64 in the files listed below, as the fuzzy condition was being overridden by conditions that came later.

Also tuned some of the values for pixel differences to reduce oranges.

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

--HG--
extra : moz-landing-system : lando
2019-03-27 18:30:38 +00:00
Botond Ballo
2b2dd7dac6 Bug 1538511 - Get rid of nsIPresShell::ScrollMode (use mozilla::ScrollMode instead). r=kats
Differential Revision: https://phabricator.services.mozilla.com/D24797

--HG--
extra : moz-landing-system : lando
2019-03-26 00:51:57 +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
Kartikaya Gupta
43dd43dea5 Bug 1527182 - With WR enabled, we can async scroll even inside SVG filters. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D24877

--HG--
extra : moz-landing-system : lando
2019-03-27 16:22:15 +00:00
Botond Ballo
c1665a519c Bug 1527511 - Other scrollbar rendering reftest fixes. r=kats
The functional fix in this patch series makes some other scrollbar rendering
tests actually test something useful.

Some of them just start passing. Some need a bit of fuzzing. Some need an
adjustment to avoid running afoul of our minimum viewport width of 200.

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

--HG--
extra : moz-landing-system : lando
2019-03-27 16:38:23 +00:00
Botond Ballo
d558cef23f Bug 1527511 - Get zoomed-in RTL scrollbar rendering tests working and re-enable them. r=kats
Differential Revision: https://phabricator.services.mozilla.com/D23078

--HG--
extra : moz-landing-system : lando
2019-03-27 16:38:13 +00:00
Botond Ballo
c7227b4b1e Bug 1527511 - Scale scroll parts clip by the resolution with containerless scrolling. r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D23077

--HG--
extra : moz-landing-system : lando
2019-03-27 16:38:04 +00:00
Ciure Andrei
289f67a603 Merge mozilla-central to autoland. a=merge CLOSED TREE 2019-03-27 18:40:06 +02:00
Ciure Andrei
daa05061c1 Merge inbound to mozilla-central. a=merge 2019-03-27 18:36:44 +02:00
Emilio Cobos Álvarez
a9afb3f434 Bug 1539027 - Use a hopefully faster rounding for float -> app units conversion. r=dholbert
LLVM doesn't manage to use any fast code for froundf, so use NSToIntRound
instead, which is probably what we should be using anyway for consistency.

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

--HG--
extra : moz-landing-system : lando
2019-03-27 16:17:55 +00:00
Emilio Cobos Álvarez
992c298f60 Bug 1539267 - Bug 1539171 - Follow the list-item definition from the spec a bit more closely. r=mats
The HTML restriction doesn't match any browser.

This matches Edge, though I filed
https://github.com/w3c/csswg-drafts/issues/3766 about the pseudo-element
condition.

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

--HG--
extra : moz-landing-system : lando
2019-03-27 15:03:20 +00:00
Cosmin Sabou
ef5fea1c75 Merge mozilla-central to mozilla-inbound. 2019-03-27 07:00:56 +02:00
Cosmin Sabou
3d469329a4 Merge mozilla-inbound to mozilla-central. a=merge 2019-03-27 06:45:13 +02:00
Masayuki Nakano
db43e47173 Bug 1536366 - Make PresShell::EventHandler::PrepareToDispatchEvent() call TouchManager::PreHandleEvent() instead of PresShell::EventHandler::HandleEventWithCurrentEventInfo() r=smaug
The only caller of `TouchManager::PreHandleEvent()` is
`PresShell::EventHandler::HandleEventWithCurrentEventInfo()` which is guaranteed
that it never handles untrused event by bug 1536353.  Therefore, we can make
`PresShell::EventHandler::PrepareToDispatchEvent()` call it instead.  That's
better place from the point of view of semantics and making
`PresShell::EventHandler::PrepareToDispatchEvent()` simpler.

Note that this may cause changing the score of a telemetry probe,
"INPUT_EVENT_QUEUED_APZ_TOUCH_MOVE_MS" because it will include the time of
the runtime cost of `TouchManager::PreHandleEvent()` when the event is an
`eTouchMove` event and handled by APZ.  However, this was expired in 60.
So, we don't meet any changes with this patch actually.

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

--HG--
extra : moz-landing-system : lando
2019-03-27 01:08:23 +00:00
Glenn Watson
9b399ba2a8 Bug 1539048 - Support segment rendering for pictures in WR. r=kvark
On some low end GPUs, clip mask rendering can be a significant
GPU cost. One way to reduce this is to support segment rendering
on more primitive types, to reduce the size of clip masks.

This patch adds support for pictures that have clip masks
to take part in segment rendering. This can significantly
reduce the number of fragments that must be drawn into a clip
mask for off-screen picture surfaces.

In future, WR can take advantage of segment rendering to use
clip mask shaders that handle only a single corner at a time.
This will be a further significant performance win to clip mask
render time.

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

--HG--
extra : moz-landing-system : lando
2019-03-26 21:25:31 +00:00
Julian Descottes
6de33b8a90 Bug 1537876 - Update test_css_parse_error_smoketest.html to check the cssSelectors property;r=emilio
Depends on D24911

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

--HG--
extra : moz-landing-system : lando
2019-03-27 12:19:07 +00:00