[Webkit-unassigned] [Bug 119806] [Mac] Add a way to easily test attributed string generation
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Aug 14 10:50:03 PDT 2013
https://bugs.webkit.org/show_bug.cgi?id=119806
--- Comment #1 from Ryosuke Niwa <rniwa at webkit.org> 2013-08-14 10:49:38 PST ---
Created an attachment (id=208744)
--> (https://bugs.webkit.org/attachment.cgi?id=208744&action=review)
First cut approach
I'm experimenting with an approach to serialize NSAttributedString as text. The following markup generates the output beneath it:
hello <b style="background-color:blue; color:white;">world</b> WebKit.<br>
this is a <u>test</u> of attributed string.
[ 0, 6]:[hello ]
color: rgba(0.00, 0.00, 0.00, 1.00)
font: "Times Roman" 16.00pt
[ 6, 5]:[world]
background-color: rgba(0.00, 0.00, 1.00, 1.00)
color: rgba(1.00, 1.00, 1.00, 1.00)
font: "Times Bold" 16.00pt
[ 11, 19]:[ WebKit.
this is a ]
color: rgba(0.00, 0.00, 0.00, 1.00)
font: "Times Roman" 16.00pt
[ 30, 26]:[test of attributed string.]
color: rgba(0.00, 0.00, 0.00, 1.00)
font: "Times Roman" 16.00pt
Unknown NSUnderline:1
I might need to tweak the syntax a little but I think this is quite human-readable.
My current plan is put this serializer into DRT/WTR (probably shared through WebCore) and add a method like testRunner.dumpAttributedString(DOMRange) so that we can write layout tests to test attribute string generators.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list