Commit Graph

61 Commits

Author SHA1 Message Date
Botond Ballo
3dccd901d9 Bug 1382534 - Add nsCSSClipPathInstance::GetBoundingRectForBasicShapeClip(). r=mstange
MozReview-Commit-ID: 85mhNcj5V2J
2017-10-04 16:46:44 -04:00
Daniel Holbert
8fea3c215f Bug 1412346 part 5: (automated patch) Switch a bunch of C++ files in layout to use our standard mode lines. r=jfkthame
This patch was generated automatically by the "modeline.py" script, available
here: https://github.com/amccreight/moz-source-tools/blob/master/modeline.py

For every file that is modified in this patch, the changes are as follows:
 (1) The patch changes the file to use the exact C++ mode lines from the
     Mozilla coding style guide, available here:
https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Coding_Style#Mode_Line

 (2) The patch deletes any blank lines between the mode line & the MPL
     boilerplate comment.

 (3) If the file previously had the mode lines and MPL boilerplate in a
     single contiguous C++ comment, then the patch splits them into
     separate C++ comments, to match the boilerplate in the coding style.

MozReview-Commit-ID: EuRsDue63tK
2017-10-27 10:33:53 -07:00
Robert Longson
965727a0d2 Bug 1398806 - GetCtx and GetNearestViewport should return the nearest svg or symbol element which is now an SVGViewportElement rather than only returning the nearest svg element because a symbol establishes a viewport too. r=dholbert 2017-10-10 07:58:34 +01:00
Ting-Yu Lin
d35b7d33db Bug 1404243 Part 3 - Remove refcount for StyleBasicShape, and use UniquePtr to hold it. r=heycam
After StyleBasicShape is set to StyleShapeSource, it's life cycle never go
beyond StyleShapeSource, so I make StyleBasicShape hold by a UniquePtr in
StyleShapeSource.

Also, replace all raw pointers to StyleBasicShape by UniquePtr in all APIs.

MozReview-Commit-ID: 1MfIFjP8TsQ
2017-09-25 18:50:24 +08:00
Alexis Beingessner
3117218f13 Bug 1088760 - Remove nsRenderingContext, replacing all of its uses with gfxContext. r=jwatt,jrmuizel
MozReview-Commit-ID: K1WUIOnvazF
2017-06-13 11:00:10 -04:00
Sebastian Hengst
1b1d14e565 Backed out changeset 3d1ce85e6348 (bug 1088760) for bustage, at least on Android at layout/generic/nsPluginFrame.cpp:1612. r=backout 2017-06-13 00:30:03 +02:00
Alexis Beingessner
c6fbc5e17e Bug 1088760 - Remove nsRenderingContext, replacing all of its uses with gfxContext. r=jwatt,jrmuizel
MozReview-Commit-ID: K1WUIOnvazF
2017-06-12 17:32:48 -04:00
Ting-Yu Lin
2b90024ba8 Bug 1326409 Part 4 - Extract a function to compute polygon vertices. r=dholbert
MozReview-Commit-ID: B4BzBHjLHxW
2017-03-13 12:03:40 +08:00
Ting-Yu Lin
3499e2f590 Bug 1326407 Part 2 - Extract a function to compute inset radii. r=dbaron
MozReview-Commit-ID: 3XbfW40AJCI
2017-02-16 10:51:48 +08:00
Ting-Yu Lin
b0f2779767 Bug 1326407 Part 1 - Extract a function to compute inset rect. r=dbaron
MozReview-Commit-ID: DmVOVArtzBZ
2017-02-16 10:51:47 +08:00
Ting-Yu Lin
408c2d430f Bug 1326406 Part 2 - Extract the computation of ellipse radii as ComputeEllipseRadii(). r=dbaron
MozReview-Commit-ID: LPdvg66adHQ
2017-01-23 17:17:05 +08:00
Ting-Yu Lin
a291192f2f Bug 1311244 Part 4 - Extract the computation of circle radius as ComputeCircleRadius(). r=dbaron
MozReview-Commit-ID: LJNvNOoc7FI
2017-01-06 16:36:05 +08:00
Ting-Yu Lin
45631eeeea Bug 1311244 Part 3 - Extract the computation of center as ComputeCircleOrEllipseCenter(). r=dbaron
MozReview-Commit-ID: A6OTJ9PD43c
2017-01-06 16:35:53 +08:00
Ting-Yu Lin
7704778bc0 Bug 1311244 Part 2 - Create ShapeUtils, and move EnumerationToLength into it. r=dbaron
More functions in nsCSSClipPathInstance will be refactored and moved into
ShapeUtils in subsequent patches.

