Commit Graph

19866 Commits

Author SHA1 Message Date
Emilio Cobos Álvarez
235779278c Bug 1542935 - Re-introduce a call to EnsureStyleFlush from PresShell::Init to fix an Android scrolling regression. r=heycam
Sorry for the vague commit message, but I haven't dug yet on why or how the
Android code is depending on this.

This call used to be part of nsPresContext::CompatibilityModeChanged, which
unconditionally called PresShell::EnsureStyleFlush.

This was not (in theory, at least) always necessary. There's there's no point in
ensuring a style flush is going to happen if styles haven't changed, and
CompatibilityModeChanged() didn't actually guarantee that the compat mode was
different at all before my patch.

Styles only change if the compat mode actually changes (since then selectors
become case-sensitive or case-insensitive), or more obviously when you insert or
remove the quirks.css stylesheet, and in that case ApplicableStylesChanged makes
sure that the flush happens.

Yet here we are, and not having that early call to EnsureStyleFlush, even in the
case there's no quirks mode or quirks sheet change or anything of that sort
(this happens even on XUL docs, which are always FullStandards) makes the first
(and only the first) browsing session in Geckoview have terrible scrolling
performance.

I'm calling it a day for today, will investigate as time permits in bug 1544185.

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

--HG--
extra : moz-landing-system : lando
2019-04-15 05:26:27 +00:00
Edwin Gao
c6f63cc607 Bug 1536278 - re-enable test_accessiblecaret_cursor_mode.py tests on windows10-aarch64 r=whimboo,jmaher
Changes:
- re-enable the accessiblecaret test on windows10-aarch64

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

--HG--
extra : moz-landing-system : lando
2019-04-15 07:17:21 +00:00
violet
fa3b85a4da Bug 1544270 - Change 1.f * something to float(something) r=longsonr
Change 1.f * something to float(something)

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

--HG--
extra : moz-landing-system : lando
2019-04-14 09:32:19 +00:00
Emilio Cobos Álvarez
03f332eb7a Bug 1543758 - Pseudo-elements should be allowed to be list-items. r=mats
Per https://github.com/w3c/csswg-drafts/issues/3766

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

--HG--
extra : moz-landing-system : lando
2019-04-13 22:22:51 +00:00
Masayuki Nakano
414509fe00 Bug 1543315 - part 9: Mark nsIPresShell::FlushPendingNotifications() as MOZ_CAN_RUN_SCRIPT r=smaug
So, this patch makes all caller of it safe including its arguments unless
they come from other methods.

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

--HG--
extra : moz-landing-system : lando
2019-04-13 12:43:57 +00:00
Masayuki Nakano
8d97a5efe1 Bug 1543315 - part 8: Mark HandlePostedReflowCallbacks() as MOZ_CAN_RUN_SCRIPT r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D27224

--HG--
extra : moz-landing-system : lando
2019-04-13 12:42:38 +00:00
Masayuki Nakano
93bae33c11 Bug 1543315 - part 7: Mark DidDoReflow() as MOZ_CAN_RUN_SCRIPT r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D27223

--HG--
extra : moz-landing-system : lando
2019-04-13 12:42:02 +00:00
Masayuki Nakano
55dc8a6004 Bug 1543315 - part 6: Mark ProcessReflowCommands() as MOZ_CAN_RUN_SCRIPT r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D27222

--HG--
extra : moz-landing-system : lando
2019-04-13 12:40:48 +00:00
Masayuki Nakano
40f02a6603 Bug 1543315 - part 5: Mark ResizeReflowIgnoreOverride() as MOZ_CAN_RUN_SCRIPT r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D27221

--HG--
extra : moz-landing-system : lando
2019-04-13 12:40:10 +00:00
Masayuki Nakano
e8514bbdc6 Bug 1543315 - part 4: Mark ResizeReflow() as MOZ_CAN_RUN_SCRIPT r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D27220

--HG--
extra : moz-landing-system : lando
2019-04-13 12:39:47 +00:00
Masayuki Nakano
2332e34945 Bug 1543315 - part 3: Mark WillPaint() as MOZ_CAN_RUN_SCRIPT r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D27219

--HG--
extra : moz-landing-system : lando
2019-04-13 12:39:03 +00:00
Masayuki Nakano
0479f528e7 Bug 1543315 - part 2: Mark VerifyIncrementalReflow() and DoVerifyReflow() as MOZ_CAN_RUN_SCRIPT_BOUNDARY r=smaug
They are debug build only methods.  So, callers of them shouldn't be marked
as `MOZ_CAN_RUN_SCRIPT` only for them.  Therefore, `MOZ_CAN_RUN_SCRIPT_BOUNDARY`
must be better.

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

