Bug 83334 - Provide Obj-C private API to simplify markup
Summary: Provide Obj-C private API to simplify markup
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: HTML Editing (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac Unspecified
: P2 Normal
Assignee: Enrica Casucci
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2012-04-05 17:09 PDT by Enrica Casucci
Modified: 2012-04-06 15:44 PDT (History)
1 user (show)

See Also:


Attachments
Patch (14.71 KB, patch)
2012-04-05 17:14 PDT, Enrica Casucci
sam: review-
Details | Formatted Diff | Diff
Patch2 (17.17 KB, patch)
2012-04-06 12:57 PDT, Enrica Casucci
sam: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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