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