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

16346 Коммитов

Автор SHA1 Сообщение Дата
Ting-Yu Lin 1dc9d49936 Bug 1494100 Part 1 - Create ColumnUtils, and extract utility functions in nsColumnSetFrame into it. r=dholbert
The functions move to ColumnUtils will be used by ColumnSetWrapperFrame
to implement GetPrefISize() and GetMinISize().

Also, I verify locally that non-unified build is still working by
s/UNIFIED_SOURCES/SOURCES/ in layout/generic/moz.build.

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

--HG--
extra : moz-landing-system : lando
2019-05-08 22:49:31 +00:00
Cameron McCormack f5b7d1380b Bug 866102 - Implement -webkit-line-clamp. r=mats,emilio,dholbert
Differential Revision: https://phabricator.services.mozilla.com/D20115

--HG--
extra : moz-landing-system : lando
2019-05-09 02:32:30 +00:00
Artur Signell 97f51aaa75 dragndrop: Allow drag'n'drop to start from elements inside a shadow root (Bug 1521471) r=emilio
Before this change, only elements inside the shadow root tree were scanned for the
draggable=true attribute. We now check the flattened tree instead so an element
inside a shadow root can start a drag for an element containing the shadow root.

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

--HG--
extra : moz-landing-system : lando
2019-05-08 18:30:45 +00:00
Jonathan Kew fabb0dc4d5 Bug 1549728 - Flush line-breaker whenever the word-break property changes. r=emilio
The patch in bug 1507744 was not sufficient by itself, as the line-breaker could still accumulate a single "current word" across a text-run boundary, and then a single word-break value would be applied to it. We need to flush the line-breaker when word-break changes, so that each part of the word will have break opportunities set according to the appropriate value.

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

--HG--
extra : moz-landing-system : lando
2019-05-08 15:09:44 +00:00
Miko Mynttinen 2c5cb1519c Bug 1549751 - Part 2: Add nsPaintedDisplayItem r=mattwoodrow
Move ApplyOpacity(), CanApplyOpacity(), Paint() and PaintWithClip() methods to nsPaintedDisplayItem

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

--HG--
extra : moz-landing-system : lando
2019-05-08 13:49:56 +00:00
Ting-Yu Lin 44b91cdf58 Bug 1548118 Part 4 - Always mark inner ColumnSetWrapper's children dirty before reflowing it if the outer ColumnSetWrapper is balancing. r=dbaron
ColumnSetFrame always tries to reflow column content regardless of it's
dirtiness. Making ColumnSetWrapperFrame's children dirty can have the
same effect.

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

--HG--
extra : moz-landing-system : lando
2019-05-08 03:12:18 +00:00
Ting-Yu Lin c52b56e4f0 Bug 1548118 Part 2 - Extract computing column balancing depth logic to a function. r=dbaron
Differential Revision: https://phabricator.services.mozilla.com/D29434

--HG--
extra : moz-landing-system : lando
2019-05-08 03:12:05 +00:00
Ting-Yu Lin 1582e78c5d Bug 1548118 Part 1 - Advance the column count at the end of the while loop. r=dbaron
We use `columnCount == aConfig.mBalanceColCount - 1` in other places to
determine if we are at the last column. Advancing the column count at
the end of the loop make the condition consistent.

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

--HG--
extra : moz-landing-system : lando
2019-05-08 03:09:19 +00:00
Alexis Beingessner 0feadff33f Bug 1545768 - Re-enable good text bounds for webrender. r=kats
This just reverts commit 580a7e38c60491123f3e7bba82904008ab0262d1.

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

--HG--
extra : moz-landing-system : lando
2019-05-07 11:20:34 +00:00
Jonathan Kew 6ca164fa73 Bug 1507744 - Respect word-break value set on an inline element. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D30174

--HG--
extra : moz-landing-system : lando
2019-05-07 09:47:52 +00:00
Botond Ballo 5101ae966a Bug 1516722 - Don't let ScrollToVisual clobber further layout scrolling in the same transaction. r=kats
Test coverage for this is provided in the web platform test
html/browsers/browsing-the-web/history-traversal/persisted-user-state-restoration/scroll-restoration-fragment-scrolling-samedoc.html.

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

--HG--
extra : moz-landing-system : lando
2019-05-07 03:03:56 +00:00
arthur.iakab e044816b6c Backed out 3 changesets (bug 1548118) for causing reftest failures on column-balancing-nested-001.html CLOSED TREE
Backed out changeset 516cc2c504f5 (bug 1548118)
Backed out changeset 40a074be8bf0 (bug 1548118)
Backed out changeset f3821529e276 (bug 1548118)
2019-05-07 05:41:24 +03:00
Ting-Yu Lin 0c3d6cd3a5 Bug 1548118 Part 3 - Always mark inner ColumnSetWrapper's children dirty before reflowing it if the outer ColumnSetWrapper is balancing. r=dbaron
ColumnSetFrame always tries to reflow column content regardless of it's
dirtiness. Making ColumnSetWrapperFrame's children dirty can have the
same effect.

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

--HG--
extra : moz-landing-system : lando
2019-05-06 23:09:35 +00:00
Ting-Yu Lin 7c9e81378c Bug 1548118 Part 2 - Extract computing column balancing depth logic to a function. r=dbaron
Differential Revision: https://phabricator.services.mozilla.com/D29434

--HG--
extra : moz-landing-system : lando
2019-05-03 19:25:57 +00:00
Ting-Yu Lin 1719001748 Bug 1548118 Part 1 - Advance the column count at the end of the while loop. r=dbaron
We use `columnCount == aConfig.mBalanceColCount - 1` in other places to
determine if we are at the last column. Advancing the column count at
the end of the loop make the condition consistent.

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

--HG--
extra : moz-landing-system : lando
2019-05-03 19:24:03 +00:00
Matt Woodrow e78cff4176 Bug 1548483 - Don't assert that we have an invalidated frame when we encouter a new displayport, since it can have changed on an earlier paint if we didn't have display items. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D29975

--HG--
extra : moz-landing-system : lando
2019-05-06 09:13:00 +00:00
Kartikaya Gupta c739ca6793 Bug 1062609 - Make scroll-behaviour test work with APZ enabled. r=botond
The test itself is reasonable, except that it reads scroll positions
from the main thread. With APZ enabled we need to flush any pending APZ
repaints before reading these scroll positions. So changing the
waitForAllPaints to the APZ-flushing variant makes that happen, and the
test passes.

Depends on D29921

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

--HG--
extra : moz-landing-system : lando
2019-05-06 17:50:14 +00:00
Miko Mynttinen 4818bf20d6 Bug 1546955 - Part 2: Make all display item constructors take nsDisplayListBuilder and frame as the first two parameters r=mattwoodrow
Depends on D28844

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

