1. 28 Aug, 2013 1 commit
    • rniwa@webkit.org's avatar
      <https://webkit.org/b/119806> [Mac] Add a way to easily test attributed string generation · cb1d0344
      rniwa@webkit.org authored
      Reviewed by Darin Adler.
      
      Tools: 
      
      Add textInputController.legacyAttributedString to retrieve the attributed string for copy & paste.
      
      We can't use textInputController.attributedSubstringFromRange as it uses WebHTMLConverter's static
      editingAttributedStringFromRange function, which doesn't implement the full converter at the moment.
      
      Also NSMutableAttributedString.ranges and WebNSRange so that JavaScript can get a list of all
      ranges in a given attributed string.
      
      * DumpRenderTree/mac/TextInputController.m:
      (-[WebNSRange initWithNSRange:]):
      (-[WebNSRange location]):
      (-[WebNSRange length]):
      (+[WebNSRange isSelectorExcludedFromWebScript:]):
      (+[NSMutableAttributedString isSelectorExcludedFromWebScript:]):
      (+[NSMutableAttributedString webScriptNameForSelector:]):
      (-[NSMutableAttributedString ranges]): Added.
      (+[TextInputController isSelectorExcludedFromWebScript:]):
      (+[TextInputController webScriptNameForSelector:]):
      (-[TextInputController legacyAttributedString:]):
      
      LayoutTests: 
      
      Add basic tests for textInputController.legacyAttributedString.
      
      * platform/mac-wk2/TestExpectations:
      * platform/mac/editing/attributed-string: Added.
      * platform/mac/editing/attributed-string/anchor-element-expected.txt: Added.
      * platform/mac/editing/attributed-string/anchor-element.html: Added.
      * platform/mac/editing/attributed-string/basic-expected.txt: Added.
      * platform/mac/editing/attributed-string/basic.html: Added.
      * platform/mac/editing/attributed-string/font-size-expected.txt: Added.
      * platform/mac/editing/attributed-string/font-size.html: Added.
      * platform/mac/editing/attributed-string/font-style-variant-effect-expected.txt: Added.
      * platform/mac/editing/attributed-string/font-style-variant-effect.html: Added.
      * platform/mac/editing/attributed-string/font-weight-expected.txt: Added.
      * platform/mac/editing/attributed-string/font-weight.html: Added.
      * platform/mac/editing/attributed-string/letter-spacing-expected.txt: Added.
      * platform/mac/editing/attributed-string/letter-spacing.html: Added.
      * platform/mac/editing/attributed-string/resources: Added.
      * platform/mac/editing/attributed-string/resources/dump-attributed-string.js: Added.
      (.):
      * platform/mac/editing/attributed-string/text-decorations-expected.txt: Added.
      * platform/mac/editing/attributed-string/text-decorations.html: Added.
      * platform/mac/editing/attributed-string/vertical-align-expected.txt: Added.
      * platform/mac/editing/attributed-string/vertical-align.html: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154803 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      cb1d0344