MozReview-Commit-ID: LmJUevY8YGr
2017-01-06 16:35:29 +08:00
Ting-Yu Lin
3de8d8adf6 Bug 1311244 Part 1 - Use nsPoint type for center in nsCSSClipPathInstance. r=dbaron
|center| should be of nsPoint type since all the arguments of
ComputeObjectAnchorPoint() uses nsPoint and nsSize. We should only convert
center to Point (which is an an UnknownUnits type) for APIs requiring Point
type.

MozReview-Commit-ID: EDrQGPUZp6m
2017-01-06 16:35:00 +08:00
Carsten "Tomcat" Book
5cacfc0e2e Backed out changeset ad8e7493c933 (bug 1311244) 2017-01-12 14:19:28 +01:00
Carsten "Tomcat" Book
26b5c85932 Backed out changeset d523b9c7c0bb (bug 1311244) 2017-01-12 14:19:26 +01:00
Carsten "Tomcat" Book
fca6b16c59 Backed out changeset 61d064c78aa2 (bug 1311244) 2017-01-12 14:19:24 +01:00
Carsten "Tomcat" Book
537cb9c4ba Backed out changeset b1d7a47b0c70 (bug 1311244) 2017-01-12 14:19:23 +01:00
Ting-Yu Lin
afcdcff195 Bug 1311244 Part 4 - Extract the computation of circle radius as ComputeCircleRadius(). r=dbaron
MozReview-Commit-ID: LJNvNOoc7FI
2017-01-06 16:36:05 +08:00
Ting-Yu Lin
7e6e65ce79 Bug 1311244 Part 3 - Extract the computation of center as ComputeCircleOrEllipseCenter(). r=dbaron
MozReview-Commit-ID: A6OTJ9PD43c
2017-01-06 16:35:53 +08:00
Ting-Yu Lin
a691c42d6b Bug 1311244 Part 2 - Create ShapeUtils, and move EnumerationToLength into it. r=dbaron
More functions in nsCSSClipPathInstance will be refactored and moved into
ShapeUtils in subsequent patches.

MozReview-Commit-ID: LmJUevY8YGr
2017-01-06 16:35:29 +08:00
Ting-Yu Lin
3e6a976ee5 Bug 1311244 Part 1 - Use nsPoint type for center in nsCSSClipPathInstance. r=dbaron
|center| should be of nsPoint type since all the arguments of
ComputeObjectAnchorPoint() uses nsPoint and nsSize. We should only convert
center to Point (which is an an UnknownUnits type) for APIs requiring Point
type.

MozReview-Commit-ID: EDrQGPUZp6m
2017-01-06 16:35:00 +08:00
Phil Ringnalda
6a908b136a Backed out 8 changesets (bug 1311244) for OOM failures in Win7 debug R1
Backed out changeset d5411799a28f (bug 1311244)
Backed out changeset ff9c71e1dbc8 (bug 1311244)
Backed out changeset 96988ec5b81c (bug 1311244)
Backed out changeset 9d257713833a (bug 1311244)
Backed out changeset 2c33905ccb04 (bug 1311244)
Backed out changeset 20148e33d523 (bug 1311244)
Backed out changeset f36cd1532fdb (bug 1311244)
Backed out changeset 2ee4ea83a6b4 (bug 1311244)
2017-01-08 21:11:25 -08:00
Ting-Yu Lin
b0597cccd9 Bug 1311244 Part 4 - Extract the computation of circle radius as ComputeCircleRadius(). r=dbaron
MozReview-Commit-ID: LJNvNOoc7FI
2017-01-06 16:36:05 +08:00
Ting-Yu Lin
a19b1fd03f Bug 1311244 Part 3 - Extract the computation of center as ComputeCircleOrEllipseCenter(). r=dbaron
MozReview-Commit-ID: A6OTJ9PD43c
2017-01-06 16:35:53 +08:00
Ting-Yu Lin
3a05577b43 Bug 1311244 Part 2 - Create ShapeUtils, and move EnumerationToLength into it. r=dbaron
More functions in nsCSSClipPathInstance will be refactored and moved into
ShapeUtils in subsequent patches.

