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

76 Коммитов

Автор SHA1 Сообщение Дата
Ting-Yu Lin fdc00547f6 Bug 1637130 - Rename visual overflow to ink overflow. r=dbaron
This patch is generated by:

```
# Rename the nsOverflowType enum.
rg -l "eVisualOverflow" layout/ gfx/ | xargs sed -i "s/eVisualOverflow/eInkOverflow/g"

# Rename and drop the "Get" prefix from various functions.
rg -l "GetVisualOverflowRect" layout/ gfx/ | xargs sed -i "s/GetVisualOverflowRect/InkOverflowRect/g"
rg -l "GetPreEffectsVisualOverflowRect" layout/ gfx/ | xargs sed -i "s/GetPreEffectsVisualOverflowRect/PreEffectsInkOverflowRect/g"
rg -l "GetVisualOverflowFromDeltas" layout/ gfx/ | xargs sed -i "s/GetVisualOverflowFromDeltas/InkOverflowFromDeltas/g"
rg -l "GetScrollableOverflowRect" layout/ gfx/ | xargs sed -i "s/GetScrollableOverflowRect/ScrollableOverflowRect/g"

# Rename, drop the "Get" prefix, and change the suffix "Area" to "Rect"
# (because they return nsRect) for the two methods in nsLineBox.
rg -l "GetVisualOverflowArea" layout/ gfx/ | xargs sed -i "s/GetVisualOverflowArea/InkOverflowRect/g"
rg -l "GetScrollableOverflowArea" layout/ gfx/ | xargs sed -i "s/GetScrollableOverflowArea/ScrollableOverflowRect/g"

# Rename rest of the functions and variables.
rg -l "VisualOverflow" layout/ gfx/ | xargs sed -i "s/VisualOverflow/InkOverflow/g"
rg -l "visual overflow" layout/ gfx/ | xargs sed -i "s/visual overflow/ink overflow/g"
rg -l "visualOverflow" layout/ gfx/ | xargs sed -i "s/visualOverflow/inkOverflow/g"
rg -l "visOverflow" layout/ gfx/ | xargs sed -i "s/visOverflow/inkOverflow/g"
rg -l "vis-overflow" layout/ gfx/ python/ | xargs sed -i "s/vis-overflow/ink-overflow/g"

./mach clang-format
```

Differential Revision: https://phabricator.services.mozilla.com/D84231
2020-07-20 20:17:36 +00:00
Simon Giesecke 96fb649d21 Bug 1652017 - Remove unnecessary includes for expensive nsIFrame.h. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D83111
2020-07-15 13:44:39 +00:00
longsonr 5b9df67d2e Bug 1652395 - Replace 'typedef' by 'using' in SVG and SMIL code r=dholbert
Also removes some mozilla:: where its no longer needed

Note that this patch was created by running

sed -e -i '.bak' 's/typedef ([a-zA-Z0-9:]+) ([a-zA-Z0-9:]+)/using \2 = \1/'

and then fixing up a few cases that didn't work.

Differential Revision: https://phabricator.services.mozilla.com/D83294
2020-07-15 10:37:55 +00:00
longsonr 02829222d5 Bug 1652253 - Update SVG include guards r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D83248
2020-07-14 23:40:05 +00:00
longsonr 875f5e88ac Bug 1259861 - Move everything else into the mozilla namespace in layout/svg r=dholbert
Also: adjust include paths to be consistent for usages of various SVG headers,
and remove unused SVG includes (mostly for "utils" classes),
and drop stray "ns" from already-renamed SVG classes in various code comments.

