-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Specify outerText #6653
Specify outerText #6653
Conversation
Closes #668.
|
||
<li><p>Let <var>input</var> be the given value.</p></li> | ||
<li><p>Let <var>fragment</var> be the <span>inner/outer text fragment</span> for the given value | ||
given <span>this</span>'s <span>node document</span>.</p></li> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Both Chromium and WebKit have a check after this point to see if the parent has disappeared due to mutation events. However I don't see how that'd be possible; no mutation events can fire due to the fragment creation, I am pretty sure. I'll see if any tests show that I'm wrong...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I couldn't find any tests in Chromium's corpus that tried to trigger the corresponding if statement.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've confirmed that not only could I not find them, they do not exist, according to our code coverage metrics. I' m not sure how much time I really want to devote to this, but I think the right thing to do would be to omit such a check from the spec, and have Chromium convert the check into an assert or use counter and see if it triggers anywhere in the wild.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As discussed, I've added a NOTREACHED to that branch, and I'll wait a few milestones to see if it ever gets triggered (by fuzzers or tests or whatever).
This accompanies whatwg/html#6653. Fixed: 710764 Change-Id: I7168df9bbaeef12ed256b7f2fb9c2c43c9d6b227
<h4 id="the-innertext-idl-attribute">The <code data-x="dom-innerText">innerText</code> getter and | ||
setter</h4> | ||
<h4 id="the-innertext-idl-attribute">The <code data-x="dom-innerText">innerText</code> and <code | ||
data-x="dom-outerText">outerText</code> properties</h4> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not getters and setters?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was getting too long so I thought this'd be nicer.
|
||
<li><p>If <var>next</var> is non-null and <var>next</var>'s <span>previous sibling</span> is a | ||
<code>Text</code> node, then <span>merge with the next text node</span> given <var>next</var>'s | ||
<span>previous sibling</span>.</p></li> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The previous sibling here could basically be anything at this point, if we're accounting for mutation events. But I guess this is how it works?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, we bail out if previous sibling (or previous sibling's next sibling) is not a Text node.
steps are to return the <span>rendered text</span> of <span>this</span>.</p> | ||
|
||
<p>The <dfn attribute for="HTMLElement"><code data-x="dom-outerText">outerText</code></dfn> getter | ||
steps are to return the <span>rendered text</span> of <span>this</span>.</p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Optional: one thing we could do to make it even clearer they are identical is write this as
The innerText and outerText getter steps are to ...
/cc @whatwg/documentation |
This accompanies whatwg/html#6653. Fixed: 710764 Change-Id: I7168df9bbaeef12ed256b7f2fb9c2c43c9d6b227 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2875725 Reviewed-by: Mason Freed <[email protected]> Commit-Queue: Domenic Denicola <[email protected]> Cr-Commit-Position: refs/heads/master@{#880460}
This accompanies whatwg/html#6653. Fixed: 710764 Change-Id: I7168df9bbaeef12ed256b7f2fb9c2c43c9d6b227 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2875725 Reviewed-by: Mason Freed <[email protected]> Commit-Queue: Domenic Denicola <[email protected]> Cr-Commit-Position: refs/heads/master@{#880460}
This accompanies whatwg/html#6653. Fixed: 710764 Change-Id: I7168df9bbaeef12ed256b7f2fb9c2c43c9d6b227 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2875725 Reviewed-by: Mason Freed <[email protected]> Commit-Queue: Domenic Denicola <[email protected]> Cr-Commit-Position: refs/heads/master@{#880460}
…estonly Automatic update from web-platform-tests Upstream and expand outerText tests This accompanies whatwg/html#6653. Fixed: 710764 Change-Id: I7168df9bbaeef12ed256b7f2fb9c2c43c9d6b227 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2875725 Reviewed-by: Mason Freed <[email protected]> Commit-Queue: Domenic Denicola <[email protected]> Cr-Commit-Position: refs/heads/master@{#880460} -- wpt-commits: e2bfe7b3d06bb26ff4d800087df6aad417feadfa wpt-pr: 28846
This accompanies whatwg/html#6653. Fixed: 710764 Change-Id: I7168df9bbaeef12ed256b7f2fb9c2c43c9d6b227 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2875725 Reviewed-by: Mason Freed <[email protected]> Commit-Queue: Domenic Denicola <[email protected]> Cr-Commit-Position: refs/heads/master@{#880460} NOKEYCHECK=True GitOrigin-RevId: c6af55fb96b25ca3047ccc8675268e22959bd5f7
Closes #668.
(See WHATWG Working Mode: Changes for more details.)
/custom-elements.html ( diff )
/dom.html ( diff )
/index.html ( diff )
/infrastructure.html ( diff )