• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10.1/tidy-15.15/tidy/src/

Lines Matching +defs:child +defs:name

68     node->element = TY_(tmbstrdup)( dict->name );
79 MemFree(props->name);
86 static StyleProp *InsertProperty( StyleProp* props, ctmbstr name, ctmbstr value )
96 cmp = TY_(tmbstrcmp)(props->name, name);
109 prop->name = TY_(tmbstrdup)(name);
126 prop->name = TY_(tmbstrdup)(name);
141 delimit the strings for the property name and value.
147 tmbstr name, value = NULL, name_end, value_end, line;
151 name = line;
153 while (*name)
155 while (*name == ' ')
156 ++name;
158 name_end = name;
194 prop = InsertProperty(prop, name, value);
200 name = value_end + 1;
221 len += TY_(tmbstrlen)(prop->name) + 2;
231 s = prop->name;
330 then append class name after a space.
375 then append class name after an underscore
556 the head node should be first child of html node
566 Node *child;
578 for (child = node->content; child; child = child->next)
579 child->parent = node;
583 used to strip child of node when
584 the node has one and only one child
588 Node *child;
590 child = node->content;
591 node->content = child->content;
592 node->last = child->last;
593 child->content = NULL;
594 TY_(FreeNode)(doc, child);
596 for (child = node->content; child; child = child->next)
597 child->parent = node;
648 the same property name.
692 static void MergeClasses(TidyDocImpl* doc, Node *node, Node *child)
697 for (s2 = NULL, av = child->attributes; av; av = av->next)
730 else if (s2) /* copy class names from child */
737 static void MergeStyles(TidyDocImpl* doc, Node *node, Node *child)
743 the child may have a class attribute used
744 for attaching styles, if so the class name
747 MergeClasses(doc, node, child);
749 for (s2 = NULL, av = child->attributes; av; av = av->next)
776 else if (s2) /* copy style of child */
952 Symptom: <dir> <li> where <li> is only child
958 Node *child;
962 child = node->content;
964 if (child == NULL)
967 /* check child has no peers */
969 if (child->next)
972 if ( !nodeIsLI(child) )
975 if ( !child->implicit )
1035 /* Copy child attributes to node. Duplicate attributes are overwritten.
1040 static Bool CopyAttrs( TidyDocImpl* doc, Node *node, Node *child)
1046 if (TY_(AttrGetById)(child, TidyAttr_ID) != NULL
1050 /* Move child attributes to node. Attributes in node
1052 for (av2 = child->attributes; av2; )
1065 /* Move attribute from child to node */
1066 TY_(DetachAttribute)( child, av2 );
1093 Node *child;
1099 child = node->content;
1101 if ( child == NULL
1102 || child->next != NULL
1103 || !TagIsId(child, Id) )
1107 && CopyAttrs(doc, node, child) == no )
1110 MergeStyles( doc, node, child );
1122 Node *child, *list;
1126 child = node->content;
1128 if (child == NULL)
1131 /* check child has no peers */
1133 if (child->next)
1136 list = child->content;
1157 child->content = NULL;
1158 TY_(FreeNode)( doc, child ); /* See test #427841. */
1159 child = NULL;
1179 child = list->last; /* <li> */
1184 node->parent = child;
1186 node->prev = child->last;
1213 Symptom: the only child of a block-level element is a
1237 Node *child;
1245 child = node->content;
1246 if (child == NULL)
1249 /* check child has no peers */
1250 if (child->next)
1253 if ( nodeIsB(child) )
1255 MergeStyles( doc, node, child );
1261 if ( nodeIsI(child) )
1263 MergeStyles( doc, node, child );
1269 if ( nodeIsFONT(child) )
1271 MergeStyles( doc, node, child );
1272 AddFontStyles( doc, node, child->attributes );
1281 /* the only child of table cell or an inline element such as em */
1284 Node *child;
1288 child = node->content;
1290 if (child == NULL)
1293 /* check child has no peers */
1295 if (child->next)
1298 if ( nodeIsB(child) && cfgBool(doc, TidyLogicalEmphasis) )
1300 MergeStyles( doc, node, child );
1306 if ( nodeIsI(child) && cfgBool(doc, TidyLogicalEmphasis) )
1308 MergeStyles( doc, node, child );
1314 if ( nodeIsFONT(child) )
1316 MergeStyles( doc, node, child );
1317 AddFontStyles( doc, node, child->attributes );
1343 /* if FONT is only child of parent element then leave alone
1431 Node *child;
1432 for (child = node->content; child != NULL; child = child->next)
1434 child = CleanTree( doc, child );
1435 if ( !child )
1445 Node *child;
1449 for (child = node->content;
1450 child != NULL; child = child->next)
1452 DefineStyleRules( doc, child );
1932 if ( node->tag && TY_(tmbstrcmp)(node->tag->name,"o:p")==0)
2038 /* search for <meta name="GENERATOR" content="Microsoft ..."> */
2088 Node *child;
2091 for (child = node->content; child != NULL; child = child->next)
2094 if ( (TY_(nodeIsText)(child) && !TY_(IsBlank)(doc->lexer, node))
2095 || !nodeIsPARAM(child) )
2133 /* As long as my last child is a <br />, move it to my last peer */
2195 prop->name = TY_(tmbstrdup)( pszBegin );
2213 if (0 != TY_(tmbstrncasecmp)( prop->name, "charset", 7 ))
2216 MemFree( prop->name );
2217 prop->name = (tmbstr)MemAlloc( 8 + TY_(tmbstrlen)(enc) + 1 );
2218 TY_(tmbstrcpy)(prop->name, "charset=");
2219 TY_(tmbstrcpy)(prop->name+8, enc);
2528 AttVal *name = TY_(AttrGetById)(node, TidyAttr_NAME);
2531 /* todo: how are empty name/id attributes handled? */
2533 if (name && id)
2535 Bool NameHasValue = AttrHasValue(name);
2539 TY_(tmbstrcmp)(name->value, id->value) != 0 ) )
2540 TY_(ReportAttrError)( doc, node, name, ID_NAME_MISMATCH);
2542 else if (name && wantId)
2547 if (TY_(IsValidHTMLID)(name->value))
2549 TY_(RepairAttrValue)(doc, node, "id", name->value);
2553 TY_(ReportAttrError)(doc, node, name, INVALID_XML_ID);
2562 TY_(RepairAttrValue)(doc, node, "name", id->value);
2568 if (name && !wantName)
2569 TY_(RemoveAttribute)(doc, node, name);