Differential Revision: https://phabricator.services.mozilla.com/D83140
2020-07-11 02:20:20 +00:00
longsonr 058049a793 Bug 1649739 - Move SVG paint server and clipPath classes to the mozilla namespace r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D81858
2020-07-07 13:49:30 +00:00
longsonr c6379dd48c Bug 1649177 - Move SVG filter classes to the mozilla namespace r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D81555
2020-06-30 18:11:50 +00:00
longsonr 71614873fb Bug 1648737 - Move SVGAFrame SVGGFrame SVGGenericContainerFrame SVGInnerSVGFrame SVGMarkerFrame SVGMaskFrame SVGSymbolFrame SVGViewportFrame to the mozilla namespace r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D81310
2020-06-27 05:39:42 +00:00
Mihai Alexandru Michis 20dfc519d1 Backed out changeset 1b8b8756acad (bug 1648737) for causing bustages in SVGMaskFrame.h
CLOSED TREE
2020-06-27 02:24:41 +03:00
longsonr 3b9835e5b8 Bug 1648737 - Move SVGAFrame SVGGFrame SVGGenericContainerFrame SVGInnerSVGFrame SVGMarkerFrame SVGMaskFrame SVGSymbolFrame SVGViewportFrame to the mozilla namespace r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D81310
2020-06-26 19:27:08 +00:00
Mirko Brodesser b2de103bf9 Bug 1593222: part 12) Rename "nsNodeUtils.*" to "MutationObservers.*". r=smaug
Depends on D51827

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

--HG--
rename : dom/base/nsNodeUtils.cpp => dom/base/MutationObservers.cpp
rename : dom/base/nsNodeUtils.h => dom/base/MutationObservers.h
extra : moz-landing-system : lando
2019-11-06 09:08:06 +00:00
Thomas Nguyen fc05893051 Bug 1546334 - Use referrerInfo in style system. r=heycam
Differential Revision: https://phabricator.services.mozilla.com/D36478

--HG--
extra : moz-landing-system : lando
2019-07-16 11:43:56 +00:00
Emilio Cobos Álvarez 117f562dcb Bug 1563315 - Use cbindgen for fill and stroke r=boris
Differential Revision: https://phabricator.services.mozilla.com/D36807

--HG--
extra : moz-landing-system : lando
2019-07-06 08:31:02 +00:00
Jonathan Watt 3183f85bc5 Bug 1559096. Rename SVGObserverUtils::mInObserverList. r=longsonr
Differential Revision: https://phabricator.services.mozilla.com/D34852

--HG--
extra : rebase_source : dd5459aebc8a2355e141b306bf226835c88afb68
extra : amend_source : 4b407c19cc3940e8a030f887d11b9ebe3166d271
2019-06-06 11:12:21 -07:00
Jonathan Watt 4dcb61db3b Bug 1559096. Rename SVGObserverUtils::GetAndObservePaintServer argument. r=longsonr
Differential Revision: https://phabricator.services.mozilla.com/D34851

--HG--
extra : rebase_source : 0a749e4113404983365640c0a9758dd2c73b522b
extra : amend_source : e67b5f7daaf3accdb6acd25e1f82d85900c654f3
2019-06-06 11:05:38 -07:00
Emilio Cobos Álvarez fce57b44fd Bug 1552878 - Use cbindgen for filters. r=jwatt
Had to implement some OwnedSlice bits that the canvas code used.

Differential Revision: https://phabricator.services.mozilla.com/D31799
2019-05-29 21:22:07 +02:00
Emilio Cobos Álvarez a384dedd93 Bug 1552708 - Use cbindgen for URIs. r=heycam
This doesn't clean up as much as a whole, but it's a step in the right
direction. In particular, it allows us to start using simple bindings for:

 * Filters
 * Shapes and images, almost. Need to:
   * Get rid of the complex -moz- gradient parsing (let
     layout.css.simple-moz-gradient.enabled get to release).
 * Counters, almost. Need to:
   * Share the Attr representation with Gecko, by not using Option<>.
     * Just another variant should be enough (ContentItem::{Attr,Prefixedattr},
       maybe).

Which in turn allows us to remove a whole lot of bindings in followups to this.

The setup changes a bit. This also removes the double pointer I complained about
while reviewing the shared UA sheet patches. The old setup is:

```
SpecifiedUrl
 * CssUrl
   * Arc<CssUrlData>
     * String
     * UrlExtraData
 * UrlValueSource
   * Arc<CssUrlData>
   * load id
   * resolved uri
   * CORS mode.
   * ...
```

