Reviewed by Chris Blumenberg.
[WebKit-https.git] / WebCore / ChangeLog-2005-08-23
1 2005-06-28  David Harrison  <harrison@apple.com>
2
3         Reviewed by Chris Blumenberg.
4
5         Test cases added: (NONE)
6         
7         (continued) <rdar://problem/4140688> assertion failure double-clicking text to select
8         Fixed my checkin from yesterday.
9
10         * khtml/rendering/render_text.cpp:
11         (InlineTextBox::paintMarkedTextBackground):
12         (InlineTextBox::positionForOffset):
13         Changed tabs to spaces.
14         
15         (RenderText::positionForCoordinates):
16         Make sure affinity is downstream when in mid-line.
17         Changed tabs to spaces.
18
19         (RenderText::caretRect):
20         (RenderText::cacheWidths):
21         (RenderText::trimmedMinMaxWidth):
22         (RenderText::minXPos):
23         (RenderText::width):
24         (RenderText::caretMaxOffset):
25         Changed tabs to spaces.
26
27         * layout-tests/editing/style/create-block-for-style-004-expected.txt:
28         Expected ending selection affinity is downstream.
29
30 2005-06-27  Maciej Stachowiak  <mjs@apple.com>
31
32         Remove accidentally committed code that breaks the build. Oops!
33
34         * khtml/xml/dom_atomicstring.cpp:
35         (DOM::AtomicString::expand):
36         (DOM::AtomicString::shrink):
37
38 2005-06-26  Maciej Stachowiak  <mjs@apple.com>
39
40         Reviewed by Darin.
41
42         - replaced all our hash functions with the state of the art in hashing
43         - ~1% speedup on cvs-base
44         
45         No test cases added, perf effects only.
46
47         * khtml/xml/dom_atomicstring.cpp:
48         (DOM::AtomicStringStatisticsExitLogger::~AtomicStringStatisticsExitLogger):
49         Improved stats gathering to track collisions in more detail and count reinserts
50         on remove.
51         (DOM::addToCollisionCount): ditto
52         (DOM::AtomicString::add): ditto
53         (DOM::AtomicString::insert): ditto
54         (DOM::AtomicString::remove): ditto
55         * khtml/xml/dom_stringimpl.cpp:
56         (DOM::DOMStringImpl::computeHash): Replace with SuperFastHash algorithm.
57         * kwq/KWQCharsets.mm:
58         (encodingNameHash): Clean up mistaken shift in the wrong direction.
59         * kwq/KWQString.h: Removed unused hashing code.
60         * kwq/KWQString.mm: ditto
61         * kwq/KWQTextCodec.mm:
62         (QTextCodec::hash): Use a variant of the SuperFastHash algorithm.
63
64 2005-06-27  David Harrison  <harrison@apple.com>
65
66         Reviewed by Ken.
67
68         Test cases added: None because this relies on mouse clicking.
69
70         <rdar://problem/4140688> assertion failure double-clicking text to select
71
72         * khtml/rendering/render_text.cpp:
73         (RenderText::positionForCoordinates):
74         Use setAffinityUsingLinePosition.
75
76 2005-06-25  Darin Adler  <darin@apple.com>
77
78         - updated a layout test so that it doesn't depend on a remote resource via http
79
80         * layout-tests/fast/backgrounds/001.html: Change image URL to be relative.
81         * layout-tests/fast/backgrounds/resources/bg_position_larger.gif: Added.
82
83 2005-06-24  Darin Adler  <darin@apple.com>
84
85         Changes by Mitz Pettel.
86         Reviewed by me.
87
88         Test cases added:
89         * layout-tests/fast/text/international/bidi-explicit-embedding-expected.txt: Added.
90         * layout-tests/fast/text/international/bidi-explicit-embedding.html: Added.
91
92         - fixed <http://bugzilla.opendarwin.org/show_bug.cgi?id=3599>
93           Incorrect layout of explicit embedding levels
94
95         * khtml/rendering/bidi.cpp:
96         (khtml::embed): Set up the new run correctly following an embed/pop.
97         (khtml::RenderBlock::bidiReorderLine): Close the "dangling" run when we see an explicit
98         embedding character (or PDF).
99
100 2005-06-24  Darin Adler  <darin@apple.com>
101
102         Changes by Mitz Pettel.
103         Reviewed by me.
104
105         Test cases added:
106         * layout-tests/fast/text/international/bidi-CS-after-AN-expected.txt: Added.
107         * layout-tests/fast/text/international/bidi-CS-after-AN.html: Added.
108
109         - fixed <http://bugzilla.opendarwin.org/show_bug.cgi?id=3693>
110           Bug_72578 in KHTML: bidi algorithm misbehaves with CS after AN
111
112         * khtml/rendering/bidi.cpp: (khtml::RenderBlock::bidiReorderLine): Rolled in the
113         patch from the KDE tree.
114
115 2005-06-24  Justin Garcia  <justin.garcia@apple.com>
116
117         - <http://bugzilla.opendarwin.org/show_bug.cgi?id=3673> 
118             Adds QBuffer::setBuffer(QByteArray) support to KWQBuffer, and adds a QBuffer(QByteArray) constructor.
119
120         Reviewed by Darin
121
122         Test cases added: Non required
123
124         * kwq/KWQBuffer.h:
125         (QBuffer::QBuffer):
126         * kwq/KWQBuffer.mm:
127         (QBuffer::setBuffer):
128
129 2005-06-24  Justin Garcia  <justin.garcia@apple.com>
130
131         - <http://bugzilla.opendarwin.org/show_bug.cgi?id=3672> KWQRect -- CGRect and other small additions
132         - <http://bugzilla.opendarwin.org/show_bug.cgi?id=3670> Add remove and byteOrderMark support to KWQString for kdom
133
134         Reviewed by Darin
135
136         Test cases added: None required
137
138         * kwq/KWQRect.h:
139         (QRect::contains):
140         * kwq/KWQRect.mm:
141         (QRect::QRect):
142         (QRect::topRight):
143         (QRect::bottomLeft):
144         (QRect::normalize):
145         (QRect::operator CGRect):
146         * kwq/KWQString.h:
147         (QChar::):
148         (QString::remove):
149
150 2005-06-24  Darin Adler  <darin@apple.com>
151
152         Reviewed by Justin Garcia.
153
154         - fixed <rdar://problem/4151619> Safari changes "\" characters to "/" in the query part of links that start with "?"
155
156         Test cases added:
157         * layout-tests/fast/dom/anchor-backslash-expected.txt: Added.
158         * layout-tests/fast/dom/anchor-backslash.html: Added.
159
160         * kwq/KWQKURL.mm: (substituteBackslashes): Fix error where we'd ignore
161         "?" and "#" characters if they were the first character in the string.
162
163 2005-06-23  Darin Adler  <darin@apple.com>
164
165         * khtml/html/html_formimpl.cpp: (DOM::HTMLTextAreaElementImpl::setValue):
166         Took out an unneeded type cast (meant to do that before committing).
167
168 2005-06-23  Kevin Ballard  <kevin@sb.org>
169
170         Reviewed and landed by Darin Adler.
171
172         Test cases added:
173         * layout-tests/fast/forms/selection-functions-expected.txt: Added.
174         * layout-tests/fast/forms/selection-functions.html: Added.
175         * layout-tests/fast/forms/textarea-crlf-expected.txt: Added.
176         * layout-tests/fast/forms/textarea-crlf.html: Added.
177
178         - Fixes bug <http://bugzilla.opendarwin.org/show_bug.cgi?id=3401>.
179           Also fixes issue where setting text of a textarea in code and then
180           retrieving it would leave the \r\n sequences in the text, despite
181           the textarea translating to \n in all other cases.
182
183         * khtml/ecma/kjs_html.h:
184         * khtml/ecma/kjs_html.cpp:
185         (KJS::getInputSelectionStart):
186         (KJS::getInputSelectionEnd):
187         (KJS::KJS::HTMLElement::getValueProperty):
188         (KJS::KJS::HTMLElement::hasProperty):
189         (KJS::KJS::HTMLElementFunction::tryCall):
190         (KJS::HTMLElement::putValue):
191         * khtml/html/html_formimpl.cpp:
192         (DOM::HTMLInputElementImpl::canHaveSelection):
193         (DOM::HTMLInputElementImpl::selectionStart):
194         (DOM::HTMLInputElementImpl::selectionEnd):
195         (DOM::HTMLInputElementImpl::setSelectionStart):
196         (DOM::HTMLInputElementImpl::setSelectionEnd):
197         (DOM::HTMLInputElementImpl::setSelectionRange):
198         (DOM::HTMLInputElementImpl::setValue):
199         (DOM::HTMLTextAreaElementImpl::selectionStart):
200         (DOM::HTMLTextAreaElementImpl::selectionEnd):
201         (DOM::HTMLTextAreaElementImpl::setSelectionStart):
202         (DOM::HTMLTextAreaElementImpl::setSelectionEnd):
203         (DOM::HTMLTextAreaElementImpl::setSelectionRange):
204         (DOM::HTMLTextAreaElementImpl::setValue):
205         * khtml/html/html_formimpl.h:
206         * khtml/rendering/render_form.cpp:
207         (RenderLineEdit::selectionStart):
208         (RenderLineEdit::selectionEnd):
209         (RenderLineEdit::setSelectionStart):
210         (RenderLineEdit::setSelectionEnd):
211         (RenderLineEdit::setSelectionRange):
212         (RenderTextArea::selectionStart):
213         (RenderTextArea::selectionEnd):
214         (RenderTextArea::setSelectionStart):
215         (RenderTextArea::setSelectionEnd):
216         (RenderTextArea::select):
217         (RenderTextArea::setSelectionRange):
218         * khtml/rendering/render_form.h:
219         * kwq/KWQLineEdit.h:
220         * kwq/KWQLineEdit.mm:
221         (QLineEdit::setCursorPosition):
222         (QLineEdit::cursorPosition):
223         (QLineEdit::selectAll):
224         (QLineEdit::selectionStart):
225         (QLineEdit::selectedText):
226         (QLineEdit::setSelection):
227         * kwq/KWQTextArea.h:
228         * kwq/KWQTextArea.mm:
229         (-[KWQTextArea setSelectedRange:]):
230         (-[KWQTextArea selectedRange]):
231         (-[KWQTextArea getCursorPositionAsIndex:inParagraph:]):
232         (RangeOfParagraph):
233         * kwq/KWQTextEdit.h:
234         * kwq/KWQTextEdit.mm:
235         (QTextEdit::getCursorPosition):
236         (QTextEdit::selectionStart):
237         (QTextEdit::selectionEnd):
238         (QTextEdit::setSelectionStart):
239         (QTextEdit::setSelectionEnd):
240         (QTextEdit::selectAll):
241         (QTextEdit::setSelectionRange):
242         * kwq/KWQTextField.h:
243         * kwq/KWQTextField.mm:
244         (-[KWQTextFieldController selectedRange]):
245         (-[KWQTextFieldController setSelectedRange:]):
246
247 2005-06-23  Justin Garcia  <justin.garcia@apple.com>
248
249         Patch by Eric Seidel <macdome@opendarwin.org>
250
251         Adds QTextIStream, QTextOStream to KWQ
252
253         Reviewed by Darin
254
255         Test cases added: None required
256
257         * kwq/KWQTextStream.h:
258         (QTextIStream::QTextIStream):
259         (QTextOStream::QTextOStream):
260
261 2005-06-23  Justin Garcia  <justin.garcia@apple.com>
262
263         Patch by Eric Seidel <macdome@opendarwin.org>
264
265         This patch contains several small additions to KWQ
266
267         Reviewed by Darin
268
269         Test cases added: None required
270
271         * kwq/KWQApplication.h:
272         (QApplication::palette):
273         * kwq/KWQDateTime.h:
274         (QDateTime::time):
275         * kwq/KWQDict.h:
276         (QDict::operator[]):
277         (QDictIterator::operator*):
278         * kwq/KWQKDebug.h:
279         (kdbgstream::operator<<):
280         * kwq/KWQMemArray.h:
281         (QMemArray::duplicate):
282
283 2005-06-23  David Harrison  <harrison@apple.com>
284
285         Test cases added: None needed for this debug-only utility code.
286
287         - Make showTree() const.
288         - Add showTree() for InlineBox.
289         - Add showTree() for RenderObject.
290
291         * khtml/editing/selection.cpp:
292         (khtml::Selection::showTree):
293         * khtml/editing/selection.h:
294         * khtml/editing/visible_position.cpp:
295         (khtml::VisiblePosition::showTree):
296         * khtml/editing/visible_position.h:
297         Make showTree() const.
298         
299         * khtml/rendering/render_line.cpp:
300         (khtml::InlineBox::showTree):
301         * khtml/rendering/render_line.h:
302         Add showTree() for InlineBox.
303         
304         * khtml/rendering/render_object.cpp:
305         (RenderObject::showTree):
306         * khtml/rendering/render_object.h:
307         Add showTree() for RenderObject.
308         
309         * khtml/xml/dom_nodeimpl.cpp:
310         (appendAttributeDesc):
311         (NodeImpl::showNode):
312         (NodeImpl::showTree):
313         (NodeImpl::showTreeAndMark):
314         * khtml/xml/dom_nodeimpl.h:
315         Make showTree() const.
316
317 2005-06-23  Vicki Murley  <vicki@apple.com>
318
319         - added template to be used when writing manual tests
320
321         * manual-tests/template.html: Added.
322
323 2005-06-22  Darin Adler  <darin@apple.com>
324
325         - added forwarding headers as needed for Eric Seidel's KDOM work
326           see <http://bugzilla.opendarwin.org/show_bug.cgi?id=3655>
327
328         * ForwardingHeaders/kjs/value.h: Added.
329         * ForwardingHeaders/qintdict.h: Added an include.
330         * ForwardingHeaders/qptrcollection.h: Added.
331         * ForwardingHeaders/qsize.h: Added.
332         * kwq/KWQIntDict.h: Added. Empty file.
333
334 2005-06-22  Darin Adler  <darin@apple.com>
335
336         Reviewed by Vicki.
337
338         Test cases added:
339         * layout-tests/fast/css/apple-prefix-expected.txt: Added.
340         * layout-tests/fast/css/apple-prefix.html: Added.
341
342         - fixed <rdar://problem/4141650> REGRESSION: Safari RSS slider broken with TOT WebCore
343
344         * khtml/css/parser.y:
345         (getPropertyID): Fix lifetime problem on the QString. Also construct the QString
346         using length, since the passed-in char * is not necessarily null-terminated. Also do
347         the mapping only if it's a "-apple-" prefix -- the old code would do it for, e.g.,
348         "-applex-" too. The old code would not successfully map the "apple" in "appleLineClamp"
349         to "khtml", and Dave changed things so that the internal name of all CSS attributes
350         is "khtml" back in his 2005-05-03 check-in, breaking the use of appleLineClamp in RSS.
351         (getValueID): Ditto.
352
353 2005-06-22  Anders Carlsson  <andersca@mac.com>
354
355         Reviewed and landed by Darin Adler.
356
357         Test cases added: 
358         * layout-tests/fast/dom/title-text-property-expected.txt: Added
359         * layout-tests/fast/dom/title-text-property.html: Added
360         * layout-tests/fast/dom/title-text-property-expected-2.txt: Added
361         * layout-tests/fast/dom/title-text-property-2.html: Added
362
363         - fixed <rdar://problem/3831364> getting or setting text for a <title> element doesn't work
364         - fixed <rdar://problem/4091225> REGRESSION (1.2.4-1.3): many titles with non-ASCII characters do not display properly (XHTML strict only)
365         - fixed <http://bugzilla.opendarwin.org/show_bug.cgi?id=3586>
366           Setting and getting title's text attribute does not work
367
368         * khtml/dom/html_head.cpp:
369         (HTMLTitleElement::text):
370         (HTMLTitleElement::setText):
371         Call HTMLTitleElementImpl::text() and ::setText().
372
373         * khtml/html/html_headimpl.cpp:
374         (HTMLTitleElementImpl::HTMLTitleElementImpl):
375         (HTMLTitleElementImpl::insertedIntoDocument):
376         (HTMLTitleElementImpl::removedFromDocument):
377         (HTMLTitleElementImpl::childrenChanged):
378         Pass the current title node to DocumentImpl::setTitle
379         and ::removeTitle.
380
381         (HTMLTitleElementImpl::text):
382         Return the title.
383
384         (HTMLTitleElementImpl::setText):
385         Set the new title.
386
387         * khtml/xml/dom_docimpl.cpp:
388         (DocumentImpl::DocumentImpl):
389         (DocumentImpl::~DocumentImpl):
390         (DocumentImpl::updateTitle):
391         (DocumentImpl::setTitle):
392         (DocumentImpl::removeTitle):
393         * khtml/xml/dom_docimpl.h:
394         Only update the title if it's done by setting document.title
395         or by changing the child nodes of the title element.
396
397 2005-06-22  Darin Adler  <darin@apple.com>
398
399         Changes by Mitz Pettel.
400         Reviewed by me.
401
402         - fixed <http://bugzilla.opendarwin.org/show_bug.cgi?id=3633>
403           Layout order of bidi level runs is incorrect
404
405         Test cases added:
406         * layout-tests/fast/text/international/bidi-L2-run-reordering-expected.txt: Added.
407         * layout-tests/fast/text/international/bidi-L2-run-reordering.html: Added.
408
409         * khtml/rendering/bidi.cpp: (khtml::RenderBlock::bidiReorderLine): Fixed mistake
410         where we'd advance too far after reversing a run.
411
412 2005-06-22  Darin Adler  <darin@apple.com>
413
414         - added test case for JavaScriptCore fix
415
416         * layout-tests/fast/js/string-replace-2-expected.txt: Added.
417         * layout-tests/fast/js/string-replace-2.html: Added.
418
419 2005-06-22  Darin Adler  <darin@apple.com>
420
421         Reviewed by John Sullivan.
422
423         Test cases added:
424         * layout-tests/fast/dom/css-set-property-exception-expected.txt: Added.
425         * layout-tests/fast/dom/css-set-property-exception.html: Added.
426
427         - fixed <http://bugzilla.opendarwin.org/show_bug.cgi?id=3616>
428           RSS search field, Dashboard widgets failing due to CSS exception
429
430         * khtml/ecma/kjs_css.cpp: (KJS::DOMCSSStyleDeclaration::tryPut):
431         Ignore exceptions when setting properties.
432
433         * layout-tests/fast/js/exception-linenums.html: Changed test case that
434         involved setting style to one that involved setting another property that
435         raises an exception when you try to set it (setting prefix on a text node).
436
437 2005-06-22  Darin Adler  <darin@apple.com>
438
439         Change proposed by Eric Seidel.
440
441         * WebCore.pbproj/project.pbxproj: Fix build rule to match the one in JavaScriptCore.
442         The one here accidentally had hard-coded paths in it and also had the $() vs. ${}
443         issue that broke building on Xcode 2.1 for no good reason (it didn't need $() or ${}).
444
445 2005-06-21  Maciej Stachowiak  <mjs@apple.com>
446
447         Patch from KevinBallard <kevin@sb.org>, reviewed by me.
448
449         - fix build for Xcode 2.1, use ${} for INPUT_FILE_BASE to fix build with Xcode 2.1
450
451         * WebCore.pbproj/project.pbxproj:
452
453 2005-06-21  Justin Garcia  <justin.garcia@apple.com>
454
455         - Fixes <rdar://problem/4114192>.
456         - Fixes a crash in TOT Mail/Blot if you Edit -> Add Hyperlink on a Selection 
457            that ends at the end of the document
458         - Fixes a problem in TOT Mail/Blot where Edit -> Add Hyperlink creates 
459            a link one character beyond what is expected.
460         
461         In replacement, during insertion, some special case code was being called inappropriately.
462         
463         Reviewed by Harrison
464
465         Test cases added: None, requires manual interaction
466
467         * khtml/editing/replace_selection_command.cpp:
468         (khtml::ReplaceSelectionCommand::doApply): In "step 2" of a replacement, we should 
469         only next() the insertion point if the special pre-insertion-merge actually occured.
470         mergeStart used to be the correct check for the occurence of a pre-insertion-merge, but
471         a bug fix made this not the case.  A non-null m_lastNodeInserted correctly signals 
472         that some pre-insertion merging occured.
473
474 2005-06-21  Darin Adler  <darin@apple.com>
475
476         * WebCore.pbproj/project.pbxproj: Switched to a build rule rather than a build phase for the
477         .y files -- this gets rid of the problem where modifying the .y file would not cause sufficient
478         compilation.
479
480         * khtml/css/parser_wrapper.cpp: Removed.
481
482 2005-06-21  Adele Peterson  <adele@apple.com>
483
484         Test cases for:
485         <http://bugzilla.opendarwin.org/show_bug.cgi?id=3450>
486         <rdar://problem/3881901> String.replace() method not working when regex pattern contains {n, m}
487
488         * layout-tests/fast/js/string_replace-expected.txt: Added.
489         * layout-tests/fast/js/string_replace.html: Added.
490
491 2005-06-21  Geoffrey Garen  <ggaren@apple.com>
492
493         Patch contributed by Niels Leenheer <niels.leenheer@gmail.com>
494
495         - fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=3370
496         (Safari can't handle strange frame dimensions)
497
498         Reviewed by Darin.
499
500         * khtml/dom/dom_string.cpp:
501         (DOM::DOMString::toCoordsArray):
502         * khtml/dom/dom_string.h:
503         * khtml/html/html_imageimpl.cpp:
504         (HTMLAreaElementImpl::parseMappedAttribute):
505         * khtml/xml/dom_atomicstring.h:
506         (DOM::AtomicString::toCoordsArray):
507         * khtml/xml/dom_stringimpl.cpp:
508         (DOM::parseLength):
509         (DOM::DOMStringImpl::toCoordsArray):
510         (DOM::DOMStringImpl::toLengthArray):
511         * khtml/xml/dom_stringimpl.h:
512
513         Test cases added: 
514         * layout-tests/fast/frames/invalid-expected.txt: Added.
515         * layout-tests/fast/frames/invalid.html: Added.
516         * layout-tests/fast/frames/valid-expected.txt: Added.
517         * layout-tests/fast/frames/valid.html: Added.
518
519 2005-06-21  Geoffrey Garen  <ggaren@apple.com>
520
521         - fixed <rdar://problem/4155049> javascript function named as "opener" doesn't get called because of window.opener property
522
523         Test cases only, fix is in JavaScriptCore
524
525         Reviewed by cblu.
526
527         Test cases added: 
528
529         * layout-tests/fast/js/global-opener-function-expected.txt: Added.
530         * layout-tests/fast/js/global-opener-function.html: Added.
531
532 2005-06-21  David Harrison  <harrison@apple.com>
533
534         Reviewed by Justin.
535         
536         - show class and style attributes for element nodes
537         - nil check the node being showTree'd
538         - add Position::showTree()
539
540         Test cases added: None needed for this debug-only utility code.
541
542         * khtml/editing/selection.cpp:
543         (khtml::Selection::showTree):
544         - nil check the node
545         * khtml/editing/visible_position.cpp:
546         (khtml::VisiblePosition::previousVisiblePosition):
547         - comments
548         (khtml::VisiblePosition::showTree):
549         - nil check the node
550         * khtml/xml/dom_nodeimpl.cpp:
551         (appendAttributeDesc):
552         (NodeImpl::showNode):
553         - show class and style attributes for element nodes
554         * khtml/xml/dom_position.cpp:
555         (DOM::Position::showTree):
556         * khtml/xml/dom_position.h:
557         - add Position::showTree()
558
559 2005-06-20  Maciej Stachowiak  <mjs@apple.com>
560
561         Reviewed by Darin(first pass) and Hyatt.
562
563         - fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=3576
564         (roll in support for "const" keyword from KDE tree)
565         - make processVarDecls handle deletability of variables declared
566         in an eval block the same as evaluate would
567         - make eval() call processVarDecls - needed to match mozilla and
568         to make the second change testable
569
570         Test cases only, fix is in JavaScriptCore
571         
572         Test cases added:
573         * layout-tests/fast/js/const-expected.txt: Added.
574         * layout-tests/fast/js/const.html: Added.
575         * layout-tests/fast/js/eval-var-decl-expected.txt: Added.
576         * layout-tests/fast/js/eval-var-decl.html: Added.
577
578 2005-06-20  Maciej Stachowiak  <mjs@apple.com>
579
580         Patch from Mark Rowe <opendarwin.org@bdash.net.nz>, reviewed by me.
581
582         - fixed http://bugzilla.opendarwin.org/attachment.cgi?id=2483
583         
584         Test cases added: 
585         * layout-tests/fast/js/hasOwnProperty-expected.txt: Added.
586         * layout-tests/fast/js/hasOwnProperty.html: Added.
587         - also fixed two mozilla JS tests
588         
589         * khtml/ecma/kjs_binding.h:
590         * khtml/ecma/kjs_css.cpp:
591         (KJS::DOMCSSStyleDeclaration::hasOwnProperty):
592         * khtml/ecma/kjs_css.h:
593         * khtml/ecma/kjs_dom.cpp:
594         (KJS::DOMNodeList::hasOwnProperty):
595         (KJS::DOMNamedNodeMap::hasOwnProperty):
596         * khtml/ecma/kjs_dom.h:
597         * khtml/ecma/kjs_html.cpp:
598         (KJS::HTMLDocument::hasOwnProperty):
599         (KJS::KJS::HTMLElement::hasOwnProperty):
600         (KJS::KJS::HTMLCollection::hasOwnProperty):
601         * khtml/ecma/kjs_html.h:
602         * khtml/ecma/kjs_window.cpp:
603         (KJS::Window::hasOwnProperty):
604         (KJS::Konqueror::hasOwnProperty):
605         * khtml/ecma/kjs_window.h:
606
607 2005-06-20  Geoffrey Garen  <ggaren@apple.com>
608
609         Changes by Darin. Layout tests by me. Reviewed by me.
610
611         Fixed <rdar://problem/4152454> crash in KJS::ExprStatementNode::execute(KJS::ExecState*) in World Clock widget with TOT.
612
613         Test cases added: 
614         * layout-tests/fast/dom/gc-4-expected.txt: Added.
615         * layout-tests/fast/dom/gc-4.html: Added.
616
617         * khtml/ecma/kjs_html.cpp: 
618         (KJS::Context2D::mark): mark now (1) checks for NULL pointers and (2) 
619         calls mark on its parent class (DOMObject::mark).
620
621 2005-06-19  Darin Adler  <darin@apple.com>
622
623         Changes by both Anders Carlsson and me.
624         Reviewed by Maciej and me.
625
626         Test cases added:
627         * layout-tests/fast/forms/element-order-expected.txt: Added.
628         * layout-tests/fast/forms/element-order.html: Added.
629
630         - fixed <http://bugzilla.opendarwin.org/show_bug.cgi?id=3503>
631           form.elements[] not order-preserving when elements added via DOM
632
633         * khtml/html/html_formimpl.h: Added formElementIndex.
634         * khtml/html/html_formimpl.cpp:
635         (DOM::insertIntoVector): Added.
636         (DOM::HTMLFormElementImpl::formElementIndex): Added. Computes an appropriate
637         index for a form element, given the document position relative to the other elements.
638         (DOM::HTMLFormElementImpl::registerFormElement): Use formElementIndex to determine
639         where to insert the element in the formElements array.
640
641 2005-06-19  Darin Adler  <darin@apple.com>
642
643         Changes by Anders Carlsson and me.
644         Reviewed by Maciej and me.
645
646         Test cases added: None. Could not figure out how to automate a test without
647         making enhancements to DumpRenderTree.
648
649         - fixed <rdar://problem/4141141> Onselect event is ignored with TEXTAREA and INPUT
650           also <http://bugzilla.opendarwin.org/show_bug.cgi?id=3256>
651
652         * khtml/html/html_formimpl.cpp: (DOM::HTMLTextAreaElementImpl::select):
653         Remove unneeded explicit call to onSelect() here -- now handled by the renderer.
654
655         * khtml/rendering/render_form.h: Added declarations as needed below.
656         * khtml/rendering/render_form.cpp:
657         (RenderFormElement::slotSelectionChanged): Add base class implementation that does nothing.
658         (RenderLineEdit::RenderLineEdit): Connect the selection changed signal to our slot.
659         (RenderLineEdit::slotSelectionChanged): Call onSelect when selection changes to something
660         that's a selection (not a caret).
661         (RenderTextArea::RenderTextArea): Connect as above.
662         (RenderTextArea::slotSelectionChanged): Call as above.
663
664         * kwq/KWQLineEdit.h: Added declarations as needed below.
665         * kwq/KWQLineEdit.mm:
666         (QLineEdit::QLineEdit): Added selectionChanged signal.
667         (QLineEdit::hasSelectedText): Added.
668
669         * kwq/KWQSlot.mm:
670         (KWQSlot::KWQSlot): Make selectionChanged work on any form element.
671         (KWQSlot::call): ditto.
672
673         * kwq/KWQTextArea.h: Added hasSelection method.
674         * kwq/KWQTextArea.mm:
675         (-[KWQTextArea textViewDidChangeSelection:]): Added. Sends selectionChanged signal, except if
676         we're in the middle of gaining or losing first responder.
677         (-[KWQTextArea hasSelection]): Added.
678         (-[KWQTextAreaTextView becomeFirstResponder]): Added. Sets flag to tell us we're in a responder
679         change (using a count to avoid trouble if we reenter).
680         (-[KWQTextAreaTextView resignFirstResponder]): Ditto.
681         (-[KWQTextAreaTextView inResponderChange]): Added.
682
683         * kwq/KWQTextEdit.h: Added declarations as needed below.
684         * kwq/KWQTextEdit.mm:
685         (QTextEdit::QTextEdit): Added selectionChanged signal.
686         (QTextEdit::hasSelectedText): Added.
687
688         * kwq/KWQTextField.h: Added declarations as needed below.
689         * kwq/KWQTextField.mm:
690         (-[KWQTextFieldController initWithTextField:QLineEdit:]): Fixed up to do the right
691         thing with the result of the init function we call.
692         (-[KWQTextFieldController controlTextDidEndEditing:]): Removed call to setHasFocus:NO
693         since it's a little too late by the time the control is called; now handled by the
694         text view delegate methods below.
695         (-[KWQTextFieldController hasSelection]): Added.
696         (-[KWQTextFieldController setHasFocus:]): Sets the new hasFocusAndSelectionSet after
697         new focus and selection are both set up.
698         (-[KWQTextFieldController textViewDidChangeSelection:]): Added. Sends the selection
699         changed signal.
700         (-[KWQTextField initWithQLineEdit:]): Fixed up to do the right thing with the result
701         of the init function we call.
702         (-[KWQTextField textViewDidChangeSelection:]): Added. Calls super and then calls the
703         controller.
704         (-[KWQTextField textDidEndEditing:]): Added. Calls setHasFocus:NO and then calls super.
705         (-[KWQSecureTextField initWithQLineEdit:]): Same as above, but for secure text fields.
706         (-[KWQSecureTextField textViewDidChangeSelection:]): Ditto.
707         (-[KWQSecureTextField textDidEndEditing:]): Ditto.
708         (-[KWQSearchField initWithQLineEdit:]): Same as above, but for search fields.
709         (-[KWQSearchField textViewDidChangeSelection:]): Ditto.
710         (-[KWQSearchField textDidEndEditing:]): Ditto.
711         (-[KWQTextFieldFormatter init]): Fixed up to do the right thing with the result of
712         the init function we call.
713
714 2005-06-18  Darin Adler  <darin@apple.com>
715
716         Changes by Anders Carlsson.
717         Reviewed by me.
718
719         Test cases added:
720         * layout-tests/fast/dom/css-dom-read-expected.txt: Added.
721         * layout-tests/fast/dom/css-dom-read.html: Added.
722
723         - fixed <http://bugzilla.opendarwin.org/show_bug.cgi?id=3534>
724           CSSMutableStyleDeclarationImpl::item is unimplemented
725
726         * khtml/css/css_valueimpl.cpp: (DOM::CSSMutableStyleDeclarationImpl::item):
727         Get the style from the m_values list.
728
729 2005-06-18  Darin Adler  <darin@apple.com>
730
731         - undid a last minute change I made that broke a patch I landed
732           (layout tests caught the mistake, all should work again now)
733
734         * khtml/html/html_formimpl.cpp:
735         (DOM::HTMLLabelElementImpl::formElement): Don't include this when iterating.
736         (DOM::HTMLLegendElementImpl::formElement): Ditto.
737
738 2005-06-18  Darin Adler  <darin@apple.com>
739
740         - removing the applet tests, since they are causing other tests to fail
741
742         * layout-tests/fast/replaced/applet-hspace-expected.txt: Removed.
743         * layout-tests/fast/replaced/applet-hspace.html: Removed.
744         * layout-tests/fast/replaced/applet-vspace-expected.txt: Removed.
745         * layout-tests/fast/replaced/applet-vspace.html: Removed.
746         * layout-tests/fast/replaced/resources/applet.class: Removed.
747         * layout-tests/fast/replaced/resources/applet.java: Removed.
748
749 2005-06-18  Darin Adler  <darin@apple.com>
750
751         Changes by Anders Carlsson.
752         Reviewed by me.
753
754         Test cases added:
755         * layout-tests/fast/dom/resources/script3.js: Added.
756         * layout-tests/fast/dom/resources/script4.js: Added.
757         * layout-tests/fast/dom/resources/script5.js: Added.
758         * layout-tests/fast/dom/script-add-expected.txt: Added.
759         * layout-tests/fast/dom/script-add.html: Added.
760
761         - fixed <http://bugzilla.opendarwin.org/show_bug.cgi?id=3526>
762           improve support for dynamically added <script> elements
763
764         * khtml/html/html_headimpl.h: Added override of childrenChanged, new evaluateScript
765         function, and m_evaluated boolean.
766         * khtml/html/html_headimpl.cpp:
767         (HTMLScriptElementImpl::HTMLScriptElementImpl): Init m_evaluated to false.
768         (HTMLScriptElementImpl::childrenChanged): Added code to evaluate the script the first
769         time a child is added (except for nodes created by parsing).
770         (HTMLScriptElementImpl::insertedIntoDocument): Refactored to use the new text and
771         evaluateScript functions. Also changed to not try to evaluate the script if the element
772         is entirely empty. This allows you to declare an empty <script> element and fill the
773         content in later using DHTML.
774         (HTMLScriptElementImpl::notifyFinished): Refactored to use the new evaluateScript function.
775         (HTMLScriptElementImpl::evaluateScript): Added. Checks and sets a new m_evaluated boolean
776         to implement the "evaluate each script only once" rule.
777         (HTMLScriptElementImpl::text): Replaced bogus implementation with one that works.
778         (HTMLScriptElementImpl::setText): Ditto.
779
780         * khtml/dom/html_head.cpp:
781         (HTMLScriptElement::text): Replaced bogus implementation with one that calls through to
782         the implementation class. This change doesn't really matter since we don't compile this file.
783         (HTMLScriptElement::setText): Ditto.
784
785 2005-06-18  Darin Adler  <darin@apple.com>
786
787         * khtml/html/html_formimpl.cpp: (DOM::HTMLLabelElementImpl::formElement):
788         Oops, checked in a version that didn't even compile! Fixed now.
789
790 2005-06-18  Darin Adler  <darin@apple.com>
791
792         Changes by Anders Carlsson.
793         Reviewed by me.
794
795         Test cases added:
796         * layout-tests/fast/forms/focus-expected.txt: Added.
797         * layout-tests/fast/forms/focus.html: Added.
798         * layout-tests/fast/forms/legend-access-key-expected.txt: Added.
799         * layout-tests/fast/forms/legend-access-key.html: Added.
800
801         - fixed <rdar://problem/3481846> HTML4: accesskey not supported by HTML legend elements
802           also <http://bugzilla.opendarwin.org/show_bug.cgi?id=3407>
803         - added focus methods for <label> and <legend> elements
804         - fixed crash when using JavaScript-created events that prevented tests from running
805
806         * khtml/ecma/kjs_html.h: Added focus methods.
807         * khtml/ecma/kjs_html.cpp: (KJS::KJS::HTMLElementFunction::tryCall): Added bindings for
808         focus for <label> and <legend>. (Sorry about the merging, Dave.)
809
810         * khtml/html/html_formimpl.h: Added new functions.
811         * khtml/html/html_formimpl.cpp:
812         (DOM::HTMLLabelElementImpl::focus): Added.
813         (DOM::HTMLLegendElementImpl::formElement): Added.
814         (DOM::HTMLLegendElementImpl::focus): Added.
815         (DOM::HTMLLegendElementImpl::accessKeyAction): Added.
816
817         * khtml/xml/dom_docimpl.cpp: (DocumentImpl::defaultEventHandler): If there's no QKeyEvent,
818         then get the key name from keyIdentifier() instead of the QKeyEvent's unmodifiedText().
819         The old code would just do a nil-deref.
820
821 2005-06-18  Darin Adler  <darin@apple.com>
822
823         Change by Niels Leenheer (also done by Dave Hyatt on stage at WWDC).
824         Reviewed by me.
825
826         Test cases added:
827         * layout-tests/fast/replaced/object-align-hspace-vspace-expected.txt: Added.
828         * layout-tests/fast/replaced/object-align-hspace-vspace.html: Added.
829         * layout-tests/fast/replaced/resources/webkit-background.png: Added.
830
831         * khtml/html/html_objectimpl.cpp:
832         (DOM::HTMLObjectElementImpl::mapToEntry): Add cases for ATTR_ALIGN, ATTR_VSPACE and ATTR_HSPACE.
833         (DOM::HTMLObjectElementImpl::parseMappedAttribute): Ditto.
834
835 2005-06-18  Darin Adler  <darin@apple.com>
836
837         Change by Niels Leenheer (also done by Dave Hyatt on stage at WWDC).
838         Reviewed by me.
839
840         Test cases added:
841         * layout-tests/fast/replaced/applet-hspace-expected.txt: Added.
842         * layout-tests/fast/replaced/applet-hspace.html: Added.
843         * layout-tests/fast/replaced/applet-vspace-expected.txt: Added.
844         * layout-tests/fast/replaced/applet-vspace.html: Added.
845         * layout-tests/fast/replaced/resources/applet.class: Added.
846         * layout-tests/fast/replaced/resources/applet.java: Added.
847
848         - fixed <http://bugzilla.opendarwin.org/show_bug.cgi?id=3246>
849           HSPACE and VSPACE attributes are ignored in APPLET element
850
851         * khtml/html/html_objectimpl.cpp:
852         (DOM::HTMLAppletElementImpl::mapToEntry): Add cases for ATTR_VSPACE and ATTR_HSPACE.
853         (DOM::HTMLAppletElementImpl::parseMappedAttribute): Ditto.
854
855 2005-06-18  Darin Adler  <darin@apple.com>
856
857         - removed some unused code from one of the KWQ headers
858
859         * kwq/KWQKHTMLPartBrowserExtension.h:
860
861         - added a layout test for a bug that's already fixed
862
863         * layout-tests/fast/forms/element-by-name-expected.txt: Added.
864         * layout-tests/fast/forms/element-by-name.html: Added.
865
866 2005-06-17  Vicki Murley  <vicki@apple.com>
867
868         Reviewed by Maciej. 
869
870         Test cases added: None, since this test requires manual interaction.
871
872         - fixed <rdar://problem/4086793> Selects wrapped by Span or Label elements 
873         do not resize when options are added via javascript
874         
875         * khtml/rendering/render_form.cpp:
876         (RenderSelect::layout): Remove call setting setNeedsLayout to true. setNeedsLayout
877         is already true at this point, and this additional call has the negative effect of 
878         marking m_normalChildNeedsLayout on the element's parent, which keeps layout from 
879         propagating all the way up to the root later on.
880
881 2005-06-17  Justin Garcia  <justin.garcia@apple.com>
882
883         Fix for rdar://3756860, (also listed as) http://bugzilla.opendarwin.org/show_bug.cgi?id=3295
884         The cellIndex property for HTMLTableCellElement was always zero because the method to support it was just a stub.
885         KHTML fix was to simply call nodeIndex(), but this is incorrect because a table row can have as children <script>s
886         and <form>s (and perhaps others).
887         
888         Reviewed by hyatt and john
889
890         Test cases added:
891         * layout-tests/fast/table/cellindex.html: Added.  Illustrates the fix.
892
893         * khtml/html/html_tableimpl.cpp:
894         (DOM::HTMLTableCellElementImpl::cellIndex): Iterate through siblings only counting <th> and <td> elements
895         * khtml/html/html_tableimpl.h:
896
897 2005-06-17  Adele Peterson  <adele@apple.com>
898
899         Reviewed by Maciej.
900
901         - fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=3419
902         <rdar://problem/4111752> REGRESSION (125-312/412): Safari doesn't display edmunds.com pages first time through
903
904         * khtml/html/htmltokenizer.cpp: (khtml::HTMLTokenizer::parseTag): set 'script' flag when 
905           parsing <script src="foo" /> case.  In this case, parseTag calls the scriptHandler function which expects 
906           that flag to be set, and sets it back to false at the appropriate time.
907
908         Test cases added: These still don't test the cached script cases, but they're good regression 
909         tests for the tokenizer.  We'll have to come up with a good way to test the cached cases later.
910
911         * layout-tests/fast/tokenizer/external-script-document-write_2-expected.txt: Added.
912         * layout-tests/fast/tokenizer/external-script-document-write_2.html: Added.
913         * layout-tests/fast/tokenizer/resources/empty_script.js: Added.
914         * layout-tests/fast/tokenizer/script_extra_close-expected.txt: Added.
915         * layout-tests/fast/tokenizer/script_extra_close.html: Added.
916         * layout-tests/fast/tokenizer/script_quirk-expected.txt: Added.
917         * layout-tests/fast/tokenizer/script_quirk.html: Added.
918
919 2005-06-17  Justin Garcia  <justin.garcia@apple.com>
920
921         Fixed fprintf problem in gcc4.0
922         
923         Reviewed by Darin
924
925         Test cases added: See previous ChangeLog entry
926
927         * khtml/xml/dom_nodeimpl.cpp:
928         (NodeImpl::showTreeAndMark): Fixed fprintf warning in gcc4
929
930 2005-06-17  Geoffrey Garen  <ggaren@apple.com>
931
932         Patch contributed by Anders Carlsson<andersca@mac.com>.
933
934         Fixes: http://bugzilla.opendarwin.org/show_bug.cgi?id=3408      
935
936         Reviewed by Darin.
937
938         Test cases added: None. Test requires manual interaction.
939         Manual test available at: http://bugzilla.opendarwin.org/attachment.cgi?id=2207
940
941         * khtml/html/html_formimpl.cpp: Eliminated HTMLButtonElementImpl::click. HTMLButtonElementImpl now inherits HTMLElementImpl::click. 
942         * khtml/html/html_formimpl.h: Ditto.
943
944 2005-06-17  Darin Adler  <darin@apple.com>
945
946         Reviewed by John.
947
948         - fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=3556
949           black diamond question mark shown for invalid UTF-8 sequences
950
951         Test cases added:
952         * layout-tests/fast/encoding/invalid-UTF-8-expected.txt: Added.
953         * layout-tests/fast/encoding/invalid-UTF-8.html: Added.
954
955         * kwq/KWQTextCodec.mm:
956         (unwanted): Added. Returns true for BOM, replacement, and null characters.
957         (KWQTextDecoder::appendOmittingUnwanted): Renamed from appendOmittingNullsAndBOMs and
958         changed to use the new "unwanted" function, which causes it to omit replacement characters.
959         (KWQTextDecoder::convertUsingTEC): Call append function by its new name.
960
961 2005-06-16  Justin Garcia  <justin.garcia@apple.com>
962
963         Added a few debugging methods to highlight Selections, VisiblePositions and Nodes in the DOM tree.
964         
965         Reviewed by Dave Harrison
966
967         Test cases added: None, changes are only to aid debugging
968
969         * khtml/editing/selection.cpp:
970         (khtml::Selection::showTree):
971         * khtml/editing/selection.h:
972         * khtml/editing/visible_position.cpp:
973         (khtml::VisiblePosition::showTree):
974         * khtml/editing/visible_position.h:
975         * khtml/xml/dom_nodeimpl.cpp:
976         (NodeImpl::showNode):
977         (NodeImpl::showTree):
978         (NodeImpl::showTreeAndMark): 
979         * khtml/xml/dom_nodeimpl.h:
980
981 2005-06-14  David Hyatt  <hyatt@apple.com>
982
983         Add an initial implementation of QualifiedName and HTMLNames.  These classes are not used by anyone yet.
984         Progress being recorded in bugzilla bug 3405.
985         
986         Reviewed by mjs
987
988         Test cases added: (None, does not affect build yet)
989
990         * WebCore.pbproj/project.pbxproj:
991         * khtml/xml/dom_qname.h,.cpp
992         * khtml/html/htmlnames.h,.cpp
993
994 2005-06-14  David Hyatt  <hyatt@apple.com>
995
996         The behavior of <pre> is broken so that the newline
997         is not always properly being eaten after the open of the tag.  In addition we were eating the first newline
998         after all other tags.  This patch stops eating newlines after other tags and refines the behavior for pre
999         to catch all cases.
1000         
1001         Reviewed by sullivan
1002
1003         Test cases added: fast/text/whitespace/030.html
1004
1005         * khtml/html/htmltokenizer.cpp:
1006         (khtml::HTMLTokenizer::parseTag):
1007         (khtml::HTMLTokenizer::write):
1008
1009 2005-06-13  Vicki Murley  <vicki@apple.com>
1010
1011         Reviewed by Darin.
1012
1013         No test cases added since the steps to reproduce require use of showModalDialog.
1014
1015         - fix for <rdar://problem/4145910> parameters not working in showModalDialog 
1016         test page (dialogWidth, dialogHeight, etc.)
1017
1018         * khtml/ecma/kjs_window.cpp:
1019         (KJS::parseFeatures): add a check for colon character in the feature string
1020
1021 2005-06-13  Maciej Stachowiak  <mjs@apple.com>
1022
1023         Reviewed by Chris Blumenberg and Adele.
1024
1025         - better fix for <rdar://problem/4142247> REGRESSION: List to browse widgets at Apple website failed. Closing tab afterwards caused Safari crash
1026         http://bugzilla.opendarwin.org/show_bug.cgi?id=3445
1027
1028         With this change and the matching WebKit change we'll still stop loading the moment you click
1029         a download link, but the unload event and detaching of event handlers will not happen early any more.
1030         
1031         * khtml/khtml_part.cpp:
1032         (KHTMLPart::stopLoading): Factored out from closeURL, make firing of unload
1033         and detaching of event handlers optional.
1034         (KHTMLPart::closeURL): call stopLoading(true)
1035         * khtml/khtml_part.h:
1036         * kwq/WebCoreBridge.h:
1037         * kwq/WebCoreBridge.mm:
1038         (-[WebCoreBridge stopLoading]): Call stopLoading(false).
1039
1040 2005-06-13  Maciej Stachowiak  <mjs@apple.com>
1041
1042         Patch from Andrew Wellington <proton@wiretapped.net>
1043         Reviewed by me.
1044
1045         - fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=3302
1046         (Safari crashes when going to acid2 test page once it's in cache)
1047         
1048         No test cases addded since the repro steps require use of tabbed browsing.
1049
1050         * khtml/khtml_part.cpp:
1051         (KHTMLPart::handleFallbackContent): check for nil
1052
1053 2005-06-12  Darin Adler  <darin@apple.com>
1054
1055         - added expected test results for new tests
1056
1057         * layout-tests/fast/selectors/159-expected.txt: Added.
1058         * layout-tests/fast/selectors/177a-expected.txt: Added.
1059         * layout-tests/fast/selectors/177b-expected.txt: Added.
1060
1061 2005-06-11  Maciej Stachowiak  <mjs@apple.com>
1062
1063         Patch from Nicholas Shanks <contact@nickshanks.com>, reviewed by me.
1064
1065         - Distinguish between pseudo-elements and pseudo-classes in CSS parsing.
1066         http://bugzilla.opendarwin.org/show_bug.cgi?id=3375
1067
1068         Merge of svn log -v -r 399829 svn://anonsvn.kde.org/home/kde
1069         
1070         Test cases added: Added the following from CSS selector test suite,
1071         unfortunately 159 and 117a do not show any difference with and without the
1072         patch since layout tests do not dump selection style (yet).
1073         
1074         * layout-tests/fast/selectors/159.html: Added.
1075         * layout-tests/fast/selectors/177a.html: Added.
1076         * layout-tests/fast/selectors/177b.html: Added.
1077
1078         * khtml/css/css_base.cpp:
1079         (CSSSelector::specificity):
1080         (CSSSelector::extractPseudoType):
1081         (CSSSelector::selectorText):
1082         * khtml/css/css_base.h:
1083         (DOM::CSSSelector::):
1084         (DOM::CSSSelector::pseudoType):
1085         * khtml/css/cssstyleselector.cpp:
1086         (khtml::CSSStyleSelector::checkSelector):
1087         (khtml::CSSStyleSelector::checkOneSelector):
1088         * khtml/css/parser.y:
1089
1090 2005-06-11  Maciej Stachowiak  <mjs@apple.com>
1091
1092         Patch from Timothy Hatcher  <timothy@colloquy.info>, reviewed by me.
1093
1094         Test cases added:
1095         * layout-tests/fast/dom/children-nodes-expected.txt: Added.
1096         * layout-tests/fast/dom/children-nodes.html: Added.
1097
1098         * khtml/html/html_miscimpl.cpp:
1099         (DOM::HTMLCollectionImpl::traverseNextItem): For "children"
1100         collection, use nextSibling() instead of traverseNextNext() to avoid
1101         doing deep traversal.
1102
1103 2005-06-11  Maciej Stachowiak  <mjs@apple.com>
1104
1105         Added missing expected results from the background image patch.
1106
1107         * layout-tests/fast/backgrounds/001-expected.txt: Added.
1108
1109 2005-06-10  David Hyatt  <hyatt@apple.com>
1110
1111         Fix for bugzilla bug 3335, add support for the CSS3 indirect adjacent sibling selector.  Patch merge
1112         from KHTML tree by Nick Shanks.
1113         
1114         Reviewed by hyatt
1115
1116         Test cases added: fast/selectors/046.html
1117
1118         * khtml/css/css_base.cpp:
1119         (CSSSelector::selectorText):
1120         * khtml/css/css_base.h:
1121         (DOM::CSSSelector::):
1122         * khtml/css/cssstyleselector.cpp:
1123         (khtml::CSSStyleSelector::checkSelector):
1124         * khtml/css/parser.y:
1125         * layout-tests/fast/selectors/046-expected.txt: Added.
1126         * layout-tests/fast/selectors/046.html: Added.
1127
1128 2005-06-10  David Hyatt  <hyatt@apple.com>
1129
1130         Fix for 3237, background image repeats when it shouldn't.  The Radar bug is 4005553.  Patch from
1131         Nate Cook.
1132         
1133         Reviewed by darin and hyatt
1134
1135         Test cases added: fast/backgrounds/001.html
1136
1137         * khtml/rendering/render_box.cpp:
1138         (RenderBox::paintBackgroundExtended):
1139         * layout-tests/fast/backgrounds/001.html: Added.
1140
1141 2005-06-10  David Hyatt  <hyatt@apple.com>
1142
1143         Merge Allan Jensen's fix for 3236.
1144         
1145         Reviewed by hyatt
1146
1147         Test cases added: None, test case already added for the bug.
1148
1149         * khtml/css/cssstyleselector.cpp:
1150         (khtml::CSSStyleSelector::applyProperty):
1151         * khtml/rendering/render_style.cpp:
1152         (RenderStyle::setContent):
1153
1154 2005-06-10  Darin Adler  <darin@apple.com>
1155
1156         Change by Mark Rowe <opendarwin.org@bdash.net.nz>.
1157         Refined and reviewed by me.
1158
1159         - test for exception file/line number fix
1160           http://bugzilla.opendarwin.org/show_bug.cgi?id=3327
1161
1162         * layout-tests/fast/js/exception-linenums-expected.txt: Added.
1163         * layout-tests/fast/js/exception-linenums.html: Added.
1164
1165 2005-06-09  David Hyatt  <hyatt@apple.com>
1166
1167         Fix from Carston Guenther for bugzilla bug 3236.
1168
1169         attr(x) should work even if x is not present on the element.
1170
1171         This is Radar bug #3584466
1172         
1173         Reviewed by hyatt
1174
1175         Test cases added: fast/css-generated-content/013.html
1176
1177         * khtml/css/cssstyleselector.cpp:
1178         (khtml::CSSStyleSelector::applyProperty):
1179         * layout-tests/fast/css-generated-content/013-expected.txt: Added.
1180         * layout-tests/fast/css-generated-content/013.html: Added.
1181
1182 2005-06-09  Darin Adler  <darin@apple.com>
1183
1184         Tested by Mark Rowe.
1185
1186         * layout-tests/fast/js/date-parse-test.html: Updated this test to use a time zone offset
1187         for one of the test cases that's time zone dependent; was working in CA, US, failing in NZ.
1188
1189 2005-06-08  Anders Carlsson  <andersca@mac.com>
1190
1191         Reviewed and committed by Maciej.
1192
1193         - fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=3337
1194         (Support the Mozilla DOMParser and XMLSerializer objects)
1195
1196         <rdar://problem/3533735> implement Mozilla "DOMParser" extension for use with XMLHTTPRequest
1197
1198         Test cases added:
1199         * layout-tests/fast/dom/dom-parse-serialize-display-expected.txt: Added.
1200         * layout-tests/fast/dom/dom-parse-serialize-display.html: Added.
1201         * layout-tests/fast/dom/dom-parse-serialize-expected.txt: Added.
1202         * layout-tests/fast/dom/dom-parse-serialize.html: Added.
1203
1204         * khtml/ecma/domparser.h:
1205         * khtml/ecma/domparser.cpp:
1206         Add files implementing the DOMParser object.
1207
1208         * khtml/ecma/kjs_window.h:
1209         * khtml/ecma/kjs_window.cpp:
1210         Expose DOMParser object.
1211         
1212 2005-06-07  David Hyatt  <hyatt@apple.com>
1213
1214         Patch from Brian Campbell.  Make sure the min and max values of slider properly update.
1215         Fixes bugilla bug 3323, internal Radar # is 4098892.
1216         
1217         Reviewed by hyatt
1218
1219         Test cases added: (Not testable with a layout test)
1220
1221         * kwq/KWQSlider.mm:
1222         (QSlider::setMinValue):
1223         (QSlider::setMaxValue):
1224
1225 2005-06-07  Adele Peterson  <adele@apple.com>
1226
1227         Change by Darin, reviewed by Maciej and me.
1228
1229         - fixed <rdar://problem/4139800> REGRESSION: Safari crashes at bebe.com
1230
1231         There were cases where the DOMNode mark function would end up not even
1232         marking the node that it was called on. The old code tried to skip any
1233         subtrees that were already marked, but that code was wrong.
1234
1235         * khtml/ecma/kjs_dom.cpp: (KJS::DOMNode::mark): Changed three things:
1236           1) Instead of a boolean, keep a set of trees that we are marking, that
1237              prevents problems if we mark things that have references between
1238              separate trees of DOM nodes.
1239           2) Don't do the "outermost node with a wrapper" check, just start marking
1240              at the root of the entire tree, because there's no way to have an
1241              unreachable node pointing to a reachable node.
1242           3) Handle the unusual case where the document's wrapper dictionary is
1243              gone by marking just this node explicitly.
1244         This passes the layout tests, still fixes the Dashboard memory leak from
1245         bug 4125222, and makes bebe.com work again.
1246
1247 2005-06-07  Darin Adler  <darin@apple.com>
1248
1249         Change by Toby Peterson <toby@opendarwin.org>.
1250         Reviewed by me.
1251
1252         * WebCore.pbproj/project.pbxproj: Allow bison 2.0, which generates the file
1253         with a different name.
1254
1255 2005-06-07  Darin Adler  <darin@apple.com>
1256
1257         Change by Mark Rowe <opendarwin.org@bdash.net.nz>.
1258         Reviewed by me.
1259
1260         - fixed the WebCore half of build failure with spaces in the path
1261           http://bugzilla.opendarwin.org/show_bug.cgi?id=3291
1262
1263         * WebCore.pbproj/project.pbxproj: Add quotes to make LIBRARY_SEARCH_PATHS work even when
1264         the path has a space in it.
1265
1266 2005-06-07  David Hyatt  <hyatt@apple.com>
1267
1268         Patch from Mark Rowe to fix a minor memory leak in WebCoreSettings.
1269         
1270         Reviewed by hyatt
1271
1272         * kwq/WebCoreSettings.mm:
1273         (-[WebCoreSettings dealloc]):
1274
1275 2005-06-04  Darin Adler  <darin@apple.com>
1276
1277         Reviewed by Maciej.
1278
1279         - import icu headers into project
1280
1281         * WebCore.pbproj/project.pbxproj: Added icu directory to header search path.
1282
1283         * icu/README: Added.
1284         * icu/unicode/parseerr.h: Added.
1285         * icu/unicode/platform.h: Added.
1286         * icu/unicode/putil.h: Added.
1287         * icu/unicode/ubrk.h: Added.
1288         * icu/unicode/uchar.h: Added.
1289         * icu/unicode/uconfig.h: Added.
1290         * icu/unicode/uenum.h: Added.
1291         * icu/unicode/uidna.h: Added.
1292         * icu/unicode/uiter.h: Added.
1293         * icu/unicode/uloc.h: Added.
1294         * icu/unicode/umachine.h: Added.
1295         * icu/unicode/urename.h: Added.
1296         * icu/unicode/ustring.h: Added.
1297         * icu/unicode/utf.h: Added.
1298         * icu/unicode/utf16.h: Added.
1299         * icu/unicode/utf8.h: Added.
1300         * icu/unicode/utf_old.h: Added.
1301         * icu/unicode/utypes.h: Added.
1302         * icu/unicode/uversion.h: Added.
1303
1304 2005-06-01  Darin Adler  <darin@apple.com>
1305
1306         Reviewed by John Sullivan.
1307         No layout tests added because showModalDialog won't work in DumpRenderTree at the moment.
1308
1309         - WebKit part of fix for <rdar://problem/3166090> add IE JavaScript extension window.showModalDialog
1310
1311         * khtml/ecma/kjs_window.cpp:
1312         (KJS::allowPopUp): Added. Used by showModalDialog now and should be used by window.open later.
1313         (KJS::parseFeatures): Ditto.
1314         (KJS::boolFeature): Ditto.
1315         (KJS::intFeature): Ditto.
1316         (KJS::createNewWindow): Ditto.
1317         (KJS::canShowModalDialog): Added.
1318         (KJS::canShowModalDialogNow): Added.
1319         (KJS::showModalDialog): Added.
1320         (KJS::Window::get): Return the showModalDialog function object if the extension can run modal.
1321         (KJS::Window::clear): Add code to store the return value for the case where the window is a modal dialog.
1322         (KJS::WindowFunc::tryCall): Add the call to the showModalDialog function.
1323
1324         * khtml/ecma/kjs_window.h: Add setReturnValueSlot function so showModalDialog can get the return
1325         value from the dialog it creates. Also add a data member to keep track of the pointer and a constant
1326         for the ShowModalDialog method.
1327
1328         * khtml/khtml_part.h: Added new changeLocation member function. Made setOpener, openedByJS, and
1329         setOpenedByJS public.
1330
1331         * khtml/khtml_part.cpp:
1332         (KHTMLPart::changeLocation): Broke out the part of slotRedirect that actually does the location change
1333         into a separate function so it can be called when needed. The case using it now is to load the content
1334         of a new window in KJS::createNewWindow.
1335         (KHTMLPart::slotRedirect): Call changeLocation to do most of the work.
1336         (KHTMLPart::urlSelected): Fixed a broken case where the "lack of referrer" in a new window would cause
1337         the referrer passed in by JavaScript to be ignored when opening a new window -- match logic elsewhere
1338         that leaves the referrer in the args alone if one is not set in the window.
1339
1340         * khtml/khtmlpart_p.h: Initialize m_bCleared to true to avoid an unnecessary clear before loading the
1341         first URL in a new window. This change is needed to avoid blowing away the "dialogArguments" value in
1342         a modal dialog window, but it also avoid unnecessary work for each new window.
1343
1344         * kwq/KWQApplication.h: Add availableGeometry function for QDesktopWidget. Used by the showModalDialog
1345         function inside kjs_window.cpp (and should be used elsewhere eventually too). Matches a Qt function that
1346         we just didn't have implemented before.
1347         * kwq/KWQApplication.mm: (QDesktopWidget::availableGeometry): Added.
1348
1349         * kwq/KWQKHTMLPartBrowserExtension.h: Added new canRunModal, canRunModalNow, and runModal functions.
1350         * kwq/KWQKHTMLPartBrowserExtension.mm:
1351         (KHTMLPartBrowserExtension::createNewWindow): Call createModalDialogWithURL on the bridge if the
1352         new window is a dialog. Also fixed the early return case for when the bridge returns nil.
1353         (KHTMLPartBrowserExtension::canRunModal): Added. Calls bridge.
1354         (KHTMLPartBrowserExtension::canRunModalNow): Ditto.
1355         (KHTMLPartBrowserExtension::runModal): Ditto.
1356
1357         * kwq/KWQKPartsBrowserExtension.h:
1358         (KParts::URLArgs::URLArgs): Initialize m_lockHistory to false.
1359         (KParts::WindowArgs::WindowArgs): Add a dialog boolean.
1360
1361         * kwq/WebCoreBridge.h: Declared canRunModal, canRunModalNow, createModalDialogWithURL, and runModal methods.
1362
1363 2005-06-01  Adele Peterson  <adele@apple.com>
1364
1365         fix for <rdar://problem/4135705> REGRESSION (412-TOT) crash in TV Tracker widget - KJS::XMLHttpRequest::removeFromRequestsByDocument()
1366
1367         Reviewed by Darin.
1368
1369         Synchronous loads don't get added to our requestsByDocument dictionary, so we should try to remove the request in this case. 
1370
1371         * khtml/ecma/xmlhttprequest.cpp: (KJS::XMLHttpRequest::removeFromRequestsByDocument): added checks to make sure request exists before trying to remove it.
1372
1373 2005-05-30  Darin Adler  <darin@apple.com>
1374
1375         Reviewed by John (fix for Radar bug) and Vicki (all the rest).
1376
1377         - fixed <rdar://problem/4105097> REGRESSION (138-139): Hitting Enter on a checkbox toggles check mark instead of submitting form
1378         - fixed other problems discovered while trying to make a layout test to test this work:
1379             - added newer DOM 3 event type constants
1380             - fixed prototype setup bug preventing event initialization functions from being called
1381             - fixed bug where any function taking an event parameter would crash with a nil-deref
1382             - fixed incorrect ref/deref bug in MutationEventImpl that would cause a crash crash
1383
1384         Test cases added:
1385         * layout-tests/fast/forms/check-box-enter-key-expected.txt: Added.
1386         * layout-tests/fast/forms/check-box-enter-key.html: Added.
1387         * layout-tests/fast/events/event-creation-expected.txt: Added.
1388         * layout-tests/fast/events/event-creation.html: Added.
1389
1390         * khtml/html/html_formimpl.cpp: (DOM::HTMLInputElementImpl::defaultEventHandler): Separate the checks for
1391         the space bar and the Enter key and make Enter submit the form on a check box or radio button.
1392
1393         * khtml/ecma/kjs_events.cpp:
1394         (KJS::toEvent): Fixed bug where this was checking for DOMNode rather than DOMEvent, so always returning 0.
1395         Without this, both test cases above will crash.
1396         (KJS::DOMUIEvent::DOMUIEvent): Set prototype; without this, the event-creation test case will fail.
1397         (KJS::DOMMouseEvent::DOMMouseEvent): Set prototype; without this, the event-creation test case will fail.
1398         (KJS::DOMKeyboardEvent::DOMKeyboardEvent): Set prototype; without this, both test cases above will fail.
1399         (KJS::DOMMutationEvent::DOMMutationEvent): Set prototype; without this, both test cases above will fail.
1400
1401         * khtml/xml/dom2_eventsimpl.cpp:
1402         (MutationEventImpl::MutationEventImpl): Fix typo where the wrong object was ref'd.
1403         (MutationEventImpl::initMutationEvent): Ditto. This was causing the layout tests to crash with the new tests above.
1404
1405         * khtml/xml/dom_docimpl.cpp: (DocumentImpl::createEvent): Added new event types to match the current DOM
1406         Level 3 specification. The test above tests both the new event types and the old ones.
1407
1408 2005-05-30  Darin Adler  <darin@apple.com>
1409
1410         Reviewed by John.
1411         No test case added because our layout test system doesn't allow us to do inline input.
1412
1413         - fixed <rdar://problem/4094066> REGRESSION (1.2.5-1.3): unconfirmed inline input is ignored in <textarea>, lost when form is submitted
1414
1415         * kwq/KWQTextArea.mm: (-[KWQTextArea _createTextView]): Call setWantsNotificationForMarkedText:YES.
1416
1417 2005-05-30  Maciej Stachowiak  <mjs@apple.com>
1418
1419         Reviewed by Darin.
1420
1421         - fixed <rdar://problem/4125222> Dashboard heap size grows over time (leak caused by JavaScript DOM node wrappers?)
1422
1423         - changed per-document DOMObject caching to work with DOMNodes, since that is all it was used for anyway.
1424         
1425         Test cases added: (these tests actually ensure that DOM wrappers
1426         are sufficiently protected from GC to match other browsers, they
1427         do not verify that the leak is fixed since there's no way to test
1428         that with layout tests).
1429
1430         * layout-tests/fast/dom/gc-1-expected.txt: Added.
1431         * layout-tests/fast/dom/gc-1.html: Added.
1432         * layout-tests/fast/dom/gc-2-expected.txt: Added.
1433         * layout-tests/fast/dom/gc-2.html: Added.
1434         * layout-tests/fast/dom/gc-3-expected.txt: Added.
1435         * layout-tests/fast/dom/gc-3.html: Added.
1436
1437         * khtml/ecma/kjs_binding.cpp:
1438         (KJS::ScriptInterpreter::forgetDOMObjectForDocument): New function - allows nodes
1439         that get removed from the document to go away from the cache if not referenced.
1440         (KJS::ScriptInterpreter::mark): Don't mark nodes that aren't in the document,
1441         they can stay in the cache but only if they have another source of life.
1442         (KJS::ScriptInterpreter::domNodesPerDocument): Renamed and changed parameter types.
1443         (KJS::ScriptInterpreter::getDOMNodeForDocument): Renamed and changed parameter types.
1444         (KJS::ScriptInterpreter::forgetDOMNodeForDocument): Renamed and changed parameter types.
1445         (KJS::ScriptInterpreter::putDOMNodeForDocument): Renamed and changed parameter types.
1446         (KJS::ScriptInterpreter::forgetAllDOMNodesForDocument): Renamed and changed parameter types.
1447         (KJS::ScriptInterpreter::updateDOMNodeDocument): Renamed and changed parameter types.
1448         * khtml/ecma/kjs_binding.h:
1449         * khtml/ecma/kjs_dom.cpp: 
1450         (KJS::DOMNode::~DOMNode): call forgetDOMObjectForDocument.
1451         (KJS::DOMNode::mark): If the node is not in the document, make sure to mark
1452         all wrappers in its detached piece of the tree.
1453         (KJS::getDOMNode): Updated for renames
1454         * khtml/ecma/kjs_dom.h:
1455         * khtml/xml/dom_docimpl.cpp:
1456         (DocumentImpl::~DocumentImpl): Updated for renames.
1457         * khtml/xml/dom_nodeimpl.cpp:
1458         (NodeImpl::checkAddChild): Updated for renames.
1459
1460 2005-05-30  Darin Adler  <darin@apple.com>
1461
1462         Reviewed by John.
1463         Could not figure out how to make an <object> fallback, so for now, no layout test.
1464
1465         - fixed <rdar://problem/4134124> REGRESSION (tip of tree): crash in QWidget::getView handling onunload event (yahoo.com)
1466
1467         * khtml/html/html_objectimpl.cpp: (DOM::HTMLObjectElementImpl::getObjectInstance):
1468         Check type of RenderObject to be sure it is a RenderWidget before calling widget() on it.
1469
1470 2005-05-27  Adele Peterson  <adele@apple.com>
1471
1472         Change by Darin, reviewed by me.
1473
1474         fix for <rdar://problem/4067761> 8A425: reload stock widget over and over and crash in XMLHttpRequest::changeState
1475
1476         * khtml/khtml_part.cpp: (KHTMLPart::closeURL): now cancels XMLHttpRequests
1477         * khtml/ecma/xmlhttprequest.h: Added cancelRequests, addToRequestsByDocument, and RemoveFromRequestsByDocument methods. Added requestsByDocument dictionary.
1478         * khtml/ecma/xmlhttprequest.cpp:
1479         (KJS::XMLHttpRequest::send): calls addToRequestsByDocument
1480         (KJS::XMLHttpRequest::abort): calls removeFromRequestsByDocument
1481         (KJS::XMLHttpRequest::slotFinished): calls removeFromRequestsByDocument
1482         (KJS::XMLHttpRequest::requestsByDocument):  creates dictionary to manage requests.
1483         (KJS::XMLHttpRequest::addToRequestsByDocument): adds this request to dict.
1484         (KJS::XMLHttpRequest::removeFromRequestsByDocument): removes this request from dict.
1485         (KJS::XMLHttpRequest::cancelRequests): goes and cancels requests in the doc
1486
1487 2005-05-27  Adele Peterson  <adele@apple.com>
1488
1489         Reviewed by me, done by Darin.
1490
1491         - Darin fixed a regression I found from Darin's recent DOM change that broke GMail
1492
1493         * khtml/ecma/kjs_window.cpp:
1494         (KJS::Window::get): Added nil check for document.
1495         (KJS::Window::hasProperty): Ditto.
1496
1497         Test cases added: None (Darin should write one).
1498
1499 2005-05-27  Adele Peterson  <adele@apple.com>
1500
1501         Reviewed by Darin.
1502
1503         fix for <rdar://problem/4121747> Cannot log into Cingular.com account page (load event delivered while still processing incoming data)
1504        
1505         * khtml/misc/loader.cpp:
1506         (DocLoader::DocLoader): Initialized m_loadInProgress to false.
1507         (DocLoader::setLoadInProgress): Added.
1508         (Loader::slotFinished): sets the m_loadInProgress flag to reflect the fact that we're not really done loading this request until we emit the signal with the request status.
1509         (Loader::numRequests): If there's a load in progress, we increment the number of requests so it doesn't seem like the load is done.
1510         * khtml/misc/loader.h: (khtml::DocLoader::loadInProgress): Added.
1511
1512         Test cases added: 
1513         * layout-tests/fast/loader/loadInProgress.html: Added
1514         * layout-tests/fast/loader/loadInProgress-expected.html: Added
1515
1516 2005-05-27  Darin Adler  <darin@apple.com>
1517
1518         Reviewed by Vicki.
1519
1520         - fixed <rdar://problem/4125212> form submission delayed until you are on the next page on XML/XSL page (security hole)
1521
1522         * khtml/xsl/xslt_processorimpl.cpp: (DOM::XSLTProcessorImpl::documentFromXMLDocPtr):
1523         Call setParsing(false) explicitly here. It's really annoying that setParsing(true) is done
1524         inside DOM::DocumentImpl and setParsing(false) is done by KHTMLPart, so that should be fixed
1525         some day, but for now this is the way to do it.
1526
1527         Test cases added:
1528         * layout-tests/fast/events/xsl-onload-expected.txt: Added.
1529         * layout-tests/fast/events/xsl-onload.xhtml: Added.
1530         * layout-tests/fast/events/xsl-onload.xsl: Added.
1531
1532 2005-05-27  John Sullivan  <sullivan@apple.com>
1533
1534         Reviewed by Darin
1535
1536         * WebCore-tests.exp:
1537         took out symbol __ZNK5QChar7isPunctEv; it was obsolete and causing build trouble
1538
1539 2005-05-27  Darin Adler  <darin@apple.com>
1540
1541         Reviewed by Adele.
1542
1543         - remove HAVE_ICU_LIBRARY ifdefs
1544
1545         * khtml/rendering/render_text.cpp: Just use ICU all the time; no ifdef.
1546         * kwq/KWQKURL.mm: Ditto.
1547
1548 2005-05-26  Darin Adler  <darin@apple.com>
1549
1550         Reviewed by me, patch by Mitz Pettel.
1551
1552         - fixed <rdar://problem/4106907> bidi algorithm bug fixed for KHTML should be fixed in WebCore too
1553
1554         * khtml/rendering/bidi.cpp: (khtml::RenderBlock::bidiReorderLine): Integrated the patch that Mitz did
1555         for the KDE bug, details at <http://www.mitzpettel.com/software/WebCorePatch2.html>.
1556
1557         Test cases added:
1558         * layout-tests/fast/text/international/bidi-neutral-directionality-paragraph-start-expected.txt: Added.
1559         * layout-tests/fast/text/international/bidi-neutral-directionality-paragraph-start.html: Added.
1560
1561 2005-05-26  Darin Adler  <darin@apple.com>
1562
1563         Reviewed by Richard and Dave Harrison.
1564         No new test cases needed for this change.
1565
1566         - eliminate WebCoreUnicode and use ICU directly instead
1567         - fixed compiling with gcc 4.0 (was broken for Development only)
1568
1569         * WebCore.exp: Removed the WebCoreXXXFunction exports.
1570         * WebCore-tests.exp: Removed some QChar functions that are now inlines.
1571         Removed some typeinfo exports that are no longer appropriate since we use -fno-rtti.
1572
1573         * kwq/KWQString.h:
1574         (QChar::isDigit): Changed to call u_isdigit when non-ASCII. We should probably phase
1575         this out since it's only used in places where we don't want to handle non-ASCII decimal digits.
1576         (QChar::isLetter): Changed to call u_isalpha when non-ASCII.
1577         (QChar::isNumber): Changed to call u_isdigit when non-ASCII. This probably should be removed, since
1578         we always want to call isDigit instead.
1579         (QChar::isLetterOrNumber): Changed to call u_isalnum when non-ASCII.
1580         (QChar::isPunct): Changed to call u_ispunct when non-ASCII.
1581         (QChar::digitValue): Changed to call u_charDigitValue when not '0'-'9'. We should probably phase
1582         this out since it's only used in places where we don't want to handle non-ASCII decimal digits.
1583         (QChar::lower): Changed to call u_tolower when non-ASCII.
1584         (QChar::upper): Changed to call u_toupper when non-ASCII.
1585         (QChar::direction): Made inline. Calls u_charDirection.
1586         (QChar::mirrored): Made inline. Calls u_isMirrored.
1587         (QChar::mirroredChar): Made inline. Calls u_charMirror.
1588
1589         * kwq/KWQChar.mm: Removed.
1590         * kwq/WebCoreUnicode.cpp: Removed.
1591         * kwq/WebCoreUnicode.h: Removed.
1592
1593         * WebCore.pbproj/project.pbxproj: Removed files.
1594
1595 2005-05-26  David Harrison  <harrison@apple.com>
1596
1597         Reviewed by John.
1598
1599         <rdar://problem/4120518> Mail: control-T in an empty message crashes mail
1600         
1601         * kwq/WebCoreBridge.mm:
1602         (-[WebCoreBridge rangeOfCharactersAroundCaret]):
1603         Nil-check result of VisiblePosition previous() and next().
1604
1605         * khtml/editing/visible_position.cpp:
1606         (khtml::VisiblePosition::previous):
1607         (khtml::VisiblePosition::previousVisiblePosition):
1608         Make sure previous() does not return the original position.  Also, simplified.
1609         Commented odd, but required, behavior in previousVisiblePosition().
1610
1611         * khtml/editing/visible_units.cpp:
1612         (khtml::startOfEditableContent):
1613         (khtml::endOfEditableContent):
1614         Removed redundant check for isEditableContent().
1615         
1616         * khtml/editing/jsediting.cpp:
1617         * khtml/khtml_part.cpp:
1618         (KHTMLPart::transpose):
1619         * khtml/khtml_part.h:
1620         * kwq/KWQKHTMLPart.h:
1621         * kwq/KWQKHTMLPart.mm:
1622         (KWQKHTMLPart::issueTransposeCommand):
1623         * layout-tests/editing/editing.js:
1624         * kwq/WebCoreBridge.h:
1625         Add support for transpose command in JavaScript and therefore layout tests.
1626         
1627         * layout-tests/editing/deleting/transpose-empty-expected.txt: Added.
1628         * layout-tests/editing/deleting/transpose-empty.html: Added.
1629         New test for this bug.
1630         
1631 2005-05-24  Richard Williamson   <rjw@apple.com>
1632
1633         Fixed <rdar://problem/4127061> <canvas> backing store should be zero filled
1634
1635         Use calloc instead of malloc to ensure zero filled backing store.
1636
1637         Reviewed by Darin.
1638
1639         * khtml/rendering/render_canvasimage.cpp:
1640         (RenderCanvasImage::createDrawingContext):
1641
1642 2005-05-24  John Sullivan  <sullivan@apple.com>
1643
1644         Reviewed by Dave Hyatt.
1645         
1646         - fixed these bugs:
1647         <rdar://problem/4118510> Textareas with a vertical scroll bar should have their resize corner under the scroll bar
1648         <rdar://problem/4118523> Resize image in textareas is drawn repeatedly when scrolling vertically with scrollbar
1649
1650         Test cases added: none; doesn't affect page layout
1651
1652         * kwq/KWQTextArea.h:
1653         added inInitWithFrame ivar
1654         * kwq/KWQTextArea.mm:
1655         (+[KWQTextArea _resizeCornerImage]):
1656         moved here from KWQTextAreaTextView; now it's a class method so we only look up the image once.
1657         (-[KWQTextArea initWithFrame:]):
1658         set and clear inInitWithFrame ivar, used by -tile
1659         (-[KWQTextArea _isResizableByUser]):
1660         renamed with an underscore for consistency
1661         (-[KWQTextArea _textViewShouldHandleResizing]):
1662         new method, returns YES if the textarea is user-resizable and the enclosed textview is responsible for drawing
1663         and tracking the resize corner.
1664         (-[KWQTextArea tile]):
1665         shrink the vertical scroller if appropriate to account for the resize corner
1666         (-[KWQTextArea _resizeCornerRect]):
1667         new method, returns the bottom-right corner rect, where the resize image goes
1668         (-[KWQTextArea _trackResizeFromMouseDown:]):
1669         moved here from KWQTextAreaTextView. The only changes were to move the [NSCursor set] call inside here (was in
1670         the caller), and to use self where it was using [self _enclosingTextArea], and to move a comment in here that
1671         was in the caller
1672         (-[KWQTextArea mouseDown:]):
1673         track resizing if appropriate
1674         (-[KWQTextArea drawRect:]):
1675         draw the resize corner if appropriate
1676         (-[KWQTextAreaTextView _resizeCornerRect]):
1677         get the resize image from KWQTextArea
1678         (-[KWQTextAreaTextView resetCursorRects]):
1679         check _textViewShouldHandleResizing
1680         (-[KWQTextAreaTextView drawRect:]):
1681         ditto
1682         (-[KWQTextAreaTextView mouseDown:]):
1683         ditto; also, make the textarea handle the resize tracking now
1684
1685 2005-05-24  Darin Adler  <darin@apple.com>
1686
1687         - another gcc 4.0 fix
1688
1689         No new test cases needed.
1690
1691         * khtml/dom/dom2_events.cpp: Moved constants out of the KHTML_NO_CPLUSPLUS_DOM #if.
1692
1693 2005-05-24  Darin Adler  <darin@apple.com>
1694
1695         Reviewed by Vicki.
1696
1697         - fixed <rdar://problem/4128727> many DOM classes not exported (can't add categories or do other things that require class name linking)
1698
1699         No new test cases needed.
1700
1701         * WebCore.exp: Added exports for many classes in the public DOM headers that were omitted before.
1702         Also removed one symbol that was listed twice.
1703
1704 2005-05-24  Maciej Stachowiak  <mjs@apple.com>
1705
1706         Reviewed by John.
1707
1708         - fixed <rdar://problem/3598589> onunload handler doesn't fire when a window is closed
1709
1710         Test cases added: 
1711         * layout-tests/fast/events/onunload-expected.txt: Added.
1712         * layout-tests/fast/events/onunload.html: Added.
1713
1714         * khtml/xml/dom_docimpl.cpp:
1715         (DocumentImpl::detach): Don't remove all event handlers from the document here...
1716         * khtml/khtml_part.cpp:
1717         (KHTMLPart::closeURL): ...instead do it here, after firing the unload event, but only
1718         if the document is not in the back/forward cache...
1719         * kwq/KWQPageState.mm:
1720         (-[KWQPageState finalize]): ...and take care of the back/forward cache case here.
1721
1722 2005-05-24  John Sullivan  <sullivan@apple.com>
1723
1724         Reviewed by Kevin.
1725         
1726         - WebCore part of <rdar://problem/4125783> WebKit needs a way to control whether textareas are resizable
1727
1728         * kwq/KWQKHTMLSettings.h:
1729         (KHTMLSettings::textAreasAreResizable):
1730         new getter
1731         (KHTMLSettings::setTextAreasAreResizable):
1732         new setter
1733         
1734         * kwq/KWQTextArea.h:
1735         * kwq/KWQTextArea.mm:
1736         eliminated ALLOW_RESIZING_TEXT_AREAS #define in favor of using runtime setting
1737         (-[KWQTextArea isResizableByUser]):
1738         get value from settings, and cache it in KWQTextArea instance
1739         (-[KWQTextAreaTextView _enclosingTextArea]):
1740         new convenience method, extracted from _trackResizeFromMouseDown:
1741         (-[KWQTextAreaTextView _trackResizeFromMouseDown:]):
1742         now uses extracted method
1743         
1744         (-[KWQTextAreaTextView drawRect:]):
1745         now checks isResizableByUser
1746         (-[KWQTextAreaTextView mouseDown:]):
1747         ditto
1748         
1749         * kwq/WebCoreSettings.h:
1750         * kwq/WebCoreSettings.mm:
1751         (-[WebCoreSettings setTextAreasAreResizable:]):
1752         new setter
1753         (-[WebCoreSettings textAreasAreResizable]):
1754         new getter
1755
1756 2005-05-23  Maciej Stachowiak  <mjs@apple.com>
1757
1758         Reviewed by John.
1759
1760         - split remaining editing command classes out of htmlediting.cpp
1761         - rename InsertParagraphSeparatorInQuotedContentCommand to BreakBlockquoteCommand
1762
1763         No layout tests needed - this is a pure refactoring change.
1764         
1765         * WebCore.pbproj/project.pbxproj:
1766         * khtml/editing/apply_style_command.cpp:
1767         * khtml/editing/break_blockquote_command.cpp: Added.
1768         * khtml/editing/break_blockquote_command.h: Added.
1769         * khtml/editing/composite_edit_command.cpp:
1770         * khtml/editing/delete_selection_command.cpp:
1771         * khtml/editing/edit_command.cpp:
1772         * khtml/editing/htmlediting.cpp:
1773         * khtml/editing/htmlediting.h:
1774         * khtml/editing/insert_line_break_command.cpp: Added.
1775         * khtml/editing/insert_line_break_command.h: Added.
1776         * khtml/editing/insert_paragraph_separator_command.cpp: Added.
1777         * khtml/editing/insert_paragraph_separator_command.h: Added.
1778         * khtml/editing/insert_text_command.cpp: Added.
1779         * khtml/editing/insert_text_command.h: Added.
1780         * khtml/editing/join_text_nodes_command.cpp: Added.
1781         * khtml/editing/join_text_nodes_command.h: Added.
1782         * khtml/editing/merge_identical_elements_command.cpp: Added.
1783         * khtml/editing/merge_identical_elements_command.h: Added.
1784         * khtml/editing/move_selection_command.cpp: Added.
1785         * khtml/editing/move_selection_command.h: Added.
1786         * khtml/editing/rebalance_whitespace_command.cpp: Added.
1787         * khtml/editing/rebalance_whitespace_command.h: Added.
1788         * khtml/editing/remove_css_property_command.cpp: Added.
1789         * khtml/editing/remove_css_property_command.h: Added.
1790         * khtml/editing/remove_node_attribute_command.cpp: Added.
1791         * khtml/editing/remove_node_attribute_command.h: Added.
1792         * khtml/editing/remove_node_command.cpp: Added.
1793         * khtml/editing/remove_node_command.h: Added.
1794         * khtml/editing/remove_node_preserving_children_command.cpp: Added.
1795         * khtml/editing/remove_node_preserving_children_command.h: Added.
1796         * khtml/editing/replace_selection_command.cpp: Added.
1797         * khtml/editing/replace_selection_command.h: Added.
1798         * khtml/editing/set_node_attribute_command.cpp: Added.
1799         * khtml/editing/set_node_attribute_command.h: Added.
1800         * khtml/editing/split_element_command.cpp: Added.
1801         * khtml/editing/split_element_command.h: Added.
1802         * khtml/editing/split_text_node_command.cpp: Added.
1803         * khtml/editing/split_text_node_command.h: Added.
1804         * khtml/editing/split_text_node_containing_element_command.h: Added.
1805         * khtml/editing/typing_command.cpp: Added.
1806         * khtml/editing/typing_command.h: Added.
1807         * khtml/editing/wrap_contents_in_dummy_span_command.cpp: Added.
1808         * khtml/editing/wrap_contents_in_dummy_span_command.h: Added.
1809
1810 2005-05-23  Darin Adler  <darin@apple.com>
1811
1812         * WebCore.exp: Sorted file for more readable diffs.
1813
1814 2005-05-23  Adele Peterson  <adele@apple.com>
1815
1816         Reviewed by Darin.
1817
1818         fix for <rdar://problem/4122661> Regression: 10.3.8-10.3.9: Next lesson doesn't work on Dale Carnegie Action Systems page
1819
1820         * khtml/ecma/kjs_window.cpp: (KJS::WindowFunc::tryCall): added checks for NaN, in case it is passed into window.open for screenx, screeny, left, top, height, or width.
1821
1822 2005-05-23  David Harrison  <harrison@apple.com>
1823
1824         Reviewed by Darin.
1825
1826         Prevent crash when going from no selection to selection with mispelling checks enabled.
1827                 
1828         * kwq/KWQKHTMLPart.mm:
1829         (KWQKHTMLPart::markMisspellings):
1830         Repair check for null searchRange.  Was inadvertently broken in recent checkin.
1831
1832 2005-05-23  John Sullivan  <sullivan@apple.com>
1833
1834         Reviewed by Dave Hyatt.
1835         
1836         - fixed <rdar://problem/4123592> Can't resize textareas that have a width specified by a style
1837
1838         * kwq/KWQTextArea.mm:
1839         (-[KWQTextArea getNumColumns:andNumRows:forSize:]):
1840         removed this method, which I had added earlier to set cols and rows correctly
1841         (-[KWQTextAreaTextView _trackResizeFromMouseDown:]):
1842         set width and height instead of cols and rows; handle the intrinsic margin that sometimes appears
1843         on form elements
1844
1845 2005-05-22  Adele Peterson  <adele@apple.com>
1846
1847         Reviewed by Maciej.
1848
1849         fix for <rdar://problem/4127101> REGRESSION(412-TOT) crash when creating Option element
1850
1851         * khtml/ecma/kjs_html.cpp: (KJS::OptionConstructorImp::construct):
1852         Changed ElementImpl pointer to a SharedPtr because it was getting destroyed before we were done with it.  
1853
1854 2005-05-20  John Sullivan  <sullivan@apple.com>
1855
1856         Reviewed by Chris.
1857         
1858         - fixed <rdar://problem/4126160> Crash sending mouse-exited event after reloading 
1859         page with resizable textarea
1860
1861         * kwq/KWQTextArea.mm:
1862         (-[KWQTextAreaTextView resetCursorRects]):
1863         This was some side effect of tracking rect code used for resizable textareas. I discovered
1864         that I didn't need the tracking rect code at all (at least to achieve the level of only-somewhat-working
1865         cursor behavior that I already had). Removing it caused the bug to vanish.
1866
1867 2005-05-19  Darin Adler  <darin@apple.com>
1868
1869         Reviewed by Maciej.
1870         
1871         - turned off exceptions and RTTI; seems to cut WebCore code size by about 35%
1872
1873         * WebCore.pbproj/project.pbxproj: Turn off exceptions and RTTI for the framework.
1874
1875 2005-05-19  Darin Adler  <darin@apple.com>
1876
1877         Reviewed by Chris Petersen.
1878
1879         - fixed a mistake I introduced in my previous check-in that caused a Deployment build failure
1880
1881         * kwq/DOM.mm: (-[DOMDocument createTreeWalker::::]): Initialize cppFilter to 0, which fixes both
1882         the build failure and a potential bug!
1883
1884 2005-05-17  Darin Adler  <darin@apple.com>
1885
1886         Reviewed by Maciej.
1887         No new layout tests required.
1888
1889         - remove all dependencies on exceptions and RTTI (but don't turn them off yet, that will be in a later patch)
1890
1891         * WebCore.pbproj/project.pbxproj: Set a new KHTML_NO_CPLUSPLUS_DOM define.
1892         Removed all C++ DOM wrapper files that we don't need to compile any more.
1893
1894         * khtml/dom/css_stylesheet.h: Added more KHTML_NO_CPLUSPLUS_DOM checks so we don't include any
1895         headers when including this file.
1896
1897         * khtml/dom/dom2_events.h: Fixed up KHTML_NO_CPLUSPLUS_DOM checks so that everything but EventListener
1898         is turned off when that's on. Also moved the public so that the constants from KeyboardEvent are public.
1899         * khtml/dom/dom2_events.cpp: Put everything except for EventListener inside KHTML_NO_CPLUSPLUS_DOM.
1900
1901         * khtml/dom/dom2_range.h: Added KHTML_NO_CPLUSPLUS_DOM checks so that only the constants are defined,
1902         no classes.
1903
1904         * khtml/dom/dom2_traversal.cpp: Put everything except for NodeFilterCondition inside KHTML_NO_CPLUSPLUS_DOM.
1905
1906         * khtml/dom/dom_node.h: Added more KHTML_NO_CPLUSPLUS_DOM checks so we don't include any
1907         headers when including this file.
1908
1909         * khtml/ecma/kjs_binding.cpp:
1910         (KJS::DOMObject::get): Removed exception-handling code. Now we can eliminate tryGet altogether.
1911         (KJS::DOMObject::put): Ditto.
1912         (KJS::DOMFunction::get): Ditto.
1913         (KJS::DOMFunction::call): Ditto.
1914
1915         * khtml/editing/visible_text.h: Added an include of <qstring.h>.
1916
1917         * khtml/misc/loader.h: Added isKHTMLLoader.
1918         * khtml/misc/loader.cpp: (Loader::isKHTMLLoader): Added. Poor-man's replacement for dynamic_cast.
1919
1920         * khtml/rendering/render_form.h:
1921         * khtml/rendering/render_form.cpp: (RenderFormElement::slotTextChanged): Added. Hack to make KWQSlot work
1922         for this function.
1923
1924         * khtml/xml/dom2_rangeimpl.h: Added a forward declaration of class DOMString, needed now that the C++
1925         DOM wrappers aren't defining it.
1926
1927         * khtml/xml/dom_docimpl.cpp:
1928         (DocumentImpl::defaultEventHandler): Changed to call handleEventImpl so we don't have to make the
1929         C++ DOM wrapper for the event.
1930         * khtml/xml/dom_nodeimpl.cpp:
1931         (NodeImpl::handleLocalEvents): Ditto.
1932         (ContainerNodeImpl::insertBefore): Used SharedPtr<NodeImpl> rather than Node to protect the child node.
1933         (ContainerNodeImpl::replaceChild): Ditto.
1934         (ContainerNodeImpl::appendChild): Ditto.
1935         (ContainerNodeImpl::addChild): Ditto.
1936
1937         * kwq/DOM.mm:
1938         (ObjCNodeFilterCondition::acceptNode): Update to add a KHTML_NO_CPLUSPLUS_DOM check since FilterCondition
1939         has a different API depending on the state.
1940         (-[DOMDocument createNodeIterator::::]): Rewrote to use NodeFilterImpl instead of NodeFilter.
1941         (-[DOMDocument createTreeWalker::::]): Ditto.
1942
1943         * kwq/KWQAccObject.mm:
1944         (-[KWQAccObject role]): Use identifier instead of casting to Node and using elementId.
1945         (-[KWQAccObject title]): Ditto.
1946         (-[KWQAccObject accessibilityIsIgnored]): Ditto.
1947         (-[KWQAccObject rendererForView:]): Ditto.
1948
1949         * kwq/KWQFrame.mm: (QFrame::setFrameStyle): Use isKHTMLView instead of dynamic_cast.
1950
1951         * kwq/KWQKHTMLPart.mm:
1952         (KWQKHTMLPart::currentForm): Use focusNode instead of activeNode.
1953         (KWQKHTMLPart::nextKeyViewInFrame): Use isWidget instead of dynamic_cast.
1954         (KWQKHTMLPart::currentEventIsMouseDownInWidget): Use KHTMLView's nodeUnderMouse instead of our public one
1955         that uses a DOM C++ wrapper.
1956         (KWQKHTMLPart::partForWidget): Use isKHTMLView instead of dynamic_cast.
1957         (KWQKHTMLPart::passSubframeEventToSubframe): Use isWidget instead of dynamic_cast.
1958
1959         * kwq/KWQObject.h: Made isXXX functions all public since we use them in a few more places now.
1960         Also added isKHTMLLoader.
1961         * kwq/KWQObject.mm: (QObject::isKHTMLLoader): Added. Returns false by default.
1962
1963         * kwq/KWQSlot.mm: Removed all uses of dynamic_cast.
1964
1965         * kwq/WebCoreBridge.mm:
1966         (-[WebCoreBridge stringForRange:]): Used plainText instead of text.
1967         (-[WebCoreBridge copyRenderNode:copier:]): Used isWidget instead of dynamic_cast.
1968
1969 2005-05-16  Darin Adler  <darin@apple.com>
1970
1971         - attempt to get things building under "Saffron" development tools
1972
1973         * WebCore.pbproj/project.pbxproj: Use BUILT_PRODUCTS_DIR instead of SYMROOT.
1974
1975 2005-05-16  Adele Peterson  <adele@apple.com>
1976
1977         Changes by Darin. Reviewed by myself.
1978
1979         Changed the Render Tree debug code to write out an indication that the affinity is upstream
1980         when writing out caret position. Updated the one layout test with output affected by the change.
1981         Also updated one test to use the new dumpAsText method in dumpRenderTree.
1982
1983         * kwq/KWQRenderTreeDebug.cpp: (writeSelection): writes out affinity if it's upstream in the caret case
1984         * layout-tests/editing/style/create-block-for-style-004-expected.txt: new results that contain the affinity
1985         * layout-tests/fast/js/char-at.html: now calls layoutController.dumpAsText()
1986         * layout-tests/fast/js/char-at-expected.txt: plain text result (replaces old render tree result)
1987
1988 2005-05-16  Darin Adler  <darin@apple.com>
1989
1990         Reviewed by Adele.
1991
1992         - fixed issues preventing us from compiling with newer versions of gcc 4.0
1993
1994         * khtml/dom/dom2_events.cpp: Add definitions of some static data member constants, as required
1995         by the C++ standard and the gcc 4.0 compiler.
1996
1997         * khtml/editing/selection.h: Specified KHTMLPart friend class as ::KHTMLPart, since if it's
1998         not explicitly qualified, it means DOM::KHTMLPart.
1999
2000         * khtml/dom/dom_string.cpp:
2001         (DOM::strcasecmp): Removed redundant and illegal DOM:: prefix.
2002         (DOM::operator==): Ditto.
2003         * khtml/ecma/kjs_binding.cpp:
2004         (KJS::getStringOrNull): Removed redundant and illegal KJS:: prefix.
2005         (KJS::ValueToVariant): Ditto.
2006         * khtml/ecma/kjs_css.cpp:
2007         (KJS::getCSSRuleConstructor): Ditto.
2008         (KJS::getCSSValueConstructor): Ditto.
2009         (KJS::getCSSPrimitiveValueConstructor): Ditto.
2010         * khtml/ecma/kjs_events.cpp:
2011         (KJS::getEventConstructor): Ditto.
2012         (KJS::getEventExceptionConstructor): Ditto.
2013         (KJS::getMutationEventConstructor): Ditto.
2014         * khtml/ecma/kjs_traversal.cpp:
2015         (KJS::getNodeFilterConstructor): Ditto.
2016
2017         * khtml/misc/loader_client.h: Added an empty virtual destructor to CachedObjectClient
2018         to quiet the compiler. This doesn't really do any good, but also does no harm.
2019         * khtml/misc/loader.cpp: (CachedObjectClient::~CachedObjectClient): Added.
2020
2021         * khtml/rendering/render_block.cpp: (khtml::RenderBlock::fillBlockSelectionGaps):
2022         Initialize a couple of variables that should have been initialized to 0.
2023         Not just about making the compiler happy -- warning found a real bug!
2024
2025         * kwq/KWQTextArea.mm: (RangeOfParagraph): Change else structure to work around compiler
2026         warning bug.
2027
2028 2005-05-13  John Sullivan  <sullivan@apple.com>
2029
2030         * kwq/KWQTextArea.mm:
2031         (-[KWQTextAreaTextView _trackResizeFromMouseDown:]):
2032         added Radar numbers to FIXMEs about resizable textareas
2033         (-[KWQTextAreaTextView resetCursorRects]):
2034         ditto
2035         (-[KWQTextAreaTextView mouseDown:]):
2036         ditto
2037
2038 2005-05-12  Darin Adler  <darin@apple.com>
2039
2040         Reviewed by Chris Blumenberg.
2041
2042         - more "getting off the C++ DOM wrappers" changes
2043           This pass involves replacing uses of DOM::Range with use of DOM::RangeImpl
2044           plus some more use of DOM::DocumentImpl instead of DOM::Document.
2045
2046         * khtml/dom/dom2_range.cpp:
2047         * khtml/dom/dom2_range.h:
2048         * khtml/ecma/kjs_window.cpp:
2049         (KJS::Window::get):
2050         (KJS::WindowFunc::tryCall):
2051         (KJS::Window::updateLayout):
2052         (KJS::ScheduledAction::execute):
2053         (KJS::Selection::toString):
2054         * khtml/ecma/xmlhttprequest.cpp:
2055         (KJS::XMLHttpRequestProtoFunc::tryCall):
2056         * khtml/editing/htmlediting.cpp:
2057         (khtml::InsertLineBreakCommand::doApply):
2058         * khtml/editing/selection.cpp:
2059         (khtml::Selection::Selection):
2060         (khtml::Selection::moveTo):
2061         (khtml::Selection::toRange):
2062         * khtml/editing/selection.h:
2063         * khtml/editing/visible_position.cpp:
2064         (khtml::makeRange):
2065         (khtml::startVisiblePosition):
2066         (khtml::endVisiblePosition):
2067         (khtml::setStart):
2068         (khtml::setEnd):
2069         * khtml/editing/visible_position.h:
2070         * khtml/editing/visible_range.h:
2071         * khtml/editing/visible_text.cpp:
2072         (khtml::TextIterator::TextIterator):
2073         (khtml::TextIterator::range):
2074         (khtml::SimplifiedBackwardsTextIterator::SimplifiedBackwardsTextIterator):
2075         (khtml::SimplifiedBackwardsTextIterator::range):
2076         (khtml::CharacterIterator::CharacterIterator):
2077         (khtml::CharacterIterator::range):
2078         (khtml::WordAwareIterator::WordAwareIterator):
2079         (khtml::WordAwareIterator::advance):
2080         (khtml::TextIterator::rangeLength):
2081         (khtml::TextIterator::rangeFromLocationAndLength):
2082         (khtml::plainText):
2083         (khtml::findPlainText):
2084         * khtml/editing/visible_text.h:
2085         (khtml::WordAwareIterator::range):
2086         * khtml/editing/visible_units.cpp:
2087         (khtml::previousBoundary):
2088         (khtml::nextBoundary):
2089         * khtml/html/html_elementimpl.cpp:
2090         (HTMLElementImpl::innerText):
2091         * khtml/html/htmltokenizer.cpp:
2092         (khtml::HTMLTokenizer::scriptExecution):
2093         * khtml/khtml_part.cpp:
2094         (KHTMLPart::text):
2095         (KHTMLPart::selectedText):
2096         (KHTMLPart::shouldBeginEditing):
2097         (KHTMLPart::shouldEndEditing):
2098         (KHTMLPart::selectionComputedStyle):
2099         * khtml/khtml_part.h:
2100         * khtml/khtmlview.h:
2101         * khtml/rendering/render_text.cpp:
2102         (InlineTextBox::paint):
2103         * khtml/xml/dom2_rangeimpl.cpp:
2104         (DOM::operator==):
2105         (DOM::rangeOfContents):
2106         * khtml/xml/dom2_rangeimpl.h:
2107         (DOM::operator!=):
2108         * khtml/xml/dom_docimpl.cpp:
2109         (DocumentImpl::relinquishesEditingFocus):
2110         (DocumentImpl::acceptsEditingFocus):
2111         (DocumentImpl::addMarker):
2112         (DocumentImpl::removeMarker):
2113         * khtml/xml/dom_docimpl.h:
2114         * khtml/xml/dom_position.cpp:
2115         (DOM::startPosition):
2116         * khtml/xml/dom_position.h:
2117         * kwq/DOMHTML.mm:
2118         (-[DOMHTMLLinkElement href]):
2119         (-[DOMHTMLBaseElement href]):
2120         (-[DOMHTMLInputElement src]):
2121         (-[DOMHTMLAnchorElement href]):
2122         (-[DOMHTMLImageElement src]):
2123         (-[DOMHTMLAreaElement href]):
2124         * kwq/KWQAccObject.mm:
2125         (-[KWQAccObject textUnderElement]):
2126         (-[KWQAccObject value]):
2127         (-[KWQAccObject doAXStringForTextMarkerRange:]):
2128         (-[KWQAccObject doAXAttributedStringForTextMarkerRange:]):
2129         * kwq/KWQKHTMLPart.h:
2130         (KWQKHTMLPart::markedTextRange):
2131         * kwq/KWQKHTMLPart.mm:
2132         (KWQKHTMLPart::findString):
2133         (KWQKHTMLPart::advanceToNextMisspelling):
2134         (KWQKHTMLPart::fontForSelection):
2135         (KWQKHTMLPart::markMisspellings):
2136         (KWQKHTMLPart::respondToChangedSelection):
2137         (KWQKHTMLPart::shouldBeginEditing):
2138         (KWQKHTMLPart::shouldEndEditing):
2139         (convertAttributesToUnderlines):
2140         (KWQKHTMLPart::setMarkedTextRange):
2141         * kwq/WebCoreBridge.mm:
2142         (-[WebCoreBridge elementAtPoint:]):
2143         (-[WebCoreBridge rangeByExpandingSelectionWithGranularity:]):
2144         (-[WebCoreBridge rangeByAlteringCurrentSelection:direction:granularity:]):
2145         (-[WebCoreBridge rangeByAlteringCurrentSelection:verticalDistance:]):
2146         (-[WebCoreBridge selectedDOMRange]):
2147         (-[WebCoreBridge convertToNSRange:DOM::]):
2148         (-[WebCoreBridge convertToDOMRange:]):
2149         (-[WebCoreBridge convertToObjCDOMRange:]):
2150         (-[WebCoreBridge selectNSRange:]):
2151         (-[WebCoreBridge selectedNSRange]):
2152         (-[WebCoreBridge markDOMRange]):
2153         (-[WebCoreBridge markedTextDOMRange]):
2154         (-[WebCoreBridge markedTextNSRange]):
2155         (-[WebCoreBridge replaceMarkedTextWithText:]):
2156         (-[WebCoreBridge smartDeleteRangeForProposedRange:]):
2157         (-[WebCoreBridge dragCaretDOMRange]):
2158         (-[WebCoreBridge editableDOMRangeForPoint:]):
2159         (-[WebCoreBridge rangeOfCharactersAroundCaret]):
2160
2161 2005-05-13  Maciej Stachowiak  <mjs@apple.com>
2162
2163         Reviewed by Dave.
2164
2165         - more splitting up of htmlediting.cpp
2166
2167         * WebCore.pbproj/project.pbxproj:
2168         * khtml/editing/composite_edit_command.cpp:
2169         * khtml/editing/delete_from_text_node_command.cpp: Added.
2170         * khtml/editing/delete_from_text_node_command.h: Added.
2171         * khtml/editing/delete_selection_command.cpp: Added.
2172         * khtml/editing/delete_selection_command.h: Added.
2173         * khtml/editing/htmlediting.cpp:
2174         * khtml/editing/htmlediting.h:
2175         * khtml/editing/insert_into_text_node_command.cpp: Added.
2176         * khtml/editing/insert_into_text_node_command.h: Added.
2177         * khtml/editing/insert_node_before_command.cpp: Added.
2178         * khtml/editing/insert_node_before_command.h: Added.
2179
2180 2005-05-12  Adele Peterson  <adele@apple.com>
2181
2182         Reviewed by Maciej.
2183
2184         fix for  <rdar://problem/4117656> deleting an input element in its onBlur handler crashes Safari
2185
2186         * khtml/rendering/render_form.cpp: (RenderLineEdit::handleFocusOut): added nil check for element
2187
2188 2005-05-12  John Sullivan  <sullivan@apple.com>
2189
2190         Reviewed by Kevin.
2191         
2192         - rolled in changes from experimental-ui-branch to support resizable textareas
2193         and find-as-you-type. The files/functions modified are listed just below. After
2194         that are the ChangeLog comments from the branch.
2195
2196         * Resources/textAreaResizeCorner.tiff: Added.
2197         * WebCore.pbproj/project.pbxproj:
2198         * kwq/KWQKHTMLPart.h:
2199         * kwq/KWQKHTMLPart.mm:
2200         (KWQKHTMLPart::findString):
2201         * kwq/KWQTextArea.mm:
2202         (-[KWQTextArea textDidChange:]):
2203         (-[KWQTextAreaTextView _resizeCornerImage]):
2204         (-[KWQTextAreaTextView _resizeCornerRect]):
2205         (-[KWQTextAreaTextView resetCursorRects]):
2206         (-[KWQTextAreaTextView drawRect:]):
2207         (-[KWQTextAreaTextView mouseDown:]):
2208         * kwq/WebCoreBridge.h:
2209         * kwq/WebCoreBridge.mm:
2210         (-[WebCoreBridge searchFor:direction:caseSensitive:wrap:findInSelection:]):
2211
2212         2005-05-05  John Sullivan  <sullivan@apple.com>
2213
2214                 Reviewed by Chris.
2215
2216                 * kwq/KWQTextArea.mm:
2217                 (-[KWQTextAreaTextView _resizeCornerRect]):
2218                 Get corner rect from enclosing clipView, rather than using visibleRect.
2219                 VisibleRect would return the wrong result when the textarea was clipped
2220                 by the bottom of the window, leading to redraw schmutz among other things.
2221
2222         2005-05-02  John Sullivan  <sullivan@apple.com>
2223
2224                 Reviewed by Chris.
2225                 
2226                 Improvements to resizable textarea experiment:
2227                 - resize image is now drawn in the resize corner
2228                 - cursor sometimes tracks to arrow when over resize corner (but usually not)
2229                 - cursor changes to arrow on mouse down in any case
2230
2231                 * Resources/textAreaResizeCorner.tiff: Added.
2232                 * WebCore.pbproj/project.pbxproj:
2233                 updated for added image file
2234                 
2235                 * kwq/KWQTextArea.mm:
2236                 (-[KWQTextAreaTextView _resizeCornerImage]):
2237                 new method, reads resize image once and caches it
2238                 (-[KWQTextAreaTextView _resizeCornerRect]):
2239                 new method, computes rect from image
2240                 (-[KWQTextAreaTextView resetCursorRects]):
2241                 overridden to attempt to make the cursor change to an arrow when over this
2242                 corner. Only works sometimes, as explained in comments.
2243                 (-[KWQTextAreaTextView drawRect:]):
2244                 overridden to draw resize image
2245                 (-[KWQTextAreaTextView mouseDown:]):
2246                 now uses _resizeCornerRect, and sets cursor to arrow when pressed in resize corner
2247
2248         2005-04-18  John Sullivan  <sullivan@apple.com>
2249
2250                 WebCore support for notifying a form delegate when a
2251                 textarea's contents have changed (as opposed to a 
2252                 textfield, which was already handled).
2253
2254                 Reviewed by Maciej.
2255
2256                 * kwq/WebCoreBridge.h:
2257                 add textDidChange: method
2258
2259                 * kwq/KWQTextArea.mm:
2260                 (-[KWQTextArea textDidChange:]):
2261                 call through to bridge
2262
2263         2005-04-07  John Sullivan  <sullivan@apple.com>
2264
2265                 WebCore support for find-as-you-type; needed an additional parameter
2266                 to findString and searchFor:...
2267
2268                 Reviewed by Dave Hyatt.
2269
2270                 * kwq/KWQKHTMLPart.h:
2271                 * kwq/KWQKHTMLPart.mm:
2272                 (KWQKHTMLPart::findString):
2273                 new findInSelection parameter; if true, start from the beginning of the selection
2274                 when searching forward, or the end of the selection when searching backward
2275                 
2276                 * kwq/WebCoreBridge.h:
2277                 * kwq/WebCoreBridge.mm:
2278                 (-[WebCoreBridge searchFor:direction:caseSensitive:wrap:findInSelection:]):
2279                 new findInSelection parameter; passed through to findString
2280
2281 2005-05-12  Darin Adler  <darin@apple.com>
2282
2283         Reviewed by Maciej (except for some parts outside the ECMA directory).
2284
2285         - switch KJS wrappers over to using the DOM impl. classes rather than using
2286           the DOM wrappers; will allow us to not even compile the DOM wrappers and
2287           make the code smaller
2288
2289         * khtml/css/css_valueimpl.h: Added CSSStyleDeclarationImpl::isPropertyName,
2290         removed CSSStyleDeclarationImpl::propertyID.
2291         * khtml/css/css_valueimpl.cpp:
2292         (DOM::propertyID): Added. Gets property ID given a DOM string. Replaces the
2293         previous version that had hacks that we want to leave in the JS wrapper for now.
2294         (DOM::CSSStyleDeclarationImpl::isPropertyName): Added.
2295
2296         * khtml/css/cssproperties.in: Fixed up comments.
2297
2298         * khtml/css/makeprop: Added new maxCSSPropertyNameLength constant, used for
2299         buffer size in the propertyID function.
2300
2301         * khtml/dom/dom2_events.h: Added handleEventImpl, making it easier to call
2302         handleEvent in a way that works either with or without the C++ DOM wrappers.
2303         * khtml/dom/dom2_events.cpp: (EventListener::handleEventImpl): Added.
2304
2305         * khtml/dom/dom2_views.cpp: Added now-needed include.
2306         * khtml/dom/dom_doc.cpp: Added now-needed include.
2307         * khtml/dom/dom_element.cpp: Tweaked includes.
2308
2309         * khtml/editing/htmlediting.cpp: Removed now-unneeded include.
2310         * khtml/html/html_baseimpl.cpp: Ditto.
2311         * khtml/html/html_formimpl.h: Ditto.
2312         * khtml/rendering/render_form.h: Ditto.
2313         * khtml/rendering/render_style.h: Ditto.
2314         * khtml/xml/dom2_eventsimpl.cpp: Ditto.
2315         * khtml/xml/dom2_viewsimpl.h: Ditto.
2316         * khtml/xml/dom_elementimpl.h: Ditto.
2317         * khtml/xml/dom_stringimpl.h: Ditto.
2318         * kwq/DOM.mm: Ditto.
2319         * kwq/DOMHTML.mm: Ditto.
2320
2321         * khtml/khtml_part.cpp: Tweaked incluudes.
2322         * khtml/khtmlpart_p.h: Ditto.
2323
2324         * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::canCachePage): Change to use DOM impl. rather
2325         than C++ DOM.
2326
2327         * khtml/xml/dom_docimpl.cpp:
2328         (DOMImplementationImpl::createDocumentType): Disabled the calls to the not-implemented
2329         name checks in the C++ DOM wrappers. If we add name changes, we'll want them inside the
2330         impl, not in the wrappers.
2331         (DOMImplementationImpl::createDocument): Ditto.
2332         * khtml/xml/dom_nodeimpl.cpp: (NodeImpl::checkSetPrefix): Ditto.
2333
2334         * khtml/ecma/kjs_binding.cpp:
2335         (KJS::ScriptInterpreter::wasRunByUserGesture):
2336         (KJS::KJS::ValueToVariant):
2337         (KJS::setDOMException):
2338         * khtml/ecma/kjs_binding.h:
2339         (KJS::ScriptInterpreter::setCurrentEvent):
2340         (KJS::ScriptInterpreter::getCurrentEvent):
2341         (KJS::cacheDOMObject):
2342         (KJS::DOMExceptionTranslator::DOMExceptionTranslator):
2343         (KJS::DOMExceptionTranslator::~DOMExceptionTranslator):
2344         (KJS::DOMExceptionTranslator::operator int &):
2345         (KJS::cacheGlobalObject):
2346         * khtml/ecma/kjs_css.cpp:
2347         (KJS::cssPropertyName):
2348         (KJS::isCSSPropertyName):
2349         (KJS::DOMCSSStyleDeclaration::DOMCSSStyleDeclaration):
2350         (KJS::DOMCSSStyleDeclaration::~DOMCSSStyleDeclaration):
2351         (KJS::DOMCSSStyleDeclaration::hasProperty):
2352         (KJS::DOMCSSStyleDeclaration::tryGet):
2353         (KJS::DOMCSSStyleDeclaration::tryPut):
2354         (KJS::DOMCSSStyleDeclarationProtoFunc::tryCall):
2355         (KJS::getDOMCSSStyleDeclaration):
2356         (KJS::DOMStyleSheet::~DOMStyleSheet):
2357         (KJS::DOMStyleSheet::getValueProperty):
2358         (KJS::DOMStyleSheet::tryPut):
2359         (KJS::getDOMStyleSheet):
2360         (KJS::DOMStyleSheetList::~DOMStyleSheetList):
2361         (KJS::DOMStyleSheetList::tryGet):
2362         (KJS::getDOMStyleSheetList):
2363         (KJS::DOMStyleSheetListFunc::tryCall):
2364         (KJS::DOMMediaList::DOMMediaList):
2365         (KJS::DOMMediaList::~DOMMediaList):
2366         (KJS::DOMMediaList::tryGet):
2367         (KJS::DOMMediaList::tryPut):
2368         (KJS::getDOMMediaList):
2369         (KJS::KJS::DOMMediaListProtoFunc::tryCall):
2370         (KJS::DOMCSSStyleSheet::DOMCSSStyleSheet):
2371         (KJS::DOMCSSStyleSheet::tryGet):
2372         (KJS::DOMCSSStyleSheetProtoFunc::tryCall):
2373         (KJS::DOMCSSRuleList::~DOMCSSRuleList):
2374         (KJS::DOMCSSRuleList::tryGet):
2375         (KJS::DOMCSSRuleListFunc::tryCall):
2376         (KJS::getDOMCSSRuleList):
2377         (KJS::DOMCSSRule::~DOMCSSRule):
2378         (KJS::DOMCSSRule::classInfo):
2379         (KJS::DOMCSSRule::tryGet):
2380         (KJS::DOMCSSRule::getValueProperty):
2381         (KJS::DOMCSSRule::putValue):
2382         (KJS::DOMCSSRuleFunc::tryCall):
2383         (KJS::getDOMCSSRule):
2384         (KJS::DOMCSSValue::~DOMCSSValue):
2385         (KJS::DOMCSSValue::tryGet):
2386         (KJS::DOMCSSValue::tryPut):
2387         (KJS::getDOMCSSValue):
2388         (KJS::DOMCSSPrimitiveValue::DOMCSSPrimitiveValue):
2389         (KJS::DOMCSSPrimitiveValue::tryGet):
2390         (KJS::DOMCSSPrimitiveValueProtoFunc::tryCall):
2391         (KJS::DOMCSSValueList::DOMCSSValueList):
2392         (KJS::DOMCSSValueList::tryGet):
2393         (KJS::DOMCSSValueListFunc::tryCall):
2394         (KJS::DOMRGBColor::getValueProperty):
2395         (KJS::getDOMRGBColor):
2396         (KJS::DOMRect::~DOMRect):
2397         (KJS::DOMRect::getValueProperty):
2398         (KJS::getDOMRect):
2399         (KJS::DOMCounter::~DOMCounter):
2400         (KJS::DOMCounter::getValueProperty):
2401         (KJS::getDOMCounter):
2402         * khtml/ecma/kjs_css.h:
2403         (KJS::DOMCSSStyleDeclaration::impl):
2404         (KJS::DOMStyleSheet::DOMStyleSheet):
2405         (KJS::DOMStyleSheet::impl):
2406         (KJS::DOMStyleSheetList::DOMStyleSheetList):
2407         (KJS::DOMStyleSheetList::impl):
2408         (KJS::DOMMediaList::impl):
2409         (KJS::DOMCSSStyleSheet::):
2410         (KJS::DOMCSSRuleList::DOMCSSRuleList):
2411         (KJS::DOMCSSRuleList::impl):
2412         (KJS::DOMCSSRule::DOMCSSRule):
2413         (KJS::DOMCSSRule::impl):
2414         (KJS::DOMCSSValue::DOMCSSValue):
2415         (KJS::DOMCSSValue::impl):
2416         (KJS::DOMCSSValueList::):
2417         (KJS::DOMRGBColor::DOMRGBColor):
2418         (KJS::DOMRect::DOMRect):
2419         (KJS::DOMCounter::DOMCounter):
2420         * khtml/ecma/kjs_dom.cpp:
2421         (KJS::DOMNodeListFunc::):
2422         (KJS::DOMNode::DOMNode):
2423         (KJS::DOMNode::toBoolean):
2424         (KJS::DOMNode::getValueProperty):
2425         (KJS::DOMNode::putValue):
2426         (KJS::DOMNode::toPrimitive):
2427         (KJS::DOMNode::toString):
2428         (KJS::DOMNode::setListener):
2429         (KJS::DOMNode::getListener):
2430         (KJS::DOMNodeProtoFunc::tryCall):
2431         (KJS::toNode):
2432         (KJS::DOMNodeList::~DOMNodeList):
2433         (KJS::DOMNodeList::toPrimitive):
2434         (KJS::DOMNodeList::tryGet):
2435         (KJS::DOMNodeList::tryCall):
2436         (KJS::DOMNodeListFunc::tryCall):
2437         (KJS::DOMAttr::DOMAttr):
2438         (KJS::DOMAttr::getValueProperty):
2439         (KJS::DOMAttr::putValue):
2440         (KJS::toAttr):
2441         (KJS::DOMDocument::DOMDocument):
2442         (KJS::DOMDocument::~DOMDocument):
2443         (KJS::DOMDocument::getValueProperty):
2444         (KJS::DOMDocument::putValue):
2445         (KJS::DOMDocumentProtoFunc::tryCall):
2446         (KJS::DOMElement::DOMElement):
2447         (KJS::DOMElement::tryGet):
2448         (KJS::DOMElementProtoFunc::tryCall):
2449         (KJS::toElement):
2450         (KJS::DOMDOMImplementation::DOMDOMImplementation):
2451         (KJS::DOMDOMImplementation::~DOMDOMImplementation):
2452         (KJS::DOMDOMImplementationProtoFunc::tryCall):
2453         (KJS::DOMDocumentType::DOMDocumentType):
2454         (KJS::DOMDocumentType::getValueProperty):
2455         (KJS::toDocumentType):
2456         (KJS::DOMNamedNodeMap::DOMNamedNodeMap):
2457         (KJS::DOMNamedNodeMap::~DOMNamedNodeMap):
2458         (KJS::DOMNamedNodeMap::tryGet):
2459         (KJS::DOMNamedNodeMapProtoFunc::tryCall):
2460         (KJS::DOMProcessingInstruction::DOMProcessingInstruction):
2461         (KJS::DOMProcessingInstruction::getValueProperty):
2462         (KJS::DOMProcessingInstruction::tryPut):
2463         (KJS::DOMNotation::DOMNotation):
2464         (KJS::DOMNotation::getValueProperty):
2465         (KJS::DOMEntity::DOMEntity):
2466         (KJS::DOMEntity::getValueProperty):
2467         (KJS::getDOMDocumentNode):
2468         (KJS::checkNodeSecurity):
2469         (KJS::getDOMNode):
2470         (KJS::getDOMNamedNodeMap):
2471         (KJS::getRuntimeObject):
2472         (KJS::getDOMNodeList):
2473         (KJS::getDOMDOMImplementation):
2474         (KJS::getNodeConstructor):
2475         (KJS::getDOMExceptionConstructor):
2476         (KJS::DOMNamedNodesCollection::DOMNamedNodesCollection):
2477         (KJS::DOMNamedNodesCollection::tryGet):
2478         (KJS::DOMCharacterData::DOMCharacterData):
2479         (KJS::DOMCharacterData::getValueProperty):
2480         (KJS::DOMCharacterData::tryPut):
2481         (KJS::DOMCharacterDataProtoFunc::tryCall):
2482         (KJS::DOMText::DOMText):
2483         (KJS::DOMTextProtoFunc::tryCall):
2484         * khtml/ecma/kjs_dom.h:
2485         (KJS::DOMNode::impl):
2486         (KJS::DOMNodeList::DOMNodeList):
2487         (KJS::DOMNodeList::impl):
2488         (KJS::DOMDOMImplementation::impl):
2489         (KJS::DOMNamedNodeMap::impl):
2490         * khtml/ecma/kjs_events.cpp:
2491         (KJS::JSAbstractEventListener::handleEvent):
2492         (KJS::JSLazyEventListener::handleEvent):
2493         (KJS::getNodeEventListener):
2494         (KJS::DOMEvent::DOMEvent):
2495         (KJS::DOMEvent::~DOMEvent):
2496         (KJS::DOMEvent::getValueProperty):
2497         (KJS::DOMEvent::putValue):
2498         (KJS::DOMEventProtoFunc::tryCall):
2499         (KJS::getDOMEvent):
2500         (KJS::toEvent):
2501         (KJS::DOMUIEvent::DOMUIEvent):
2502         (KJS::DOMUIEvent::getValueProperty):
2503         (KJS::DOMUIEventProtoFunc::tryCall):
2504         (KJS::DOMMouseEvent::DOMMouseEvent):
2505         (KJS::DOMMouseEvent::getValueProperty):
2506         (KJS::DOMMouseEventProtoFunc::tryCall):
2507         (KJS::DOMKeyboardEvent::DOMKeyboardEvent):
2508         (KJS::DOMKeyboardEvent::getValueProperty):
2509         (KJS::DOMKeyboardEventProtoFunc::tryCall):
2510         (KJS::DOMMutationEvent::DOMMutationEvent):
2511         (KJS::DOMMutationEvent::getValueProperty):
2512         (KJS::DOMMutationEventProtoFunc::tryCall):
2513         (KJS::DOMWheelEvent::DOMWheelEvent):
2514         (KJS::DOMWheelEvent::getValueProperty):
2515         (KJS::ClipboardProtoFunc::tryCall):
2516         * khtml/ecma/kjs_events.h:
2517         (KJS::DOMEvent::impl):
2518         (KJS::DOMUIEvent::):
2519         (KJS::DOMMouseEvent::):
2520         (KJS::DOMKeyboardEvent::):
2521         (KJS::DOMMutationEvent::):
2522         * khtml/ecma/kjs_html.cpp:
2523         (KJS::KJS::HTMLDocFunction::tryCall):
2524         (KJS::HTMLDocument::HTMLDocument):
2525         (KJS::HTMLDocument::hasProperty):
2526         (KJS::HTMLDocument::tryGet):
2527         (KJS::KJS::HTMLDocument::putValue):
2528         (KJS::KJS::HTMLElement::classInfo):
2529         (KJS::HTMLElement::HTMLElement):
2530         (KJS::KJS::HTMLElement::tryGet):
2531         (KJS::KJS::HTMLElement::implementsCall):
2532         (KJS::KJS::HTMLElement::call):
2533         (KJS::KJS::HTMLElement::getValueProperty):
2534         (KJS::KJS::HTMLElement::hasProperty):
2535         (KJS::KJS::HTMLElement::toString):
2536         (KJS::getForm):
2537         (KJS::KJS::HTMLElement::pushEventHandlerScope):
2538         (KJS::KJS::HTMLElementFunction::tryCall):
2539         (KJS::KJS::HTMLElement::tryPut):
2540         (KJS::HTMLElement::putValue):
2541         (KJS::toHTMLElement):
2542         (KJS::toHTMLTableCaptionElement):
2543         (KJS::toHTMLTableSectionElement):
2544         (KJS::HTMLCollection::HTMLCollection):
2545         (KJS::HTMLCollection::~HTMLCollection):
2546         (KJS::KJS::HTMLCollection::tryGet):
2547         (KJS::KJS::HTMLCollection::tryCall):
2548         (KJS::KJS::HTMLCollection::getNamedItems):
2549         (KJS::KJS::HTMLCollectionProtoFunc::tryCall):
2550         (KJS::HTMLSelectCollection::HTMLSelectCollection):
2551         (KJS::KJS::HTMLSelectCollection::tryGet):
2552         (KJS::KJS::HTMLSelectCollection::tryPut):
2553         (KJS::OptionConstructorImp::OptionConstructorImp):
2554         (KJS::OptionConstructorImp::construct):
2555         (KJS::ImageConstructorImp::ImageConstructorImp):
2556         (KJS::ImageConstructorImp::construct):
2557         (KJS::Image::notifyFinished):
2558         (KJS::Image::Image):
2559         (KJS::KJS::Context2DFunction::tryCall):
2560         (KJS::):
2561         (KJS::colorRefFromValue):
2562         (KJS::colorFromValue):
2563         (KJS::Context2D::putValue):
2564         (KJS::Context2D::Context2D):
2565         (KJS::Context2D::mark):
2566         (KJS::GradientFunction::tryCall):
2567         (KJS::ImagePattern::tryGet):
2568         (KJS::getHTMLCollection):
2569         (KJS::getSelectHTMLCollection):
2570         * khtml/ecma/kjs_html.h:
2571         (KJS::HTMLDocument::):
2572         (KJS::HTMLElement::):
2573         (KJS::HTMLCollection::impl):
2574         * khtml/ecma/kjs_navigator.cpp:
2575         * khtml/ecma/kjs_proxy.cpp:
2576         (KJSProxyImpl::evaluate):
2577         (KJSProxyImpl::finishedWithEvent):
2578         * khtml/ecma/kjs_proxy.h:
2579         * khtml/ecma/kjs_range.cpp:
2580         (KJS::DOMRange::DOMRange):
2581         (KJS::DOMRange::~DOMRange):
2582         (KJS::DOMRange::tryGet):
2583         (KJS::DOMRange::getValueProperty):
2584         (KJS::DOMRangeProtoFunc::tryCall):
2585         (KJS::getDOMRange):
2586         (KJS::RangeConstructor::tryGet):
2587         (KJS::getRangeConstructor):
2588         (KJS::toRange):
2589         * khtml/ecma/kjs_range.h:
2590         (KJS::DOMRange::impl):
2591         * khtml/ecma/kjs_traversal.cpp:
2592         (KJS::DOMNodeIterator::DOMNodeIterator):
2593         (KJS::DOMNodeIterator::~DOMNodeIterator):
2594         (KJS::DOMNodeIterator::getValueProperty):
2595         (KJS::DOMNodeIteratorProtoFunc::tryCall):
2596         (KJS::getDOMNodeIterator):
2597         (KJS::DOMNodeFilter::DOMNodeFilter):
2598         (KJS::DOMNodeFilter::~DOMNodeFilter):
2599         (KJS::DOMNodeFilterProtoFunc::tryCall):
2600         (KJS::getDOMNodeFilter):
2601         (KJS::toNodeFilter):
2602         (KJS::DOMTreeWalker::DOMTreeWalker):
2603         (KJS::DOMTreeWalker::~DOMTreeWalker):
2604         (KJS::DOMTreeWalker::getValueProperty):
2605         (KJS::DOMTreeWalker::tryPut):
2606         (KJS::DOMTreeWalkerProtoFunc::tryCall):
2607         (KJS::getDOMTreeWalker):
2608         (KJS::JSNodeFilterCondition::acceptNode):
2609         * khtml/ecma/kjs_traversal.h:
2610         (KJS::DOMNodeIterator::impl):
2611         (KJS::DOMNodeFilter::impl):
2612         (KJS::DOMTreeWalker::impl):
2613         * khtml/ecma/kjs_views.cpp:
2614         (KJS::DOMAbstractView::~DOMAbstractView):
2615         (KJS::DOMAbstractView::tryGet):
2616         (KJS::DOMAbstractViewFunc::tryCall):
2617         (KJS::getDOMAbstractView):
2618         (KJS::toAbstractView):
2619         * khtml/ecma/kjs_views.h:
2620         (KJS::DOMAbstractView::DOMAbstractView):
2621         (KJS::DOMAbstractView::impl):
2622         * khtml/ecma/kjs_window.cpp:
2623         (KJS::Window::get):
2624         (KJS::Window::hasProperty):
2625         (KJS::Window::put):
2626         (KJS::Window::setListener):
2627         (KJS::Window::getListener):
2628         (KJS::Window::setCurrentEvent):
2629         (KJS::WindowFunc::tryCall):
2630         (KJS::Location::put):
2631         (KJS::LocationFunc::tryCall):
2632         (KJS::Selection::get):
2633         (KJS::SelectionFunc::tryCall):
2634         * khtml/ecma/kjs_window.h:
2635         * khtml/ecma/xmlhttprequest.cpp:
2636         (KJS::XMLHttpRequestConstructorImp::XMLHttpRequestConstructorImp):
2637         (KJS::XMLHttpRequestConstructorImp::~XMLHttpRequestConstructorImp):
2638         (KJS::XMLHttpRequestConstructorImp::construct):
2639         (KJS::XMLHttpRequest::getValueProperty):
2640         (KJS::XMLHttpRequest::XMLHttpRequest):
2641         (KJS::XMLHttpRequest::changeState):
2642         (KJS::XMLHttpRequest::open):
2643         (KJS::XMLHttpRequestProtoFunc::tryCall):
2644         * khtml/ecma/xmlhttprequest.h:
2645         * khtml/ecma/xmlserializer.cpp:
2646         (KJS::XMLSerializerProtoFunc::tryCall):
2647         * khtml/ecma/xmlserializer.h:
2648         * kwq/DOMInternal.mm:
2649         (-[WebScriptObject _initializeScriptDOMNodeImp]):
2650         * kwq/DOMUtility.mm:
2651         (KJS::ScriptInterpreter::createObjcInstanceForValue):
2652
2653 2005-05-11  David Hyatt  <hyatt@apple.com>
2654
2655         Improve the display of apple.com.  innerWidth and innerHeight refer to the size of the visible view and
2656         so they do not need to do a layout in order to yield correct values from JS.  Removing this stops an
2657         early layout and paint before the apple.com images are typically loaded.
2658
2659         This is an improvement of the fix for wired.com's FOUC.  For that bug I eliminated the need to ignore pending
2660         stylesheets, but now I'm going further and just eliminating the layout all together.  This means that the old
2661         updateLayout function can be reverted to how it was before the wired.com fix.
2662         
2663         Reviewed by john
2664
2665         * khtml/ecma/kjs_window.cpp:
2666         (Window::get):
2667         (Window::updateLayout):
2668         * khtml/ecma/kjs_window.h:
2669
2670 2005-05-11  Maciej Stachowiak  <mjs@apple.com>
2671
2672         Reviewed by Kevin.
2673
2674         - split some more individual classes out of htmlediting.cpp
2675         (CompositeEditcommand, AppendnodeCommand, ApplyStyleCommand)
2676
2677         Also moves StyleChange directly into ApplyStyleCommand
2678         implementation file, it doesn't need to be in a header at all.
2679         
2680         * WebCore.pbproj/project.pbxproj:
2681         * khtml/editing/append_node_command.cpp: Added.
2682         * khtml/editing/append_node_command.h: Added.
2683         * khtml/editing/apply_style_command.cpp: Added.
2684         * khtml/editing/apply_style_command.h: Added.
2685         * khtml/editing/composite_edit_command.cpp: Added.
2686         * khtml/editing/composite_edit_command.h: Added.
2687         * khtml/editing/edit_command.cpp: Minor clean-ups.
2688         * khtml/editing/edit_command.h:
2689         * khtml/editing/htmlediting.cpp:
2690         * khtml/editing/htmlediting.h:
2691
2692 2005-05-11  Adele Peterson  <adele@apple.com>
2693
2694         Reviewed by Darin.
2695
2696         fix for <rdar://problem/4061979> crash in DOM::ElementImpl::setAttribute at www.nitto-kohki.co.jp
2697
2698         * khtml/html/html_imageimpl.cpp: (HTMLImageLoader::updateFromElement): added a nil check for the document
2699         * khtml/xml/dom_nodeimpl.h: (DOM::NodeImpl::inDocument): added check for document in case the document has been destroyed before the node has been removed.  A lot of code already assumes that if inDocument returns true, a document exists.
2700  
2701         * layout-tests/fast/events/onload-re-entry.html: removed alert.
2702         * layout-tests/fast/events/onload-re-entry-expected.txt: updated.
2703         * layout-tests/fast/dom/attr_dead_doc-expected.txt: Added.
2704         * layout-tests/fast/dom/attr_dead_doc.html: Added.
2705         * layout-tests/fast/dom/resources/apple.gif: Added.
2706         * layout-tests/fast/dom/resources/mozilla.gif: Added.
2707         * layout-tests/fast/dom/resources/top.html: Added.
2708
2709 2005-05-10  Maciej Stachowiak  <mjs@apple.com>
2710
2711         Reviewed by Kevin.
2712
2713         - start on splitting htmlediting.cpp into smaller files - pull
2714         EditCommand and EditCommandPtr out.
2715
2716         * WebCore.pbproj/project.pbxproj:
2717         * khtml/editing/edit_command.cpp: Added.
2718         * khtml/editing/edit_command.h: Added.
2719         * khtml/editing/htmlediting.cpp: Took EditCommand and EditCommandPtr out.
2720         * khtml/editing/htmlediting.h: Ditto.
2721
2722 2005-05-10  David Hyatt  <hyatt@apple.com>
2723
2724         Refactor the DOM so that the concept of class/style/id is no longer unique to HTML elements.  This paves the way
2725         for SVG and MathML elements to also support these capabilities.  In addition the concept of presentational
2726         attributes has also been factored out.
2727         
2728         Reviewed by mjs
2729
2730         * khtml/css/css_ruleimpl.cpp:
2731         (CSSStyleRuleImpl::setDeclaration):
2732         * khtml/css/cssstyleselector.cpp:
2733         (khtml::parseUASheet):
2734         (khtml::CSSStyleSelector::loadDefaultStyle):
2735         (khtml::CSSStyleSelector::initElementAndPseudoState):
2736         (khtml::CSSStyleSelector::canShareStyleWithElement):
2737         (khtml::CSSStyleSelector::locateSharedStyle):
2738         (khtml::CSSStyleSelector::styleForElement):
2739         (khtml::CSSStyleSelector::checkOneSelector):
2740         * khtml/css/cssstyleselector.h:
2741         * khtml/html/html_baseimpl.cpp:
2742         (HTMLBodyElementImpl::parseMappedAttribute):
2743         (HTMLFrameElementImpl::parseMappedAttribute):
2744         (HTMLFrameSetElementImpl::parseMappedAttribute):
2745         (HTMLIFrameElementImpl::parseMappedAttribute):
2746         * khtml/html/html_baseimpl.h:
2747         * khtml/html/html_blockimpl.cpp:
2748         (HTMLDivElementImpl::parseMappedAttribute):
2749         (HTMLHRElementImpl::parseMappedAttribute):
2750         (HTMLParagraphElementImpl::parseMappedAttribute):
2751         (HTMLMarqueeElementImpl::parseMappedAttribute):
2752         * khtml/html/html_blockimpl.h:
2753         * khtml/html/html_canvasimpl.cpp:
2754         (HTMLCanvasElementImpl::parseMappedAttribute):
2755         * khtml/html/html_canvasimpl.h:
2756         * khtml/html/html_elementimpl.cpp:
2757         (HTMLElementImpl::HTMLElementImpl):
2758         (HTMLElementImpl::~HTMLElementImpl):
2759         (HTMLElementImpl::mapToEntry):
2760         (HTMLElementImpl::parseMappedAttribute):
2761         (HTMLElementImpl::addHTMLAlignment):
2762         (HTMLElementImpl::setContentEditable):
2763         (HTMLElementImpl::toString):
2764         * khtml/html/html_elementimpl.h:
2765         * khtml/html/html_formimpl.cpp:
2766         (DOM::HTMLFormElementImpl::parseMappedAttribute):
2767         (DOM::HTMLGenericFormElementImpl::parseMappedAttribute):
2768         (DOM::HTMLButtonElementImpl::parseMappedAttribute):
2769         (DOM::HTMLInputElementImpl::setType):
2770         (DOM::HTMLInputElementImpl::parseMappedAttribute):
2771         (DOM::HTMLLabelElementImpl::parseMappedAttribute):
2772         (DOM::HTMLSelectElementImpl::parseMappedAttribute):
2773         (DOM::HTMLKeygenElementImpl::parseMappedAttribute):
2774         (DOM::HTMLOptGroupElementImpl::parseMappedAttribute):
2775         (DOM::HTMLOptionElementImpl::parseMappedAttribute):
2776         (DOM::HTMLTextAreaElementImpl::parseMappedAttribute):
2777         (DOM::HTMLIsIndexElementImpl::parseMappedAttribute):
2778         * khtml/html/html_formimpl.h:
2779         * khtml/html/html_headimpl.cpp:
2780         (HTMLBaseElementImpl::parseMappedAttribute):
2781         (HTMLLinkElementImpl::parseMappedAttribute):
2782         (HTMLMetaElementImpl::parseMappedAttribute):
2783         (HTMLStyleElementImpl::parseMappedAttribute):
2784         * khtml/html/html_headimpl.h:
2785         * khtml/html/html_imageimpl.cpp:
2786         (HTMLImageElementImpl::parseMappedAttribute):
2787         (HTMLMapElementImpl::parseMappedAttribute):
2788         (HTMLAreaElementImpl::parseMappedAttribute):
2789         * khtml/html/html_imageimpl.h:
2790         * khtml/html/html_inlineimpl.cpp:
2791         (DOM::HTMLAnchorElementImpl::parseMappedAttribute):
2792         (DOM::HTMLBRElementImpl::parseMappedAttribute):
2793         (DOM::HTMLFontElementImpl::parseMappedAttribute):
2794         * khtml/html/html_inlineimpl.h:
2795         * khtml/html/html_listimpl.cpp:
2796         (DOM::HTMLUListElementImpl::parseMappedAttribute):
2797         (DOM::HTMLOListElementImpl::parseMappedAttribute):
2798         (DOM::HTMLLIElementImpl::parseMappedAttribute):
2799         * khtml/html/html_listimpl.h:
2800         * khtml/html/html_objectimpl.cpp:
2801         (DOM::HTMLAppletElementImpl::parseMappedAttribute):
2802         (DOM::HTMLEmbedElementImpl::parseMappedAttribute):
2803         (DOM::HTMLObjectElementImpl::parseMappedAttribute):
2804         (DOM::HTMLParamElementImpl::parseMappedAttribute):
2805         * khtml/html/html_objectimpl.h:
2806         * khtml/html/html_tableimpl.cpp:
2807         (DOM::HTMLTableElementImpl::parseMappedAttribute):
2808         (DOM::HTMLTableElementImpl::additionalAttributeStyleDecl):
2809         (DOM::HTMLTableElementImpl::getSharedCellDecl):
2810         (DOM::HTMLTablePartElementImpl::parseMappedAttribute):
2811         (DOM::HTMLTableCellElementImpl::parseMappedAttribute):
2812         (DOM::HTMLTableColElementImpl::parseMappedAttribute):
2813         (DOM::HTMLTableCaptionElementImpl::parseMappedAttribute):
2814         * khtml/html/html_tableimpl.h:
2815         * khtml/html/htmltokenizer.h:
2816         (khtml::Token::addAttribute):
2817         * khtml/misc/htmlattrs.in:
2818         * khtml/misc/htmltags.in:
2819         * khtml/xml/dom_docimpl.cpp:
2820         (DocumentImpl::createAttribute):
2821         (DocumentImpl::createElementNS):
2822         (DocumentImpl::createHTMLElement):
2823         * khtml/xml/dom_elementimpl.cpp:
2824         (XMLElementImpl::cloneNode):
2825         (NamedAttrMapImpl::isMappedAttributeMap):
2826         (CSSMappedAttributeDeclarationImpl::~CSSMappedAttributeDeclarationImpl):
2827         (StyledElementImpl::getMappedAttributeDecl):
2828         (StyledElementImpl::setMappedAttributeDecl):
2829         (StyledElementImpl::removeMappedAttributeDecl):
2830         (StyledElementImpl::invalidateStyleAttribute):
2831         (StyledElementImpl::updateStyleAttributeIfNeeded):
2832         (MappedAttributeImpl::~MappedAttributeImpl):
2833         (MappedAttributeImpl::clone):
2834         (m_mappedAttributeCount):
2835         (NamedMappedAttrMapImpl::clearAttributes):
2836         (NamedMappedAttrMapImpl::isMappedAttributeMap):
2837         (NamedMappedAttrMapImpl::declCount):
2838         (NamedMappedAttrMapImpl::mapsEquivalent):
2839         (NamedMappedAttrMapImpl::parseClassAttribute):
2840         (StyledElementImpl::StyledElementImpl):
2841         (StyledElementImpl::~StyledElementImpl):
2842         (StyledElementImpl::createAttribute):
2843         (StyledElementImpl::createInlineStyleDecl):
2844         (StyledElementImpl::destroyInlineStyleDecl):
2845         (StyledElementImpl::attributeChanged):
2846         (StyledElementImpl::mapToEntry):
2847         (StyledElementImpl::parseMappedAttribute):
2848         (StyledElementImpl::createAttributeMap):
2849         (StyledElementImpl::getInlineStyleDecl):
2850         (StyledElementImpl::style):
2851         (StyledElementImpl::additionalAttributeStyleDecl):
2852         (StyledElementImpl::getClassList):
2853         (isHexDigit):
2854         (toHex):
2855         (StyledElementImpl::addCSSProperty):
2856         (StyledElementImpl::addCSSStringProperty):
2857         (StyledElementImpl::addCSSImageProperty):
2858         (StyledElementImpl::addCSSLength):
2859         (StyledElementImpl::addCSSColor):
2860         (StyledElementImpl::createMappedDecl):
2861         * khtml/xml/dom_elementimpl.h:
2862         (DOM::):
2863         (DOM::CSSMappedAttributeDeclarationImpl::CSSMappedAttributeDeclarationImpl):
2864         (DOM::CSSMappedAttributeDeclarationImpl::setMappedState):
2865         (DOM::MappedAttributeImpl::MappedAttributeImpl):
2866         (DOM::MappedAttributeImpl::decl):
2867         (DOM::MappedAttributeImpl::setDecl):
2868         (DOM::NamedMappedAttrMapImpl::getClassList):
2869         (DOM::NamedMappedAttrMapImpl::hasMappedAttributes):
2870         (DOM::NamedMappedAttrMapImpl::declRemoved):
2871         (DOM::NamedMappedAttrMapImpl::declAdded):
2872         (DOM::NamedMappedAttrMapImpl::attributeItem):
2873         (DOM::StyledElementImpl::isStyledElement):
2874         (DOM::StyledElementImpl::hasMappedAttributes):
2875         (DOM::StyledElementImpl::mappedAttributes):
2876         (DOM::StyledElementImpl::isMappedAttribute):
2877         (DOM::StyledElementImpl::inlineStyleDecl):
2878         * khtml/xml/dom_nodeimpl.h:
2879         (DOM::NodeImpl::isStyledElement):
2880
2881 2005-05-10  Darin Adler  <darin@apple.com>
2882
2883         Reviewed by Dave Hyatt.
2884         No new layout tests needed.
2885
2886         - remove all remaining uses of QMIN/QMAX and KMIN/KMAX.
2887
2888         * kwq/KWQDef.h: Remove the macros.
2889
2890         Remove all use of the macros (and fix a few compile errors by changing the types of
2891         some integer and floating point constants).
2892
2893         * khtml/css/cssparser.cpp:
2894         (CSSParser::parseColorFromValue):
2895         * khtml/css/cssstyleselector.cpp:
2896         (khtml::CSSStyleSelector::getComputedSizeFromSpecifiedSize):
2897         * khtml/html/html_elementimpl.cpp:
2898         (HTMLElementImpl::addHTMLColor):
2899         * khtml/html/html_formimpl.cpp:
2900         (DOM::HTMLSelectElementImpl::parseHTMLAttribute):
2901         * khtml/html/htmltokenizer.cpp:
2902         (khtml::HTMLTokenizer::parseComment):
2903         * khtml/rendering/render_block.cpp:
2904         (khtml::RenderBlock::nearestFloatBottom):
2905         (khtml::RenderBlock::calcMinMaxWidth):
2906         * khtml/rendering/render_flow.cpp:
2907         (RenderFlow::paintOutlineForLine):
2908         * khtml/rendering/render_form.cpp:
2909         (RenderLineEdit::calcMinMaxWidth):
2910         (RenderFieldset::layoutLegend):
2911         (RenderFileButton::calcMinMaxWidth):
2912         (RenderSelect::layout):
2913         (RenderTextArea::calcMinMaxWidth):
2914         * khtml/rendering/render_object.cpp:
2915         (RenderObject::drawBorder):
2916         * khtml/rendering/render_replaced.cpp:
2917         (RenderWidget::resizeWidget):
2918         * khtml/rendering/render_table.cpp:
2919         (RenderTableSection::layoutRows):
2920         * khtml/rendering/table_layout.cpp:
2921         (AutoTableLayout::recalcColumn):
2922         (AutoTableLayout::calcEffectiveWidth):
2923
2924 2005-05-10  Darin Adler  <darin@apple.com>
2925
2926         Reviewed by Chris Blumenberg.
2927
2928         - next pass of moving code from C++ DOM wrappers into the DOM impl. classes
2929           (this step adds still more member functions missing from the DOM impl. and
2930            changes some of the C++ and Objective-C DOM to call the new ones; also
2931            changes various places that use the C++ DOM to use the DOM impl. instead)
2932
2933         * khtml/css/css_computedstyle.cpp:
2934         (DOM::CSSComputedStyleDeclarationImpl::getPropertyCSSValue):
2935         * khtml/css/css_computedstyle.h:
2936         * khtml/css/css_stylesheetimpl.cpp:
2937         (CSSStyleSheetImpl::cssRules):
2938         * khtml/css/css_stylesheetimpl.h:
2939         * khtml/css/css_valueimpl.cpp:
2940         (DOM::CSSStyleDeclarationImpl::getPropertyCSSValue):
2941         (DOM::CSSStyleDeclarationImpl::getPropertyValue):
2942         (DOM::CSSStyleDeclarationImpl::getPropertyPriority):
2943         (DOM::CSSStyleDeclarationImpl::setProperty):
2944         (DOM::CSSStyleDeclarationImpl::removeProperty):
2945         (DOM::CSSMutableStyleDeclarationImpl::getPropertyValue):
2946         (DOM::CSSPrimitiveValueImpl::CSSPrimitiveValueImpl):
2947         (DOM::operator==):
2948         (DOM::CSSStyleDeclarationImpl::propertyID):
2949         * khtml/css/css_valueimpl.h:
2950         (DOM::CSSValueImpl::setCssText):
2951         (DOM::CSSPrimitiveValueImpl::getDashboardRegionValue):
2952         * khtml/dom/css_rule.cpp:
2953         * khtml/dom/css_rule.h:
2954         * khtml/dom/css_stylesheet.h:
2955         (DOM::CSSException::):
2956         * khtml/dom/css_value.cpp:
2957         (DOM::CSSStyleDeclaration::getPropertyValue):
2958         (DOM::CSSStyleDeclaration::getPropertyCSSValue):
2959         (DOM::CSSStyleDeclaration::removeProperty):
2960         (DOM::CSSStyleDeclaration::getPropertyPriority):
2961         (DOM::CSSStyleDeclaration::setProperty):
2962         * khtml/dom/css_value.h:
2963         * khtml/dom/dom2_events.cpp:
2964         (EventListener::handleEvent):
2965         * khtml/dom/dom2_events.h:
2966         * khtml/dom/dom2_traversal.h:
2967         * khtml/dom/dom_doc.cpp:
2968         (DOM::DOMImplementation::createHTMLDocument):
2969         (DOM::DOMImplementation::createCSSStyleSheet):
2970         (DOM::Document::doctype):
2971         (DOM::Document::createAttribute):
2972         (DOM::Document::createAttributeNS):
2973         (DOM::Document::queryCommandValue):
2974         (DOM::Document::handle):
2975         * khtml/dom/dom_doc.h:
2976         * khtml/dom/dom_element.cpp:
2977         (Attr::name):
2978         (Attr::value):
2979         (Element::getAttribute):
2980         (Element::setAttribute):
2981         (Element::removeAttribute):
2982         (Element::getAttributeNode):
2983         (Element::setAttributeNode):
2984         (Element::removeAttributeNode):
2985         (Element::getElementsByTagName):
2986         (Element::getElementsByTagNameNS):
2987         (Element::getAttributeNS):
2988         (Element::setAttributeNS):
2989         (Element::removeAttributeNS):
2990         (Element::getAttributeNodeNS):
2991         (Element::setAttributeNodeNS):
2992         (Element::hasAttribute):
2993         (Element::hasAttributeNS):
2994         (Element::style):
2995         * khtml/dom/dom_exception.h:
2996         * khtml/dom/dom_misc.cpp:
2997         (DOM::DomShared::deleteMe):
2998         * khtml/dom/dom_misc.h:
2999         (DOM::DomShared::deleteMe):
3000         * khtml/dom/dom_node.cpp:
3001         (NamedNodeMap::getNamedItemNS):
3002         (NamedNodeMap::setNamedItemNS):
3003         (NamedNodeMap::removeNamedItemNS):
3004         (Node::ownerDocument):
3005         (Node::hasAttributes):
3006         (Node::isSupported):
3007         (Node::addEventListener):
3008         (Node::removeEventListener):
3009         * khtml/dom/dom_node.h:
3010         * khtml/dom/html_document.cpp:
3011         (HTMLDocument::setTitle):
3012         (HTMLDocument::completeURL):
3013         (HTMLDocument::getElementsByName):
3014         * khtml/dom/html_element.cpp:
3015         (HTMLElement::setInnerHTML):
3016         (HTMLElement::setInnerText):
3017         (HTMLElement::setOuterHTML):
3018         (HTMLElement::setOuterText):
3019         * khtml/dom/html_form.cpp:
3020         (HTMLLabelElement::form):
3021         (HTMLSelectElement::setValue):
3022         (HTMLSelectElement::options):
3023         (HTMLOptionElement::setValue):
3024         * khtml/dom/html_inline.cpp:
3025         (HTMLAnchorElement::accessKey):
3026         (HTMLAnchorElement::setAccessKey):
3027         (HTMLAnchorElement::charset):
3028         (HTMLAnchorElement::setCharset):
3029         (HTMLAnchorElement::coords):
3030         (HTMLAnchorElement::setCoords):
3031         (HTMLAnchorElement::href):
3032         (HTMLAnchorElement::setHref):
3033         (HTMLAnchorElement::hreflang):
3034         (HTMLAnchorElement::setHreflang):
3035         (HTMLAnchorElement::name):
3036         (HTMLAnchorElement::setName):
3037         (HTMLAnchorElement::rel):
3038         (HTMLAnchorElement::setRel):
3039         (HTMLAnchorElement::rev):
3040         (HTMLAnchorElement::setRev):
3041         (HTMLAnchorElement::shape):
3042         (HTMLAnchorElement::setShape):
3043         (HTMLAnchorElement::tabIndex):
3044         (HTMLAnchorElement::setTabIndex):
3045         (HTMLAnchorElement::target):
3046         (HTMLAnchorElement::setTarget):
3047         (HTMLAnchorElement::type):
3048         (HTMLAnchorElement::setType):
3049         (HTMLAnchorElement::blur):
3050         (HTMLAnchorElement::focus):
3051         (HTMLBRElement::clear):
3052         (HTMLBRElement::setClear):
3053         (HTMLFontElement::color):
3054         (HTMLFontElement::setColor):
3055         (HTMLFontElement::face):
3056         (HTMLFontElement::setFace):
3057         (HTMLFontElement::size):
3058         (HTMLFontElement::setSize):
3059         (HTMLModElement::cite):
3060         (HTMLModElement::setCite):
3061         (HTMLModElement::dateTime):
3062         (HTMLModElement::setDateTime):
3063         (HTMLQuoteElement::cite):
3064         (HTMLQuoteElement::setCite):
3065         * khtml/dom/html_misc.cpp:
3066         (HTMLCollection::HTMLCollection):
3067         (HTMLCollection::base):
3068         (HTMLCollection::namedItems):
3069         * khtml/dom/html_misc.h:
3070         * khtml/editing/htmlediting.cpp:
3071         * khtml/editing/selection.cpp:
3072         * khtml/html/html_documentimpl.cpp:
3073         (DOM::HTMLDocumentImpl::determineParseMode):
3074         (DOM::HTMLDocumentImpl::doctype):
3075         * khtml/html/html_documentimpl.h:
3076         * khtml/html/html_elementimpl.cpp:
3077         (HTMLElementImpl::setInnerHTML):
3078         (HTMLElementImpl::setOuterHTML):
3079         (HTMLElementImpl::setInnerText):
3080         (HTMLElementImpl::setOuterText):
3081         (HTMLElementImpl::style):
3082         (HTMLElementImpl::idDOM):
3083         (HTMLElementImpl::setId):
3084         (HTMLElementImpl::title):
3085         (HTMLElementImpl::setTitle):
3086         (HTMLElementImpl::lang):
3087         (HTMLElementImpl::setLang):
3088         (HTMLElementImpl::dir):
3089         (HTMLElementImpl::setDir):
3090         (HTMLElementImpl::className):
3091         (HTMLElementImpl::setClassName):
3092         (HTMLElementImpl::children):
3093         (HTMLGenericElementImpl::HTMLGenericElementImpl):
3094         (HTMLGenericElementImpl::id):
3095         * khtml/html/html_elementimpl.h:
3096         (DOM::HTMLElementImpl::isGenericFormElement):
3097         * khtml/html/html_formimpl.cpp:
3098         (DOM::HTMLFormElementImpl::parseEnctype):
3099         (DOM::HTMLFormElementImpl::parseHTMLAttribute):
3100         (DOM::HTMLFormElementImpl::elements):
3101         (DOM::HTMLFormElementImpl::name):
3102         (DOM::HTMLFormElementImpl::setName):
3103         (DOM::HTMLFormElementImpl::acceptCharset):
3104         (DOM::HTMLFormElementImpl::setAcceptCharset):
3105         (DOM::HTMLFormElementImpl::action):
3106         (DOM::HTMLFormElementImpl::setAction):
3107         (DOM::HTMLFormElementImpl::setEnctype):
3108         (DOM::HTMLFormElementImpl::method):
3109         (DOM::HTMLFormElementImpl::setMethod):
3110         (DOM::HTMLFormElementImpl::target):
3111         (DOM::HTMLFormElementImpl::setTarget):
3112         (DOM::HTMLGenericFormElementImpl::HTMLGenericFormElementImpl):
3113         (DOM::HTMLGenericFormElementImpl::~HTMLGenericFormElementImpl):
3114         (DOM::HTMLGenericFormElementImpl::parseHTMLAttribute):
3115         (DOM::HTMLGenericFormElementImpl::name):
3116         (DOM::HTMLGenericFormElementImpl::setName):
3117         (DOM::HTMLGenericFormElementImpl::setOverrideName):
3118         (DOM::HTMLGenericFormElementImpl::setDisabled):
3119         (DOM::HTMLGenericFormElementImpl::setReadOnly):
3120         (DOM::HTMLGenericFormElementImpl::tabIndex):
3121         (DOM::HTMLGenericFormElementImpl::setTabIndex):
3122         (DOM::HTMLButtonElementImpl::accessKey):
3123         (DOM::HTMLButtonElementImpl::setAccessKey):
3124         (DOM::HTMLButtonElementImpl::value):
3125         (DOM::HTMLButtonElementImpl::setValue):
3126         (DOM::HTMLInputElementImpl::HTMLInputElementImpl):
3127         (DOM::HTMLInputElementImpl::parseHTMLAttribute):
3128         (DOM::HTMLInputElementImpl::defaultValue):
3129         (DOM::HTMLInputElementImpl::setDefaultValue):
3130         (DOM::HTMLInputElementImpl::defaultChecked):
3131         (DOM::HTMLInputElementImpl::setDefaultChecked):
3132         (DOM::HTMLInputElementImpl::accept):
3133         (DOM::HTMLInputElementImpl::setAccept):
3134         (DOM::HTMLInputElementImpl::accessKey):
3135         (DOM::HTMLInputElementImpl::setAccessKey):
3136         (DOM::HTMLInputElementImpl::align):
3137         (DOM::HTMLInputElementImpl::setAlign):
3138         (DOM::HTMLInputElementImpl::alt):
3139         (DOM::HTMLInputElementImpl::setAlt):
3140         (DOM::HTMLInputElementImpl::setMaxLength):
3141         (DOM::HTMLInputElementImpl::sizeDOM):
3142         (DOM::HTMLInputElementImpl::setSize):
3143         (DOM::HTMLInputElementImpl::src):
3144         (DOM::HTMLInputElementImpl::setSrc):
3145         (DOM::HTMLInputElementImpl::useMap):
3146         (DOM::HTMLInputElementImpl::setUseMap):
3147         (DOM::HTMLLabelElementImpl::form):
3148         (DOM::HTMLLabelElementImpl::accessKey):
3149         (DOM::HTMLLabelElementImpl::setAccessKey):
3150         (DOM::HTMLLabelElementImpl::htmlFor):
3151         (DOM::HTMLLabelElementImpl::setHtmlFor):
3152         (DOM::HTMLLegendElementImpl::accessKey):
3153         (DOM::HTMLLegendElementImpl::setAccessKey):
3154         (DOM::HTMLLegendElementImpl::align):
3155         (DOM::HTMLLegendElementImpl::setAlign):
3156         (DOM::HTMLSelectElementImpl::setValue):
3157         (DOM::HTMLSelectElementImpl::optionsHTMLCollection):
3158         (DOM::HTMLSelectElementImpl::setMultiple):
3159         (DOM::HTMLSelectElementImpl::setSize):
3160         (DOM::HTMLOptGroupElementImpl::label):
3161         (DOM::HTMLOptGroupElementImpl::setLabel):
3162         (DOM::HTMLOptionElementImpl::setText):
3163         (DOM::HTMLOptionElementImpl::setIndex):
3164         (DOM::HTMLOptionElementImpl::setValue):
3165         (DOM::HTMLOptionElementImpl::defaultSelected):
3166         (DOM::HTMLOptionElementImpl::setDefaultSelected):
3167         (DOM::HTMLOptionElementImpl::label):
3168         (DOM::HTMLOptionElementImpl::setLabel):
3169         (DOM::HTMLTextAreaElementImpl::accessKey):
3170         (DOM::HTMLTextAreaElementImpl::setAccessKey):
3171         (DOM::HTMLTextAreaElementImpl::setCols):
3172         (DOM::HTMLTextAreaElementImpl::setRows):
3173         (DOM::HTMLIsIndexElementImpl::HTMLIsIndexElementImpl):
3174         (DOM::HTMLIsIndexElementImpl::parseHTMLAttribute):
3175         (DOM::HTMLIsIndexElementImpl::prompt):
3176         (DOM::HTMLIsIndexElementImpl::setPrompt):
3177         * khtml/html/html_formimpl.h:
3178         * khtml/html/html_headimpl.cpp:
3179         (HTMLBaseElementImpl::setHref):
3180         (HTMLBaseElementImpl::setTarget):
3181         (HTMLLinkElementImpl::disabled):
3182         (HTMLLinkElementImpl::setDisabled):
3183         (HTMLLinkElementImpl::charset):
3184         (HTMLLinkElementImpl::setCharset):
3185         (HTMLLinkElementImpl::href):
3186         (HTMLLinkElementImpl::setHref):
3187         (HTMLLinkElementImpl::hreflang):
3188         (HTMLLinkElementImpl::setHreflang):
3189         (HTMLLinkElementImpl::media):
3190         (HTMLLinkElementImpl::setMedia):
3191         (HTMLLinkElementImpl::rel):
3192         (HTMLLinkElementImpl::setRel):
3193         (HTMLLinkElementImpl::rev):
3194         (HTMLLinkElementImpl::setRev):
3195         (HTMLLinkElementImpl::target):
3196         (HTMLLinkElementImpl::setTarget):
3197         (HTMLLinkElementImpl::type):
3198         (HTMLLinkElementImpl::setType):
3199         (HTMLMetaElementImpl::content):
3200         (HTMLMetaElementImpl::setContent):
3201         (HTMLMetaElementImpl::httpEquiv):
3202         (HTMLMetaElementImpl::setHttpEquiv):
3203         (HTMLMetaElementImpl::name):
3204         (HTMLMetaElementImpl::setName):
3205         (HTMLMetaElementImpl::scheme):
3206         (HTMLMetaElementImpl::setScheme):
3207         (HTMLScriptElementImpl::id):
3208         (HTMLScriptElementImpl::isURLAttribute):
3209         (HTMLScriptElementImpl::insertedIntoDocument):
3210         (HTMLScriptElementImpl::notifyFinished):
3211         (HTMLScriptElementImpl::text):
3212         (HTMLScriptElementImpl::setText):
3213         (HTMLScriptElementImpl::htmlFor):
3214         (HTMLScriptElementImpl::setHtmlFor):
3215         (HTMLScriptElementImpl::event):
3216         (HTMLScriptElementImpl::setEvent):
3217         (HTMLScriptElementImpl::charset):
3218         (HTMLScriptElementImpl::setCharset):
3219         (HTMLScriptElementImpl::defer):
3220         (HTMLScriptElementImpl::setDefer):
3221         (HTMLScriptElementImpl::src):
3222         (HTMLScriptElementImpl::setSrc):
3223         (HTMLScriptElementImpl::type):
3224         (HTMLScriptElementImpl::setType):
3225         (HTMLStyleElementImpl::disabled):
3226         (HTMLStyleElementImpl::setDisabled):
3227         (HTMLStyleElementImpl::media):
3228         (HTMLStyleElementImpl::setMedia):
3229         (HTMLStyleElementImpl::type):
3230         (HTMLStyleElementImpl::setType):
3231         (HTMLTitleElementImpl::insertedIntoDocument):
3232         (HTMLTitleElementImpl::childrenChanged):
3233         (HTMLTitleElementImpl::text):
3234         (HTMLTitleElementImpl::setText):
3235         * khtml/html/html_headimpl.h:
3236         * khtml/html/html_miscimpl.cpp:
3237         (DOM::HTMLBaseFontElementImpl::id):
3238         (DOM::HTMLBaseFontElementImpl::color):
3239         (DOM::HTMLBaseFontElementImpl::setColor):
3240         (DOM::HTMLBaseFontElementImpl::face):
3241         (DOM::HTMLBaseFontElementImpl::setFace):
3242         (DOM::HTMLBaseFontElementImpl::size):
3243         (DOM::HTMLBaseFontElementImpl::setSize):
3244         (DOM::HTMLCollectionImpl::HTMLCollectionImpl):
3245         (DOM::HTMLCollectionImpl::~HTMLCollectionImpl):
3246         (DOM::HTMLCollectionImpl::resetCollectionInfo):
3247         (DOM::HTMLCollectionImpl::traverseNextItem):
3248         (DOM::HTMLCollectionImpl::calcLength):
3249         (DOM::HTMLCollectionImpl::item):
3250         (DOM::HTMLCollectionImpl::namedItem):
3251         (DOM::HTMLCollectionImpl::updateNameCache):
3252         (DOM::HTMLCollectionImpl::namedItems):
3253         (DOM::HTMLCollectionImpl::nextNamedItem):
3254         (DOM::HTMLFormCollectionImpl::HTMLFormCollectionImpl):
3255         (DOM::HTMLFormCollectionImpl::calcLength):
3256         (DOM::HTMLFormCollectionImpl::item):
3257         (DOM::HTMLFormCollectionImpl::getNamedFormItem):
3258         (DOM::HTMLFormCollectionImpl::nextNamedItemInternal):
3259         (DOM::HTMLFormCollectionImpl::namedItem):
3260         (DOM::HTMLFormCollectionImpl::updateNameCache):
3261         * khtml/html/html_miscimpl.h:
3262         (DOM::HTMLCollectionImpl::base):
3263         * khtml/html/htmlparser.cpp:
3264         (KHTMLParser::parseToken):
3265         (KHTMLParser::insertNode):
3266         * khtml/html/htmltokenizer.cpp:
3267         (khtml::HTMLTokenizer::scriptExecution):
3268         * khtml/khtml_events.cpp:
3269         (khtml::MouseEvent::MouseEvent):
3270         (khtml::MouseEvent::offset):
3271         * khtml/khtml_events.h:
3272         (khtml::MouseEvent::innerNode):
3273         (khtml::MousePressEvent::MousePressEvent):
3274         (khtml::MouseDoubleClickEvent::MouseDoubleClickEvent):
3275         (khtml::MouseMoveEvent::MouseMoveEvent):
3276         (khtml::MouseReleaseEvent::MouseReleaseEvent):
3277         * khtml/khtml_part.cpp:
3278         (KHTMLPart::closeURL):
3279         (KHTMLPart::executeScript):
3280         (KHTMLPart::scheduleScript):
3281         (KHTMLPart::executeScheduledScript):
3282         (KHTMLPart::clear):
3283         (KHTMLPart::selectClosestWordFromMouseEvent):
3284         (KHTMLPart::handleMousePressEventDoubleClick):
3285         (KHTMLPart::handleMousePressEventTripleClick):
3286         (KHTMLPart::handleMousePressEventSingleClick):
3287         (KHTMLPart::khtmlMousePressEvent):
3288         (KHTMLPart::handleMouseMoveEventDrag):
3289         (KHTMLPart::handleMouseMoveEventOver):
3290         (KHTMLPart::handleMouseMoveEventSelection):
3291         (KHTMLPart::khtmlMouseReleaseEvent):
3292         (KHTMLPart::selectionHasStyle):
3293         (KHTMLPart::selectionStartHasStyle):
3294         * khtml/khtml_part.h:
3295         * khtml/khtmlpart_p.h:
3296         * khtml/khtmlview.cpp:
3297         (KHTMLViewPrivate::reset):
3298         (KHTMLView::viewportMousePressEvent):
3299         (KHTMLView::viewportMouseDoubleClickEvent):
3300         (KHTMLView::contentsContextMenuEvent):
3301         (KHTMLView::updateDragAndDrop):
3302         (KHTMLView::cancelDragAndDrop):
3303         (KHTMLView::performDragAndDrop):
3304         (KHTMLView::focusNextPrevNode):
3305         * kwq/DOM-CSS.mm:
3306         (-[DOMCSSStyleSheet cssRules]):
3307         (-[DOMCSSStyleDeclaration getPropertyValue:]):
3308         (-[DOMCSSStyleDeclaration getPropertyCSSValue:]):
3309         (-[DOMCSSStyleDeclaration removeProperty:]):
3310         (-[DOMCSSStyleDeclaration getPropertyPriority:]):
3311         (-[DOMCSSStyleDeclaration setProperty:::]):
3312         (-[DOMCSSValue setCssText:]):
3313         * kwq/DOMCSS.h:
3314         * kwq/DOMHTML.mm:
3315         (-[DOMHTMLElement setInnerHTML:]):
3316         (-[DOMHTMLElement setOuterHTML:]):
3317         (-[DOMHTMLElement setInnerText:]):
3318         (-[DOMHTMLElement setOuterText:]):
3319         (-[DOMHTMLSelectElement setLength:]):
3320         (-[DOMHTMLTableSectionElement insertRow:]):
3321         * kwq/DOMInternal.h:
3322         * kwq/DOMInternal.mm:
3323         (raiseDOMException):
3324         (-[WebScriptObject _initializeScriptDOMNodeImp]):
3325         * kwq/DOMUtility.mm:
3326         (KJS::ScriptInterpreter::createObjcInstanceForValue):
3327         * kwq/KWQAccObject.mm:
3328         (-[KWQAccObject accessibilityAttributeValue:]):
3329         * kwq/KWQKHTMLPart.h:
3330         * kwq/KWQKHTMLPart.mm:
3331         (KWQKHTMLPart::KWQKHTMLPart):
3332         (KWQKHTMLPart::advanceToNextMisspelling):
3333         (KWQKHTMLPart::scrollOverflow):
3334         (KWQKHTMLPart::paint):
3335         (KWQKHTMLPart::openURLFromPageCache):
3336         (KWQKHTMLPart::khtmlMousePressEvent):
3337         (KWQKHTMLPart::passWidgetMouseDownEventToWidget):
3338         (KWQKHTMLPart::dispatchDragSrcEvent):
3339         (KWQKHTMLPart::eventMayStartDrag):
3340         (KWQKHTMLPart::khtmlMouseMoveEvent):
3341         (KWQKHTMLPart::dragSourceEndedAt):
3342         (KWQKHTMLPart::mouseDown):
3343         (KWQKHTMLPart::sendContextMenuEvent):
3344         (listParent):
3345         (isTextFirstInListItem):
3346         (KWQKHTMLPart::attributedString):
3347         (KWQKHTMLPart::snapshotDragImage):
3348         (KWQKHTMLPart::mousePressNode):
3349         * kwq/WebCoreBridge.mm:
3350         (updateRenderingForBindings):
3351         (-[WebCoreBridge _documentTypeString]):
3352
3353 2005-05-10  Maciej Stachowiak  <mjs@apple.com>
3354
3355         Reviewed by John.
3356
3357         - rename hasAnchor method to isLink
3358
3359         * khtml/css/cssstyleselector.cpp:
3360         (khtml::checkPseudoState):
3361         (khtml::CSSStyleSelector::canShareStyleWithElement):
3362         (khtml::CSSStyleSelector::styleForElement):
3363         (khtml::CSSStyleSelector::checkOneSelector):
3364         * khtml/editing/htmlediting.cpp:
3365         (khtml::isSpecialElement):
3366         * khtml/html/html_imageimpl.cpp:
3367         (HTMLImageElementImpl::parseHTMLAttribute):
3368         * khtml/html/html_inlineimpl.cpp:
3369         (DOM::HTMLAnchorElementImpl::isFocusable):
3370         (DOM::HTMLAnchorElementImpl::defaultEventHandler):
3371         (DOM::HTMLAnchorElementImpl::parseHTMLAttribute):
3372         * khtml/rendering/render_flexbox.cpp:
3373         (khtml::RenderFlexibleBox::layoutVerticalBox):
3374         * khtml/rendering/render_layer.cpp:
3375         (RenderLayer::hitTest):
3376         * khtml/rendering/render_object.cpp:
3377         (RenderObject::information):
3378         * khtml/xml/dom_nodeimpl.cpp:
3379         (NodeImpl::NodeImpl):
3380         * khtml/xml/dom_nodeimpl.h:
3381         (DOM::NodeImpl::isLink):
3382         * kwq/KWQAccObject.mm:
3383         (-[KWQAccObject anchorElement]):
3384         (-[KWQAccObject addChildrenToArray:]):
3385         (-[KWQAccObject role]):
3386         (-[KWQAccObject title]):
3387         (-[KWQAccObject accessibilityIsIgnored]):
3388         (-[KWQAccObject accessibilityAttributeNames]):
3389         (-[KWQAccObject accessibilityAttributeValue:]):
3390         * kwq/KWQKHTMLPart.mm:
3391         (KWQKHTMLPart::khtmlMouseMoveEvent):
3392
3393 2005-05-09  Maciej Stachowiak  <mjs@apple.com>
3394
3395         Reviewed by John.
3396
3397         - remove init hint argument from VisiblePosition 
3398
3399         * khtml/editing/visible_position.cpp:
3400         (khtml::VisiblePosition::VisiblePosition):
3401         (khtml::VisiblePosition::init):
3402         * khtml/editing/visible_positio