Skip to content

Commit baeda67

Browse files
committed
[cssom, cssom-view] generate anolis compatible dfn wrappers for idl members; change dom- to widl- in title refs
1 parent b95fff6 commit baeda67

16 files changed

Lines changed: 480 additions & 366 deletions

cssom-view/Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,20 +35,20 @@ Overview.src.html: $(SPECGEN) $(JSONFILE) $(SPECSRC)
3535
$(NODE) $(SPECGEN) $(JSONFILE) $(SPECSRC) > $@
3636

3737
$(XREFS): Overview.src.html Makefile
38-
$(ANOLIS) --dump-xrefs=$@ $< /tmp/spec; $(RM) /tmp/spec
38+
$(ANOLIS) --allow-duplicate-dfns --dump-xrefs=$@ $< /tmp/spec; $(RM) /tmp/spec
3939

4040
$(EDFILE): Overview.src.html $(XREFS) Makefile
4141
$(ANOLIS) --output-encoding=utf-8 --omit-optional-tags --quote-attr-values \
4242
--w3c-compat --enable=xspecxref --enable=refs --w3c-shortname="cssom-view" \
43-
--force-html4-id --filter=".publish" --split-references-section $< $@
43+
--force-html4-id --filter=".publish" --split-references-section --allow-duplicate-dfns $< $@
4444

4545
draft: $(EDFILE)
4646

4747
$(TRFILE): Overview.src.html $(XREFS) Makefile
4848
$(ANOLIS) --output-encoding=utf-8 --omit-optional-tags --quote-attr-values \
4949
--w3c-compat --enable=xspecxref --enable=refs --w3c-shortname="cssom-view" \
5050
--force-html4-id --filter=".dontpublish" --pubdate="$(PUBDATE)" --split-references-section \
51-
--w3c-status=WD $< $@
51+
--w3c-status=WD --allow-duplicate-dfns $< $@
5252

5353
publish: $(TRFILE)
5454

cssom-view/Overview.html

Lines changed: 146 additions & 146 deletions
Large diffs are not rendered by default.

cssom-view/cssom-view-source

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ out of memory, or to work around platform-specific limitations.
212212
specification are in CSS pixels. <!--<span data-anolis-ref>CSS</span>-->
213213

214214
<p class="note">This does not apply to e.g.
215-
<code title=dom-Window-matchMedia>matchMedia()</code> as the units
215+
<code title=widl-Window-matchMedia>matchMedia()</code> as the units
216216
are explicitly given there.</p>
217217

218218

@@ -247,7 +247,7 @@ out of memory, or to work around platform-specific limitations.
247247
<h3>The <code title>getClientRects()</code> and
248248
<code title>getBoundingClientRect()</code> methods</h3>
249249

250-
<p>The <code title=dom-Element-getClientRects>getClientRects()</code> and <code title=dom-Element-getBoundingClientRect>getBoundingClientRect()</code>
250+
<p>The <code title=widl-Element-getClientRects>getClientRects()</code> and <code title=widl-Element-getBoundingClientRect>getBoundingClientRect()</code>
251251
methods provide information about the position of the border box edges of
252252
an element relative to the viewport. The objects these methods return
253253
must be static. That is, changes to the underlying
@@ -343,10 +343,10 @@ out of memory, or to work around platform-specific limitations.
343343
<code title>clientLeft</code>, <code title>clientWidth</code>, and
344344
<code title>clientHeight</code> attributes</h3>
345345

346-
<p>The <dfn title=dom-Element-clientTop><code>clientTop</code></dfn>,
347-
<dfn title=dom-Element-clientLeft><code>clientLeft</code></dfn>,
348-
<dfn title=dom-Element-clientWidth><code>clientWidth</code></dfn>, and
349-
<dfn title=dom-Element-clientHeight><code>clientHeight</code></dfn>
346+
<p>The <code title=widl-lElement-clientTop>clientTop</code>,
347+
<code title=widl-Element-clientLeft>clientLeft</code>,
348+
<code title=widl-Element-clientWidth>clientWidth</code>, and
349+
<code title=widl-Element-clientHeight>clientHeight</code>
350350
attributes must return zero if the element does not
351351
have any associated <span>CSS layout box</span> or if the <span>CSS layout box</span> is inline.
352352
Otherwise, these attributes must behave as defined in