The new one removes the double reference to the url data via URLValue, and looks
like:

```
SpecifiedUrl
 * CssUrl
   * Arc<CssUrlData>
     * String
     * UrlExtraData
     * CorsMode
     * LoadData
       * load id
       * resolved URI
```

The LoadData is the only mutable bit that C++ can change, and is not used from
Rust. Ideally, in the future, we could just use rust-url to resolve the URL
after parsing or something, and make it all immutable. Maybe.

I've verified that this approach still works with the UA sheet patches (via the
LoadDataSource::Lazy).

The reordering of mWillChange is to avoid nsStyleDisplay from going over the
size limit. We want to split it up anyway in bug 1552587, but mBinding gains a
tag member, which means that we were having a bit of extra padding.

One thing I want to explore is to see if we can abuse rustc's non-zero
optimizations to predict the layout from C++, but that's something to explore at
some other point in time and with a lot of care and help from Michael (who sits
next to me and works on rustc ;)).

Differential Revision: https://phabricator.services.mozilla.com/D31742
2019-05-29 21:22:04 +02:00
Brindusan Cristian 40a5b04ab5 Backed out 3 changesets (bug 1552708, bug 1552878) for build bustages and compiler issues. CLOSED TREE
Backed out changeset 9d4f178bfcbd (bug 1552878)
Backed out changeset 80db9f845237 (bug 1552708)
Backed out changeset 1bdbfbb5b342 (bug 1552708)
2019-05-27 17:00:03 +03:00
Emilio Cobos Álvarez a6bdf94e22 Bug 1552878 - Use cbindgen for filters. r=jwatt
Had to implement some OwnedSlice bits that the canvas code used.

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

--HG--
extra : moz-landing-system : lando
2019-05-27 12:37:37 +00:00
Emilio Cobos Álvarez f2190857bb Bug 1552708 - Use cbindgen for URIs. r=heycam
This doesn't clean up as much as a whole, but it's a step in the right
direction. In particular, it allows us to start using simple bindings for:

 * Filters
 * Shapes and images, almost. Need to:
   * Get rid of the complex -moz- gradient parsing (let
     layout.css.simple-moz-gradient.enabled get to release).
 * Counters, almost. Need to:
   * Share the Attr representation with Gecko, by not using Option<>.
     * Just another variant should be enough (ContentItem::{Attr,Prefixedattr},
       maybe).

Which in turn allows us to remove a whole lot of bindings in followups to this.

The setup changes a bit. This also removes the double pointer I complained about
while reviewing the shared UA sheet patches. The old setup is:

```
SpecifiedUrl
 * CssUrl
   * Arc<CssUrlData>
     * String
     * UrlExtraData
 * UrlValueSource
   * Arc<CssUrlData>
   * load id
   * resolved uri
   * CORS mode.
   * ...
```

The new one removes the double reference to the url data via URLValue, and looks
like:

```
SpecifiedUrl
 * CssUrl
   * Arc<CssUrlData>
     * String
     * UrlExtraData
     * CorsMode
     * LoadData
       * load id
       * resolved URI
```

The LoadData is the only mutable bit that C++ can change, and is not used from
Rust. Ideally, in the future, we could just use rust-url to resolve the URL
after parsing or something, and make it all immutable. Maybe.

I've verified that this approach still works with the UA sheet patches (via the
LoadDataSource::Lazy).

The reordering of mWillChange is to avoid nsStyleDisplay from going over the
size limit. We want to split it up anyway in bug 1552587, but mBinding gains a
tag member, which means that we were having a bit of extra padding.

One thing I want to explore is to see if we can abuse rustc's non-zero
optimizations to predict the layout from C++, but that's something to explore at
some other point in time and with a lot of care and help from Michael (who sits
next to me and works on rustc ;)).

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

