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