--HG--
extra : moz-landing-system : lando
2019-05-05 21:45:31 +00:00
Masayuki Nakano 780b285e68 Bug 1543315 - part 15: Mark PresShell::ScrollFrameRectIntoView() as MOZ_CAN_RUN_SCRIPT r=smaug
Unfortunately, `EventChainVisitor` does not grab the `nsPresContext` with
`RefPtr` by itself.  Therefore, there is no guarantee of the lifetime without
checking the origin when its subclasses are instantiated.  This patch changes
it and subclasses to `MOZ_STACK_CLASS` since only `EventDispatcher::Dispatch()`
creates them in the stack with given `nsPresContext`.  Additionally, it's
already been marked as MOZ_CAN_RUN_SCRIPT_BOUNDARY`.  Therefore, the
`nsPresContext` instance has already been guaranteed its lifetime by the
caller.  For making this fact stronger, this patch marks their constructors
as `MOZ_CAN_RUN_SCRIPT`.  Therefore, nobody can create those instances without
guaranteeing the lifetime of `nsPresContext` and `dom::Event`.  Note that
it may look like that `mPresContext` of `EventChainPostVisitor` is not
guaranteed.  However, `EventChainPreVisitor` which gives `nsPresContext` to it
is also a stack only class.  So, it won't be deleted before
`EventChainPostVisitor` instance.

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

--HG--
extra : moz-landing-system : lando
2019-05-06 13:57:46 +00:00
Ting-Yu Lin 7a98dbcd3e Bug 1548673 Part 3 - Rename nsBlockFrame's mPrefWidth to mCachedPrefISize. r=jfkthame
Like Part 2, I choose mCachedPrefISize because grid and flex container
are using it.

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

--HG--
extra : moz-landing-system : lando
2019-05-03 17:34:55 +00:00
Ting-Yu Lin 050bf09694 Bug 1548673 Part 2 - Rename nsBlockFrame's mMinWidth to mCachedMinISize. r=jfkthame
Instead of renaming it to mMinISize, I choose mCachedMinISize because
both grid and flex container frames use mCachedMinISize for similar
purpose.

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

--HG--
extra : moz-landing-system : lando
2019-05-03 17:34:46 +00:00
Ting-Yu Lin 63457d2b61 Bug 1548673 Part 1 - Rename NS_INTRINSIC_WIDTH_UNKNOWN to NS_INTRINSIC_ISIZE_UNKNOWN. r=jfkthame
This patch is generated by running the following script under layout/,
and then manually delete the FIXME comment in LayoutConstants.h

  #!/bin/bash
  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 NS_INTRINSIC_WIDTH_UNKNOWN NS_INTRINSIC_ISIZE_UNKNOWN

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

--HG--
extra : moz-landing-system : lando
2019-05-03 17:34:36 +00:00
Emilio Cobos Álvarez eced12d735 Bug 1548809 - Don't paint outlines for empty fragments of IB-splits. r=mats
Added a test to test the empty block (didn't submit to WPT because it's not
clear to me if the outlines of the two spans should form a single rect or not).

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

--HG--
extra : moz-landing-system : lando
2019-05-03 13:31:34 +00:00
Emilio Cobos Álvarez b3863ed908 Bug 1547792 - AspectRatio should be a single ratio, not a size. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D29244

--HG--
extra : moz-landing-system : lando
2019-05-02 23:28:21 +00:00
Masayuki Nakano c842b7b133 Bug 253889 - part 4: Finally, get rid of nsIPresShell r=emilio
And also this cleans up some legacy comments of PresShell users.

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

--HG--
extra : moz-landing-system : lando
2019-05-01 02:28:59 +00:00
Masayuki Nakano 1c74a4dc50 Bug 253889 - part 2: Move all methods and public structs of nsIPresShell into mozilla::PresShell r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D29311

--HG--
extra : moz-landing-system : lando
2019-05-01 02:27:53 +00:00
Noemi Erli f1ef21cbc7 Backed out changeset 8c89fd37b79d (bug 1544242) for failures in browser_rules_shadowdom_slot_rules.js CLOSED TREE 2019-05-01 22:03:06 +03:00
Emilio Cobos Álvarez fb5b637f4f Bug 1544242 - Fix selector-matching for nested pseudo-elements. r=heycam,mats
We always include the combinator for pseudo-elements now (not including it was
just an optimization) in order to not match when nested pseudo-elements are
involved.

We could add a more generic check in `matches_simple_selector` like:

```
if element.is_pseudo_element() {
    match *selector {
        Component::PseudoElement(..) |
        Component::NonTSPseudoClass(..) => {},
        _ => return false,
    }
}
```

But even that wouldn't be enough to make selectors like `:hover::marker` not
match on the `::before::marker` pseudo-element, plus that code is really hot.

So for now do the check on the `next_element_for_combinator` function. It's a
bit hacky but it's the best I could came up with...

While at it, simplify some checks to use is_pseudo_element() instead of
implemented_pseudo_element() directly.

Only the Rust patch as-is would make markers for ::before and ::after on list
items not show up, so we also need to switch ::marker to use ProbeMarkerStyle()
rather than ProbePseudoElementStyle(), since the marker should exist even if it
matches no rules.

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

--HG--
extra : moz-landing-system : lando
2019-05-01 17:19:08 +00:00
Andreea Pavel 4fea4aeb28 Merge mozilla-central to autoland. on a CLOSED TREE 2019-05-01 19:05:19 +03:00
Andreea Pavel accc389b66 Merge mozilla-inbound to mozilla-central. a=merge 2019-05-01 18:56:07 +03:00
Sylvestre Ledru e226046cb8 Bug 1547143 - Format the tree: Be prescriptive with the pointer style (left) r=Ehsan
# ignore-this-changeset

Depends on D28954

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

--HG--
extra : moz-landing-system : lando
2019-05-01 08:47:10 +00:00
Matt Woodrow 3fc4716479 Bug 1535945 - Don't skip invalidating frames when creating displayports for async scrollable ancestors. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D23816

--HG--
extra : moz-landing-system : lando
2019-05-01 04:23:07 +00:00
Emilio Cobos Álvarez edde08a7cb Bug 1547985 - Use rust types for vertical-align. r=mats
The previous commit removed the dependence on the discriminant value, so we
don't need to keep discriminants different from text-align anymore.

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

--HG--
extra : moz-landing-system : lando
2019-05-01 13:08:34 +00:00
Masayuki Nakano c2709a0087 Bug 1547535 - Move all a11y code in nsIPresShell to mozilla::PresShell r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D29196

--HG--
extra : moz-landing-system : lando
2019-04-30 07:53:20 +00:00
Masayuki Nakano 36e5df54ec Bug 1547621 - Move all inline methods of nsIPresShell into mozilla::PresShell r=smaug
And also this patch moves some related methods which use the inline methods
and member variables used only by them.

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

--HG--
rename : layout/base/nsIPresShellInlines.h => layout/base/PresShellInlines.h
extra : moz-landing-system : lando
2019-04-30 01:52:53 +00:00
Masayuki Nakano 2f69dfdd5d Bug 1547536 - Make PresShell QI-able for aware of do_QueryReferent() r=smaug
There is the following usage of nsIPresShell:
```
nsCOMPtr<nsIPresShell> presShell = do_QueryReferent(mPresShellWeak);
```

So, for changing this to:
```
RefPtr<PresShell> presShell = do_QueryReferent(mPresShellWeak);
```

PresShell should have its own IID.

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

--HG--
extra : moz-landing-system : lando
2019-04-30 00:56:14 +00:00
Masayuki Nakano f3bcf4c6d1 Bug 1547418 - Make CapturingContentInfo a private struct of PresShell and move APIs for it from nsIPresShell to PresShell r=smaug
`CapturingContentInfo` struct is used only in `PresShell.cpp` so that we can
make it a private struct of `PresShell` if we move all users of them,
i.e., API to access them, from `nsIPresShell` to `PresShell`.

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

--HG--
extra : moz-landing-system : lando
2019-04-30 00:26:57 +00:00
Masayuki Nakano bad5d5bfe9 Bug 1547416 - Move nsIPresShell::ScrollAxis to PresShellForwards.h r=smaug
`nsIPresShell::ScrollAxis` can be used anywhere and it's used by some
utils actually. So, it should be in `mozilla` namespace and perhaps,
 `PresShellForwards.h` is a good place to move it rather than creating
new header file.

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

--HG--
extra : moz-landing-system : lando
2019-04-30 00:07:49 +00:00
Daniel Holbert 0a3e6713c9 Bug 1546499: Downgrade nsVideoFrame's unexpected-child assertion. r=xidorn
Also, make the assertion shorter & more to the point. In particular,
I'm removing the note about stray whitespace, which is based on one
previous scenario that caused extra child frames; but I don't have
much confidence that potential future causes of this assertion-failure
will have that specific problem as their root cause.

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

--HG--
extra : moz-landing-system : lando
2019-04-23 20:28:52 +00:00
Sylvestre Ledru 96da5036ad Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-04-28 09:30:05 +00:00
Ting-Yu Lin c6cc9b8157 Bug 1547261 - Fix a typo in GetIntrinsicImageSize(). r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D29077

--HG--
extra : moz-landing-system : lando
2019-04-27 09:07:44 +00:00
Daniel Holbert 842b893fe3 Bug 1544121: Make size-contained replaced elements behave as if they had 0x0 intrinsic size and ratio. r=TYLin
Spec quote from https://drafts.csswg.org/css-contain/#containment-size :
"Replaced elements must be treated as having an intrinsic width and height of 0"

To achieve that, we just need to:
 (a) make all of these frame classes' GetPrefISize and GetMinISize methods return 0 if they're styled with contain:size.
 (b) make all of these frame classes' GetIntrinsicSize() and GetIntrinsicRatio() methods return 0,0.

In some cases, these methods are implemented in terms of common helper methods
(and sometimes member variables). For those cases, this patch adjusts the
helper methods (and variables) rather than the getters themselves.

Also: in one case (nsHTMLCanvasFrame), I needed to update its ComputeSize
method to remove a dependency on the "real" intrinsic size & ratio. I believe
the other classes' ComputeSize implementations do the right thing automatically
by sharing code & data with their intrinsic-size codepaths.

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

--HG--
rename : testing/web-platform/tests/media/white.webm => testing/web-platform/tests/css/css-contain/support/white.webm
extra : moz-landing-system : lando
2019-04-26 00:18:32 +00:00
Jonathan Kew cf7e9d4dd1 Bug 1546985 - Use JoinStyle::ROUND when stroking glyph outlines, to avoid artifacts at sharp corners. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D28855

--HG--
extra : moz-landing-system : lando
2019-04-26 15:21:19 +00:00
Emilio Cobos Álvarez fcded20df5 Bug 1547138 - followup: Let the compiler generate more IntrinsicSize functions as suggested by TYLin. 2019-04-26 02:18:42 +02:00
Emilio Cobos Álvarez 11ea945833 Bug 1546697 - Use a consistent style for enum classes in layout. r=dholbert
Per the discussion in:

  https://groups.google.com/d/msg/mozilla.dev.platform/P79pwa9z5m8/iPYPAWPHCAAJ

They should be CamelCase, and that's what most of them already do. This converts
the rest, which are a few.

For the ones that already used `e` or `k` prefixes, I've mostly done:

 for file in $(rg Type::e layout | cut -d : -f 1 | sort | uniq); do sed -i 's#Type::e#Type::#g' $file; done

For the ones that used uppercase, I've removed the prefix if it was already in
the type name, and turn them into CamelCase.

Depends on D28680

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

--HG--
extra : moz-landing-system : lando
2019-04-25 23:03:04 +00:00
Emilio Cobos Álvarez 6159d9a874 Bug 1546697 - Make BaselineSharingGroup an enum class. r=dholbert
It looked a bit weird when mixed up with the other enum classes I'm about to
rename.

Depends on D28679

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

--HG--
extra : moz-landing-system : lando
2019-04-25 22:42:13 +00:00
Emilio Cobos Álvarez 3e1e7ce302 Bug 1547138 - IntrinsicSize shouldn't use nsStyleCoord. r=dholbert
We have a better type to represent "a coord or nothing", and that's Maybe.

This code is shorter, and I think reads generally better / is less easy to
misuse.

I wrote this on top of bug 1547126 so there shouldn't be conflicts.

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

--HG--
extra : moz-landing-system : lando
2019-04-25 23:48:14 +00:00
Daniel Holbert 26a606eda1 Bug 1547126: Give nsIFrame::IntrinsicSize a convenience constructor that takes nscoord-valued width and height. r=TYLin
This patch shouldn't affect behavior; it's just simplifying existing code with
a new convenience constructor.

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

--HG--
extra : moz-landing-system : lando
2019-04-25 23:44:53 +00:00
Hiroyuki Ikezoe db7bfb0117 Bug 1546835 - Adjust start position of the target element as scroll offset in the scroll element. r=jfkthame
Depends on D28755

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

--HG--
extra : moz-landing-system : lando
2019-04-25 12:54:11 +00:00
Dorel Luca 00afc0acfa Backed out changeset bd68b6dfd83e (bug 1546985) for Reftest failures. CLOSED TREE 2019-04-26 01:13:56 +03:00
Jonathan Kew d877c4bb12 Bug 1546985 - Use JoinStyle::ROUND when stroking glyph outlines, to avoid artifacts at sharp corners. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D28855

--HG--
extra : moz-landing-system : lando
2019-04-25 17:34:52 +00:00
Masayuki Nakano 2933c032e7 Bug 1545342 - part 3: Move remaining public enum of nsIPresShell to mozilla namespace in mozilla/PresShellForwards.h and make them enum class r=smaug
This patch moves remaining public `enum` of `nsIPresShell` to `mozilla`
namespace in `mozilla/PresShellForwards.h` and make them `enum class`es.

Additionally, some methods which use the moving `enum`s from `nsIPresShell`
to `PresShell`.

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

--HG--
extra : moz-landing-system : lando
2019-04-25 05:04:23 +00:00
Masayuki Nakano 3622509485 Bug 1545342 - part 2: Make some public enum of nsIPresShell move to mozilla namespace and defined as enum class in PresShellForwards.h r=smaug
This patch moves some `enum` in `nsIPresShell` which are in public scope into
`mozilla` namespace and change them as `enum class`es.

Unfortunately, only "where to scroll" enum is just defines constants of
percentages of scroll destination.  Therefore, this patch makes only them
as `static const`.

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

--HG--
extra : moz-landing-system : lando
2019-04-25 05:04:15 +00:00
Masayuki Nakano 5932f01d53 Bug 1545342 - part 1: Create mozilla/PresShellForwards.h and move global enums/constants in nsIPresShell.h and mozilla/PresShell.h into the new one r=smaug
This patch creates new header, `mozilla/PresShellForwards.h`.  It should have
all forward declarations of global class/struct in `nsIPresShell.h` and
`mozilla/PresShell.h`.

Additionally, this moves all `enum`s and `constant`s in them into the new file
with changing them to `enum class`es.

This will make other headers which require only specific types in the header
files not include them.

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

--HG--
extra : moz-landing-system : lando
2019-04-25 05:02:20 +00:00
Ting-Yu Lin ee1f1f5d22 Bug 1546223 Part 5 - Change ReflowInput::InitConstraints() to use Maybe for containing block size. r=dholbert
There are some minor behavior changes come with this.

1) Change the default containing block size to (NS_UNCONSTRAINEDSIZE,
   NS_UNCONSTRAINEDSIZE). I think this is more reasonable than (-1, -1).

2) mContainingBlockSize is used to cache only the block size passing
   though constructor, Init(), or the invalid (-1, -1). This patch makes
   it cache the value computed by ComputeContainingBlockRectangle().

   Note that mContainingBlockSize is used only in
   nsTableWrapperFrame::InitChildReflowInput() to set the inner table
   frame's containing block to be the same as the outer table frame's.
   We don't change this behavior by caching more. Because even if the
   inner frame use the invalid cached (-1, -1) containing block size
   from the outer reflow input, it still computes the block size again
   in InitConstraints(). (Inner table's cb is the same as the outer
   table's per InitCBReflowInput().)

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

--HG--
extra : moz-landing-system : lando
2019-04-24 22:23:59 +00:00
Ting-Yu Lin 49cfcc232c Bug 1546223 Part 4 - Mechanically replace pointer with Maybe for ReflowInput's optional containing block size. r=dholbert
There's no behavior change in this patch.

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

--HG--
extra : moz-landing-system : lando
2019-04-24 17:35:31 +00:00
Ting-Yu Lin ee7ae91e94 Bug 1546223 Part 3 - Use in-class member initializer for some of the member variables. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D28438

--HG--
extra : moz-landing-system : lando
2019-04-24 17:35:31 +00:00
Ting-Yu Lin 77038b9a3a Bug 1546223 Part 2 - Use in-class member initializer for those which were in constructor body. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D28428

--HG--
extra : moz-landing-system : lando
2019-04-24 00:20:05 +00:00
Ting-Yu Lin 328026b148 Bug 1546223 Part 1 - Use in-class member initializer for those which were in initializer list. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D28427

--HG--
extra : moz-landing-system : lando
2019-04-24 17:35:05 +00:00
Ting-Yu Lin a3bbe609b6 Bug 1546223 Part 0 - Remove unused NOISY_VERTICAL_ALIGN. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D28429

--HG--
extra : moz-landing-system : lando
2019-04-24 17:35:05 +00:00
Hiroyuki Ikezoe 47d31247b1 Bug 1546057 - Use the clamped destination position for overflow checks. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D28578

--HG--
extra : moz-landing-system : lando
2019-04-24 21:56:26 +00:00
Brindusan Cristian b3b1ca15aa Merge mozilla-central to autoland. a=merge CLOSED TREE
--HG--
rename : dom/ipc/TabChild.cpp => dom/ipc/BrowserChild.cpp
rename : dom/ipc/TabParent.cpp => dom/ipc/BrowserParent.cpp
rename : dom/ipc/TabParent.h => dom/ipc/BrowserParent.h
2019-04-25 01:43:17 +03:00
Brindusan Cristian f92b05e5f0 Merge inbound to mozilla-central. a=merge
--HG--
rename : dom/ipc/TabParent.cpp => dom/ipc/BrowserParent.cpp
2019-04-25 00:54:01 +03:00
Emilio Cobos Álvarez 761f6c8751 Bug 1546739 - Fix detection of intrinsic size dependence of images. r=dholbert
Fixed width and height is not a strong enough condition.

min/max-width with intrinsic size keywords makes the final size of the image
also depend on the intrinsic size. Don't optimize away reflows when the
intrinsic size changes if they're used.

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

--HG--
extra : moz-landing-system : lando
2019-04-24 20:05:34 +00:00
Jeremy Chen e67424a97d Bug 1283222 - Do not record soft break opportunities for out-of-flow frames. r=emilio
We do want to record soft break opportunity after a frame whose content can't
be part of the existing in-flow text run, since this normally should be a text run
boundary. However, though an out-of-flow frame can't be part of the existing
in-flow text run, it also doesn't break it either. In fact, the texts after the
out-of-flow frames are able to continue the existing in-flow text run. So,
introducing a line-break-after opportunity in this case may cause an unexpected
line break for every out-of-flow frame.

In this patch, we add a condition to prevent us from recording soft break
opportunities for out-of-flow frames.

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

--HG--
extra : moz-landing-system : lando
2019-04-24 14:04:23 +00:00
Cosmin Sabou 5d756e5a09 Backed out 2 changesets (bug 1283222) for build bustages on nsLineLayout. CLOSED TREE
Backed out changeset fb82d1aa97d0 (bug 1283222)
Backed out changeset 093bf5cadbcc (bug 1283222)
2019-04-24 15:50:59 +03:00
Jeremy Chen a547906720 Bug 1283222 - Do not record soft break opportunities for out-of-flow frames. r=emilio
We do want to record soft break opportunity after a frame whose content can't
be part of the existing in-flow text run, since this normally should be a text run
boundary. However, though an out-of-flow frame can't be part of the existing
in-flow text run, it also doesn't break it either. In fact, the texts after the
out-of-flow frames are able to continue the existing in-flow text run. So,
introducing a line-break-after opportunity in this case may cause an unexpected
line break for every out-of-flow frame.

In this patch, we add a condition to prevent us from recording soft break
opportunities for out-of-flow frames.

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

--HG--
extra : moz-landing-system : lando
2019-04-24 12:25:25 +00:00
Daniel Holbert e6f89af496 Bug 1546210: Refactor nsHTMLCanvasFrame::ComputeSize to use existing helper functions and avoid redundant GetCanvasSize() call. r=TYLin
This patch should not affect behavior; the new implementation is
identical to the old one, but with better sharing of code.

Also: I'm removing the code-comment saying that the intrinsic ratio
is unused, because it's not really useful and it's unclear to me that
it's strictly true. There are several cases in the function we pass it
to, nsFrame::ComputeSizeWithIntrinsicDimensions, that use the ratio
and that look reachable as long as we have 'width:auto' in CSS.

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

--HG--
extra : moz-landing-system : lando
2019-04-23 04:20:20 +00:00
sotaro 601b513435 Bug 1543621 - Move Y flip handling to AsyncImagePipelineManager::ApplyAsyncImageForPipeline() r=nical
With webrender, current gecko does not handle SurfaceTexture.getTransformMatrix() yet. SurfaceTexture is used for video decoding and WebGL. On both usages, when getTransformMatrix() is not handled, it actually worked as bottom left origin. Then gecko need to ignore y flip. AsyncImagePipelineManager::ApplyAsyncImageForPipeline() is a good place to handle the situations, since it handles canvas and video frame rendering. Long term solution is going to be handled by Bug 1507076.

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

--HG--
extra : moz-landing-system : lando
2019-04-23 12:29:24 +00:00
Hiroyuki Ikezoe c29cf5f2aa Bug 1546038 - Include scroll-margin areas into snap area. r=botond
This patch also renames `targetRect` to `snapArea` to represent it more
accurately.

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

--HG--
extra : moz-landing-system : lando
2019-04-23 03:58:57 +00:00
Hiroyuki Ikezoe 7356d7a696 Bug 1544198 - Use the proper frame to get scroll-snap-type value on the root element. r=botond
Now scroll-snap-type property on body element doesn't affect scroll position
so that scrollTo-scrollBy-snaps.html is needed to be modified to specify
scroll-snap-type on html.

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

--HG--
extra : moz-landing-system : lando
2019-04-23 01:16:02 +00:00
Hiroyuki Ikezoe eb6519bbae Bug 1544198 - Split ScrolLFrameHelper::ComputeScrollSnapInto into two functions. r=botond
The one is for the scroll snap module v1 implementation, the other is for the
old scroll snap implementation.  Now both functions have the same pieces of
code to get scroll-snap-type values, but for v1 implemention in the next commit
we will use GetFrameForScrollSnap() to get the value instead.

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

--HG--
extra : moz-landing-system : lando
2019-04-23 01:12:38 +00:00
Hiroyuki Ikezoe 7b325b6485 Bug 1544198 - Factor out the function to get the frame for scroll-snap-type and scroll-padding. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D27985

--HG--
extra : moz-landing-system : lando
2019-04-23 01:12:24 +00:00
Hiroyuki Ikezoe dd202d6998 Bug 1544198 - Use the proper writing-mode for scroll-snap for viewport. r=jfkthame
In the CSS writing mode spec [1], the writing mode for the document should be
taken from body, GetFrameForDir() is the function to get the corresponding frame
for writing-mode.

A web platform test for this case will be added at the last of this commit
series.  Unfortunately as of this commit, we can't introduce proper test cases
since there is another issue on scroll-snap-type which will be fixed in
subsequent commits.

[1] https://drafts.csswg.org/css-writing-modes-4/#principal-flow

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

--HG--
extra : moz-landing-system : lando
2019-04-23 01:12:09 +00:00
Miko Mynttinen 84624b4a42 Bug 1540785 - Part 2: Devirtualize nsDisplayItemBase::GetPerFrameKey() r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D27580

--HG--
extra : moz-landing-system : lando
2019-04-22 19:58:01 +00:00
Miko Mynttinen f579c8f5c5 Bug 1540785 - Part 1: Introduce nsDisplayItemBase r=mattwoodrow
***

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

--HG--
extra : moz-landing-system : lando
2019-04-22 19:57:59 +00:00
Sylvestre Ledru a1dce6440a Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-04-22 16:35:03 +00:00
Ryan Hunt d6509bb237 Bug 1534395 - Rename TabChild to BrowserChild. r=nika
This commit renames TabChild to BrowserChild.

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

--HG--
rename : dom/base/InProcessTabChildMessageManager.cpp => dom/base/InProcessBrowserChildMessageManager.cpp
rename : dom/base/InProcessTabChildMessageManager.h => dom/base/InProcessBrowserChildMessageManager.h
rename : dom/ipc/TabChild.cpp => dom/ipc/BrowserChild.cpp
rename : dom/ipc/TabChild.h => dom/ipc/BrowserChild.h
extra : rebase_source : e7fcfb845a971a2760e73d517e24da18ce2551b5
extra : histedit_source : d1991334ccb107fe56e478865f22fd97b041a317
2019-04-09 17:39:01 -05:00
Srujana Peddinti b44e48bff4 Bug 1259660 - Moved mozilla::WidgetMosueEventBase::buttonType in MouseEvents.h to mozilla::MouseButton in EventForwards.h, and mozilla::WidgetMouseEventBase::buttonsFlag to mozilla::MouseButtonsFlag r=masayuki
Moved mozilla::WidgetMosueEventBase::buttonType in MouseEvents.h to mozilla::MouseButton in EventForwards.h, and mozilla::WidgetMouseEventBase::buttonsFlag to mozilla::MouseButtonsFlag so that any referer in header files do not need to include MouseEvents.h only for referring them. Instead, they just need to include EventForwards.h. Now when MouseEvents.h is changed, the rebuild speed becomes faster.

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

--HG--
extra : moz-landing-system : lando
2019-04-21 20:13:34 +00:00
Srujana Peddinti 5f185eb5aa Bug 1259660 - Cleaned up WidgetMouseEventBase by renaming WidgetMouseEventBase::button to WidgetMouseEventBase::mButton. r=masayuki
Renamed all class member instances from WidgetMouseEventBase::button to WidgetMouseEventBase::mButton.

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

--HG--
extra : moz-landing-system : lando
2019-04-21 18:17:10 +00:00
Ting-Yu Lin b18f4b64c3 Bug 1411422 - Make percentage block size children work without "height:100%" in ::-moz-column-set and ::-moz-column-content. r=dbaron
After introducing column-span, the ColumnSetWrapperFrame can have more
than one ColumnSetFrame children if there's any column-span:all child.
Thus we cannot use "height:100%" to pass block size information down to
the -moz-column-content's children.

Skip column span wrapper in nsIFrame::IsBlockWrapper() so that the
percentage column-span:all works.

Before this patch, the height of column contents are set to 100% of the
multicol container, so if the previous in-flows of column content
anonymous boxes consume all the height, later in-flows's height are all
0. In this patch, we don't restrict column-content's height, so their
height are calculated based on their children's height.
column-contain-1a.html passes because it can now correctly calculate the
union of all the column content's rect to find the correct sticky
positioning.

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

--HG--
extra : moz-landing-system : lando
2019-04-19 22:02:45 +00:00
Ting-Yu Lin 74149656b7 Bug 1545328 Part 7 - Fix a typo in FindBestBalanceBSize(). r=mats
Differential Revision: https://phabricator.services.mozilla.com/D28157

--HG--
extra : moz-landing-system : lando
2019-04-19 05:43:16 +00:00
Ting-Yu Lin 4319b2077b Bug 1545328 Part 6 - Mark some nsColumnSetFrame methods "const". r=mats
Also, move GetAvailableContentBSize() to non-public section because it's
only used by nsColumnSetFrame.

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

--HG--
extra : moz-landing-system : lando
2019-04-19 05:43:14 +00:00
Ting-Yu Lin de008d4346 Bug 1545328 Part 5 - Move "feasible" result into ColumnBalanceData, and make reflow methods return ColumnBalanceData. r=mats
ColumnBalanceData is reset in the beginning of ReflowChildren(), so I
make ReflowChildren() return a fresh ColumnBalanceData so that it's
easier (at least for me) to understand the data is recomputed in
every reflow iteration.

Also, FindBestBalanceBSize() uses ColumnBalanceData as an input to begin
its column balancing iteration. Make the argument pass by value so that
the caller's copy won't be modified.

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

--HG--
extra : moz-landing-system : lando
2019-04-19 05:43:04 +00:00
Ting-Yu Lin 8f603f3d9c Bug 1545328 Part 4 - Replace "height" with "block-size" in comments. r=mats
I manually search "height" and replace it with "block-size" if the code
around it uses logical coordinates.

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

--HG--
extra : moz-landing-system : lando
2019-04-19 05:43:00 +00:00
Ting-Yu Lin f8ad4e052f Bug 1545328 Part 3 - Stop exposing ClampUsedColumnWidth() in the header. r=mats
The static function is used only in nsColumnSetFrame's implementation.

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

--HG--
extra : moz-landing-system : lando
2019-04-19 05:42:56 +00:00
Ting-Yu Lin d66a448af7 Bug 1545328 Part 2 - Remove "virtual" keywords for methods that already have "override". r=mats
Differential Revision: https://phabricator.services.mozilla.com/D28010

--HG--
extra : moz-landing-system : lando
2019-04-19 05:42:46 +00:00
Ting-Yu Lin b37f9457e7 Bug 1545328 Part 1 - Change two FindBestBalanceBSize()'s arguments to be passed by value. r=mats
No code after FindBestBalanceBSize() is interested in
aUnboundedLastColumn and aRunWasFeasible, so they don't need to be
input/output arguments.

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

--HG--
extra : moz-landing-system : lando
2019-04-19 06:43:56 +00:00
Alexis Beingessner 72aa57aea1 Bug 1544895 - revert back to old bad bounds to pick lesser evil for now. r=kats
Differential Revision: https://phabricator.services.mozilla.com/D27965

--HG--
extra : moz-landing-system : lando
2019-04-18 13:03:28 +00:00
Markus Stange 1278948ebb Bug 1543944 - Don't mark nsDisplayVideo as opaque for now because we were using a rectangle that's too big. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D27979

--HG--
extra : moz-landing-system : lando
2019-04-18 17:22:29 +00:00
Andreea Pavel e5b695eefd Merge mozilla-inbound to mozilla-central. a=merge 2019-04-19 00:36:23 +03:00
Dan Glastonbury ea351adb8a Bug 1526972 - P8: Reset InInvalidSubtree when processing unrelated frames. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D26141

--HG--
extra : moz-landing-system : lando
2019-04-18 02:41:33 +00:00
Dan Glastonbury def88697c2 Bug 1526972 - P6: Mark invalidated SubDocument frame as modified. r=miko,mattwoodrow
Depends on D24463

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

--HG--
extra : moz-landing-system : lando
2019-04-18 02:38:24 +00:00
Dan Glastonbury d361d6bc8e Bug 1526972 - P1: Compress bool state into bit flags. r=miko
Also move to first cache-line (64-bytes) of nsDisplayItem to improve D-cache hit
when accessing mFrame, mItemFlags, etc.

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

--HG--
extra : moz-landing-system : lando
2019-04-18 02:38:13 +00:00
Mats Palmgren 1bbce77110 Bug 1544874 - Add missing baseline alignment for non-legacy ::marker boxes when aligning to a "block line". r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D27960

--HG--
extra : rebase_source : b92f1273fd048bbeaf9c19ce4688125853d7a974
2019-04-17 18:21:21 +02:00
Bogdan Tara a14816abd2 Merge mozilla-central to mozilla-inbound. a=merge CLOSED TREE 2019-04-18 00:49:46 +03:00
Brindusan Cristian 9d9534d1c9 Merge mozilla-central to inbound. a=merge CLOSED TREE 2019-04-17 18:57:51 +03:00
Daniel Holbert 5f53a9bcdf Bug 1544897: Add includes, forward declarations, and namespaces to address non-unified build bustage in layout/{base,build,generic}. r=TYLin
Differential Revision: https://phabricator.services.mozilla.com/D27782

--HG--
extra : moz-landing-system : lando
2019-04-16 21:18:30 +00:00
Mats Palmgren ee1194b0f1 Bug 1542441 - When we pull in floats from a prev-in-flow then move any next-in-flows of those that we own to our PushedFloat list. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D27388

--HG--
extra : rebase_source : da3b54e82ae89e159ed62911715c82cb5adfe4eb
2019-04-12 23:25:47 +02:00
Hiroyuki Ikezoe f8cdc44e28 Bug 1544325 - Clamp the app units' scroll position to the current position if the given scroll position is the same as the current scroll position in CSS pixels. r=botond
There are conditions that the given scroll position in app units differs from
the current position in app units even if those values are the same in CSS
pixels.  Setting Element.scrollTop with Element.scrollTop in a callback of
scroll event is one of such cases.

The change here looks messy, but I am totally unsure that we can clamp the
values before initializing the range for the DISABLE_SNAP case, so I'd like to
preserve the behavior there.  Once we ship the new scroll snap, we can drop
the DISABLE_SNAP case there so that it could be less messy at the time.

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

--HG--
extra : moz-landing-system : lando
2019-04-17 16:41:11 +00:00
Brian Grinstead c4fa4cfc0c Bug 1544322 - Part 4 - Remove the [type] attribute for multiline <script> tags loading files in /tests/SimpleTest/ r=bzbarsky
This is an autogenerated commit to handle scripts loading mochitest harness files, in
the case where the script src is on the line below the script tag.

This was generated with https://bug1544322.bmoattachments.org/attachment.cgi?id=9058170
using the `--part 4` argument.

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

--HG--
extra : moz-landing-system : lando
2019-04-16 04:01:46 +00:00
Brian Grinstead 911776d674 Bug 1544322 - Part 3 - Remove the [type] attribute for multiline <script> tags loading files in chrome://mochikit/content/ r=bzbarsky
This is an autogenerated commit to handle scripts loading mochitest harness files, in
the case where the script src is on the line below the script tag.

This was generated with https://bug1544322.bmoattachments.org/attachment.cgi?id=9058170
using the `--part 3` argument.

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

--HG--
extra : moz-landing-system : lando
2019-04-16 03:59:25 +00:00
Brian Grinstead ede8c44ef2 Bug 1544322 - Part 2.1 - Remove the [type] attribute for one-liner <script> tags loading files in /tests/SimpleTest/ in everything except for dom/ r=bzbarsky
This excludes dom/, otherwise the file size is too large for phabricator to handle.

This is an autogenerated commit to handle scripts loading mochitest harness files, in
the simple case where the script src is on the same line as the tag.

This was generated with https://bug1544322.bmoattachments.org/attachment.cgi?id=9058170
using the `--part 2` argument.

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

--HG--
extra : moz-landing-system : lando
2019-04-16 03:50:44 +00:00
Brian Grinstead 6515f97bcb Bug 1544322 - Part 1 - Remove the [type] attribute for one-liner <script> tags loading files in chrome://mochikit/content/ r=bzbarsky
This is an autogenerated commit to handle scripts loading mochitest harness files, in
the simple case where the script src is on the same line as the tag.

This was generated with https://bug1544322.bmoattachments.org/attachment.cgi?id=9058170
using the `--part 1` argument.

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

--HG--
extra : moz-landing-system : lando
2019-04-15 20:56:58 +00:00
Masayuki Nakano f5737567dd Bug 1544343 - part 3: Make layout use mozilla::PresShell instead of nsIPresShell as far as possible r=emilio
This patch changes remaining things under `layout/`.  However, there are some
places which still need to use `nsIPresShell`.  That will be fixed in a
follow up bug.

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

--HG--
extra : moz-landing-system : lando
2019-04-16 07:25:10 +00:00
Masayuki Nakano 2f9688c14e Bug 1544343 - part 2: Make factory methods take mozilla::PresShell instead of nsIPresShell r=emilio
Additionally, this patch makes `nsFrame.h` stop including `nsIPresShell.h`
and makes each users include `mozilla/PresShell.h` instead.  So, this improves
rebuild performance of `nsIPresShell.h` (and `mozilla/PresShell.h` in the
future).

Note that due to `nsIFrame::PresShell()`, `mozilla::` prefix is necessary for
`PresShell` in a lot of classes which are derived from `nsIFrame` even in
`.cpp` files.

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

--HG--
extra : moz-landing-system : lando
2019-04-16 07:24:49 +00:00
Alexis Beingessner 92010a39a6 Bug 1529992 - don't apply shadow adjustment to text bounds in gecko with WR r=mattwoodrow
And tell webrender to do them itself (they have fundamental mismatches in how they
define shadow bounds).

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

--HG--
extra : moz-landing-system : lando
2019-04-15 23:13:47 +00:00
Hiroyuki Ikezoe 8e33d53a3c Bug 1544060 - Bail out from ScrollFrameHelper::GetScrollPadding in the case where no corresponding frame exists. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D27423

--HG--
extra : moz-landing-system : lando
2019-04-15 21:15:53 +00:00
Hiroyuki Ikezoe b2485b123d Bug 1544060 - Use the root element's primary frame to get scroll-padding value. r=botond
Now the spec cleary says that we don't need to propagate body's
scroll-padding value to the document viewport since
https://github.com/w3c/csswg-drafts/issues/3740, so we don't need to care about
GetViewportScrollStylesOverrideElement() at all.

This change fixes the crash test case in this commit, but it's not sufficient.
In the next patch, we will fix another crash case.

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

--HG--
extra : moz-landing-system : lando
2019-04-15 21:15:58 +00:00
Emilio Cobos Álvarez 4093a2cb9e Bug 1543672 - The counters code should use atoms rather than strings. r=mats,boris
Servo already atomizes the counter names, it makes no sense to copy the string
rather than bumping the refcount.

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

--HG--
extra : moz-landing-system : lando
2019-04-15 20:11:45 +00:00
Daniel Varga e452ed972c Backed out 2 changesets (bug 1529992) for reftest failure at http://10.0.2.2:8854/tests/layout/reftests/bugs/1529992-1.html == http://10.0.2.2:8854/tests/layout/reftests/bugs/1529992-1-ref.html. On a CLOSED TREE
Backed out changeset 87b64e169b1b (bug 1529992)
Backed out changeset ddf29d68efb2 (bug 1529992)
2019-04-15 23:22:29 +03:00
Alexis Beingessner f901a109e4 Bug 1529992 - don't apply shadow adjustment to text bounds in gecko with WR r=mattwoodrow
And tell webrender to do them itself (they have fundamental mismatches in how they
define shadow bounds).

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

--HG--
extra : moz-landing-system : lando
2019-04-15 17:25:26 +00:00
Kartikaya Gupta 55677aa173 Bug 1543482 - Add the irregular-area flag for frames with masks and clip paths. r=mattwoodrow,botond
This will force APZ to do a main-thread hit-test for the cases where the
shapes are too complex to easily send to the compositor.

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

--HG--
extra : moz-landing-system : lando
2019-04-15 16:02:02 +00:00
Csoregi Natalia 612325227f Backed out 8 changesets (bug 1526972) for causing crashes (bug 1544406). a=backout
Backed out changeset 815543d81a1d (bug 1526972)
Backed out changeset a895c9028b31 (bug 1526972)
Backed out changeset 2ea2f8533078 (bug 1526972)
Backed out changeset 2fb940b13971 (bug 1526972)
Backed out changeset 8543b9d46521 (bug 1526972)
Backed out changeset ddd57e437228 (bug 1526972)
Backed out changeset 54b14df56e6f (bug 1526972)
Backed out changeset a59f06022a95 (bug 1526972)
2019-04-15 18:15:49 +03:00
Dan Glastonbury a114224ced Bug 1526972 - P8: Reset InInvalidSubtree when processing unrelated frames. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D26141

--HG--
extra : moz-landing-system : lando
2019-04-15 00:23:21 +00:00
Dan Glastonbury a161bca51c Bug 1526972 - P6: Mark invalidated SubDocument frame as modified. r=miko,mattwoodrow
Depends on D24463

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

--HG--
extra : moz-landing-system : lando
2019-04-15 00:23:17 +00:00
Dan Glastonbury a9319e3ae3 Bug 1526972 - P1: Compress bool state into bit flags. r=miko
Also move to first cache-line (64-bytes) of nsDisplayItem to improve D-cache hit
when accessing mFrame, mItemFlags, etc.

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

--HG--
extra : moz-landing-system : lando
2019-04-15 00:23:07 +00:00
Jonathan Kew 504abab69a Bug 1541959 - Allow full-width and/or full-size-kana values of text-transform to be combined with a case transformation. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D27402

--HG--
extra : moz-landing-system : lando
2019-04-14 11:06:41 +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 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
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
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
Botond Ballo d6bd83e7ed Bug 1513090 - Remove the HIDDEN_VIEWPORT_OVERFLOW_TYPE telemetry probe. r=kats
Differential Revision: https://phabricator.services.mozilla.com/D27635

--HG--
extra : moz-landing-system : lando
2019-04-16 17:39:57 +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
Emilio Cobos Álvarez c028706efc Bug 1541913 - Use Servo lengths for column-width. r=boris
Depends on D26154

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

--HG--
extra : moz-landing-system : lando
2019-04-04 18:29:57 +00:00
Miko Mynttinen 5463d7f522 Bug 1536423 - Remove SVGCharClipDisplayItem r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D26191

--HG--
extra : moz-landing-system : lando
2019-04-04 18:04:49 +00:00
Mike Conley b3ad5c304f 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-04 15:06:30 +00:00
Emilio Cobos Álvarez 68aa7a9c80 Bug 1541546 - Use only the new name for StyleColor. r=heycam
That is, change all uses of StyleComplexColor to just StyleColor.

Differential Revision: https://phabricator.services.mozilla.com/D25977
2019-04-04 14:53:47 +02:00
Cosmin Sabou 8731816b89 Backed out 3 changesets (bug 1541546) for causing build bustages. CLOSED TREE
Backed out changeset 895863144707 (bug 1541546)
Backed out changeset 4da6fb98e8f9 (bug 1541546)
Backed out changeset ba71816514eb (bug 1541546)

--HG--
rename : layout/style/StyleColor.cpp => layout/style/StyleComplexColor.cpp
rename : layout/style/StyleColorInlines.h => layout/style/StyleComplexColor.h
2019-04-04 15:04:25 +03:00
Emilio Cobos Álvarez 271376a85f Bug 1541546 - Use only the new name for StyleColor. r=heycam
That is, change all uses of StyleComplexColor to just StyleColor.

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

--HG--
rename : layout/style/StyleComplexColor.cpp => layout/style/StyleColor.cpp
rename : layout/style/StyleComplexColor.h => layout/style/StyleColorInlines.h
extra : moz-landing-system : lando
2019-04-04 11:35:33 +00:00
Jonathan Kew 224d07137d Bug 1479760 - Use the ::selection colors to paint inactive as well as active selections. r=emilio
This will enable the devtools font highlighting issue in bug 1479760 to be fixed
using ::selection, and matches webkit/blink behavior.

When we implement ::inactive-selection (bug 1475773) it will supersede this.

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

--HG--
extra : moz-landing-system : lando
2019-04-04 09:17:25 +00:00
Masayuki Nakano 5e41233499 Bug 1540990 - Get rid of unnecessary nsIPresShell.h inclusions r=emilio
A lot of files include `nsIPresShell.h` even though currently they don't
need it.  This patch removes the unnecessary inclusions.

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

--HG--
extra : moz-landing-system : lando
2019-04-04 00:19:48 +00:00
Razvan Maries 1cd564b971 Backed out changeset 3b94c20ba873 (bug 1540990) for build bustages. CLOSED TREE 2019-04-04 02:44:00 +03:00
Masayuki Nakano b2bba953cc Bug 1540990 - Get rid of unnecessary nsIPresShell.h inclusions r=emilio
A lot of files include `nsIPresShell.h` even though currently they don't
need it.  This patch removes the unnecessary inclusions.

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

--HG--
extra : moz-landing-system : lando
2019-04-03 23:29:38 +00:00
Dorel Luca 652a1d165f Backed out changeset ba0820e380a3 (bug 1540150) for Mochitest failures in layout/generic/test/test_bug496275.html. CLOSED TREE 2019-04-03 19:29:06 +03:00
Mike Conley f862af9fde 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-03 14:20:04 +00:00
Masayuki Nakano 9165a150a1 Bug 1540930 - Make nsPresContext use mozilla::PresShell directly rather than via nsIPresShell r=emilio
`nsPresContext` should use `mozilla::PresShell` directly instead of
`nsIPresShell`.  This patch makes it.

Unfortunately, `nsPresContext` and `nsIFrame` have `PresShell()`.  Therefore,
we cannot use `PresShell*` in its methods so that this patch uses `mozilla::`
namespace prefix.

It might be better to rename them as `PresShellPtr()` in another bug.

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

--HG--
extra : moz-landing-system : lando
2019-04-03 12:40:26 +00:00
Masayuki Nakano daafebb174 Bug 1540927 - part 1: Make nsFrameSelection treat mozilla::PresShell directly rather than via nsIPresShell r=smaug
This patch makes `nsFrameSelection` treat `mozilla::PresShell` directly and
rename `nsFrameSelection::GetShell()` to `nsFrameSelection::GetPresShell()
because of avoiding confusion between `PresShell` vs. `DocShell`.

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

