Summary: | Inspector: Removing an Attribute via Edit should Delete the Attribute, Not Ignore Your Changes | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Joseph Pecoraro <joepeck> | ||||||||
Component: | Web Inspector (Deprecated) | Assignee: | Nobody <webkit-unassigned> | ||||||||
Status: | RESOLVED DUPLICATE | ||||||||||
Severity: | Normal | ||||||||||
Priority: | P2 | ||||||||||
Version: | 528+ (Nightly build) | ||||||||||
Hardware: | All | ||||||||||
OS: | OS X 10.5 | ||||||||||
Attachments: |
|
Description
Joseph Pecoraro
2009-07-21 16:55:24 PDT
Created attachment 33231 [details] Removing an Attribute Deletes the Attribute - And Fix Possible Exception NOTES: 1. This will delete an attribute _if_ that attribute previously existed. The only time an attribute would not previously exist would be if it is a "new" attribute. This means this is compatible with the (uncommitted) patch on the following bug to create new attributes: https://bugs.webkit.org/show_bug.cgi?id=21108 2. This fixes an error that has been around for a while where an invalid attribute from user input (such as "-") can cause an error. An example test case will be attached in a minute. Created attachment 33232 [details]
Example Page Showing the Caught Error
This shows why the try/catch fixes an error. If the user edits an attribute and changes all the text to "-" the innerHTML works fine but the setAttribute() would throw an Error.
Comment on attachment 33231 [details]
Removing an Attribute Deletes the Attribute - And Fix Possible Exception
This patch does not apply cleanly to TOT. I haven't looked whether the merge is trivial.
Created attachment 33439 [details]
Applies to ToT
- Fixed a Style Issue as well
Comment on attachment 33439 [details] Applies to ToT I added this functionality into bug 27673, which does more and includes this feature. |