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