Bug 83334

Summary: Provide Obj-C private API to simplify markup
Product: WebKit Reporter: Enrica Casucci <enrica>
Component: HTML EditingAssignee: Enrica Casucci <enrica>
Status: RESOLVED FIXED    
Severity: Normal CC: sam
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Mac   
OS: Unspecified   
Attachments:
Description Flags
Patch
sam: review-
Patch2 sam: review+

Description Enrica Casucci 2012-04-05 17:09:20 PDT
We want to expose this functionality directly, without having to perform a copy/paste to sanitize the markup.
Comment 1 Enrica Casucci 2012-04-05 17:14:42 PDT
Created attachment 135942 [details]
Patch
Comment 2 Sam Weinig 2012-04-06 10:43:47 PDT
Comment on attachment 135942 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=135942&action=review

> Tools/TestWebKitAPI/Tests/mac/SimplifyMarkup.mm:72
> +

We should test the different combinations this API allows, including non-nill endNode, endNode before startNode, and endNode in a different document than startNode.  I guess if should also make sure that startNode is in a document in webView.
Comment 3 Enrica Casucci 2012-04-06 12:57:51 PDT
Created attachment 136055 [details]
Patch2

Addresses comments.
Comment 4 Sam Weinig 2012-04-06 15:36:10 PDT
Comment on attachment 136055 [details]
Patch2

View in context: https://bugs.webkit.org/attachment.cgi?id=136055&action=review

> Source/WebCore/editing/Editor.cpp:1060
> +    applyCommand(SimplifyMarkupCommand::create(m_frame->document(), startNode, (endNode) ? endNode->traverseNextNode(): 0));

Missing space before :

> Tools/TestWebKitAPI/Tests/mac/SimplifyMarkup.mm:111
> +
> +
> +}

Unnecessary whitepace.
Comment 5 Enrica Casucci 2012-04-06 15:44:29 PDT
http://trac.webkit.org/changeset/113510