--HG--
extra : moz-landing-system : lando
2019-04-03 07:53:16 +00:00
Daniel Holbert b0da9aaf64 Bug 1541137: Add missing includes/namespaces/decls to fix non-unified build bustage in layout/generic. r=boris
Differential Revision: https://phabricator.services.mozilla.com/D25823

--HG--
extra : moz-landing-system : lando
2019-04-02 20:06:52 +00:00
Jeff Gilbert 373563b0ec Bug 1540357 - Fix implicit int conversions in dom/canvas's layout/* includes. r=dholbert
nsUnicodeProperties.h includes into ICU, which has implicit int
truncation, so quarantine this include out of problematic headers.

Depends on D25498

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

--HG--
extra : moz-landing-system : lando
2019-04-02 17:00:49 +00:00
Matt Woodrow 52f583d371 Bug 1539673 - Don't build normal items when within opacity:0. r=miko
Differential Revision: https://phabricator.services.mozilla.com/D25168

--HG--
extra : moz-landing-system : lando
2019-04-01 16:53:34 +00:00
Matt Woodrow d99a15fae2 Bug 1539673 - Support fallible display item construction. r=miko
Differential Revision: https://phabricator.services.mozilla.com/D25167

--HG--
extra : moz-landing-system : lando
2019-04-01 16:53:11 +00:00
Emilio Cobos Álvarez 19c116ce06 Bug 1537575 - Cleanup generic font-family handling. r=jfkthame
To be more similar between Rust and C++. This introduces GenericFontFamily and
exposes that plus FontFamilyNameSyntax to C++, using that where appropriate
instead of plain uint8_t as we were doing.

