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
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(-)
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?
> "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.
Comment on attachment 26908 [details] Remove the style='' turds left by some editing commmands r=me assuming you leave removeNodeAttribute in there as-is.
Thanks! http://trac.webkit.org/changeset/40101