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