As a follow-up, as discussed on IRC with Jonathan, we can remove the -moz-fixed
family, and turn it just into an alias of Monospace.

The only non-trivial change is the MatchType changes, but they're ok I think.
The code already assumed at most one CSS generic, and the struct still takes 8
bits. I've verified that the relevant tests are passing (though try is closed).

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

--HG--
extra : moz-landing-system : lando
2019-04-01 21:47:59 +00:00
arthur.iakab cd473e09f4 Backed out 3 changesets (bug 1537594, bug 1537575) for causing build bustages on mathml/nsMathMLChar.cpp CLOSED TREE
Backed out changeset 7375a830b5ef (bug 1537594)
Backed out changeset 0cd1411e2fb3 (bug 1537575)
Backed out changeset c7565f50239a (bug 1537575)
2019-04-01 23:41:04 +03:00
Emilio Cobos Álvarez 2188b25101 Bug 1537575 - Cleanup generic font-family handling. r=jfkthame
To be more similar between Rust and C++. This introduces GenericFontFamily and
exposes that plus FontFamilyNameSyntax to C++, using that where appropriate
instead of plain uint8_t as we were doing.

As a follow-up, as discussed on IRC with Jonathan, we can remove the -moz-fixed
family, and turn it just into an alias of Monospace.