--HG--
extra : moz-landing-system : lando
2019-04-13 12:38:20 +00:00
Masayuki Nakano
ff25e09e4a Bug 1543315 - part 1: Mark EventDispatchingCallback as MOZ_CAN_RUN_SCRIPT r=smaug
First of all, we should mark `nsIPresShell::FlushPendingNotifications()` as
`MOZ_CAN_RUN_SCRIPT` as soon as possible.  Therefore, I'll mark all its callers
in `PresShell` as `MOZ_CAN_RUN_SCRIPT` first.

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

--HG--
extra : moz-landing-system : lando
2019-04-13 12:37:52 +00:00
Masayuki Nakano
d8d0bcab65 Bug 1543013 - part 2: Make accessible use mozilla::PresShell directly rather than via nsIPresShell r=Jamie
This patch makes accessible module use `mozilla::PresShell` directly rather
than via `nsIPresShell`.  Additionally, renames `DocAccessible::PresShell()`
to `DocAccessible::PresShellPtr()` for avoiding conflict with using
`PresShell` in it and its sub classes.

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

--HG--
extra : moz-landing-system : lando
2019-04-13 12:13:15 +00:00
Masayuki Nakano
fdbbccd877 Bug 1542664 - Make TabChild use mozilla::PresShell directly rather than via nsIPresShell r=nika
This patch makes `TabChild` use `mozilla::PresShell` directly.

Then, renames `TabChild::GetPresShell()` and `TabChild::GetDocument()` to
`TabChild::GetTopLevelPresShell()` and `TabChild::GetTopLevelDocument()` to
make what they do clearer (e.g., see the change in `PresShell.cpp`).

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

--HG--
extra : moz-landing-system : lando
2019-04-13 01:53:10 +00:00
Masayuki Nakano
1f3059e916 Bug 1542663 - Make nsViewManager and nsView (nsIWidgetListener) use mozilla::PresShell directly rather than via nsIPresShell r=tnikkel
This patch makes `nsViewManager::GetPresShell()` and
`nsIWidgetListener::GetPresShell()` (overridden by `nsView` and
`nsWebShellWindow::WidgetListenerDelegate`) return `mozilla::PresShell*`.

Additionally, makes `nsWebShellWindow::GetPresShell()` also return
`mozilla::PresShell()`.

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

--HG--
extra : moz-landing-system : lando
2019-04-13 01:05:21 +00:00
violet
2f70fdcb52 Bug 1426594 - Should convert rect from TransformFramePointToTextChild to device pixel r=longsonr
We need device pixel, but TransformFramePointToTextChild returns in css pixel,
thus a scaling is necessary.

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

--HG--
extra : moz-landing-system : lando
2019-04-12 16:09:11 +00:00
Masayuki Nakano
0986fb819b Bug 1542506 - Make nsDocShell use mozilla::PresShell* directly rather than nsIPresShell* r=bzbarsky
This patch makes `nsDocShell::GetPresShell()` and
`nsDocShell::GetEldestPresShell()` return `mozilla::PresShell*` and
some non-public methods use `mozilla::PresShell*` directly.

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

--HG--
extra : moz-landing-system : lando
2019-04-13 01:03:13 +00:00
Boris Chiou
9782f68abf Bug 1526847 - Let ComputeSuitableScaleForAnimation check other transform-like properties. r=hiro
Check all transform-like properties which may affect the scaling
factors when computing the suitable scale for animations.

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

--HG--
extra : moz-landing-system : lando
2019-04-12 21:43:23 +00:00
Sylvestre Ledru
7f60810d86 Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-04-12 13:14:25 +00:00
Daosheng Mu
0e6aee236e Bug 1537967 - Skipping running refresh driver and compositing in VR mode. r=mstange,kip
MozReview-Commit-ID: 4L3PygFSFCB

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

--HG--
extra : moz-landing-system : lando
2019-04-12 04:42:28 +00:00
Ting-Yu Lin
f49d08722a Bug 1543571 Part 1 - Replace "reflow state" with "reflow input". r=dholbert
This patch is generated by the following script on Linux:

function rename() {
    find .\
         -type f\
         ! -path "./obj*"\
         ! -path "./.git"\
         ! -path "./.hg"\
         \( -name "*.cpp" -or\
            -name "*.h" \)\
            -exec sed -i -e "s/$1/$2/g" "{}" \;
}
rename "reflow state" "reflow input"

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

--HG--
extra : moz-landing-system : lando
2019-04-11 20:27:37 +00:00
Emilio Cobos Álvarez
6225992f10 Bug 1539171 - Make the list-item increment not visible from the computed style. r=mats
This is per https://drafts.csswg.org/css-lists/#declaring-a-list-item.

I intentionally kept <li value> defined using attribute mapping, I think that's
saner than special-casing it in layout.

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

