Changeset 2312
- Timestamp:
- 02/13/05 22:28:45 (4 years ago)
- Files:
-
- trunk/JVStyleView.m (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/JVStyleView.m
r2308 r2312 425 425 if( ! subsequent ) { // append message normally 426 426 [[replaceElement parentNode] removeChild:replaceElement]; 427 while( [[element child ren] length] ) // append all children427 while( [[element childNodes] length] ) // append all children 428 428 [body appendChild:[element firstChild]]; 429 } else if( [[element child ren] length] >= 1 ) { // append as a subsequent message429 } else if( [[element childNodes] length] >= 1 ) { // append as a subsequent message 430 430 DOMNode *parent = [replaceElement parentNode]; 431 431 DOMNode *nextSib = [replaceElement nextSibling]; 432 432 [parent replaceChild:[element firstChild] :replaceElement]; // replaces the consecutiveInsert node 433 while( [[element child ren] length] ) { // append all remaining children (in reverse order)433 while( [[element childNodes] length] ) { // append all remaining children (in reverse order) 434 434 if( nextSib ) [parent insertBefore:[element firstChild] :nextSib]; 435 435 else [parent appendChild:[element firstChild]]; … … 438 438 439 439 // enforce the scrollback limit 440 if( scrollbackLimit > 0 && [[body child ren] length] > scrollbackLimit )441 for( i = 0; [[body child ren] length] > scrollbackLimit && i < ( [[body children] length] - scrollbackLimit ); i++ )442 [body removeChild:[[body child ren] item:0]];440 if( scrollbackLimit > 0 && [[body childNodes] length] > scrollbackLimit ) 441 for( i = 0; [[body childNodes] length] > scrollbackLimit && i < ( [[body childNodes] length] - scrollbackLimit ); i++ ) 442 [body removeChild:[[body childNodes] item:0]]; 443 443 444 444 if( [scrollNeeded boolValue] ) [self scrollToBottom]; … … 476 476 DOMNode *firstMessage = [body firstChild]; 477 477 478 while( [[element child ren] length] ) { // append all children478 while( [[element childNodes] length] ) { // append all children 479 479 if( firstMessage ) [body insertBefore:[element firstChild] :firstMessage]; 480 480 else [body appendChild:[element firstChild]]; … … 533 533 if( [[self mainFrame] respondsToSelector:@selector( DOMDocument )] ) { 534 534 DOMHTMLElement *body = [(DOMHTMLDocument *)[[self mainFrame] DOMDocument] body]; 535 if( index < [[body child ren] length] ) return [[[[body children] item:index] valueForKey:@"offsetTop"] intValue];535 if( index < [[body childNodes] length] ) return [[[[body childNodes] item:index] valueForKey:@"offsetTop"] intValue]; 536 536 else return 0; 537 537 } else … … 544 544 #ifdef WebKitVersion146 545 545 if( [[self mainFrame] respondsToSelector:@selector( DOMDocument )] ) { 546 return [[[(DOMHTMLDocument *)[[self mainFrame] DOMDocument] body] child ren] length];546 return [[[(DOMHTMLDocument *)[[self mainFrame] DOMDocument] body] childNodes] length]; 547 547 } else 548 548 #endif
