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