--HG--
extra : moz-landing-system : lando
2019-04-11 15:21:17 +00:00
violet
ed94c070ef Bug 1543577 - Remove useless parameter aImageSize from nsLayoutUtils::DrawBackgroundImage r=emilio
aImageSize parameter is only used for SVG background image to pass the intrinsic size.
After bug 1524901, it becomes useless. Let's remove it.

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

--HG--
extra : moz-landing-system : lando
2019-04-11 11:52:03 +00:00
Hiroyuki Ikezoe
5a15da458f Bug 1534070 - Factor scroll-margin into the position calculation where nsIPresShell::ScrollFrameRectIntoView() is going to scroll. r=botond
Depends on D23084

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

--HG--
extra : moz-landing-system : lando
2019-04-11 06:22:31 +00:00
Hiroyuki Ikezoe
7b600a0531 Bug 1534070 - Factor scroll-padding into the position calculation where nsIPresShell::ScrollContentIntoView() is going to scroll if necessary. r=botond
In the case where scroll-snap-type is specified for the scroll container, the
scroll-padding is also factored into in ScrollFrameHelper::ComputeScrollSnapInfo
which is called via ScrollFrameHelper::ScrollToWithOrigin.  It doesn't double
the scroll-padding value, but it's actually redundant, we should avoid it.
We could separate the functionality of ScrollToWithOrigin, one is to scroll
to a given element, the other is to scroll to a given position.  The former will
be used for Element.scrollIntoElement and relevant stuff, the latter will be
used for Element.scrollTo and relevant stuff.  That's being said, as of now, we
have still the old scroll snap implementation, so the separation will introduce
complexity, the separation should be done once after the old implementation
removed.

There are 9 call sites of nsIPresShell::ScrollContentIntoView:
  nsIPresShell::GoToAnchor
  nsIPresShell::ScrollToAnchor
  Element::ScrollIntoView
   We definitely needs scroll-padding and scroll-margin for these functions.

  nsCoreUtils::ScrollTo
   This is used for Accesible::ScrollTo which scrolls to a given accesible node,
   probably we should behave as what Element::ScrollIntoView does.

  Accessible::DispatchClickEvent
   Similar to the above, similated various mouse events on a given target node.

  PresShell::EventHandler::PrepareToUseCaretPosition
  PresShell::EventHandler::GetCurrentItemAndPositionForElement
   Both are for context menu, we shouldn't consider scroll-padding and
   scroll-margin.

  nsFormFillController::SetPopupOpen
   This is used for autocompletion popup, we shouldn't consider scroll-padding
   and scroll-margin.

  nsFocusManager::ScrollIntoView
   This is bit unfortunate, we should use scroll-padding and scroll-margin
   depending on call site of this function. Bug 1535232 is for this case.

cssom-view/scrollIntoView-scrollPadding.html which has some tests that is
actually testing scroll-padding with scrollIntoView passes with this change.

The reftest in this change is a test case that the browser navigates to an
element with specifying the anchor to the element.

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

--HG--
extra : moz-landing-system : lando
2019-04-11 06:22:14 +00:00
Hiroyuki Ikezoe
f7645a5770 Bug 1531228 - Enable the new scroll snap and disable the old scroll snap on nightly. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D22804

--HG--
extra : moz-landing-system : lando
2019-04-11 06:22:01 +00:00
Hiroyuki Ikezoe
a7fb73dd6e Bug 1373835 - Enable scroll snap for Element.scrollIntoView. r=botond
Depends on D21625

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

--HG--
extra : moz-landing-system : lando
2019-04-11 06:20:11 +00:00
Hiroyuki Ikezoe
eab764a7ae Bug 1312163 - Switch to the new scroll-snap-type syntax for the old scroll snap implementation and drop the scroll-snap-type-{x,y} longhands. r=emilio
Now scroll-snap-type is a longhand property.

Depends on D21621

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

--HG--
extra : moz-landing-system : lando
2019-04-11 06:19:31 +00:00
Hiroyuki Ikezoe
19102cb3b9 Bug 1312163 - Rename ScrollSnapType to ScrollSnapStrictness. r=emilio
The scroll snap strictness is defined in the new spec [1], and the structure
is the exactly same as the old scroll snap type structure.

[1] https://drafts.csswg.org/css-scroll-snap-1/#snap-strictness

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

--HG--
extra : moz-landing-system : lando
2019-04-11 06:19:13 +00:00
Dorel Luca
d285466535 Backed out changeset 553d7f3d8eed (bug 1537967) for Marionette failures in testing/firefox-ui/tests/functional/security/test_mixed_content_page.py 2019-04-11 06:31:36 +03:00
violet
995f337626 Bug 1524901 - Should not set SVG viewport to intrinsic size when painting background image r=longsonr
When an SVG is used as a CSS background-image, we previously used the same behavior as
a normal image. It will stretch if the background-size is incompatible with the intrinsic
size of the SVG. This is a webcompat issue.

