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