Commit graph

28 commits

Author SHA1 Message Date
Moonchild
0bcaa2ff90 Issue #2355 - Apply self-transforms to the frame of top level <svg>
We previously didn't do this because we relied on our anonymous wrapper
to perform transforms. However, that resulted in only the children
transforming, and the frame's cliprect wouldn't be updated,
giving the impression of the z-ordering being wrong.

Also adds reftests from the relevant BZ bug found later.

Resolves #2355
2023-10-25 09:58:41 +08:00
FranklinDM
691afc8c8b Issue #1382 - Part 1: Remove assertion that GetPreEffectsVisualOverflowRect is called only by frames whose parent is an anonymous block
This is always hit if an SVG effect is applied on other frame types.

Based on https://bugzilla.mozilla.org/show_bug.cgi?id=1340257
2023-02-27 11:03:05 +08:00
Moonchild
b27475f6a9 Issue #80 - Re-unify most of the layout engine 2022-09-09 10:12:59 +08:00
Job Bautista
0423d83560 Issue #1916 - Part 1: Convert flags passed to ReflowChild, FinishReflowChild, etc into an enum class.
Backported from Mozilla bug 1571250.
2022-06-22 09:01:25 +08:00
Moonchild
a10c0bceab Issue #1754 - Fix clip path overflow.
Resolves #1754.
2021-03-29 10:38:12 +08:00
Moonchild
0cd673d720 Issue #1656 - Part 6: Clean up the build files 2020-09-25 22:04:23 +08:00
Moonchild
dc12585a82 Issue #1650 - Add null check.
There are situations where nsCSSClipPathinstance->CreateClipPath(dt)
returns null. We need to check for this before trying to use its
functions. If there is no clip path, then always return "no hit".
2020-09-16 21:11:02 +08:00
Andy
c02e424911 Issue #1620 - Remove Development Comments 2020-08-14 08:59:35 +08:00
Andy
3c02d3fc0d Issue #1619 - Convert Intrinsic Ratio to Float
https://bugzilla.mozilla.org/show_bug.cgi?id=1547792

Aspect Ratio handling simplified by using floating point integers:
- Multiplication of value (or inverse value) to a known side for Scaling
- No unequal equal values such as "4/3" vs "8/6" vs "20/15"
- Truly "Empty" aspect ratios, even if one dimension is not 0
2020-08-06 10:23:07 +08:00
win7-7
85b85bac28 Issue #1355 - Store the dirty rect on the display list builder rather than passing it as a parameter to BuildDisplayList
Also fix build bustage for De-unified layout/xul in nsRootBoxFrame.cpp
2020-05-16 06:48:33 +08:00
Moonchild
e68128d9ca Issue #80 - De-unify layout/svg 2020-05-02 08:28:35 +08:00
Moonchild
118743b970 Issue #80 - De-unify layout/base 2020-05-02 08:28:22 +08:00
wolfbeast
c01fb23b1b Issue #438: Make the nsSVGOuterSVGAnonChildFrame a reference frame.
This causes transforms of the <svg> contents to be unaffected by
scrolling / offset changes of the <svg> element.
2019-08-17 13:32:19 +08:00
wolfbeast
c2b844077e Issue #438: Check for non-rectilinear transforms 2019-08-17 13:32:16 +08:00
win7-7
922e819d1c Attach FrameProperties to each frame instead of using a shared hashtable
Dispense the shared hashtable and instead attach the frame property list directly to nsIFrame.
2019-07-05 21:32:14 +08:00
wolfbeast
59d7005617 Add nullcheck in nsSVGUtils::PaintFrameWithEffects
Some SVGs define a mask but an invalid mask frame. Check to make sure
we have a `maskFrame` that isn't null before trying to use it.
This resolves #1034
2019-04-13 07:02:35 +08:00
wolfbeast
4a60de1031 Revert "add a nullptr check in nsSVGUtils::PaintFrameWithEffects"
This reverts commit 00baf283622b47ad7926c6e62364854d3dfbc00a.
2019-04-13 07:02:33 +08:00
yami
df0a40798b add a nullptr check in nsSVGUtils::PaintFrameWithEffects 2019-04-04 20:30:36 +08:00
cku
f9ae2860ab Bug 1360343 - ensure maskSurface is not null before dereference, since it can be null because of OOM or gfx device reset. r=dvander
MozReview-Commit-ID: HX2qsWLZpMg

