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