cssom-view/idl/CaretPosition.idl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ interface CaretPosition {
2323
<p>If <span>caret range</span> is not null:\
2424
<ol>\
2525
<li><p>Let <var>list</var> be the result of invoking the\
26-
<code title=dom-Range-getClientRects>getClientRects()</code> method on the\
26+
<code title=widl-Range-getClientRects>getClientRects()</code> method on the\
2727
range.\
2828
<li><p>If <var>list</var> is empty, return null.\
2929
<li><p>Return the <code>ClientRect</code> object in <var>list</var> at index 0.\

cssom-view/idl/ClientRect.idl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@ interface ClientRect {
2626

2727
[Documentation=
2828
"<p>The {@name} {@type} must return the width of the rectangle box.</p>\
29-
<p class='note'>This is identical to <code title='dom-ClientRect-right'>right</code> minus <code title='dom-ClientRect-left'>left</code>.</p>"
29+
<p class='note'>This is identical to <code title='widl-ClientRect-right'>right</code> minus <code title='widl-ClientRect-left'>left</code>.</p>"
3030
]
3131
readonly attribute float width;
3232

3333
[Documentation=
3434
"<p>The {@name} {@type} must return the height of the rectangle box.</p>\
35-
<p class='note'>This is identical to <code title='dom-ClientRect-bottom'>bottom</code> minus <code title='dom-ClientRect-top'>top</code>.</p>"
35+
<p class='note'>This is identical to <code title='widl-ClientRect-bottom'>bottom</code> minus <code title='widl-ClientRect-top'>top</code>.</p>"
3636
]
3737
readonly attribute float height;
3838

cssom-view/idl/Document.idl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ partial interface Document {
5454
</ol>\
5555
<p class='note'>The specifics of hit testing are out of scope of this\
5656
specification and therefore the exact details of\
57-
<code title=dom-Document-elementFromPoint>elementFromPoint()</code> and\
58-
<code title=dom-Document-caretPositionFromPoint>caretPositionFromPoint()</code>\
57+
<code title=widl-Document-elementFromPoint>elementFromPoint()</code> and\
58+
<code title=widl-Document-caretPositionFromPoint>caretPositionFromPoint()</code>\
5959
are therefore too. Hit testing will hopefully be defined in a future\
6060
revision of CSS or HTML.</p>"
6161
]

cssom-view/idl/Element.idl

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,13 @@ partial interface Element {
3838
"<p>The {@name} {@type}, when invoked, must return the result of the following algorithm:</p>\
3939
<ol>\
4040
<li><p>Let <var>list</var> be the result of invoking\
41-
<code title=dom-Element-getClientRects>getClientRects()</code> on the\
41+
<code title=widl-Element-getClientRects>getClientRects()</code> on the\
4242
same element this method was invoked on.</p></li>\
4343
<li><p>If the <var>list</var> is empty return a <code>ClientRect</code>\
44-
object whose <code title=dom-ClientRect-top>top</code>,\
45-
<code title=dom-ClientRect-right>right</code>,\
46-
<code title=dom-ClientRect-bottom>bottom</code> and\
47-
<code title=dom-ClientRect-left>left</code> members are zero.</p></li>\
44+
object whose <code title=widl-ClientRect-top>top</code>,\
45+
<code title=widl-ClientRect-right>right</code>,\
46+
<code title=widl-ClientRect-bottom>bottom</code> and\
47+
<code title=widl-ClientRect-left>left</code> members are zero.</p></li>\
4848
<li><p>Otherwise, return a <code>ClientRect</code> object describing the\
4949
smallest rectangle that includes the first rectangle in <var>list</var>\
5050
and all of the remaining rectangles of which the height or width is not\
@@ -77,11 +77,11 @@ var exampleHeight = example.height;</code></pre>\
7777
element is the root element and the <code data-anolis-spec=dom>Document</code> is in\
7878
<span data-anolis-spec=dom title=concept-quirks-mode>quirks mode</span> return zero and terminate these steps.</p></li>\
7979
<li><p>If the element is the root element return the value of\
80-
<code title='dom-Window-scrollY'>scrollY</code>.</p></li>\
80+
<code title='widl-Window-scrollY'>scrollY</code>.</p></li>\
8181
<li><p>If the element is <span>the HTML <code>body</code> element</span>,\
8282
the <code data-anolis-spec=dom>Document</code> is in <span data-anolis-spec=dom title=concept-quirks-mode>quirks mode</span>, and the element\
8383
does not have any overflow, return the value of\
84-
<code title=dom-Window-scrollY>scrollY</code>.</p></li>\
84+
<code title=widl-Window-scrollY>scrollY</code>.</p></li>\
8585
<li><p>Return the y-coordinate of the <span>content</span> at the\
8686
alignment point with the top of the <span>content edge</span> of the\
8787
element.</p></li>\
@@ -94,16 +94,16 @@ var exampleHeight = example.height;</code></pre>\
9494
<span data-anolis-spec=dom title=concept-quirks-mode>quirks mode</span>, or the element has no overflow, terminate these\
9595
steps.</p></li>\
9696
<li><p>If the element is the root element invoke\
97-
<code title=dom-Window-scroll>scroll()</code> with zero as first\
97+
<code title=widl-Window-scroll>scroll()</code> with zero as first\
9898
argument and <var title>y</var> as second.</p></li>\
9999
<li><p>If the element is <span>the HTML <code>body</code> element</span>,\
100100
the <code data-anolis-spec=dom>Document</code> is in <span data-anolis-spec=dom title=concept-quirks-mode>quirks mode</span>, and the element\
101101
does not have any vertical overflow, invoke\
102-
<code title=dom-Window-scroll>scroll()</code> with\
103-
<code title=dom-Window-scrollX>scrollX</code> as first\
102+
<code title=widl-Window-scroll>scroll()</code> with\
103+
<code title=widl-Window-scrollX>scrollX</code> as first\
104104
argument and <var title>y</var> as second.</p></li>\
105105
<li><p><span title='scroll an element'>Scroll the element</span> to\
106-
<code title=dom-Element-scrollLeft>scrollLeft</code>,<var title>y</var>.\
106+
<code title=widl-Element-scrollLeft>scrollLeft</code>,<var title>y</var>.\
107107
</ol>"
108108
]
109109
attribute long scrollTop;
@@ -115,11 +115,11 @@ var exampleHeight = example.height;</code></pre>\
115115
element is the root element and the <code data-anolis-spec=dom>Document</code> is in\
116116
<span data-anolis-spec=dom title=concept-quirks-mode>quirks mode</span> return zero and terminate these steps.</p></li>\
117117
<li><p>If the element is the root element return the value of\
118-
<code title=dom-Window-scrollX>scrollX</code>.</p></li>\
118+
<code title=widl-Window-scrollX>scrollX</code>.</p></li>\
119119
<li><p>If the element is <span>the HTML <code>body</code> element</span>,\
120120
the <code data-anolis-spec=dom>Document</code> is in <span data-anolis-spec=dom title=concept-quirks-mode>quirks mode</span>, and the element\
121121
does not have any overflow, return the value of\
122-
<code title=dom-Window-scrollX>scrollX</code>.</p></li>\
122+
<code title=widl-Window-scrollX>scrollX</code>.</p></li>\
123123
<li><p>Return the x-coordinate of the <span>content</span> at the\
124124
alignment point with the left of the <span>content edge</span> of the\
125125
element.</p></li>\
@@ -132,16 +132,16 @@ var exampleHeight = example.height;</code></pre>\
132132
<span data-anolis-spec=dom title=concept-quirks-mode>quirks mode</span>, or the element has no overflow, terminate these\
133133
steps.</p></li>\
134134
<li><p>If the element is the root element invoke\
135-
<code title=dom-Window-scroll>scroll()</code> with\
135+
<code title=widl-Window-scroll>scroll()</code> with\
136136
<var title>x</var> as first argument and zero as second.</p></li>\
137137
<li><p>If the element is <span>the HTML <code>body</code> element</span>,\
138138
the <code data-anolis-spec=dom>Document</code> is in <span data-anolis-spec=dom title=concept-quirks-mode>quirks mode</span>, and the element\
139139
does not have any vertical overflow, invoke\
140-
<code title='dom-Window-scroll'>scroll()</code> with\
140+
<code title='widl-Window-scroll'>scroll()</code> with\
141141
<var title>x</var> as first argument and\
142-
<code title=dom-Window-scrollY>scrollY</code> as second.</p></li>\
142+
<code title=widl-Window-scrollY>scrollY</code> as second.</p></li>\
143143
<li><p><span title='Scroll an element'>Scroll the element</span> to\
144-
<var title>x</var>,<code title=dom-Element-scrollTop>scrollTop</code>.\
144+
<var title>x</var>,<code title=widl-Element-scrollTop>scrollTop</code>.\
145145
</ol>"
146146
]
147147
attribute long scrollLeft;
@@ -154,11 +154,11 @@ var exampleHeight = example.height;</code></pre>\
154154
<li><p>If the element is the root element and the\
155155
<code data-anolis-spec=dom>Document</code> is not in\
156156
<span data-anolis-spec=dom title=concept-quirks-mode>quirks mode</span>\
157-
return max(<span>document content</span> width, value of <code title=dom-Window-innerWidth>innerWidth</code>).</p></li>\
157+
return max(<span>document content</span> width, value of <code title=widl-Window-innerWidth>innerWidth</code>).</p></li>\
158158
<li><p>If the element is <span>the HTML <code>body</code> element</span>\
159159
and the <code data-anolis-spec=dom>Document</code> is in\
160160
<span data-anolis-spec=dom title=concept-quirks-mode>quirks mode</span>\
161-
return max(<span>document content</span> width, value of <code title=dom-Window-innerWidth>innerWidth</code>).</p></li>\
161+
return max(<span>document content</span> width, value of <code title=widl-Window-innerWidth>innerWidth</code>).</p></li>\
162162
<li><p>Return the computed value of the '<code>padding-left</code>'\
163163
property, plus the computed value of the '<code>padding-right</code>',\
164164
plus the <span>content</span> width of the element.</p></li>\
@@ -174,11 +174,11 @@ var exampleHeight = example.height;</code></pre>\
174174
<li><p>If the element is the root element and the\
175175
<code data-anolis-spec=dom>Document</code> is not in\
176176
<span data-anolis-spec=dom title=concept-quirks-mode>quirks mode</span>\
177-
return max(<span>document content</span> height, value of <code title=dom-Window-innerHeight>innerHeight</code>).</p></li>\
177+
return max(<span>document content</span> height, value of <code title=widl-Window-innerHeight>innerHeight</code>).</p></li>\
178178
<li><p>If the element is <span>the HTML <code>body</code> element</span>\
179179
and the <code data-anolis-spec=dom>Document</code> is in\
180180
<span data-anolis-spec=dom title=concept-quirks-mode>quirks mode</span>\
181-
return max(<span>document content</span> height, value of <code title=dom-Window-innerHeight>innerHeight</code>).</p></li>\
181+
return max(<span>document content</span> height, value of <code title=widl-Window-innerHeight>innerHeight</code>).</p></li>\
182182
<li><p>Return the computed value of the '<code>padding-top</code>'\
183183
property, plus the computed value of the '<code>padding-bottom</code>',\
184184
plus the <span>content</span> height of the element.</p></li>\

cssom-view/idl/HTMLElement.idl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,15 @@ partial interface HTMLElement {
3838
<li><p>If the element is <span>the HTML <code>body</code> element</span>\
3939
or does not have any associated <span>CSS layout box</span> return zero and terminate\
4040
this algorithm.</p></li>\
41-
<li><p>If the <code title=dom-HTMLElement-offsetParent>offsetParent</code> of the element is null return the\
41+
<li><p>If the <code title=widl-HTMLElement-offsetParent>offsetParent</code> of the element is null return the\
4242
y-coordinate of the top <span>border edge</span> of the first\
4343
<span>CSS layout box</span> associated with the element, relative to the\
4444
<span>initial containing block</span> origin, and terminate this\
4545
algorithm.</p></li>\
4646
<li>\
4747
<p>Return the result of subtracting the y-coordinate of the top\
4848
<span>padding edge</span> of the first <span>CSS layout box</span> associated with\
49-
the <code title=dom-HTMLElement-offsetParent>offsetParent</code> of the element from the y-coordinate of\
49+
the <code title=widl-HTMLElement-offsetParent>offsetParent</code> of the element from the y-coordinate of\
5050
the top <span>border edge</span> of the first <span>CSS layout box</span> associated\
5151
with the element, relative to the <span>initial containing block</span>\
5252
origin.</p>\
@@ -63,15 +63,15 @@ partial interface HTMLElement {
6363
<li><p>If the element is <span>the HTML <code>body</code>\
6464
element</span> or does not have any associated <span>CSS layout box</span> return zero\
6565
and terminate this algorithm.</p></li>\
66-
<li><p>If the <code title=dom-HTMLElement-offsetParent>offsetParent</code> of the element is null return the\
66+
<li><p>If the <code title=widl-HTMLElement-offsetParent>offsetParent</code> of the element is null return the\
6767
x-coordinate of the left <span>border edge</span> of the first\
6868
<span>CSS layout box</span> associated with the element, relative to the\
6969
<span>initial containing block</span> origin, and terminate this\
7070
algorithm.</p></li>\
7171
<li>\
7272
<p>Return the result of subtracting the x-coordinate of the left\
7373
<span>padding edge</span> of the first <span>CSS layout box</span> associated with\
74-
the <code title=dom-HTMLElement-offsetParent>offsetParent</code> of the element from the x-coordinate of\
74+
the <code title=widl-HTMLElement-offsetParent>offsetParent</code> of the element from the x-coordinate of\
7575
the left <span>border edge</span> of the first <span>CSS layout box</span> associated\
7676
with the element, relative to the <span>initial containing block</span>\
7777
origin.</p>\

cssom-view/idl/MouseEvent.idl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,12 @@ partial interface MouseEvent {
4545
readonly attribute long clientY;
4646

4747
[Documentation=
48-
"<p>The {@name} {@type} must return the value of <code title=dom-MouseEvent-clientX>clientX</code>.</p>"
48+
"<p>The {@name} {@type} must return the value of <code title=widl-MouseEvent-clientX>clientX</code>.</p>"
4949
]
5050
readonly attribute long x;
5151

5252
[Documentation=
53-
"<p>The {@name} {@type} must return the value of <code title=dom-MouseEvent-clientY>clientY</code>.</p>"
53+
"<p>The {@name} {@type} must return the value of <code title=widl-MouseEvent-clientY>clientY</code>.</p>"
5454
]
5555
readonly attribute long y;
5656

cssom-view/idl/Range.idl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ partial interface Range {
1010
<ul>\
1111
<li>For each element selected by the range, whose parent is not selected\
1212
by the range, include the border boxes returned by invoking\
13-
<code title=dom-Element-getClientRects>getClientRects()</code> on the\
13+
<code title=widl-Element-getClientRects>getClientRects()</code> on the\
1414
element.</li>\
1515
<li>For each <code>Text</code> node selected or partially selected by the\
1616
range (including when the boundary-points are identical), include a\
@@ -27,14 +27,14 @@ partial interface Range {
2727
"<p>The {@name} {@type}, when invoked, must return the result of the following algorithm:</p>\
2828
<ol>\
2929
<li><p>Let <var>list</var> be the result of invoking\
30-
<code title=dom-Range-getClientRects>getClientRects()</code> on the\
30+
<code title=widl-Range-getClientRects>getClientRects()</code> on the\
3131
same range this method was invoked on.</p></li>\
3232
<li><p>If <var>list</var> is empty return a\
3333
<code>ClientRect</code> object whose\
34-
<code title=dom-ClientRect-top>top</code>,\
35-
<code title=dom-ClientRect-right>right</code>,\
36-
<code title=dom-ClientRect-bottom>bottom</code> and\
37-
<code title=dom-ClientRect-left>left</code> members are zero.</p></li>\
34+
<code title=widl-ClientRect-top>top</code>,\
35+
<code title=widl-ClientRect-right>right</code>,\
36+
<code title=widl-ClientRect-bottom>bottom</code> and\
37+
<code title=widl-ClientRect-left>left</code> members are zero.</p></li>\
3838
<li><p>Otherwise, return a <code>ClientRect</code> object describing the\
3939
smallest rectangle that includes the first rectangle in <var>list</var>\
4040
and all of the remaining rectangles of which the height or width is not\

0 commit comments

Comments
 (0)