Merged changes from andrewle, #96, support Aria attributes.

This commit is contained in:
Jim Derry 2014-11-22 17:38:22 +08:00
commit e4f7aa0748
4 changed files with 11219 additions and 7370 deletions

View file

@ -7,7 +7,7 @@
generated wrappers and COM IDL files.
Copyright (c) 1998-2008 World Wide Web Consortium
(Massachusetts Institute of Technology, European Research
(Massachusetts Institute of Technology, European Research
Consortium for Informatics and Mathematics, Keio University).
All Rights Reserved.
@ -16,18 +16,18 @@
Dave Raggett <dsr@w3.org>
The contributing author(s) would like to thank all those who
helped with testing, bug fixes and suggestions for improvements.
helped with testing, bug fixes and suggestions for improvements.
This wouldn't have been possible without your help.
COPYRIGHT NOTICE:
This software and documentation is provided "as is," and
the copyright holders and contributing author(s) make no
representations or warranties, express or implied, including
but not limited to, warranties of merchantability or fitness
for any particular purpose or that the use of the software or
documentation will not infringe any third party patents,
copyrights, trademarks or other rights.
copyrights, trademarks or other rights.
The copyright holders and contributing author(s) will not be held
liable for any direct, indirect, special or consequential damages
@ -43,7 +43,7 @@
not be misrepresented as being the original source.
3. This Copyright notice may not be removed or altered from any
source or altered source distribution.
The copyright holders and contributing author(s) specifically
permit, without fee, and encourage the use of this source code
as a component for supporting the Hypertext Markup Language in
@ -86,7 +86,7 @@ typedef enum
TidyCharEncoding, /**< In/out character encoding */
TidyInCharEncoding, /**< Input character encoding (if different) */
TidyOutCharEncoding, /**< Output character encoding (if different) */
TidyOutCharEncoding, /**< Output character encoding (if different) */
TidyNewline, /**< Output line ending (default to platform) */
TidyDoctypeMode, /**< See doctype property */
@ -94,7 +94,7 @@ typedef enum
TidyDuplicateAttrs, /**< Keep first or last duplicate attribute */
TidyAltText, /**< Default text for alt attribute */
/* obsolete */
TidySlideStyle, /**< Style sheet for slides: not used for anything yet */
@ -188,7 +188,7 @@ typedef enum
TidyEmptyTags, /**< Declared empty tags */
TidyPreTags, /**< Declared pre tags */
TidyAccessibilityCheckLevel, /**< Accessibility check level
TidyAccessibilityCheckLevel, /**< Accessibility check level
0 (old style), or 1, 2, 3 */
TidyVertSpace, /**< degree to which markup is spread out vertically */
@ -267,8 +267,8 @@ typedef enum
/* I/O and Message handling interface
**
** By default, Tidy will define, create and use
** instances of input and output handlers for
** By default, Tidy will define, create and use
** instances of input and output handlers for
** standard C buffered I/O (i.e. FILE* stdin,
** FILE* stdout and FILE* stderr for content
** input, content output and diagnostic output,
@ -279,7 +279,7 @@ typedef enum
/** Message severity level
*/
typedef enum
typedef enum
{
TidyInfo, /**< Information about markup usage */
TidyWarning, /**< Warning message */
@ -296,7 +296,7 @@ typedef enum
/** Node types
*/
typedef enum
typedef enum
{
TidyNode_Root, /**< Root */
TidyNode_DocType, /**< DOCTYPE */
@ -742,6 +742,42 @@ typedef enum
TidyAttr_SRCDOC,
TidyAttr_SRCLANG,
TidyAttr_STEP,
TidyAttr_ARIA_ACTIVEDESCENDANT,
TidyAttr_ARIA_ATOMIC,
TidyAttr_ARIA_AUTOCOMPLETE,
TidyAttr_ARIA_BUSY,
TidyAttr_ARIA_CHECKED,
TidyAttr_ARIA_CONTROLS,
TidyAttr_ARIA_DESCRIBEDBY,
TidyAttr_ARIA_DISABLED,
TidyAttr_ARIA_DROPEFFECT,
TidyAttr_ARIA_EXPANDED,
TidyAttr_ARIA_FLOWTO,
TidyAttr_ARIA_GRABBED,
TidyAttr_ARIA_HASPOPUP,
TidyAttr_ARIA_HIDDEN,
TidyAttr_ARIA_INVALID,
TidyAttr_ARIA_LABEL,
TidyAttr_ARIA_LABELLEDBY,
TidyAttr_ARIA_LEVEL,
TidyAttr_ARIA_LIVE,
TidyAttr_ARIA_MULTILINE,
TidyAttr_ARIA_MULTISELECTABLE,
TidyAttr_ARIA_OWNS,
TidyAttr_ARIA_POSINSET,
TidyAttr_ARIA_PRESSED,
TidyAttr_ARIA_READONLY,
TidyAttr_ARIA_RELEVANT,
TidyAttr_ARIA_REQUIRED,
TidyAttr_ARIA_SELECTED,
TidyAttr_ARIA_SETSIZE,
TidyAttr_ARIA_SORT,
TidyAttr_ARIA_VALUEMAX,
TidyAttr_ARIA_VALUEMIN,
TidyAttr_ARIA_VALUENOW,
TidyAttr_ARIA_VALUETEXT,
N_TIDY_ATTRIBS /**< Must be last */
@ -751,3 +787,4 @@ typedef enum
} /* extern "C" */
#endif
#endif /* __TIDYENUM_H__ */

File diff suppressed because it is too large Load diff

View file

@ -355,6 +355,42 @@ static const Attribute attribute_defs [] =
{ TidyAttr_SRCLANG, "srclang", CH_PCDATA },
{ TidyAttr_STEP, "step", CH_PCDATA },
/* HTML5 Aria Attributes */
{ TidyAttr_ARIA_ACTIVEDESCENDANT, "aria-activedescendant", CH_PCDATA },
{ TidyAttr_ARIA_ATOMIC, "aria-atomic", CH_PCDATA },
{ TidyAttr_ARIA_AUTOCOMPLETE, "aria-autocomplete", CH_PCDATA },
{ TidyAttr_ARIA_BUSY, "aria-busy", CH_PCDATA },
{ TidyAttr_ARIA_CHECKED, "aria-checked", CH_PCDATA },
{ TidyAttr_ARIA_CONTROLS, "aria-controls", CH_PCDATA },
{ TidyAttr_ARIA_DESCRIBEDBY, "aria-describedby", CH_PCDATA },
{ TidyAttr_ARIA_DISABLED, "aria-disabled", CH_PCDATA },
{ TidyAttr_ARIA_DROPEFFECT, "aria-dropeffect", CH_PCDATA },
{ TidyAttr_ARIA_EXPANDED, "aria-expanded", CH_PCDATA },
{ TidyAttr_ARIA_FLOWTO, "aria-flowto", CH_PCDATA },
{ TidyAttr_ARIA_GRABBED, "aria-grabbed", CH_PCDATA },
{ TidyAttr_ARIA_HASPOPUP, "aria-haspopup", CH_PCDATA },
{ TidyAttr_ARIA_HIDDEN, "aria-hidden", CH_PCDATA },
{ TidyAttr_ARIA_INVALID, "aria-invalid", CH_PCDATA },
{ TidyAttr_ARIA_LABEL, "aria-label", CH_PCDATA },
{ TidyAttr_ARIA_LABELLEDBY, "aria-labelledby", CH_PCDATA },
{ TidyAttr_ARIA_LEVEL, "aria-level", CH_PCDATA },
{ TidyAttr_ARIA_LIVE, "aria-live", CH_PCDATA },
{ TidyAttr_ARIA_MULTILINE, "aria-multiline", CH_PCDATA },
{ TidyAttr_ARIA_MULTISELECTABLE, "aria-multiselectable", CH_PCDATA },
{ TidyAttr_ARIA_OWNS, "aria-owns", CH_PCDATA },
{ TidyAttr_ARIA_POSINSET, "aria-posinset", CH_PCDATA },
{ TidyAttr_ARIA_PRESSED, "aria-pressed", CH_PCDATA },
{ TidyAttr_ARIA_READONLY, "aria-readonly", CH_PCDATA },
{ TidyAttr_ARIA_RELEVANT, "aria-relevant", CH_PCDATA },
{ TidyAttr_ARIA_REQUIRED, "aria-required", CH_PCDATA },
{ TidyAttr_ARIA_SELECTED, "aria-selected", CH_PCDATA },
{ TidyAttr_ARIA_SETSIZE, "aria-setsize", CH_PCDATA },
{ TidyAttr_ARIA_SORT, "aria-sort", CH_PCDATA },
{ TidyAttr_ARIA_VALUEMAX, "aria-valuemax", CH_PCDATA },
{ TidyAttr_ARIA_VALUEMIN, "aria-valuemin", CH_PCDATA },
{ TidyAttr_ARIA_VALUENOW, "aria-valuenow", CH_PCDATA },
{ TidyAttr_ARIA_VALUETEXT, "aria-valuetext", CH_PCDATA },
/* this must be the final entry */
{ N_TIDY_ATTRIBS, NULL, NULL }
};

View file

@ -311,6 +311,41 @@ uint TY_(NodeAttributeVersions)( Node* node, TidyAttrId id );
#define attrIsXMLNS(av) AttrIsId( av, TidyAttr_XMLNS )
#define attrIsXML_LANG(av) AttrIsId( av, TidyAttr_XML_LANG )
#define attrIsXML_SPACE(av) AttrIsId( av, TidyAttr_XML_SPACE )
#define attrIsARIA_ACTIVEDESCENDANT(av) AttrIsId( av, TidyAttr_ARIA_ACTIVEDESCENDANT )
#define attrIsARIA_ATOMIC(av) AttrIsId( av, TidyAttr_ARIA_ATOMIC )
#define attrIsARIA_AUTOCOMPLETE(av) AttrIsId( av, TidyAttr_ARIA_AUTOCOMPLETE )
#define attrIsARIA_BUSY(av) AttrIsId( av, TidyAttr_ARIA_BUSY )
#define attrIsARIA_CHECKED(av) AttrIsId( av, TidyAttr_ARIA_CHECKED )
#define attrIsARIA_CONTROLS(av) AttrIsId( av, TidyAttr_ARIA_CONTROLS )
#define attrIsARIA_DESCRIBEDBY(av) AttrIsId( av, TidyAttr_ARIA_DESCRIBEDBY )
#define attrIsARIA_DISABLED(av) AttrIsId( av, TidyAttr_ARIA_DISABLED )
#define attrIsARIA_DROPEFFECT(av) AttrIsId( av, TidyAttr_ARIA_DROPEFFECT )
#define attrIsARIA_EXPANDED(av) AttrIsId( av, TidyAttr_ARIA_EXPANDED )
#define attrIsARIA_FLOWTO(av) AttrIsId( av, TidyAttr_ARIA_FLOWTO )
#define attrIsARIA_GRABBED(av) AttrIsId( av, TidyAttr_ARIA_GRABBED )
#define attrIsARIA_HASPOPUP(av) AttrIsId( av, TidyAttr_ARIA_HASPOPUP )
#define attrIsARIA_HIDDEN(av) AttrIsId( av, TidyAttr_ARIA_HIDDEN )
#define attrIsARIA_INVALID(av) AttrIsId( av, TidyAttr_ARIA_INVALID )
#define attrIsARIA_LABEL(av) AttrIsId( av, TidyAttr_ARIA_LABEL )
#define attrIsARIA_LABELLEDBY(av) AttrIsId( av, TidyAttr_ARIA_LABELLEDBY )
#define attrIsARIA_LEVEL(av) AttrIsId( av, TidyAttr_ARIA_LEVEL )
#define attrIsARIA_LIVE(av) AttrIsId( av, TidyAttr_ARIA_LIVE )
#define attrIsARIA_MULTILINE(av) AttrIsId( av, TidyAttr_ARIA_MULTILINE )
#define attrIsARIA_MULTISELECTABLE(av) AttrIsId( av, TidyAttr_ARIA_MULTISELECTABLE )
#define attrIsARIA_OWNS(av) AttrIsId( av, TidyAttr_ARIA_OWNS )
#define attrIsARIA_POSINSET(av) AttrIsId( av, TidyAttr_ARIA_POSINSET )
#define attrIsARIA_PRESSED(av) AttrIsId( av, TidyAttr_ARIA_PRESSED )
#define attrIsARIA_READONLY(av) AttrIsId( av, TidyAttr_ARIA_READONLY )
#define attrIsARIA_RELEVANT(av) AttrIsId( av, TidyAttr_ARIA_RELEVANT )
#define attrIsARIA_REQUIRED(av) AttrIsId( av, TidyAttr_ARIA_REQUIRED )
#define attrIsARIA_SELECTED(av) AttrIsId( av, TidyAttr_ARIA_SELECTED )
#define attrIsARIA_SETSIZE(av) AttrIsId( av, TidyAttr_ARIA_SETSIZE )
#define attrIsARIA_SORT(av) AttrIsId( av, TidyAttr_ARIA_SORT )
#define attrIsARIA_VALUEMAX(av) AttrIsId( av, TidyAttr_ARIA_VALUEMAX )
#define attrIsARIA_VALUEMIN(av) AttrIsId( av, TidyAttr_ARIA_VALUEMIN )
#define attrIsARIA_VALUENOW(av) AttrIsId( av, TidyAttr_ARIA_VALUENOW )
#define attrIsARIA_VALUETEXT(av) AttrIsId( av, TidyAttr_ARIA_VALUETEXT )
/* Attribute Retrieval macros
@ -367,4 +402,39 @@ uint TY_(NodeAttributeVersions)( Node* node, TidyAttrId id );
#define attrGetBASEFONT( nod ) TY_(AttrGetById)( nod, TidyAttr_BASEFONT )
#define attrGetROWSPAN( nod ) TY_(AttrGetById)( nod, TidyAttr_ROWSPAN )
#define attrGetARIA_ACTIVEDESCENDANT( nod ) TY_(AttrGetById)( nod, TidyAttr_ARIA_ACTIVEDESCENDANT )
#define attrGetARIA_ATOMIC( nod ) TY_(AttrGetById)( nod, TidyAttr_ARIA_ATOMIC )
#define attrGetARIA_AUTOCOMPLETE( nod ) TY_(AttrGetById)( nod, TidyAttr_ARIA_AUTOCOMPLETE )
#define attrGetARIA_BUSY( nod ) TY_(AttrGetById)( nod, TidyAttr_ARIA_BUSY )
#define attrGetARIA_CHECKED( nod ) TY_(AttrGetById)( nod, TidyAttr_ARIA_CHECKED )
#define attrGetARIA_CONTROLS( nod ) TY_(AttrGetById)( nod, TidyAttr_ARIA_CONTROLS )
#define attrGetARIA_DESCRIBEDBY( nod ) TY_(AttrGetById)( nod, TidyAttr_ARIA_DESCRIBEDBY )
#define attrGetARIA_DISABLED( nod ) TY_(AttrGetById)( nod, TidyAttr_ARIA_DISABLED )
#define attrGetARIA_DROPEFFECT( nod ) TY_(AttrGetById)( nod, TidyAttr_ARIA_DROPEFFECT )
#define attrGetARIA_EXPANDED( nod ) TY_(AttrGetById)( nod, TidyAttr_ARIA_EXPANDED )
#define attrGetARIA_FLOWTO( nod ) TY_(AttrGetById)( nod, TidyAttr_ARIA_FLOWTO )
#define attrGetARIA_GRABBED( nod ) TY_(AttrGetById)( nod, TidyAttr_ARIA_GRABBED )
#define attrGetARIA_HASPOPUP( nod ) TY_(AttrGetById)( nod, TidyAttr_ARIA_HASPOPUP )
#define attrGetARIA_HIDDEN( nod ) TY_(AttrGetById)( nod, TidyAttr_ARIA_HIDDEN )
#define attrGetARIA_INVALID( nod ) TY_(AttrGetById)( nod, TidyAttr_ARIA_INVALID )
#define attrGetARIA_LABEL( nod ) TY_(AttrGetById)( nod, TidyAttr_ARIA_LABEL )
#define attrGetARIA_LABELLEDBY( nod ) TY_(AttrGetById)( nod, TidyAttr_ARIA_LABELLEDBY )
#define attrGetARIA_LEVEL( nod ) TY_(AttrGetById)( nod, TidyAttr_ARIA_LEVEL )
#define attrGetARIA_LIVE( nod ) TY_(AttrGetById)( nod, TidyAttr_ARIA_LIVE )
#define attrGetARIA_MULTILINE( nod ) TY_(AttrGetById)( nod, TidyAttr_ARIA_MULTILINE )
#define attrGetARIA_MULTISELECTABLE( nod ) TY_(AttrGetById)( nod, TidyAttr_ARIA_MULTISELECTABLE )
#define attrGetARIA_OWNS( nod ) TY_(AttrGetById)( nod, TidyAttr_ARIA_OWNS )
#define attrGetARIA_POSINSET( nod ) TY_(AttrGetById)( nod, TidyAttr_ARIA_POSINSET )
#define attrGetARIA_PRESSED( nod ) TY_(AttrGetById)( nod, TidyAttr_ARIA_PRESSED )
#define attrGetARIA_READONLY( nod ) TY_(AttrGetById)( nod, TidyAttr_ARIA_READONLY )
#define attrGetARIA_RELEVANT( nod ) TY_(AttrGetById)( nod, TidyAttr_ARIA_RELEVANT )
#define attrGetARIA_REQUIRED( nod ) TY_(AttrGetById)( nod, TidyAttr_ARIA_REQUIRED )
#define attrGetARIA_SELECTED( nod ) TY_(AttrGetById)( nod, TidyAttr_ARIA_SELECTED )
#define attrGetARIA_SETSIZE( nod ) TY_(AttrGetById)( nod, TidyAttr_ARIA_SETSIZE )
#define attrGetARIA_SORT( nod ) TY_(AttrGetById)( nod, TidyAttr_ARIA_SORT )
#define attrGetARIA_VALUEMAX( nod ) TY_(AttrGetById)( nod, TidyAttr_ARIA_VALUEMAX )
#define attrGetARIA_VALUEMIN( nod ) TY_(AttrGetById)( nod, TidyAttr_ARIA_VALUEMIN )
#define attrGetARIA_VALUENOW( nod ) TY_(AttrGetById)( nod, TidyAttr_ARIA_VALUENOW )
#define attrGetARIA_VALUETEXT( nod ) TY_(AttrGetById)( nod, TidyAttr_ARIA_VALUETEXT )
#endif /* __ATTRS_H__ */