Commit Graph

1130 Commits

Author SHA1 Message Date
Cameron McCormack
17ce17ad00 Bug 1504034 - Part 3: Store the Rust QuotePair slice as the computed quotes value in Gecko style structs r=emilio
Depends on D10651

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

--HG--
extra : moz-landing-system : lando
2018-11-06 23:03:24 +00:00
Emilio Cobos Álvarez
c52a218234 Bug 1504078 - Use references in the shapes code. r=bradwerth,TYLin
It doesn't make much sense to return const UniquePtr<Foo>& for something that
can't be null, it's just confusing.

Also make more stuff actually const.

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

--HG--
extra : moz-landing-system : lando
2018-11-02 18:19:06 +00:00
Boris Chiou
e3e3d6b80a Bug 1500627 - Fix some potential bugs of sizing properties for keywords in the block axis r=mats
1. Drop {Width|MinWidth|MaxWidh}DependsOnContainer() and
   {Height|MinHeight|MaxHeight}DependsOnContainer() because they are bogus
   after introducing the writing mode. Dropping these functions needs
   update nsLineLayout because it is the only one who still use
   these functions.
2. There are still some potential assertions and bugs on handling keywords
   in the block size, so we should update them as well.

Depends on D9438

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

--HG--
extra : moz-landing-system : lando
2018-10-29 22:56:42 +00:00
Boris Chiou
04b273259e Bug 1496619 - part 6: Generate StyleTimingFunction and drop ns_timing_function.rs r=emilio,birtles
First, we generate StyleComputedTimingFunction by cbindgen from Rust, and use
it in nsTimingFunction, so we could copy it directly without handling
the different memory layout. However, we have to rewrite the
nsTimingFunction and mozilla::ComputedTimingFunction for this.