--HG--
extra : moz-landing-system : lando
2019-05-27 11:45:12 +00:00
Jonathan Watt d2aa925402 Bug 1550531. Fix -moz-element memory leak and related shutdown hangs. r=emilio
--HG--
extra : rebase_source : 84d57ea5ee2cb4c7e74305aea50aa641168d11b3
extra : amend_source : f97e0207157eaf6662c421ad32a0f846d2eeb178
2019-05-22 20:14:47 +01:00
longsonr dcc4813635 Bug 1542646 Part 13 - Make function declaration and definition parameter names match r=dholbert 2019-04-27 08:57:50 +01:00
Matt Woodrow 756b5124bc Bug 1525372 - Add background-clip:text rendering observer so that we get notified of changes to the clipped contents. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D20110

--HG--
extra : moz-landing-system : lando
2019-03-18 16:24:20 +00:00
Sylvestre Ledru 265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Jonathan Watt 5b2fef1b25 Bug 1510295. Stop SVGRenderingObserver subclasses observing reflow, except for -moz-element. r=longsonr
Differential Revision: https://phabricator.services.mozilla.com/D13080

--HG--
extra : rebase_source : 692e0a777cfda1e74bb316083d5e44f70f322653
extra : amend_source : 97c8d78924c0951d6da008cafcb06cdfe2222b6d
2018-11-14 10:39:12 +00:00
Cameron McCormack a7510da8d0 Bug 1499408 - Part 2: Have css::URLValue get URLExtraData from its CssUrlData. r=emilio
MozReview-Commit-ID: IqZGzkHlSZD

Depends on D8874

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

--HG--
extra : moz-landing-system : lando
2018-10-17 09:43:32 +00:00
Jonathan Watt 5933668f75 Bug 1495877. Standardize the GetAndObserve* naming for SVGObserverUtils methods. r=longsonr
Differential Revision: https://phabricator.services.mozilla.com/D7538

--HG--
extra : rebase_source : c042fc33cc12ca59b55cdaaf59914ab91baa8b05
2018-09-25 21:16:49 +01:00
Jonathan Watt d42f097af8 Bug 1495562. Rename SVGRenderingObserverList to SVGRenderingObserverSet. r=longsonr
Differential Revision: https://phabricator.services.mozilla.com/D7330

--HG--
extra : rebase_source : a8f71572d103c6ad5a84d5ad14a8d83bf2af5d5c
extra : source : ec5d3c12ad4c9b8d3c2eea2b0f71f5dc3c15f15f
2018-09-24 11:45:17 +01:00
Narcis Beleuzu 010feac062 Backed out 2 changesets (bug 1495562, bug 1495554) for crashes on [@ CrashReporter::TerminateHandler()] . CLOSED TREE
Backed out changeset ec5d3c12ad4c (bug 1495562)
Backed out changeset 28792d9adea2 (bug 1495554)
2018-10-02 02:58:09 +03:00
Jonathan Watt 219a2f9e91 Bug 1495562. Rename SVGRenderingObserverList to SVGRenderingObserverSet. r=longsonr
Differential Revision: https://phabricator.services.mozilla.com/D7330

--HG--
extra : rebase_source : 6c843092611056972c991175fa18f37cfad57402
2018-09-24 11:45:17 +01:00
Jonathan Watt 930cf1de0f Bug 1495554. Call StopObserving in SVGRenderingObserver's dtor instead of individual subclasses' dtors. r=longsonr
Differential Revision: https://phabricator.services.mozilla.com/D7328

--HG--
extra : rebase_source : 8cf78efc46d4e94d0328742e836fefab3c977060
2018-09-21 21:16:49 +01:00
Jonathan Watt da5346d105 Bug 1495438. Move most code from SVGObserverUtils.h to its source file. r=longsonr
Differential Revision: https://phabricator.services.mozilla.com/D7293

--HG--
extra : rebase_source : 975eac166d25864e998a01d0f353aab353a115d6
2018-09-21 19:09:41 +01:00
Jonathan Watt c928198204 Bug 1495390. Inline some SVGObserverUtils code. r=longsonr
Differential Revision: https://phabricator.services.mozilla.com/D7269