MozReview-Commit-ID: LmJUevY8YGr
2017-01-06 16:35:29 +08:00
Ting-Yu Lin
5006e9c51e Bug 1311244 Part 1 - Use nsPoint type for center in nsCSSClipPathInstance. r=dbaron
|center| should be of nsPoint type since all the arguments of
ComputeObjectAnchorPoint() uses nsPoint and nsSize. We should only convert
center to Point (which is an an UnknownUnits type) for APIs requiring Point
type.

MozReview-Commit-ID: EDrQGPUZp6m
2017-01-06 16:35:00 +08:00
Robert Longson
c9677fce15 Bug 1325487 - Improve SVGContentUtils::ComputeNormalizedHypotenuse and use it more r=dholbert 2016-12-23 17:28:13 +00:00
cku
5e33d5d53f Bug 1311270 - Part 1. Move geomery box computing from nsCSSClipPathInstance to nsLayoutUtils.
Simply move ComputeHTMLReferenceRect and ComputeSVGReferenceRect from
nsCSSClipPathInstance to nsLayoutUtils to reuse the code in both clip-path and
mask.

MozReview-Commit-ID: 59LofAeEhKQ
2016-11-22 11:19:11 +08:00
Ting-Yu Lin
497d7f2846 Bug 1325006 Part 2 - Convert NS_RADIUS_* to StyleShapeRadius enum class. r=heycam
The "default" case in EnumerationToLength() is not needed anymore because
StyleShapeRadius is an enum class, which cannot have other values.

MozReview-Commit-ID: GHkPAXXxqGZ
2016-12-03 16:13:49 +08:00
Ting-Yu Lin
99be1a9f09 Bug 1324713 - Fix integer overflow in CreateClipPathCircle(). r=dholbert
Before this patch, we did a sum-of-squares operation with nscoord variables,
which could overflow (to a negative value), and that would then produce NaN
when sqrt()'ed. We'll now avoid this by using 'double' variables & NS_hypot.

Without this patch, clip-path-circle-021.html will be rendered as a
rectangle.

MozReview-Commit-ID: 70xNvDdHUJc
2016-12-20 15:54:18 +08:00
Daniel Holbert
c22c936801 Bug 1321056: Add includes/namespaces to fix latent unified bustage in layout/svg. r=TYLin
MozReview-Commit-ID: 8k3FSpKeKOa
2016-11-29 11:41:16 -08:00
cku
28ba1f5487 Bug 1305253 - Part 1. Use nsCSSClipPathInstance::ApplyBasicShapeClip when clip-path type is basic-shape or geometry-box. r=mstange
Before this patch, shouldApplyBasicShape will be set as true when the url of a
clip-path is not resolvable, for example:
  clip-path: url("#non-exist-id");

So we call nsCSSClipPathInstance::ApplyBasicShapeClip and early return even if
the clip-path's type is StyleShapeSourceType::URL. This patch aims to correct
this wrong behavior: nsCSSClipPathInstance::ApplyBasicShapeClip shoud be used
only when the type of clip-path is StyleShapeSourceType::Shape or
StyleShapeSourceType::Box.

