Commit Graph

16057 Commits

Author SHA1 Message Date
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
Ting-Yu Lin
2ebacf19f8 Bug 1543571 Part 4 - Manually replace "reflow state" with "reflow input" that are break across lines. r=dholbert
This is a follow-up for Part 1. I find all the candidates by running the
following command under layout/, and manually replace them.

  ag -A 1 reflow$ | ag -B 1 state

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

--HG--
extra : moz-landing-system : lando
2019-04-11 21:22:16 +00:00
Ting-Yu Lin
e1cd02f366 Bug 1543571 Part 3 - Rename blockHtmlRI to blockReflowInput in nsBlockFrame::ReflowBlockFrame(). r=dholbert
nsHTMLReflowState was renamed to ReflowInput in bug 1277129, so remove
the "Html" in the variable name.

Also, remove the comment "ReflowBlock will initialize it." because
ReflowInput::Init() is called in the constructor. We are not using
ReflowInput::CALLER_WILL_INIT flag here.

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

--HG--
extra : moz-landing-system : lando
2019-04-11 20:29:44 +00:00
Ting-Yu Lin
04a76d27a6 Bug 1543571 Part 2 - Replace DUMMY_PARENT_REFLOW_STATE with DUMMY_PARENT_REFLOW_INPUT. r=dholbert
This patch is generated by the following script running 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 DUMMY_PARENT_REFLOW_STATE DUMMY_PARENT_REFLOW_INPUT

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

--HG--
extra : moz-landing-system : lando
2019-04-11 20:27:18 +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
Ting-Yu Lin
16b761dfeb Bug 1543571 Part 0 - Adjust a comment to prevent it from being adjusted in Part 1. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D27161

--HG--
extra : moz-landing-system : lando
2019-04-11 20:51:42 +00:00
Mike Conley
16b25917b7 Bug 1540150 - Make it impossible to enter the native drag-drop loop in test automation. r=NeilDeakin
Differential Revision: https://phabricator.services.mozilla.com/D25428

--HG--
extra : moz-landing-system : lando
2019-04-11 17:17:36 +00:00
Kartikaya Gupta
937b89a55a Bug 1542019 - Split the dispatch-to-content flag into three. r=botond,hsivonen
This patch extracts two additional CompositorHitTestInfo flags from the
eDispatchToContent flag; eApzAwareListeners for elements that have
APZ-aware listeners, and eInactiveScrollframe for inactive scrollframe
or unlayerized scrollthumbs. The eDispatchToContent is then renamed to
eIrregularArea to reflect the fact that it is used for irregular-shaped
areas that require main-thread hit-testing.

Additionally, it is important to note that when using the non-WebRender
codepath, all three of these flags still end up gettings squashed into
the "dispatch to content" region on the EventRegions; when APZ
reconstructs a CompositorHitTestInfo it will turn anything in this
region back into an eIrregularArea. So this is a lossy round-trip
conversion for the non-WebRender case. However it should still result in
correct behaviour because the semantics of eIrregularArea result in APZ
relying on the main-thread to do hit-testing and so any APZ-aware
listeners and inactive scrollframes are also handled by the main-thread.

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

--HG--
extra : moz-landing-system : lando
2019-04-11 13:31:53 +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
d239072cac Bug 1373832 - Deflate the snapport by scroll-padding and adjust the snap positions by the padding value. r=botond
https://drafts.csswg.org/css-scroll-snap-1/#scroll-padding

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

--HG--
extra : moz-landing-system : lando
2019-04-11 06:21:48 +00:00
Hiroyuki Ikezoe
019f6cae6e Bug 1373833 - Factor scroll-margin values into scroll snap position calculation. r=botond
scroll-margin is for each elements in the scroll container and snap positions
are shifted by the value.

https://drafts.csswg.org/css-scroll-snap-1/#scroll-margin
https://drafts.csswg.org/css-scroll-snap-1/#scroll-snap-area

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

--HG--
extra : moz-landing-system : lando
2019-04-11 06:21:36 +00:00
Hiroyuki Ikezoe
ee992bd0bb Bug 1373835 - Cull out elements which will be invisible in the snapport for programatic scrolls. r=botond
As for scrolling on the compositor we don't cull out them since we don't know
the final snapport rect at the time when we send the information about
snapping to the compositor.  And we will handle it for APZ in bug 1531589.

