Skip to content

Add SVG Painting types #727

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 26, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 19 additions & 15 deletions baselines/dom.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2799,6 +2799,7 @@ interface CSSStyleDeclaration {
clipPath: string;
clipRule: string;
color: string | null;
colorInterpolation: string;
colorInterpolationFilters: string;
columnCount: string;
columnFill: string;
Expand All @@ -2821,9 +2822,9 @@ interface CSSStyleDeclaration {
dominantBaseline: string | null;
emptyCells: string | null;
enableBackground: string | null;
fill: string | null;
fillOpacity: string | null;
fillRule: string | null;
fill: string;
fillOpacity: string;
fillRule: string;
filter: string;
flex: string;
flexBasis: string;
Expand Down Expand Up @@ -2900,10 +2901,10 @@ interface CSSStyleDeclaration {
marginLeft: string | null;
marginRight: string | null;
marginTop: string | null;
marker: string | null;
markerEnd: string | null;
markerMid: string | null;
markerStart: string | null;
marker: string;
markerEnd: string;
markerMid: string;
markerStart: string;
mask: string;
maskComposite: string;
maskImage: string;
Expand Down Expand Up @@ -2985,6 +2986,7 @@ interface CSSStyleDeclaration {
pageBreakAfter: string | null;
pageBreakBefore: string | null;
pageBreakInside: string | null;
paintOrder: string;
readonly parentRule: CSSRule;
penAction: string | null;
perspective: string | null;
Expand All @@ -3004,16 +3006,17 @@ interface CSSStyleDeclaration {
rubyPosition: string | null;
scale: string | null;
scrollBehavior: string;
shapeRendering: string;
stopColor: string | null;
stopOpacity: string | null;
stroke: string | null;
strokeDasharray: string | null;
strokeDashoffset: string | null;
strokeLinecap: string | null;
strokeLinejoin: string | null;
strokeMiterlimit: string | null;
strokeOpacity: string | null;
strokeWidth: string | null;
stroke: string;
strokeDasharray: string;
strokeDashoffset: string;
strokeLinecap: string;
strokeLinejoin: string;
strokeMiterlimit: string;
strokeOpacity: string;
strokeWidth: string;
tabSize: string;
tableLayout: string | null;
textAlign: string;
Expand All @@ -3034,6 +3037,7 @@ interface CSSStyleDeclaration {
textKashidaSpace: string | null;
textOrientation: string;
textOverflow: string;
textRendering: string;
textShadow: string;
textTransform: string;
textUnderlinePosition: string;
Expand Down
8 changes: 8 additions & 0 deletions inputfiles/addedTypes.json
Original file line number Diff line number Diff line change
Expand Up @@ -2113,6 +2113,14 @@
}
]
},
"SVGMarkerElement": {
"element": [
{
"namespace": "SVG",
"name": "marker"
}
]
},
"SVGMaskElement": {
"element": [
{
Expand Down
51 changes: 51 additions & 0 deletions inputfiles/idl/SVG - Painting.widl
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
[Exposed=Window]
interface SVGMarkerElement : SVGElement {

// Marker Unit Types
const unsigned short SVG_MARKERUNITS_UNKNOWN = 0;
const unsigned short SVG_MARKERUNITS_USERSPACEONUSE = 1;
const unsigned short SVG_MARKERUNITS_STROKEWIDTH = 2;

// Marker Orientation Types
const unsigned short SVG_MARKER_ORIENT_UNKNOWN = 0;
const unsigned short SVG_MARKER_ORIENT_AUTO = 1;
const unsigned short SVG_MARKER_ORIENT_ANGLE = 2;

[SameObject] readonly attribute SVGAnimatedLength refX;
[SameObject] readonly attribute SVGAnimatedLength refY;
[SameObject] readonly attribute SVGAnimatedEnumeration markerUnits;
[SameObject] readonly attribute SVGAnimatedLength markerWidth;
[SameObject] readonly attribute SVGAnimatedLength markerHeight;
[SameObject] readonly attribute SVGAnimatedEnumeration orientType;
[SameObject] readonly attribute SVGAnimatedAngle orientAngle;
attribute DOMString orient;

void setOrientToAuto();
void setOrientToAngle(SVGAngle angle);
};

SVGMarkerElement includes SVGFitToViewBox;

partial interface CSSStyleDeclaration {
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString fill;
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString fillRule;
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString fillOpacity;
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString stroke;
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString strokeOpacity;
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString strokeWidth;
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString strokeLinecap;
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString strokeLinejoin;
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString strokeMiterlimit;
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString strokeDasharray;
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString strokeDashoffset;
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString markerStart;
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString markerMid;
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString markerEnd;
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString marker;
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString paintOrder;
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString colorInterpolation;
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString colorRendering;
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString shapeRendering;
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString textRendering;
[CEReactions] attribute [TreatNullAs=EmptyString] CSSOMString imageRendering;
};
8 changes: 6 additions & 2 deletions inputfiles/idlSources.json
Original file line number Diff line number Diff line change
Expand Up @@ -356,13 +356,17 @@
"local": true
},
{
"url": "https://svgwg.org/svg2-draft/types.html",
"url": "https://www.w3.org/TR/SVG2/types.html",
"title": "SVG - Basic Data Types and Interfaces"
},
{
"url": "https://svgwg.org/svg2-draft/shapes.html",
"url": "https://www.w3.org/TR/SVG2/shapes.html",
"title": "SVG - Basic Shapes"
},
{
"url": "https://www.w3.org/TR/SVG2/painting.html",
"title": "SVG - Painting"
},
{
"url": "https://w3c.github.io/touch-events/",
"title": "Touch Events"
Expand Down
8 changes: 8 additions & 0 deletions inputfiles/removedTypes.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@
"corners": null,
"hangingPunctuation": null,
"blockOverflow": null,
"colorRendering": null,
"continue": null,
"lineClamp": null,
"maskBorder": null,
Expand Down Expand Up @@ -186,6 +187,13 @@
]
},
"SVGMatrix": null,
"SVGMarkerElement": {
"properties": {
"property": {
"orient": null
}
}
},
"SVGPatternElement": {
"implements": [
"SVGUnitTypes"
Expand Down
2 changes: 1 addition & 1 deletion src/idlfetcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const idlSelector = [
].join(",");

const cssPropSelector = [
".propdef dfn", // CSS Fonts, CSS Masking
".propdef dfn", // CSS Fonts
"dfn.css[data-dfn-type=property]"
].join(",");

Expand Down