MozReview-Commit-ID: 1ON4dEY9pva
2016-10-28 23:56:07 +08:00
Manish Goregaokar
49b3b83008 Bug 1300337 - Replace None_ variants from nsStyleConsts.h with None; r=heycam,TYLin
MozReview-Commit-ID: CxHzbEzjLxT
2016-09-04 00:16:58 +05:30
cku
84a95e1e3d Bug 1289011 - Part 4. Handle stroke-box. r=heycam
MozReview-Commit-ID: BImaXBGds6l
2016-08-28 02:36:20 +08:00
cku
0b4215f93b Bug 1289011 - Part 3. Handle view-box. r=heycam
MozReview-Commit-ID: 3GsivsTYPYK
2016-08-30 10:27:30 +08:00
cku
63ce6a530b Bug 1289011 - Part 2. Implement ComputeSVGReferenceRect. r=heycam
MozReview-Commit-ID: G98lmo59AuB
2016-08-28 02:06:04 +08:00
cku
5a4a8bd67c Bug 1289011 - Part 1. Implement ComputeHTMLReferenceRect. r=heycam
MozReview-Commit-ID: DvlSF3L8yE0
2016-08-27 02:49:41 +08:00
Phil Ringnalda
de2b94faf6 Backed out 9 changesets (bug 1289011) for Android failures in select-fieldset-legend-4.html
Backed out changeset 296f8c0b77e1 (bug 1289011)
Backed out changeset 869997798534 (bug 1289011)
Backed out changeset 3f1f0bc8c878 (bug 1289011)
Backed out changeset b3da5e487c2c (bug 1289011)
Backed out changeset fd404df10eed (bug 1289011)
Backed out changeset 8e3fc6d5237f (bug 1289011)
Backed out changeset 062cae507676 (bug 1289011)
Backed out changeset 43daa18916ce (bug 1289011)
Backed out changeset 632cf28211de (bug 1289011)
2016-09-03 13:32:40 -07:00
cku
c37c833627 Bug 1289011 - Part 4. Handle stroke-box. r=heycam
MozReview-Commit-ID: BImaXBGds6l
2016-08-28 02:36:20 +08:00
cku
d3251e0089 Bug 1289011 - Part 3. Handle view-box. r=heycam
MozReview-Commit-ID: 3GsivsTYPYK
2016-08-30 10:27:30 +08:00
cku
4a938503cb Bug 1289011 - Part 2. Implement ComputeSVGReferenceRect. r=heycam
MozReview-Commit-ID: G98lmo59AuB
2016-08-28 02:06:04 +08:00
cku
8857e1c442 Bug 1289011 - Part 1. Implement ComputeHTMLReferenceRect. r=heycam
MozReview-Commit-ID: DvlSF3L8yE0
2016-08-27 02:49:41 +08:00
Phil Ringnalda
b8d9cbae48 Backed out 9 changesets (bug 1289011) for Win8 clip-path-* reftest failures
CLOSED TREE

Backed out changeset dea9d3f8bfe0 (bug 1289011)
Backed out changeset 03572962add4 (bug 1289011)
Backed out changeset 4b8d3be7bdf8 (bug 1289011)
Backed out changeset d1b4d0b38cdb (bug 1289011)
Backed out changeset aa59aca85397 (bug 1289011)
Backed out changeset 43d1ec007a49 (bug 1289011)
Backed out changeset a623cab8e4a7 (bug 1289011)
Backed out changeset 34e7dd6acb4c (bug 1289011)
Backed out changeset 900800f54055 (bug 1289011)
2016-09-02 19:46:39 -07:00
cku
9a12c713ae Bug 1289011 - Part 4. Handle stroke-box. r=heycam
MozReview-Commit-ID: BImaXBGds6l
2016-08-28 02:36:20 +08:00
cku
d445845f16 Bug 1289011 - Part 3. Handle view-box. r=heycam
MozReview-Commit-ID: 3GsivsTYPYK
2016-08-30 10:27:30 +08:00
cku
1ceedbc5b2 Bug 1289011 - Part 2. Implement ComputeSVGReferenceRect. r=heycam
MozReview-Commit-ID: G98lmo59AuB
2016-08-28 02:06:04 +08:00
cku
dafc47ae60 Bug 1289011 - Part 1. Implement ComputeHTMLReferenceRect. r=heycam
MozReview-Commit-ID: DvlSF3L8yE0
2016-08-27 02:49:41 +08:00
Manish Goregaokar
bc5f2ba4da Bug 1246762 - Add support for inset() in clip-path ; r=dholbert
MozReview-Commit-ID: 9AhkTu9gVVm
2016-08-18 19:59:01 +05:30