Changeset 233913 in webkit


Ignore:
Timestamp:
Jul 18, 2018 8:55:33 AM (6 years ago)
Author:
Simon Fraser
Message:

Fix the parsing of colors in attributed string tests, and make it possible to dump the typing attributes
https://bugs.webkit.org/show_bug.cgi?id=187747

Reviewed by Ryosuke Niwa.

Tools:

Add textInputController.attributedStringForTyping(), which returns a one-character
attributed string whose attributes are the typing attributes, making it possible to
test -[WebView typingAttributes].

Sadly WebCore's convertObjcValueToValue() doesn't know how to convert NSDictionary,
so we can't return -typingAttributes directly.

  • DumpRenderTree/mac/TextInputControllerMac.m:

(+[TextInputController isSelectorExcludedFromWebScript:]):
(-[TextInputController attributedStringForTyping]):

LayoutTests:

Fix the parsing of color properties in dump-attributed-string.js, and treat NSStrokeColor as
a color. Rebase all the affected tests. Give macOS Sierra its own expectations with the legacy NSCustomColorSpace.

Add attributed-string-for-typing.html which tests typingAttributes.

  • editing/mac/attributed-string/anchor-element-expected.txt:
  • editing/mac/attributed-string/attributed-string-for-typing-expected.txt: Added.
  • editing/mac/attributed-string/attributed-string-for-typing.html: Added.
  • editing/mac/attributed-string/basic-expected.txt:
  • editing/mac/attributed-string/comment-cdata-section-expected.txt:
  • editing/mac/attributed-string/font-size-expected.txt:
  • editing/mac/attributed-string/font-style-variant-effect-expected.txt:
  • editing/mac/attributed-string/font-weight-expected.txt:
  • editing/mac/attributed-string/letter-spacing-expected.txt:
  • editing/mac/attributed-string/resources/dump-attributed-string.js:

(dumpAttributedString):
(formatNonParagraphAttributeValue):
(parseNSColorDescription):
(window.onload):
(serializeAttributedString.log): Deleted.
(serializeAttributedString.): Deleted.
(serializeAttributedString): Deleted.

  • editing/mac/attributed-string/text-decorations-expected.txt:
  • editing/mac/attributed-string/vertical-align-expected.txt:
  • platform/mac-sierra/editing/mac/attributed-string/anchor-element-expected.txt:
  • platform/mac-sierra/editing/mac/attributed-string/attributed-string-for-typing-expected.txt: Added.
  • platform/mac-sierra/editing/mac/attributed-string/basic-expected.txt:
  • platform/mac-sierra/editing/mac/attributed-string/comment-cdata-section-expected.txt:
  • platform/mac-sierra/editing/mac/attributed-string/font-size-expected.txt:
  • platform/mac-sierra/editing/mac/attributed-string/font-style-variant-effect-expected.txt:
  • platform/mac-sierra/editing/mac/attributed-string/font-weight-expected.txt:
  • platform/mac-sierra/editing/mac/attributed-string/letter-spacing-expected.txt:
  • platform/mac-sierra/editing/mac/attributed-string/text-decorations-expected.txt:
  • platform/mac-sierra/editing/mac/attributed-string/vertical-align-expected.txt:
  • platform/mac/editing/mac/attributed-string/anchor-element-expected.txt: Removed.
  • platform/mac/editing/mac/attributed-string/basic-expected.txt: Removed.
  • platform/mac/editing/mac/attributed-string/comment-cdata-section-expected.txt: Removed.
  • platform/mac/editing/mac/attributed-string/font-size-expected.txt: Removed.
  • platform/mac/editing/mac/attributed-string/font-style-variant-effect-expected.txt: Removed.
  • platform/mac/editing/mac/attributed-string/font-weight-expected.txt: Removed.
  • platform/mac/editing/mac/attributed-string/letter-spacing-expected.txt: Removed.
  • platform/mac/editing/mac/attributed-string/text-decorations-expected.txt: Removed.
  • platform/mac/editing/mac/attributed-string/vertical-align-expected.txt: Removed.