--HG--
extra : rebase_source : a7739af3656295de179b4166ddc163b394ba1513
2018-09-21 12:46:18 +01:00
Jonathan Watt 163d5851d1 Bug 1495330. Hide SVGObserverUtils implementation details from nsImageRenderer. r=longsonr
Differential Revision: https://phabricator.services.mozilla.com/D7257

--HG--
extra : rebase_source : 040f99a33f43de3a92591bc47def2b129d0da3f6
2018-09-20 13:50:23 +01:00
Jonathan Watt 6d7998277a Bug 1495215. Separate out the SVGObserverUtils mask handling from EffectProperties. r=longsonr
Differential Revision: https://phabricator.services.mozilla.com/D7242

--HG--
extra : rebase_source : 00c2c87e8fc6fc3ae874139b9a9b8b6b1cb4d877
2018-09-19 15:54:27 +01:00
Jonathan Watt 85d30e0f2c Bug 1495034. Separate out the SVGObserverUtils clip path handling from EffectProperties. r=longsonr
Differential Revision: https://phabricator.services.mozilla.com/D7194

--HG--
extra : rebase_source : d8137eb0f1b91fe926d04bfb3d7197c11d6402e7
extra : amend_source : c0faf32401c08471c6acb52b5eb36571ceaeb951
2018-09-05 18:12:44 +01:00
Jonathan Watt c506a0013f Bug 1494953 p2. Make nsFrame::DidSetComputedStyle initiate external filter loads. r=longsonr
In bug 1488300 xidorn make us kick off loading of masks/filters/clipPaths in
resource documents when the style context is set so that the 'load' event
will be blocked until they load.  I missed that in 5177bb8cb2ce (bug 1494355)
where we stopped creating the SVGFilterObserverList in
SVGObserverUtils::GetEffectProperties since I missed that creating that object
looks up the target element (without observing it), which triggers loading of
external resources as necessary.

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

--HG--
extra : rebase_source : 698fe4b437660761e457ecf54d8d604a098229db
extra : amend_source : 3ae9f25761372ee6a33bd4043c7bf6183361ca58
2018-09-04 13:50:22 +01:00
Jonathan Watt 7b3a3b2d10 Bug 1494953 p1. Rename lots of SVGObserverUtils functions. r=longsonr
The lack of clarity over which functions initiate observing and which don't
is a headache since it makes it hard to reason about what's going on. This
rename makes it explicit in the function names.

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

--HG--
extra : rebase_source : 1f2f86423a9bee7843533c09b3ea78416b233bcd
extra : amend_source : a89125d6a3b7b75a4056c4d600de74a5386ac4ff
2018-09-04 10:04:07 +01:00
Jonathan Watt 73f875346b Bug 1494830. Stop leaking SVGFilterObserverList details into nsSVGIntegrationUtils. r=longsonr
Differential Revision: https://phabricator.services.mozilla.com/D7150

--HG--
extra : rebase_source : d4c1b44f851b01a1060cf8567f2eb4ec7bd7859c
2018-09-03 18:09:41 +01:00
Jonathan Watt 61bcaa65a9 Bug 1494820. Stop leaking SVGObserverUtils implementation details into CanvasRenderingContext2D. r=longsonr
Differential Revision: https://phabricator.services.mozilla.com/D7148

--HG--
extra : rebase_source : 95ff24bd2a5656fc4d6708a515f9a869370bd338
2018-09-03 11:24:27 +01:00
Jonathan Watt 8b400ea6ce Bug 1494695. Remove SVGFilterElement::Invalidate. r=longsonr
Differential Revision: https://phabricator.services.mozilla.com/D7095

--HG--
extra : rebase_source : 951c95ceef8ce6682ed867aa96c88283c64ccbd1
extra : __touch-noise__ : 4288727139
extra : amend_source : ad0a1fcb56b4c1ad08f54142cac64c1ab7d7300b
2018-08-31 16:30:03 +01:00
Jonathan Watt 0d889dc646 Bug 1494355. Separate out the SVGObserverUtils filter handling from EffectProperties. r=longsonr
Differential Revision: https://phabricator.services.mozilla.com/D6930

