Reviewed by John.
[WebKit-https.git] / WebCore / ChangeLog-2005-08-23
1 2003-12-09  Maciej Stachowiak  <mjs@apple.com>
2
3         Reviewed by John.
4
5         <rdar://problem/3487195>: Implement responseXML property for XMLHttpRequest
6         
7         * khtml/ecma/xmlhttprequest.cpp:
8         (KJS::XMLHttpRequest::getValueProperty): Implemented responseXML by parsing the
9         document and returning it.
10         (KJS::XMLHttpRequest::XMLHttpRequest): Initialize new field
11         * khtml/ecma/xmlhttprequest.h:
12
13         * khtml/ecma/kjs_window.cpp: 
14         (Windw::get): Forgot this in last commit; add XMLSerializer
15         constructor.
16         * khtml/ecma/kjs_window.lut.h:
17         * khtml/ecma/Makefile.am: Forgot to include this in the last commit.
18
19 2003-12-09  Maciej Stachowiak  <mjs@apple.com>
20
21         Reviewed by Richard.
22
23         <rdar://problem/3504049>: XMLSerializer object and serializeToString method needed for XMLHttpRequest testing
24
25         Also fixed some lasst-minute mistakes in the DOM serialization
26         code that was already there.
27         
28         * WebCore.pbproj/project.pbxproj:
29         * khtml/dom/dom_doc.h:
30         * khtml/ecma/Makefile.am:
31         * khtml/ecma/kjs_window.cpp:
32         (Window::get):
33         * khtml/ecma/kjs_window.h:
34         (KJS::Window::):
35         * khtml/ecma/kjs_window.lut.h:
36         (KJS::):
37         * khtml/ecma/xmlserializer.cpp: Added.
38         (KJS::XMLSerializerConstructorImp::XMLSerializerConstructorImp):
39         (KJS::XMLSerializerConstructorImp::implementsConstruct):
40         (KJS::XMLSerializerConstructorImp::construct):
41         (KJS::):
42         (KJS::XMLSerializer::XMLSerializer):
43         (KJS::XMLSerializerProtoFunc::tryCall):
44         * khtml/ecma/xmlserializer.h: Added.
45         (KJS::XMLSerializer::toBoolean):
46         (KJS::XMLSerializer::classInfo):
47         (KJS::XMLSerializer::):
48         * khtml/ecma/xmlserializer.lut.h: Added.
49         (KJS::):
50         * khtml/xml/dom_docimpl.cpp:
51         (DocumentImpl::toString):
52         (DocumentFragmentImpl::toString):
53         * khtml/xml/dom_elementimpl.cpp:
54         (AttrImpl::toString):
55         (ElementImpl::toString):
56
57 2003-12-09  David Hyatt  <hyatt@apple.com>
58
59         Implement start() and stop() for marquees.
60         
61         Reviewed by darin
62
63         * khtml/ecma/kjs_html.cpp:
64         (KJS::HTMLElement::classInfo):
65         (KJS::HTMLElementFunction::tryCall):
66         * khtml/ecma/kjs_html.h:
67         (KJS::HTMLElement::):
68         * khtml/ecma/kjs_html.lut.h:
69         (KJS::):
70
71 2003-12-09  Darin Adler  <darin@apple.com>
72
73         Reviewed by John.
74
75         - fixed 3505277: nil-deref in ownerElement after choosing item from menu at projectnissan.com
76
77         * khtml/xml/dom_nodeimpl.cpp: (NodeImpl::dispatchWindowEvent): Add check for nil.
78
79 2003-12-09  Darin Adler  <darin@apple.com>
80
81         Reviewed by Maciej.
82
83         * kwq/KWQKHTMLPart.mm:
84         (KWQKHTMLPart::saveLocationProperties): Add locking around the call to get the location
85         since it can allocate.
86         (KWQKHTMLPart::restoreLocationProperties): Ditto.
87
88 2003-12-09  David Hyatt  <hyatt@apple.com>
89
90         Fix for mojibake bg painting problem on bofa.com.  The bug # is 3487144.  Transparent colors were not
91         being handled properly when specified on the body.
92         
93         Reviewed by darin
94
95         * khtml/rendering/render_box.cpp:
96         (RenderBox::paintRootBoxDecorations):
97         (RenderBox::paintBackgroundExtended):
98
99 2003-12-09  Darin Adler  <darin@apple.com>
100
101         Reviewed by Dave.
102
103         - fixed 3505391: REGRESSION (100-116): pages that move cells around don't repaint correctly
104
105         * khtml/rendering/render_table.cpp: (RenderTableSection::layoutRows): Added code
106         similar to the code in RenderBlock::layoutBlock, but for table cells.
107
108 2003-12-09  Darin Adler  <darin@apple.com>
109
110         Reviewed by Maciej.
111
112         * khtml/ecma/kjs_events.cpp: (JSEventListener::handleEvent): Add locking around the call to
113         push event handler scope. Without this, we hit the "allocated without locking" assertion.
114
115 2003-12-09  David Hyatt  <hyatt@apple.com>
116
117         Fix the dirty rect checks on various render_objects to be more accurate so that page-break properties don't
118         have mojibake when printing.
119         
120         Reviewed by john
121
122         * khtml/rendering/render_block.cpp:
123         (khtml::RenderBlock::paint):
124         * khtml/rendering/render_flow.cpp:
125         (RenderFlow::paintLineBoxBackgroundBorder):
126         (RenderFlow::paintLineBoxDecorations):
127         * khtml/rendering/render_replaced.cpp:
128         (RenderReplaced::paint):
129         * khtml/rendering/render_table.cpp:
130         (RenderTable::paint):
131
132 2003-12-09  Darin Adler  <darin@apple.com>
133
134         Reviewed by Richard.
135
136         - fixed 3500408: Web Kit should pass the MAYSCRIPT attribute from the APPLET tag to the Java plug-in
137
138         * khtml/html/html_objectimpl.cpp:
139         (HTMLAppletElementImpl::parseAttribute): Allow the "mayscript" attribute.
140         (HTMLAppletElementImpl::createRenderer): Pass the value of the "mayscript" attribute
141         as an argument named "mayScript".
142
143         * khtml/misc/htmlattrs.in: Added "mayscript".
144         * khtml/misc/htmlattrs.c: Regenerated.
145         * khtml/misc/htmlattrs.h: Regenerated.
146
147 2003-12-09  Maciej Stachowiak  <mjs@apple.com>
148
149         Reviewed by Darin.
150
151         <rdar://problem/3501030>: JavaScript sites crash when a PAC file is in place (WebCore,Safari 1.2)
152         
153         * khtml/ecma/kjs_events.cpp:
154         (JSEventListener::handleEvent): Lock interpreter when needed.
155         (JSLazyEventListener::parseCode): Likewise.
156         (KJS::getDOMEvent): Likewise.
157         * khtml/ecma/kjs_proxy.cpp:
158         (KJSProxyImpl::evaluate): Likewise.
159         (KJSProxyImpl::initScript): Likewise.
160
161 2003-12-09  David Hyatt  <hyatt@apple.com>
162
163         Fix for 3491235, really make <script src="..."/> work in HTML.  My original attempt to fix this only made
164         the tag flat, but did not ensure that the script got processed.
165         
166         Reviewed by john
167
168         * khtml/html/htmltokenizer.cpp:
169         (HTMLTokenizer::parseTag):
170
171 2003-12-08  David Hyatt  <hyatt@apple.com>
172
173         Fix for 3503652, news.com misrenders badly (footer is out of position).  My fix to 3495748 caused this
174         regression.  I made the tag priority of <nobr> too high.  It needed to be the same as <div>, and I
175         accidentally made it higher.  I intended for it to be the same as <div>.
176
177         I also had to make a fix (now that <nobr> has a higher priority) to ensure <nobr> can't be nested inside
178         other <nobr>.  
179
180         Both fixes were required to make news.com render correctly again.
181         
182         Reviewed by darin
183
184         * khtml/html/dtd.cpp:
185         * khtml/html/htmlparser.cpp:
186         (KHTMLParser::getElement):
187
188 2003-12-08  Chris Blumenberg  <cblu@apple.com>
189
190         Fixed: <rdar://problem/3234676>: Support for KEYGEN tag (ie 509 email certificates from www.thawte.com)
191
192         Reviewed by mjs.
193
194         * WebCore-combined.exp:
195         * WebCore.exp:
196         * WebCore.pbproj/project.pbxproj:
197         * khtml/html/html_formimpl.cpp:
198         (HTMLKeygenElementImpl::parseAttribute): store the KEYTYPE attribute
199         (HTMLKeygenElementImpl::encoding): call KSSLKeyGen::signedPublicKeyAndChallengeString
200         * khtml/html/html_formimpl.h: remove 2 declared but unimplemented methods
201         * khtml/misc/htmlattrs.c: generated changes
202         (hash_attr):
203         (findAttr):
204         * khtml/misc/htmlattrs.h: generated change
205         * khtml/misc/htmlattrs.in: added KEYTYPE
206         * kwq/KWQKSSLKeyGen.h:
207         * kwq/KWQKSSLKeyGen.mm:
208         (KSSLKeyGen::supportedKeySizes): call renamed strengthMenuItemTitles
209         (KSSLKeyGen::signedPublicKeyAndChallengeString): new, calls [WebCoreKeyGenerationFactory signedPublicKeyAndChallengeStringWithStrengthIndex:challenge:] 
210         * kwq/WebCoreKeyGenerationFactory.h: Added.
211         * kwq/WebCoreKeyGenerationFactory.m: Added.
212         (+[WebCoreKeyGenerationFactory sharedFactory]):
213         (-[WebCoreKeyGenerationFactory init]):
214         (-[WebCoreKeyGenerationFactory strengthMenuItemTitles]):
215         (-[WebCoreKeyGenerationFactory signedPublicKeyAndChallengeStringWithStrengthIndex:challenge:]):
216         * kwq/WebCoreLocalizedStringFactory.h: Removed.
217         * kwq/WebCoreLocalizedStringFactory.m: Removed.
218
219 2003-12-08  Maciej Stachowiak  <mjs@apple.com>
220
221         Reviewed by Ken.
222
223         <rdar://problem/3504047>: XMLHttpRequest object needs onload event
224         
225         * khtml/ecma/xmlhttprequest.cpp:
226         (KJS::XMLHttpRequest::getValueProperty): Implemented onload property.
227         (KJS::XMLHttpRequest::putValue): Ditto.
228         (KJS::XMLHttpRequest::XMLHttpRequest): Ditto.
229         (KJS::XMLHttpRequest::changeState): Ditto.
230         * khtml/ecma/xmlhttprequest.h:
231         * khtml/ecma/xmlhttprequest.lut.h: Regenerated.
232
233 2003-12-08  David Hyatt  <hyatt@apple.com>
234
235         Fix for 3503022, asahi.com is too wide.  Bugs in line breaking of breakable Japanese characters caused
236         the breaks to be ignored.
237         
238         Reviewed by john
239
240         * khtml/rendering/render_text.cpp:
241         (RenderText::calcMinMaxWidth):
242
243 2003-12-05  David Hyatt  <hyatt@apple.com>
244
245         Fix the position method to return screen coords like it should and to use the lower left corner instead of
246         the upper left.
247         
248         Reviewed by john
249
250         * kwq/KWQAccObject.h:
251         * kwq/KWQAccObject.mm:
252         (-[KWQAccObject position]):
253         (-[KWQAccObject size]):
254
255 2003-12-07  Darin Adler  <darin@apple.com>
256
257         Reviewed by John.
258
259         - fixed 3502347: REGRESSION (100-116): bottom of login window sometimes missing (TR background image)
260
261         * khtml/rendering/render_object.h: Added setPixmap.
262         * khtml/rendering/render_object.cpp: (RenderObject::setPixmap): Moved this
263         function here from RenderBox. This code is needed for the table row class and
264         similar classes that supply a background image that is drawn by the table cell,
265         and those are not RenderBox subclasses.
266
267         * khtml/rendering/render_box.cpp: Removed setPixmap.
268         * khtml/rendering/render_box.h: Removed setPixmap.
269
270 2003-12-06  John Sullivan  <sullivan@apple.com>
271
272         - fixed <rdar://problem/3502655>: REGRESSION: Repro crash at espn.com
273
274         Reviewed by Darin.
275
276         * khtml/html/html_objectimpl.cpp:
277         (HTMLAppletElementImpl::getAppletInstance):
278         Check for nil RenderApplet before dereferencing rather than after.
279
280 2003-12-05  David Hyatt  <hyatt@apple.com>
281
282         Add support for link clicking as an accessibility action.
283         
284         Reviewed by john
285
286         * kwq/KWQAccObject.mm:
287         (-[KWQAccObject anchorElement]):
288         (-[KWQAccObject role]):
289         (-[KWQAccObject accessibilityAttributeNames]):
290         (-[KWQAccObject accessibilityActionNames]):
291         (-[KWQAccObject accessibilityActionDescription:]):
292         (-[KWQAccObject accessibilityPerformAction:]):
293
294 2003-12-05  Maciej Stachowiak  <mjs@apple.com>
295
296         Reviewed by John.
297
298         <rdar://problem/3487222>: Add ability to create working fully standalone document object
299         
300         * khtml/css/cssstyleselector.cpp:
301         (khtml::CSSStyleSelector::CSSStyleSelector):
302         (khtml::CSSStyleSelector::addSheet):
303         (khtml::CSSStyleSelector::initForStyleResolve):
304         (khtml::CSSStyleSelector::applyRule):
305         * khtml/dom/dom_doc.cpp:
306         (DOM::Document::part):
307         * khtml/dom/dom_doc.h:
308         * khtml/ecma/kjs_dom.cpp:
309         (DOMDocument::getValueProperty):
310         (KJS::checkNodeSecurity):
311         * khtml/ecma/kjs_html.cpp:
312         (KJS::HTMLDocFunction::tryCall):
313         (KJS::HTMLDocument::tryGet):
314         (KJS::HTMLDocument::putValue):
315         (KJS::HTMLElement::tryGet):
316         (Image::notifyFinished):
317         * khtml/ecma/kjs_traversal.cpp:
318         (JSNodeFilter::acceptNode):
319         * khtml/ecma/xmlhttprequest.cpp:
320         (KJS::XMLHttpRequest::changeState):
321         * khtml/html/html_baseimpl.cpp:
322         (HTMLBodyElementImpl::insertedIntoDocument):
323         (HTMLFrameElementImpl::isURLAllowed):
324         (HTMLFrameElementImpl::attach):
325         (HTMLFrameElementImpl::detach):
326         (HTMLFrameElementImpl::contentDocument):
327         (HTMLIFrameElementImpl::attach):
328         * khtml/html/html_documentimpl.cpp:
329         (HTMLDocumentImpl::referrer):
330         (HTMLDocumentImpl::lastModified):
331         * khtml/html/html_formimpl.cpp:
332         (HTMLFormElementImpl::formData):
333         (HTMLFormElementImpl::prepareSubmit):
334         (HTMLFormElementImpl::submit):
335         (HTMLFormElementImpl::reset):
336         (HTMLGenericFormElementImpl::isKeyboardFocusable):
337         (HTMLGenericFormElementImpl::defaultEventHandler):
338         * khtml/html/html_headimpl.cpp:
339         (HTMLBaseElementImpl::process):
340         (HTMLLinkElementImpl::process):
341         * khtml/html/html_inlineimpl.cpp:
342         (HTMLAnchorElementImpl::isKeyboardFocusable):
343         (HTMLAnchorElementImpl::defaultEventHandler):
344         * khtml/html/html_objectimpl.cpp:
345         (HTMLAppletElementImpl::createRenderer):
346         (HTMLAppletElementImpl::getAppletInstance):
347         (HTMLEmbedElementImpl::rendererIsNeeded):
348         (HTMLObjectElementImpl::rendererIsNeeded):
349         * khtml/html/htmltokenizer.cpp:
350         (HTMLTokenizer::scriptExecution):
351         (HTMLTokenizer::parseTag):
352         * khtml/rendering/render_applet.cpp:
353         (RenderApplet::RenderApplet):
354         * khtml/xml/dom_docimpl.cpp:
355         (DocumentImpl::setTitle):
356         (DocumentImpl::part):
357         (DocumentImpl::close):
358         (DocumentImpl::processHttpEquiv):
359         * khtml/xml/dom_docimpl.h:
360         * khtml/xml/dom_nodeimpl.cpp:
361         (NodeImpl::dispatchEvent):
362         * kwq/KWQAccObject.mm:
363         (-[KWQAccObject textUnderElement]):
364         * kwq/KWQKHTMLPart.mm:
365         (KWQKHTMLPart::partForNode):
366         (KWQKHTMLPart::attributedString):
367
368 2003-12-05  Richard Williamson   <rjw@apple.com>
369
370         Fixed 3501885.  Added null test to returned node from collection.
371
372         Reviewed by John.
373
374         * khtml/ecma/kjs_html.cpp:
375         (KJS::HTMLCollection::tryGet):
376
377 2003-12-04  Richard Williamson   <rjw@apple.com>
378
379         Added support for named applet access from document node.
380         Factored creation of KJS::Values from RuntimeObjectImps.
381
382         Reviewed by Chris.
383
384         * khtml/ecma/kjs_dom.cpp:
385         (KJS::getDOMNamedNodeMap):
386         (KJS::getRuntimeObject):
387         * khtml/ecma/kjs_dom.h:
388         * khtml/ecma/kjs_html.cpp:
389         (KJS::HTMLDocument::tryGet):
390         (KJS::HTMLElement::tryGet):
391         (KJS::HTMLCollection::tryGet):
392
393 2003-12-04  Darin Adler  <darin@apple.com>
394
395         Reviewed by John.
396
397         - fixed 3498712: REGRESSION (100-115): Safari aborts at http://www11.dht.dk/~blangstrup_org/
398
399         This was an uncaught exception thrown by DocumentImpl. But the design of KHTML DOM is that
400         "impl" classes return exception codes; they don't throw exceptions.
401
402         * khtml/dom/dom_doc.cpp:
403         (DOM::Document::createElement): Throw exception if necessary. The impl function now returns
404         an exception code.
405         (DOM::Document::createElementNS): Ditto.
406
407         * khtml/html/html_documentimpl.h: Add exception code parameter to createElement.
408         * khtml/html/html_documentimpl.cpp: (HTMLDocumentImpl::createElement): Pass along the
409         exception code from the lower level.
410
411         * khtml/xml/dom_docimpl.h: Add exception code parameters to createElement, createElementNS,
412         and createHTMLElement.
413         * khtml/xml/dom_docimpl.cpp:
414         (DOMImplementationImpl::createDocument): Handle exception code from createElementNS.
415         (DocumentImpl::createElement): Add exception code parameter, not set since there is
416         no exception.
417         (DocumentImpl::importNode): Handle exception code from createElementNS.
418         (DocumentImpl::createElementNS): Add exception code parameter. Propagate the exception
419         codes that we get from createHTMLElement and setPrefix.
420         (DocumentImpl::createHTMLElement): Add exception code parameter. Use an exception code
421         rather than a C++ exception for INVALID_CHARACTER_ERR.
422
423         * khtml/xml/dom_elementimpl.cpp: (ElementImpl::cloneNode): Pass exception code parameter to
424         createElement.
425
426         * khtml/xml/xml_tokenizer.cpp:
427         (XMLHandler::startElement): Pass exception code parameter to createElementNS, and return false
428         if it is not zero. This is where the bug happened. Before we would get an exception from
429         createElementNS, but "impl" functions are not supposed to throw in KHTML's DOM.
430         (XMLTokenizer::finish): Add various exception code parameters to compile, but we know we won't
431         get any exceptions.
432
433         * kwq/WebCoreDOMDocument.mm:
434         (-[WebCoreDOMDocument createElement:]): Pass an (ignored) exception code parameter.
435         (-[WebCoreDOMDocument createElementNS::]): Pass an (ignored) exception code parameter.
436
437 === Safari-116 ===
438
439 2003-12-03  Richard Williamson   <rjw@apple.com>
440
441         LiveConnect:  Removed some debugging.
442
443         Reviewed by Chris.
444
445         * khtml/ecma/kjs_html.cpp:
446         (KJS::HTMLCollection::tryGet):
447
448 2003-12-03  David Hyatt  <hyatt@apple.com>
449
450         Fix for 3475761, list bullets mislayout after text zooming.
451         
452         Reviewed by kocienda
453
454         * khtml/rendering/render_block.cpp:
455         (khtml::RenderBlock::setStyle):
456
457 2003-12-03  David Hyatt  <hyatt@apple.com>
458
459         Fix for 3493356, table cells didn't repaint properly.
460         
461         Reviewed by kocienda
462
463         * khtml/rendering/render_object.cpp:
464         (RenderObject::repaintObjectsBeforeLayout):
465         * khtml/rendering/render_table.cpp:
466         (RenderTableCell::getAbsoluteRepaintRect):
467         * khtml/rendering/render_table.h:
468
469 2003-12-03  David Hyatt  <hyatt@apple.com>
470
471         Fix for 3495748, hang in parser at ocelot.ca.  <nobr> needs to have very high priority (equal to the
472         priority of blocks like h1-6, p, and div), so that unclosed <nobr>s will close divs and ps.
473         
474         Reviewed by gramps
475
476         * khtml/html/dtd.cpp:
477
478 2003-12-03  David Hyatt  <hyatt@apple.com>
479
480         Fix for 3475767, hang at saabnet.com.  Fix h1-h6 to be more tolerant regarding allowed child elements, to avoid
481         deeply nested pages.
482         
483         Reviewed by darin
484
485         * khtml/html/dtd.cpp:
486         (DOM::checkChild):
487
488 2003-12-03  John Sullivan  <sullivan@apple.com>
489
490         - fixed these two design issues after Dave and I talked to HI:
491         <rdar://problem/3497072>: There shouldn't be a focus ring around clicked regions
492         <rdar://problem/3499315>: Focus ring should use aqua color always
493
494         Reviewed by Dave.
495
496         * khtml/css/html4.css:
497
498 2003-12-03  Maciej Stachowiak  <mjs@apple.com>
499
500         Reviewed by Ken.
501
502         <rdar://problem/3395759>: results of parent.document.getElementsByTagName can't be added to string
503         
504         * khtml/ecma/kjs_dom.cpp:
505         (DOMNodeList::toPrimitive): Always convert to string instead of trying to convert
506         to number and failing, as is done for DOMNode.
507         * khtml/ecma/kjs_dom.h: Prototype new method.
508
509 2003-12-02  Richard Williamson   <rjw@apple.com>
510
511         Return a value that is backed by RuntimeObjectImpl, instead
512         of a DOM object for applet[0].  This is better than having
513         the DOM object redirect to the RuntimeObjectImpl.
514
515         Reviewed by Chris.
516
517         * khtml/ecma/kjs_html.cpp:
518         (KJS::HTMLCollection::tryGet):
519
520 2003-12-02  Maciej Stachowiak  <mjs@apple.com>
521
522         Reviewed by John.
523
524         <rdar://problem/3488220>: namespaces test from David Faure causes Safari to crash in DOM::DocumentImpl::createElementNS
525         
526         * khtml/xml/dom_docimpl.cpp:
527         (DocumentImpl::createElementNS): Check if new element is NULL
528         before messing with it, to avoid a crash.
529
530 2003-12-02  David Hyatt  <hyatt@apple.com>
531
532         Fix for 3497999, null check the text() of RenderTexts to avoid a crash in current().
533         
534         Reviewed by kocienda
535
536         * khtml/rendering/bidi.cpp:
537         (khtml::BidiIterator::current):
538
539 2003-12-02  Maciej Stachowiak  <mjs@apple.com>
540
541         Reviewed by Darin.
542
543         Implemented a simple form of document serialization, enough to take care of:
544
545         <rdar://problem/3487190>: implement send of DOMDocument for XMLHttpRequest
546
547         * khtml/dom/dom_doc.cpp:
548         (DOM::Document::toString):
549         * khtml/dom/dom_doc.h:
550         * khtml/ecma/xmlhttprequest.cpp:
551         (KJS::XMLHttpRequest::urlMatchesDocumentDomain):
552         (KJS::XMLHttpRequestProtoFunc::tryCall):
553         * khtml/html/html_elementimpl.cpp:
554         (HTMLElementImpl::toString):
555         * khtml/html/html_elementimpl.h:
556         * khtml/xml/dom_docimpl.cpp:
557         (DocumentImpl::toString):
558         (DocumentFragmentImpl::toString):
559         (DocumentTypeImpl::copyFrom):
560         (DocumentTypeImpl::toString):
561         * khtml/xml/dom_docimpl.h:
562         * khtml/xml/dom_elementimpl.cpp:
563         (AttrImpl::toString):
564         (ElementImpl::openTagStartToString):
565         (ElementImpl::toString):
566         * khtml/xml/dom_elementimpl.h:
567         * khtml/xml/dom_nodeimpl.h:
568         * khtml/xml/dom_textimpl.cpp:
569         (CommentImpl::toString):
570         (TextImpl::toString):
571         (CDATASectionImpl::toString):
572         * khtml/xml/dom_textimpl.h:
573         * khtml/xml/dom_xmlimpl.cpp:
574         (EntityImpl::toString):
575         (EntityReferenceImpl::toString):
576         (ProcessingInstructionImpl::setStyleSheet):
577         (ProcessingInstructionImpl::toString):
578         * khtml/xml/dom_xmlimpl.h:
579
580 2003-12-02  David Hyatt  <hyatt@apple.com>
581
582         Fix for 3493677, containingBlock() null because we tried to support position:relative on table rows.  Fix
583         is to disallow this.
584         
585         Reviewed by kocienda
586
587         * khtml/css/cssstyleselector.cpp:
588         (khtml::CSSStyleSelector::adjustRenderStyle):
589
590 2003-12-02  David Hyatt  <hyatt@apple.com>
591
592         Fix for 3493697, nil-deref in bidi code.  Need to null-check strings with no length.
593         
594         Reviewed by john
595
596         * khtml/rendering/bidi.cpp:
597         (khtml::addRun):
598
599 2003-12-02  David Hyatt  <hyatt@apple.com>
600
601         Fix for 3495746, nil deref of containing block (frame inside frameset).
602         
603         Reviewed by kocienda
604
605         * khtml/rendering/render_box.cpp:
606         (RenderBox::containingBlockWidth):
607
608 2003-12-02  Ken Kocienda  <kocienda@apple.com>
609
610         Reviewed by John
611
612         * kwq/KWQRect.h:
613         * kwq/KWQRect.mm:
614         (QRect::bottomRight): Added helper.
615
616 2003-12-02  Maciej Stachowiak  <mjs@apple.com>
617
618         Merged the following patch from David Faure to fix:
619
620         <rdar://problem/3497663>: Can't look up frames by number using windw[i] notation
621
622     2003-11-25  David Faure  <faure@kde.org>
623
624         * ecma/kjs_window.cpp: Implement hasProperty and get for frames by number in Window,
625         to fix window[0] and parent[1] etc. (#56983)
626
627 2003-11-21  Maciej Stachowiak  <mjs@apple.com>
628
629         Reviewed by Richard.
630
631         <rdar://problem/3487185>: implement security checks for XMLHttpRequest
632         
633         * khtml/ecma/xmlhttprequest.cpp:
634         (KJS::XMLHttpRequest::open): Refuse to start if the URL is not one
635         this document is allowed to access.
636         (KJS::XMLHttpRequest::slotRedirection): Stop the job if we redirect
637         to a URL the home document is not allowed to access.
638         * kwq/KWQResourceLoader.mm:
639         (-[KWQResourceLoader redirectedToURL:]): emit the right signal
640         * kwq/WebCoreResourceLoader.h: Prototype new method
641
642 2003-12-01  Richard Williamson   <rjw@apple.com>
643
644 Fixed parameter passing to applet.  Child elements are NOT valid in setStyle().  So we now either create the widget before needed with createWidgetIfNecessary.  This either happens when doing the first layout, or when JavaScript first references the applet element.
645
646 Fixed early delete of the the main applet instance.  When the JS collector cleaned up the last JS object referring to the applet instance we were deleting the java instance.  This caused the applet instance cached on the applet element to be invalid.  The applet instance is the only Java object not to be cleaned up by the JS collector.
647
648 Added support for getting at Java object fields.
649
650         Reviewed by Chris.
651
652         * khtml/ecma/kjs_html.cpp:
653         (KJS::HTMLElement::tryGet):
654         * khtml/html/html_objectimpl.cpp:
655         (HTMLAppletElementImpl::createRenderer):
656         (HTMLAppletElementImpl::getAppletInstance):
657         * khtml/html/html_objectimpl.h:
658         * khtml/rendering/render_applet.cpp:
659         (RenderApplet::createWidgetIfNecessary):
660         (RenderApplet::layout):
661         * khtml/rendering/render_applet.h:
662         (khtml::RenderApplet::renderName):
663
664 2003-12-01  Darin Adler  <darin@apple.com>
665
666         Reviewed by Dave.
667
668         - fixed 3496960: nil-deref in idFromNode inside elementDoesAutoComplete:
669
670         * kwq/WebCoreBridge.mm:
671         (inputElementFromDOMElement): Added nil check.
672         (formElementFromDOMElement): Added nil check.
673
674 2003-12-01  David Hyatt  <hyatt@apple.com>
675
676         Fix for 3490959, collapsed border tables don't paint backgrounds.
677         
678         Reviewed by darin
679
680         * khtml/rendering/render_table.cpp:
681         (RenderTable::setStyle):
682         (RenderTable::paint):
683         (RenderTable::paintBoxDecorations):
684         * khtml/rendering/render_table.h:
685
686 2003-12-01  Darin Adler  <darin@apple.com>
687
688         Reviewed by Dave.
689
690         - fixed 3493939: ordered lists with type="A" roll over to A' after X rather than after Z
691
692         * khtml/rendering/render_list.cpp: (toLetter): Change 24 to 26.
693
694 === Safari-115 ===
695
696 2003-11-21  Maciej Stachowiak  <mjs@apple.com>
697
698         Reviewed by Ken.
699
700         WebCore part of fix for:
701         
702         <rdar://problem/3487134>: Implement http request/response status and headers for XMLHttpRequest
703
704         * khtml/ecma/xmlhttprequest.cpp:
705         (KJS::XMLHttpRequest::getValueProperty): Call appropriate methods for
706         status and statusText.
707         (KJS::XMLHttpRequest::send): Set request headers as "customHeaders"
708         metadata property.
709         (KJS::XMLHttpRequest::setRequestHeader): Simply append to header
710         string.
711         (KJS::XMLHttpRequest::getAllResponseHeaders): Return the header string
712         except for the first line.
713         (KJS::XMLHttpRequest::getResponseHeader): Scan the response header
714         string for the header field. Not sure if it's worth being more
715         efficient.
716         (KJS::XMLHttpRequest::getStatus): Try to pull a code out
717         of the status line.
718         (KJS::XMLHttpRequest::getStatusText): Pull the first line
719         off the headers (if any), otherwise return undefined.
720         (KJS::XMLHttpRequest::slotData): The first time through, save
721         the response headers, retrieved from "HTTP-Headers" metadata
722         property.
723         (KJS::XMLHttpRequestProtoFunc::tryCall): Make setRequestHeader,
724         getResponseHeader, getAllResponseHeaders call the right thing.
725         * khtml/ecma/xmlhttprequest.h:
726         * kwq/KWQKJobClasses.h:
727         * kwq/KWQKJobClasses.mm:
728         (KIO::TransferJobPrivate::TransferJobPrivate): Added header
729         support.
730         (KIO::TransferJobPrivate::~TransferJobPrivate):
731         (KIO::TransferJob::assembleResponseHeaders): Get a header string
732         out of the response if needed.
733         (KIO::TransferJob::queryMetaData): Special-case "HTTP-Headers".
734         (KIO::TransferJob::emitReceivedResponse): Save response.
735         * kwq/KWQLoader.h:
736         * kwq/KWQLoader.mm:
737         (-[NSDictionary _webcore_initWithHeaderString:]): Helper method to
738         turn a string of header fields into a dictionary.
739         (KWQServeRequest): Pass custom headers through.
740         (KWQResponseMIMEType): Admit it's an NSURLResponse *.
741         (KWQResponseHeaderString): Assembled status code and response
742         header fields into response header. Cheat a little on the status
743         line.
744         * kwq/KWQResourceLoader.mm:
745         (-[KWQResourceLoader receivedResponse:]): Admit it's an
746         NSURLResponse *.
747         * kwq/WebCoreResourceLoader.h: Ditto.
748         * kwq/WebCoreBridge.h: Add customHeader: arguments.
749
750 2003-11-21  Chris Blumenberg  <cblu@apple.com>
751
752         Fixed: <rdar://problem/3491907>: When viewing applet, view hierarchy was an empty KWQView
753
754         Reviewed by rjw.
755
756         * WebCore.pbproj/project.pbxproj:
757         * khtml/html/html_objectimpl.cpp: removed setupApplet because that work is done when the applet widget is created
758         (HTMLAppletElementImpl::createRenderer): pass the PARAM args to the render object
759         (HTMLAppletElementImpl::getAppletInstance): don't call setupApplet
760         * khtml/rendering/render_applet.cpp:
761         (RenderApplet::RenderApplet): store args and context, don't call setQWidget here 
762         (RenderApplet::setStyle): call setQWidget here
763         (RenderApplet::layout): don't parse args here, that is done in HTMLAppletElementImpl::createRenderer
764         * khtml/rendering/render_applet.h:
765         * kwq/KWQKJavaAppletWidget.h:
766         (KJavaApplet::KJavaApplet): turned into a stub, this work is no longer needed
767         (KJavaApplet::setAppletClass): ditto
768         (KJavaApplet::setAppletName): ditto
769         (KJavaApplet::setArchives): ditto
770         (KJavaApplet::setBaseURL): ditto
771         (KJavaApplet::setCodeBase): ditto
772         (KJavaApplet::setParameter): ditto
773         (KJavaAppletWidget::~KJavaAppletWidget): ditto
774         (KJavaAppletWidget::applet): ditto
775         (KJavaAppletWidget::setBaseURL): ditto
776         (KJavaAppletWidget::setParameter): ditto
777         (KJavaAppletWidget::showApplet): ditto 
778         * kwq/KWQKJavaAppletWidget.mm:
779         (KJavaAppletWidget::KJavaAppletWidget): create the java here instead of doing it later
780
781 2003-11-21  John Sullivan  <sullivan@apple.com>
782
783         - WebCore part of fix for <rdar://problem/3333744>: Safari prints page with 
784         very, very long line very, very small
785
786         Reviewed by Ken.
787
788         * kwq/KWQKHTMLPart.h:
789         * kwq/KWQKHTMLPart.mm:
790         (KWQKHTMLPart::forceLayoutWithPageWidthRange):
791         Changed method name from forceLayoutForPageWidth; now takes min and max
792         page width values. Use max page width value to limit how wide page will
793         get when there's a very long line.
794         
795         * kwq/WebCoreBridge.h:
796         * kwq/WebCoreBridge.mm:
797         (-[WebCoreBridge forceLayoutWithMinimumPageWidth:maximumPageWidth:adjustingViewSize:]):
798         changed pageWidth parameter into min and max parameters; pass them along to KWQKHTMLPart.
799
800 2003-11-21  Darin Adler  <darin@apple.com>
801
802         Reviewed by Ken.
803
804         - fixed 3490260: allow &sup1 to be misspelled &supl (lowercase l instead of numeral 1) because WinIE does
805
806         * khtml/html/kentities.gperf: Added supl to the list. Maps to U+00B9, just as sup1 does.
807         * khtml/html/kentities.c: Regenerated.
808
809 2003-11-20  Maciej Stachowiak  <mjs@apple.com>
810
811         Reviewed by Darin.
812
813         - fixed 3487201 - Implement abort for XMLHttpRequest async loads
814         
815         * khtml/ecma/xmlhttprequest.cpp:
816         (KJS::XMLHttpRequest::abort): Kill and clear job.
817         (KJS::XMLHttpRequest::slotData): Avoid moving to state 3 on early abort.
818         (KJS::XMLHttpRequestProtoFunc::tryCall): Call abort when appropriate.
819         * khtml/ecma/xmlhttprequest.h:
820
821 2003-11-20  John Sullivan  <sullivan@apple.com>
822
823         - WebCore part of <rdar://problem/3183124>: Support page-break-before/after with a value of "always"
824
825         Dave wrote this part and we reviewed it together.
826
827         * khtml/rendering/render_block.cpp:
828         (khtml::RenderBlock::paintObject):
829         if printing, check for CSS page break locations
830         (khtml::RenderBlock::inRootBlockContext):
831         new method, used to check whether we're in a context for which
832         CSS page breaks are legal.
833         
834         * khtml/rendering/render_block.h:
835         prototype for inRootBlockContext; this might be useful for
836         other code later.
837         
838         * khtml/rendering/render_canvas.cpp:
839         (RenderCanvas::setBestTruncatedAt):
840         now takes a forcedBreak parameter which overrides others.
841         
842         * khtml/rendering/render_canvas.h:
843         (khtml::RenderCanvas::setTruncatedAt):
844         set default value for m_forcedPageBreak
845         
846         * kwq/WebCoreBridge.h:
847         * kwq/WebCoreBridge.mm:
848         (-[WebCoreBridge computePageRects:withPageHeight:]):
849         do the real work of pagination here
850
851 2003-11-20  Chris Blumenberg  <cblu@apple.com>
852
853         Fixed: <rdar://problem/3491225>: Need UI and localized strings for <KEYGEN> support
854
855         Reviewed by john.
856
857         * WebCore-combined.exp:
858         * WebCore.exp:
859         * WebCore.pbproj/project.pbxproj:
860         * kwq/KWQKSSLKeyGen.h:
861         * kwq/KWQKSSLKeyGen.mm: Added.
862         (KSSLKeyGen::supportedKeySizes): implemented, calls [WebCoreLocalizedStringFactory keyGenerationMenuItemTitles]
863         * kwq/WebCoreLocalizedStringFactory.h: Added.
864         * kwq/WebCoreLocalizedStringFactory.m: Added.
865         (+[WebCoreLocalizedStringFactory sharedFactory]): new
866         (-[WebCoreLocalizedStringFactory init]): new
867         (-[WebCoreLocalizedStringFactory keyGenerationMenuItemTitles]): new
868
869 2003-11-19  Maciej Stachowiak  <mjs@apple.com>
870
871         Reviewed by Ken.
872
873         - fixed 3490086 - support http post for XMLHttpRequest
874         
875         * kwq/KWQKJobClasses.h:
876         * kwq/KWQKJobClasses.mm:
877         (KIO::TransferJobPrivate::TransferJobPrivate):
878         (KIO::TransferJob::TransferJob):
879
880 2003-11-20  Richard Williamson   <rjw@apple.com>
881
882         Cleaned up synchronous applet lookup and initialization.
883         We need to further cleanup applet instantiation.  It doesn't
884         need to be lazy with my modified Java Plugin.
885
886         Reviewed by Chris.
887
888         * khtml/ecma/kjs_html.cpp:
889         (KJS::HTMLElement::tryGet):
890         * khtml/html/html_objectimpl.cpp:
891         (HTMLAppletElementImpl::setupApplet):
892         (HTMLAppletElementImpl::getAppletInstance):
893         * khtml/html/html_objectimpl.h:
894         * kwq/KWQKHTMLPart.mm:
895         (KWQKHTMLPart::getAppletInstanceForView):
896         * kwq/KWQKJavaAppletWidget.h:
897         * kwq/KWQKJavaAppletWidget.mm:
898         (KJavaAppletWidget::showApplet):
899
900 2003-11-20  Ken Kocienda  <kocienda@apple.com>
901
902         Reviewed by David
903
904         Fix for this bug:
905
906         <rdar://problem/3487421>: crash/exception when tabbing to a link without text
907
908         * khtml/html/html_inlineimpl.cpp:
909         (HTMLAnchorElementImpl::isFocusable): A link is also not focusable 
910         if it has zero width or height, if it has no children, or if it is 
911         is not a continuation.
912         * kwq/KWQPainter.mm:
913         (QPainter::drawFocusRing): Put in a guard against trying to draw a focus
914         ring with no control points. Log this as an error.
915
916 2003-11-19  David Hyatt  <hyatt@apple.com>
917
918         Fix for 3486963, crash because generated content was referencing a deleted object.  Fix is to update the
919         variable to a sane value after deleting old generated content.
920         
921         Reviewed by darin
922
923         * khtml/rendering/render_container.cpp:
924         (RenderContainer::updatePseudoChild):
925
926 2003-11-19  Maciej Stachowiak  <mjs@apple.com>
927
928         Reviewed by John.
929
930         - fixed 3486998 - Implement asynchronous http loading for XMLHttpRequest
931         
932         * khtml/ecma/xmlhttprequest.cpp:
933         (KJS::XMLHttpRequestQObject::XMLHttpRequestQObject): New QObject to use to
934         connect to signals.
935         (KJS::XMLHttpRequestQObject::slotData): Call XMLHttpRequest.
936         (KJS::XMLHttpRequestQObject::slotFinished): Ditto.
937         (KJS::XMLHttpRequestQObject::slotRedirection): Ditto.
938         (KJS::XMLHttpRequest::getValueProperty): Implemented, onrequeststatechange,
939         readyState and responseText.
940         (KJS::XMLHttpRequest::putValue): Implemented onrequeststatechange.
941         (KJS::XMLHttpRequest::XMLHttpRequest): Initialize new fields.
942         (KJS::XMLHttpRequest::~XMLHttpRequest): Delete decoder.
943         (KJS::XMLHttpRequest::changeState): Update state, and send event if needed.
944         (KJS::XMLHttpRequest::open): Save the parameters.
945         (KJS::XMLHttpRequest::send): Fire up a post or get job.
946         (KJS::XMLHttpRequest::slotFinished): go to final state.
947         (KJS::XMLHttpRequest::slotRedirection): Just stub for now.
948         (KJS::XMLHttpRequest::slotData): Update state; decode & save data.
949         (KJS::XMLHttpRequestProtoFunc::tryCall): Implemented open and send.
950         * khtml/ecma/xmlhttprequest.h: Prototyped new stuff.
951         * khtml/xml/dom2_eventsimpl.cpp:
952         (EventImpl::typeToId): Added "readystatechange" event.
953         (EventImpl::idToType): Ditto.
954         * khtml/xml/dom2_eventsimpl.h: Ditto.
955         * kwq/KWQLoader.h:
956         * kwq/KWQLoader.mm:
957         (KWQServeRequest): New variant that doesn't need a Request.
958         * kwq/KWQSlot.mm:
959         (KWQSlot::KWQSlot): Handle XMLHttpRequestQObject's slots.
960         (KWQSlot::call): Ditto.
961
962 2003-11-19  Richard Williamson   <rjw@apple.com>
963
964         More LiveConnect stuff.  With that patch we make the applet
965         visible to JavaScript in an Bindings::Instance.  Next step
966         it to flush out implementation of RuntimeObjectImp and
967         RuntimeFunctionImp.
968
969         Reviewed by Ken.
970
971         * khtml/html/html_objectimpl.cpp:
972         (HTMLAppletElementImpl::HTMLAppletElementImpl):
973         (HTMLAppletElementImpl::~HTMLAppletElementImpl):
974         (HTMLAppletElementImpl::getAppletInstance):
975         * khtml/html/html_objectimpl.h:
976         * kwq/KWQKHTMLPart.h:
977         * kwq/KWQKHTMLPart.mm:
978         (KWQKHTMLPart::getAppletInstanceForView):
979         * kwq/WebCoreBridge.h:
980
981 2003-11-19  David Hyatt  <hyatt@apple.com>
982
983         Fix for 3488888, about:blank in iframes doesn't repaint properly.  Fix for 3485478, refreshing a remote
984         page often causes a white flash.  Fix for 3488827, XML/XHTML documents don't fire load events on bodies/framesets.
985         
986         Reviewed by darin
987         
988         * khtml/html/html_documentimpl.cpp:
989         (HTMLDocumentImpl::HTMLDocumentImpl):
990         * khtml/html/html_documentimpl.h:
991         * khtml/rendering/render_canvas.cpp:
992         (RenderCanvas::RenderCanvas):
993         (RenderCanvas::layout):
994         * khtml/xml/dom_docimpl.cpp:
995         (DocumentImpl::DocumentImpl):
996         (DocumentImpl::body):
997         (DocumentImpl::close):
998         * khtml/xml/dom_docimpl.h:
999
1000 2003-11-18  Maciej Stachowiak  <mjs@apple.com>
1001
1002         Reviewed by Darin.
1003
1004         - fixed 3488883 - KIO::TransferJob needs to really use signals instead of calling loader directly
1005         
1006         * khtml/khtml_part.cpp:
1007         (KHTMLPart::openURL):
1008         * khtml/misc/loader.cpp:
1009         (Loader::servePendingRequests):
1010         (Loader::slotReceivedResponse):
1011         * khtml/misc/loader.h:
1012         * kwq/KWQKJobClasses.h:
1013         * kwq/KWQKJobClasses.mm:
1014         (KIO::TransferJob::TransferJob):
1015         (KIO::TransferJob::url):
1016         (KIO::TransferJob::emitData):
1017         (KIO::TransferJob::emitRedirection):
1018         (KIO::TransferJob::emitResult):
1019         (KIO::TransferJob::emitReceivedResponse):
1020         * kwq/KWQLoader.mm:
1021         (KWQServeRequest):
1022         * kwq/KWQObject.mm:
1023         (QObject::connect):
1024         * kwq/KWQResourceLoader.h:
1025         * kwq/KWQResourceLoader.mm:
1026         (-[KWQResourceLoader receivedResponse:]):
1027         (-[KWQResourceLoader addData:]):
1028         (-[KWQResourceLoader finishJobAndHandle]):
1029         * kwq/KWQSignal.h:
1030         * kwq/KWQSignal.mm:
1031         (KWQSignal::call):
1032         * kwq/KWQSlot.h:
1033         * kwq/KWQSlot.mm:
1034         (KWQSlot::KWQSlot):
1035         (KWQSlot::call):
1036
1037 2003-11-18  David Hyatt  <hyatt@apple.com>
1038
1039         Fix for 3488244, marquee-increments with percentage values not handled correctly.  Also added a tweak to ensure
1040         that 1% of a small value ends up being at least an increment of 1.  Also added an optimization to not even
1041         bother kicking off the marquee timer if the increment's initial value is 0 (matches WinIE).
1042
1043         * khtml/rendering/render_layer.cpp:
1044         (Marquee::start):
1045         (Marquee::timerEvent):
1046
1047 2003-11-18  Richard Williamson   <rjw@apple.com>
1048
1049         More live connect stuff.  We're getting close.
1050
1051         Reviewed by Chris.
1052
1053         * WebCore.pbproj/project.pbxproj:
1054         * khtml/ecma/kjs_html.cpp:
1055         (KJS::HTMLElement::tryGet):
1056         * khtml/html/html_objectimpl.cpp:
1057         (HTMLAppletElementImpl::parseAttribute):
1058         (HTMLAppletElementImpl::getAppletInstance):
1059         * khtml/html/html_objectimpl.h:
1060
1061 2003-11-18  David Hyatt  <hyatt@apple.com>
1062
1063         Fix for 3478122, crash using first-letter and zooming, and also the fix for 3478078, generated content
1064         does not get removed properly on w3c site.  The root cause of these two bugs was the same, namely my
1065         change to meld the concept of generated anonymous content and anonymous blocks created by the layout
1066         engine together.  RenderBlock's setStyle method was incorrectly updating before/after/first-letter content
1067         and wiping out its style in random (and bad) ways.
1068         
1069         * khtml/rendering/render_block.cpp:
1070         (khtml::RenderBlock::setStyle):
1071
1072 2003-11-18  David Hyatt  <hyatt@apple.com>
1073
1074         Fix for 3487424, images not painting because of dropped layouts.  When replaced elements dirtied
1075         themselves during line layout, they only needed to do a local dirty and not walk up the parent chain.
1076         
1077         Reviewed by mjs
1078
1079         * khtml/rendering/bidi.cpp:
1080         (khtml::RenderBlock::layoutInlineChildren):
1081
1082 2003-11-17  Maciej Stachowiak  <mjs@apple.com>
1083
1084         Reviewed by Dave.
1085
1086         - fixed 3486991 - Add XMLHttpRequest object and stub methods
1087
1088         * khtml/ecma/kjs_window.cpp:
1089         (Window::get): Handle XMLHttpRequest constructor like Option and Image.
1090         * khtml/ecma/kjs_window.h: Ditto.
1091         * khtml/ecma/kjs_window.lut.h: Regenerated.
1092         * khtml/ecma/xmlhttprequest.cpp: Added. Stub implementations of everything.
1093         (KJS::XMLHttpRequestConstructorImp::XMLHttpRequestConstructorImp):
1094         (KJS::XMLHttpRequestConstructorImp::implementsConstruct):
1095         (KJS::XMLHttpRequestConstructorImp::construct):
1096         (KJS::XMLHttpRequest::tryGet):
1097         (KJS::XMLHttpRequest::getValueProperty):
1098         (KJS::XMLHttpRequest::tryPut):
1099         (KJS::XMLHttpRequest::putValue):
1100         (KJS::XMLHttpRequest::notifyFinished):
1101         (KJS::XMLHttpRequest::XMLHttpRequest):
1102         (KJS::XMLHttpRequest::~XMLHttpRequest):
1103         (KJS::XMLHttpRequestProtoFunc::tryCall):
1104         * khtml/ecma/xmlhttprequest.h: Added. Stub implementations of everything.
1105         (KJS::XMLHttpRequest::toBoolean):
1106         (KJS::XMLHttpRequest::classInfo):
1107         * khtml/ecma/xmlhttprequest.lut.h: Added.
1108         * khtml/ecma/Makefile.am: Add new .lut.h file.
1109         * WebCore.pbproj/project.pbxproj: Add new files.
1110
1111 2003-11-17  David Hyatt  <hyatt@apple.com>
1112
1113         Fix for 3487136, marquees reset when you return to a page in the b/f cache.  This patch makes
1114         marquees suspend and resume properly, so they pick up animating where they left off.
1115         
1116         Reviewed by mjs
1117
1118         * khtml/rendering/render_layer.cpp:
1119         (RenderLayer::suspendMarquees):
1120         (m_direction):
1121         (Marquee::start):
1122         (Marquee::suspend):
1123         * khtml/rendering/render_layer.h:
1124         * kwq/KWQKHTMLPart.mm:
1125         (KWQKHTMLPart::clearTimers):
1126
1127 2003-11-17  Maciej Stachowiak  <mjs@apple.com>
1128
1129         Merged from khtml:
1130         
1131         - fixed 3487324 - CSS url values should be wrapped in "url()" for cssText purposes
1132         
1133     2003-11-07  Dirk Mueller  <mueller@kde.org>
1134          
1135         * css/css_valueimpl.cpp (cssText): wrap uri's into url(). 
1136         Stephan Kulow noted that other browsers do that.
1137         
1138
1139 2003-11-17  David Hyatt  <hyatt@apple.com>
1140
1141         Fix for 3472998, stop a crash on an insanely malformed page.  I had to change the concept of 
1142         "inStrayTableContent" to be a counter, since you could be nested and need to push/pop, and
1143         then I also had to stop from mistakenly popping when I didn't need to.
1144         
1145         Reviewed by rjw
1146
1147         * khtml/html/htmlparser.cpp:
1148         (KHTMLParser::reset):
1149         (KHTMLParser::insertNode):
1150         (KHTMLParser::reopenResidualStyleTags):
1151         (KHTMLParser::popBlock):
1152         (KHTMLParser::popOneBlock):
1153         * khtml/html/htmlparser.h:
1154
1155 2003-11-17  Darin Adler  <darin@apple.com>
1156
1157         Reviewed by Ken.
1158
1159         - did keyboard event cleanup to follow up on the keyCode work I did before
1160         - fixed 3485558: key identifers use lowercase hex, but the W3C document shows uppercase
1161         - fixed 3485564: key identifier for the Return key should be "Enter"
1162         - fixed 3485579: letter keys generate different key identifiers depending on whether the shift key is down
1163         - fixed 3485568: keyboard event modifier key bits are uninitialized; may have incorrect values
1164         - fixed 3481514: which attribute for DOM events reports incorrect value
1165         - fixed 3452569: charCode attribute for DOM events not supported
1166
1167         * khtml/dom/dom2_events.h: Added charCode.
1168         * khtml/dom/dom2_events.cpp:
1169         (UIEvent::keyCode): Call through to KeyboardEventImpl instead of doing the work here;
1170         better factoring.
1171         (UIEvent::charCode): Added. Calls through to KeyboardEventImpl.
1172         (UIEvent::which): Call keyCode in KeyboardEventImpl to share code.
1173
1174         * khtml/ecma/kjs_events.h: Added charCode property for DOMUIEvent.
1175         * khtml/ecma/kjs_events.cpp: (DOMUIEvent::getValueProperty): Added charCode.
1176         * khtml/ecma/kjs_events.lut.h: Regenerated.
1177
1178         * khtml/html/html_formimpl.h:
1179         * khtml/html/html_formimpl.cpp:
1180         (HTMLInputElementImpl::defaultEventHandler): Remove checks for "U+00000d" since we now use "Enter"
1181         for that key; also, we use capitalized hex, so it would have to change to "U+00000D" anyway.
1182         (HTMLSelectElementImpl::defaultEventHandler): Ditto.
1183         * khtml/html/html_inlineimpl.cpp: (HTMLAnchorElementImpl::defaultEventHandler): Ditto.
1184
1185         * khtml/khtmlview.cpp: (KHTMLView::keyPressEvent): Put !APPLE_CHANGES around code we are not
1186         using. It was doing a switch based on Qt key codes, but the key value it was using to check
1187         was a Macintosh virtual key code, which could yield strange results when the codes happen to
1188         match. Safer and smaller code size not to do any of it at all.
1189
1190         * khtml/rendering/render_form.cpp:
1191         (RenderLineEdit::RenderLineEdit): Use a KLineEdit instead of LineEditWidget for APPLE_CHANGES.
1192         Allows us to put !APPLE_CHANGES around more Qt key code stuff.
1193         (RenderLineEdit::select): Cast to KLineEdit instead of LineEditWidget.
1194         (ComboBoxWidget::event): Put !APPLE_CHANGES around more unneeded Qt key code stuff.
1195         (TextAreaWidget::event): Put !APPLE_CHANGES around more unneeded Qt key code stuff.
1196
1197         * khtml/xml/dom2_eventsimpl.h: Made id() const and added keyCode() and charCode().
1198         * khtml/xml/dom2_eventsimpl.cpp:
1199         (KeyboardEventImpl::KeyboardEventImpl): Initialize all fields in the empty constructor.
1200         Initialize all the modifier bits in the main constructor; the old code assumed they started
1201         off false, which is not a safe assumption. Also set m_altGraphKey false. Eliminated the
1202         unneeded check of text() before calling identifier(). Also adapted for the name change from
1203         identifier() to keyIdentifier().
1204         (KeyboardEventImpl::keyCode): Added. Returns the Windows virtual key code for keydown and
1205         keyup events, and the Unicode character for all other events.
1206         (KeyboardEventImpl::charCode): Added. Returns the Unicode character.
1207
1208         * kwq/KWQEvent.h: Changed QCustomEvent to be a typedef for QEvent.
1209         (QEvent::QEvent): Removed AccelAvailable, and added KParts, so I could remove some ugly
1210         constants from the KParts code.
1211         (QMouseEvent::button): Use a cast here since the field is now int.
1212         (QMouseEvent::state): Use a cast here since the field is now int.
1213         (QMouseEvent::stateAfter): Use a cast here since the field is now int, and use the new
1214         _stateAfter field.
1215         (QTimerEvent::QTimerEvent): Moved the constructor to be inline since it's so simple.
1216         (QKeyEvent::QKeyEvent): Removed type and button state parameters, now unneeded.
1217         Also removed now-unused _key, _ascii, and _count fields, and key(), ascii(),
1218         and count() functions.
1219         (QKeyEvent::state): Made inline.
1220         (QKeyEvent::isAccepted): Made inline.
1221         (QKeyEvent::text): Made inline.
1222         (QKeyEvent::isAutoRepeat): Made inline.
1223         (QKeyEvent::accept): Made inline.
1224         (QKeyEvent::ignore): Made inline.
1225         (QKeyEvent::unmodifiedText): Made inline.
1226         (QKeyEvent::keyIdentifier): Made inline and chnaged name from identifier().
1227         * kwq/KWQEvent.mm:
1228         (keyIdentifierForKeyEvent): Renamed from identifierForKeyText and changed parameter
1229         to be the event. Cleaned up the code a little bit, and wrote a comment or two.
1230         Changed from lowercase hex to uppercase, and called toupper on the key so that
1231         letter a-z would work properly. (A non-Unicode toupper is just the ticket here,
1232         because I am only sure we want to do this for a-z, not other lowercase characters.)
1233         (isKeypadEvent): Added. Uses virtual key codes to decide if a key event is a keypad
1234         event, so we can set the state flag correctly.
1235         (WindowsKeyCodeForKeyEvent): Added Clear key to the switch statement; it was missing.
1236         Changed to no longe use the characterCode helper function since this was the only
1237         place it was needed.
1238         (mouseButtonForEvent): Added. Similar logic to what was in KWQKHTMLPart before; better
1239         factoring to have it in here.
1240         (nonMouseButtonsForEvent): Ditto.
1241         (QMouseEvent::QMouseEvent): Rewrote constructors. One matches the one from Qt that's
1242         used in some places in KHTML code. The other takes an NSEvent and uses the new functions
1243         above to compute the button and state.
1244         (QKeyEvent::QKeyEvent): Computer type based on the passed-in NSEvent. Compute the
1245         auto-repeat flag based on the event and also the "forceAutoRepeat" parameter. Compute
1246         the button state based on the event too.
1247
1248         * kwq/KWQKHTMLPart.h: Remove buttonForCurrentEvent and stateForCurrentEvent. Both
1249         are now in KWQEvent.mm.
1250         * kwq/KWQKHTMLPart.mm:
1251         (KWQKHTMLPart::keyEvent): Remove extra parameters in code that creates QKeyEvent, now
1252         that QKeyEvent can handle everything itself.
1253         (KWQKHTMLPart::mouseDown): Same thing as above, only for QMouseEvent.
1254         (KWQKHTMLPart::mouseDragged): Ditto.
1255         (KWQKHTMLPart::mouseUp): Ditto.
1256         (KWQKHTMLPart::mouseMoved): Ditto.
1257         (KWQKHTMLPart::sendContextMenuEvent): Ditto.
1258
1259         * kwq/KWQKPartsEvent.h: Tweaked the class around a little so it can work without
1260         taking advantage of QCustomEvent's data pointer.
1261         * kwq/KWQKPartsEvent.mm:
1262         (KParts::Event::Event): Changed so it does a strdup on the event name and uses the
1263         new event type pre-allocated in KWQEvent.h for us.
1264         (KParts::Event::~Event): Free the event name.
1265         (KParts::Event::test): Reimplemented this.
1266
1267         * kwq/KWQKPartsPart.h: (KParts::Part::event): Removed now-unnecessary cast to change
1268         a QCustomEvent into a QEvent.
1269
1270         * kwq/KWQNamespace.h: Removed the Qt::Key enum. All the code that used it was already
1271         broken because of the mixup between Qt and Macintosh key codes.
1272
1273 2003-11-17  Ken Kocienda  <kocienda@apple.com>
1274
1275         Reviewed by Maciej
1276
1277         <rdar://problem/3487079>: Some scheme checks in KURL do not verify 
1278         first char is a legal first char for a scheme
1279
1280         * kwq/KWQKURL.mm:
1281         (KURL::KURL): Added some additional checks when looking through
1282         strings looking for schemes. Now the first character is checked
1283         for validity as a first character in a scheme.
1284
1285 2003-11-17  David Hyatt  <hyatt@apple.com>
1286
1287         Fix for 3486441, don't use the visibleWidth when computing the containingBlockWidth().  No need to
1288         query the view, since the canvas's width has been set to the proper size (when printing).
1289         
1290         Reviewed by john
1291
1292         * khtml/rendering/render_box.cpp:
1293         (RenderBox::containingBlockWidth):
1294
1295 2003-11-17  Maciej Stachowiak  <mjs@apple.com>
1296
1297         Reviewed by Darin.
1298
1299         - fixed 3413713 - iframe forms posting fails without initial src attribute value
1300
1301         * khtml/rendering/render_frames.cpp:
1302         (RenderPartObject::updateWidget): If the new part is for "about:blank",
1303         set the document base URL to parent's base URL.
1304         * kwq/KWQKHTMLPart.mm:
1305         (KWQKHTMLPart::createEmptyDocument): If this part is an
1306         iframe, set the document base URL to the parent's base URL.
1307
1308 2003-11-17  Darin Adler  <darin@apple.com>
1309
1310         Reviewed by John.
1311
1312         - fixed 3485925: Safari does not correctly parse eight-digit hex character entities
1313
1314         * khtml/html/htmltokenizer.cpp: (HTMLTokenizer::parseEntity): Replaced puzzling variable limit
1315         on number of hexadecimal characters to parse with an 8-character limit.
1316
1317 2003-11-17  Darin Adler  <darin@apple.com>
1318
1319         Reviewed by John.
1320
1321         - fixed 3485572 -- secure form check in KHTML uses case-sensitive comparison with "https"
1322
1323         * khtml/html/html_formimpl.h:
1324         * khtml/html/html_formimpl.cpp: (HTMLFormElementImpl::formWouldHaveSecureSubmission):
1325         Changed to take a DOMString reference for slightly better efficiency, and to use startsWith
1326         so the prefix check is not case sensitive and for slightly better efficiency and clarity
1327         than calling latin1() and using strncmp.
1328
1329 2003-11-17  Maciej Stachowiak  <mjs@apple.com>
1330
1331         - commit updated .lut.h file that I forgot to commit before
1332
1333         * khtml/ecma/kjs_window.lut.h:
1334
1335 2003-11-17  Maciej Stachowiak  <mjs@apple.com>
1336
1337         Reviewed by Darin.
1338
1339         - fixed 3382829 - Safari won't load script src javascript if done by a document.write followed by document.close
1340         
1341         * khtml/xml/dom_docimpl.cpp:
1342         (DocumentImpl::closeInternal): Don't delete the tokenizer if it's
1343         waiting for scripts. It will get destroyed later when the part
1344         gets all subresources and closes the document.
1345         * khtml/html/htmltokenizer.cpp:
1346         (HTMLTokenizer::isWaitingForScripts): Added.
1347         * khtml/html/htmltokenizer.h: Prototyped.
1348         * khtml/xml/xml_tokenizer.cpp:
1349         (XMLTokenizer::isWaitingForScripts): Added.
1350         * khtml/xml/xml_tokenizer.h: Prototyped.
1351
1352 2003-11-17  David Hyatt  <hyatt@apple.com>
1353
1354         Fix for 3480108, crash because of the wrong malformedTableParent when stray content is placed inside
1355         a <tr>.
1356         
1357         Reviewed by john
1358
1359         * khtml/html/htmlparser.cpp:
1360         (KHTMLParser::popBlock):
1361
1362 2003-11-17  Maciej Stachowiak  <mjs@apple.com>
1363
1364         Reviewed by Dave.
1365
1366         - fixed 3397494 - FileMaker: Setting option object text fails if created without text
1367         
1368         * khtml/html/html_formimpl.cpp:
1369         (HTMLOptionElementImpl::childrenChanged): Update the select element.
1370         This ends up getting called when you add a text node to an option that
1371         didn't used to have one.
1372         * khtml/html/html_formimpl.h: Prototype it.
1373
1374 2003-11-17  Ken Kocienda  <kocienda@apple.com>
1375
1376         Reviewed by Maciej
1377
1378         Fix for this bug:
1379
1380         <rdar://problem/3480023>: Links don't work if there's a colon in the URL
1381
1382         The colon in the URL was confusing KURL. I modified some checks in
1383         KURL so that its search for schemes stops when a non-scheme 
1384         character is found rather than when a path end segment character
1385         is found.
1386
1387         * kwq/KWQKURL.mm: Added a new Colon class to the table of characters.
1388         (isSchemeCharOrColon): New helper.
1389         (KURL::KURL): Call on new helper when looking for a scheme.
1390         (KURL::findHostnameInHierarchicalURL): Ditto.
1391
1392 2003-11-17  David Hyatt  <hyatt@apple.com>
1393
1394         Fix for 2931829, lines with hyphens should break on the hyphens.  Match WinIE's behavior of
1395         breaking on - and ?.
1396         
1397         Reviewed by john
1398
1399         * khtml/rendering/break_lines.cpp:
1400         (khtml::isBreakable):
1401
1402 2003-11-17  David Hyatt  <hyatt@apple.com>
1403
1404         Fix for 3415771, Safari should use mini form controls when necessary.  This patch adds heuristics for
1405         swapping in mini form controls and also drops intrinsic margins when mini form controls are used.
1406
1407         Fix for 3486454, options/optgroups should strip leading/trailing space.
1408         
1409         Together these two fixes solve 3486581, travelocity misrenders because form controls are too large.
1410
1411         Reviewed by Darin
1412
1413         Also fixing 3474994, alink needs to be restricted to actual links and not all <a> tags.
1414
1415         Reviewed by John
1416
1417         Finally, adding :active outlines around <input type=image> (covered by the old bug 3141767).
1418
1419         * khtml/css/cssstyleselector.cpp:
1420         (khtml::CSSStyleSelector::CSSStyleSelector):
1421         (khtml::CSSStyleSelector::applyRule):
1422         (khtml::CSSStyleSelector::checkForGenericFamilyChange):
1423         (khtml::CSSStyleSelector::getComputedSizeFromSpecifiedSize):
1424         (khtml::):
1425         (khtml::CSSStyleSelector::fontSizeForKeyword):
1426         (khtml::CSSStyleSelector::largerFontSize):
1427         (khtml::CSSStyleSelector::smallerFontSize):
1428         * khtml/css/cssstyleselector.h:
1429         * khtml/css/html4.css:
1430         * khtml/html/html_baseimpl.cpp:
1431         (HTMLBodyElementImpl::parseAttribute):
1432         * khtml/khtml_part.cpp:
1433         (KHTMLPart::setZoomFactor):
1434         * khtml/rendering/render_form.cpp:
1435         (RenderFormElement::addIntrinsicMarginsIfAllowed):
1436         (RenderSelect::updateFromElement):
1437         * khtml/xml/dom_docimpl.cpp:
1438         (DocumentImpl::recalcStyle):
1439         (DocumentImpl::attach):
1440         * kwq/KWQButton.mm:
1441         (KWQNSControlSizeForFont):
1442
1443 2003-11-17  David Hyatt  <hyatt@apple.com>
1444
1445         Back out my change to exclude text runs from getting a relayout on a style change.  I totally forgot about
1446         text zooming.
1447         
1448         * khtml/rendering/render_object.cpp:
1449         (RenderObject::setStyle):
1450
1451 2003-11-16  Maciej Stachowiak  <mjs@apple.com>
1452
1453         Reviewed by Dave.
1454
1455         <rdar://problem/3131664>: add support for the window.print() command used for "print this page" buttons
1456         
1457         * khtml/ecma/kjs_window.cpp:
1458         (Window::get): add support for window.print (Apple-only)
1459         (WindowFunc::tryCall): ditto
1460         * khtml/ecma/kjs_window.h: Add Print to enum
1461         * khtml/ecma/kjs_window.lut.h: Regenerated
1462         * kwq/KWQKHTMLPart.mm:
1463         (KWQKHTMLPart::print): Call bridge.
1464         * kwq/KWQKHTMLPart.h: Declare above.
1465         * kwq/WebCoreBridge.h: prototype print method for other side of bridge.
1466
1467 2003-11-16  Maciej Stachowiak  <mjs@apple.com>
1468
1469         Reviewed by Darin.
1470
1471         * kwq/KWQKHTMLPartBrowserExtension.mm:
1472         (KHTMLPartBrowserExtension::createNewWindow): Check for the
1473         returned part being NULL, not the out value pointer.
1474
1475 2003-11-16  David Hyatt  <hyatt@apple.com>
1476
1477         Fix for 3485779, <input type=image> and <button> should not be mouse focusable.
1478
1479         Fix for 3485795, <input type=image> and <button> are being treated like links when they should not be.
1480
1481         Fix for 3485817, <input type=image> and <button> should obey full keyboard access mode.
1482
1483         Fix for 3485802, fieldset/legend/option/optgroup/label should not be focusable at all.
1484         
1485         Reviewed by kocienda
1486
1487         * ChangeLog:
1488         * khtml/html/html_formimpl.cpp:
1489         (HTMLGenericFormElementImpl::isKeyboardFocusable):
1490         (HTMLGenericFormElementImpl::isMouseFocusable):
1491         (HTMLFieldSetElementImpl::isFocusable):
1492         (HTMLLabelElementImpl::isFocusable):
1493         (HTMLLegendElementImpl::isFocusable):
1494         (HTMLOptGroupElementImpl::isFocusable):
1495         (HTMLOptionElementImpl::HTMLOptionElementImpl):
1496         (HTMLOptionElementImpl::isFocusable):
1497         * khtml/html/html_formimpl.h:
1498         * khtml/html/html_inlineimpl.cpp:
1499         (HTMLAnchorElementImpl::isMouseFocusable):
1500         (HTMLAnchorElementImpl::isKeyboardFocusable):
1501         * khtml/html/html_inlineimpl.h:
1502         * khtml/khtml_part.cpp:
1503         (KHTMLPart::tabsToLinks):
1504         (KHTMLPart::tabsToAllControls):
1505         * khtml/khtml_part.h:
1506         * kwq/KWQKHTMLPart.h:
1507         * kwq/KWQKHTMLPart.mm:
1508         (KWQKHTMLPart::nextKeyViewInFrame):
1509         (KWQKHTMLPart::tabsToLinks):
1510         (KWQKHTMLPart::tabsToAllControls):
1511
1512 2003-11-16  Maciej Stachowiak  <mjs@apple.com>
1513
1514         Reviewed by Dave.
1515
1516         - fixed 3484723 - name property of window reference from window.open call is always empty
1517         
1518         * kwq/KWQKHTMLPartBrowserExtension.mm:
1519         (KHTMLPartBrowserExtension::createNewWindow): Set the part name on the khtml side when
1520         making a new window.
1521
1522 2003-11-16  David Hyatt  <hyatt@apple.com>
1523
1524         Fix for 3485766.
1525         
1526         Make sure DOM elements that are programmatically focused at a time when they have no render objects restore the
1527         focus to their widgets when render objects get built.
1528         
1529         Reviewed by darin
1530
1531         * khtml/html/html_formimpl.cpp:
1532         (HTMLGenericFormElementImpl::attach):
1533
1534 2003-11-16  David Hyatt  <hyatt@apple.com>
1535
1536         Add border info to the render tree dumper.
1537
1538         * khtml/rendering/render_style.h:
1539         (khtml::BorderValue::operator!=):
1540         * kwq/KWQRenderTreeDebug.cpp:
1541         (printBorderStyle):
1542         (operator<<):
1543         * layout-tests/apple-only/base/bugzilla.mozilla.org/index-expected.txt:
1544         * layout-tests/apple-only/base/home.netscape.com/index-expected.txt:
1545         * layout-tests/apple-only/base/lxr.mozilla.org/index-expected.txt:
1546         * layout-tests/apple-only/base/my.netscape.com/index-expected.txt:
1547         * layout-tests/apple-only/base/news.cnet.com/index-expected.txt:
1548         * layout-tests/apple-only/base/web.icq.com/index-expected.txt:
1549         * layout-tests/apple-only/base/www.altavista.com/index-expected.txt:
1550         * layout-tests/apple-only/base/www.amazon.com/index-expected.txt:
1551         * layout-tests/apple-only/base/www.cnn.com/index-expected.txt:
1552         * layout-tests/apple-only/base/www.digitalcity.com/index-expected.txt:
1553         * layout-tests/apple-only/base/www.ebay.com/index-expected.txt:
1554         * layout-tests/apple-only/base/www.excite.com/index-expected.txt:
1555         * layout-tests/apple-only/base/www.expedia.com/index-expected.txt:
1556         * layout-tests/apple-only/base/www.iplanet.com/index-expected.txt:
1557         * layout-tests/apple-only/base/www.mapquest.com/index-expected.txt:
1558         * layout-tests/apple-only/base/www.microsoft.com/index-expected.txt:
1559         * layout-tests/apple-only/base/www.moviefone.com/index-expected.txt:
1560         * layout-tests/apple-only/base/www.msn.com/index-expected.txt:
1561         * layout-tests/apple-only/base/www.msnbc.com/index-expected.txt:
1562         * layout-tests/apple-only/base/www.nytimes.com/index-expected.txt:
1563         * layout-tests/apple-only/base/www.nytimes.com_Table/index-expected.txt:
1564         * layout-tests/apple-only/base/www.quicken.com/index-expected.txt:
1565         * layout-tests/apple-only/base/www.sun.com/index-expected.txt:
1566         * layout-tests/apple-only/base/www.time.com/index-expected.txt:
1567         * layout-tests/apple-only/base/www.travelocity.com/index-expected.txt:
1568         * layout-tests/apple-only/base/www.w3.org_DOML2Core/index-expected.txt:
1569         * layout-tests/apple-only/base/www.yahoo.com/index-expected.txt:
1570         * layout-tests/apple-only/base/www.zdnet.com/index-expected.txt:
1571         * layout-tests/apple-only/base/www.zdnet.com_Gamespot.com/index-expected.txt:
1572         * layout-tests/css1/basic/class_as_selector-expected.txt:
1573         * layout-tests/css1/basic/comments-expected.txt:
1574         * layout-tests/css1/basic/containment-expected.txt:
1575         * layout-tests/css1/basic/contextual_selectors-expected.txt:
1576         * layout-tests/css1/basic/grouping-expected.txt:
1577         * layout-tests/css1/basic/id_as_selector-expected.txt:
1578         * layout-tests/css1/basic/inheritance-expected.txt:
1579         * layout-tests/css1/box_properties/acid_test-expected.txt:
1580         * layout-tests/css1/box_properties/border-expected.txt:
1581         * layout-tests/css1/box_properties/border_bottom-expected.txt:
1582         * layout-tests/css1/box_properties/border_bottom_inline-expected.txt:
1583         * layout-tests/css1/box_properties/border_bottom_width-expected.txt:
1584         * layout-tests/css1/box_properties/border_bottom_width_inline-expected.txt:
1585         * layout-tests/css1/box_properties/border_color-expected.txt:
1586         * layout-tests/css1/box_properties/border_color_inline-expected.txt:
1587         * layout-tests/css1/box_properties/border_inline-expected.txt:
1588         * layout-tests/css1/box_properties/border_left-expected.txt:
1589         * layout-tests/css1/box_properties/border_left_inline-expected.txt:
1590         * layout-tests/css1/box_properties/border_left_width-expected.txt:
1591         * layout-tests/css1/box_properties/border_left_width_inline-expected.txt:
1592         * layout-tests/css1/box_properties/border_right-expected.txt:
1593         * layout-tests/css1/box_properties/border_right_inline-expected.txt:
1594         * layout-tests/css1/box_properties/border_right_width-expected.txt:
1595         * layout-tests/css1/box_properties/border_right_width_inline-expected.txt:
1596         * layout-tests/css1/box_properties/border_style-expected.txt:
1597         * layout-tests/css1/box_properties/border_style_inline-expected.txt:
1598         * layout-tests/css1/box_properties/border_top-expected.txt:
1599         * layout-tests/css1/box_properties/border_top_inline-expected.txt:
1600         * layout-tests/css1/box_properties/border_top_width-expected.txt:
1601         * layout-tests/css1/box_properties/border_top_width_inline-expected.txt:
1602         * layout-tests/css1/box_properties/border_width-expected.txt:
1603         * layout-tests/css1/box_properties/border_width_inline-expected.txt:
1604         * layout-tests/css1/box_properties/clear-expected.txt:
1605         * layout-tests/css1/box_properties/clear_float-expected.txt:
1606         * layout-tests/css1/box_properties/float-expected.txt:
1607         * layout-tests/css1/box_properties/float_elements_in_series-expected.txt:
1608         * layout-tests/css1/box_properties/float_margin-expected.txt:
1609         * layout-tests/css1/box_properties/float_on_text_elements-expected.txt:
1610         * layout-tests/css1/box_properties/height-expected.txt:
1611         * layout-tests/css1/box_properties/margin-expected.txt:
1612         * layout-tests/css1/box_properties/margin_bottom-expected.txt:
1613         * layout-tests/css1/box_properties/margin_bottom_inline-expected.txt:
1614         * layout-tests/css1/box_properties/margin_inline-expected.txt:
1615         * layout-tests/css1/box_properties/margin_left-expected.txt:
1616         * layout-tests/css1/box_properties/margin_left_inline-expected.txt:
1617         * layout-tests/css1/box_properties/margin_right-expected.txt:
1618         * layout-tests/css1/box_properties/margin_right_inline-expected.txt:
1619         * layout-tests/css1/box_properties/margin_top-expected.txt:
1620         * layout-tests/css1/box_properties/margin_top_inline-expected.txt:
1621         * layout-tests/css1/box_properties/padding-expected.txt:
1622         * layout-tests/css1/box_properties/padding_bottom-expected.txt:
1623         * layout-tests/css1/box_properties/padding_bottom_inline-expected.txt:
1624         * layout-tests/css1/box_properties/padding_inline-expected.txt:
1625         * layout-tests/css1/box_properties/padding_left-expected.txt:
1626         * layout-tests/css1/box_properties/padding_left_inline-expected.txt:
1627         * layout-tests/css1/box_properties/padding_right-expected.txt:
1628         * layout-tests/css1/box_properties/padding_right_inline-expected.txt:
1629         * layout-tests/css1/box_properties/padding_top-expected.txt:
1630         * layout-tests/css1/box_properties/padding_top_inline-expected.txt:
1631         * layout-tests/css1/box_properties/width-expected.txt:
1632         * layout-tests/css1/cascade/cascade_order-expected.txt:
1633         * layout-tests/css1/cascade/important-expected.txt:
1634         * layout-tests/css1/classification/display-expected.txt:
1635         * layout-tests/css1/classification/list_style-expected.txt:
1636         * layout-tests/css1/classification/list_style_image-expected.txt:
1637         * layout-tests/css1/classification/list_style_position-expected.txt:
1638         * layout-tests/css1/classification/list_style_type-expected.txt:
1639         * layout-tests/css1/classification/white_space-expected.txt:
1640         * layout-tests/css1/color_and_background/background-expected.txt:
1641         * layout-tests/css1/color_and_background/background_attachment-expected.txt:
1642         * layout-tests/css1/color_and_background/background_color-expected.txt:
1643         * layout-tests/css1/color_and_background/background_image-expected.txt:
1644         * layout-tests/css1/color_and_background/background_position-expected.txt:
1645         * layout-tests/css1/color_and_background/background_repeat-expected.txt:
1646         * layout-tests/css1/color_and_background/color-expected.txt:
1647         * layout-tests/css1/conformance/forward_compatible_parsing-expected.txt:
1648         * layout-tests/css1/font_properties/font-expected.txt:
1649         * layout-tests/css1/font_properties/font_family-expected.txt:
1650         * layout-tests/css1/font_properties/font_size-expected.txt:
1651         * layout-tests/css1/font_properties/font_style-expected.txt:
1652         * layout-tests/css1/font_properties/font_variant-expected.txt:
1653         * layout-tests/css1/font_properties/font_weight-expected.txt:
1654         * layout-tests/css1/formatting_model/canvas-expected.txt:
1655         * layout-tests/css1/formatting_model/floating_elements-expected.txt:
1656         * layout-tests/css1/formatting_model/height_of_lines-expected.txt:
1657         * layout-tests/css1/formatting_model/inline_elements-expected.txt:
1658         * layout-tests/css1/formatting_model/replaced_elements-expected.txt:
1659         * layout-tests/css1/formatting_model/vertical_formatting-expected.txt:
1660         * layout-tests/css1/pseudo/anchor-expected.txt:
1661         * layout-tests/css1/pseudo/firstletter-expected.txt:
1662         * layout-tests/css1/pseudo/firstline-expected.txt:
1663         * layout-tests/css1/pseudo/multiple_pseudo_elements-expected.txt:
1664         * layout-tests/css1/pseudo/pseudo_elements_in_selectors-expected.txt:
1665         * layout-tests/css1/text_properties/letter_spacing-expected.txt:
1666         * layout-tests/css1/text_properties/line_height-expected.txt:
1667         * layout-tests/css1/text_properties/text-transform-expected.txt:
1668         * layout-tests/css1/text_properties/text_align-expected.txt:
1669         * layout-tests/css1/text_properties/text_decoration-expected.txt:
1670         * layout-tests/css1/text_properties/text_indent-expected.txt:
1671         * layout-tests/css1/text_properties/text_transform-expected.txt:
1672         * layout-tests/css1/text_properties/vertical_align-expected.txt:
1673         * layout-tests/css1/text_properties/word_spacing-expected.txt:
1674         * layout-tests/css1/units/color_units-expected.txt:
1675         * layout-tests/css1/units/length_units-expected.txt:
1676         * layout-tests/css1/units/percentage_units-expected.txt:
1677         * layout-tests/css1/units/urls-expected.txt:
1678         * layout-tests/fast/block/basic/001-expected.txt:
1679         * layout-tests/fast/block/basic/002-expected.txt:
1680         * layout-tests/fast/block/basic/003-expected.txt:
1681         * layout-tests/fast/block/basic/004-expected.txt:
1682         * layout-tests/fast/block/basic/007-expected.txt:
1683         * layout-tests/fast/block/basic/011-expected.txt:
1684         * layout-tests/fast/block/basic/015-expected.txt:
1685         * layout-tests/fast/block/basic/016-expected.txt:
1686         * layout-tests/fast/block/basic/017-expected.txt:
1687         * layout-tests/fast/block/basic/018-expected.txt:
1688         * layout-tests/fast/block/basic/019-expected.txt:
1689         * layout-tests/fast/block/float/004-expected.txt:
1690         * layout-tests/fast/block/float/005-expected.txt:
1691         * layout-tests/fast/block/float/006-expected.txt:
1692         * layout-tests/fast/block/float/007-expected.txt:
1693         * layout-tests/fast/block/float/012-expected.txt:
1694         * layout-tests/fast/block/float/013-expected.txt:
1695         * layout-tests/fast/block/float/015-expected.txt:
1696         * layout-tests/fast/block/float/016-expected.txt:
1697         * layout-tests/fast/block/float/017-expected.txt:
1698         * layout-tests/fast/block/float/019-expected.txt:
1699         * layout-tests/fast/block/float/021-expected.txt:
1700         * layout-tests/fast/block/float/022-expected.txt:
1701         * layout-tests/fast/block/float/024-expected.txt:
1702         * layout-tests/fast/block/float/025-expected.txt:
1703         * layout-tests/fast/block/float/026-expected.txt:
1704         * layout-tests/fast/block/float/027-expected.txt:
1705         * layout-tests/fast/block/float/028-expected.txt:
1706         * layout-tests/fast/block/margin-collapse/001-expected.txt:
1707         * layout-tests/fast/block/margin-collapse/005-expected.txt:
1708         * layout-tests/fast/block/margin-collapse/006-expected.txt:
1709         * layout-tests/fast/block/margin-collapse/010-expected.txt:
1710         * layout-tests/fast/block/margin-collapse/011-expected.txt:
1711         * layout-tests/fast/block/margin-collapse/012-expected.txt:
1712         * layout-tests/fast/block/margin-collapse/015-expected.txt:
1713         * layout-tests/fast/block/margin-collapse/016-expected.txt:
1714         * layout-tests/fast/block/margin-collapse/017-expected.txt:
1715         * layout-tests/fast/block/margin-collapse/018-expected.txt:
1716         * layout-tests/fast/block/margin-collapse/019-expected.txt:
1717         * layout-tests/fast/block/margin-collapse/020-expected.txt:
1718         * layout-tests/fast/block/margin-collapse/021-expected.txt:
1719         * layout-tests/fast/block/margin-collapse/022-expected.txt:
1720         * layout-tests/fast/block/margin-collapse/024-expected.txt:
1721         * layout-tests/fast/block/margin-collapse/025-expected.txt:
1722         * layout-tests/fast/block/margin-collapse/026-expected.txt:
1723         * layout-tests/fast/block/margin-collapse/027-expected.txt:
1724         * layout-tests/fast/block/margin-collapse/028-expected.txt:
1725         * layout-tests/fast/block/margin-collapse/029-expected.txt:
1726         * layout-tests/fast/block/margin-collapse/030-expected.txt:
1727         * layout-tests/fast/block/margin-collapse/032-expected.txt:
1728         * layout-tests/fast/block/margin-collapse/033-expected.txt:
1729         * layout-tests/fast/block/margin-collapse/034-expected.txt:
1730         * layout-tests/fast/block/margin-collapse/035-expected.txt:
1731         * layout-tests/fast/block/margin-collapse/041-expected.txt:
1732         * layout-tests/fast/block/margin-collapse/042-expected.txt:
1733         * layout-tests/fast/block/margin-collapse/043-expected.txt:
1734         * layout-tests/fast/block/positioning/048-expected.txt:
1735         * layout-tests/fast/block/positioning/049-expected.txt:
1736         * layout-tests/fast/block/positioning/050-expected.txt:
1737         * layout-tests/fast/block/positioning/051-expected.txt:
1738         * layout-tests/fast/block/positioning/056-expected.txt:
1739         * layout-tests/fast/block/positioning/057-expected.txt:
1740         * layout-tests/fast/block/positioning/058-expected.txt:
1741         * layout-tests/fast/block/positioning/auto/001-expected.txt:
1742         * layout-tests/fast/block/positioning/auto/002-expected.txt:
1743         * layout-tests/fast/block/positioning/auto/003-expected.txt:
1744         * layout-tests/fast/block/positioning/auto/004-expected.txt:
1745         * layout-tests/fast/block/positioning/auto/005-expected.txt:
1746         * layout-tests/fast/block/positioning/auto/006-expected.txt:
1747         * layout-tests/fast/clip/013-expected.txt:
1748         * layout-tests/fast/clip/014-expected.txt:
1749         * layout-tests/fast/css-generated-content/006-expected.txt:
1750         * layout-tests/fast/css/003-expected.txt:
1751         * layout-tests/fast/css/004-expected.txt:
1752         * layout-tests/fast/css/005-expected.txt:
1753         * layout-tests/fast/dynamic/002-expected.txt:
1754         * layout-tests/fast/dynamic/004-expected.txt:
1755         * layout-tests/fast/encoding/utf-16-big-endian-expected.txt:
1756         * layout-tests/fast/encoding/utf-16-little-endian-expected.txt:
1757         * layout-tests/fast/flexbox/007-expected.txt:
1758         * layout-tests/fast/flexbox/008-expected.txt:
1759         * layout-tests/fast/flexbox/009-expected.txt:
1760         * layout-tests/fast/flexbox/011-expected.txt:
1761         * layout-tests/fast/flexbox/016-expected.txt:
1762         * layout-tests/fast/flexbox/017-expected.txt:
1763         * layout-tests/fast/flexbox/018-expected.txt:
1764         * layout-tests/fast/flexbox/019-expected.txt:
1765         * layout-tests/fast/flexbox/022-expected.txt:
1766         * layout-tests/fast/flexbox/025-expected.txt:
1767         * layout-tests/fast/forms/001-expected.txt:
1768         * layout-tests/fast/forms/002-expected.txt:
1769         * layout-tests/fast/forms/006-expected.txt:
1770         * layout-tests/fast/forms/007-expected.txt:
1771         * layout-tests/fast/forms/form-element-geometry-expected.txt:
1772         * layout-tests/fast/frames/001-expected.txt:
1773         * layout-tests/fast/inline-block/001-expected.txt:
1774         * layout-tests/fast/inline-block/002-expected.txt:
1775         * layout-tests/fast/inline-block/003-expected.txt:
1776         * layout-tests/fast/inline/001-expected.txt:
1777         * layout-tests/fast/invalid/008-expected.txt:
1778         * layout-tests/fast/invalid/014-expected.txt:
1779         * layout-tests/fast/invalid/016-expected.txt:
1780         * layout-tests/fast/lists/001-expected.txt:
1781         * layout-tests/fast/lists/004-expected.txt:
1782         * layout-tests/fast/lists/007-expected.txt:
1783         * layout-tests/fast/overflow/001-expected.txt:
1784         * layout-tests/fast/overflow/002-expected.txt:
1785         * layout-tests/fast/overflow/004-expected.txt:
1786         * layout-tests/fast/replaced/005-expected.txt:
1787         * layout-tests/fast/replaced/006-expected.txt:
1788         * layout-tests/fast/replaced/008-expected.txt:
1789         * layout-tests/fast/selectors/009-expected.txt:
1790         * layout-tests/fast/selectors/014-expected.txt:
1791         * layout-tests/fast/selectors/032-expected.txt:
1792         * layout-tests/fast/selectors/033-expected.txt:
1793         * layout-tests/fast/selectors/039-expected.txt:
1794         * layout-tests/fast/selectors/039b-expected.txt:
1795         * layout-tests/fast/selectors/064-expected.txt:
1796         * layout-tests/fast/selectors/077-expected.txt:
1797         * layout-tests/fast/selectors/077b-expected.txt:
1798         * layout-tests/fast/selectors/078-expected.txt:
1799         * layout-tests/fast/selectors/078b-expected.txt:
1800         * layout-tests/fast/selectors/166a-expected.txt:
1801         * layout-tests/fast/table/003-expected.txt:
1802         * layout-tests/fast/table/004-expected.txt:
1803         * layout-tests/fast/table/005-expected.txt:
1804         * layout-tests/fast/table/006-expected.txt:
1805         * layout-tests/fast/table/007-expected.txt:
1806         * layout-tests/fast/table/008-expected.txt:
1807         * layout-tests/fast/table/009-expected.txt:
1808         * layout-tests/fast/table/015-expected.txt:
1809         * layout-tests/fast/table/017-expected.txt:
1810         * layout-tests/fast/table/018-expected.txt:
1811         * layout-tests/fast/table/020-expected.txt:
1812         * layout-tests/fast/table/023-expected.txt:
1813         * layout-tests/fast/table/025-expected.txt:
1814         * layout-tests/fast/table/027-expected.txt:
1815         * layout-tests/fast/table/028-expected.txt:
1816         * layout-tests/fast/table/029-expected.txt:
1817         * layout-tests/fast/table/030-expected.txt:
1818         * layout-tests/fast/table/035-expected.txt:
1819         * layout-tests/fast/table/036-expected.txt:
1820         * layout-tests/fast/table/038-expected.txt:
1821         * layout-tests/fast/table/border-collapsing/001-expected.txt:
1822         * layout-tests/fast/table/border-collapsing/002-expected.txt:
1823         * layout-tests/fast/table/border-collapsing/003-expected.txt:
1824         * layout-tests/fast/table/border-collapsing/004-expected.txt:
1825         * layout-tests/fast/table/large-width-expected.txt:
1826         * layout-tests/fast/table/nobr-expected.txt:
1827         * layout-tests/fast/text/basic/001-expected.txt:
1828         * layout-tests/fast/text/basic/003-expected.txt:
1829         * layout-tests/fast/text/basic/004-expected.txt:
1830         * layout-tests/fast/text/basic/005-expected.txt:
1831         * layout-tests/fast/text/basic/006-expected.txt:
1832         * layout-tests/fast/text/basic/007-expected.txt:
1833         * layout-tests/fast/text/basic/012-expected.txt:
1834         * layout-tests/fast/text/firstline/002-expected.txt:
1835         * layout-tests/fast/text/whitespace/002-expected.txt:
1836         * layout-tests/fast/text/whitespace/003-expected.txt:
1837         * layout-tests/fast/text/whitespace/020-expected.txt:
1838         * layout-tests/fast/text/whitespace/023-expected.txt:
1839         * layout-tests/fast/text/whitespace/024-expected.txt:
1840         * layout-tests/fast/text/whitespace/025-expected.txt:
1841         * layout-tests/fast/text/whitespace/027-expected.txt:
1842
1843 2003-11-16  Maciej Stachowiak  <mjs@apple.com>
1844
1845         Reviewed by John.
1846
1847         - fixed 3362841 - javascript History Object length property is always 0
1848
1849         * kwq/KWQKPartsBrowserInterface.mm:
1850         (KParts::BrowserInterface::property): For the historyLength property,
1851         retturn a UInt variant, not Int, because that's what the kjs_window code
1852         expects.
1853
1854 2003-11-14  Maciej Stachowiak  <mjs@apple.com>
1855
1856         Reviewed by Ken and Dave.
1857
1858         - fixed 3471925 - getting and setting cssText not implemented
1859
1860         * khtml/css/css_valueimpl.cpp:
1861         (CSSStyleDeclarationImpl::cssText): Implemented by gathering text of all
1862         properties (that are not non-CSS hints), separated with semicolons.
1863         (CSSStyleDeclarationImpl::setCssText): Implemented by clearing all existing
1864         properties (that are not non-CSS hints) and invoking css parser.
1865         (CSSValueListImpl::cssText): Implemented.
1866         (FontValueImpl::cssText): Implemented.
1867         (ShadowValueImpl::cssText): Implemented.
1868         (CSSProperty::cssText): Implemented.
1869         * khtml/css/css_valueimpl.h: Declared new methods; made
1870         CSSValueImpl::cssText() pure virtual; removed CSSValueImpl::setCssText().
1871
1872 2003-11-16  David Hyatt  <hyatt@apple.com>
1873
1874         3485717, Cleanup of the float code.  Eliminated the -khtml-flow-mode style property in favor of two simple methods,
1875         avoidsFloats() and usesLineWidth().  avoidsFloats can be called to tell whether an object does not want
1876         floats to intrude into its space (and that it should also move to avoid floats).  usesLineWidth is called
1877         to find out if an object's containing block width is the line width or the content width, and has all the
1878         right smarts to emulate WinIE's behaviors in both quirks and strict mode.
1879
1880         Also fixed a bug (3485718) where overflow:scroll blocks with auto height did not factor in the horizontal scrollbar's
1881         height (thus causing it to paint on top of content).
1882         
1883         Reviewed by darin
1884
1885         * khtml/css/cssparser.cpp:
1886         (CSSParser::parseValue):
1887         * khtml/css/cssstyleselector.cpp:
1888         (khtml::CSSStyleSelector::applyRule):
1889         * khtml/css/cssvalues.c:
1890         (hash_val):
1891         (findValue):
1892         * khtml/css/cssvalues.h:
1893         * khtml/css/cssvalues.in:
1894         * khtml/css/html4.css:
1895         * khtml/rendering/bidi.cpp:
1896         (khtml::RenderBlock::layoutInlineChildren):
1897         * khtml/rendering/render_block.cpp:
1898         (khtml::RenderBlock::layoutBlock):
1899         (khtml::RenderBlock::layoutBlockChildren):
1900         (khtml::RenderBlock::clearFloats):
1901         * khtml/rendering/render_box.cpp:
1902         (RenderBox::containingBlockWidth):
1903         (RenderBox::calcWidth):
1904         * khtml/rendering/render_object.cpp:
1905         (RenderObject::isHR):
1906         * khtml/rendering/render_object.h:
1907         (khtml::RenderObject::avoidsFloats):
1908         (khtml::RenderObject::usesLineWidth):
1909         * khtml/rendering/render_style.h:
1910         (khtml::RenderStyle::NonInheritedFlags::operator==):
1911         (khtml::RenderStyle::setBitDefaults):
1912         (khtml::RenderStyle::initialTextDecoration):
1913         * khtml/rendering/render_table.cpp:
1914         (RenderTable::calcWidth):
1915
1916 2003-11-14  David Hyatt  <hyatt@apple.com>
1917
1918         Fix for 3485260, regression on Uniview site from incremental repainting.  When appending/inserting child
1919         nodes into the render tree, we need to always mark them as needing layout themselves (and not just as
1920         having children needing layout).  This ensures that the incremental repainting code will know to repaint the
1921         enclosing container (even though that container's size may not change).
1922
1923         Fix for 3411960, block-level replaced elements should avoid floats.
1924
1925         Fix for 3463234, floats should not intrude into overflow blocks (even when siblings happen to get in
1926         between the float and the overflow block).
1927
1928         Fix for 3485576, the containing block for text runs is incorrect.
1929
1930         Fix for 3485577, text runs should not trigger layout when style is re-resolved.
1931         
1932         Reviewed by darin
1933
1934         * khtml/rendering/render_container.cpp:
1935         (RenderContainer::appendChildNode):
1936         (RenderContainer::insertChildNode):
1937         * khtml/rendering/render_box.cpp
1938         * khtml/rendering/render_object.cpp
1939         
1940 2003-11-14  David Hyatt  <hyatt@apple.com>
1941
1942         Fix for 3473707, 100% height positioned divs are too tall.  The padding box wasn't being used like it was
1943         supposed to be when calcing percentage heights.
1944         
1945         Reviewed by kocienda
1946
1947         * khtml/rendering/render_box.cpp:
1948         (RenderBox::calcAbsoluteVertical):
1949
1950 === Safari-114 ===
1951
1952 2003-11-14  Maciej Stachowiak  <mjs@apple.com>
1953
1954         - backed out changes unintentionally commited while the tree was closed
1955
1956         * khtml/css/css_valueimpl.cpp:
1957         * khtml/css/css_valueimpl.h:
1958         * kwq/KWQKPartsBrowserInterface.mm:
1959
1960 2003-11-14  Maciej Stachowiak  <mjs@apple.com>
1961
1962         Reviewed by Ken.
1963
1964         - fixed 3471925 - getting and setting cssText not implemented
1965
1966         * khtml/css/css_valueimpl.cpp:
1967         (CSSStyleDeclarationImpl::cssText): Implemented by gathering text of all
1968         properties, separated with semicolons.
1969         (CSSStyleDeclarationImpl::setCssText): Implemented by clearing all existing
1970         properties and invoking css parser.
1971         (CSSValueListImpl::cssText): Implemented.
1972         (FontValueImpl::cssText): Implemented.
1973         (ShadowValueImpl::cssText): Implemented.
1974         (CSSProperty::cssText): Implemented.
1975         * khtml/css/css_valueimpl.h: Declared new methods; made
1976         CSSValueImpl::cssText() pure virtual; removed
1977         CSSValueImpl::setCssText().
1978
1979 2003-11-14  Darin Adler  <darin@apple.com>
1980
1981         Reviewed by John.
1982
1983         - first half of fix for 3457162 -- selecting text during a page load that blows the text field
1984           away causes a crash
1985
1986         The WebCore part of this fix is to generalize the "defers loading" feature to all mouse clicks,
1987         rather than just doing it for mouse clicks on the combo box.
1988
1989         * kwq/KWQComboBox.mm: (-[KWQPopUpButtonCell trackMouse:inRect:ofView:untilMouseUp:]):
1990         Remove code to defer loading.
1991         * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::passWidgetMouseDownEventToWidget): Put the code here
1992         instead.
1993
1994 2003-11-14  John Sullivan  <sullivan@apple.com>
1995
1996         - fixed <rdar://problem/3483585>: Option-tab in a text field inputs 
1997         a character rather than tabbing to the next widget
1998
1999         Reviewed by Ken.
2000
2001         * kwq/KWQKHTMLPart.h:
2002         * kwq/KWQKHTMLPart.mm:
2003         (KWQKHTMLPart::handleKeyboardOptionTabInView):
2004         New method. If current event is option-tab or option-shift-tab, do
2005         keyboard navigation and return YES.
2006         
2007         * kwq/KWQTextArea.mm:
2008         (-[KWQTextArea textDidChange:]):
2009         Bail out if KWQKHTMLPart::handleKeyboardOptionTabInView returns YES.
2010         
2011         * kwq/KWQTextField.mm:
2012         (-[KWQTextField controlTextDidChange:]):
2013         Bail out if KWQKHTMLPart::handleKeyboardOptionTabInView returns YES.
2014
2015 2003-11-13  Darin Adler  <darin@apple.com>
2016
2017         Reviewed by Dave.
2018
2019         - fixed 3472875 -- REGRESSION (109-110): insertion point does not blink in a nonempty textarea
2020         - fixed 3484002 -- disabling, then enabling a read-only <textarea> will make it editable
2021
2022         * kwq/KWQTextArea.mm:
2023         (-[KWQTextArea setText:]): Call updateTextColor after setting the text.
2024         (-[KWQTextArea setEditable:]): Don't set the NSTextView editable property directly,
2025         because we don't want to make a disabled text view editable right away, but we need
2026         to later if it's enabled.
2027         (-[KWQTextArea isEditable]): Don't get the NSTextView editable property directly,
2028         because it can be appropriate to return YES even if the text view happens to be disabled.
2029         (-[KWQTextAreaTextView initWithFrame:textContainer:]): Initialize editableIfEnabled to YES.
2030         (-[KWQTextAreaTextView setEnabled:]): Don't set the editable state to true if
2031         editableIfEnabled is NO. The old code would make a read-only field editable if you
2032         changed it to be enabled. Also update the color of the text here.
2033         (-[KWQTextAreaTextView setEditableIfEnabled:]): Store the editableIfEnabled state in a
2034         field, and then alter the state of the editable flag to match if we're currently enabled.
2035         (-[KWQTextAreaTextView isEditableIfEnabled]): Return the editableIfEnabled state.
2036         (-[KWQTextAreaTextView updateTextColor]): Update the color of the text. This was done in
2037         drawRect: before, which was the cause of the lack of insertion point.
2038
2039 2003-11-13  Darin Adler  <darin@apple.com>
2040
2041         Reviewed by Dave.
2042
2043         - fixed 3474330 -- tooltips do not work for <area> elements
2044
2045         * kwq/WebCoreBridge.mm: (-[WebCoreBridge elementAtPoint:]): When looking for a title, start
2046         with innerNode (which can be an <area> inside a <map>). This matches what Mozilla does.
2047
2048 2003-11-13  Maciej Stachowiak  <mjs@apple.com>
2049
2050         Reviewed by John.
2051
2052         - fixed - 3479285 - hang at www.saccourt.com
2053         - fixed - 3477088 - (85-112) Safari frozen loading a page at Postal Service site of Taiwan
2054         
2055         * khtml/ecma/kjs_html.cpp:
2056         (KJS::HTMLSelectCollection::tryPut): Use the range-checking
2057         version of the number-conversion function to avoid negative
2058         numbers and NaN.
2059
2060 2003-11-13  Ken Kocienda  <kocienda@apple.com>
2061
2062         Reviewed by John
2063         
2064         Fix for this bug:
2065
2066         <rdar://problem/3483284>: Tabbing to links needs to honor new 
2067         WebKit tab-to-links preference
2068
2069         In addition to fixing the bug, I also did a bit of cleanup
2070         in the code which helps to determine tab order.
2071
2072         Biggest change is to modify the keyboard UI mode function so
2073         that it is a set of flags, rather than a straight-up value.
2074
2075         I also tweaked the names on the keyboard UI mode constants
2076         to make them read better.
2077
2078         * kwq/KWQButton.mm:
2079         (QButton::focusPolicy): Tweaks to make more readable and use 
2080         new model for keyboard UI mode.
2081         * kwq/KWQComboBox.mm:
2082         (QComboBox::focusPolicy): Ditto. Plus, this function was not
2083         blocking exceptions.
2084         * kwq/KWQFileButton.mm:
2085         (KWQFileButton::focusPolicy): Tweaks to make more readable and use 
2086         new model for keyboard UI mode.
2087         * kwq/KWQKHTMLPart.h:
2088         * kwq/KWQKHTMLPart.mm:
2089         (KWQKHTMLPart::nextKeyViewInFrame): Now checks new tabsToLinks
2090         function to determine if links can be tabbed to.
2091         (KWQKHTMLPart::currentEventIsKeyboardOptionTab): New function
2092         checks for option-tab keyboard event.
2093         (KWQKHTMLPart::tabsToLinks): New helper to take keyboard UI mode
2094         and option-tab into account.
2095         (KWQKHTMLPart::keyboardUIMode): Name tweak.
2096         * kwq/KWQListBox.mm: Tweaks to make more readable and use 
2097         new model for keyboard UI mode.
2098         (QListBox::focusPolicy):
2099         * kwq/WebCoreKeyboardAccess.h: Tweaked names. Added WebCoreKeyboardAccessTabsToLinks.
2100
2101 2003-11-13  David Hyatt  <hyatt@apple.com>
2102
2103         Implement a custom unfurl marquee style.
2104         
2105         Reviewed by john
2106
2107         * khtml/css/cssparser.cpp:
2108         (CSSParser::parseValue):
2109         * khtml/css/cssstyleselector.cpp:
2110         (khtml::CSSStyleSelector::applyRule):
2111         * khtml/css/cssvalues.c:
2112         (hash_val):
2113         (findValue):
2114         * khtml/css/cssvalues.h:
2115         * khtml/css/cssvalues.in:
2116         * khtml/rendering/render_box.cpp:
2117         (RenderBox::calcHeight):
2118         * khtml/rendering/render_layer.cpp:
2119         (m_direction):
2120         (Marquee::isUnfurlMarquee):
2121         (Marquee::start):
2122         (Marquee::updateMarqueePosition):
2123         (Marquee::updateMarqueeStyle):
2124         (Marquee::timerEvent):
2125         * khtml/rendering/render_layer.h:
2126         (khtml::):
2127         * khtml/rendering/render_style.h:
2128         (khtml::):
2129
2130 2003-11-13  Ken Kocienda  <kocienda@apple.com>
2131
2132         Reviewed by John
2133
2134         Fix for this bug:
2135
2136         <rdar://problem/3480761>: event object type attribute returns 
2137         khtml_keypress instead of keypress
2138
2139         Fixed string so that it returns keypress instead of khtml_keypress.
2140         While I was at it, I changed the constant used for this event from
2141         KHTML_KEYPRESS_EVENT to KEYPRESS_EVENT.
2142
2143         * khtml/ecma/kjs_binding.cpp:
2144         (ScriptInterpreter::wasRunByUserGesture): Constant name fixup.
2145         * khtml/ecma/kjs_dom.cpp: Ditto.
2146         (DOMNode::getValueProperty): Ditto.
2147         (DOMNode::putValue): Ditto.
2148         * khtml/ecma/kjs_window.cpp:
2149         (Window::get): Ditto.
2150         (Window::put): Ditto.
2151         * khtml/html/html_elementimpl.cpp:
2152         (HTMLElementImpl::parseAttribute): Ditto.
2153         * khtml/html/html_formimpl.cpp:
2154         (HTMLInputElementImpl::defaultEventHandler): Ditto.
2155         (HTMLSelectElementImpl::defaultEventHandler): Ditto.
2156         * khtml/xml/dom2_eventsimpl.cpp:
2157         (EventImpl::idToType): This is the change that fixes the bug.
2158         (KeyboardEventImpl::KeyboardEventImpl): Constant name fixup.
2159         * khtml/xml/dom2_eventsimpl.h:
2160         (DOM::EventImpl::): Ditto.
2161
2162 2003-11-13  Darin Adler  <darin@apple.com>
2163
2164         Reviewed by Ken.
2165
2166         - fixed 3452554 -- keyCode attribute for DOM events reports incorrect value
2167
2168         * khtml/dom/dom2_events.cpp:
2169         (UIEvent::keyCode): Return the Windows key code for keydown and keyup events.
2170         But for other events, return the character code. This matches IE.
2171         (UIEvent::which): Same behavior for now; may need further refinement.
2172
2173         * kwq/KWQEvent.h: Change QEvent to allow copying. The Qt version probably doesn't
2174         allow it, but for us it's no big deal. Our event objects are just data holders.
2175         (QKeyEvent::QKeyEvent): Change parameters; take an NSEvent and figure the rest out
2176         here. Except for now get the type, button state, and auto repeat flag from the caller
2177         because that's a smaller change from how things are done now. I'll take this the next
2178         step later.
2179         * kwq/KWQEvent.mm:
2180         (characterCode): Added. Extracts the character code from the string if it's exactly
2181         1 character long.
2182         (WindowsKeyCode): Added. Given an event, figures out the Windows key code. 
2183         (QKeyEvent::QKeyEvent): Changed to get things from the NSEvent rather than having them
2184         passed individually. One change is that _ascii is now the Unicode value of the first
2185         character in the string. This causes us to return the Unicode value from keyCode for
2186         keypress events. Another change is that we now compute the Windows key code.
2187
2188         * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::keyEvent): Change to use the new QKeyEvent
2189         constructor, passing in the NSEvent.
2190
2191         * khtml/xml/dom2_eventsimpl.cpp: (KeyboardEventImpl::KeyboardEventImpl):
2192         In APPLE_CHANGES, copy the QKeyEvent using the copy constructor rather than
2193         listing the fields. This is easier to maintain when the list of fields changes.
2194
2195         * khtml/rendering/render_form.cpp: (ComboBoxWidget::eventFilter): Put #if
2196         !APPLE_CHANGES around code that constructs a QKeyEvent. We don't ever run this
2197         code, but now we can't compile it either so we need the #if.
2198
2199 2003-11-12  David Hyatt  <hyatt@apple.com>
2200
2201         Fix for 3482132, incremental repainting for layout, i.e., only repaint areas that change when
2202         doing a layout.
2203         
2204         Reviewed by kocienda
2205
2206         * khtml/khtmlview.h:
2207         * khtml/rendering/render_canvas.cpp:
2208         (RenderCanvas::repaintViewRectangle):
2209         * khtml/rendering/render_layer.h:
2210         * khtml/rendering/render_object.cpp:
2211         (RenderObject::setNeedsLayout):
2212         (RenderObject::setChildNeedsLayout):
2213         * khtml/rendering/render_object.h:
2214         * khtml/rendering/render_table.cpp:
2215         (RenderTableSection::layoutRows):
2216
2217 2003-11-12  Ken Kocienda  <kocienda@apple.com>
2218
2219         Reviewed by me
2220         
2221         I am an idiot for just assuming that these elements implement a focus()
2222         function, without actually compiling and testing. I will have to add 
2223         this function to these elements so I can make this work.
2224
2225         * khtml/html/html_formimpl.cpp:
2226         (HTMLButtonElementImpl::accessKeyAction): These elements do not implement focus().
2227         * khtml/html/html_inlineimpl.cpp:
2228         (HTMLAnchorElementImpl::accessKeyAction): Ditto.
2229
2230 2003-11-12  Ken Kocienda  <kocienda@apple.com>
2231
2232         Reviewed by Richard
2233
2234         * khtml/html/html_formimpl.cpp:
2235         (HTMLButtonElementImpl::click): Implemented. Missed this in my earlier patch.
2236         (HTMLButtonElementImpl::accessKeyAction): Added. Focus and click.
2237         (HTMLInputElementImpl::accessKeyAction): Added. Focus the element.
2238         (HTMLSelectElementImpl::accessKeyAction): Added. Focus the element.
2239         (HTMLTextAreaElementImpl::accessKeyAction): Added. Focus the element.
2240         * khtml/html/html_formimpl.h:
2241         * khtml/html/html_inlineimpl.cpp:
2242         (HTMLAnchorElementImpl::accessKeyAction): Added. Focus and click.
2243         * khtml/html/html_inlineimpl.h:
2244         * khtml/xml/dom_docimpl.cpp:
2245         (DocumentImpl::DocumentImpl):
2246         (DocumentImpl::addElementById): Dirty the accesskey dictionary.
2247         (DocumentImpl::removeElementById): Ditto.
2248         (DocumentImpl::getElementByAccessKey): Function to look up an element
2249         based on the key provided.
2250         (DocumentImpl::setDocumentChanged): Dirty the accesskey dictionary.
2251         (DocumentImpl::defaultEventHandler): Check the accesskey dictionary
2252         to see if some element wants to handle a key event.
2253         * khtml/xml/dom_docimpl.h:
2254         * khtml/xml/dom_elementimpl.h:
2255         (DOM::ElementImpl::accessKeyAction): Added. Send a click to the element.
2256
2257 2003-11-12  Ken Kocienda  <kocienda@apple.com>
2258
2259         Reviewed by Richard
2260
2261         Fix for this bug:
2262
2263         <rdar://problem/3481600>: key event objects do not preserve unmodified keys
2264
2265         * khtml/xml/dom2_eventsimpl.cpp: Modified constructor call to include
2266         unmodifiedText.
2267         (KeyboardEventImpl::KeyboardEventImpl):
2268         * kwq/KWQEvent.h: Added unmodifiedText accessor and variable to QKeyEvent.
2269         * kwq/KWQEvent.mm:
2270         (QKeyEvent::QKeyEvent): Modified constructor to include unmodifiedText.
2271         (QKeyEvent::unmodifiedText): Added accessor.
2272         * kwq/KWQKHTMLPart.mm:
2273         (KWQKHTMLPart::keyEvent): Modified constructor call to include
2274         unmodifiedText.
2275
2276 2003-11-12  Ken Kocienda  <kocienda@apple.com>
2277
2278         Reviewed by Maciej
2279
2280         * khtml/html/html_elementimpl.cpp:
2281         (HTMLElementImpl::click): Implemented a programmatic click function for
2282         elements.
2283         * khtml/html/html_elementimpl.h:
2284         * khtml/html/html_formimpl.cpp:
2285         (HTMLFormElementImpl::submitClick): Implemented a programmatic click function for
2286         elements.
2287         (HTMLInputElementImpl::click): This implementation calls through
2288         to Cocoa button programmatic click function to get user interface
2289         feedback for button elements, and calls through to the superclass
2290         for other elements.
2291         * khtml/html/html_formimpl.h:
2292         * khtml/html/html_inlineimpl.cpp: Removed click() function for anchors.
2293         No longer needed.
2294         * khtml/html/html_inlineimpl.h: Ditto.
2295
2296 2003-11-12  David Hyatt  <hyatt@apple.com>
2297
2298         Fix build bustage in deployment builds.
2299
2300         * kwq/KWQLineEdit.mm:
2301         (QLineEdit::hasMarkedText):
2302
2303 2003-11-11  David Hyatt  <hyatt@apple.com>
2304
2305         Fix for 3481134, shorthand parsing in CSS does not fill in omitted values.  The fix is to implement
2306         the CSS3 'initial' value for all properties (covered by 3481323), and then to fill in the omitted 
2307         values with the 'initial' value.
2308
2309         This patch also fixes two bugs in the style system: 3481324, collapsed borders with border-style: none
2310         should always return a width of 0, and 3481322, 'clip' not inheriting properly in CSS when explicit
2311         inheritance is used.
2312         
2313         Reviewed by mjs
2314
2315         * khtml/css/css_valueimpl.cpp:
2316         (CSSInitialValueImpl::cssText):
2317         * khtml/css/css_valueimpl.h:
2318         (DOM::CSSInitialValueImpl::cssValueType):
2319         * khtml/css/cssparser.cpp:
2320         (CSSParser::parseValue):
2321         (CSSParser::parseShortHand):
2322         * khtml/css/cssstyleselector.cpp:
2323         (khtml::CSSStyleSelector::applyRule):
2324         * khtml/css/cssvalues.c:
2325         (hash_val):
2326         (findValue):
2327         * khtml/css/cssvalues.h:
2328         * khtml/css/cssvalues.in:
2329         * khtml/dom/css_value.h:
2330         (DOM::CSSValue::):
2331         * khtml/rendering/render_style.cpp:
2332         (StyleBoxData::StyleBoxData):
2333         (StyleVisualData::StyleVisualData):
2334         (StyleBackgroundData::StyleBackgroundData):
2335         (StyleMarqueeData::StyleMarqueeData):
2336         (StyleFlexibleBoxData::StyleFlexibleBoxData):
2337         (opacity):
2338         (StyleInheritedData::StyleInheritedData):
2339         (RenderStyle::diff):
2340         * khtml/rendering/render_style.h:
2341         (khtml::BorderValue::BorderValue):
2342         (khtml::CollapsedBorderValue::width):
2343         (khtml::RenderStyle::InheritedFlags::operator==):
2344         (khtml::RenderStyle::setBitDefaults):
2345         (khtml::RenderStyle::resetBorderTop):
2346         (khtml::RenderStyle::resetBorderRight):
2347         (khtml::RenderStyle::resetBorderBottom):
2348         (khtml::RenderStyle::resetBorderLeft):
2349         (khtml::RenderStyle::resetOutline):
2350         (khtml::RenderStyle::setHasClip):
2351         (khtml::RenderStyle::resetMargin):
2352         (khtml::RenderStyle::resetPadding):
2353         (khtml::RenderStyle::setCursor):
2354
2355 2003-11-11  Maciej Stachowiak  <mjs@apple.com>
2356
2357         Reviewed by John.
2358
2359         - fixed 3479537 - reproducible crash in KJS::WindowFunc::tryCall
2360         
2361         * khtml/ecma/kjs_window.cpp:
2362         (WindowFunc::tryCall): Check part and doc impl for null.
2363
2364 2003-11-11  Maciej Stachowiak  <mjs@apple.com>
2365
2366         Reviewed by Ken.
2367
2368         - fixed 3472330 -  REGRESSION: onKeyPress handler not called when hitting keys in <input type=password> field
2369
2370         * kwq/KWQTextField.mm:
2371         (-[KWQSecureTextField initWithQLineEdit:]): New initializer, so
2372         the secure text field knows about the widget.
2373         (-[KWQTextField setPasswordMode:]): Use new initializer for
2374         KWQSecureTextField.
2375         (-[KWQSecureTextField textView:shouldHandleEvent:]): New method,
2376         do the same thing as the non-secure text field to pass the event on.
2377         (-[KWQSecureTextField textView:didHandleEvent:]): Ditto.
2378
2379 2003-11-11  Ken Kocienda  <kocienda@apple.com>
2380
2381         Reviewed by Maciej
2382
2383         Fix for this bug:
2384
2385         <rdar://problem/3480173>: Too many names for programmatic click functions
2386
2387         Changed all instances of performClick() and simulateClick() to click().
2388         Changed all instances of performSubmitClick() to submitClick().
2389
2390         Additionally, KWQButton had a simulateClick method, which was redundant
2391         given that its superclass has a performClick: method.
2392
2393         * khtml/html/html_formimpl.cpp:
2394         (HTMLFormElementImpl::submitClick):
2395         (HTMLInputElementImpl::defaultEventHandler):
2396         (HTMLSelectElementImpl::defaultEventHandler):
2397         * khtml/html/html_formimpl.h:
2398         * khtml/html/html_inlineimpl.cpp:
2399         (HTMLAnchorElementImpl::defaultEventHandler):
2400         (HTMLAnchorElementImpl::click):
2401         * khtml/html/html_inlineimpl.h:
2402         * khtml/rendering/render_form.cpp:
2403         (RenderLineEdit::slotReturnPressed):
2404         * kwq/KWQButton.h:
2405         * kwq/KWQButton.mm:
2406         (QButton::click):
2407
2408 2003-11-11  Maciej Stachowiak  <mjs@apple.com>
2409
2410         Reviewed by John.
2411
2412         - fixed 3475272 - custom property on CSSStyleObject won't hold a value
2413
2414         * khtml/ecma/kjs_css.cpp:
2415         (DOMCSSStyleDeclaration::tryPut): If the property is not a css property,
2416         save it as a custom object property in the normal way.
2417
2418 2003-11-11  John Sullivan  <sullivan@apple.com>
2419
2420         - fixed <rdar://problem/3480421>: Focus rings around links are too thick, 
2421         should use 3 px instead of 5 px
2422
2423         Reviewed by Don and Ken.
2424
2425         * khtml/css/html4.css:
2426         use 3px instead of 5 px for :active, :focus
2427
2428 2003-11-11  Ken Kocienda  <kocienda@apple.com>
2429
2430         Reviewed by John
2431
2432         In the DOM Level 3 Events specification, keydown and keyup are 
2433         standard events. We can remove the KHTML component in the names 
2434         of these constants. Note that the keypress event is still 
2435         nonstandard and will retain the KHTML name component.
2436
2437         * khtml/ecma/kjs_binding.cpp:
2438         (ScriptInterpreter::wasRunByUserGesture)
2439         * khtml/ecma/kjs_dom.cpp:
2440         (DOMNode::getValueProperty)
2441         (DOMNode::putValue)
2442         * khtml/ecma/kjs_window.cpp:
2443         (Window::get)
2444         (Window::put)
2445         * khtml/html/html_elementimpl.cpp:
2446         (HTMLElementImpl::parseAttribute)
2447         * khtml/html/html_formimpl.cpp:
2448         (HTMLGenericFormElementImpl::defaultEventHandler)
2449         * khtml/html/html_inlineimpl.cpp:
2450         (HTMLAnchorElementImpl::defaultEventHandler)
2451         * khtml/xml/dom2_eventsimpl.cpp:
2452         (EventImpl::typeToId)
2453         (EventImpl::idToType)
2454         (KeyboardEventImpl::KeyboardEventImpl)
2455         * khtml/xml/dom2_eventsimpl.h:
2456         (DOM::EventImpl::)
2457
2458 2003-11-11  Chris Blumenberg  <cblu@apple.com>
2459
2460         Fixed: <rdar://problem/3480281>: drag image of selected text and images include broken images
2461         
2462         Reviewed by dave.
2463
2464         * khtml/rendering/render_image.cpp:
2465         (RenderImage::paintObject): when drawing the drag image, don't draw the broken image
2466
2467 2003-11-11  Vicki Murley  <vicki@apple.com>
2468
2469         Reviewed by sullivan.
2470
2471         - rolled Merlot build fix onto the trunk
2472
2473         * WebCorePrefix.h: added #include <sys/types.h>
2474
2475 2003-11-10  David Hyatt  <hyatt@apple.com>
2476
2477         Fix for 3473531, text nested in hr inside h3 did not get the h3's style.
2478         
2479         Reviewed by darin
2480
2481         * khtml/html/dtd.cpp:
2482         (DOM::checkChild):
2483
2484 2003-11-10  David Hyatt  <hyatt@apple.com>
2485
2486         Fix for 3478435, <hr> tags should be centered by default.  Ditched the 1px margin as well.
2487
2488         Fix for 3479441, <h1>-<h6> tags should *not* be centered by default.  They should also use bold instead of
2489         bolder.
2490         
2491         Reviewed by darin
2492
2493         * khtml/css/html4.css:
2494         * khtml/html/html_blockimpl.cpp:
2495         (HTMLHRElementImpl::parseAttribute):
2496         * layout-tests/apple-only/base/bugzilla.mozilla.org/index-expected.txt:
2497         * layout-tests/apple-only/base/home.netscape.com/index-expected.txt:
2498         * layout-tests/apple-only/base/www.altavista.com/index-expected.txt:
2499         * layout-tests/apple-only/base/www.cnn.com/index-expected.txt:
2500         * layout-tests/apple-only/base/www.digitalcity.com/index-expected.txt:
2501         * layout-tests/apple-only/base/www.ebay.com/index-expected.txt:
2502         * layout-tests/apple-only/base/www.excite.com/index-expected.txt:
2503         * layout-tests/apple-only/base/www.mapquest.com/index-expected.txt:
2504         * layout-tests/apple-only/base/www.microsoft.com/index-expected.txt:
2505         * layout-tests/apple-only/base/www.msnbc.com/index-expected.txt:
2506         * layout-tests/apple-only/base/www.nytimes.com/index-expected.txt:
2507         * layout-tests/apple-only/base/www.nytimes.com_Table/index-expected.txt:
2508         * layout-tests/apple-only/base/www.quicken.com/index-expected.txt:
2509         * layout-tests/apple-only/base/www.w3.org_DOML2Core/index-expected.txt:
2510         * layout-tests/css1/basic/class_as_selector-expected.txt:
2511         * layout-tests/css1/basic/comments-expected.txt:
2512         * layout-tests/css1/basic/containment-expected.txt:
2513         * layout-tests/css1/basic/contextual_selectors-expected.txt:
2514         * layout-tests/css1/basic/grouping-expected.txt:
2515         * layout-tests/css1/basic/id_as_selector-expected.txt:
2516         * layout-tests/css1/basic/inheritance-expected.txt:
2517         * layout-tests/css1/box_properties/border-expected.txt:
2518         * layout-tests/css1/box_properties/border_bottom-expected.txt:
2519         * layout-tests/css1/box_properties/border_bottom_inline-expected.txt:
2520         * layout-tests/css1/box_properties/border_bottom_width-expected.txt:
2521         * layout-tests/css1/box_properties/border_bottom_width_inline-expected.txt:
2522         * layout-tests/css1/box_properties/border_color-expected.txt:
2523         * layout-tests/css1/box_properties/border_color_inline-expected.txt:
2524         * layout-tests/css1/box_properties/border_inline-expected.txt:
2525         * layout-tests/css1/box_properties/border_left-expected.txt:
2526         * layout-tests/css1/box_properties/border_left_inline-expected.txt:
2527         * layout-tests/css1/box_properties/border_left_width-expected.txt:
2528         * layout-tests/css1/box_properties/border_left_width_inline-expected.txt:
2529         * layout-tests/css1/box_properties/border_right-expected.txt:
2530         * layout-tests/css1/box_properties/border_right_inline-expected.txt:
2531         * layout-tests/css1/box_properties/border_right_width-expected.txt:
2532         * layout-tests/css1/box_properties/border_right_width_inline-expected.txt:
2533         * layout-tests/css1/box_properties/border_style-expected.txt:
2534         * layout-tests/css1/box_properties/border_style_inline-expected.txt:
2535         * layout-tests/css1/box_properties/border_top-expected.txt:
2536         * layout-tests/css1/box_properties/border_top_inline-expected.txt:
2537         * layout-tests/css1/box_properties/border_top_width-expected.txt:
2538         * layout-tests/css1/box_properties/border_top_width_inline-expected.txt:
2539         * layout-tests/css1/box_properties/border_width-expected.txt:
2540         * layout-tests/css1/box_properties/border_width_inline-expected.txt:
2541         * layout-tests/css1/box_properties/clear-expected.txt:
2542         * layout-tests/css1/box_properties/clear_float-expected.txt:
2543         * layout-tests/css1/box_properties/float-expected.txt:
2544         * layout-tests/css1/box_properties/float_elements_in_series-expected.txt:
2545         * layout-tests/css1/box_properties/float_margin-expected.txt:
2546         * layout-tests/css1/box_properties/float_on_text_elements-expected.txt:
2547         * layout-tests/css1/box_properties/height-expected.txt:
2548         * layout-tests/css1/box_properties/margin-expected.txt:
2549         * layout-tests/css1/box_properties/margin_bottom-expected.txt:
2550         * layout-tests/css1/box_properties/margin_bottom_inline-expected.txt:
2551         * layout-tests/css1/box_properties/margin_inline-expected.txt:
2552         * layout-tests/css1/box_properties/margin_left-expected.txt:
2553         * layout-tests/css1/box_properties/margin_left_inline-expected.txt:
2554         * layout-tests/css1/box_properties/margin_right-expected.txt:
2555         * layout-tests/css1/box_properties/margin_right_inline-expected.txt:
2556         * layout-tests/css1/box_properties/margin_top-expected.txt:
2557         * layout-tests/css1/box_properties/margin_top_inline-expected.txt:
2558         * layout-tests/css1/box_properties/padding-expected.txt:
2559         * layout-tests/css1/box_properties/padding_bottom-expected.txt:
2560         * layout-tests/css1/box_properties/padding_bottom_inline-expected.txt:
2561         * layout-tests/css1/box_properties/padding_inline-expected.txt:
2562         * layout-tests/css1/box_properties/padding_left-expected.txt:
2563         * layout-tests/css1/box_properties/padding_left_inline-expected.txt:
2564         * layout-tests/css1/box_properties/padding_right-expected.txt:
2565         * layout-tests/css1/box_properties/padding_right_inline-expected.txt:
2566         * layout-tests/css1/box_properties/padding_top-expected.txt:
2567         * layout-tests/css1/box_properties/padding_top_inline-expected.txt:
2568         * layout-tests/css1/box_properties/width-expected.txt:
2569         * layout-tests/css1/cascade/cascade_order-expected.txt:
2570         * layout-tests/css1/cascade/important-expected.txt:
2571         * layout-tests/css1/classification/display-expected.txt:
2572         * layout-tests/css1/classification/list_style-expected.txt:
2573         * layout-tests/css1/classification/list_style_image-expected.txt:
2574         * layout-tests/css1/classification/list_style_position-expected.txt:
2575         * layout-tests/css1/classification/list_style_type-expected.txt:
2576         * layout-tests/css1/classification/white_space-expected.txt:
2577         * layout-tests/css1/color_and_background/background-expected.txt:
2578         * layout-tests/css1/color_and_background/background_attachment-expected.txt:
2579         * layout-tests/css1/color_and_background/background_color-expected.txt:
2580         * layout-tests/css1/color_and_background/background_image-expected.txt:
2581         * layout-tests/css1/color_and_background/background_position-expected.txt:
2582         * layout-tests/css1/color_and_background/background_repeat-expected.txt:
2583         * layout-tests/css1/color_and_background/color-expected.txt:
2584         * layout-tests/css1/conformance/forward_compatible_parsing-expected.txt:
2585         * layout-tests/css1/font_properties/font-expected.txt:
2586         * layout-tests/css1/font_properties/font_family-expected.txt:
2587         * layout-tests/css1/font_properties/font_size-expected.txt:
2588         * layout-tests/css1/font_properties/font_style-expected.txt:
2589         * layout-tests/css1/font_properties/font_variant-expected.txt:
2590         * layout-tests/css1/font_properties/font_weight-expected.txt:
2591         * layout-tests/css1/formatting_model/canvas-expected.txt:
2592         * layout-tests/css1/formatting_model/floating_elements-expected.txt:
2593         * layout-tests/css1/formatting_model/height_of_lines-expected.txt:
2594         * layout-tests/css1/formatting_model/inline_elements-expected.txt:
2595         * layout-tests/css1/formatting_model/replaced_elements-expected.txt:
2596         * layout-tests/css1/formatting_model/vertical_formatting-expected.txt:
2597         * layout-tests/css1/pseudo/anchor-expected.txt:
2598         * layout-tests/css1/pseudo/firstletter-expected.txt:
2599         * layout-tests/css1/pseudo/firstline-expected.txt:
2600         * layout-tests/css1/pseudo/multiple_pseudo_elements-expected.txt:
2601         * layout-tests/css1/pseudo/pseudo_elements_in_selectors-expected.txt:
2602         * layout-tests/css1/text_properties/letter_spacing-expected.txt:
2603         * layout-tests/css1/text_properties/line_height-expected.txt:
2604         * layout-tests/css1/text_properties/text-transform-expected.txt:
2605         * layout-tests/css1/text_properties/text_align-expected.txt:
2606         * layout-tests/css1/text_properties/text_decoration-expected.txt:
2607         * layout-tests/css1/text_properties/text_indent-expected.txt:
2608         * layout-tests/css1/text_properties/text_transform-expected.txt:
2609         * layout-tests/css1/text_properties/vertical_align-expected.txt:
2610         * layout-tests/css1/text_properties/word_spacing-expected.txt:
2611         * layout-tests/css1/units/color_units-expected.txt:
2612         * layout-tests/css1/units/length_units-expected.txt:
2613         * layout-tests/css1/units/percentage_units-expected.txt:
2614         * layout-tests/css1/units/urls-expected.txt:
2615         * layout-tests/fast/encoding/utf-16-big-endian-expected.txt:
2616         * layout-tests/fast/encoding/utf-16-little-endian-expected.txt:
2617
2618 2003-11-10  Chris Blumenberg  <cblu@apple.com>
2619
2620         Fixed: <rdar://problem/3479266>: selected images don't obey CSS3 selection background-color attribute
2621         
2622         Reviewed by dave.
2623
2624         * khtml/rendering/render_image.cpp:
2625         (RenderImage::selectionTintColor): new, takes style into account
2626         (RenderImage::paintObject): use selectionTintColor
2627         * khtml/rendering/render_image.h:
2628         * kwq/KWQPainter.h: removed selectedImageTintColor
2629         * kwq/KWQPainter.mm:
2630
2631 2003-11-10  David Hyatt  <hyatt@apple.com>
2632
2633         Fix for 3479287, macro-ize the handling of the CSS 'inherit' value.  This patch is preparation for
2634         adding support for the 'initial' value, which will be used to fix the CSS parser's shorthand parsing
2635         bugs.
2636         
2637         Reviewed by kocienda
2638
2639         * khtml/css/cssparser.cpp:
2640         (CSSParser::parseValue):
2641         * khtml/css/cssproperties.c:
2642         (hash_prop):
2643         (findProp):
2644         * khtml/css/cssproperties.h:
2645         * khtml/css/cssproperties.in:
2646         * khtml/css/cssstyleselector.cpp:
2647         (khtml::CSSStyleSelector::applyRule):
2648         * khtml/khtmlview.cpp:
2649         (KHTMLView::layout):
2650
2651 2003-11-10  Chris Blumenberg  <cblu@apple.com>
2652
2653         Fixed:
2654         <rdar://problem/3478883>: REGRESSION (113-114u): drag image for selected text includes unselected images
2655         <rdar://problem/3479204>: selected images don't look selected
2656
2657         Reviewed by dave.
2658
2659         * khtml/rendering/render_image.cpp:
2660         (RenderImage::RenderImage): init m_selectionState
2661         (RenderImage::paintObject): draw a tint over the image if selected, don't draw anything if not selected and the action is PaintActionSelection
2662         * khtml/rendering/render_image.h:
2663         (khtml::RenderImage::selectionState): new
2664         (khtml::RenderImage::setSelectionState): new
2665         * kwq/KWQPainter.h:
2666         * kwq/KWQPainter.mm:
2667         (QPainter::selectedImageTintColor): new
2668
2669 2003-11-10  Ken Kocienda  <kocienda@apple.com>
2670
2671         Reviewed by Hyatt
2672
2673         Fix for this bug:
2674
2675         <rdar://problem/3477795>: REGRESSION: can't submit form without 
2676         submit button by hitting return (cocoadev.com)
2677
2678         When I changed submitting forms using the return key in a text field
2679         to go through a search for the correct submit or image input 
2680         element to use when submitting, I neglected to cover the case of
2681         forms which have neither a submit or image input element. When
2682         I encounter a form such as this now, I submit it anyway after
2683         performing the submit or image input element and failing to find one.
2684
2685         * khtml/html/html_formimpl.cpp:
2686         (HTMLFormElementImpl::performSubmitClick)
2687
2688 2003-11-10  Richard Williamson   <rjw@apple.com>
2689
2690         Fixed 3478765.  Use ICU to access unicode properties.
2691         Fixed 3478831.  Unicode property/conversion functions should be 32 bit savvy.
2692
2693         Reviewed by Darin.
2694
2695         * WebCore-combined.exp:
2696         * WebCore.exp:
2697         * kwq/KWQChar.mm:
2698         (QChar::lower):
2699         (QChar::upper):
2700         (QChar::mirroredChar):
2701         * kwq/KWQString.h:
2702         (QChar::direction):
2703         * kwq/WebCoreUnicode.cpp:
2704         * kwq/WebCoreUnicode.h:
2705
2706 2003-11-10  Chris Blumenberg  <cblu@apple.com>
2707
2708         Fixed: <rdar://problem/3478781>: drag image of selected text and images doesn't include images
2709
2710         Reviewed by rjw.
2711
2712         * khtml/rendering/render_image.cpp:
2713         (RenderImage::paintObject): paint when the paint action is PaintActionSelection
2714         * khtml/rendering/render_replaced.cpp:
2715         (RenderReplaced::paint): ditto
2716
2717 2003-11-10  Ken Kocienda  <kocienda@apple.com>
2718
2719         Reviewed by John
2720
2721         Fix for this bug:
2722
2723         <rdar://problem/3477624>: REGRESSION (113): Using input method to 
2724         enter non-ascii text submits the form
2725
2726         This regression has been in the tree for a couple of versions now, 
2727         since we improved the way key events are processed. The solution
2728         is to ask the text input manager if it has any marked text when
2729         the return key (or enter key) is pressed, because if it does, the key
2730         needs to work in the "accept" role for the input manager. Fixing
2731         in this way has the pleasant effect of making return/enter key
2732         behavior "do the right thing" based on context.
2733
2734         * khtml/html/html_formimpl.cpp:
2735         (HTMLInputElementImpl::defaultEventHandler): Add check to see
2736         if text input manager has marked text before submitting text
2737         and password fields. Broke out key handling for checkboxes and
2738         radios, since the old code for these widgets worked fine.
2739         * kwq/KWQLineEdit.h: Added hasMarkedText function.
2740         * kwq/KWQLineEdit.mm:
2741         (QLineEdit::hasMarkedText): Returns whether the current input
2742         manager has marked text or not.
2743
2744 2003-11-09  Darin Adler  <darin@apple.com>
2745
2746         Reviewed by Dave.
2747
2748         - fixed 3478173 -- REGRESSION (112-113): getElementById is failing for many types of elements
2749
2750         The problem was that ElementImpl::attach was being skipped for many objects with classes
2751         derived from ElementImpl. By changing them all to call up to their base classes instead of
2752         skipping levels, the bug went away. This was possible (and easy to do) because of the
2753         rendererIsNeeded() change I made a while back.
2754
2755         * khtml/html/html_baseimpl.cpp:
2756         (HTMLFrameElementImpl::attach): Call base class's attach() instead of creating renderer explicitly
2757         and then calling NodeBaseImpl::attach(). This was a remnant of the old way of changing the logic
2758         about when to create the renderer, not needed now that we have rendererIsNeeded().
2759         (HTMLFrameSetElementImpl::attach): Ditto.
2760         (HTMLIFrameElementImpl::attach): Ditto.
2761
2762         * khtml/html/html_formimpl.h: Removed many unused attach() overrides.
2763         * khtml/html/html_formimpl.cpp:
2764         (HTMLGenericFormElementImpl::attach): Ditto.
2765         (HTMLButtonElementImpl::attach): Removed, because now the base class's attach does the right thing.
2766         (HTMLFieldSetElementImpl::attach): Ditto.
2767         (HTMLInputElementImpl::attach): Removed explicit createRendererIfNeeded call, not needed now that
2768         HTMLGenericFormElementImpl calls through to its base class.
2769         (HTMLLegendElementImpl::attach): Removed, because now the base class's attach does the right thing.
2770         (HTMLSelectElementImpl::attach): Ditto.
2771         (HTMLTextAreaElementImpl::attach): Ditto.
2772
2773         * khtml/html/html_imageimpl.cpp:
2774         (HTMLImageElementImpl::attach): Call base class's attach() instead of creating renderer explicitly
2775         and then calling NodeBaseImpl::attach().
2776         (HTMLImageElementImpl::detach): Call base class's detach() instead of NodeBaseImpl::detach(). No
2777         need to skip the ElementImpl::detach() function, and important not to for the new "id" optimization.
2778
2779         * khtml/html/html_inlineimpl.h: Removed HTMLBRElementImpl::attach override.
2780         * khtml/html/html_inlineimpl.cpp: (HTMLBRElementImpl::attach): Call base class's attach() instead
2781         of creating renderer explicitly and then calling NodeBaseImpl::attach().
2782
2783         * khtml/html/html_objectimpl.h: Removed HTMLAppletElementImpl::attach override.
2784         * khtml/html/html_objectimpl.cpp:
2785         (HTMLAppletElementImpl::attach): Removed, because the base class's attach does the right thing.
2786         (HTMLEmbedElementImpl::attach): Call base class's attach() instead of creating renderer explicitly
2787         and then calling NodeBaseImpl::attach().
2788         (HTMLObjectElementImpl::attach): Ditto.
2789
2790 2003-11-09  David Hyatt  <hyatt@apple.com>
2791
2792         Fix for 3478317, letter/word-spacing don't inherit properly through italic/bold elements.
2793         
2794         Reviewed by darin
2795
2796         * khtml/rendering/font.h:
2797         (khtml::Font::Font):
2798         * khtml/rendering/render_style.h:
2799         (khtml::RenderStyle::setFontDef):
2800
2801 2003-11-09  David Hyatt  <hyatt@apple.com>
2802
2803         Fix for 3478309, make sure backgrounds paint in the border box and not just in the padding box.
2804         
2805         Reviewed by darin
2806
2807         Also making sure that <frame>s aren't transparent, since other browsers seem to only make <iframe>s/<object>s
2808         be transparent.
2809         
2810         * khtml/rendering/render_box.cpp:
2811         (RenderBox::paintRootBoxDecorations):
2812         (RenderBox::paintBackgroundExtended):
2813
2814 2003-11-08  Darin Adler  <darin@apple.com>
2815
2816         Reviewed by John.
2817
2818         - fixed 3478025 -- links with non-Latin-1 characters in the hostname are not getting IDN-encoded
2819
2820         * kwq/KWQKURL.mm:
2821         (KURL::parse): Changed existing code to take advantage of the fact that a NUL character
2822         is classified as a path segment end character.
2823         (KURL::findHostnameInHierarchicalURL): Don't treat NUL characters as terminating characters
2824         for hostnames, because QChar::latin1() turns all non-Latin-1 characters into NUL characters.
2825
2826 2003-11-08  Darin Adler  <darin@apple.com>
2827
2828         Reviewed by John.
2829
2830         - fixed 3477509 -- REGRESSION (112-113): crash in KHTMLPart::processObjectRequest at espn.com, chosun.com
2831
2832         * khtml/khtml_part.cpp: (KHTMLPart::processObjectRequest): Use a dynamic_cast to check the type of the
2833         part rather than assuming it's always a KHTMLPart. The crash was caused by casting a KWQPluginPart to
2834         KHTMLPart.
2835
2836 2003-11-08  Darin Adler  <darin@apple.com>
2837
2838         Reviewed by Richard.
2839
2840         - event cleanup motivated by questions on khtml-devel
2841
2842         * khtml/dom/dom2_events.h: Removed eventModuleName.
2843         * khtml/dom/dom2_events.cpp: Removed eventModuleName.
2844
2845         * khtml/xml/dom2_eventsimpl.h: Removed eventModuleName, made many trivially simple
2846         functions inline, made virtual functions no longer inline. Also made some functions const.
2847         (DOM::EventImpl::propagationStopped): Made this non-virtual; there was no reason for
2848         it to be virtual I could see.
2849         (DOM::EventImpl::defaultPrevented): Ditto.
2850         (DOM::EventImpl::setDefaultHandled): Ditto.
2851         (DOM::UIEventImpl::view): Made this inline.
2852         (DOM::UIEventImpl::detail): Ditto.
2853         (DOM::MouseEventImpl::screenX): Ditto.
2854         (DOM::MouseEventImpl::screenY): Ditto.
2855         (DOM::MouseEventImpl::clientX): Ditto.
2856         (DOM::MouseEventImpl::clientY): Ditto.
2857         (DOM::MouseEventImpl::layerX): Ditto.
2858         (DOM::MouseEventImpl::layerY): Ditto.
2859         (DOM::MouseEventImpl::ctrlKey): Ditto.
2860         (DOM::MouseEventImpl::shiftKey): Ditto.
2861         (DOM::MouseEventImpl::altKey): Ditto.
2862         (DOM::MouseEventImpl::metaKey): Ditto.
2863         (DOM::MouseEventImpl::button): Ditto.
2864         (DOM::MouseEventImpl::relatedTarget): Ditto.
2865         (DOM::MutationEventImpl::relatedNode): Ditto.
2866         (DOM::MutationEventImpl::prevValue): Ditto.
2867         (DOM::MutationEventImpl::newValue): Ditto.
2868         (DOM::MutationEventImpl::attrName): Ditto.
2869         (DOM::MutationEventImpl::attrChange): Ditto.
2870
2871         * khtml/ecma/kjs_events.cpp: (KJS::getDOMEvent): Changed implementation to no longer
2872         require eventModuleName(), and removed some unneeded casts.
2873
2874         * khtml/xml/dom2_eventsimpl.cpp: Made lots of functions inline.
2875         (EventImpl::isUIEvent): Since this is virtual, make it no longer inline.
2876         (EventImpl::isMouseEvent): Ditto.
2877         (EventImpl::isMutationEvent): Ditto.
2878         (EventImpl::isKeyboardEvent): Ditto.
2879         (UIEventImpl::isUIEvent): Ditto.
2880         (MouseEventImpl::isMouseEvent): Ditto.
2881         (KeyboardEventImpl::isKeyboardEvent): Ditto.
2882         (MutationEventImpl::isMutationEvent): Ditto.
2883
2884 2003-11-07  Chris Blumenberg  <cblu@apple.com>
2885
2886         Fixed: <rdar://problem/3020196>: links with href="" don't show hand cursor when you mouse over them
2887
2888         Reviewed by darin.
2889
2890         * khtml/khtmlview.cpp:
2891         (KHTMLView::viewportMouseMoveEvent): check if the URL on the event is non-NULL, not if it is non-empty
2892
2893 2003-11-07  Richard Williamson   <rjw@apple.com>
2894
2895         Fixed 3477067.  Use our case unicode conversion routines.
2896
2897         Reviewed by Ken.
2898
2899         * kwq/KWQChar.mm:
2900         (QChar::lower):
2901         (QChar::upper):
2902
2903 2003-11-06  David Hyatt  <hyatt@apple.com>
2904
2905         Fixes for 3476717, inline blocks should expand to encompass floats; 3476718, inline blocks should not
2906         collapse margins with children; and 3476721, run-ins and compacts can flow into anonymous blocks, even
2907         ones that they caused to be created by failing to run in/compact in the first place.
2908         
2909         Reviewed by darin (inline block fixes only).
2910
2911         * khtml/rendering/render_block.cpp:
2912         (khtml::RenderBlock::layoutBlock):
2913         (khtml::RenderBlock::layoutBlockChildren):
2914
2915 2003-11-06  Richard Williamson   <rjw@apple.com>
2916
2917         Fixed 3476563.  Remove unnecessary call to set view position after load completes.
2918  
2919         Reviewed by Gramps.
2920
2921         * khtml/khtml_part.cpp:
2922         (KHTMLPart::checkCompleted):
2923
2924 2003-11-06  Chris Blumenberg  <cblu@apple.com>
2925
2926         * khtml/rendering/render_image.h:
2927         (khtml::RenderImage::isDisplayingError): forgot to remove the "virtual" part of the declaration
2928
2929 2003-11-06  Chris Blumenberg  <cblu@apple.com>
2930
2931         Fixed:
2932         <rdar://problem/3275118>: Dragging from missing-image link stretches missing-image icon to size of missing image
2933         <rdar://problem/3476225>: assert dragging non-existant images
2934
2935         Reviewed by rjw.
2936
2937         * khtml/rendering/render_image.h:
2938         (khtml::RenderImage::isDisplayingError): new method, returns true for the broken image
2939         * kwq/WebCoreBridge.mm:
2940         (-[WebCoreBridge elementAtPoint:]): only provide info if there is an image and the image is not broken
2941
2942 2003-11-06  Ken Kocienda  <kocienda@apple.com>
2943
2944         Reviewed by Richard
2945
2946         Fixes for these bugs:
2947
2948         <rdar://problem/3476006>: Form file input widgets do not scroll 
2949         to view when focused
2950
2951         <rdar://problem/3476007>: Form file input widgets should only 
2952         focus when full keyboard access is on
2953
2954         * kwq/KWQFileButton.h: Added focusPolicy declaration.
2955         * kwq/KWQFileButton.mm:
2956         (KWQFileButton::focusPolicy): Added. Now works like other buttons.
2957         Fixes 3476007.
2958         (KWQFileButton::focusChanged): Added. Code similar to text area
2959         widgets. Fixes 3476006.
2960
2961 2003-11-06  Chris Blumenberg  <cblu@apple.com>
2962
2963         Fixed: <rdar://problem/3308609>: 6L60 Safari URL links with line-endings converted to hex by contextual menu
2964
2965         Reviewed by rjw.
2966
2967         * kwq/WebCoreBridge.mm:
2968         (-[WebCoreBridge elementAtPoint:]): use parseURL to go from an attribute string to a URL string
2969
2970 === Safari-113 ===
2971
2972 2003-11-06  John Sullivan  <sullivan@apple.com>
2973
2974         - fixed broken build
2975
2976         * khtml/xml/dom_docimpl.cpp:
2977         (DocumentImpl::completeURL):
2978         removed stray character
2979
2980 2003-11-06  Maciej Stachowiak  <mjs@apple.com>
2981
2982         Reviewed by Darin.
2983
2984         - fixed 3475366 - 4.5% of time spent making html event listeners on slow intel page.
2985
2986         6% speedup on intel page, 1% speedup on cvs-base PLT.
2987         
2988         * khtml/ecma/kjs_events.cpp:
2989         (JSEventListener::JSEventListener): Don't add self to hashtable if imp is null (which
2990         can now happen in the lazy listener case).
2991         (JSEventListener::~JSEventListener): Ditto on removing.
2992         (JSEventListener::listenerObj): Made this virtual.
2993         (JSLazyEventListener::JSLazyEventListener): New constructor.
2994         (JSLazyEventListener::handleEvent): call parseCode, then
2995         superclass if it appeared to succeed.
2996         (JSLazyEventListener::listenerObj): call parseCode, then superclass.
2997         (JSLazyEventListener::parseCode):
2998         (KJS::getNodeEventListener): Check for null listenerObjImp in case of
2999         lazy listener that failed to parse.
3000         * khtml/ecma/kjs_dom.cpp:
3001         (DOMNode::getListener): Ditto.
3002         * khtml/ecma/kjs_html.cpp:
3003         (Image::getValueProperty): Ditto.
3004         * khtml/ecma/kjs_events.h:
3005         (KJS::JSEventListener::listenerObjImp): call listenerObj() virtual
3006         method and get imp from the result.
3007         * khtml/ecma/kjs_proxy.cpp:
3008         (KJSProxyImpl::createHTMLEventHandler): Don't parse the code here, make a lazy
3009         listener.
3010         * khtml/ecma/kjs_window.cpp:
3011         (Window::getJSLazyEventListener): make a new JSLazyEventListener - no need
3012         to check the listeners hashtable cause a brand new lazy listener won't have
3013         a function anyway.
3014         * khtml/ecma/kjs_window.h: Prototype new method.
3015
3016 2003-11-06  Maciej Stachowiak  <mjs@apple.com>
3017
3018         Reviewed by Darin.
3019
3020         - fixed 3475397 - REGRESSION: relative URLs on page load test sometimes contain garbage, leading to missing images
3021         
3022         * kwq/KWQKURL.mm:
3023         (KURL::KURL): When constructing from NSURL, null-terminate the raw
3024         bytes since KURL::parse expects a null-terminated C string. It
3025         might be even better to pass a length to parse, but this fix is
3026         simple and does the job.
3027
3028 2003-11-05  Darin Adler  <darin@apple.com>
3029
3030         Reviewed by Maciej.
3031
3032         - fixed 3475109 -- support keyboard event object properties of altkey, ctrlKey, shiftKey
3033
3034         We had the DOM Level 3 KeyboardEvent class already; I just had to add JavaScript bindings.
3035
3036         * khtml/ecma/kjs_events.h: Added DOMKeyboardEvent class.
3037         * khtml/ecma/kjs_events.cpp:
3038         (KJS::getDOMEvent): Added code to make a DOMKeyboardEvent if the event is a DOM::KeyboardEvent.
3039         (DOMKeyboardEvent::~DOMKeyboardEvent): Added.
3040         (DOMKeyboardEvent::classInfo): Added.
3041         (DOMKeyboardEvent::tryGet): Added.
3042         (DOMKeyboardEvent::getValueProperty): Added.
3043         (DOMKeyboardEventProtoFunc::tryCall): Added.
3044
3045         * khtml/dom/dom2_events.cpp:
3046         (KeyboardEvent::keyIdentifier): Added.
3047         (KeyboardEvent::keyLocation): Added.
3048
3049         * khtml/ecma/kjs_events.lut.h: Regenerated.
3050
3051 2003-11-05  Maciej Stachowiak  <mjs@apple.com>
3052
3053         Reviewed by John.
3054
3055         - fixed 3475092 - Notifying the bridge about duplicate images takes 13% of time on intel page
3056
3057         Another 15% speedup on the intel page.
3058
3059         This also results in a 3% speedup on cvs-base PLT! (or maybe that was my last change)
3060         
3061         * kwq/KWQLoader.mm:
3062         (KWQServeRequest): Note that we told the bridge about the load.
3063         (KWQCheckCacheObjectStatus): Don't tell the bridge about the load
3064         if we have alrady; if we do tell it, then note it down.
3065         * kwq/KWQKHTMLPart.h:
3066         * kwq/KWQKHTMLPart.mm:
3067         (KWQKHTMLPart::didTellBridgeAboutLoad): Helper method for the above.
3068         (KWQKHTMLPart::haveToldBridgeAboutLoad): Ditto.
3069         (KWQKHTMLPart::clear): Clear our idea of what URLs we told the bridge about.
3070         * khtml/khtml_part.h: make clear() virtual.
3071
3072 2003-11-05  Darin Adler  <darin@apple.com>
3073
3074         * WebCore-combined.exp: Checked in generated file.
3075
3076 2003-11-05  Richard Williamson   <rjw@apple.com>
3077
3078         Fixed 3474957.  Changed name of image rendering method to better reflect it's actual function.
3079
3080         - (void)beginAnimationInRect:(NSRect)ir fromRect:(NSRect)fr;
3081
3082         renamed to
3083
3084         - (void)drawImageInRect:(NSRect)ir fromRect:(NSRect)fr;
3085
3086         Reviewed by Chris.
3087
3088         * kwq/KWQPainter.mm:
3089         (QPainter::drawPixmap):
3090         * kwq/WebCoreImageRenderer.h:
3091
3092 2003-11-05  Darin Adler  <darin@apple.com>
3093
3094         * WebCore-tests.exp: Added missing symbol so tests will link.
3095
3096 2003-11-05  Maciej Stachowiak  <mjs@apple.com>
3097
3098         Reviewed by Ken.
3099
3100         - fixed 3474756 - Creating HTML event listeners takes 5% of time on particular slow intel page
3101         
3102         * khtml/ecma/kjs_window.h: Make jsEventListeners a hashtable keyed
3103         by listener object, not a list.
3104         * khtml/ecma/kjs_window.cpp:
3105         (Window::getJSEventListener): Do hashtable lookup for existing listener instead of
3106         walking list.
3107         * khtml/ecma/kjs_events.cpp:
3108         (JSEventListener::JSEventListener): Use hashtable insert instead of list append.
3109         (JSEventListener::~JSEventListener): Use hashtable remove instead of list removeRef.
3110
3111 2003-11-05  Darin Adler  <darin@apple.com>
3112
3113         Reviewed by Maciej.
3114
3115         - fixed 3473872 -- encode domain names for IDN when creating URLs inside WebCore
3116
3117         * kwq/KWQKURL.h: Added KWQIntegerPair type, a number of private functions.
3118         * kwq/KWQKURL.mm:
3119         (isSchemeFirstChar): Make inline function from macro.
3120         (isSchemeChar): Make inline function from macro.
3121         (isUserInfoChar): Make inline function from macro.
3122         (isHostnameChar): Make inline function from macro.
3123         (isIPv6Char): Make inline function from macro.
3124         (isPathSegmentEndChar): Make inline function from macro.
3125         (isBadChar): Make inline function from macro.
3126         (isHexDigit): Make inline function from macro.
3127         (KURL::KURL): Remove unneeded initializations of m_isValid, since parse sets it.
3128         Use CFURLGetBytes in one place a FIXME asked for it. Changed non-ASCII case to use
3129         a separate function instead of code in line.
3130         (KURL::encodeHostnames): Added. Finds host names and encodes them.
3131         (KURL::findHostnameInHierarchicalURL): Added. Finds host name in a hierarchical URL.
3132         (KURL::encodeHostname): Added. Encodes one host name.
3133         (KURL::findHostnamesInMailToURL): Added. Finds host names in a mailto URL.
3134
3135         * kwq/KWQString.h: Added new overloads for startsWith.
3136         * kwq/KWQString.mm:
3137         (compareIgnoringCaseForASCIIOnly): Moved these functions up in the file so they can be
3138         used by more methods of QString.
3139         (QString::startsWith): Added new overloads.
3140
3141         * WebCore.pbproj/project.pbxproj: Add libicucore.A.dylib library.
3142
3143 2003-11-05  Maciej Stachowiak  <mjs@apple.com>
3144
3145         Reviewed by Darin.
3146
3147         - fixed 3473906 - getElementById takes about 44% of time on particular slow intel page
3148
3149         I fixed this by adding a per-document id --> element hash
3150         table. This speeds up my local copy of the intel page by 60% (50
3151         sec to 20 sec!) and does not cause any PLT slowdown.
3152         
3153         * khtml/xml/dom_docimpl.h: New QDict field for id to element hash table.
3154         * khtml/xml/dom_docimpl.cpp:
3155         (DocumentImpl::getElementById): Just look it up in the newly
3156         added hash table.
3157         (DocumentImpl::addElementById): New method. Add to hash table if
3158         no other element is set for that key (this lets the first element
3159         of several with matching ids win).
3160         (DocumentImpl::removeElementById): New method. Remove from hash
3161         table only if the key and value both match.
3162
3163         These Element changes to keep the id --> element hashtable working
3164         seem needlessly tricky, due to lack of bottlenecks in attribute
3165         changing.
3166         
3167         * khtml/xml/dom_elementimpl.cpp:
3168         (ElementImpl::updateId): New method that removes element from
3169         hash table for old it
3170         (ElementImpl::setAttribute): If setting id, call updateId.
3171         (ElementImpl::setAttributeMap): If either the old or the new map
3172         includes id, call updateId.
3173         (ElementImpl::attach): If we have an id, call updateId to set it
3174         after attaching.
3175         (ElementImpl::detach): Newly added. If we have an id, call
3176         updateId to clear it before detaching.
3177         (NamedAttrMapImpl::setNamedItem): If the name is id, call updateId on
3178         our element.
3179         (NamedAttrMapImpl::removeNamedItem): If the name is id, call updateId on
3180         our element.
3181         (NamedAttrMapImpl::operator=): If old or new contents include id attribute,
3182         call updateId on our element.
3183         * khtml/xml/dom_elementimpl.h: Prototype new methods.
3184
3185 2003-11-05  Ken Kocienda  <kocienda@apple.com>
3186
3187         Reviewed by Maciej
3188
3189         Fix for these bugs:
3190
3191         <rdar://problem/3467558>: Cannot tab to form file input widgets
3192         <rdar://problem/3473631>: WebFileButton sends notifications to communicate with WebCore
3193
3194         Tabbing now works for these widgets. While I was in the neighborhood,
3195         I improved the communication mechanism between the WebKit and WebCore
3196         sides of the file button implementation, replacing notifications
3197         with a callback object.
3198
3199         * WebCore-combined.exp: Remove no-longer used WebCoreFileButtonClicked
3200         and WebCoreFileButtonFilenameChanged notofication strings.
3201         * WebCore.exp: Ditto.
3202         * kwq/KWQFileButton.h: Changed declarations to match changes in
3203         callback functions.
3204         * kwq/KWQFileButton.mm:
3205         (KWQFileButton::KWQFileButton): Now sets the view after creating
3206         the delegate object.
3207         (KWQFileButton::filenameChanged): Now takes a QString argument
3208         which indicates the filename.
3209         (KWQFileButton::focusChanged): New function. Sends DOM focus and
3210         blur events.
3211         (-[KWQFileButtonAdapter initWithKWQFileButton:]): No longer needs
3212         to register for notifications.
3213         (-[KWQFileButtonAdapter dealloc]): No longer needs to remove itself
3214         from the notification center.
3215         (-[KWQFileButtonAdapter filenameChanged:]): No longer a notification
3216         callback. Now a WebCoreFileButtonCallback callback.
3217         (-[KWQFileButtonAdapter focusChanged:]): New WebCoreFileButtonCallback
3218         callback.
3219         (-[KWQFileButtonAdapter clicked]): No longer a notification
3220         callback. Now a WebCoreFileButtonCallback callback.
3221         * kwq/KWQKHTMLPart.mm:
3222         (KWQKHTMLPart::nextKeyViewInFrame): Unrelated cleanup.
3223         * kwq/WebCoreBridge.h: Declared new WebCoreFileButtonDelegate protocol.
3224
3225 2003-11-05  Maciej Stachowiak  <mjs@apple.com>
3226
3227         - fixed deployment build
3228         
3229         * kwq/KWQKHTMLPart.mm:
3230         (KWQKHTMLPart::fileWrapperForElement):
3231
3232 2003-11-04  Maciej Stachowiak  <mjs@apple.com>
3233
3234         Reviewed by Ken.
3235
3236         * khtml/ecma/kjs_window.cpp: Don't make event read-only, some
3237         sites want to set their own top-level function named "event" and
3238         will hang if they can't.
3239         * khtml/ecma/kjs_window.lut.h: Regenerated.
3240
3241 2003-11-03  David Hyatt  <hyatt@apple.com>
3242
3243         Fix for 3472167, for shrink-to-fit style printing, grow the width of the initial containing block
3244         to be as large as the rightmost position after doing a layout to the page width.
3245         
3246         Reviewed by john
3247
3248         * kwq/KWQKHTMLPart.mm:
3249         (KWQKHTMLPart::forceLayoutForPageWidth):
3250
3251 2003-11-04  Chris Blumenberg  <cblu@apple.com>
3252
3253         Fixed:
3254         <rdar://problem/3472403>: RTFD of copied text and images should use original image data not tiffs
3255
3256         Reviewed by john.
3257
3258         * kwq/KWQKHTMLPart.h:
3259         * kwq/KWQKHTMLPart.mm:
3260         (KWQKHTMLPart::fileWrapperForElement): call [_bridge _fileWrapperForURL:] to get cached data
3261         * kwq/WebCoreBridge.h: added _fileWrapperForURL: to the bridge protocol
3262         * kwq/WebCoreBridge.mm:
3263         (-[WebCoreBridge selectedAttributedString]): call the instance method attributedString 
3264         (-[WebCoreBridge attributedStringFrom:startOffset:to:endOffset:]): call the instance method attributedString 
3265
3266 2003-11-04  Maciej Stachowiak  <mjs@apple.com>
3267
3268         Reviewed by Chris.
3269
3270         - fixed 3472893 - Slow intel page takes 20% of its time in CachedObject::ref
3271         
3272         Speeds up loading of
3273         http://www.intel.com/cd/ids/developer/asmo-na/eng/index.htm by
3274         19%, no slowdown on PLT.
3275         
3276         * khtml/misc/loader.h: Use QPtrDict for m_clients instead of QPtrList.
3277         * khtml/misc/loader.cpp:
3278         (CachedObjectClientWalker::CachedObjectClientWalker): Ditto.
3279         (CachedObject::ref): Ditto.
3280         * kwq/KWQPtrDict.h:
3281         (QPtrDict::isEmpty): Implemented.
3282
3283 2003-11-03  Maciej Stachowiak  <mjs@apple.com>
3284
3285         Reviewed by Darin.
3286
3287         - fixed 3370085 - new frames with javascript: URLs should be populated with the result of the JavaScript code
3288         
3289         * ChangeLog:
3290         * khtml/html/html_baseimpl.cpp:
3291         (HTMLFrameElementImpl::updateForNewURL): Skip special filtering of
3292         javascript:.
3293         (HTMLFrameElementImpl::attach): Ditto.
3294         * khtml/khtml_part.cpp:
3295         (KHTMLPart::replaceContentsWithScriptResult): New method to execute
3296         script and if the result is a string, set it as the new document contents.
3297         (KHTMLPart::requestFrame): Removed APPLE_CHANGES around
3298         javascript: handling. Use new
3299         replaceContentsWithScriptResult method. This executes the
3300         JS in the new child frame, not the parent frame, as in other
3301         browsers.
3302         * khtml/khtml_part.h: Prototype new method.
3303         * kwq/KWQKHTMLPartBrowserExtension.mm:
3304         (KHTMLPartBrowserExtension::openURLRequest): Use new part method.
3305
3306 2003-11-03  Vicki Murley  <vicki@apple.com>
3307
3308         Reviewed by kocienda.
3309
3310         - fixed <rdar://problem/3471096>: non-B&I builds should not use order files, because they cause false "regressions" in perf.
3311
3312         * WebCore.pbproj/project.pbxproj: added empty SECTORDER_FLAGS variables to the Development and Deployment build styles
3313
3314 2003-11-03  Ken Kocienda  <kocienda@apple.com>
3315
3316         Reviewed by Maciej
3317
3318         Fix for this bug:
3319
3320         <rdar://problem/3470338>: onclick is not executing when you hit enter on focused links
3321
3322         Now when we trap return or enter when a link is focused, we send
3323         a click event to the node.
3324
3325         * khtml/html/html_inlineimpl.cpp:
3326         (HTMLAnchorElementImpl::defaultEventHandler): Swallow key event when 
3327         return or enter and send a mouse event.
3328         (HTMLAnchorElementImpl::performClick): New function to send simulated
3329         click.
3330         * khtml/html/html_inlineimpl.h: Declare performClick function.
3331
3332 2003-11-03  Darin Adler  <darin@apple.com>
3333
3334         Reviewed by John.
3335
3336         - fixed 3392543 -- incorrect base writing direction in RTL form controls
3337         - fixed baseline for list box <select> elements
3338         - moved style code from updateFromElement to setStyle
3339
3340         * khtml/rendering/render_form.h: Added setStyle function to RenderFormElement, RenderLineEdit,
3341         RenderSelect, and RenderTextArea. Removed some unused stuff.
3342         * khtml/rendering/render_form.cpp:
3343         (RenderFormElement::setStyle): Set the font based on the style.
3344         (RenderFormElement::updateFromElement): Remove font setting code; moved to setStyle.
3345         Also ifdef'd out the color-setting code, which belongs in setStyle and is irrelevant
3346         for KWQ anyway.
3347         (RenderSubmitButton::setStyle): Set the writing direction based on the style.
3348         (RenderSubmitButton::updateFromElement): Tiny code cleanup, using a local variable.
3349         (RenderLineEdit::setStyle): Set the alignment and writing direction based on the style.
3350         (RenderLineEdit::updateFromElement): Remove alignment setting code; moved to setStyle.
3351         (RenderFileButton::RenderFileButton): Remove code to set m_focus, a data member that was
3352         never used.
3353         (RenderSelect::setWidgetWritingDirection): Added. Helper function.
3354         (RenderSelect::setStyle): Call setWidgetWritingDirection.
3355         (RenderSelect::updateFromElement): Call setWidgetWritingDirection if a new widget is created.
3356         (RenderSelect::baselinePosition): Added a FIXME comment.
3357         (RenderTextArea::setStyle): Set the alignment and writing direction based on the style.
3358         (RenderTextArea::updateFromElement): Remove alignment setting code; moved to setStyle.
3359
3360         * kwq/KWQButton.h: Added setWritingDirection function.
3361         * kwq/KWQButton.mm:
3362         (+[KWQButton cellClass]): Use KWQButtonCell.
3363         (-[KWQButtonCell baseWritingDirection:]): Return base writing direction.
3364         (-[KWQButtonCell setBaseWritingDirection:]): Store base writing direction.
3365         (-[KWQButtonCell _textAttributes]): Set the base writing direction in the paragraph
3366         style if it's not already right.
3367         (QButton::setWritingDirection): Call setBaseWritingDirection: on the cell and do
3368         setNeedsDisplay: as needed.
3369
3370         * kwq/KWQComboBox.h: Added setWritingDirection function.
3371         * kwq/KWQComboBox.mm:
3372         (QComboBox::setWritingDirection): Call setBaseWritingDirection: on the cell and do
3373         setNeedsDisplay: as needed.
3374         (-[KWQPopUpButtonCell setBaseWritingDirection:]): Store base writing direction.
3375         (-[KWQPopUpButtonCell baseWritingDirection:]): Return base writing direction.
3376         (-[KWQPopUpButtonCell _textAttributes]): Set the base writing direction in the
3377         paragraph style if it's not already right.
3378
3379         * kwq/KWQLineEdit.h: Added setWritingDirection function.
3380 &nbs