Second, the rust-bindgen seems cannot generate the correct generic members
from complex C++ templates, especially for the nested template struct,
(https://github.com/rust-lang-nursery/rust-bindgen/issues/1429)
So we have to hide StyleTimingFunction to avoid the compilation errors.

Depends on D9312

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

--HG--
extra : moz-landing-system : lando
2018-10-26 18:03:35 +00:00
Boris Chiou
adff31eff9 Bug 1496619 - Part 1: Drop frames() timing function r=birtles
frames() timing function was removed from the spec, so we drop it.
Besides, some devtool tests are removed because they use frame(). I will
add them back by using new step function later.

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

--HG--
extra : moz-landing-system : lando
2018-10-26 18:03:24 +00:00
Emilio Cobos Álvarez
449b22d059 Bug 1500885 - mTextAlignTrue / mTextAlingLastTrue are write-only. r=mats
They were added in bug 929991, but there's no text-align: true anymore.

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

--HG--
extra : moz-landing-system : lando
2018-10-22 15:14:42 +00:00
tb120
e996e1e744 Convert NS_STYLE_ANIMATION_PLAY_STATE_* to scoped enum StyleAnimationPlayState (Bug 1500439) r=emilio
This change removes directives NS_STYLE_ANIMATION_PLAY_STATE_* and replaces the values with those from a scoped enum called StyleAnimationPlayState.

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

--HG--
extra : moz-landing-system : lando
2018-10-22 21:58:01 +00:00
Emilio Cobos Álvarez
3e017e39de Bug 1499991 - Ensure no-op will-change changes also get reflected in the change hint. r=heycam,firefox-style-system-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D9073

--HG--
extra : moz-landing-system : lando
2018-10-18 07:53:11 +00:00
Emilio Cobos Álvarez
18d458ee42 Bug 1499863 - Honor will-change: position dynamic changes. r=dbaron
Differential Revision: https://phabricator.services.mozilla.com/D9032

--HG--
extra : moz-landing-system : lando
2018-10-17 22:13:51 +00:00
Cameron McCormack
eeb8da104f Bug 1495994 - Part 4: Merge css::{URLValueData, ImageValue} into css::URLValue r=emilio
Depends on D7595

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

--HG--
extra : moz-landing-system : lando
2018-10-10 02:58:20 +00:00
Emilio Cobos Álvarez
5c40ac23c9 Bug 1496014 - Fix shape-outside invalidation. r=dbaron
It's not really invalidated anywhere, and the float manager code only checks for
float region changes. Extend it so that it knows about shapes as well, and avoid
reframing due to a bogus nsChangeHint_ScrollbarChange which really meant to be
UpdateOverflow, which really is useless in this situation..

Differential Revision: https://phabricator.services.mozilla.com/D7583
2018-10-10 01:33:17 +02:00
Cameron McCormack
4372b55f4f Bug 1495645 - Move css::ImageValue::mRequests into a global table managed by css::ImageLoader r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D7383

--HG--
extra : moz-landing-system : lando
2018-10-04 00:20:50 +00:00
Cameron McCormack
61c7fc41f4 Bug 1495353 - Remove unused css::URLValueData::MightHaveRef r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D7260

--HG--
extra : moz-landing-system : lando
2018-10-01 07:42:05 +00:00
Jonathan Watt
8c224bc9d8 Bug 1494321 p2. Stop doing wasteful pre/post-effects work for frames with just a clip-path or mask applied. r=miko
Differential Revision: https://phabricator.services.mozilla.com/D6924

--HG--
extra : rebase_source : 426e4b6d854644db1524d235651667e23d9c4908
2018-08-28 21:51:23 +01:00
Daniel Holbert
be1cca8ee2 Bug 1490432: Add namespace prefix for one usage of "css::URLValueData" type in nsStyleStruct.cpp, to fix build error in non-unified builds. r=TYLin
Differential Revision: https://phabricator.services.mozilla.com/D5568

--HG--
extra : moz-landing-system : lando
2018-09-11 21:37:06 +00:00
Brad Werth
15674b4d46 Bug 1434963 Part 3: Remove style struct mutation in nsStyleDisplay::FinishStyle. r=emilio
Depends on D5341

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

--HG--
extra : moz-landing-system : lando
2018-09-11 18:11:19 +00:00
Emilio Cobos Álvarez
07c734225f Bug 1490311 - Remove some other unused constructors / setters. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D5545
2018-09-11 20:08:23 +02:00
Emilio Cobos Álvarez
4f5102032f Bug 1490311 - Remove useless nsStyleFont constructor. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D5533
2018-09-11 20:08:20 +02:00
Emilio Cobos Álvarez
e1f2213a03 Bug 1490311 - Remove unused nsStyleFont::{EnableZoom, UnZoomText}. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D5530
2018-09-11 20:08:19 +02:00
Xidorn Quan
cb750b30ec Bug 1486252 - Resolve mask-image url value as an image even if it contains reference. r=heycam
The corresponding handling code in the old style system can be found in:
https://dxr.mozilla.org/mozilla-esr60/rev/dd52b41d2b775e5c7261ce52795268b7670635fc/layout/style/nsCSSDataBlock.cpp#65-106

mask-iage-url-hash.html is the test that don't pass without this change.

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

--HG--
extra : source : 6676693e3df3abe237494beed786153aeda44e79
2018-09-04 09:35:56 +10:00
Dorel Luca
298b74c266 Backed out changeset a0621cac7491 (bug 1486252) for wpt failures on /css/css-masking/mask-image/mask-image-url-remote-mask.html 2018-09-03 07:15:08 +03:00
Xidorn Quan
5f974d420f Bug 1486252 - Resolve mask-image url value as an image even if it contains reference. r=heycam
The corresponding handling code in the old style system can be found in:
https://dxr.mozilla.org/mozilla-esr60/rev/dd52b41d2b775e5c7261ce52795268b7670635fc/layout/style/nsCSSDataBlock.cpp#65-106

mask-iage-url-hash.html is the test that don't pass without this change.

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

--HG--
extra : rebase_source : 94148470e6f242f16ce2d582cb81ec1200c4a4d5
extra : source : a80ec5b139024307cf93053a8cfd38cd26a86629
2018-09-03 13:24:16 +10:00
Dorel Luca
b2e2a93ed8 Backed out changeset 991f66df3251 (bug 1486252) for eslint failure. CLOSED TREE 2018-09-03 05:12:22 +03:00
Xidorn Quan
1f1e9d35b0 Bug 1486252 - Resolve mask-image url value as an image even if it contains reference. r=heycam
The corresponding handling code in the old style system can be found in:
https://dxr.mozilla.org/mozilla-esr60/rev/dd52b41d2b775e5c7261ce52795268b7670635fc/layout/style/nsCSSDataBlock.cpp#65-106

mask-iage-url-hash.html is the test that don't pass without this change.

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

--HG--
extra : moz-landing-system : lando
2018-09-03 01:02:04 +00:00
Nicholas Nethercote
2fcd08a173 Bug 1486690 - Rename NS_str{,}dup and remove unnecessary checks after calls to them. r=glandium
The 'x' prefix makes it clearer that these are infallible.

A couple of nsJSID methods are now also infallible.

--HG--
extra : rebase_source : fcce44a00212d6d341afbf3827b31bd4f7355ad5
2018-08-28 15:58:54 +10:00
Boris Chiou
cc2e8fb329 Bug 1429298 - Part 6: Apply motion path transform matrix. r=nical
We implement the layout part of offset-path. Now we don't have
offset-distance, so use the default value, 0%, for it.

Note: rename mCombinedTransform as mIndividualTransform, which only
stores the combined individual transforms. We apply the individual
transforms, motion path transform, and specified transform in
ReadTransforms. (We have to follow the order, so we don't combine the
specified transform in FinishStyle.)

Differential Revision: https://phabricator.services.mozilla.com/D2968
2018-08-21 22:41:44 -07:00
Boris Chiou
a8bd6dfc8a Bug 1429298 - Part 2: Define offset-path and implement it in style system. r=emilio
Define OffsetPath & SVGPathData on the servo-side, and StyleMotion &
StyleSVGPath on the gecko-side. We parse the SVG Path string into a
vector of PathCommand. To build the gfx::Path, we will convert it into
gfx::Path later in a different patch.

The basic flow is:
* Parse SVG Path String into SVGPathData (in Rust).
* Use cbindgen to make sure the layout of PathCommand and StylePathCommand,
  and then set the Box[PathCommand] into nsTArray<StylePathCommand>.
* Try to convert nsTArray<StylePathCommand> into gfx::Path. (This part
  will be implemented in a different patch.)

Finally, we use the gfx::Path to create a motion path transform.
The layout implementation is in the later patch.

Differential Revision: https://phabricator.services.mozilla.com/D2963
2018-08-21 22:41:38 -07:00
Xidorn Quan
464ef30ab4 Bug 1475033 part 3 - Add scrollbar-width property. r=heycam
MozReview-Commit-ID: CmCbaZosUrU

--HG--
extra : rebase_source : 85136c729524fdd8b9cdfcbf30e2bb35accd0d4a
2018-08-01 14:13:41 +10:00
Xidorn Quan
ed1e3e1f9e Bug 1475033 part 1 - Rename nsChangeHint_CSSOverflowChange to nsChangeHint_ScrollbarChange. r=heycam
Prepare for scrollbar-width which should trigger the same kind of change.

MozReview-Commit-ID: 1n9Y9bobBkJ

--HG--
extra : rebase_source : 520b78dec4daca5050e0cc7fff4ec68fa36663c5
2018-08-03 16:42:33 +10:00
Xidorn Quan
33b8a6dacd Bug 1483090 - Rename StyleUserInterface to StyleUI. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D3276

--HG--
extra : moz-landing-system : lando
2018-08-14 08:37:37 +00:00
Boris Chiou
094fddc2b9 Bug 1480649 - Use union to wrap different shape-like types. r=xidorn
1. We will add more shape-like types in the future, so it's better to
   use union to reduce the memory usage.
2. Those shape-like types are mutual exclusive, so we could use union to
   wrap them.

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

--HG--
extra : moz-landing-system : lando
2018-08-07 07:56:01 +00:00
Hiroyuki Ikezoe
66cfd53581 Bug 1478643 - Introduce a new change hint set for added or removed transform style. r=birtles
MozReview-Commit-ID: GfK1e5QaOu6

--HG--
extra : rebase_source : c6e28e7fabb43f54d04e756865a652fc4752ce30
2018-07-30 10:51:18 +09:00
Emilio Cobos Álvarez
517256e365 Bug 1478391: Autogenerate StyleAppearance. r=jwatt
This builds on bug 1428676 and introduces StyleAppearance, which replaces the
NS_THEME_* constants.

Really sorry for the size of the patch.

There's a non-trivial change in the gtk theme, which I submitted separately as
bug 1478385.

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

MozReview-Commit-ID: DiSmMWK7Krp
2018-07-26 17:06:17 +02:00
Ting-Yu Lin
222d82f138 Bug 1477533 - Convert NS_STYLE_COLUMN_SPAN_* to an enum class. r=heycam
MozReview-Commit-ID: F8M1DlpBop2

--HG--
extra : rebase_source : f98d97be38c6f2a8b3cf6624db3df15389cb0123
2018-07-21 19:53:44 -07:00
Ting-Yu Lin
a6015f5b37 Bug 1477533 - Convert NS_STYLE_COLUMN_FILL_* to an enum class. r=heycam
I put Balance as the first item in StyleColumnFill because it is the default
value.

MozReview-Commit-ID: A4DVMLL6XBa

--HG--
extra : rebase_source : 8c8d07b724bcd49dd4f4057fcbf0ccd46ed591ff
2018-07-21 12:00:26 -07:00
Ting-Yu Lin
582327218e Bug 1477533 - Use static const class variable to represent column-count: auto. r=heycam
NS_STYLE_COLUMN_COUNT_UNLIMITED is unused, so I remove it.

MozReview-Commit-ID: HLHLn9ZbkUY

--HG--
extra : rebase_source : 9bf00e1db00051c4454719e205633717fabde050
2018-07-20 17:09:31 -07:00
Dan Glastonbury
c9c954a337 Bug 1467622 - P1: nsStyleSVGPaint - Change nscolor to StyleComplexColor. r=xidorn
MozReview-Commit-ID: 1bbQzOoOuBe

--HG--
extra : rebase_source : 1631a71a78b0e6fbc4842ee14e11e946a5063afa
2018-06-27 17:07:37 +10:00
Brindusan Cristian
232d35f4b9 Backed out 5 changesets (bug 1467622) for reftest failures on layout/reftests/svg/smil/style/anim-css-fill-1-from-by-curcol-hex.svg. CLOSED TREE
Backed out changeset 8694fe928b04 (bug 1467622)
Backed out changeset 74533cad9479 (bug 1467622)
Backed out changeset e1dbee410e98 (bug 1467622)
Backed out changeset 56142038cc7f (bug 1467622)
Backed out changeset 90cede21bad1 (bug 1467622)
2018-07-11 09:37:26 +03:00
Dan Glastonbury
0a83cfb70f Bug 1467622 - P1: nsStyleSVGPaint - Change nscolor to StyleComplexColor. r=xidorn
MozReview-Commit-ID: 1bbQzOoOuBe

--HG--
extra : rebase_source : 879e7d644f1dc3873cdfb352fce21e3d085db55a
2018-06-27 17:07:37 +10:00
Matt Woodrow
7391f4b580 Bug 1467688 - Make sure we invalidate for perspective changes even if the frame isn't otherwise transformed. r=dbaron
MozReview-Commit-ID: JQGb41kp76P

--HG--
extra : rebase_source : f9105e949f8fa02697a94718ea69742ac115f8e6
2018-07-02 21:35:14 -04:00
Ciure Andrei
a43e1b09ad Backed out 1 changesets (bug 1467688) for reftest failures crashtests/1467688.html CLOSED TREE
Backed out changeset b976829f826a (bug 1467688)
2018-07-03 01:55:17 +03:00
Matt Woodrow
dc37a6b69c Bug 1467688 - Make sure we invalidate for perspective changes even if the frame isn't otherwise transformed. r=dbaron
MozReview-Commit-ID: DpND8Jwr226

--HG--
extra : rebase_source : c6f51b9e8f91978a1783eb27de5ca89f75a3f2a5
2018-07-02 17:46:10 -04:00
Emilio Cobos Álvarez
fac54cd7df Bug 1472443: Make StyleContentType an enum class. r=xidorn
Most of it is automated by:

  %s/eStyleContentType_/StyleContentType::/g
  %s/nsStyleContentType/StyleContentType/g

But I removed some parentheses by hand.

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

MozReview-Commit-ID: 3IcirjIYX5p
2018-06-30 17:13:07 +02:00
Chris Peterson
2afd829d0f Bug 1469769 - Part 6: Replace non-failing NS_NOTREACHED with MOZ_ASSERT_UNREACHABLE. r=froydnj
This patch is an automatic replacement of s/NS_NOTREACHED/MOZ_ASSERT_UNREACHABLE/. Reindenting long lines and whitespace fixups follow in patch 6b.

MozReview-Commit-ID: 5UQVHElSpCr

--HG--
extra : rebase_source : 4c1b2fc32b269342f07639266b64941e2270e9c4
extra : source : 907543f6eae716f23a6de52b1ffb1c82908d158a
2018-06-17 22:43:11 -07:00
Hiroyuki Ikezoe
fbf7fab2f3 Bug 1430884 - Throttle transform animations without %0 or 100% keyframe. r=birtles
MozReview-Commit-ID: 3vLAlSkLz97

--HG--
extra : rebase_source : 7a82246699f3858757dce887e0d2154d165c0da1
2018-06-25 18:29:28 +09:00
Margareta Eliza Balazs
e1ea59be60 Backed out 9 changesets (bug 1430884) for frequently failing dom/animation/test/mozilla/test_restyles.html on android-em-4-3-armv7-api16 debug
Backed out changeset 262dbc8daac1 (bug 1430884)
Backed out changeset c3f9f3f66a98 (bug 1430884)
Backed out changeset 39e1c4e3c8c9 (bug 1430884)
Backed out changeset 4505e3f87b2e (bug 1430884)
Backed out changeset e7e8977e0e92 (bug 1430884)
Backed out changeset 6dbae2b8957d (bug 1430884)
Backed out changeset 1e047fbcae2a (bug 1430884)
Backed out changeset 52be07f10eaa (bug 1430884)
Backed out changeset cec68a5b01da (bug 1430884)

--HG--
extra : rebase_source : 9877dce2438d42eca99898b22c95ecc04dbd748f
2018-06-25 12:23:59 +03:00
Hiroyuki Ikezoe
f6072c5630 Bug 1470792 - Backout the changeset that introduced UpdateContainingBlock change hint for mask changes. r=heycam
MozReview-Commit-ID: JF88VkutUgG

--HG--
extra : rebase_source : fbfebc74ae874c977a91c9e48c962c951d4f43e3
2018-06-25 15:42:38 +09:00
Hiroyuki Ikezoe
6d104540fb Bug 1430884 - Throttle transform animations without %0 or 100% keyframe. r=birtles
MozReview-Commit-ID: 3vLAlSkLz97

--HG--
extra : rebase_source : 424a94ace113c3383fd91300802973ba60da5f7d
2018-06-25 11:51:06 +09:00
Andi-Bogdan Postelnicu
e91a057f78 Bug 1453795 - Layout/Style - Initialize member fields in classes/ structures. r=heycam 2018-06-14 12:54:03 +03:00
Dan Glastonbury
7a5cb13bc2 Bug 1467379 - P1: nsStyleGradientStop - Change nscolor to StyleComplexColor. r=xidorn
MozReview-Commit-ID: D9KQcv9uQ4S

--HG--
extra : rebase_source : 5a9bc69455c9c752a2be6a9579185400cce149df
2018-06-07 15:55:26 +10:00