Now we use the painting destination rect size instead to avoid stretching.

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

--HG--
extra : moz-landing-system : lando
2019-04-11 01:05:02 +00:00
Daosheng Mu
10b30705e6 Bug 1537967 - Skipping running refresh driver and compositing in VR mode. r=mstange,kip
MozReview-Commit-ID: 4L3PygFSFCB

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

--HG--
extra : moz-landing-system : lando
2019-04-10 19:44:18 +00:00
Dorel Luca
58348f299b Backed out changeset aa0feb50773a (bug 1540221) for WPT failures in /html/semantics/embedded-content/the-canvas-element/security.pattern.fillStyle.sub.html. CLOSED TREE 2019-04-11 05:28:34 +03:00
Emilio Cobos Álvarez
bb47a90d4f Bug 1543401 - Use rust lengths for row-gap / column-gap. r=mats
Differential Revision: https://phabricator.services.mozilla.com/D26915

--HG--
extra : moz-landing-system : lando
2019-04-10 16:00:03 +00:00
Andrea Marchesini
d7915fa305 Bug 1540221 - Setting fillStyle to a pattern of an unclean canvas makes the canvas origin-unclean, r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D25773

--HG--
extra : moz-landing-system : lando
2019-04-09 20:10:03 +00:00
longsonr
866f2126b4 Bug 1540408 Part 3 - Rename SVGViewBoxRect to SVGViewBox r=dholbert 2019-04-10 05:08:14 +01:00
Emilio Cobos Álvarez
ae42478092 Bug 1540220 - Cleanup a bit the lazy style resolution APIs. r=heycam
There are some that only have one caller, and some slightly confusing naming.
Hopefully make it a bit clearer.

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

--HG--
extra : moz-landing-system : lando
2019-04-09 18:05:04 +00:00
Noemi Erli
dd7e27f4a8 Merge inbound to mozilla-central. a=merge 2019-04-09 12:55:19 +03:00
Razvan Maries
a3e3bcf2fe Merge mozilla-central to mozilla-inbound. a=merge on a CLOSED TREE 2019-04-09 06:43:36 +03:00
Razvan Maries
51bf310eab Merge mozilla-central to mozilla-inbound. a=merge on a CLOSED TREE 2019-04-09 00:02:13 +03:00
Ciure Andrei
7e99b88e20 Backed out changeset b88166b3b314 (bug 1542263) for 1401692.html perma failures a=backout 2019-04-08 21:59:14 +03:00
Daniel Varga
673797a0bb Merge mozilla-central to mozilla-inbound. a=merge on a CLOSED TREE 2019-04-08 19:29:28 +03:00
Emilio Cobos Álvarez
6e94f79a85 Bug 1542263 - Measure the styleset memory usage from the document, not the pres shell. 2019-04-08 14:59:23 +02:00
Mats Palmgren
f7b17e74b4 Bug 1542594 - Apply counter-set after counter-increment, not before. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D26439

--HG--
extra : rebase_source : 5e95ba52fda0b4b30865d7e98b9f49178f620cd6
2019-04-07 13:45:57 +02:00
Emilio Cobos Álvarez
be936c04a7 Bug 1542263 - Measure the styleset memory usage from the document, not the pres shell. 2019-04-09 02:17:32 +02:00
violet
4d17c26194 Bug 1542671 - Correct misinformation in GetTransformToAncestor documentation r=emilio
nsLayoutUtils::GetTransformToAncestor returns device pixel by default
rather than App unit. And there is no aInCSSUnits parameter.

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

--HG--
extra : moz-landing-system : lando
2019-04-08 11:16:29 +00:00
Emilio Cobos Álvarez
d15876acb4 Bug 1541952 - Move ApplicableStylesChanged() to Document. r=heycam
It's the right place for it to be now that it owns the StyleSet.

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

--HG--
extra : moz-landing-system : lando
2019-04-06 19:25:25 +00:00
Geoff Brown
8d88b9a596 Bug 1318091 - Disable failing android gtests; r=bc
Disable gtests observed to fail on Android. Some of these are simple build
failures and failures due to file permissions or paths, while other failures
are more obscure.
Once Android gtests are running on mozilla-central, I will file follow-up
bugs inviting teams to investigate the failures and re-enable Android gtests
that are important to them.

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

--HG--
extra : moz-landing-system : lando
2019-04-08 20:58:21 +00:00
Masayuki Nakano
e8446480e1 Bug 1542407 - Make nsIFrame use mozilla::PresShell directly rather than via nsIPresShell r=emilio
Except retrieving from weak reference, `nsIFrame` should treat
`mozilla::PresShell` directly rather than via `nsIPresShell`.

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

--HG--
extra : moz-landing-system : lando
2019-04-06 06:02:28 +00:00