https://drafts.csswg.org/css-scroll-snap-1/#snap-scope

Depends on D21632

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

--HG--
extra : moz-landing-system : lando
2019-04-11 06:21:23 +00:00
Hiroyuki Ikezoe
fdc43c56d5 Bug 1373835 - Make positions in the range that the element covers the snapport valid snap positions. r=botond
https://drafts.csswg.org/css-scroll-snap-1/#snap-overflow

Depends on D21631

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

--HG--
extra : moz-landing-system : lando
2019-04-11 06:21:11 +00:00
Hiroyuki Ikezoe
9497022bc3 Bug 1373835 - Implement scroll-snap-align. r=botond,jfkthame
https://drafts.csswg.org/css-scroll-snap-1/#scroll-snap-align

The main logic here is basically same as the old scroll snap implementation,
just iterating over all descendant elements in the scroll container and collect
snap positions.  The differences are;

 1) the snap positions are specified based on descendant elements instead of
    points
 2) the snap positions are able to be specified by `block` or `inline` keywords
    so that we also need to care the element flow.
    more test cases for this are coming in the next commit
 3) the target rect is calculated by nsLayoutUtils::TransformFrameRectToAncestor
    which means transform is already taken account into it (we have a bug for
    the old scroll snap, it's bug 1218745)
    some of web platform tests will be added in a subsequent commit

Some of test cases in overflowing-snap-areas.html that accidentally have
passed start failing with this change, all of them will be passed with
subsequent changes in these commit series.

Depends on D21627

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

--HG--
extra : moz-landing-system : lando
2019-04-11 06:20:36 +00:00
Hiroyuki Ikezoe
eab0011ba9 Bug 1373835 - Make ComputeScrollSnapInfo a private method of ScrollFrameHelper. r=botond
Depends on D21626

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

--HG--
extra : moz-landing-system : lando
2019-04-11 06:20:24 +00:00
Hiroyuki Ikezoe
66dd57767b Bug 1373835 - Enable scroll snap for programatic scrolls. r=botond
From the spec [1];

 Using the scroll-snap-type property on the relevant scroll container, the
 author can request a particular bias for the scrollport to land on a snap
 position after scrolling operations (including programmatic scrolls such
 as the scrollTo() method).

The target here are functions exposed in web contents other than
Element.scrollIntoView which will be changed in the next commit.

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

Depends on D21624

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

--HG--
extra : moz-landing-system : lando
2019-04-11 06:20:04 +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
Botond Ballo
f63a816071 Bug 1542933 - Do not attempt minimum scale computation with empty overflow rect. r=hiro
Differential Revision: https://phabricator.services.mozilla.com/D27003

--HG--
extra : moz-landing-system : lando
2019-04-10 22:43:20 +00: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
Matt Woodrow
7c9ef067b7 Bug 1538969 - Report nsDisplayVideo as being opaque when possible so that we can occlude content behind it. r=jya
Differential Revision: https://phabricator.services.mozilla.com/D25189

--HG--
extra : moz-landing-system : lando
2019-04-10 08:08:26 +00:00
Miko Mynttinen
76ab5cf265 Bug 1541985 - Merge nsCharClipDisplayItem and nsDisplayText r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D26843

--HG--
extra : moz-landing-system : lando
2019-04-10 01:41:22 +00:00
Narcis Beleuzu
065ab21012 Merge inbound to mozilla-central. a=merge 2019-04-10 01:09:36 +03: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
Emilio Cobos Álvarez
f1b06a744a Bug 1540220 - Remove some useless usage of LazyComputeBehavior::Allow. r=dholbert
This switches nsFrameSetFrame's hacky frame construction codepath to operate on
the flattened tree, since it made me a bit more comfortable about it (all layout
should operate on is the flattened tree, though in this cause this should not
cause any web-observable behavior change, since <frameset> can't be a shadow
host per spec, and we no longer support XBL-in-content).

That doesn't need to compute styles lazily. You only need to compute styles
lazily in descendants of display: none elements, and even though this code
doesn't check on display: none _on the children_, the parent element should
never have display: none (since we're creating an nsFrameSetFrame for it).

There are other places that still call into this (apart from getComputedStyle).

One is nsImageFrame's cursor code. Given the <area> elements referencing an
image map could be anywhere, we need to have lazy computation here.

The other is the viewport style propagation stuff. There shouldn't be a need for
LazyComputeBehavior::Allow on the document element in order to check the
viewport styles propagation, since the root element can't have display: none
ancestors. But we run that code before actually constructing the doc element
containing block, which is when we do the initial document styling.

We could remove that with some more effort, but it's not worth it right now,
since we need to keep using it for the <body>, since the document element could
be display: none itself, and we propagate the overflow styles in that case
still. I filed https://github.com/w3c/csswg-drafts/issues/3779 to potentially
change that.

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

--HG--
extra : moz-landing-system : lando
2019-04-09 18:03:51 +00:00
Noemi Erli
dd7e27f4a8 Merge inbound to mozilla-central. a=merge 2019-04-09 12:55:19 +03:00
Mats Palmgren
a24fcc8d2b Bug 1539656 - Allow a11y to get list-item ordinal values even when the counter list is dirty without asserting. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D26598

--HG--
extra : amend_source : 1e5bb99c8769b038ce1ee63202191e885f846b18
2019-04-08 21:49:20 +02:00
Cosmin Sabou
fa2d5b1cec Backed out 3 changesets (bug 1538969) for wpt reftests failures on transform3d-backface-visibility-001.
Backed out changeset c8e85a802c77 (bug 1538969)
Backed out changeset 911386e724bc (bug 1538969)
Backed out changeset 2332a2fb02fa (bug 1538969)

--HG--
extra : amend_source : 6f1ed1f9f2e978ab6c52a03cde73b225ff09448b
2019-04-09 08:52:20 +03:00
Matt Woodrow
541c8cc1c3 Bug 1538969 - Report nsDisplayVideo as being opaque when possible so that we can occlude content behind it. r=jya
Differential Revision: https://phabricator.services.mozilla.com/D25189

--HG--
extra : moz-landing-system : lando
2019-04-09 03:16:39 +00:00
Kartikaya Gupta
e2b539cb52 Bug 1525698 - Don't generate outlines for table-column or table-column-group elements. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D26432

--HG--
extra : moz-landing-system : lando
2019-04-09 00:00:05 +00:00
Botond Ballo
6d57b2e7cd Bug 1516056 - Adjust ScrollToRestorePosition() to reflect that the layout scroll offset is clamped to the layout viewport. r=tnikkel
Depends on D20282

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

--HG--
extra : moz-landing-system : lando
2019-04-08 23:35:25 +00:00
Botond Ballo
633322283d Bug 1516056 - Call GetLayoutScrollRange() instead of GetVisualScrollRange() when we are using the scroll range to clamp the layout scroll position. r=kats
Depends on D20280

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

--HG--
extra : moz-landing-system : lando
2019-04-08 23:35:02 +00:00
Botond Ballo
8095c8e25d Bug 1516056 - Rename ScrollFrameHelper::GetScrollRangeForClamping() to GetVisualScrollRange(). r=kats
Depends on D20279

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

--HG--
extra : moz-landing-system : lando
2019-04-08 23:34:52 +00:00
Botond Ballo
d79e2f5b64 Bug 1516056 - Rename ScrollFrameHelper::GetScrollRange() to GetLayoutScrollRange(). r=kats
Differential Revision: https://phabricator.services.mozilla.com/D20279

--HG--
extra : moz-landing-system : lando
2019-04-08 23:34:43 +00:00
Emilio Cobos Álvarez
7980a72d0a Bug 760345 - Remove the last usage of lossy currentcolor. r=heycam
We don't have lossy currentcolor in the style system anymore, except for a
single property -moz-font-smoothing-background-color.

I could've converted it into a proper StyleColor and thread down all the
necessary information to the font metrics code.

But it doesn't really seem worth it given it's not exposed to the web, so I just
did the simplest thing, which is making currentcolor compute to transparent to
that specific property.

This patch also removes the stores_complex_colors_lossily code and related,
since now we always can cache computed colors.

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

--HG--
extra : moz-landing-system : lando
2019-04-06 17:47:58 +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
Sylvestre Ledru
03c8e8c2dd Bug 1519636 - clang-format-8: Reformat recent changes to the Google coding style r=Ehsan
clang-format-8 upstream had some improvements wrt macros
See: https://reviews.llvm.org/D33440
This is why the diff is bigger than usual

# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-04-05 21:41:42 +00:00
Ryan Hunt
8653565c5e Bug 1535390 - Ensure remote browser has dimensions set after recreating frame loader. r=jwatt
nsFrameLoaderOwner::UpdateRemoteness will recreate the nsFrameLoader for a
piece of content. As part of this, it will unset the cached nsFrameLoader for
the content's nsSubdocumentFrame. However we need to run ShowViewer() for the
new nsFrameLoader as the frame has already been initialized. In addition,
dimensions and position on the new nsFrameLoader need to be set. Usually this
is done after a reflow, but there's no guarantee a reflow will happen after
a UpdateRemoteness operation.

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

--HG--
extra : moz-landing-system : lando
2019-04-05 19:25:30 +00:00
Jonathan Kew
935c1a8f8d Bug 1541668 - Make nsTextFrame::GetRenderedText ignore full-width and full-size-kana transforms. r=Jamie,mats
Differential Revision: https://phabricator.services.mozilla.com/D26146

--HG--
extra : moz-landing-system : lando
2019-04-05 14:44:43 +00:00
Csoregi Natalia
ba58e936bd Backed out changeset 4ad80127f89f (bug 1519636) for bustage on MarkupMap.h and nsAccessibilityService.cpp. CLOSED TREE 2019-04-05 09:48:19 +03:00
Sylvestre Ledru
d1c1878603 Bug 1519636 - clang-format-8: Reformat recent changes to the Google coding style r=Ehsan
clang-format-8 upstream had some improvements wrt macros
See: https://reviews.llvm.org/D33440
This is why the diff is bigger than usual

# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-04-04 21:36:16 +00:00
Brindusan Cristian
c298fe167e Backed out changeset 1ea4b3582033 (bug 760345) for build bustages at ia2AccessibleComponent.cpp. 2019-04-05 07:49:09 +03:00
Botond Ballo
2cb0da3cd1 Bug 1531962 - Avoid including MobileViewportManager.h from nsIPresShell.h. r=kats
nsIPresShell.h is widely included, so this avoids excessively long rebuilds
when MobileViewportManager.h is modified.

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

--HG--
extra : moz-landing-system : lando
2019-04-04 22:09:55 +00:00
Emilio Cobos Álvarez
993731e44b Bug 760345 - Remove the last usage of lossy currentcolor. r=heycam
We don't have lossy currentcolor in the style system anymore, except for a
single property -moz-font-smoothing-background-color.

I could've converted it into a proper StyleColor and thread down all the
necessary information to the font metrics code.

But it doesn't really seem worth it given it's not exposed to the web, so I just
did the simplest thing, which is making currentcolor compute to transparent to
that specific property.

This patch also removes the stores_complex_colors_lossily code and related,
since now we always can cache computed colors.

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

--HG--
extra : moz-landing-system : lando
2019-04-04 22:06:03 +00:00
Ting-Yu Lin
a331856c45 Bug 1516963 - Make grid, flex, etc. be a selection target themselves if they contain no selectable children. r=emilio
Exclude replaced frame likes image frames otherwise
editor/libeditor/tests/test_abs_positioner_positioning_elements.html
will break.

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

--HG--
extra : moz-landing-system : lando
2019-04-05 00:04:32 +00:00
Brindusan Cristian
522cfbe7f9 Backed out changeset 5dae6d1b597a (bug 1540150) for [@ libgdk-3.so.0.1800.9 + 0x60a09] crashes in h13 tests. CLOSED TREE
--HG--
extra : histedit_source : 431f554b4dd383748b3f1603b43b8ac5e790e70d
2019-04-05 03:23:12 +03:00
Narcis Beleuzu
24dbe577a5 Backed out changeset 389b6bbd76db (bug 1519636) for bustages on MarkupMap.h . CLOSED TREE 2019-04-05 00:27:56 +03:00
Sylvestre Ledru
399dbd28fe Bug 1519636 - clang-format-8: Reformat recent changes to the Google coding style r=Ehsan
clang-format-8 upstream had some improvements wrt macros
See: https://reviews.llvm.org/D33440
This is why the diff is bigger than usual

# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-04-04 20:12:23 +00:00
Emilio Cobos Álvarez
e63fdb7c97 Bug 1541913 - Use rust lengths for outline-offset. r=boris
Depends on D26155

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

--HG--
extra : moz-landing-system : lando
2019-04-04 18:32:09 +00:00