The only non-trivial change is the MatchType changes, but they're ok I think.
The code already assumed at most one CSS generic, and the struct still takes 8
bits. I've verified that the relevant tests are passing (though try is closed).

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

--HG--
extra : moz-landing-system : lando
2019-04-01 18:48:10 +00:00
Emilio Cobos Álvarez 50f8f6a6d3 Bug 1540180 - The role of a broken input[type="image"] doesn't depend on its display value. r=surkov,eeejay
Differential Revision: https://phabricator.services.mozilla.com/D25517

--HG--
extra : moz-landing-system : lando
2019-04-01 18:51:14 +00:00
Cosmin Sabou fd7ed41616 Backed out changeset 59e4bc8fa1ba (bug 1479760) for reftest failures on rtl-selection-with-decoration.html. CLOSED TREE 2019-04-01 20:32:15 +03:00
Jonathan Kew a978a2a32d Bug 1533428 - patch 2 - Move the Orientation enum from gfxFont to nsFontMetrics to enable some #include-elimination, in particular to avoid including gfxTextRun.h in nsFontMetrics.h. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D22913

--HG--
extra : moz-landing-system : lando
2019-04-01 14:32:19 +00:00
Jonathan Kew c671cf4509 Bug 1533395 - Refactor gfxTextRange struct, moving the MatchType enum to gfxTypes.h as FontMatchType, and the struct inside gfxFontGroup as a local type. r=jwatt
This allows us to reduce #include usage of the massive gfxFont.h header,
and keeps this specialized kind of TextRange struct local to where it's used.

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

--HG--
extra : moz-landing-system : lando
2019-04-01 14:32:06 +00:00
Jonathan Kew 4f167fbdae Bug 1479760 - Use the ::selection colors to paint inactive as well as active selections. r=emilio
This will enable the devtools font highlighting issue in bug 1479760 to be fixed
using ::selection, and matches webkit/blink behavior.

When we implement ::inactive-selection (bug 1475773) it will supersede this.

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

--HG--
extra : moz-landing-system : lando
2019-04-01 13:02:39 +00:00
Sylvestre Ledru ef0bfc3822 Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-03-31 15:12:55 +00:00
Mats Palmgren 8166e09775 Bug 1540198 - [DEBUG] Assert that the child frames have the correct parent pointer in SetInitialChildList. r=TYLin
Differential Revision: https://phabricator.services.mozilla.com/D25434

--HG--
extra : rebase_source : defd00e62dc90e316cb12c67521951a1e5892489
2019-03-29 18:34:17 +01:00