Bug 55229 - REGRESSION (r66062) - inputElement.innerText = "" throws
Summary: REGRESSION (r66062) - inputElement.innerText = "" throws
Status: RESOLVED CONFIGURATION CHANGED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2011-02-25 10:11 PST by Brady Eidson
Modified: 2022-08-09 14:30 PDT (History)
7 users (show)

See Also:


Attachments
Test derived from (580 bytes, text/html)
2011-02-25 11:27 PST, Brady Eidson
no flags Details
Better test with explanatory text (754 bytes, text/html)
2011-02-25 11:29 PST, Brady Eidson
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Brady Eidson 2011-02-25 10:11:06 PST
REGRESSION (r66062) - set(Inner/Outer)Text on many types of elements throws an exception, and they didn't before.

Link to the change:
http://trac.webkit.org/changeset/66057
Link to the original bug:
https://bugs.webkit.org/show_bug.cgi?id=44626

ChangeLog says "this is just moving code and should have no functional change."

But by replacing the usage of "HTMLElement::endTagRequirement()" with "HTMLElement::ieForbidsInsertHTML()" in 3 key places in HTMLElement, it had functional change.

Before this change, HTMLElement::deprecatedCreateContextualFragment would only fail to return a fragment for <wbr> elements.  Now it fails for ~20 tag names listed in HTMLElement::ieForbidsInsertHTML()

Before this change, HTMLElement::setInnerText and HTMLElement::setOuterText only threw exceptions for 10 tag names they knew about, and <wbr>.
Now they throw exceptions for the 10 tag names they knew about, and the ~20 listed in HTMLElement::ieForbidsInsertHTML()

This broke compatibility with other browsers like Firefox and Opera.  It also *broke* compatibility with IE while purporting to match IE's rules, as noted in the FIXME comment in ieForbidsInsertHTML()

Test case coming soon...
Comment 1 Brady Eidson 2011-02-25 11:27:35 PST
Created attachment 83852 [details]
Test derived from

This is a test derived from a real world affected site my.schedulemaster.com

Sadly the real site requires logins and no pilot would be likely to hand theirs out (I sure am not).

But let's just say that a lot of pilots really like WebKit based browsers.  :)
Comment 2 Brady Eidson 2011-02-25 11:29:06 PST
Created attachment 83853 [details]
Better test with explanatory text
Comment 3 Brady Eidson 2011-02-25 11:32:42 PST
<rdar://problem/9055014>
Comment 4 Eric Seidel (no email) 2011-02-26 16:24:39 PST
innerText isn't spec'd, but the change in question was not supposed to change behavior.  Will investigate what changed.
Comment 5 Eric Seidel (no email) 2011-02-26 16:28:12 PST
Firefox doesn't support innerText, so the testcase is misleading.  I suspect the site in question follows a different codepath for firefox.
Comment 6 Eric Seidel (no email) 2011-02-26 16:29:34 PST
Has this shipped in a Safari?  I'm testing with Version 5.0.3 (6533.19.4) and I see the same exception as top of tree.
Comment 7 Brady Eidson 2011-02-27 10:21:33 PST
(In reply to comment #6)
> Has this shipped in a Safari?  I'm testing with Version 5.0.3 (6533.19.4) and I see the same exception as top of tree.

Hmmmm.  Admittedly and amusingly I'd never tried with Safari 5.0.3, I only tried with ToT and the patch partially rolled out.  Maybe "partially" rolled out invented the state I was expecting to see.

Will explore more when I'm around code on Monday.
Comment 8 Ahmad Saleem 2022-08-09 14:29:39 PDT
I am unable to reproduce this bug in Safari 15.6 on macOS 12.5 and it does not throw any exception in Console or no dialog box. It was similar to Firefox Nightly 105 and Chrome Canary 106.

Further, Safari also pass all test cases here:

https://wpt.fyi/results/html/dom/elements/the-innertext-and-outertext-properties/innertext-setter.html?label=master&label=experimental&aligned&view=subtest&q=innerText

I am going to mark this as "RESOLVED CONFIGURATION CHANGED" but if you are able to reproduce then please reopen this. Thanks!
Comment 9 Radar WebKit Bug Importer 2022-08-09 14:30:23 PDT
<rdar://problem/98406179>