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