WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
23463
WebKit leaves 'style=""' attribute turds after some editing commands
https://bugs.webkit.org/show_bug.cgi?id=23463
Summary
WebKit leaves 'style=""' attribute turds after some editing commands
Eric Seidel (no email)
Reported
2009-01-21 14:56:59 PST
WebKit leaves 'style=""' attribute turds after some editing commands An example:
http://trac.webkit.org/browser/trunk/LayoutTests/editing/execCommand/toggle-styles-expected.txt?rev=40097
Attachments
Remove the style='' turds left by some editing commmands
(5.62 KB, patch)
2009-01-21 15:04 PST
,
Eric Seidel (no email)
justin.garcia
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Eric Seidel (no email)
Comment 1
2009-01-21 15:04:33 PST
Created
attachment 26908
[details]
Remove the style='' turds left by some editing commmands LayoutTests/ChangeLog | 9 +++++++++ .../editing/execCommand/toggle-styles-expected.txt | 18 +++++++++--------- WebCore/ChangeLog | 14 ++++++++++++++ WebCore/editing/ApplyStyleCommand.cpp | 8 ++++++-- WebCore/editing/CompositeEditCommand.cpp | 2 +- 5 files changed, 39 insertions(+), 12 deletions(-)
Eric Seidel (no email)
Comment 2
2009-01-21 15:06:14 PST
Justin, I would like to know from you if I should be using "removeNodeAttribute" or if I should just be removing the attribute from the element directly (without going through all the compositEditCommand stuff). What's the benefit of removeNodeAttribute?
Justin Garcia
Comment 3
2009-01-21 15:11:59 PST
> "removeNodeAttribute" or if I should just be removing the attribute from the > element directly (without going through all the compositEditCommand stuff). > What's the benefit of removeNodeAttribute?
removeNodeAttribute is the Undo-able operation. I think you need to use that one, since later on Undo we might try to add property/values to the style attribute, and if it's not there we could run into trouble.
Justin Garcia
Comment 4
2009-01-21 15:14:39 PST
Comment on
attachment 26908
[details]
Remove the style='' turds left by some editing commmands r=me assuming you leave removeNodeAttribute in there as-is.
Eric Seidel (no email)
Comment 5
2009-01-21 15:50:00 PST
Thanks!
http://trac.webkit.org/changeset/40101
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug