Bug 83240

Summary: Provide a separate editing command to cleanup of redundant markup
Product: WebKit Reporter: Enrica Casucci <enrica>
Component: HTML EditingAssignee: Enrica Casucci <enrica>
Status: RESOLVED FIXED    
Severity: Normal CC: dglazkov, gustavo, pnormand, rakuco, webkit.review.bot, xan.lopez
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
pnormand: commit-queue-
Patch2
rniwa: review+, pnormand: commit-queue-
Patch to check builds
none
One more
none
Resolved conflict none

Enrica Casucci
Reported 2012-04-04 18:16:48 PDT
The markup cleanup is currently implemented as part of the ReplaceSelection command. We want to move it into a separate command so that it can be performed independently from ReplaceSelection.
Attachments
Patch (20.06 KB, patch)
2012-04-04 18:24 PDT, Enrica Casucci
pnormand: commit-queue-
Patch2 (20.97 KB, patch)
2012-04-04 19:12 PDT, Enrica Casucci
rniwa: review+
pnormand: commit-queue-
Patch to check builds (21.50 KB, patch)
2012-04-05 11:17 PDT, Enrica Casucci
no flags
One more (21.50 KB, patch)
2012-04-05 11:24 PDT, Enrica Casucci
no flags
Resolved conflict (21.61 KB, patch)
2012-04-05 13:12 PDT, Enrica Casucci
no flags
Enrica Casucci
Comment 1 2012-04-04 18:24:00 PDT
Philippe Normand
Comment 2 2012-04-04 18:28:24 PDT
Build Bot
Comment 3 2012-04-04 18:47:49 PDT
Build Bot
Comment 4 2012-04-04 18:50:26 PDT
WebKit Review Bot
Comment 5 2012-04-04 18:58:51 PDT
Comment on attachment 135738 [details] Patch Attachment 135738 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/12337078
Enrica Casucci
Comment 6 2012-04-04 19:12:59 PDT
Created attachment 135745 [details] Patch2 Attempting to fix build issues.
Philippe Normand
Comment 7 2012-04-04 19:16:53 PDT
Ryosuke Niwa
Comment 8 2012-04-05 10:34:44 PDT
Comment on attachment 135745 [details] Patch2 View in context: https://bugs.webkit.org/attachment.cgi?id=135745&action=review Please fix the gtk build before you land. Also, you probably need to modify EditorAllInOne.cpp for Windows. > Source/WebCore/editing/ReplaceSelectionCommand.cpp:1023 > - removeRedundantMarkup(insertedNodes); > + applyCommandToComposite(SimplifyMarkupCommand::create(document(), insertedNodes.firstNodeInserted(), insertedNodes.pastLastLeaf())); You should add simplifyMarkup() to CompositeEditCommand. > Source/WebCore/editing/SimplifyMarkupCommand.cpp:2 > + * Copyright (C) 2005, 2006 Apple Computer, Inc. All rights reserved. Maybe you should add 2011 here?
Enrica Casucci
Comment 9 2012-04-05 11:10:05 PDT
(In reply to comment #8) > (From update of attachment 135745 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=135745&action=review > > Please fix the gtk build before you land. I don't believe I broke it. The message is obscure. I'll post another patch and watch the bots to make sure. Also, you probably need to modify EditorAllInOne.cpp for Windows. Ok > > You should add simplifyMarkup() to CompositeEditCommand. I can do that in a later patch. > > > Source/WebCore/editing/SimplifyMarkupCommand.cpp:2 > > + * Copyright (C) 2005, 2006 Apple Computer, Inc. All rights reserved. > > Maybe you should add 2011 here? Actually 2012! Good catch.
Enrica Casucci
Comment 10 2012-04-05 11:17:56 PDT
Created attachment 135863 [details] Patch to check builds
Enrica Casucci
Comment 11 2012-04-05 11:24:59 PDT
Created attachment 135865 [details] One more
Enrica Casucci
Comment 12 2012-04-05 13:12:11 PDT
Created attachment 135886 [details] Resolved conflict
Enrica Casucci
Comment 13 2012-04-05 13:32:23 PDT
Note You need to log in before you can comment on or make changes to this bug.