--HG--
extra : rebase_source : 046befc11151461a682842c31e2ce39247a5e1d8
2019-04-04 20:30:32 +08:00
yami
b5376e63c5 issue #908 - implement missing parts of CSS mask 2019-02-16 00:27:53 +08:00
wolfbeast
ee1233bb0c Fix wrong SVG sizes with non-integer values for viewBox width/height.
Includes a standalone reftest.
2019-02-16 00:13:43 +08:00
Moonchild
49fc92f4a1 Bug 1357432 (#750)
* Part 1. Move IsLocalRefURL to nsContentUtils to reuse this function. (port-rewrite)

`IsLocalRefURL` is originally designed to be used by URLValue only.
Since we need this function in SVGUseElement::LookupHref too, move it to nsContentUtils as a util function.

* Revert "Part 1. Move IsLocalRefURL to nsContentUtils to reuse this function. (port-rewrite)"

This reverts commit 19f010c62022e269f99066a8d90e3522fe31adaf.

* Part 1. Duplicate IsLocalRefURL to nsContentUtils to reuse this function.

`IsLocalRefURL` is originally designed to be used by URLValue only.
Since we need this function in SVGUseElement::LookupHref too, duplicate it to nsContentUtils as a util function.
This is a duplication because CSSValue uses stringbuffers and not nsStrings.
While Bug 1356060 - "Just use nsString in URLValueData" converts this use from stringbuffer to nsString, it builds on a bunch of vartype refactoring (nsString vs. nsAString, etc.) which is too much of a headache to deal with just to deduplicate this simple function.

* Part 2. Implement nsSVGEffects::GetBaseURLForLocalRef to export local-ref-url-resolving logic.

ResolveURLUsingLocalRef is designed to be internally used by nsSVGEffects::Get-{SVGEffect}-URI functions.
Since we also need it in SVGUseElement::LookupHref, make it public in nsSVGEffects.

* Part 3. Resolve local-ref in SVGUseElement::LookupHref by nsSVGEffects::GetBaseURLForLocalRef.

* Part 4. Reftest for using local-ref as xlink:href value.
2019-02-16 00:12:35 +08:00
janekptacijarabaci
ece6d716f4 Bug 1346501. Don't mark every image as visible when a frame is created for it 2019-02-16 00:08:30 +08:00
Robert Longson
25bd606d80 Bug 1448774. r=dholbert, a=RyanVM
--HG--
extra : source : edfd9ffbd7208ef0a59f40a0d77d8dd53c905cb9
extra : intermediate-source : 3784b22ec536b08ce95201d73ae8806340c18b8c
2019-02-15 23:47:10 +08:00
Botond Ballo
7f57b96c83 Bug 1443092 - Avoid calling SVGAnimatedEnumeration::AnimVal() from nsSVGUtils::GetBBox(). r=jwatt, a=RyanVM
AnimVal() is a DOM getter, and it flushes animations, which we don't want
in GetBBox() which is called from display list building cide and
FrameLayerBuilder.

MozReview-Commit-ID: DWgm7wAV7C0
2019-02-15 23:47:09 +08:00
janekptacijarabaci
4ba6ca9106 SVG - support radialGradient fr attribute 2019-02-15 23:36:08 +08:00
wolfbeast
fafc5f0ec1 Only create a single display transform for SVG frames with single child transforms.
This improves performance on repeated scaling of vectors.
2019-02-14 14:39:55 +08:00
Roy Tam
dcd9973243 import FIREFOX_52_6_0esr_RELEASE from mozilla-esr52 hg repo 2018-01-19 03:59:58 +08:00