Skip to content

Commit

Permalink
Address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
zcorpan committed Sep 10, 2021
1 parent 06f45ef commit 893e220
Showing 1 changed file with 17 additions and 128 deletions.
145 changes: 17 additions & 128 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -117339,29 +117339,17 @@ input[type=image i][align=bottom i], object[align=bottom i] {
<h4>Determine what widget an HTML element can be</h4>

<p>The <cite>CSS Basic User Interface</cite> specification defines how to determine what
<span>kind of widget</span> an element can be. This section defines which elements <span>can be a
button</span>, <span>can be a textfield</span>, <span>can be a searchfield</span>, <span>can be a
slider-horizontal</span>, <span>can be a menulist-button</span>, <span>can be a menulist</span>,
<span>can be a textarea</span>, <span>can be a progress-bar</span>, <span>can be a meter</span>.
<ref spec=CSSUI></p>


<h5>Determine if element can be a button</h5>
<span>kind of widget</span> an element can be. This section defines which elements match these
concepts for HTML. <ref spec=CSSUI></p>

<p>To determine if an element <var>element</var> <span>can be a button</span>, given
<var>computedAppearance</var>:</p>

<ol>
<li><p>If <var>element</var>'s <span data-x="concept-element-namespace">namespace</span> is not
the <span>HTML namespace</span>, then return false.</p></li>

<li><p>Let <var>localName</var> be <var>element</var>'s <span
data-x="concept-custom-element-definition-local-name">local name</span>.</p></li>

<li><p>If <var>localName</var> is "<code data-x="">button</code>", then return true.</p></li>
<li><p>If <var>element</var> is a <code>button</code> element, then return true.</p></li>

<li>
<p>If <var>localName</var> is "<code data-x="">input</code>", then:</p>
<p>If <var>element</var> is an <code>input</code> element, then:</p>

<ol>
<li><p>Let <var>inputState</var> be <var>element</var>'s <code
Expand All @@ -117378,28 +117366,19 @@ input[type=image i][align=bottom i], object[align=bottom i] {
<li><p>Return false.</p></li>
</ol>


<h5>Determine if element can be a textfield</h5>

<p>To determine if an element <var>element</var> <span>can be a textfield</span>, given
<var>computedAppearance</var>:</p>

<ol>
<li><p>If <var>element</var>'s <span data-x="concept-element-namespace">namespace</span> is not
the <span>HTML namespace</span>, then return false.</p></li>

<li><p>Let <var>localName</var> be <var>element</var>'s <span
data-x="concept-custom-element-definition-local-name">local name</span>.</p></li>

<li>
<p>If <var>localName</var> is "<code data-x="">input</code>", then:</p>
<p>If <var>element</var> is an <code>input</code> element, then:</p>

<ol>
<li><p>Let <var>inputState</var> be <var>element</var>'s <code
data-x="attr-input-type">type</code> attribute's state.</p></li>

<li>
<p>If one of the following are true, then return true:</p>
<p>If either of the following are true, then return true:</p>

<ul class="brief">
<li><var>inputState</var> is one of <span data-x="attr-input-type-text">Text</span>, <span
Expand All @@ -117410,7 +117389,7 @@ input[type=image i][align=bottom i], object[align=bottom i] {
<span data-x="attr-input-type-week">Week</span>, <span
data-x="attr-input-type-time">Time</span>, <span
data-x="attr-input-type-datetime-local">Local Date and Time</span>, or <span
data-x="attr-input-type-number">Number</span> or,</li>
data-x="attr-input-type-number">Number</span>; or</li>

<li><var>inputState</var> is <span data-x="attr-input-type-search">Search</span> and
<var>computedAppearance</var> is 'textfield'.</li>
Expand All @@ -117422,194 +117401,104 @@ input[type=image i][align=bottom i], object[align=bottom i] {
<li><p>Return false.</p></li>
</ol>


<h5>Determine if element can be a searchfield</h5>

<p>To determine if an element <var>element</var> <span>can be a searchfield</span>, given
<var>computedAppearance</var>:</p>

<ol>
<li><p>If <var>element</var>'s <span data-x="concept-element-namespace">namespace</span> is not
the <span>HTML namespace</span>, then return false.</p></li>

<li><p>Let <var>localName</var> be <var>element</var>'s <span
data-x="concept-custom-element-definition-local-name">local name</span>.</p></li>

<li><p>If <var>localName</var> is "<code data-x="">input</code>" and <var>element</var>'s <code
<li><p>If <var>element</var> is an <code>input</code> element and <var>element</var>'s <code
data-x="attr-input-type">type</code> attribute's state is <span
data-x="attr-input-type-search">Search</span>, then return true.</p></li>

<li><p>Return false.</p></li>
</ol>


<h5>Determine if element can be a slider-horizontal</h5>

<p>To determine if an element <var>element</var> <span>can be a slider-horizontal</span>, given
<var>computedAppearance</var>:</p>

<ol>
<li><p>If <var>element</var>'s <span data-x="concept-element-namespace">namespace</span> is not
the <span>HTML namespace</span>, then return false.</p></li>

<li><p>Let <var>localName</var> be <var>element</var>'s <span
data-x="concept-custom-element-definition-local-name">local name</span>.</p></li>

<li><p>If <var>localName</var> is "<code data-x="">input</code>" and <var>element</var>'s <code
<li><p>If <var>element</var> is an <code>input</code> element and <var>element</var>'s <code
data-x="attr-input-type">type</code> attribute's state is <span
data-x="attr-input-type-range">Range</span>, then return true.</p></li>

<li><p>Return false.</p></li>
</ol>


<h5>Determine if element can be a checkbox</h5>

<p>To determine if an element <var>element</var> <span>can be a checkbox</span>, given
<var>computedAppearance</var>:</p>

<ol>
<li><p>If <var>element</var>'s <span data-x="concept-element-namespace">namespace</span> is not
the <span>HTML namespace</span>, then return false.</p></li>

<li><p>Let <var>localName</var> be <var>element</var>'s <span
data-x="concept-custom-element-definition-local-name">local name</span>.</p></li>

<li><p>If <var>localName</var> is "<code data-x="">input</code>" and <var>element</var>'s <code
<li><p>If <var>element</var> is an <code>input</code> element and <var>element</var>'s <code
data-x="attr-input-type">type</code> attribute's state is <span
data-x="attr-input-type-checkbox">Checkbox</span>, then return true.</p></li>

<li><p>Return false.</p></li>
</ol>


<h5>Determine if element can be a radio</h5>

<p>To determine if an element <var>element</var> <span>can be a radio</span>, given
<var>computedAppearance</var>:</p>

<ol>
<li><p>If <var>element</var>'s <span data-x="concept-element-namespace">namespace</span> is not
the <span>HTML namespace</span>, then return false.</p></li>

<li><p>Let <var>localName</var> be <var>element</var>'s <span
data-x="concept-custom-element-definition-local-name">local name</span>.</p></li>

<li><p>If <var>localName</var> is "<code data-x="">input</code>" and <var>element</var>'s <code
<li><p>If <var>element</var> is an <code>input</code> element and <var>element</var>'s <code
data-x="attr-input-type">type</code> attribute's state is <span
data-x="attr-input-type-radio">Radio</span>, then return true.</p></li>

<li><p>Return false.</p></li>
</ol>


<h5>Determine if element can be a listbox</h5>

<p>To determine if an element <var>element</var> <span>can be a listbox</span>, given
<var>computedAppearance</var>:</p>

<ol>
<li><p>If <var>element</var>'s <span data-x="concept-element-namespace">namespace</span> is not
the <span>HTML namespace</span>, then return false.</p></li>

<li><p>Let <var>localName</var> be <var>element</var>'s <span
data-x="concept-custom-element-definition-local-name">local name</span>.</p></li>

<li><p>If <var>localName</var> is "<code data-x="">select</code>" and <var>element</var> is a
<li><p>If <var>element</var> is a <code>select</code> element and <var>element</var> is a
<span>list box</span>, then return true.</p></li>

<li><p>Return false.</p></li>
</ol>


<h5>Determine if element can be a menulist</h5>

<p>To determine if an element <var>element</var> <span>can be a menulist</span>, given
<var>computedAppearance</var>:</p>

<ol>
<li><p>If <var>element</var>'s <span data-x="concept-element-namespace">namespace</span> is not
the <span>HTML namespace</span>, then return false.</p></li>

<li><p>Let <var>localName</var> be <var>element</var>'s <span
data-x="concept-custom-element-definition-local-name">local name</span>.</p></li>

<li><p>If <var>localName</var> is "<code data-x="">select</code>" and <var>element</var> is a
<li><p>If <var>element</var> is a <code>select</code> element and <var>element</var> is a
<span>drop-down box</span>, then return true.</p></li>

<li><p>Return false.</p></li>
</ol>


<h5>Determine if element can be a menulist-button</h5>

<p>To determine if an element <var>element</var> <span>can be a menulist-button</span>, given
<var>computedAppearance</var>:</p>

<ol>
<li><p>If <var>element</var>'s <span data-x="concept-element-namespace">namespace</span> is not
the <span>HTML namespace</span>, then return false.</p></li>

<li><p>Let <var>localName</var> be <var>element</var>'s <span
data-x="concept-custom-element-definition-local-name">local name</span>.</p></li>

<li><p>If <var>localName</var> is "<code data-x="">select</code>", <var>element</var> is a
<li><p>If <var>element</var> is a <code>select</code> element, <var>element</var> is a
<span>drop-down box</span>, and <var>computedAppearance</var> is 'menulist-button', then return
true.</p></li>

<li><p>Return false.</p></li>
</ol>


<h5>Determine if element can be a textarea</h5>

<p>To determine if an element <var>element</var> <span>can be a textarea</span>, given
<var>computedAppearance</var>:</p>

<ol>
<li><p>If <var>element</var>'s <span data-x="concept-element-namespace">namespace</span> is not
the <span>HTML namespace</span>, then return false.</p></li>

<li><p>Let <var>localName</var> be <var>element</var>'s <span
data-x="concept-custom-element-definition-local-name">local name</span>.</p></li>

<li><p>If <var>localName</var> is "<code data-x="">textarea</code>", then return true.</p></li>
<li><p>If <var>element</var> is a <code>textarea</code> element, then return true.</p></li>

<li><p>Return false.</p></li>
</ol>


<h5>Determine if element can be a progress-bar</h5>

<p>To determine if an element <var>element</var> <span>can be a progress-bar</span>, given
<var>computedAppearance</var>:</p>

<ol>
<li><p>If <var>element</var>'s <span data-x="concept-element-namespace">namespace</span> is not
the <span>HTML namespace</span>, then return false.</p></li>

<li><p>Let <var>localName</var> be <var>element</var>'s <span
data-x="concept-custom-element-definition-local-name">local name</span>.</p></li>

<li><p>If <var>localName</var> is "<code data-x="">progress</code>", then return true.</p></li>
<li><p>If <var>element</var> is a <code>progress</code> element, then return true.</p></li>

<li><p>Return false.</p></li>
</ol>


<h5>Determine if element can be a meter</h5>

<p>To determine if an element <var>element</var> <span>can be a meter</span>, given
<var>computedAppearance</var>:</p>

<ol>
<li><p>If <var>element</var>'s <span data-x="concept-element-namespace">namespace</span> is not
the <span>HTML namespace</span>, then return false.</p></li>

<li><p>Let <var>localName</var> be <var>element</var>'s <span
data-x="concept-custom-element-definition-local-name">local name</span>.</p></li>

<li><p>If <var>localName</var> is "<code data-x="">meter</code>", then return true.</p></li>
<li><p>If <var>element</var> is a <code>meter</code> element, then return true.</p></li>

<li><p>Return false.</p></li>
</ol>
Expand Down

0 comments on commit 893e220

Please sign in to comment.