Location:
trunk
Files:
3 added
1 deleted
22 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r233903 r233913  
     12018-07-18  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Fix the parsing of colors in attributed string tests, and make it possible to dump the typing attributes
     4        https://bugs.webkit.org/show_bug.cgi?id=187747
     5
     6        Reviewed by Ryosuke Niwa.
     7       
     8        Fix the parsing of color properties in dump-attributed-string.js, and treat NSStrokeColor as
     9        a color. Rebase all the affected tests. Give macOS Sierra its own expectations with the legacy NSCustomColorSpace.
     10       
     11        Add attributed-string-for-typing.html which tests typingAttributes.
     12
     13        * editing/mac/attributed-string/anchor-element-expected.txt:
     14        * editing/mac/attributed-string/attributed-string-for-typing-expected.txt: Added.
     15        * editing/mac/attributed-string/attributed-string-for-typing.html: Added.
     16        * editing/mac/attributed-string/basic-expected.txt:
     17        * editing/mac/attributed-string/comment-cdata-section-expected.txt:
     18        * editing/mac/attributed-string/font-size-expected.txt:
     19        * editing/mac/attributed-string/font-style-variant-effect-expected.txt:
     20        * editing/mac/attributed-string/font-weight-expected.txt:
     21        * editing/mac/attributed-string/letter-spacing-expected.txt:
     22        * editing/mac/attributed-string/resources/dump-attributed-string.js:
     23        (dumpAttributedString):
     24        (formatNonParagraphAttributeValue):
     25        (parseNSColorDescription):
     26        (window.onload):
     27        (serializeAttributedString.log): Deleted.
     28        (serializeAttributedString.): Deleted.
     29        (serializeAttributedString): Deleted.
     30        * editing/mac/attributed-string/text-decorations-expected.txt:
     31        * editing/mac/attributed-string/vertical-align-expected.txt:
     32        * platform/mac-sierra/editing/mac/attributed-string/anchor-element-expected.txt:
     33        * platform/mac-sierra/editing/mac/attributed-string/attributed-string-for-typing-expected.txt: Added.
     34        * platform/mac-sierra/editing/mac/attributed-string/basic-expected.txt:
     35        * platform/mac-sierra/editing/mac/attributed-string/comment-cdata-section-expected.txt:
     36        * platform/mac-sierra/editing/mac/attributed-string/font-size-expected.txt:
     37        * platform/mac-sierra/editing/mac/attributed-string/font-style-variant-effect-expected.txt:
     38        * platform/mac-sierra/editing/mac/attributed-string/font-weight-expected.txt:
     39        * platform/mac-sierra/editing/mac/attributed-string/letter-spacing-expected.txt:
     40        * platform/mac-sierra/editing/mac/attributed-string/text-decorations-expected.txt:
     41        * platform/mac-sierra/editing/mac/attributed-string/vertical-align-expected.txt:
     42        * platform/mac/editing/mac/attributed-string/anchor-element-expected.txt: Removed.
     43        * platform/mac/editing/mac/attributed-string/basic-expected.txt: Removed.
     44        * platform/mac/editing/mac/attributed-string/comment-cdata-section-expected.txt: Removed.
     45        * platform/mac/editing/mac/attributed-string/font-size-expected.txt: Removed.
     46        * platform/mac/editing/mac/attributed-string/font-style-variant-effect-expected.txt: Removed.
     47        * platform/mac/editing/mac/attributed-string/font-weight-expected.txt: Removed.
     48        * platform/mac/editing/mac/attributed-string/letter-spacing-expected.txt: Removed.
     49        * platform/mac/editing/mac/attributed-string/text-decorations-expected.txt: Removed.
     50        * platform/mac/editing/mac/attributed-string/vertical-align-expected.txt: Removed.
     51
    1522018-07-17  Antoine Quint  <graouts@apple.com>
    253
  • trunk/LayoutTests/editing/mac/attributed-string/anchor-element-expected.txt

    r216449 r233913  
    2525    HeaderLevel: 0
    2626[webkit.org]
    27     NSColor: rgba(255, 2295, 1530, 6) (IEC6)
     27    NSColor: #0000ee (sRGB)
    2828    NSFont: Times-Roman 16.00 pt.
    2929    NSKern: 0pt
    3030    NSLink: https://webkit.org/
    31     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0.933333 1
     31    NSStrokeColor: #0000ee (sRGB)
    3232    NSStrokeWidth: 0
    3333    NSUnderline: true
     
    3535    NSFont: Times-Roman 16.00 pt.
    3636    NSKern: 0pt
    37     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0 1
     37    NSStrokeColor: #000000 (sRGB)
    3838    NSStrokeWidth: 0
    3939
  • trunk/LayoutTests/editing/mac/attributed-string/basic-expected.txt

    r216449 r233913  
    2828    NSFont: Times-Roman 16.00 pt.
    2929    NSKern: 0pt
    30     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0 1
     30    NSStrokeColor: #000000 (sRGB)
    3131    NSStrokeWidth: 0
    3232[world]
    33     NSBackgroundColor: rgba(255, 2295, 1530, 6) (IEC6)
    34     NSColor: rgba(255, 2295, 1530, 6) (IEC6)
     33    NSBackgroundColor: #0000ff (sRGB)
     34    NSColor: #ffffff (sRGB)
    3535    NSFont: Times-Bold 16.00 pt.
    3636    NSKern: 0pt
    37     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 1 1 1 1
     37    NSStrokeColor: #ffffff (sRGB)
    3838    NSStrokeWidth: 0
    3939[ ]
    4040    NSFont: Times-Roman 16.00 pt.
    4141    NSKern: 0pt
    42     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0 1
     42    NSStrokeColor: #000000 (sRGB)
    4343    NSStrokeWidth: 0
    4444[WebKit]
    45     NSColor: rgba(255, 2295, 1530, 6) (IEC6)
     45    NSColor: #0000ee (sRGB)
    4646    NSFont: Times-Roman 16.00 pt.
    4747    NSKern: 0pt
    4848    NSLink: https://webkit.org/
    49     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0.933333 1
     49    NSStrokeColor: #0000ee (sRGB)
    5050    NSStrokeWidth: 0
    5151    NSUnderline: true
     
    5353    NSFont: Times-Roman 16.00 pt.
    5454    NSKern: 0pt
    55     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0 1
     55    NSStrokeColor: #000000 (sRGB)
    5656    NSStrokeWidth: 0
    5757[this is a ]
    58     NSBackgroundColor: rgba(255, 2295, 1530, 6) (IEC6)
     58    NSBackgroundColor: #ffff00 (sRGB)
    5959    NSFont: Times-Roman 16.00 pt.
    6060    NSKern: 0pt
    61     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0 1
     61    NSStrokeColor: #000000 (sRGB)
    6262    NSStrokeWidth: 0
    6363[t]
    64     NSBackgroundColor: rgba(255, 2295, 1530, 6) (IEC6)
     64    NSBackgroundColor: #ffff00 (sRGB)
    6565    NSFont: Times-Italic 16.00 pt.
    6666    NSKern: 0pt
    67     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0 1
     67    NSStrokeColor: #000000 (sRGB)
    6868    NSStrokeWidth: 0
    6969    NSUnderline: true
    7070[est]
    71     NSBackgroundColor: rgba(255, 2295, 1530, 6) (IEC6)
     71    NSBackgroundColor: #ffff00 (sRGB)
    7272    NSFont: Times-Roman 16.00 pt.
    7373    NSKern: 0pt
    74     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0 1
     74    NSStrokeColor: #000000 (sRGB)
    7575    NSStrokeWidth: 0
    7676    NSUnderline: true
    7777[ of ]
    78     NSBackgroundColor: rgba(255, 2295, 1530, 6) (IEC6)
     78    NSBackgroundColor: #ffff00 (sRGB)
    7979    NSFont: Times-Roman 16.00 pt.
    8080    NSKern: 0pt
    81     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0 1
     81    NSStrokeColor: #000000 (sRGB)
    8282    NSStrokeWidth: 0
    8383[attributed]
    84     NSBackgroundColor: rgba(255, 2295, 1530, 6) (IEC6)
     84    NSBackgroundColor: #ffff00 (sRGB)
    8585    NSFont: Times-Italic 16.00 pt.
    8686    NSKern: 0pt
    87     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0 1
     87    NSStrokeColor: #000000 (sRGB)
    8888    NSStrokeWidth: 0
    8989[ string.]
    90     NSBackgroundColor: rgba(255, 2295, 1530, 6) (IEC6)
     90    NSBackgroundColor: #ffff00 (sRGB)
    9191    NSFont: Times-Roman 16.00 pt.
    9292    NSKern: 0pt
    93     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0 1
     93    NSStrokeColor: #000000 (sRGB)
    9494    NSStrokeWidth: 0
    9595[ ]
    9696    NSFont: Times-Roman 16.00 pt.
    9797    NSKern: 0pt
    98     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0 1
     98    NSStrokeColor: #000000 (sRGB)
    9999    NSStrokeWidth: 0
    100100
  • trunk/LayoutTests/editing/mac/attributed-string/comment-cdata-section-expected.txt

    r216449 r233913  
    2727    NSFont: Times-Roman 16.00 pt.
    2828    NSKern: 0pt
    29     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0 1
     29    NSStrokeColor: #000000 (sRGB)
    3030    NSStrokeWidth: 0
    3131
  • trunk/LayoutTests/editing/mac/attributed-string/font-size-expected.txt

    r216449 r233913  
    3636    NSFont: Times-Roman 13.33 pt.
    3737    NSKern: 0pt
    38     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0 1
     38    NSStrokeColor: #000000 (sRGB)
    3939    NSStrokeWidth: 0
    4040[ ]
    4141    NSFont: Times-Roman 16.00 pt.
    4242    NSKern: 0pt
    43     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0 1
     43    NSStrokeColor: #000000 (sRGB)
    4444    NSStrokeWidth: 0
    4545[xx-small]
    4646    NSFont: Times-Roman 9.00 pt.
    4747    NSKern: 0pt
    48     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0 1
     48    NSStrokeColor: #000000 (sRGB)
    4949    NSStrokeWidth: 0
    5050[ ]
    5151    NSFont: Times-Roman 16.00 pt.
    5252    NSKern: 0pt
    53     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0 1
     53    NSStrokeColor: #000000 (sRGB)
    5454    NSStrokeWidth: 0
    5555[x-small]
    5656    NSFont: Times-Roman 10.00 pt.
    5757    NSKern: 0pt
    58     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0 1
     58    NSStrokeColor: #000000 (sRGB)
    5959    NSStrokeWidth: 0
    6060[ ]
    6161    NSFont: Times-Roman 16.00 pt.
    6262    NSKern: 0pt
    63     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0 1
     63    NSStrokeColor: #000000 (sRGB)
    6464    NSStrokeWidth: 0
    6565[small]
    6666    NSFont: Times-Roman 13.00 pt.
    6767    NSKern: 0pt
    68     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0 1
     68    NSStrokeColor: #000000 (sRGB)
    6969    NSStrokeWidth: 0
    7070[ normal ]
    7171    NSFont: Times-Roman 16.00 pt.
    7272    NSKern: 0pt
    73     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0 1
     73    NSStrokeColor: #000000 (sRGB)
    7474    NSStrokeWidth: 0
    7575[large]
    7676    NSFont: Times-Roman 18.00 pt.
    7777    NSKern: 0pt
    78     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0 1
     78    NSStrokeColor: #000000 (sRGB)
    7979    NSStrokeWidth: 0
    8080[ ]
    8181    NSFont: Times-Roman 16.00 pt.
    8282    NSKern: 0pt
    83     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0 1
     83    NSStrokeColor: #000000 (sRGB)
    8484    NSStrokeWidth: 0
    8585[x-large]
    8686    NSFont: Times-Roman 24.00 pt.
    8787    NSKern: 0pt
    88     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0 1
     88    NSStrokeColor: #000000 (sRGB)
    8989    NSStrokeWidth: 0
    9090[ ]
    9191    NSFont: Times-Roman 16.00 pt.
    9292    NSKern: 0pt
    93     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0 1
     93    NSStrokeColor: #000000 (sRGB)
    9494    NSStrokeWidth: 0
    9595[xx-large]
    9696    NSFont: Times-Roman 32.00 pt.
    9797    NSKern: 0pt
    98     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0 1
     98    NSStrokeColor: #000000 (sRGB)
    9999    NSStrokeWidth: 0
    100100[ ]
    101101    NSFont: Times-Roman 16.00 pt.
    102102    NSKern: 0pt
    103     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0 1
     103    NSStrokeColor: #000000 (sRGB)
    104104    NSStrokeWidth: 0
    105105[5pt]
    106106    NSFont: Times-Roman 6.67 pt.
    107107    NSKern: 0pt
    108     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0 1
     108    NSStrokeColor: #000000 (sRGB)
    109109    NSStrokeWidth: 0
    110110[ ]
    111111    NSFont: Times-Roman 16.00 pt.
    112112    NSKern: 0pt
    113     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0 1
     113    NSStrokeColor: #000000 (sRGB)
    114114    NSStrokeWidth: 0
    115115[15pt]
    116116    NSFont: Times-Roman 20.00 pt.
    117117    NSKern: 0pt
    118     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0 1
     118    NSStrokeColor: #000000 (sRGB)
    119119    NSStrokeWidth: 0
    120120[ ]
    121121    NSFont: Times-Roman 16.00 pt.
    122122    NSKern: 0pt
    123     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0 1
     123    NSStrokeColor: #000000 (sRGB)
    124124    NSStrokeWidth: 0
    125125
  • trunk/LayoutTests/editing/mac/attributed-string/font-style-variant-effect-expected.txt

    r216449 r233913  
    3131    NSFont: Times-Italic 16.00 pt.
    3232    NSKern: 0pt
    33     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0 1
     33    NSStrokeColor: #000000 (sRGB)
    3434    NSStrokeWidth: 0
    3535[ ]
    3636    NSFont: Times-Roman 16.00 pt.
    3737    NSKern: 0pt
    38     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0 1
     38    NSStrokeColor: #000000 (sRGB)
    3939    NSStrokeWidth: 0
    4040[oblique]
    4141    NSFont: Times-Italic 16.00 pt.
    4242    NSKern: 0pt
    43     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0 1
     43    NSStrokeColor: #000000 (sRGB)
    4444    NSStrokeWidth: 0
    4545[ ]
    4646    NSFont: Times-Roman 16.00 pt.
    4747    NSKern: 0pt
    48     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0 1
     48    NSStrokeColor: #000000 (sRGB)
    4949    NSStrokeWidth: 0
    5050[small-caps]
    5151    NSFont: Times-Roman 16.00 pt.
    5252    NSKern: 0pt
    53     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0 1
     53    NSStrokeColor: #000000 (sRGB)
    5454    NSStrokeWidth: 0
    5555[ outline emboss ]
    5656    NSFont: Times-Roman 16.00 pt.
    5757    NSKern: 0pt
    58     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0 1
     58    NSStrokeColor: #000000 (sRGB)
    5959    NSStrokeWidth: 0
    6060
  • trunk/LayoutTests/editing/mac/attributed-string/font-weight-expected.txt

    r216449 r233913  
    3636    NSFont: Times-Bold 16.00 pt.
    3737    NSKern: 0pt
    38     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0 1
     38    NSStrokeColor: #000000 (sRGB)
    3939    NSStrokeWidth: 0
    4040[ font weight 100 font weight 200 font weight 300 font weight 400 font weight 500 ]
    4141    NSFont: Times-Roman 16.00 pt.
    4242    NSKern: 0pt
    43     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0 1
     43    NSStrokeColor: #000000 (sRGB)
    4444    NSStrokeWidth: 0
    4545[font weight 600]
    4646    NSFont: Times-Bold 16.00 pt.
    4747    NSKern: 0pt
    48     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0 1
     48    NSStrokeColor: #000000 (sRGB)
    4949    NSStrokeWidth: 0
    5050[ ]
    5151    NSFont: Times-Roman 16.00 pt.
    5252    NSKern: 0pt
    53     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0 1
     53    NSStrokeColor: #000000 (sRGB)
    5454    NSStrokeWidth: 0
    5555[font weight 700]
    5656    NSFont: Times-Bold 16.00 pt.
    5757    NSKern: 0pt
    58     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0 1
     58    NSStrokeColor: #000000 (sRGB)
    5959    NSStrokeWidth: 0
    6060[ ]
    6161    NSFont: Times-Roman 16.00 pt.
    6262    NSKern: 0pt
    63     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0 1
     63    NSStrokeColor: #000000 (sRGB)
    6464    NSStrokeWidth: 0
    6565[font weight 800]
    6666    NSFont: Times-Bold 16.00 pt.
    6767    NSKern: 0pt
    68     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0 1
     68    NSStrokeColor: #000000 (sRGB)
    6969    NSStrokeWidth: 0
    7070[ ]
    7171    NSFont: Times-Roman 16.00 pt.
    7272    NSKern: 0pt
    73     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0 1
     73    NSStrokeColor: #000000 (sRGB)
    7474    NSStrokeWidth: 0
    7575[font weight 900]
    7676    NSFont: Times-Bold 16.00 pt.
    7777    NSKern: 0pt
    78     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0 1
     78    NSStrokeColor: #000000 (sRGB)
    7979    NSStrokeWidth: 0
    8080[ ]
    8181    NSFont: Times-Roman 16.00 pt.
    8282    NSKern: 0pt
    83     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0 1
     83    NSStrokeColor: #000000 (sRGB)
    8484    NSStrokeWidth: 0
    8585
  • trunk/LayoutTests/editing/mac/attributed-string/letter-spacing-expected.txt

    r216449 r233913  
    2727    NSFont: Times-Roman 16.00 pt.
    2828    NSKern: 0pt
    29     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0 1
     29    NSStrokeColor: #000000 (sRGB)
    3030    NSStrokeWidth: 0
    3131
  • trunk/LayoutTests/editing/mac/attributed-string/resources/dump-attributed-string.js

    r187932 r233913  
     1var shouldAutoDump = true;
     2
    13(function () {
    24    if (window.testRunner)
    35        testRunner.dumpAsText();
    46
    5     var called = false;
    67    function dumpAttributedString(container) {
    7         called = true;
     8        shouldAutoDump = false;
    89
    910        var body = document.body;
     
    2122    }
    2223
    23     function serializeAttributedString(attributedString) {
     24    window.serializeAttributedString = function (attributedString) {
    2425        var string = attributedString.string();
    2526        var output = '';
     
    6869            return value.match(/(.+?)\s+P \[\]/)[1];
    6970        case 'NSColor':
     71        case 'NSStrokeColor':
    7072        case 'NSBackgroundColor':
    7173            var parsed = parseNSColorDescription(value);
     
    8789
    8890    function parseNSColorDescription(value) {
    89         var match = value.match(/\s*(\w+)\s*([0-9\.]+)\s*([0-9\.]+)\s*([0-9\.]+)\s*([0-9\.]+)/);
     91        var match = value.match(/^\s*(\w+).+\s([0-9\.]+)\s+([0-9\.]+)\s+([0-9\.]+)\s+([0-9\.]+)\s*$/);
    9092        return {
    9193            colorSpace: match[1],
     
    127129
    128130    window.onload = function () {
    129         (!called)
     131        if (shouldAutoDump)
    130132            dumpAttributedString();
    131133    }
  • trunk/LayoutTests/editing/mac/attributed-string/text-decorations-expected.txt

    r216449 r233913  
    2929    NSFont: Times-Roman 16.00 pt.
    3030    NSKern: 0pt
    31     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0 1
     31    NSStrokeColor: #000000 (sRGB)
    3232    NSStrokeWidth: 0
    3333    NSUnderline: true
     
    3535    NSFont: Times-Roman 16.00 pt.
    3636    NSKern: 0pt
    37     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0 1
     37    NSStrokeColor: #000000 (sRGB)
    3838    NSStrokeWidth: 0
    3939[strike]
     
    4141    NSKern: 0pt
    4242    NSStrikethrough: true
    43     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0 1
     43    NSStrokeColor: #000000 (sRGB)
    4444    NSStrokeWidth: 0
    4545[ underline and strike ]
    4646    NSFont: Times-Roman 16.00 pt.
    4747    NSKern: 0pt
    48     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0 1
     48    NSStrokeColor: #000000 (sRGB)
    4949    NSStrokeWidth: 0
    5050
  • trunk/LayoutTests/editing/mac/attributed-string/vertical-align-expected.txt

    r216449 r233913  
    3131    NSFont: Times-Roman 13.33 pt.
    3232    NSKern: 0pt
    33     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0 1
     33    NSStrokeColor: #000000 (sRGB)
    3434    NSStrokeWidth: 0
    3535    NSSuperScript: 1
     
    3737    NSFont: Times-Roman 16.00 pt.
    3838    NSKern: 0pt
    39     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0 1
     39    NSStrokeColor: #000000 (sRGB)
    4040    NSStrokeWidth: 0
    4141[sub element]
    4242    NSFont: Times-Roman 13.33 pt.
    4343    NSKern: 0pt
    44     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0 1
     44    NSStrokeColor: #000000 (sRGB)
    4545    NSStrokeWidth: 0
    4646    NSSuperScript: -1
     
    4848    NSFont: Times-Roman 16.00 pt.
    4949    NSKern: 0pt
    50     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0 1
     50    NSStrokeColor: #000000 (sRGB)
    5151    NSStrokeWidth: 0
    5252[vertical align super]
    5353    NSFont: Times-Roman 16.00 pt.
    5454    NSKern: 0pt
    55     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0 1
     55    NSStrokeColor: #000000 (sRGB)
    5656    NSStrokeWidth: 0
    5757    NSSuperScript: 1
     
    5959    NSFont: Times-Roman 16.00 pt.
    6060    NSKern: 0pt
    61     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0 1
     61    NSStrokeColor: #000000 (sRGB)
    6262    NSStrokeWidth: 0
    6363[vertical align sub]
    6464    NSFont: Times-Roman 16.00 pt.
    6565    NSKern: 0pt
    66     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0 1
     66    NSStrokeColor: #000000 (sRGB)
    6767    NSStrokeWidth: 0
    6868    NSSuperScript: -1
     
    7070    NSFont: Times-Roman 16.00 pt.
    7171    NSKern: 0pt
    72     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0 1
     72    NSStrokeColor: #000000 (sRGB)
    7373    NSStrokeWidth: 0
    7474
  • trunk/LayoutTests/platform/mac-sierra/editing/mac/attributed-string/anchor-element-expected.txt

    r222117 r233913  
    2525    HeaderLevel: 0
    2626[webkit.org]
    27     NSColor: rgba(255, 2295, 1530, 6) (IEC6)
     27    NSColor: #0000ee (NSCustomColorSpace)
    2828    NSFont: Times-Roman 16.00 pt.
    2929    NSKern: 0pt
    3030    NSLink: https://webkit.org/
    31     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0.933333 1
     31    NSStrokeColor: #0000ee (NSCustomColorSpace)
    3232    NSStrokeWidth: 0
    3333    NSUnderline: true
     
    3535    NSFont: Times-Roman 16.00 pt.
    3636    NSKern: 0pt
    37     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0 1
     37    NSStrokeColor: #000000 (NSCustomColorSpace)
    3838    NSStrokeWidth: 0
    3939
  • trunk/LayoutTests/platform/mac-sierra/editing/mac/attributed-string/basic-expected.txt

    r222117 r233913  
    2828    NSFont: Times-Roman 16.00 pt.
    2929    NSKern: 0pt
    30     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0 1
     30    NSStrokeColor: #000000 (NSCustomColorSpace)
    3131    NSStrokeWidth: 0
    3232[world]
    33     NSBackgroundColor: rgba(255, 2295, 1530, 6) (IEC6)
    34     NSColor: rgba(255, 2295, 1530, 6) (IEC6)
     33    NSBackgroundColor: #0000ff (NSCustomColorSpace)
     34    NSColor: #ffffff (NSCustomColorSpace)
    3535    NSFont: Times-Bold 16.00 pt.
    3636    NSKern: 0pt
    37     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 1 1 1 1
     37    NSStrokeColor: #ffffff (NSCustomColorSpace)
    3838    NSStrokeWidth: 0
    3939[ ]
    4040    NSFont: Times-Roman 16.00 pt.
    4141    NSKern: 0pt
    42     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0 1
     42    NSStrokeColor: #000000 (NSCustomColorSpace)
    4343    NSStrokeWidth: 0
    4444[WebKit]
    45     NSColor: rgba(255, 2295, 1530, 6) (IEC6)
     45    NSColor: #0000ee (NSCustomColorSpace)
    4646    NSFont: Times-Roman 16.00 pt.
    4747    NSKern: 0pt
    4848    NSLink: https://webkit.org/
    49     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0.933333 1
     49    NSStrokeColor: #0000ee (NSCustomColorSpace)
    5050    NSStrokeWidth: 0
    5151    NSUnderline: true
     
    5353    NSFont: Times-Roman 16.00 pt.
    5454    NSKern: 0pt
    55     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0 1
     55    NSStrokeColor: #000000 (NSCustomColorSpace)
    5656    NSStrokeWidth: 0
    5757[this is a ]
    58     NSBackgroundColor: rgba(255, 2295, 1530, 6) (IEC6)
     58    NSBackgroundColor: #ffff00 (NSCustomColorSpace)
    5959    NSFont: Times-Roman 16.00 pt.
    6060    NSKern: 0pt
    61     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0 1
     61    NSStrokeColor: #000000 (NSCustomColorSpace)
    6262    NSStrokeWidth: 0
    6363[t]
    64     NSBackgroundColor: rgba(255, 2295, 1530, 6) (IEC6)
     64    NSBackgroundColor: #ffff00 (NSCustomColorSpace)
    6565    NSFont: Times-Italic 16.00 pt.
    6666    NSKern: 0pt
    67     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0 1
     67    NSStrokeColor: #000000 (NSCustomColorSpace)
    6868    NSStrokeWidth: 0
    6969    NSUnderline: true
    7070[est]
    71     NSBackgroundColor: rgba(255, 2295, 1530, 6) (IEC6)
     71    NSBackgroundColor: #ffff00 (NSCustomColorSpace)
    7272    NSFont: Times-Roman 16.00 pt.
    7373    NSKern: 0pt
    74     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0 1
     74    NSStrokeColor: #000000 (NSCustomColorSpace)
    7575    NSStrokeWidth: 0
    7676    NSUnderline: true
    7777[ of ]
    78     NSBackgroundColor: rgba(255, 2295, 1530, 6) (IEC6)
     78    NSBackgroundColor: #ffff00 (NSCustomColorSpace)
    7979    NSFont: Times-Roman 16.00 pt.
    8080    NSKern: 0pt
    81     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0 1
     81    NSStrokeColor: #000000 (NSCustomColorSpace)
    8282    NSStrokeWidth: 0
    8383[attributed]
    84     NSBackgroundColor: rgba(255, 2295, 1530, 6) (IEC6)
     84    NSBackgroundColor: #ffff00 (NSCustomColorSpace)
    8585    NSFont: Times-Italic 16.00 pt.
    8686    NSKern: 0pt
    87     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0 1
     87    NSStrokeColor: #000000 (NSCustomColorSpace)
    8888    NSStrokeWidth: 0
    8989[ string.]
    90     NSBackgroundColor: rgba(255, 2295, 1530, 6) (IEC6)
     90    NSBackgroundColor: #ffff00 (NSCustomColorSpace)
    9191    NSFont: Times-Roman 16.00 pt.
    9292    NSKern: 0pt
    93     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0 1
     93    NSStrokeColor: #000000 (NSCustomColorSpace)
    9494    NSStrokeWidth: 0
    9595[ ]
    9696    NSFont: Times-Roman 16.00 pt.
    9797    NSKern: 0pt
    98     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0 1
     98    NSStrokeColor: #000000 (NSCustomColorSpace)
    9999    NSStrokeWidth: 0
    100100
  • trunk/LayoutTests/platform/mac-sierra/editing/mac/attributed-string/comment-cdata-section-expected.txt

    r222117 r233913  
    2727    NSFont: Times-Roman 16.00 pt.
    2828    NSKern: 0pt
    29     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0 1
     29    NSStrokeColor: #000000 (NSCustomColorSpace)
    3030    NSStrokeWidth: 0
    3131
  • trunk/LayoutTests/platform/mac-sierra/editing/mac/attributed-string/font-size-expected.txt

    r222117 r233913  
    3636    NSFont: Times-Roman 13.33 pt.
    3737    NSKern: 0pt
    38     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0 1
     38    NSStrokeColor: #000000 (NSCustomColorSpace)
    3939    NSStrokeWidth: 0
    4040[ ]
    4141    NSFont: Times-Roman 16.00 pt.
    4242    NSKern: 0pt
    43     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0 1
     43    NSStrokeColor: #000000 (NSCustomColorSpace)
    4444    NSStrokeWidth: 0
    4545[xx-small]
    4646    NSFont: Times-Roman 9.00 pt.
    4747    NSKern: 0pt
    48     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0 1
     48    NSStrokeColor: #000000 (NSCustomColorSpace)
    4949    NSStrokeWidth: 0
    5050[ ]
    5151    NSFont: Times-Roman 16.00 pt.
    5252    NSKern: 0pt
    53     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0 1
     53    NSStrokeColor: #000000 (NSCustomColorSpace)
    5454    NSStrokeWidth: 0
    5555[x-small]
    5656    NSFont: Times-Roman 10.00 pt.
    5757    NSKern: 0pt
    58     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0 1
     58    NSStrokeColor: #000000 (NSCustomColorSpace)
    5959    NSStrokeWidth: 0
    6060[ ]
    6161    NSFont: Times-Roman 16.00 pt.
    6262    NSKern: 0pt
    63     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0 1
     63    NSStrokeColor: #000000 (NSCustomColorSpace)
    6464    NSStrokeWidth: 0
    6565[small]
    6666    NSFont: Times-Roman 13.00 pt.
    6767    NSKern: 0pt
    68     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0 1
     68    NSStrokeColor: #000000 (NSCustomColorSpace)
    6969    NSStrokeWidth: 0
    7070[ normal ]
    7171    NSFont: Times-Roman 16.00 pt.
    7272    NSKern: 0pt
    73     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0 1
     73    NSStrokeColor: #000000 (NSCustomColorSpace)
    7474    NSStrokeWidth: 0
    7575[large]
    7676    NSFont: Times-Roman 18.00 pt.
    7777    NSKern: 0pt
    78     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0 1
     78    NSStrokeColor: #000000 (NSCustomColorSpace)
    7979    NSStrokeWidth: 0
    8080[ ]
    8181    NSFont: Times-Roman 16.00 pt.
    8282    NSKern: 0pt
    83     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0 1
     83    NSStrokeColor: #000000 (NSCustomColorSpace)
    8484    NSStrokeWidth: 0
    8585[x-large]
    8686    NSFont: Times-Roman 24.00 pt.
    8787    NSKern: 0pt
    88     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0 1
     88    NSStrokeColor: #000000 (NSCustomColorSpace)
    8989    NSStrokeWidth: 0
    9090[ ]
    9191    NSFont: Times-Roman 16.00 pt.
    9292    NSKern: 0pt
    93     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0 1
     93    NSStrokeColor: #000000 (NSCustomColorSpace)
    9494    NSStrokeWidth: 0
    9595[xx-large]
    9696    NSFont: Times-Roman 32.00 pt.
    9797    NSKern: 0pt
    98     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0 1
     98    NSStrokeColor: #000000 (NSCustomColorSpace)
    9999    NSStrokeWidth: 0
    100100[ ]
    101101    NSFont: Times-Roman 16.00 pt.
    102102    NSKern: 0pt
    103     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0 1
     103    NSStrokeColor: #000000 (NSCustomColorSpace)
    104104    NSStrokeWidth: 0
    105105[5pt]
    106106    NSFont: Times-Roman 6.67 pt.
    107107    NSKern: 0pt
    108     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0 1
     108    NSStrokeColor: #000000 (NSCustomColorSpace)
    109109    NSStrokeWidth: 0
    110110[ ]
    111111    NSFont: Times-Roman 16.00 pt.
    112112    NSKern: 0pt
    113     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0 1
     113    NSStrokeColor: #000000 (NSCustomColorSpace)
    114114    NSStrokeWidth: 0
    115115[15pt]
    116116    NSFont: Times-Roman 20.00 pt.
    117117    NSKern: 0pt
    118     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0 1
     118    NSStrokeColor: #000000 (NSCustomColorSpace)
    119119    NSStrokeWidth: 0
    120120[ ]
    121121    NSFont: Times-Roman 16.00 pt.
    122122    NSKern: 0pt
    123     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0 1
     123    NSStrokeColor: #000000 (NSCustomColorSpace)
    124124    NSStrokeWidth: 0
    125125
  • trunk/LayoutTests/platform/mac-sierra/editing/mac/attributed-string/font-style-variant-effect-expected.txt

    r222193 r233913  
    3131    NSFont: Times-Italic 16.00 pt.
    3232    NSKern: 0pt
    33     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0 1
     33    NSStrokeColor: #000000 (NSCustomColorSpace)
    3434    NSStrokeWidth: 0
    3535[ ]
    3636    NSFont: Times-Roman 16.00 pt.
    3737    NSKern: 0pt
    38     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0 1
     38    NSStrokeColor: #000000 (NSCustomColorSpace)
    3939    NSStrokeWidth: 0
    4040[oblique]
    4141    NSFont: Times-Italic 16.00 pt.
    4242    NSKern: 0pt
    43     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0 1
     43    NSStrokeColor: #000000 (NSCustomColorSpace)
    4444    NSStrokeWidth: 0
    4545[ ]
    4646    NSFont: Times-Roman 16.00 pt.
    4747    NSKern: 0pt
    48     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0 1
     48    NSStrokeColor: #000000 (NSCustomColorSpace)
    4949    NSStrokeWidth: 0
    5050[small-caps]
    5151    NSFont: Times-Roman 16.00 pt.
    5252    NSKern: 0pt
    53     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0 1
     53    NSStrokeColor: #000000 (NSCustomColorSpace)
    5454    NSStrokeWidth: 0
    5555[ outline emboss ]
    5656    NSFont: Times-Roman 16.00 pt.
    5757    NSKern: 0pt
    58     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0 1
     58    NSStrokeColor: #000000 (NSCustomColorSpace)
    5959    NSStrokeWidth: 0
    6060
  • trunk/LayoutTests/platform/mac-sierra/editing/mac/attributed-string/font-weight-expected.txt

    r222117 r233913  
    3636    NSFont: Times-Bold 16.00 pt.
    3737    NSKern: 0pt
    38     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0 1
     38    NSStrokeColor: #000000 (NSCustomColorSpace)
    3939    NSStrokeWidth: 0
    4040[ font weight 100 font weight 200 font weight 300 font weight 400 font weight 500 ]
    4141    NSFont: Times-Roman 16.00 pt.
    4242    NSKern: 0pt
    43     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0 1
     43    NSStrokeColor: #000000 (NSCustomColorSpace)
    4444    NSStrokeWidth: 0
    4545[font weight 600]
    4646    NSFont: Times-Bold 16.00 pt.
    4747    NSKern: 0pt
    48     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0 1
     48    NSStrokeColor: #000000 (NSCustomColorSpace)
    4949    NSStrokeWidth: 0
    5050[ ]
    5151    NSFont: Times-Roman 16.00 pt.
    5252    NSKern: 0pt
    53     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0 1
     53    NSStrokeColor: #000000 (NSCustomColorSpace)
    5454    NSStrokeWidth: 0
    5555[font weight 700]
    5656    NSFont: Times-Bold 16.00 pt.
    5757    NSKern: 0pt
    58     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0 1
     58    NSStrokeColor: #000000 (NSCustomColorSpace)
    5959    NSStrokeWidth: 0
    6060[ ]
    6161    NSFont: Times-Roman 16.00 pt.
    6262    NSKern: 0pt
    63     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0 1
     63    NSStrokeColor: #000000 (NSCustomColorSpace)
    6464    NSStrokeWidth: 0
    6565[font weight 800]
    6666    NSFont: Times-Bold 16.00 pt.
    6767    NSKern: 0pt
    68     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0 1
     68    NSStrokeColor: #000000 (NSCustomColorSpace)
    6969    NSStrokeWidth: 0
    7070[ ]
    7171    NSFont: Times-Roman 16.00 pt.
    7272    NSKern: 0pt
    73     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0 1
     73    NSStrokeColor: #000000 (NSCustomColorSpace)
    7474    NSStrokeWidth: 0
    7575[font weight 900]
    7676    NSFont: Times-Bold 16.00 pt.
    7777    NSKern: 0pt
    78     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0 1
     78    NSStrokeColor: #000000 (NSCustomColorSpace)
    7979    NSStrokeWidth: 0
    8080[ ]
    8181    NSFont: Times-Roman 16.00 pt.
    8282    NSKern: 0pt
    83     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0 1
     83    NSStrokeColor: #000000 (NSCustomColorSpace)
    8484    NSStrokeWidth: 0
    8585
  • trunk/LayoutTests/platform/mac-sierra/editing/mac/attributed-string/letter-spacing-expected.txt

    r222117 r233913  
    2727    NSFont: Times-Roman 16.00 pt.
    2828    NSKern: 0pt
    29     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0 1
     29    NSStrokeColor: #000000 (NSCustomColorSpace)
    3030    NSStrokeWidth: 0
    3131
  • trunk/LayoutTests/platform/mac-sierra/editing/mac/attributed-string/text-decorations-expected.txt

    r222117 r233913  
    2929    NSFont: Times-Roman 16.00 pt.
    3030    NSKern: 0pt
    31     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0 1
     31    NSStrokeColor: #000000 (NSCustomColorSpace)
    3232    NSStrokeWidth: 0
    3333    NSUnderline: true
     
    3535    NSFont: Times-Roman 16.00 pt.
    3636    NSKern: 0pt
    37     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0 1
     37    NSStrokeColor: #000000 (NSCustomColorSpace)
    3838    NSStrokeWidth: 0
    3939[strike]
     
    4141    NSKern: 0pt
    4242    NSStrikethrough: true
    43     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0 1
     43    NSStrokeColor: #000000 (NSCustomColorSpace)
    4444    NSStrokeWidth: 0
    4545[ underline and strike ]
    4646    NSFont: Times-Roman 16.00 pt.
    4747    NSKern: 0pt
    48     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0 1
     48    NSStrokeColor: #000000 (NSCustomColorSpace)
    4949    NSStrokeWidth: 0
    5050
  • trunk/LayoutTests/platform/mac-sierra/editing/mac/attributed-string/vertical-align-expected.txt

    r222117 r233913  
    3131    NSFont: Times-Roman 13.33 pt.
    3232    NSKern: 0pt
    33     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0 1
     33    NSStrokeColor: #000000 (NSCustomColorSpace)
    3434    NSStrokeWidth: 0
    3535    NSSuperScript: 1
     
    3737    NSFont: Times-Roman 16.00 pt.
    3838    NSKern: 0pt
    39     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0 1
     39    NSStrokeColor: #000000 (NSCustomColorSpace)
    4040    NSStrokeWidth: 0
    4141[sub element]
    4242    NSFont: Times-Roman 13.33 pt.
    4343    NSKern: 0pt
    44     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0 1
     44    NSStrokeColor: #000000 (NSCustomColorSpace)
    4545    NSStrokeWidth: 0
    4646    NSSuperScript: -1
     
    4848    NSFont: Times-Roman 16.00 pt.
    4949    NSKern: 0pt
    50     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0 1
     50    NSStrokeColor: #000000 (NSCustomColorSpace)
    5151    NSStrokeWidth: 0
    5252[vertical align super]
    5353    NSFont: Times-Roman 16.00 pt.
    5454    NSKern: 0pt
    55     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0 1
     55    NSStrokeColor: #000000 (NSCustomColorSpace)
    5656    NSStrokeWidth: 0
    5757    NSSuperScript: 1
     
    5959    NSFont: Times-Roman 16.00 pt.
    6060    NSKern: 0pt
    61     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0 1
     61    NSStrokeColor: #000000 (NSCustomColorSpace)
    6262    NSStrokeWidth: 0
    6363[vertical align sub]
    6464    NSFont: Times-Roman 16.00 pt.
    6565    NSKern: 0pt
    66     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0 1
     66    NSStrokeColor: #000000 (NSCustomColorSpace)
    6767    NSStrokeWidth: 0
    6868    NSSuperScript: -1
     
    7070    NSFont: Times-Roman 16.00 pt.
    7171    NSKern: 0pt
    72     NSStrokeColor: NSCustomColorSpace sRGB IEC61966-2.1 colorspace 0 0 0 1
     72    NSStrokeColor: #000000 (NSCustomColorSpace)
    7373    NSStrokeWidth: 0
    7474
  • trunk/Tools/ChangeLog

    r233911 r233913  
     12018-07-18  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Fix the parsing of colors in attributed string tests, and make it possible to dump the typing attributes
     4        https://bugs.webkit.org/show_bug.cgi?id=187747
     5
     6        Reviewed by Ryosuke Niwa.
     7       
     8        Add textInputController.attributedStringForTyping(), which returns a one-character
     9        attributed string whose attributes are the typing attributes, making it possible to
     10        test -[WebView typingAttributes].
     11       
     12        Sadly WebCore's convertObjcValueToValue() doesn't know how to convert NSDictionary,
     13        so we can't return -typingAttributes directly.
     14
     15        * DumpRenderTree/mac/TextInputControllerMac.m:
     16        (+[TextInputController isSelectorExcludedFromWebScript:]):
     17        (-[TextInputController attributedStringForTyping]):
     18
    1192018-07-18  Carlos Garcia Campos  <cgarcia@igalia.com>
    220
  • trunk/Tools/DumpRenderTree/mac/TextInputControllerMac.m

    r232452 r233913  
    5151#import <WebKit/WebTypesInternal.h>
    5252#import <WebKit/WebView.h>
     53#import <WebKit/WebViewPrivate.h>
    5354#import <wtf/mac/AppKitCompatibilityDeclarations.h>
    5455
     
    236237        || aSelector == @selector(characterIndexForPointX:Y:)
    237238        || aSelector == @selector(validAttributesForMarkedText)
     239        || aSelector == @selector(attributedStringForTyping)
    238240        || aSelector == @selector(attributedStringWithString:)
    239241        || aSelector == @selector(setInputMethodHandler:)
     
    455457}
    456458
     459- (NSMutableAttributedString *)attributedStringForTyping
     460{
     461    // The string has to be non-empty.
     462    return [[[NSMutableAttributedString alloc] initWithString:@" " attributes:[webView typingAttributes]] autorelease];
     463}
     464
    457465- (NSMutableAttributedString *)attributedStringWithString:(NSString *)aString
    458466{
Note: See TracChangeset for help on using the changeset viewer.