Geometry box was implemented long ago in Bug 1289011. But during some
refactoring, the existence of geometry box was overlooked. We add back
its support.
Differential Revision: https://phabricator.services.mozilla.com/D28815
--HG--
extra : moz-landing-system : lando
nsSVGUtils::PaintFrameWithEffects needs to pass its transform to
nsCSSClipPathInstance::ApplyBasicShapeOrPathClip so that the latter
can compute the correct box.
Differential Revision: https://phabricator.services.mozilla.com/D28655
--HG--
extra : moz-landing-system : lando
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
This flag and function name are used for both basic shapes and path function,
so rename it. For now, we treat path() and other basic-shapes as the
different object (i.e. StyleSVGPath and StyleBasicShape), so I rename
these functions and mask flag.
Differential Revision: https://phabricator.services.mozilla.com/D3636
Create clip-path for the path function and reuse some APIs in
nsCSSClipPathInstance, so we don't have to update the code flow.
Differential Revision: https://phabricator.services.mozilla.com/D3635
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
--HG--
extra : rebase_source : 3356d4b80ff6213935192e87cdbc9103fec6084c
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
--HG--
extra : rebase_source : bdbbd47de57e0bc610e37913752ab8413f62588a
More functions in nsCSSClipPathInstance will be refactored and moved into
ShapeUtils in subsequent patches.
MozReview-Commit-ID: LmJUevY8YGr
--HG--
extra : rebase_source : 8888fa26fab541d06a3fccad9e4376bb3a66c043
|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
--HG--
extra : rebase_source : a5494f969dcb08c139af076e95584502f46f0b9e
More functions in nsCSSClipPathInstance will be refactored and moved into
ShapeUtils in subsequent patches.
MozReview-Commit-ID: LmJUevY8YGr
--HG--
extra : rebase_source : 8888fa26fab541d06a3fccad9e4376bb3a66c043
|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
--HG--
extra : rebase_source : a5494f969dcb08c139af076e95584502f46f0b9e
More functions in nsCSSClipPathInstance will be refactored and moved into
ShapeUtils in subsequent patches.
MozReview-Commit-ID: LmJUevY8YGr
--HG--
extra : rebase_source : 7cbfe60fec65833db3c7b7d7e9f3157b49b777eb
|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
--HG--
extra : rebase_source : 813b8cb203752e6c63b0a405473f7d0cd9dbc3e6
Simply move ComputeHTMLReferenceRect and ComputeSVGReferenceRect from
nsCSSClipPathInstance to nsLayoutUtils to reuse the code in both clip-path and
mask.
MozReview-Commit-ID: 59LofAeEhKQ
--HG--
extra : rebase_source : d974c7e2170a43242ae839c34ae5cef946d4264a
The "default" case in EnumerationToLength() is not needed anymore because
StyleShapeRadius is an enum class, which cannot have other values.
MozReview-Commit-ID: GHkPAXXxqGZ
--HG--
extra : rebase_source : 8bc51d6f21cd70688d3b968bcd0a5ef12a6e3f47
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
--HG--
extra : rebase_source : 5d1d7eb788de9bde7bcc0dddbfc8a808fa40bea2
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
--HG--
extra : rebase_source : 88e89526f4b57bcbb0a1db585884d578682d118c