Bug 76588 - editingAttributedStringFromRange in WebHTMLConverter does not handle NSUnderlineStyleAttributeName
Summary: editingAttributedStringFromRange in WebHTMLConverter does not handle NSUnderl...
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-01-18 16:59 PST by Enrica Casucci
Modified: 2012-01-19 09:09 PST (History)
1 user (show)

See Also:


Attachments
Patch (3.88 KB, patch)
2012-01-18 17:06 PST, Enrica Casucci
mitz: 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-01-18 16:59:52 PST
This method is called to convert HTML into an NSAttributedString in several methods of the NSTextInput protocol.
The conversion currently fails to handle the underline style, causing problems with the Inspector Bar in Mail on Mac.
Comment 1 Enrica Casucci 2012-01-18 17:00:07 PST
<rdar://problem/9325183>
Comment 2 Enrica Casucci 2012-01-18 17:06:30 PST
Created attachment 123040 [details]
Patch
Comment 3 mitz 2012-01-18 17:17:15 PST
Comment on attachment 123040 [details]
Patch

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

> Tools/TestWebKitAPI/Tests/mac/InspectorBar.mm:68
> +    NSDictionary *attributes = [attrString attributesAtIndex:0 effectiveRange:nil];

I think the effectiveRange parameter is a pointer to an NSRange, so you should write 0, not nil.
Comment 4 Enrica Casucci 2012-01-19 08:50:58 PST
> I think the effectiveRange parameter is a pointer to an NSRange, so you should write 0, not nil.
Thanks for the review! I will fix this.
Comment 5 Enrica Casucci 2012-01-19 08:56:03 PST
http://trac.webkit.org/changeset/105416
Comment 6 Alexey Proskuryakov 2012-01-19 09:09:47 PST
This could be tested with a regular layout test - we expose attributedSubstringFromRange in DumpRenderTree.