--HG--
extra : rebase_source : cb3c301ae0fee233ae881c384499340c678e1874
2018-08-29 19:11:43 +01:00
Jonathan Watt b389c507af Bug 1494092. Remove SVGFilterObserverList::IsInObserverLists and related code. r=mattwoodrow
This code is no longer necessary since we now invalidate using Display List
Based Invalidation instead of using recursive calls up the frame tree.

The tests that are marked as failing have only been passing due to a bug in the
code that's being removed from nsSVGIntegrationUtils.cpp which coincidentally
hides the fact that we are actually invalidating in those tests given their
particular structure (which the tests are supposed to be checking we're not
doing).

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

--HG--
extra : rebase_source : cb95359d694dafeca915a22b3c48f580a69679ef
extra : amend_source : 7074f5837170ce0a9243811291782f689666e122
2018-08-27 17:05:37 +01:00
Jonathan Watt a5a808ee8e Bug 1493406. Hide the implementation details of SVG rendering observers for template elements. r=longsonr
Differential Revision: https://phabricator.services.mozilla.com/D6569

--HG--
extra : rebase_source : 3ee7f77ec68f2735a24d44955d6bfca2fbdc3f47
2018-08-21 14:54:26 +01:00
Jonathan Watt 1cf9fbd0c7 Bug 1493049 - Stop using nsSVGPaintingProperty for observing SVG "template" elements. r=longsonr
Using nsSVGPaintingProperty to observe SVG "template" elements means that we
unnecessarily call InvalidateFrameSubtree(), and unnecessarily call
InvalidateRenderingObservers instead of just calling
InvalidateDirectRenderingObservers.  Besides that it's confusing to anyone
trying to understand the code why href-to-template is a "painting" property.
Creating a new type solves all these issues.

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

--HG--
extra : rebase_source : cd3e731cf08d008096bf5ff20592a28fdfaf4a1b
2018-08-17 16:57:30 +01:00
Jonathan Watt 7f62854eb1 Bug 1492883 p2. Hide the implementation details of SVG rendering observers for markers. r=longsonr
Differential Revision: https://phabricator.services.mozilla.com/D6411

--HG--
extra : rebase_source : d4f1b8ce33809c4664ea2ebe593462bae31db58d
2018-08-16 18:08:21 +01:00
Jonathan Watt b03fed78da Bug 1492883 p1. Rationalize the SVG marker frame property names. r=longsonr
This is necessary to keep the GET_MARKER macro in the next patch clean.

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

--HG--
extra : rebase_source : 44a6eb861a1fd8d2037eda05c0f99c0bba3f1417
2018-08-16 11:54:27 +01:00
Jonathan Watt 90314b1dd6 Bug 1492573. Make SVGTextFrame ignorant of the implementation details of SVG rendering observers. r=longsonr
Differential Revision: https://phabricator.services.mozilla.com/D6320

--HG--
extra : rebase_source : fb88b6e2a87dc2e766974cff1ffed1f11a86f5e5
2018-08-15 21:32:04 +01:00
Jonathan Watt f8e64cb389 Bug 1492432. Remove PaintingPropertyDescriptor parameter from SVGObserverUtils::GetPaintServer. r=longsonr
Differential Revision: https://phabricator.services.mozilla.com/D6250

--HG--
extra : rebase_source : 3f9c4a0252ba62db90c908f4021072a22097ec55
2018-08-15 11:54:27 +01:00
Thomas Nguyen fca5bf4852 Bug 1330487 - Part 6: Passing referrer information to svg style system r=heycam
We create new object URLExtraRefferINfo and pass it to svg system instead of
nsIURI. The object brings referrer and referrer policy so we can send correct
Referer headers.

MozReview-Commit-ID: 2gLnQPEE9t5

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

--HG--
extra : moz-landing-system : lando
2018-09-17 05:37:01 +00:00