Disable XBL. The loadBindings call was taking 0.1-0.25%. While I know how to get...
[WebKit-https.git] / WebCore / ChangeLog-2005-08-23
1 2004-01-30  David Hyatt  <hyatt@apple.com>
2
3         Disable XBL.  The loadBindings call was taking 0.1-0.25%.  While I know how to get rid of this overhead,
4         it's easier for now to just disable all of XBL.
5
6         * WebCorePrefix.h:
7         * khtml/misc/loader.h:
8         * khtml/xbl/xbl_binding.cpp:
9         * khtml/xbl/xbl_binding_manager.cpp:
10         * khtml/xbl/xbl_docimpl.cpp:
11         * khtml/xbl/xbl_protobinding.cpp:
12         * khtml/xbl/xbl_protohandler.cpp:
13         * khtml/xbl/xbl_protoimplementation.cpp:
14         * khtml/xbl/xbl_tokenizer.cpp:
15
16 2004-01-29  David Hyatt  <hyatt@apple.com>
17
18         Atomize font families (KWQFontFamily) and all attribute values.  Move atomic string into separate files.
19
20         In my testing, this patch yields the same score as Safari-125 in tests and recovers all lost performance
21         (mostly from excess copying of AtomicStrings where DOMStringImpl* used to be returned).
22         
23         Reviewed by darin
24
25         * ForwardingHeaders/xml/dom_atomicstring.h: Added.
26         * WebCore.pbproj/project.pbxproj:
27         * khtml/css/css_base.cpp:
28         (CSSSelector::print):
29         (CSSSelector::extractPseudoType):
30         (CSSSelector::selectorText):
31         * khtml/css/css_valueimpl.cpp:
32         (FontFamilyValueImpl::FontFamilyValueImpl):
33         * khtml/css/cssparser.cpp:
34         (CSSParser::parseFontFamily):
35         * khtml/css/cssparser.h:
36         * khtml/css/cssstyleselector.cpp:
37         (khtml::checkPseudoState):
38         (khtml::CSSStyleSelector::checkOneSelector):
39         (khtml::CSSStyleSelector::applyRule):
40         * khtml/dom/dom_element.cpp:
41         (Element::getAttributeNS):
42         * khtml/dom/dom_string.cpp:
43         (DOMString::toInt):
44         (DOMString::toLengthArray):
45         (DOM::operator==):
46         * khtml/dom/dom_string.h:
47         (DOM::operator==):
48         (DOM::operator!=):
49         * khtml/ecma/kjs_navigator.cpp:
50         (Plugins::get):
51         (MimeTypes::get):
52         (Plugin::get):
53         * khtml/html/html_baseimpl.cpp:
54         (HTMLBodyElementImpl::parseAttribute):
55         (HTMLFrameElementImpl::isURLAllowed):
56         (HTMLFrameElementImpl::openURL):
57         (HTMLFrameElementImpl::parseAttribute):
58         (HTMLFrameElementImpl::attach):
59         (HTMLFrameElementImpl::setLocation):
60         (HTMLFrameSetElementImpl::parseAttribute):
61         (HTMLIFrameElementImpl::attach):
62         * khtml/html/html_baseimpl.h:
63         * khtml/html/html_blockimpl.cpp:
64         (HTMLHRElementImpl::parseAttribute):
65         (HTMLHRElementImpl::attach):
66         (HTMLMarqueeElementImpl::parseAttribute):
67         * khtml/html/html_documentimpl.cpp:
68         (HTMLDocumentImpl::documentElement):
69         * khtml/html/html_documentimpl.h:
70         * khtml/html/html_elementimpl.cpp:
71         (HTMLElementImpl::parseAttribute):
72         (HTMLElementImpl::addCSSLength):
73         (HTMLElementImpl::addHTMLAlignment):
74         * khtml/html/html_elementimpl.h:
75         * khtml/html/html_formimpl.cpp:
76         (HTMLGenericFormElementImpl::parseAttribute):
77         (HTMLInputElementImpl::parseAttribute):
78         (HTMLInputElementImpl::attach):
79         (HTMLSelectElementImpl::parseAttribute):
80         (HTMLKeygenElementImpl::parseAttribute):
81         (HTMLKeygenElementImpl::encoding):
82         (HTMLOptionElementImpl::parseAttribute):
83         (HTMLTextAreaElementImpl::parseAttribute):
84         * khtml/html/html_formimpl.h:
85         * khtml/html/html_headimpl.cpp:
86         (HTMLLinkElementImpl::parseAttribute):
87         (HTMLStyleElementImpl::parseAttribute):
88         * khtml/html/html_imageimpl.cpp:
89         (HTMLImageElementImpl::parseAttribute):
90         (HTMLAreaElementImpl::parseAttribute):
91         * khtml/html/html_inlineimpl.cpp:
92         (HTMLAnchorElementImpl::parseAttribute):
93         * khtml/html/html_listimpl.cpp:
94         (HTMLOListElementImpl::parseAttribute):
95         (HTMLLIElementImpl::parseAttribute):
96         * khtml/html/html_miscimpl.cpp:
97         (HTMLCollectionImpl::getNamedItem):
98         (HTMLFormCollectionImpl::getNamedFormItem):
99         (HTMLFormCollectionImpl::getNamedImgItem):
100         * khtml/html/html_objectimpl.cpp:
101         (HTMLEmbedElementImpl::parseAttribute):
102         (HTMLObjectElementImpl::parseAttribute):
103         (HTMLParamElementImpl::HTMLParamElementImpl):
104         (HTMLParamElementImpl::~HTMLParamElementImpl):
105         (HTMLParamElementImpl::parseAttribute):
106         * khtml/html/html_objectimpl.h:
107         (DOM::HTMLParamElementImpl::name):
108         (DOM::HTMLParamElementImpl::value):
109         * khtml/html/html_tableimpl.cpp:
110         (HTMLTableElementImpl::parseAttribute):
111         (HTMLTablePartElementImpl::parseAttribute):
112         (HTMLTableCellElementImpl::parseAttribute):
113         (HTMLTableColElementImpl::parseAttribute):
114         * khtml/html/htmlparser.cpp:
115         (KHTMLParser::insertNode):
116         (KHTMLParser::handleIsindex):
117         * khtml/html/htmltokenizer.cpp:
118         (HTMLTokenizer::parseTag):
119         * khtml/html/htmltokenizer.h:
120         (khtml::Token::addAttribute):
121         * khtml/khtml_part.cpp:
122         (KHTMLPart::init):
123         * khtml/khtmlview.cpp:
124         (KHTMLToolTip::maybeTip):
125         * khtml/xml/dom_atomicstring.cpp: Added.
126         (DOM::AtomicStringStatisticsExitLogger::~AtomicStringStatisticsExitLogger):
127         (DOM::AtomicString::equal):
128         (DOM::AtomicString::add):
129         (DOM::AtomicString::insert):
130         (DOM::AtomicString::remove):
131         (DOM::AtomicString::expand):
132         (DOM::AtomicString::shrink):
133         (DOM::AtomicString::rehash):
134         (DOM::AtomicString::init):
135         (DOM::operator==):
136         (DOM::equalsIgnoreCase):
137         * khtml/xml/dom_atomicstring.h: Added.
138         (DOM::AtomicString::AtomicString):
139         (DOM::AtomicString:::m_string):
140         (DOM::AtomicString::operator const DOMString&):
141         (DOM::AtomicString::domString):
142         (DOM::AtomicString::string):
143         (DOM::AtomicString::implementation):
144         (DOM::AtomicString::unicode):
145         (DOM::AtomicString::length):
146         (DOM::AtomicString::ascii):
147         (DOM::AtomicString::find):
148         (DOM::AtomicString::toInt):
149         (DOM::AtomicString::percentage):
150         (DOM::AtomicString::toLengthArray):
151         (DOM::AtomicString::isNull):
152         (DOM::AtomicString::isEmpty):
153         (DOM::AtomicString::equal):
154         (DOM::operator==):
155         (DOM::operator!=):
156         * khtml/xml/dom_atomicstringlist.h: Added.
157         (DOM::AtomicStringList:::m_next):
158         (DOM::AtomicStringList::m_next):
159         (DOM::AtomicStringList::~AtomicStringList):
160         (DOM::AtomicStringList::next):
161         (DOM::AtomicStringList::setNext):
162         (DOM::AtomicStringList::string):
163         (DOM::AtomicStringList::setString):
164         (DOM::AtomicStringList::clone):
165         (DOM::AtomicStringList::clear):
166         * khtml/xml/dom_docimpl.h:
167         * khtml/xml/dom_elementimpl.cpp:
168         (AttrImpl::nodeValue):
169         (AttrImpl::cloneNode):
170         (ElementImpl::getAttribute):
171         (ElementImpl::getAttributeNS):
172         (ElementImpl::setAttribute):
173         (ElementImpl::setAttributeMap):
174         (ElementImpl::attach):
175         (ElementImpl::detach):
176         (ElementImpl::updateId):
177         (NamedAttrMapImpl::setNamedItem):
178         (NamedAttrMapImpl::removeNamedItem):
179         (NamedAttrMapImpl::getAttributeItem):
180         (NamedAttrMapImpl::operator=):
181         (NamedAttrMapImpl::removeAttribute):
182         * khtml/xml/dom_elementimpl.h:
183         (DOM::AttributeImpl::AttributeImpl):
184         (DOM::AttributeImpl::value):
185         (DOM::AttributeImpl::prefix):
186         (DOM::AttributeImpl::isNull):
187         (DOM::AttributeImpl::isEmpty):
188         (DOM::AttributeImpl::setValue):
189         (DOM::AttributeImpl::setPrefix):
190         (DOM::ElementImpl::getAttribute):
191         * khtml/xml/dom_nameimpl.cpp: Removed.
192         * khtml/xml/dom_nameimpl.h:
193         (DOM::Name::namespaceURI):
194         (DOM::Name::localName):
195         * khtml/xml/dom_nodeimpl.h:
196         * khtml/xml/dom_stringimpl.cpp:
197         * kwq/KWQFont.mm:
198         (QFont::family):
199         * kwq/KWQFontFamily.h:
200         (KWQFontFamily::family):
201         * kwq/KWQFontFamily.mm:
202         (retainDOMStringImpl):
203         (releaseDOMStringImpl):
204         (KWQFontFamily::getNSFamily):
205         (KWQFontFamily::setFamily):
206         (KWQFontFamily::operator==):
207         * kwq/KWQKHTMLPart.mm:
208         (KWQKHTMLPart::fileWrapperForElement):
209         * kwq/WebCoreBridge.mm:
210         (-[WebCoreBridge elementAtPoint:]):
211
212 2004-01-29  Chris Blumenberg  <cblu@apple.com>
213
214         Fixed: <rdar://problem/3543619>: copied HTML is strangely formatted, random whitespace and return characters
215
216         Reviewed by dave.
217
218         * khtml/xml/dom_nodeimpl.cpp:
219         (NodeImpl::recursive_toHTMLWithRange): remove all code that tries to format the HTML since we can rely on the existing white space to preserve the original formatting
220
221 2004-01-28  John Sullivan  <sullivan@apple.com>
222
223         Reviewed by Dave.
224
225         * khtml/rendering/render_text.cpp:
226         (RenderText::paintObject):
227         Increment s in the while() clause so it is incremented even
228         after a continue statement. This fixes an infinite loop I ran
229         into in the printing code path at certain scaled print sizes
230         on certain pages.
231
232 2004-01-28  Chris Blumenberg  <cblu@apple.com>
233
234         Fixed: <rdar://problem/3543041>: when pasting an image, cursor should be after the image, not before
235
236         Reviewed by rjw.
237
238         * khtml/xml/dom_docimpl.cpp:
239         (DocumentImpl::pasteHTMLString): when the last node of the paste is non-text, use 1 instead of 0 as the start offset of the caret
240
241 2004-01-28  Ken Kocienda  <kocienda@apple.com>
242
243         Reviewed by Hyatt
244
245         A small collection of fixes and improvements to editing.
246
247         Added a forwarding header for dom_position.h
248         Added some debugging output to KHTMLSelection
249         Added support for left arrow navigation.
250         Greatly improved support for right arrow navigation.
251         Added include guards to dom_position.h. Oops!
252         Removed pruneEmptyNodes() function from htmlediting.cpp. That was crack.
253         Improved the text insert command so that it splits the text node being
254             operated on only when necessary.
255         Added support for placing the caret in and arrowing into BR elements.
256         Moved precedesLineBreak/followsLineBreak from RenderText to RenderObject.       
257
258         * ForwardingHeaders/dom/dom_position.h: Added.
259         * khtml/dom/dom_position.h:
260         * khtml/editing/htmlediting.cpp:
261         (InputTextCommand::apply):
262         (DeleteTextCommand::apply):
263         * khtml/khtml_selection.cpp:
264         (KHTMLSelection::setSelection):
265         (KHTMLSelection::alterSelection):
266         (KHTMLSelection::update):
267         (KHTMLSelection::previousCharacterPosition):
268         (KHTMLSelection::nextCharacterPosition):
269         (startAndEndLineNodesIncludingNode):
270         (KHTMLSelection::debugRenderer):
271         (KHTMLSelection::debugPosition):
272         * khtml/khtml_selection.h:
273         * khtml/rendering/render_br.cpp:
274         (RenderBR::RenderBR):
275         (RenderBR::position):
276         (RenderBR::caretMaxOffset):
277         (RenderBR::caretPos):
278         * khtml/rendering/render_br.h:
279         (khtml::RenderBR::xPos):
280         (khtml::RenderBR::yPos):
281         (khtml::RenderBR::height):
282         * khtml/rendering/render_object.cpp:
283         (RenderObject::precedesLineBreak):
284         (RenderObject::followsLineBreak):
285         (RenderObject::isEditable):
286         * khtml/rendering/render_object.h:
287         * khtml/rendering/render_text.cpp:
288         (RenderText::caretPos):
289         (RenderText::position):
290         (RenderText::caretMaxOffset):
291         * khtml/rendering/render_text.h:
292         * khtml/xml/dom_elementimpl.cpp:
293         (ElementImpl::defaultEventHandler):
294
295 2004-01-28  David Hyatt  <hyatt@apple.com>
296
297         Fix for 3537694, make blocks for parents of inline children be axobjects.
298         
299         Reviewed by kocienda
300
301         * kwq/KWQAccObject.mm:
302         (-[KWQAccObject role]):
303         (-[KWQAccObject accessibilityIsIgnored]):
304
305 2004-01-28  David Hyatt  <hyatt@apple.com>
306
307         Make AtomicString a new class that owns DOMStrings, instead of using KJS::Identifier.  One day when we
308         convert DOMString and UString to have the same underlying rep, then these classes could possibly re-merge.
309         For now this provides an easy migration path for all the code that is using DOMStringImpl*.
310
311         Also fixed a bug with float clearing in the style cascade.
312         
313         Reviewed by darin
314
315         * khtml/css/cssparser.h:
316         (DOM::atomicString):
317         * khtml/css/cssstyleselector.cpp:
318         (khtml::CSSStyleSelector::checkOneSelector):
319         (khtml::CSSStyleSelector::applyRule):
320         * khtml/dom/dom_string.cpp:
321         (DOMString::DOMString):
322         * khtml/xml/dom_nameimpl.cpp:
323         (DOM::AtomicStringStatisticsExitLogger::~AtomicStringStatisticsExitLogger):
324         (DOM::AtomicString::equal):
325         (DOM::AtomicString::add):
326         (DOM::AtomicString::insert):
327         (DOM::AtomicString::remove):
328         (DOM::AtomicString::expand):
329         (DOM::AtomicString::shrink):
330         (DOM::AtomicString::rehash):
331         (DOM::AtomicString::null):
332         (DOM::AtomicString::init):
333         (DOM::operator==):
334         (DOM::equalsIgnoreCase):
335         * khtml/xml/dom_nameimpl.h:
336         (DOM::AtomicString::AtomicString):
337         (DOM::AtomicString:::m_string):
338         (DOM::AtomicString::string):
339         (DOM::AtomicString::qstring):
340         (DOM::AtomicString::implementation):
341         (DOM::AtomicString::unicode):
342         (DOM::AtomicString::length):
343         (DOM::AtomicString::ascii):
344         (DOM::AtomicString::find):
345         (DOM::AtomicString::isNull):
346         (DOM::AtomicString::isEmpty):
347         (DOM::AtomicString::equal):
348         (DOM::operator==):
349         (DOM::operator!=):
350         * khtml/xml/dom_stringimpl.cpp:
351         (DOM::DOMStringImpl::empty):
352         (DOM::DOMStringImpl::DOMStringImpl):
353         (DOM::DOMStringImpl::~DOMStringImpl):
354         (DOM::DOMStringImpl::append):
355         (DOM::DOMStringImpl::insert):
356         (DOM::DOMStringImpl::truncate):
357         (DOM::DOMStringImpl::remove):
358         (DOM::DOMStringImpl::split):
359         (DOM::DOMStringImpl::substring):
360         (DOM::DOMStringImpl::replace):
361         (DOM::DOMStringImpl::computeHash):
362         * khtml/xml/dom_stringimpl.h:
363         (DOM::DOMStringImpl::DOMStringImpl):
364         (DOM::DOMStringImpl::hash):
365         * khtml/xml/dom_textimpl.cpp:
366         (CharacterDataImpl::CharacterDataImpl):
367
368 2004-01-27  Chris Blumenberg  <cblu@apple.com>
369
370         Fixed:
371         <rdar://problem/3541812>: Implement Paste menu item
372         <rdar://problem/3541814>: Implement Delete menu item
373         <rdar://problem/3541811>: Implement Cut menu item
374
375         Reviewed by dave.
376
377         * khtml/xml/dom_docimpl.cpp:
378         (DocumentImpl::deleteSelection): new
379         (DocumentImpl::pasteHTMLString): new
380         * khtml/xml/dom_docimpl.h:
381         * kwq/WebCoreBridge.h:
382         * kwq/WebCoreBridge.mm:
383         (-[WebCoreBridge isEditable]): new
384         (-[WebCoreBridge pasteHTMLString:]): new
385         (-[WebCoreBridge deleteSelection]): new
386         (-[WebCoreBridge haveSelection]): new
387
388 2004-01-27  David Hyatt  <hyatt@apple.com>
389
390         Add a new AtomicString type (that is really just a KJS::Identifier).  Define a Name class that will eventually
391         be used for element and attribute names.
392
393         Atomize the CSS selector's "value" field, used to hold class names, identifier names, attribute values, and
394         pseudo-element names.
395         
396         Reviewed by rjw
397
398         * ForwardingHeaders/kjs/identifier.h: Added.
399         * WebCore.pbproj/project.pbxproj:
400         * khtml/css/css_base.cpp:
401         (CSSSelector::print):
402         (CSSSelector::specificity):
403         (CSSSelector::extractPseudoType):
404         (CSSSelector::selectorText):
405         * khtml/css/css_base.h:
406         (DOM::CSSSelector::):
407         * khtml/css/cssparser.cpp:
408         (ParseString::lower):
409         * khtml/css/cssparser.h:
410         (DOM::atomicString):
411         * khtml/css/cssstyleselector.cpp:
412         (khtml::CSSStyleSelector::checkOneSelector):
413         * khtml/css/parser.cpp:
414         * khtml/css/parser.y:
415         * khtml/html/html_elementimpl.cpp:
416         (:NamedAttrMapImpl):
417         (HTMLNamedAttrMapImpl::clearAttributes):
418         (HTMLNamedAttrMapImpl::isHTMLAttributeMap):
419         (HTMLNamedAttrMapImpl::parseClassAttribute):
420         (HTMLNamedAttrMapImpl::matchesCSSClass):
421         (HTMLElementImpl::parseAttribute):
422         (HTMLElementImpl::createAttributeMap):
423         (HTMLElementImpl::matchesCSSClass):
424         * khtml/html/html_elementimpl.h:
425         * khtml/html/html_objectimpl.cpp:
426         (HTMLObjectElementImpl::recalcStyle):
427         * khtml/html/htmltokenizer.h:
428         (khtml::Token::addAttribute):
429         * khtml/xml/dom_elementimpl.cpp:
430         (ElementImpl::matchesCSSClass):
431         (NamedAttrMapImpl::isHTMLAttributeMap):
432         (NamedAttrMapImpl::operator=):
433         * khtml/xml/dom_elementimpl.h:
434         * khtml/xml/dom_nameimpl.cpp: Added.
435         (DOM::AtomicStringList::clone):
436         (DOM::operator==):
437         (DOM::equalsIgnoreCase):
438         * khtml/xml/dom_nameimpl.h: Added.
439         (DOM::AtomicStringList:::m_next):
440         (DOM::AtomicStringList::m_next):
441         (DOM::AtomicStringList::~AtomicStringList):
442         (DOM::AtomicStringList::next):
443         (DOM::AtomicStringList::setNext):
444         (DOM::AtomicStringList::string):
445         (DOM::AtomicStringList::setString):
446         (DOM::AtomicStringList::clear):
447         (DOM::Name::Name):
448         (DOM::Name::m_localName):
449         (DOM::Name::namespaceURI):
450         (DOM::Name::localName):
451         (DOM::operator==):
452         (DOM::operator!=):
453         * khtml/xml/dom_nodeimpl.h:
454
455 2004-01-27  Darin Adler  <darin@apple.com>
456
457         Reviewed by Ken.
458
459         - fixed <rdar://problem/3526056>: W3C says that DEL key identifier should be U+00007F, we give ForwardDelete instead
460
461         * kwq/KWQEvent.mm: (keyIdentifierForKeyEvent): Correct the key identifiers for the Delete, Insert,
462         Menu, Scroll Lock, and Select keys, as well as some obscure F25 and higher keys. Also add some
463         explicit constants for the keys defined in NSEvent.h that we map to a key identifier using the
464         vendor-area Unicode values (which are probably not appropriate).
465
466 2004-01-27  David Hyatt  <hyatt@apple.com>
467
468         Make a change suggested by kocienda to add a remove() method to InlineBoxes.
469         
470         Reviewed by kocienda
471
472         * khtml/rendering/render_box.cpp:
473         (RenderBox::detach):
474         (RenderBox::position):
475         * khtml/rendering/render_line.cpp:
476         (InlineBox::remove):
477         * khtml/rendering/render_line.h:
478         * khtml/rendering/render_text.cpp:
479         (RenderText::detach):
480         (RenderText::position):
481
482 2004-01-26  Darin Adler  <darin@apple.com>
483
484         Reviewed by Maciej.
485
486         - follow-on to the text-align change I did earlier today
487
488         * khtml/css/html4.css: Set input and textarea so they do not inherit text-align
489         from their parent by doing "text-align: -khtml-auto". This fixes google.com among others.
490
491 2004-01-26  Darin Adler  <darin@apple.com>
492
493         Reviewed by Maciej.
494
495         - fixed <rdar://problem/3539414>: pop-up windows appear very narrow because of bogus width (carad.com/ebaymotors)
496
497         * khtml/ecma/kjs_window.cpp: (WindowFunc::tryCall): Check the "OK" result from toFloat in
498         window.open, and omit any parameters that can't be parsed.
499
500 2004-01-26  Darin Adler  <darin@apple.com>
501
502         Reviewed by Maciej.
503
504         - fixed <rdar://problem/3537371>: REGRESSION (100-125): optgroup labels are no longer indented as they were before
505
506         * khtml/rendering/render_form.cpp: (RenderSelect::updateFromElement):
507         Move code that adds spaces after code that strips whitespace. Also simplify
508         the code a bit by using DOMString::string().
509
510 2004-01-26  Darin Adler  <darin@apple.com>
511
512         Reviewed by Dave.
513
514         - fixed <rdar://problem/3539286>: text with a transparent background color pastes as black on black
515
516         * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::attributedString): Don't put color in the mutable
517         string if it's entirely transparent.
518         * kwq/KWQColor.mm: (QColor::getNSColor): Fix bug where we would return nil for RGBA of 0.
519
520 2004-01-26  Darin Adler  <darin@apple.com>
521
522         Reviewed by Maciej.
523
524         - fixed <rdar://problem/3529120>: text-align style property not respected on input fields
525
526         * khtml/rendering/render_form.h: Added textAlignment function.
527         * khtml/rendering/render_form.cpp:
528         (RenderFormElement::textAlignment): Added. Converts style alignment to Qt alignment.
529         (RenderLineEdit::setStyle): Call textAlignment intead of using direction from style.
530         (RenderTextArea::setStyle): Call textAlignment intead of using direction from style.
531
532         * kwq/KWQLineEdit.h: Added KWQNSTextAlignmentForAlignmentFlags function.
533         * kwq/KWQLineEdit.mm:
534         (QLineEdit::setAlignment): Use KWQNSTextAlignmentForAlignmentFlags instead of code
535         that handles only left and right alignment.
536         (KWQNSTextAlignmentForAlignmentFlags): Added. Converts Qt alignment to NS alignment.
537         * kwq/KWQTextEdit.mm: (QTextEdit::setAlignment): Use KWQNSTextAlignmentForAlignmentFlags
538         instead of code that handles only left and right alignment.
539
540 2004-01-26  Darin Adler  <darin@apple.com>
541
542         Reviewed by Dave.
543
544         - fixed <rdar://problem/3477707>: background image with apostrophe in name missing at http://www.nbc.com
545
546         * khtml/html/html_baseimpl.cpp: (HTMLBodyElementImpl::parseAttribute): Use addCSSImageProperty
547         instead of addCSSProperty, obviating the need for the "url()" syntax (and fixing quoting issues).
548
549         * khtml/html/html_tableimpl.cpp:
550         (HTMLTableElementImpl::parseAttribute): Ditto.
551         (HTMLTablePartElementImpl::parseAttribute): Ditto.
552
553         * khtml/html/html_elementimpl.h: Added addCSSStringProperty and addCSSImageProperty.
554         * khtml/html/html_elementimpl.cpp:
555         (HTMLElementImpl::addCSSStringProperty): Added. Calls setStringProperty. Not used yet.
556         (HTMLElementImpl::addCSSImageProperty): Added. Calls setImageProperty.
557
558         * khtml/css/css_valueimpl.h: Added setStringProperty and setImageProperty.
559         * khtml/css/css_valueimpl.cpp:
560         (CSSStyleDeclarationImpl::setStringProperty): Added. Sets a property without parsing.
561         (CSSStyleDeclarationImpl::setImageProperty): Added. Sets a property without parsing.
562         You'd think we'd be able to just use setStringProperty, but that's not how the image
563         properties work.
564
565 2004-01-26  Darin Adler  <darin@apple.com>
566
567         * Makefile.am: Switch from pbxbuild to xcodebuild.
568
569 2004-01-26  David Hyatt  <hyatt@apple.com>
570
571         Add CSS3 @namespace support.  The whole way namespaces, element, and attribute names are being handled
572         right now is temporary.  This code gives us a baseline of functionality (for regression testing) that we
573         can use when we implement namespaces "the right way."
574         
575         Reviewed by darin
576
577         * WebCore.pbproj/project.pbxproj:
578         * khtml/css/css_base.cpp:
579         (CSSSelector::specificity):
580         (CSSSelector::selectorText):
581         * khtml/css/css_base.h:
582         (DOM::CSSNamespace::m_parent):
583         (DOM::CSSNamespace::~CSSNamespace):
584         (DOM::CSSNamespace::uri):
585         (DOM::CSSNamespace::prefix):
586         (DOM::CSSNamespace::namespaceForPrefix):
587         (DOM::CSSSelector::CSSSelector):
588         * khtml/css/css_stylesheetimpl.cpp:
589         (CSSStyleSheetImpl::CSSStyleSheetImpl):
590         (CSSStyleSheetImpl::addNamespace):
591         (CSSStyleSheetImpl::determineNamespace):
592         * khtml/css/css_stylesheetimpl.h:
593         (DOM::CSSStyleSheetImpl::~CSSStyleSheetImpl):
594         * khtml/css/cssparser.cpp:
595         (CSSParser::CSSParser):
596         (CSSParser::parseSheet):
597         * khtml/css/cssparser.h:
598         * khtml/css/cssstyleselector.cpp:
599         (khtml::CSSStyleSelector::styleForElement):
600         (khtml::CSSStyleSelector::pseudoStyleForElement):
601         (khtml::CSSStyleSelector::checkSelector):
602         (khtml::CSSStyleSelector::checkOneSelector):
603         (khtml::CSSStyleSelector::buildLists):
604         * khtml/css/html4.css:
605         * khtml/css/parser.cpp:
606         * khtml/css/parser.y:
607         * khtml/xml/dom_docimpl.cpp:
608         (DocumentImpl::DocumentImpl):
609         (DocumentImpl::~DocumentImpl):
610         (DocumentImpl::attrId):
611         (DocumentImpl::attrName):
612         (DocumentImpl::tagId):
613         (DocumentImpl::tagName):
614         (DocumentImpl::namespaceURI):
615         * khtml/xml/dom_elementimpl.cpp:
616         (NamedAttrMapImpl::getAttributeItem):
617         * khtml/xml/dom_nodeimpl.cpp:
618         (NodeImpl::checkSetPrefix):
619         * khtml/xml/dom_nodeimpl.h:
620         (DOM::namespacePart):
621         (DOM::localNamePart):
622         (DOM::makeId):
623         * khtml/xml/dom_xmlimpl.cpp:
624         (ProcessingInstructionImpl::checkStyleSheet):
625         * khtml/xml/xml_namespace_table.cpp: Added.
626         (DOM::XmlNamespaceTable::getNamespaceID):
627         (DOM::XmlNamespaceTable::getNamespaceURI):
628         * khtml/xml/xml_namespace_table.h: Added.
629         (DOM::XmlNamespaceEntry::m_uri):
630
631 2004-01-26  Darin Adler  <darin@apple.com>
632
633         Reviewed by Dave.
634
635         - fixed <rdar://problem/3532519>: <select> menus show label property instead of tag contents (ups.com time and cost site)
636
637         * khtml/html/html_formimpl.cpp: (HTMLOptionElementImpl::text): Ignore the label property as
638         a quirk. Neither WinIE nor Mozilla implement the label property, so neither shall we (except
639         on strict pages, where we just go crazy and do everything "right").
640
641 2004-01-26  Ken Kocienda  <kocienda@apple.com>
642
643         Reviewed by Hyatt
644
645         * khtml/rendering/render_line.h:
646         (khtml::InlineBox::isFirstLineStyle): Helper to return whether
647         the line box has the first line style bit set.
648         * khtml/rendering/render_text.cpp:
649         (RenderText::caretPos): Noe correctly accounts for white space
650         which can precede an inline text box.
651
652 2004-01-26  David Hyatt  <hyatt@apple.com>
653
654         Remove incremental repainting ifdef.
655
656         * khtml/khtmlview.h:
657         * khtml/rendering/bidi.cpp:
658         (khtml::RenderBlock::layoutInlineChildren):
659         * khtml/rendering/render_block.cpp:
660         (khtml::RenderBlock::layoutBlock):
661         (khtml::RenderBlock::layoutBlockChildren):
662         (khtml::RenderBlock::repaintObjectsBeforeLayout):
663         (khtml::RenderBlock::positionNewFloats):
664         * khtml/rendering/render_block.h:
665         * khtml/rendering/render_box.cpp:
666         (RenderBox::computeAbsoluteRepaintRect):
667         (RenderBox::repaintDuringLayoutIfMoved):
668         * khtml/rendering/render_box.h:
669         * khtml/rendering/render_container.cpp:
670         (RenderContainer::removeChildNode):
671         * khtml/rendering/render_flexbox.cpp:
672         (khtml::RenderFlexibleBox::layoutBlock):
673         (khtml::RenderFlexibleBox::placeChild):
674         * khtml/rendering/render_flow.cpp:
675         (RenderFlow::getAbsoluteRepaintRect):
676         * khtml/rendering/render_image.cpp:
677         (RenderImage::layout):
678         * khtml/rendering/render_layer.cpp:
679         (RenderLayer::RenderLayer):
680         (RenderLayer::computeRepaintRects):
681         (RenderLayer::updateLayerPositions):
682         (RenderLayer::updateLayerPosition):
683         (RenderLayer::paintLayer):
684         * khtml/rendering/render_layer.h:
685         (khtml::RenderLayer::relativePositionOffset):
686         * khtml/rendering/render_object.cpp:
687         (RenderObject::setNeedsLayout):
688         (RenderObject::setChildNeedsLayout):
689         (RenderObject::markContainingBlocksForLayout):
690         (RenderObject::getAbsoluteRepaintRectIncludingFloats):
691         (RenderObject::detach):
692         (RenderObject::scheduleRelayout):
693         * khtml/rendering/render_object.h:
694         * khtml/rendering/render_table.cpp:
695         (RenderTable::layout):
696         (RenderTableSection::layoutRows):
697
698 2004-01-26  David Hyatt  <hyatt@apple.com>
699
700         Preserve the integrity of the line box tree when elements get removed.  Change RenderText over to using
701         the same data structures as inlines and blocks for maintaining its list of line boxes.
702         
703         Reviewed by kocienda
704
705         * khtml/khtml_part.cpp:
706         (KHTMLPart::text):
707         (KHTMLPart::customEvent):
708         * khtml/khtml_selection.cpp:
709         (KHTMLSelection::nextCharacterPosition):
710         (firstRunAt):
711         (lastRunAt):
712         * khtml/rendering/bidi.cpp:
713         (khtml::RenderBlock::layoutInlineChildren):
714         * khtml/rendering/render_block.cpp:
715         (khtml::RenderBlock::removeChild):
716         * khtml/rendering/render_box.cpp:
717         (RenderBox::RenderBox):
718         (RenderBox::detach):
719         (RenderBox::position):
720         (RenderBox::inlineBoxWrapper):
721         (RenderBox::deleteLineBoxWrapper):
722         * khtml/rendering/render_box.h:
723         * khtml/rendering/render_container.cpp:
724         (RenderContainer::removeChildNode):
725         * khtml/rendering/render_flow.cpp:
726         (RenderFlow::detach):
727         * khtml/rendering/render_line.cpp:
728         (InlineFlowBox::removeChild):
729         * khtml/rendering/render_line.h:
730         (khtml::InlineBox::nextOnLine):
731         (khtml::InlineBox::prevOnLine):
732         (khtml::InlineBox::setNextOnLine):
733         (khtml::InlineBox::setPrevOnLine):
734         (khtml::InlineRunBox::prevLineBox):
735         (khtml::InlineRunBox::nextLineBox):
736         * khtml/rendering/render_object.cpp:
737         (RenderObject::isEditable):
738         (RenderObject::inlineBoxWrapper):
739         (RenderObject::deleteLineBoxWrapper):
740         * khtml/rendering/render_object.h:
741         (khtml::RenderObject::documentBeingDestroyed):
742         * khtml/rendering/render_text.cpp:
743         (RenderText::RenderText):
744         (RenderText::detach):
745         (RenderText::deleteTextBoxes):
746         (RenderText::absoluteRects):
747         (RenderText::findNextInlineTextBox):
748         (RenderText::nodeAtPoint):
749         (RenderText::checkSelectionPointIgnoringContinuations):
750         (RenderText::caretPos):
751         (RenderText::paintObject):
752         (RenderText::paint):
753         (RenderText::minXPos):
754         (RenderText::xPos):
755         (RenderText::yPos):
756         (RenderText::height):
757         (RenderText::createInlineBox):
758         (RenderText::position):
759         (RenderText::width):
760         (RenderText::caretMinOffset):
761         (RenderText::caretMaxOffset):
762         * khtml/rendering/render_text.h:
763         (khtml::InlineTextBox:::InlineRunBox):
764         (khtml::InlineTextBox::nextTextBox):
765         (khtml::InlineTextBox::prevTextBox):
766         (khtml::RenderText::firstTextBox):
767         (khtml::RenderText::lastTextBox):
768         * kwq/KWQAccObject.mm:
769         (-[KWQAccObject accessibilityIsIgnored]):
770         * kwq/KWQDef.h:
771         * kwq/KWQKHTMLPart.mm:
772         (KWQKHTMLPart::attributedString):
773         * kwq/KWQRenderTreeDebug.cpp:
774         (write):
775
776 2004-01-24  David Hyatt  <hyatt@apple.com>
777
778         Polish the error message from the xml tokenizer.
779
780         * khtml/xml/xml_tokenizer.cpp:
781         (XMLTokenizer::finish):
782
783 2004-01-23  Ken Kocienda  <kocienda@apple.com>
784
785         Reviewed by Richard
786
787         * kwq/KWQKHTMLPart.mm:
788         (KWQKHTMLPart::setShowsFirstResponder): Now adjusts caret visibility
789         apprpropriately.
790
791 2004-01-23  David Hyatt  <hyatt@apple.com>
792
793         Stub out @namespace support.  Implement the callbacks into the stylesheet that will enable us to
794         store namespace information for simple selectors.
795
796         Basically with this patch we no longer bomb when we encounter namespaced stylesheets, but we don't handle
797         them properly yet either.
798         
799         Reviewed by kocienda
800
801         * khtml/css/css_stylesheetimpl.cpp:
802         (CSSStyleSheetImpl::addNamespace):
803         (CSSStyleSheetImpl::determineNamespace):
804         * khtml/css/css_stylesheetimpl.h:
805         * khtml/css/cssparser.cpp:
806         (DOM::CSSParser::lex):
807         * khtml/css/cssparser.h:
808         * khtml/css/parser.cpp:
809         * khtml/css/parser.h:
810         * khtml/css/parser.y:
811         * khtml/css/tokenizer.cpp:
812         * khtml/css/tokenizer.flex:
813
814 2004-01-23  Ken Kocienda  <kocienda@apple.com>
815
816         Reviewed by Hyatt
817
818         Merged HTML editing progress to TOT from the branch
819         I have been maintaining.
820
821         * khtml/dom/dom_position.cpp: Added.
822         * khtml/dom/dom_position.h: Added.
823         * khtml/editing/htmlediting.cpp: Added.
824         * khtml/editing/htmlediting.h: Added.
825         * khtml/khtml_selection.cpp: Added.
826         * khtml/khtml_selection.h: Added.
827
828 2004-01-22  David Hyatt  <hyatt@apple.com>
829
830         Fix a bug I accidentally introduced in static positioned elements.  Add more margin collapsing tests.
831         
832         * ChangeLog:
833         * khtml/rendering/render_block.cpp:
834         (khtml::RenderBlock::layoutBlockChildren):
835         * layout-tests/fast/block/margin-collapse/044-expected.txt: Added.
836         * layout-tests/fast/block/margin-collapse/044.html: Added.
837         * layout-tests/fast/block/margin-collapse/045-expected.txt: Added.
838         * layout-tests/fast/block/margin-collapse/045.html: Added.
839         * layout-tests/fast/block/margin-collapse/062-expected.txt: Added.
840         * layout-tests/fast/block/margin-collapse/062.html: Added.
841         * layout-tests/fast/block/margin-collapse/063-expected.txt: Added.
842         * layout-tests/fast/block/margin-collapse/063.html: Added.
843         * layout-tests/fast/block/positioning/007-expected.txt:
844
845 2004-01-22  David Hyatt  <hyatt@apple.com>
846
847         Reviewed by NOBODY (OOPS!).
848
849         * khtml/rendering/render_block.cpp:
850         (khtml::RenderBlock::layoutBlockChildren):
851         * layout-tests/fast/block/margin-collapse/062-expected.txt: Added.
852         * layout-tests/fast/block/margin-collapse/062.html: Added.
853         * layout-tests/fast/block/margin-collapse/063-expected.txt: Added.
854         * layout-tests/fast/block/margin-collapse/063.html: Added.
855         * layout-tests/fast/block/positioning/007-expected.txt:
856
857 2004-01-22  David Hyatt  <hyatt@apple.com>
858
859         (1) Implement better XML error handling.
860         (2) Fix a minor z-index bug with the 'initial' value.
861         (3) Initial landing of XBL support.  Code is all ifnef KHTML_NO_XBL so that it can be turned off easily if
862         XBL never comes to fruition.
863         
864         Reviewed by darin
865
866         * ForwardingHeaders/xbl/xbl_binding_manager.h: Added.
867         * ForwardingHeaders/xbl/xbl_docimpl.h: Added.
868         * WebCore.pbproj/project.pbxproj:
869         * khtml/css/cssparser.cpp:
870         (CSSParser::parseValue):
871         * khtml/css/cssproperties.c:
872         (hash_prop):
873         (findProp):
874         * khtml/css/cssproperties.h:
875         * khtml/css/cssproperties.in:
876         * khtml/css/cssstyleselector.cpp:
877         (khtml::CSSStyleSelector::applyRule):
878         * khtml/dom/dom_element.cpp:
879         (Element::getAttributeNS):
880         * khtml/misc/loader.cpp:
881         (CachedXBLDocument::CachedXBLDocument):
882         (CachedXBLDocument::~CachedXBLDocument):
883         (CachedXBLDocument::ref):
884         (CachedXBLDocument::deref):
885         (CachedXBLDocument::data):
886         (CachedXBLDocument::checkNotify):
887         (CachedXBLDocument::error):
888         (DocLoader::requestXBLDocument):
889         (Cache::requestXBLDocument):
890         (CachedObjectClient::setXBLDocument):
891         (Cache::getStatistics):
892         * khtml/misc/loader.h:
893         (khtml::CachedObject::):
894         (khtml::CachedXBLDocument::document):
895         (khtml::CachedXBLDocument::schedule):
896         * khtml/misc/loader_client.h:
897         * khtml/rendering/render_style.cpp:
898         (bindingURI):
899         (marquee):
900         (StyleCSS3NonInheritedData::~StyleCSS3NonInheritedData):
901         (StyleCSS3NonInheritedData::bindingsEquivalent):
902         (StyleCSS3NonInheritedData::operator==):
903         (:m_next):
904         (BindingURI::~BindingURI):
905         (BindingURI::copy):
906         (BindingURI::operator==):
907         (RenderStyle::addBindingURI):
908         * khtml/rendering/render_style.h:
909         (khtml::BindingURI::operator!=):
910         (khtml::BindingURI::next):
911         (khtml::BindingURI::setNext):
912         (khtml::BindingURI::uri):
913         (khtml::RenderStyle::bindingURIs):
914         (khtml::RenderStyle::setHasAutoZIndex):
915         (khtml::RenderStyle::setZIndex):
916         (khtml::RenderStyle::deleteBindingURIs):
917         (khtml::RenderStyle::inheritBindingURIs):
918         * khtml/xbl/xbl_binding.cpp: Added.
919         (XBL::m_markedForDeath):
920         (XBL::XBLBindingChain::~XBLBindingChain):
921         (XBL::XBLBindingChain::firstStyleBindingChain):
922         (XBL::XBLBindingChain::lastBindingChain):
923         (XBL::XBLBindingChain::insertBindingChain):
924         (XBL::XBLBindingChain::markForDeath):
925         (XBL::XBLBindingChain::loaded):
926         (XBL::XBLBindingChain::hasStylesheets):
927         (XBL::XBLBindingChain::failed):
928         (XBL::m_nextBinding):
929         (XBL::XBLBinding::~XBLBinding):
930         (XBL::XBLBinding::loaded):
931         (XBL::XBLBinding::setXBLDocument):
932         * khtml/xbl/xbl_binding.h: Added.
933         (XBL::):
934         (XBL::XBLBindingChain::uri):
935         (XBL::XBLBindingChain::nextChain):
936         (XBL::XBLBindingChain::previousChain):
937         (XBL::XBLBindingChain::setNextBindingChain):
938         (XBL::XBLBindingChain::setPreviousBindingChain):
939         (XBL::XBLBindingChain::markedForDeath):
940         (XBL::XBLBindingChain::element):
941         * khtml/xbl/xbl_binding_manager.cpp: Added.
942         (XBL::m_bindingChainTable):
943         (XBL::XBLBindingManager::~XBLBindingManager):
944         (XBL::XBLBindingManager::getBindingChain):
945         (XBL::XBLBindingManager::setBindingChain):
946         (XBL::XBLBindingManager::loadBindings):
947         (XBL::XBLBindingManager::checkLoadState):
948         * khtml/xbl/xbl_binding_manager.h: Added.
949         * khtml/xbl/xbl_docimpl.cpp: Added.
950         (XBL:::DocumentImpl):
951         (XBL::XBLDocumentImpl::~XBLDocumentImpl):
952         (XBL::XBLDocumentImpl::createTokenHandler):
953         (XBL::XBLDocumentImpl::setPrototypeBinding):
954         (XBL::XBLDocumentImpl::prototypeBinding):
955         * khtml/xbl/xbl_docimpl.h: Added.
956         (XBL::):
957         * khtml/xbl/xbl_protobinding.cpp: Added.
958         (XBL::m_handler):
959         (XBL::XBLPrototypeBinding::initialize):
960         (XBL::XBLPrototypeBinding::document):
961         (XBL::XBLPrototypeBinding::addResource):
962         * khtml/xbl/xbl_protobinding.h: Added.
963         (XBL::XBLPrototypeBinding::element):
964         (XBL::XBLPrototypeBinding::setHandler):
965         (XBL::XBLPrototypeBinding::handler):
966         * khtml/xbl/xbl_protohandler.cpp: Added.
967         (XBL::m_unused):
968         (XBL::XBLPrototypeHandler::~XBLPrototypeHandler):
969         (XBL::XBLPrototypeHandler::appendData):
970         * khtml/xbl/xbl_protohandler.h: Added.
971         (XBL::XBLPrototypeHandler::setNext):
972         (XBL::XBLPrototypeHandler::next):
973         * khtml/xbl/xbl_protoimplementation.cpp: Added.
974         (XBL::m_compiled):
975         (XBL::m_next):
976         (XBL::XBLPrototypeMember::appendData):
977         (XBL:::XBLPrototypeMember):
978         (XBL::XBLPrototypeMethod::isConstructor):
979         (XBL::XBLPrototypeMethod::isDestructor):
980         (XBL::XBLPrototypeMethod::addParameter):
981         (XBL:::XBLPrototypeMethod):
982         (XBL::XBLPrototypeConstructor::isConstructor):
983         (XBL::XBLPrototypeDestructor::isDestructor):
984         (XBL::m_readonly):
985         (XBL::XBLPrototypeProperty::appendGetterText):
986         (XBL::XBLPrototypeProperty::appendSetterText):
987         * khtml/xbl/xbl_protoimplementation.h: Added.
988         (XBL::XBLPrototypeMember::~XBLPrototypeMember):
989         (XBL::XBLPrototypeMember::setNext):
990         (XBL::XBLPrototypeMember::next):
991         (XBL::XBLPrototypeImplementation::~XBLPrototypeImplementation):
992         (XBL::XBLPrototypeImplementation::setMember):
993         (XBL::XBLPrototypeParameter::m_next):
994         (XBL::XBLPrototypeParameter::~XBLPrototypeParameter):
995         (XBL::XBLPrototypeParameter::next):
996         (XBL::XBLPrototypeParameter::setNext):
997         (XBL::):
998         * khtml/xbl/xbl_tokenizer.cpp: Added.
999         (XBL::XBLTokenHandler::XBLTokenHandler):
1000         (XBL::XBLTokenHandler::~XBLTokenHandler):
1001         (XBL::XBLTokenHandler::xblDocument):
1002         (XBL::XBLTokenHandler::startElement):
1003         (XBL::XBLTokenHandler::endElement):
1004         (XBL::XBLTokenHandler::characters):
1005         (XBL::XBLTokenHandler::createBinding):
1006         (XBL::XBLTokenHandler::createHandler):
1007         (XBL::XBLTokenHandler::createResource):
1008         (XBL::XBLTokenHandler::createImplementation):
1009         (XBL::XBLTokenHandler::addMember):
1010         (XBL::XBLTokenHandler::createConstructor):
1011         (XBL::XBLTokenHandler::createDestructor):
1012         (XBL::XBLTokenHandler::createField):
1013         (XBL::XBLTokenHandler::createProperty):
1014         (XBL::XBLTokenHandler::createMethod):
1015         (XBL::XBLTokenHandler::createParameter):
1016         * khtml/xbl/xbl_tokenizer.h: Added.
1017         (XBL::):
1018         * khtml/xml/dom_docimpl.cpp:
1019         (DocumentImpl::DocumentImpl):
1020         (DocumentImpl::~DocumentImpl):
1021         (DocumentImpl::createTokenHandler):
1022         (DocumentTypeImpl::DocumentTypeImpl):
1023         (DocumentTypeImpl::~DocumentTypeImpl):
1024         * khtml/xml/dom_docimpl.h:
1025         (DOM::DocumentImpl::bindingManager):
1026         * khtml/xml/dom_elementimpl.cpp:
1027         (ElementImpl::getAttributeNS):
1028         (ElementImpl::childAllowed):
1029         * khtml/xml/dom_elementimpl.h:
1030         (DOM::ElementImpl::getAttribute):
1031         * khtml/xml/dom_nodeimpl.cpp:
1032         * khtml/xml/xml_tokenizer.cpp:
1033         (XMLHandler::XMLHandler):
1034         (XMLHandler::startDocument):
1035         (XMLHandler::startElement):
1036         (XMLHandler::endElement):
1037         (XMLHandler::startCDATA):
1038         (XMLHandler::endCDATA):
1039         (XMLHandler::characters):
1040         (XMLHandler::comment):
1041         (XMLHandler::processingInstruction):
1042         (XMLHandler::warning):
1043         (XMLHandler::error):
1044         (XMLHandler::fatalError):
1045         (XMLTokenizer::finish):
1046         * khtml/xml/xml_tokenizer.h:
1047         * kwq/KWQXmlSimpleReader.h:
1048         (QXmlSimpleReader::sawError):
1049         (QXmlSimpleReader::recordError):
1050         * kwq/KWQXmlSimpleReader.mm:
1051         (warningHandler):
1052         (fatalErrorHandler):
1053         (normalErrorHandler):
1054         (QXmlSimpleReader::parse):
1055
1056 2004-01-22  Chris Blumenberg  <cblu@apple.com>
1057
1058         Fixed: <rdar://problem/3537542>: support for copying HTML
1059
1060         Reviewed by dave.
1061
1062         * khtml/xml/dom2_rangeimpl.cpp:
1063         (RangeImpl::toHTML): implemented
1064         * khtml/xml/dom_nodeimpl.cpp:
1065         (NodeImpl::recursive_toHTMLWithRange): new
1066         * khtml/xml/dom_nodeimpl.h:
1067         * kwq/WebCoreBridge.h:
1068         * kwq/WebCoreBridge.mm:
1069         (-[WebCoreBridge selectedHTML]): new
1070         (-[WebCoreBridge reconstructedSource]): new
1071
1072 2004-01-21  David Hyatt  <hyatt@apple.com>
1073
1074         Fix for two margin collapsing edge cases.
1075         
1076         Reviewed by darin
1077
1078         * khtml/rendering/render_block.cpp:
1079         (khtml::RenderBlock::layoutBlockChildren):
1080
1081 2004-01-21  David Hyatt  <hyatt@apple.com>
1082
1083         Switch from expat to libxml and implement namespace support in the simplereader.
1084         
1085         Reviewed by darin
1086
1087         * ChangeLog:
1088         * expat/Changes: Removed.
1089         * expat/MANIFEST: Removed.
1090         * expat/README: Removed.
1091         * expat/expat_config.h: Removed.
1092         * expat/lib/ascii.h: Removed.
1093         * expat/lib/asciitab.h: Removed.
1094         * expat/lib/expat.h: Removed.
1095         * expat/lib/iasciitab.h: Removed.
1096         * expat/lib/internal.h: Removed.
1097         * expat/lib/latin1tab.h: Removed.
1098         * expat/lib/nametab.h: Removed.
1099         * expat/lib/utf8tab.h: Removed.
1100         * expat/lib/xmlparse.c: Removed.
1101         * expat/lib/xmlrole.c: Removed.
1102         * expat/lib/xmlrole.h: Removed.
1103         * expat/lib/xmltok.c: Removed.
1104         * expat/lib/xmltok.h: Removed.
1105         * expat/lib/xmltok_impl.c: Removed.
1106         * expat/lib/xmltok_impl.h: Removed.
1107         * expat/lib/xmltok_ns.c: Removed.
1108         * kwq/KWQXmlAttributes.h:
1109         (QXmlAttributes::QXmlAttributes):
1110         (QXmlAttributes::qName):
1111         (QXmlAttributes::uri):
1112         * kwq/KWQXmlAttributes.mm:
1113         (QXmlAttributes::QXmlAttributes):
1114         (QXmlAttributes::~QXmlAttributes):
1115         (QXmlAttributes::operator=):
1116         (QXmlAttributes::localName):
1117         (QXmlAttributes::split):
1118         * kwq/KWQXmlSimpleReader.h:
1119         (KWQXmlNamespace::m_ref):
1120         (KWQXmlNamespace::uriForPrefix):
1121         (KWQXmlNamespace::ref):
1122         (KWQXmlNamespace::deref):
1123         (QXmlParseException::QXmlParseException):
1124         (QXmlParseException::message):
1125         (QXmlParseException::columnNumber):
1126         (QXmlParseException::lineNumber):
1127         (QXmlSimpleReader::errorHandler):
1128         (QXmlSimpleReader::xmlNamespace):
1129         (QXmlSimpleReader::parserStopped):
1130         * kwq/KWQXmlSimpleReader.mm:
1131         (startElementHandler):
1132         (endElementHandler):
1133         (charactersHandler):
1134         (processingInstructionHandler):
1135         (cdataBlockHandler):
1136         (commentHandler):
1137         (warningHandler):
1138         (fatalErrorHandler):
1139         (QXmlSimpleReader::pushNamespaces):
1140         (QXmlSimpleReader::popNamespaces):
1141         (QXmlSimpleReader::parse):
1142         (QXmlSimpleReader::stopParsing):
1143         (QXmlSimpleReader::lineNumber):
1144         (QXmlSimpleReader::columnNumber):
1145
1146 2004-01-21  David Hyatt  <hyatt@apple.com>
1147
1148         Reviewed by NOBODY (OOPS!).
1149
1150         * ForwardingHeaders/xbl/xbl_binding_manager.h: Added.
1151         * ForwardingHeaders/xbl/xbl_docimpl.h: Added.
1152         * WebCore.pbproj/project.pbxproj:
1153         * expat/COPYING: Removed.
1154         * expat/Changes: Removed.
1155         * expat/MANIFEST: Removed.
1156         * expat/README: Removed.
1157         * expat/expat_config.h: Removed.
1158         * expat/lib/ascii.h: Removed.
1159         * expat/lib/asciitab.h: Removed.
1160         * expat/lib/expat.h: Removed.
1161         * expat/lib/iasciitab.h: Removed.
1162         * expat/lib/internal.h: Removed.
1163         * expat/lib/latin1tab.h: Removed.
1164         * expat/lib/nametab.h: Removed.
1165         * expat/lib/utf8tab.h: Removed.
1166         * expat/lib/xmlparse.c: Removed.
1167         * expat/lib/xmlrole.c: Removed.
1168         * expat/lib/xmlrole.h: Removed.
1169         * expat/lib/xmltok.c: Removed.
1170         * expat/lib/xmltok.h: Removed.
1171         * expat/lib/xmltok_impl.c: Removed.
1172         * expat/lib/xmltok_impl.h: Removed.
1173         * expat/lib/xmltok_ns.c: Removed.
1174         * khtml/css/cssparser.cpp:
1175         (CSSParser::parseValue):
1176         * khtml/css/cssproperties.c:
1177         (hash_prop):
1178         (findProp):
1179         * khtml/css/cssproperties.h:
1180         * khtml/css/cssproperties.in:
1181         * khtml/css/cssstyleselector.cpp:
1182         (khtml::CSSStyleSelector::applyRule):
1183         * khtml/dom/dom_element.cpp:
1184         (Element::getAttributeNS):
1185         * khtml/misc/loader.cpp:
1186         (CachedXBLDocument::CachedXBLDocument):
1187         (CachedXBLDocument::~CachedXBLDocument):
1188         (CachedXBLDocument::ref):
1189         (CachedXBLDocument::deref):
1190         (CachedXBLDocument::data):
1191         (CachedXBLDocument::checkNotify):
1192         (CachedXBLDocument::error):
1193         (DocLoader::requestXBLDocument):
1194         (Cache::requestXBLDocument):
1195         (CachedObjectClient::setXBLDocument):
1196         (Cache::getStatistics):
1197         * khtml/misc/loader.h:
1198         (khtml::CachedObject::):
1199         (khtml::CachedXBLDocument::document):
1200         (khtml::CachedXBLDocument::schedule):
1201         * khtml/misc/loader_client.h:
1202         * khtml/rendering/render_block.cpp:
1203         (khtml::RenderBlock::layoutBlockChildren):
1204         * khtml/rendering/render_style.cpp:
1205         (bindingURI):
1206         (marquee):
1207         (StyleCSS3NonInheritedData::~StyleCSS3NonInheritedData):
1208         (StyleCSS3NonInheritedData::bindingsEquivalent):
1209         (StyleCSS3NonInheritedData::operator==):
1210         (:m_next):
1211         (BindingURI::~BindingURI):
1212         (BindingURI::copy):
1213         (BindingURI::operator==):
1214         (RenderStyle::addBindingURI):
1215         * khtml/rendering/render_style.h:
1216         (khtml::BindingURI::operator!=):
1217         (khtml::BindingURI::next):
1218         (khtml::BindingURI::setNext):
1219         (khtml::BindingURI::uri):
1220         (khtml::RenderStyle::bindingURIs):
1221         (khtml::RenderStyle::setHasAutoZIndex):
1222         (khtml::RenderStyle::setZIndex):
1223         (khtml::RenderStyle::deleteBindingURIs):
1224         (khtml::RenderStyle::inheritBindingURIs):
1225         * khtml/xbl/xbl_binding.cpp: Added.
1226         (XBL::m_markedForDeath):
1227         (XBL::XBLBindingChain::~XBLBindingChain):
1228         (XBL::XBLBindingChain::firstStyleBindingChain):
1229         (XBL::XBLBindingChain::lastBindingChain):
1230         (XBL::XBLBindingChain::insertBindingChain):
1231         (XBL::XBLBindingChain::markForDeath):
1232         (XBL::XBLBindingChain::loaded):
1233         (XBL::XBLBindingChain::hasStylesheets):
1234         (XBL::XBLBindingChain::failed):
1235         (XBL::m_nextBinding):
1236         (XBL::XBLBinding::~XBLBinding):
1237         (XBL::XBLBinding::loaded):
1238         (XBL::XBLBinding::setXBLDocument):
1239         * khtml/xbl/xbl_binding.h: Added.
1240         (XBL::):
1241         (XBL::XBLBindingChain::uri):
1242         (XBL::XBLBindingChain::nextChain):
1243         (XBL::XBLBindingChain::previousChain):
1244         (XBL::XBLBindingChain::setNextBindingChain):
1245         (XBL::XBLBindingChain::setPreviousBindingChain):
1246         (XBL::XBLBindingChain::markedForDeath):
1247         (XBL::XBLBindingChain::element):
1248         * khtml/xbl/xbl_binding_manager.cpp: Added.
1249         (XBL::m_bindingChainTable):
1250         (XBL::XBLBindingManager::~XBLBindingManager):
1251         (XBL::XBLBindingManager::getBindingChain):
1252         (XBL::XBLBindingManager::setBindingChain):
1253         (XBL::XBLBindingManager::loadBindings):
1254         (XBL::XBLBindingManager::checkLoadState):
1255         * khtml/xbl/xbl_binding_manager.h: Added.
1256         * khtml/xbl/xbl_docimpl.cpp: Added.
1257         (XBL:::DocumentImpl):
1258         (XBL::XBLDocumentImpl::~XBLDocumentImpl):
1259         (XBL::XBLDocumentImpl::createTokenHandler):
1260         (XBL::XBLDocumentImpl::setPrototypeBinding):
1261         (XBL::XBLDocumentImpl::prototypeBinding):
1262         * khtml/xbl/xbl_docimpl.h: Added.
1263         (XBL::):
1264         * khtml/xbl/xbl_protobinding.cpp: Added.
1265         (XBL::m_handler):
1266         (XBL::XBLPrototypeBinding::initialize):
1267         (XBL::XBLPrototypeBinding::document):
1268         (XBL::XBLPrototypeBinding::addResource):
1269         * khtml/xbl/xbl_protobinding.h: Added.
1270         (XBL::XBLPrototypeBinding::element):
1271         (XBL::XBLPrototypeBinding::setHandler):
1272         (XBL::XBLPrototypeBinding::handler):
1273         * khtml/xbl/xbl_protohandler.cpp: Added.
1274         (XBL::m_unused):
1275         (XBL::XBLPrototypeHandler::~XBLPrototypeHandler):
1276         (XBL::XBLPrototypeHandler::appendData):
1277         * khtml/xbl/xbl_protohandler.h: Added.
1278         (XBL::XBLPrototypeHandler::setNext):
1279         (XBL::XBLPrototypeHandler::next):
1280         * khtml/xbl/xbl_protoimplementation.cpp: Added.
1281         (XBL::m_compiled):
1282         (XBL::m_next):
1283         (XBL::XBLPrototypeMember::appendData):
1284         (XBL:::XBLPrototypeMember):
1285         (XBL::XBLPrototypeMethod::isConstructor):
1286         (XBL::XBLPrototypeMethod::isDestructor):
1287         (XBL::XBLPrototypeMethod::addParameter):
1288         (XBL:::XBLPrototypeMethod):
1289         (XBL::XBLPrototypeConstructor::isConstructor):
1290         (XBL::XBLPrototypeDestructor::isDestructor):
1291         (XBL::m_readonly):
1292         (XBL::XBLPrototypeProperty::appendGetterText):
1293         (XBL::XBLPrototypeProperty::appendSetterText):
1294         * khtml/xbl/xbl_protoimplementation.h: Added.
1295         (XBL::XBLPrototypeMember::~XBLPrototypeMember):
1296         (XBL::XBLPrototypeMember::setNext):
1297         (XBL::XBLPrototypeMember::next):
1298         (XBL::XBLPrototypeImplementation::~XBLPrototypeImplementation):
1299         (XBL::XBLPrototypeImplementation::setMember):
1300         (XBL::XBLPrototypeParameter::m_next):
1301         (XBL::XBLPrototypeParameter::~XBLPrototypeParameter):
1302         (XBL::XBLPrototypeParameter::next):
1303         (XBL::XBLPrototypeParameter::setNext):
1304         (XBL::):
1305         * khtml/xbl/xbl_tokenizer.cpp: Added.
1306         (XBL::XBLTokenHandler::XBLTokenHandler):
1307         (XBL::XBLTokenHandler::~XBLTokenHandler):
1308         (XBL::XBLTokenHandler::xblDocument):
1309         (XBL::XBLTokenHandler::startElement):
1310         (XBL::XBLTokenHandler::endElement):
1311         (XBL::XBLTokenHandler::characters):
1312         (XBL::XBLTokenHandler::createBinding):
1313         (XBL::XBLTokenHandler::createHandler):
1314         (XBL::XBLTokenHandler::createResource):
1315         (XBL::XBLTokenHandler::createImplementation):
1316         (XBL::XBLTokenHandler::addMember):
1317         (XBL::XBLTokenHandler::createConstructor):
1318         (XBL::XBLTokenHandler::createDestructor):
1319         (XBL::XBLTokenHandler::createField):
1320         (XBL::XBLTokenHandler::createProperty):
1321         (XBL::XBLTokenHandler::createMethod):
1322         (XBL::XBLTokenHandler::createParameter):
1323         * khtml/xbl/xbl_tokenizer.h: Added.
1324         (XBL::):
1325         * khtml/xml/dom_docimpl.cpp:
1326         (DocumentImpl::DocumentImpl):
1327         (DocumentImpl::~DocumentImpl):
1328         (DocumentImpl::createTokenHandler):
1329         (DocumentTypeImpl::DocumentTypeImpl):
1330         (DocumentTypeImpl::~DocumentTypeImpl):
1331         * khtml/xml/dom_docimpl.h:
1332         (DOM::DocumentImpl::bindingManager):
1333         * khtml/xml/dom_elementimpl.cpp:
1334         (ElementImpl::getAttributeNS):
1335         * khtml/xml/dom_elementimpl.h:
1336         (DOM::ElementImpl::getAttribute):
1337         * khtml/xml/dom_nodeimpl.cpp:
1338         * khtml/xml/xml_tokenizer.cpp:
1339         (XMLHandler::startElement):
1340         (XMLTokenizer::finish):
1341         * khtml/xml/xml_tokenizer.h:
1342         * kwq/KWQXmlAttributes.h:
1343         (QXmlAttributes::QXmlAttributes):
1344         (QXmlAttributes::qName):
1345         (QXmlAttributes::uri):
1346         * kwq/KWQXmlAttributes.mm:
1347         (QXmlAttributes::QXmlAttributes):
1348         (QXmlAttributes::~QXmlAttributes):
1349         (QXmlAttributes::operator=):
1350         (QXmlAttributes::localName):
1351         (QXmlAttributes::split):
1352         * kwq/KWQXmlSimpleReader.h:
1353         (XmlNamespace::m_ref):
1354         (XmlNamespace::uriForPrefix):
1355         (XmlNamespace::ref):
1356         (XmlNamespace::deref):
1357         (QXmlParseException::QXmlParseException):
1358         (QXmlParseException::message):
1359         (QXmlParseException::columnNumber):
1360         (QXmlParseException::lineNumber):
1361         (QXmlSimpleReader::errorHandler):
1362         (QXmlSimpleReader::xmlNamespace):
1363         (QXmlSimpleReader::parserStopped):
1364         * kwq/KWQXmlSimpleReader.mm:
1365         (startElementHandler):
1366         (endElementHandler):
1367         (charactersHandler):
1368         (processingInstructionHandler):
1369         (cdataBlockHandler):
1370         (commentHandler):
1371         (warningHandler):
1372         (fatalErrorHandler):
1373         (QXmlSimpleReader::pushNamespaces):
1374         (QXmlSimpleReader::popNamespaces):
1375         (QXmlSimpleReader::parse):
1376         (QXmlSimpleReader::stopParsing):
1377         (QXmlSimpleReader::lineNumber):
1378         (QXmlSimpleReader::columnNumber):
1379         * layout-tests/fast/overflow/003.xml:
1380
1381 2004-01-21  David Hyatt  <hyatt@apple.com>
1382
1383         Add some methods to dicts and stacks that exist in Qt.
1384         
1385         Reviewed by darin
1386
1387         * kwq/KWQDict.h:
1388         (QDict::replace):
1389         * kwq/KWQPtrDict.h:
1390         (QPtrDict::replace):
1391         (QPtrDict::find):
1392         * kwq/KWQPtrStack.h:
1393         (QPtrStack::current):
1394         (QPtrStack::setAutoDelete):
1395
1396 2004-01-19  Maciej Stachowiak  <mjs@apple.com>
1397
1398         Reviewed by John, Ken, Dave.
1399
1400         <rdar://problem/3533319>: Safari allows upload of arbitrary local files w/o user's knowledge or permission
1401         
1402         * khtml/html/html_formimpl.cpp:
1403         (HTMLInputElementImpl::value): Don't fall back to the value
1404         attribute for file inputs, since that way malicious HTML could
1405         force the user to upload files unexpectedly.
1406
1407 2004-01-18  David Hyatt  <hyatt@apple.com>
1408
1409         Fix for 3532569, bugzilla patch viewer doesn't work.  My previous fix for 3531983 caused moves to happen
1410         when they should not have, due to childX and childY not being implemented at all on KWQScrollView.
1411
1412         Reviewed by darin
1413         
1414         * kwq/KWQScrollView.mm:
1415         (QScrollView::childX):
1416         (QScrollView::childY):
1417
1418 === Safari-124 ===
1419
1420 2004-01-16  David Hyatt  <hyatt@apple.com>
1421
1422         Fix for 3531983, fixed positioning not working for widgets.  Make sure to move widgets at paint time
1423         if necessary.
1424         
1425         Reviewed by darin
1426         
1427         * khtml/rendering/render_replaced.cpp:
1428         (RenderWidget::paintObject):
1429
1430 2004-01-15  David Hyatt  <hyatt@apple.com>
1431
1432         Fix for 3530734, many java applets don't show up.  Go ahead and just use the width/height from the style
1433         system as the initial size when the width/height are fixed.
1434         
1435         Reviewed by rjw
1436
1437         * khtml/rendering/render_applet.cpp:
1438         (RenderApplet::createWidgetIfNecessary):
1439
1440 2004-01-15  Richard Williamson   <rjw@apple.com>
1441
1442         Fixed 3529426.  Exclude pages that contain Java applets from 
1443         the page cache.  The means applets get the normal stop/destroy
1444         messages that they expect when a user leaves a page.
1445
1446         Reviewed by John.
1447
1448         * kwq/KWQKHTMLPart.mm:
1449         (KWQKHTMLPart::canCachePage):
1450
1451 2004-01-15  Vicki Murley  <vicki@apple.com>
1452
1453         Reviewed by Darin.
1454
1455         * WebCore.pbproj/project.pbxproj: Update copyright date to 2004.
1456
1457 2004-01-15  Darin Adler  <darin@apple.com>
1458
1459         Reviewed by Ken.
1460
1461         - fixed 3529943: REGRESSION (119-120): nil-deref in KHTMLPart::javaEnabled when hitting back button
1462
1463         * khtml/html/html_objectimpl.cpp: (HTMLAppletElementImpl::getAppletInstance):
1464         Add missing nil check that the other call to javaEnabled has.
1465
1466 === Safari-122 ===
1467
1468 2004-01-14  David Hyatt  <hyatt@apple.com>
1469
1470         Fix for 3527819, marquee makes page layout too wide.  Make sure marquees have a minimum width of 0.
1471         
1472         Reviewed by john
1473
1474         * khtml/rendering/render_block.cpp:
1475         (khtml::RenderBlock::calcMinMaxWidth):
1476         (khtml::RenderBlock::calcInlineMinMaxWidth):
1477
1478 2004-01-13  David Hyatt  <hyatt@apple.com>
1479
1480         Fix for 3527707, crash on w3c css page.  Make sure height isn't allowed to be negative when computing
1481         positioned elements' heights.  Also bulletproof the crash in case there are other negative height code
1482         paths.
1483         
1484         Reviewed by john
1485
1486         * khtml/rendering/render_block.cpp:
1487         (khtml::RenderBlock::layoutBlock):
1488         (khtml::RenderBlock::getAbsoluteRepaintRectIncludingFloats):
1489         * khtml/rendering/render_box.cpp:
1490         (RenderBox::calcAbsoluteVertical):
1491
1492 2004-01-13  Maciej Stachowiak  <mjs@apple.com>
1493
1494         Reviewed by Darin.
1495
1496         <rdar://problem/3527853>: REGRESSION (119-120): Peoplesoft menus do not work
1497         
1498         * kwq/KWQKHTMLPart.mm:
1499         (KWQKHTMLPart::scrollToAnchor): Right before calling checkCompleted(), set
1500         m_bComplete to false, so it can get set right back to true if we're actually done
1501         loading and fire all the right signals.
1502
1503 2004-01-13  David Hyatt  <hyatt@apple.com>
1504
1505         Fix for 3526710, applets need to have the correct initial size after a layout has been done, since our
1506         Java applets can't yet resize.
1507         
1508         Reviewed by john
1509
1510         * khtml/rendering/render_applet.cpp:
1511         (RenderApplet::createWidgetIfNecessary):
1512         (RenderApplet::layout):
1513         (RenderEmptyApplet::layout):
1514
1515 === Safari-121 ===
1516
1517 2004-01-11  Darin Adler  <darin@apple.com>
1518
1519         - fixed Dave's check-in so it compiles; I assume he forgot to land one source file
1520
1521         * khtml/khtmlview.h: Add RenderPart to the friends of KHTMLView.
1522
1523 2004-01-11  David Hyatt  <hyatt@apple.com>
1524
1525         Fix for frame repainting bugs (3510669, 3515442).  This is a narrower fix than the previous attempt.
1526         
1527         Reviewed by darin
1528
1529         * khtml/rendering/render_frames.cpp:
1530         (RenderPart::updateWidgetPositions):
1531         * khtml/rendering/render_frames.h:
1532         * khtml/rendering/render_replaced.cpp:
1533         (RenderWidget::updateWidgetPositions):
1534
1535 2004-01-10  Darin Adler  <darin@apple.com>
1536
1537         Reviewed by John.
1538
1539         - fixed 3525468: REGRESSION (114-115): HOMEPAGE: after hitting textarea limit, backspace key is ignored
1540
1541         * kwq/KWQEvent.mm:
1542         (keyIdentifierForKeyEvent): Treat 7F as 08; matches other browsers.
1543         (QKeyEvent::QKeyEvent): Ditto.
1544
1545 2004-01-09  David Hyatt  <hyatt@apple.com>
1546
1547         Fixes for 3510669 and 3515442, blank frame problems caused by WebKit's use of a separate needsLayout boolean.
1548         
1549         Reviewed by darin
1550
1551         * kwq/WebCoreBridge.h:
1552         * kwq/WebCoreBridge.mm:
1553         (-[WebCoreBridge setNeedsLayout]):
1554
1555 2004-01-08  David Hyatt  <hyatt@apple.com>
1556
1557         Fix for 3524118, floats don't repaint when moved.
1558         
1559         Reviewed by darin
1560
1561          * khtml/rendering/render_block.cpp:
1562         (khtml::RenderBlock::positionNewFloats):
1563  
1564 2004-01-08  David Hyatt  <hyatt@apple.com>
1565
1566         Fix for 3519003, crash in mail because <dir> and <menu> don't allow the same children as <ul> and <ol>.
1567         
1568         Reviewed by darin
1569
1570         * khtml/html/dtd.cpp:
1571         (DOM::checkChild):
1572
1573 2004-01-08  John Sullivan  <sullivan@apple.com>
1574
1575         - fixed <rdar://problem/3524359>: REGRESSSION (119-120): 
1576         Double click to select text in form broken
1577
1578         Reviewed by Dave and Darin.
1579
1580         * khtml/khtmlview.cpp:
1581         (KHTMLView::dispatchMouseEvent):
1582         Don't blur the focused node if that's the one you clicked on.
1583
1584 2004-01-07  Richard Williamson   <rjw@apple.com>
1585
1586         Fixed 3517550.  Named array lookup of applet failed, i.e.:
1587         var appletobj = document.applets['myapplet']
1588
1589         Reviewed by Chris.
1590
1591         * khtml/ecma/kjs_html.cpp:
1592         (KJS::HTMLCollection::getNamedItems):
1593
1594 === Safari-120 ===
1595
1596 2004-01-06  David Hyatt  <hyatt@apple.com>
1597
1598         Possible fix for table bugs 3510005 and 3492945, repainting glitches that occurred when table cells moved.
1599
1600         Fix for 33522497, empty AXElements appear in AXBrowser.
1601         
1602         Reviewed by darin
1603
1604         * khtml/rendering/render_table.cpp:
1605         (RenderTableSection::layoutRows):
1606         (RenderTableCell::setWidth):
1607         * khtml/rendering/render_table.h:
1608
1609         * kwq/KWQAccObject.mm:
1610         (-[KWQAccObject accessibilityIsIgnored]):
1611
1612 2004-01-06  John Sullivan  <sullivan@apple.com>
1613
1614         - fixed <rdar://problem/3484465>: REGRESSION (118): button click does 
1615         not take focus away from <textarea>; breaks Outlook Web Access
1616
1617         Reviewed by Dave.
1618
1619         * khtml/khtmlview.cpp:
1620         (KHTMLView::dispatchMouseEvent):
1621         Removed nodeimpl == nil test that was preventing button/link clicks
1622         from blurring previously-focused text field.
1623
1624 2004-01-06  David Hyatt  <hyatt@apple.com>
1625
1626         Fix for 3520636, infinite loop in page breaking code when printing.
1627         
1628         Reviewed by darin
1629
1630         * khtml/rendering/render_text.cpp:
1631         (RenderText::paintObject):
1632         * kwq/WebCoreBridge.mm:
1633         (-[WebCoreBridge computePageRectsWithPrintWidth:printHeight:]):
1634
1635 2004-01-05  David Hyatt  <hyatt@apple.com>
1636
1637         Fix for 3521466, generated image content should not try to calcWidth/height when it isn't yet rooted in
1638         the rendering tree.
1639         
1640         Reviewed by john
1641
1642         * khtml/rendering/render_image.cpp:
1643         (RenderImage::setPixmap):
1644
1645 2003-12-26  Darin Adler  <darin@apple.com>
1646
1647         - one more small step to make -[KWQPageState dealloc] safer
1648
1649         * kwq/KWQPageState.mm: (-[KWQPageState dealloc]): Only do the real detach() if the
1650         document is already in the detached state; we don't want to detach prematurely.
1651
1652 2003-12-23  John Sullivan  <sullivan@apple.com>
1653
1654         - fixed <rdar://problem/3451306>: address book search fails at Airborne 
1655         Express Corporate site (Apple Shipping wants to use it)
1656
1657         Reviewed by Darin.
1658
1659         * khtml/ecma/kjs_html.cpp:
1660         commented out definition of document.all; now sites like this one that
1661         set document.all to a value will work.
1662         * khtml/ecma/kjs_html.lut.h: regenerated this file
1663
1664 2003-12-23  Darin Adler  <darin@apple.com>
1665
1666         Reviewed by John.
1667
1668         - another try at fixing the -[KWQPageState dealloc] bug, even though we don't fully understand it
1669         
1670         This change saves the renderer inside the document rather than in the KWQPageState to
1671         try to eliminate the possibility that multiple KWQPageState objects could restore the
1672         same renderer multiple times, resulting in multiple detaches of the same renderer.
1673
1674         * khtml/xml/dom_docimpl.h: Add a m_savedRenderer field.
1675         * khtml/xml/dom_docimpl.cpp:
1676         (DocumentImpl::DocumentImpl): Initialize m_savedRenderer to 0.
1677         (DocumentImpl::~DocumentImpl): Added some asserts to make sure we don't get destroyed
1678         while we are in the page cache.
1679         (DocumentImpl::attach): Added an assert.
1680         (DocumentImpl::setInPageCache): Save the renderer when setting the flag, and restore
1681         the renderer when clearing it.
1682
1683         * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::openURLFromPageCache): Instead of doing a restoreRenderer
1684         call, just do setInPageCache(NO), which will restore the renderer as a side effect.
1685
1686         * kwq/KWQPageState.h: Removed the renderer method and field.
1687         * kwq/KWQPageState.mm:
1688         (-[KWQPageState initWithDocument:URL:windowProperties:locationProperties:interpreterBuiltins:]):
1689         Don't store a pointer to the renderer.
1690         (-[KWQPageState clear]): New method, shared by invalidate and dealloc.
1691         (-[KWQPageState invalidate]): Removed code relating to "relinquishing object ownership";
1692         just deallocate everything here without doing a detach().
1693         (-[KWQPageState dealloc]): Removed restoreRenderer now that setInPageCache(NO) handles that.
1694         Added some assertions. Share code with invalidate by calling clear.
1695
1696 2003-12-22  John Sullivan  <sullivan@apple.com>
1697
1698         - fixed <rdar://problem/3508798>: ACCESSIBILITY: role/description/value strings not defined
1699
1700         Reviewed by Darin.
1701
1702         * kwq/KWQAccObject.mm:
1703         (-[KWQAccObject roleDescription]):
1704         provide not-yet-localized strings for all the role descriptions that this class uses.
1705         (-[KWQAccObject value]):
1706         return nil string rather than dummy string for the cases where we don't have a value attribute.
1707         (-[KWQAccObject accessibilityActionDescription:]):
1708         changed comment passed to UI_STRING bogus macro so it won't have to change if/when macro
1709         loses its bogosity
1710
1711 2003-12-22  John Sullivan  <sullivan@apple.com>
1712
1713         - WebCore part of fix for <rdar://problem/3515706>: 
1714         REGRESSION (100-118): Web Kit printing does not honor Page Setup scale factor
1715
1716         Reviewed by Darin.
1717
1718         * kwq/WebCoreBridge.h:
1719         * kwq/WebCoreBridge.mm:
1720         (-[WebCoreBridge computePageRectsWithPrintWidth:printHeight:]):
1721         renamed method for clarity; now iterates over pages horizontally as well 
1722         as vertically; assume x starts at 0 as we were already assuming that y
1723         starts at 0; now returns autoreleased result
1724
1725 2003-12-22  Darin Adler  <darin@apple.com>
1726
1727         Reviewed by John.
1728
1729         - follow-on to my fix for 3467919: handle collapsed spaces at the starts of runs too, not just at the
1730           end, and make sure that a space inherits style from the run it was collapsed from rather than always
1731           from the run it precedes
1732
1733         * khtml/khtml_part.cpp: (KHTMLPart::text): Add code to deal with collapsed spaces at the start of runs.
1734         * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::attributedString): Change code to keep the style of a space that
1735         was collapsed at the end of the run, and use that styled space if necessary. Also add the code to deal
1736         with collapsed spaces at the start of runs. Also remove comment that refers to long-since-deleted code.
1737
1738 2003-12-21  Darin Adler  <darin@apple.com>
1739
1740         Reviewed by John.
1741
1742         - fixed 3467919: REGRESSION (91-92): space missing when copying text with link at start or end of line
1743
1744         * khtml/khtml_part.cpp: (KHTMLPart::text):
1745         * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::attributedString):
1746         Changed both "turn HTML into text" code paths to generate spaces in a different way.
1747         First, corrected the logic so it notices spaces left out at the end of a RenderText object.
1748         Second, don't emit the space until we are emitting more text, to prevent emitting trailing
1749         spaces. To get this completely right for the attributed string case, I had to add code to
1750         adjust the offset used to mark links.
1751
1752 2003-12-21  Darin Adler  <darin@apple.com>
1753
1754         Reviewed by John.
1755
1756         - fixed 3477453: nowrap in a fixed-width TD is ignored on screen but not when printed (Williams-Sonoma)
1757
1758         * khtml/rendering/render_table.cpp: (RenderTableCell::setStyle):
1759         Compute the proper whitespace mode before calling the base class setStyle,
1760         since the base class setStyle may create styles that inherit from our style,
1761         and we want them to inherit the computed whitespace mode.
1762
1763         * WebCore.pbproj/project.pbxproj: Let Xcode be 1.1, as it was meant to be.
1764
1765 2003-12-21  Darin Adler  <darin@apple.com>
1766
1767         Reviewed by Dave.
1768
1769         - fixed a storage leak
1770
1771         * khtml/rendering/render_style.h: Added a destructor and a private unimplemented assignment
1772         operator to StyleCSS3InheritedData, since the textShadow field that needs to be allocated
1773         and deallocated and the default destructor and assignment operator don't do that.
1774         * khtml/rendering/render_style.cpp: (StyleCSS3InheritedData::~StyleCSS3InheritedData):
1775         Added destructor that deletes the textShadow object.
1776
1777         - fixed locking for JavaScript debugging tools in Caches window
1778
1779         * kwq/WebCoreJavaScript.mm:
1780         (+[WebCoreJavaScript rootObjectClasses]): Lock and unlock around call to JavaScriptCore.
1781         (+[WebCoreJavaScript garbageCollect]): Ditto.
1782
1783 2003-12-19  David Hyatt  <hyatt@apple.com>
1784
1785         Fix for 3483130, repaint doesn't occur when font is decreased dynamically when at the bottom of
1786         amazon.com.
1787         
1788         Reviewed by john
1789
1790         * khtml/khtml_part.cpp:
1791         (KHTMLPart::setZoomFactor):
1792         * kwq/WebCoreBridge.mm:
1793         (-[WebCoreBridge setTextSizeMultiplier:]):
1794
1795 2003-12-19  Richard Williamson   <rjw@apple.com>
1796
1797         Fixed 3515590.  Return Undefined to JS for applet if
1798         Java is disabled.
1799
1800         Reviewed by Chris.
1801
1802         * khtml/html/html_objectimpl.cpp:
1803         (HTMLAppletElementImpl::getAppletInstance):
1804
1805 2003-12-19  Maciej Stachowiak  <mjs@apple.com>
1806
1807         Reviewed by Chris.
1808
1809         <rdar://problem/3512545>: reproducible assertion failure in KWQKHTMLPart::addData scrolling to anchor while page loads
1810         
1811         * kwq/KWQKHTMLPart.mm:
1812         (KWQKHTMLPart::scrollToAnchor): Don't pretend we finished loading,
1813         because we don't actually make anchor scrolling stop the current
1814         page load.
1815
1816 === Safari-119 ===
1817
1818 2003-12-18  Richard Williamson   <rjw@apple.com>
1819
1820         Fixed 3511415.  We have to un-visually order visually ordered text
1821         before passing to ATSU.
1822
1823         Reviewed by John.
1824
1825         * khtml/rendering/font.cpp:
1826         (Font::drawHighlightForText):
1827         (Font::drawText):
1828         * khtml/rendering/font.h:
1829         * khtml/rendering/render_text.cpp:
1830         (InlineTextBox::paintSelection):
1831         (RenderText::paintObject):
1832         * kwq/KWQPainter.h:
1833         * kwq/KWQPainter.mm:
1834         (QPainter::drawText):
1835         (QPainter::drawHighlightForText):
1836         * kwq/WebCoreTextRenderer.h:
1837         * kwq/WebCoreTextRendererFactory.m:
1838         (WebCoreInitializeEmptyTextStyle):
1839
1840 2003-12-17  Richard Williamson   <rjw@apple.com>
1841
1842         Reviewed by NOBODY (OOPS!).
1843
1844         * khtml/html/html_objectimpl.cpp:
1845         (HTMLAppletElementImpl::getAppletInstance):
1846         * khtml/html/html_objectimpl.h:
1847         * kwq/KWQKHTMLPart.h:
1848         * kwq/KWQKHTMLPart.mm:
1849         (KWQKHTMLPart::getAppletInstanceForView):
1850         (KWQKHTMLPart::addPluginRootObject):
1851         (KWQKHTMLPart::cleanupPluginRootObjects):
1852         * kwq/WebCoreBridge.mm:
1853         (-[WebCoreBridge init]):
1854
1855 2003-12-17  Darin Adler  <darin@apple.com>
1856
1857         Reviewed by Dave.
1858
1859         - fixed 3469085: can't tab to all links on aintitcool.com
1860
1861         * khtml/html/html_inlineimpl.cpp:
1862         (HTMLAnchorElementImpl::isFocusable): Re-implemented this to check width and height of
1863         all continuations, not just the main render object. Also, check the absoluteRects after
1864         checking all the render objects to catch things like floats.
1865         (HTMLAnchorElementImpl::isMouseFocusable): Clean up the code here a bit.
1866
1867         * khtml/rendering/render_inline.h:
1868         * khtml/rendering/render_inline.cpp: (RenderInline::absoluteRects):
1869         * khtml/rendering/render_object.h:
1870         * khtml/rendering/render_object.cpp: (RenderObject::absoluteRects):
1871         * khtml/rendering/render_text.h:
1872         * khtml/rendering/render_text.cpp: (RenderText::absoluteRects):
1873         * kwq/KWQAccObject.mm: (boundingBoxRect):
1874         Use QValueList instead of QPtrList for clarity and to fix storage leaks.
1875
1876 === Safari-118 ===
1877
1878 2003-12-16  David Hyatt  <hyatt@apple.com>
1879
1880         Fix for 3510956, crash on mezzoblue.com.  Relax the float-list searching code that runs when
1881         a float is removed.
1882         
1883         Reviewed by darin
1884
1885         * khtml/rendering/render_object.cpp:
1886         (checkFloats):
1887         (RenderObject::removeFromObjectLists):
1888
1889 2003-12-16  John Sullivan  <sullivan@apple.com>
1890
1891         fixed <rdar://problem/3482852>: oft-seen, non-repro, nil-deref in 
1892         HTMLTokenizer::notifyFinished (snapfish.com, etc.)
1893         
1894         At least one of the dupes of this bug is a separate (still reproducible) issue;
1895         I'll clone it back to life and test the others.
1896
1897         Reviewed by Darin.
1898
1899         * khtml/html/htmltokenizer.cpp:
1900         (HTMLTokenizer::notifyFinished):
1901         Move check of cachedScript.isEmpty() until after scriptExecution()
1902         call, because cachedScript.isEmpty() value can be changed by that call.
1903
1904 2003-12-15  David Hyatt  <hyatt@apple.com>
1905
1906         Fix for 3508807, positions/sizes wrong for text elts and multi-line elts for accessibility.
1907         
1908         Reviewed by john
1909
1910         * khtml/rendering/render_inline.cpp:
1911         (RenderInline::absoluteRects):
1912         * khtml/rendering/render_inline.h:
1913         * khtml/rendering/render_object.cpp:
1914         (RenderObject::absoluteRects):
1915         * khtml/rendering/render_object.h:
1916         * khtml/rendering/render_text.cpp:
1917         (RenderText::absoluteRects):
1918         * khtml/rendering/render_text.h:
1919         * kwq/KWQAccObject.mm:
1920         (boundingBoxRect):
1921         (-[KWQAccObject position]):
1922         (-[KWQAccObject size]):
1923
1924 2003-12-15  Richard Williamson   <rjw@apple.com>
1925
1926         Return 0 if the view doesn't have a bridge.
1927
1928         Reviewed by John.
1929
1930         * kwq/WebCoreBridge.mm:
1931         (rootForView):
1932
1933 2003-12-15  David Hyatt  <hyatt@apple.com>
1934
1935         Fix for 3508792.  Remove tables and cells as AxObjects.
1936         
1937         Reviewed by john
1938
1939         * kwq/KWQAccObject.mm:
1940         (-[KWQAccObject role]):
1941         (-[KWQAccObject accessibilityIsIgnored]):
1942
1943 2003-12-15  John Sullivan  <sullivan@apple.com>
1944
1945         - fixed <rdar://problem/3510459>: REGRESSION (100-113): Pressing button at google.com 
1946         removes focus from text field
1947
1948         Reviewed by Dave.
1949
1950         * khtml/khtmlview.cpp:
1951         (KHTMLView::dispatchMouseEvent):
1952         Don't clear the focused widget when a mousedown occurs on a widget that is focusable
1953         in the abstract sense but is not mouse focusable or currently keyboard focusable. This
1954         matches the behavior of older Safaris (clicking in background or page text will make the
1955         webview itself be first responder, but clicking on a button won't).
1956
1957 2003-12-14  Darin Adler  <darin@apple.com>
1958
1959         Reviewed by Maciej.
1960
1961         - fixed 3458937: nil-deref in timed layout
1962
1963         * khtml/khtmlview.cpp: (KHTMLView::layout): Add a nil check for m_part.
1964
1965 2003-12-14  Darin Adler  <darin@apple.com>
1966
1967         Reviewed by Maciej.
1968
1969         - fixed 3311205: click() on a file input type form element does not work bring up the file chooser as it does in IE
1970
1971         * khtml/html/html_formimpl.cpp:
1972         (HTMLInputElementImpl::click): Add a case for FILE that calls RenderFileButton's click() function.
1973         Get rid of the default case and list more cases explicitly.
1974         (HTMLInputElementImpl::accessKeyAction): Change FILE from just focus to focus/click.
1975
1976         * khtml/rendering/render_form.h: Added a click() function to RenderFileButton.
1977         * khtml/rendering/render_form.cpp:
1978         (RenderFileButton::slotTextChanged): Added call to onChange on the element to match text input
1979         fields; helpful for the test case Adobe supplied.
1980         (RenderFileButton::click): Added. Calls click() on KWQFileButton.
1981
1982         * kwq/KWQFileButton.h: Added a click function.
1983         * kwq/KWQFileButton.mm: (KWQFileButton::click): Added. Calls performClick on the file button.
1984
1985         * kwq/WebCoreBridge.h: Add a performClick method to WebCoreFileButton.
1986
1987 2003-12-13  Maciej Stachowiak  <mjs@apple.com>
1988
1989         Reviewed by Darin.
1990
1991         <rdar://problem/3269212>: FILEMAKER: can't use Option objects created in a different window
1992
1993         * khtml/ecma/kjs_binding.cpp:
1994         (ScriptInterpreter::updateDOMObjectDocument): Update per-document
1995         caching for the DOM object - let it be protected by both the old
1996         and the new document.
1997         * khtml/ecma/kjs_binding.h: Prototype new method.
1998         * khtml/xml/dom_nodeimpl.cpp:
1999         (NodeImpl::setDocument): New method to change a node's document pointer.
2000         (NodeImpl::checkAddChild): If the new child node is owned by the
2001         wrong document but not actually in it, change its document (using
2002         the two aforementioned methods) instead of throwing an exception.
2003         * khtml/xml/dom_nodeimpl.h: Prototype new method.
2004
2005 2003-12-14  Darin Adler  <darin@apple.com>
2006
2007         Reviewed by Maciej.
2008
2009         - fixed 3332280: REGRESSION (74-85): setting src of iframe results in two GETs
2010
2011         * khtml/html/html_baseimpl.h: Added openURL virtual function.
2012         * khtml/html/html_baseimpl.cpp:
2013         (HTMLFrameElementImpl::updateForNewURL): Call openURL to do the meat of the work,
2014         since it's different for frames and iframes.
2015         (HTMLFrameElementImpl::openURL): Move the part that's different for frames in here.
2016         (HTMLFrameElementImpl::parseAttribute): Call setLocation to share code.
2017         (HTMLFrameElementImpl::setLocation): Do nothing if the location is not changing.
2018         Not needed to fix this bug, but could eliminate other cases of extra GETs.
2019         (HTMLIFrameElementImpl::parseAttribute): Remove special handling of SRC, because now
2020         we will end up calling openURL, which will do the right thing for iframes.
2021         (HTMLIFrameElementImpl::openURL): Instead of doing the change to the frame directly,
2022         use updateWidget, since that's what we do for other changes to iframes. To trigger a
2023         call to updateWidget(), set needWidgetUpdate and mark the node changed.
2024
2025 2003-12-13  Maciej Stachowiak  <mjs@apple.com>
2026
2027         Reviewed by Darin.
2028
2029         <rdar://problem/3507885>: REGRESSION (100-116): frames missing due to cross-domain check (derstandard.at)
2030         
2031         * khtml/ecma/kjs_window.cpp:
2032         (Window::isSafeScript): Loosen the frame access rules a bit. We already allowed access to
2033         a document loaded as empty from the parent or opener. Now also allow access from any document
2034         in the same domain as the parent or opener, so that, for instance, a sibling frame can access it
2035         so long as it is in the same domain as the parent.
2036
2037 2003-12-13  Darin Adler  <darin@apple.com>
2038
2039         Reviewed by Maciej.
2040
2041         - fixed 3506204: homepage.mac slide show window is wrong size on 2nd monitor
2042
2043         * kwq/KWQApplication.mm: (QDesktopWidget::screenGeometry): Add code to flip the Y coordinate.
2044         This has no effect on the main screen, but a big effect on others. I used the same code to
2045         flip Y screen coordinates that is used KWQWindowWidget.mm and KWQKHTMLPartBrowserExtension.mm.
2046         * kwq/KWQKWinModule.mm: (KWinModule::workArea): Replaced the incorrect code to flip the Y
2047         coordinate here with correct code. The code flipped based on the frame of the main screen,
2048         but it needs to flip based on the frame of screen 0.
2049
2050 2003-12-12  Chris Blumenberg  <cblu@apple.com>
2051
2052         Fixed: <rdar://problem/3505208>: keys added to keychain from KEYGEN need better UI names
2053
2054         Reviewed by rjw.
2055
2056         * khtml/html/html_formimpl.cpp:
2057         (HTMLKeygenElementImpl::encoding): pass the page URL to signedPublicKeyAndChallengeString
2058         * kwq/KWQKSSLKeyGen.h:
2059         * kwq/KWQKSSLKeyGen.mm:
2060         (KSSLKeyGen::signedPublicKeyAndChallengeString): take a URL
2061         * kwq/WebCoreKeyGenerator.h:
2062         * kwq/WebCoreKeyGenerator.m:
2063         (-[WebCoreKeyGenerator signedPublicKeyAndChallengeStringWithStrengthIndex:challenge:pageURL:]): take a URL
2064
2065 2003-12-12  David Hyatt  <hyatt@apple.com>
2066
2067         Fix for 3254534, CSS background-image style should be loaded lazily only when used.
2068         
2069         Reviewed by rjw
2070
2071         * ChangeLog:
2072         * khtml/css/css_valueimpl.cpp:
2073         (CSSImageValueImpl::CSSImageValueImpl):
2074         (CSSImageValueImpl::~CSSImageValueImpl):
2075         (CSSImageValueImpl::image):
2076         * khtml/css/css_valueimpl.h:
2077         
2078 2003-12-11  David Hyatt  <hyatt@apple.com>
2079
2080         WebCore part of 3453214.  This ensures that all outline styles except for auto (which has a CG bug) will
2081         be displayed properly during the PaintActionOutline phase.
2082         
2083         Reviewed by john and darin
2084
2085         * khtml/rendering/render_block.cpp:
2086         (khtml::RenderBlock::paint):
2087         * khtml/rendering/render_box.cpp:
2088         (RenderBox::setStyle):
2089         * khtml/rendering/render_canvas.cpp:
2090         (RenderCanvas::RenderCanvas):
2091         * khtml/rendering/render_canvas.h:
2092         (khtml::RenderCanvas::setMaximalOutlineSize):
2093         (khtml::RenderCanvas::maximalOutlineSize):
2094         * khtml/rendering/render_object.cpp:
2095         (RenderObject::maximalOutlineSize):
2096         * khtml/rendering/render_object.h:
2097         * khtml/rendering/render_replaced.cpp:
2098         (RenderReplaced::paint):
2099         * khtml/rendering/render_table.cpp:
2100         (RenderTable::paint):
2101         (RenderTableSection::paint):
2102         (RenderTableCell::paint):
2103
2104 2003-12-12  John Sullivan  <sullivan@apple.com>
2105
2106         - fixed <rdar://problem/3508825>: REGRESSION (100-116): crash in 
2107         HTMLGenericFormElementImpl::attach at sonyericsson.com
2108
2109         Reviewed by Maciej.
2110
2111         * khtml/html/html_formimpl.cpp:
2112         (HTMLGenericFormElementImpl::attach):
2113         Move a few lines inside an existing nil check to prevent nil dereference.
2114
2115 2003-12-12  John Sullivan  <sullivan@apple.com>
2116
2117         - fixed <rdar://problem/3508760>: tabbing to out-of-sight link behaves 
2118         differently than tabbing to out-of-sight form control
2119
2120         Reviewed by Dave.
2121
2122         * kwq/KWQScrollView.h:
2123         * kwq/KWQScrollView.mm:
2124         (QScrollView::ensureVisible):
2125         added comments and changed parameter names to reveal differences between
2126         what we've implemented and what QScrollView was intended to do.
2127         (QScrollView::ensureRectVisibleCentered):
2128         New method that calls _KWQ_scrollRectToVisible, which is the method
2129         we use when scrolling to reveal form controls.
2130
2131         * kwq/KWQKHTMLPart.mm:
2132         (KWQKHTMLPart::nextKeyViewInFrame):
2133         call ensureRectVisibleCentered so tabbing to a link will use the
2134         same scroll-to-reveal code as tabbing to a form control
2135         
2136 2003-12-11  Maciej Stachowiak  <mjs@apple.com>
2137
2138         Reviewed by John.
2139
2140         <rdar://problem/3507856>: XMLHttpRequest xhtml test displays but doesn't load
2141
2142         * khtml/ecma/xmlhttprequest.cpp:
2143         (KJS::XMLHttpRequestProtoFunc::tryCall): complete the URL using the document,
2144         not the htmlDocument.
2145
2146 2003-12-12  Richard Williamson   <rjw@apple.com>
2147
2148         Replace call to global functions with static member functions.
2149
2150         Reviewed by Ken.
2151
2152         * kwq/KWQKHTMLPart.mm:
2153         (KWQKHTMLPart::cleanupPluginRootObjects):
2154         * kwq/WebCoreBridge.mm:
2155         (rootForView):
2156         (-[WebCoreBridge init]):
2157
2158 2003-12-11  Maciej Stachowiak  <mjs@apple.com>
2159
2160         Reviewed by Darin.
2161
2162         <rdar://problem/3464315>: createDocument creates document with initial child element, unlike other browsers
2163         
2164         * khtml/xml/dom_docimpl.cpp:
2165         (DOMImplementationImpl::createDocument): Don;t add initial element.
2166
2167 2003-12-11  Maciej Stachowiak  <mjs@apple.com>
2168
2169         Reviewed by Darin. 
2170
2171         <rdar://problem/3507863>: XMLHttpRequest should not parse response if HTML
2172         
2173         * khtml/ecma/xmlhttprequest.cpp:
2174         (KJS::XMLHttpRequest::getValueProperty):
2175
2176 2003-12-11  Richard Williamson   <rjw@apple.com>
2177
2178         Cleaned up and verified reference counting scheme, and
2179         dereferencing of vended JavaScript objects when applet is
2180         destroyed (actually when part is destroyed).
2181
2182         Reviewed by Ken.
2183
2184         * kwq/KWQKHTMLPart.h:
2185         * kwq/KWQKHTMLPart.mm:
2186         (KWQKHTMLPart::~KWQKHTMLPart):
2187         (KWQKHTMLPart::getAppletInstanceForView):
2188         (KWQKHTMLPart::addPluginRootObject):
2189         (KWQKHTMLPart::cleanupPluginRootObjects):
2190         * kwq/WebCoreBridge.h:
2191         * kwq/WebCoreBridge.mm:
2192         (rootForView):
2193         (-[WebCoreBridge init]):
2194
2195 2003-12-11  Maciej Stachowiak  <mjs@apple.com>
2196
2197         Reviewed by John.
2198
2199         <rdar://problem/3507862>: XMLHttpRequest documents that reference external resources (e.g. stylesheets) cause crash
2200
2201         * khtml/html/html_headimpl.cpp:
2202         (HTMLLinkElementImpl::process):
2203         * khtml/html/htmltokenizer.cpp:
2204         (HTMLTokenizer::scriptHandler):
2205         * khtml/xml/dom_xmlimpl.cpp:
2206         (ProcessingInstructionImpl::checkStyleSheet):
2207         * khtml/xml/xml_tokenizer.cpp:
2208         (XMLHandler::processingInstruction):
2209         (XMLTokenizer::executeScripts):
2210
2211 2003-12-11  Maciej Stachowiak  <mjs@apple.com>
2212
2213         Reviewed by Chris.
2214
2215         <rdar://problem/3507859>: Status text should only include "OK", not full "HTTP/1.0 200 OK" status line
2216         
2217         * khtml/ecma/xmlhttprequest.cpp:
2218         (KJS::XMLHttpRequest::getStatusText): Include only the status
2219         text, not the full status line.
2220
2221 === Safari-117 ===
2222
2223 2003-12-11  David Hyatt  <hyatt@apple.com>
2224
2225         Fix for 3507164, scrolling really slow on hixie's web forms spec page.  Hixie has 12 little transparent layers
2226         at various points on this page, and beginning/ending transparency on only those 12 layers as you scroll
2227         is enough to kill scrolling performance.
2228
2229         This patch works around the issue by lazily beginning transparency layers only when we determine that
2230         we're actually painting a descendant layer of a transparent ancestor or a transparent layer.
2231
2232         Also fixing QColor's comparison operator.  It was broken and not comparing the "valid" bit, so invalid and
2233         valid colors were being assumed to be the same.
2234
2235         Also fixed the render dumper to not dump transparent and invalid background colors and fixed it do dump the
2236         alpha for colors with an alpha < 0xFF.
2237         
2238         Reviewed by mjs (opacity changes), darin (color changes) and john (render tree dumper changes)
2239
2240         * ChangeLog:
2241         * khtml/rendering/render_layer.cpp:
2242         (RenderLayer::RenderLayer):
2243         (RenderLayer::beginTransparencyLayers):
2244         (RenderLayer::paint):
2245         (RenderLayer::paintLayer):
2246         * khtml/rendering/render_layer.h:
2247         * kwq/KWQColor.h:
2248         (operator==):
2249         (operator!=):
2250         * kwq/KWQColor.mm:
2251         (QColor::name):
2252         * kwq/KWQRenderTreeDebug.cpp:
2253         (operator<<):
2254
2255 2003-12-11  Ken Kocienda  <kocienda@apple.com>
2256
2257         * kwq/KWQLoader.mm:
2258         (KWQCacheObjectExpiresTime): Fixed deployment build bustage.
2259
2260 2003-12-09  Ken Kocienda  <kocienda@apple.com>
2261
2262         Reviewed by Darin
2263         
2264         <rdar://problem/3505444>: WebCore cache does not use expiration dates on cache items
2265         
2266         * khtml/misc/loader.cpp:
2267         (Loader::slotFinished): Don't reset expiration date. We set this once in
2268         slotReceivedResponse.
2269         (Loader::slotReceivedResponse): Call new KWQ function to get a cache object's
2270         expiration date using its NSURLResponse data.
2271         (Cache::requestImage): Don't reset expiration date. We set this once in
2272         slotReceivedResponse, and we do not want the value from the DocLoader
2273         anyway.
2274         (Cache::requestStyleSheet): Ditto.
2275         (Cache::requestScript): Ditto.
2276         * kwq/KWQLoader.h:
2277         * kwq/KWQLoader.mm:
2278         (KWQCacheObjectExpiresTime): New function. Call over bridge to get access
2279         to SPI in NSURLResponse to calculate expiration time.
2280         * kwq/WebCoreBridge.h: Declare bridge method.
2281
2282 2003-12-10  Maciej Stachowiak  <mjs@apple.com>
2283
2284         Reviewed by Darin.
2285
2286         <rdar://problem/3504156>: XMLHttpRequest reuse test fails
2287         <rdar://problem/3505158>: XMLHttpRequest "abort with open" test fails
2288
2289         * khtml/ecma/xmlhttprequest.cpp:
2290         (KJS::XMLHttpRequest::open):
2291         (KJS::XMLHttpRequest::abort):
2292         (KJS::XMLHttpRequestProtoFunc::tryCall):
2293
2294 2003-12-10  Maciej Stachowiak  <mjs@apple.com>
2295
2296         Reviewed by Darin.
2297
2298         <rdar://problem/3507175>: Setting timeout function can allocate JS objects without lock
2299
2300         * khtml/ecma/kjs_window.cpp:
2301         (ScheduledAction::execute): Lock interpreter around code that
2302         might allocate JS objects.
2303
2304 2003-12-10  David Hyatt  <hyatt@apple.com>
2305
2306         Fix for 3507097, overflow:auto should include the height of the horizontal scrollbar when the height
2307         of the block is auto.
2308         
2309         Reviewed by darin
2310
2311         * khtml/rendering/bidi.cpp:
2312         (khtml::RenderBlock::layoutInlineChildren):
2313         * khtml/rendering/render_block.cpp:
2314         (khtml::RenderBlock::layoutBlock):
2315         (khtml::RenderBlock::layoutBlockChildren):
2316
2317 2003-12-10  Darin Adler  <darin@apple.com>
2318
2319         Reviewed by Maciej.
2320
2321         - fixed 3506739: nil-deref in DocumentImpl::setSelection triple clicking (generated content)
2322
2323         * khtml/khtml_part.cpp: (KHTMLPart::khtmlMousePressEvent): Check for the case where
2324         m_selectionEnd is 0. This doesn't fix the behavior completely, but it does prevent a crash.
2325
2326 2003-12-10  Maciej Stachowiak  <mjs@apple.com>
2327
2328         Reviewed by Richard.
2329
2330         <rdar://problem/3487160>: Implement synchronous loading for XMLHttpRequest
2331         
2332         * khtml/ecma/xmlhttprequest.cpp:
2333         (KJS::XMLHttpRequest::XMLHttpRequest):
2334         (KJS::XMLHttpRequest::send):
2335         (KJS::XMLHttpRequest::abort):
2336         (KJS::XMLHttpRequest::processSyncLoadResults):
2337         (KJS::XMLHttpRequest::slotRedirection):
2338         (KJS::XMLHttpRequest::slotData):
2339         * khtml/ecma/xmlhttprequest.h:
2340         * kwq/KWQLoader.h:
2341         * kwq/KWQLoader.mm:
2342         (KWQHeaderStringFromDictionary):
2343         (KWQServeSynchronousRequest):
2344         (KWQResponseHeaderString):
2345         * kwq/WebCoreBridge.h:
2346
2347 2003-12-10  Darin Adler  <darin@apple.com>
2348
2349         Reviewed by Maciej.
2350
2351         - fixed 3506706: REGRESSION (100-115): onkeyup handlers called twice for active input fields
2352
2353         * kwq/KWQTextArea.mm: (-[KWQTextAreaTextView keyUp:]): Don't call super because we
2354         don't want to pass the event down the responder chain.
2355         * kwq/KWQTextField.mm: (-[KWQTextField textView:shouldHandleEvent:]): Return NO for
2356         key up events because we don't want to pass the event down the responder chain.
2357
2358 2003-12-10  Richard Williamson   <rjw@apple.com>
2359
2360         Added method to get to the bridge from a view.  This is
2361         used to ultimately get the part and KJS::Window for a
2362         particular applet.
2363
2364         Reviewed by Hyatt.
2365
2366         * kwq/WebCoreBridge.h:
2367         * kwq/WebCoreBridge.mm:
2368         (rootForView):
2369         (-[WebCoreBridge init]):
2370         * kwq/WebCoreViewFactory.h:
2371         * kwq/WebCoreViewFactory.m:
2372
2373 2003-12-10  John Sullivan  <sullivan@apple.com>
2374
2375         - WebCore part of fix for:
2376         <rdar://problem/3505231>: REGRESSION (100-114): Some sites autoscroll to bottom of page when loading
2377
2378         Reviewed by Darin.
2379
2380         * kwq/KWQNSViewExtras.h:
2381         * kwq/KWQNSViewExtras.m:
2382         (-[NSView _KWQ_scrollPointRecursive:]):
2383         (-[NSView _KWQ_scrollPointRecursive:inView:]):
2384         new methods, similar to existing scrollRect methods
2385         except that the preferred position for the point is
2386         the top-left corner rather than centered in the visible area
2387         
2388         * kwq/KWQScrollView.h:
2389         * kwq/KWQScrollView.mm:
2390         (QScrollView::setContentsPosRecursive):
2391         new method, calls _KWQ_scrollPointRecursive:
2392
2393         * khtml/khtml_part.cpp:
2394         (KHTMLPart::gotoAnchor):
2395         call setContentsPosRecursive instead of setContentsPos; also remove
2396         the 50 pixel offset that upset Hyatt so.
2397         
2398
2399 2003-12-10  Chris Blumenberg  <cblu@apple.com>
2400
2401         * kwq/KWQKSSLKeyGen.mm:
2402         (KSSLKeyGen::signedPublicKeyAndChallengeString): removed unnecessary includes
2403
2404 2003-12-10  David Hyatt  <hyatt@apple.com>
2405
2406         Fix for 3505846, overflow:auto region doesn't update when scrolled.  The child layers inside an overflow:auto
2407         block were not updating their positions.
2408         
2409         Reviewed by john
2410
2411         * khtml/khtmlview.cpp:
2412         (KHTMLView::layout):
2413         * khtml/rendering/render_layer.cpp:
2414         (RenderLayer::updateLayerPositions):
2415         (RenderLayer::scrollToOffset):
2416         * khtml/rendering/render_layer.h:
2417
2418 2003-12-09  Maciej Stachowiak  <mjs@apple.com>
2419
2420         Reviewed by John.
2421
2422         <rdar://problem/3505795>: loading invalid XML document crashes trying to create h1 element
2423         <rdar://problem/3504158>: XMLHttpRequest xhtml test totally fails
2424         
2425         * khtml/xml/dom_docimpl.cpp:
2426         (DocumentImpl::isValidName): include "0123456789" instead of
2427         "0-9", it's not a regexp it's just a list of characters.
2428
2429 2003-12-09  Maciej Stachowiak  <mjs@apple.com>
2430
2431         Reviewed by John.
2432
2433         <rdar://problem/3504155>: Safari fails XMLHttpRequest abort test
2434         
2435         * khtml/ecma/xmlhttprequest.cpp:
2436         (KJS::XMLHttpRequestProtoFunc::tryCall): Avoid throwing an
2437         exception after send().
2438
2439 2003-12-09  David Hyatt  <hyatt@apple.com>
2440
2441         Rename -apple-aqua to auto for outline styles.
2442         
2443         Reviewed by darin
2444
2445         * khtml/css/cssparser.cpp:
2446         (CSSParser::parseValue):
2447         * khtml/css/cssstyleselector.cpp:
2448         (khtml::CSSStyleSelector::applyRule):
2449         * khtml/css/cssvalues.c:
2450         (hash_val):
2451         (findValue):
2452         * khtml/css/cssvalues.h:
2453         * khtml/css/cssvalues.in:
2454         * khtml/css/html4.css:
2455         * khtml/rendering/render_inline.cpp:
2456         (RenderInline::paintObject):
2457         * khtml/rendering/render_object.cpp:
2458         (RenderObject::drawBorder):
2459         (RenderObject::paintOutline):
2460         * khtml/rendering/render_style.h:
2461         (khtml::):
2462         (khtml::OutlineValue::OutlineValue):
2463         (khtml::RenderStyle::outlineStyleIsAuto):
2464         (khtml::RenderStyle::outlineOffset):
2465         (khtml::RenderStyle::setOutlineStyle):
2466         (khtml::RenderStyle::setOutlineOffset):
2467         * kwq/KWQRenderTreeDebug.cpp:
2468         (printBorderStyle):
2469
2470 2003-12-09  Maciej Stachowiak  <mjs@apple.com>
2471
2472         Reviewed by John.
2473
2474         <rdar://problem/3487195>: Implement responseXML property for XMLHttpRequest
2475         
2476         * khtml/ecma/xmlhttprequest.cpp:
2477         (KJS::XMLHttpRequest::getValueProperty): Implemented responseXML by parsing the
2478         document and returning it.
2479         (KJS::XMLHttpRequest::XMLHttpRequest): Initialize new field
2480         * khtml/ecma/xmlhttprequest.h:
2481
2482         * khtml/ecma/kjs_window.cpp: 
2483         (Windw::get): Forgot this in last commit; add XMLSerializer
2484         constructor.
2485         * khtml/ecma/kjs_window.lut.h:
2486         * khtml/ecma/Makefile.am: Forgot to include this in the last commit.
2487
2488 2003-12-09  Maciej Stachowiak  <mjs@apple.com>
2489
2490         Reviewed by Richard.
2491
2492         <rdar://problem/3504049>: XMLSerializer object and serializeToString method needed for XMLHttpRequest testing
2493
2494         Also fixed some lasst-minute mistakes in the DOM serialization
2495         code that was already there.
2496         
2497         * WebCore.pbproj/project.pbxproj:
2498         * khtml/dom/dom_doc.h:
2499         * khtml/ecma/Makefile.am:
2500         * khtml/ecma/kjs_window.cpp:
2501         (Window::get):
2502         * khtml/ecma/kjs_window.h:
2503         (KJS::Window::):
2504         * khtml/ecma/kjs_window.lut.h:
2505         (KJS::):
2506         * khtml/ecma/xmlserializer.cpp: Added.
2507         (KJS::XMLSerializerConstructorImp::XMLSerializerConstructorImp):
2508         (KJS::XMLSerializerConstructorImp::implementsConstruct):
2509         (KJS::XMLSerializerConstructorImp::construct):
2510         (KJS::):
2511         (KJS::XMLSerializer::XMLSerializer):
2512         (KJS::XMLSerializerProtoFunc::tryCall):
2513         * khtml/ecma/xmlserializer.h: Added.
2514         (KJS::XMLSerializer::toBoolean):
2515         (KJS::XMLSerializer::classInfo):
2516         (KJS::XMLSerializer::):
2517         * khtml/ecma/xmlserializer.lut.h: Added.
2518         (KJS::):
2519         * khtml/xml/dom_docimpl.cpp:
2520         (DocumentImpl::toString):
2521         (DocumentFragmentImpl::toString):
2522         * khtml/xml/dom_elementimpl.cpp:
2523         (AttrImpl::toString):
2524         (ElementImpl::toString):
2525
2526 2003-12-09  David Hyatt  <hyatt@apple.com>
2527
2528         Implement start() and stop() for marquees.
2529         
2530         Reviewed by darin
2531
2532         * khtml/ecma/kjs_html.cpp:
2533         (KJS::HTMLElement::classInfo):
2534         (KJS::HTMLElementFunction::tryCall):
2535         * khtml/ecma/kjs_html.h:
2536         (KJS::HTMLElement::):
2537         * khtml/ecma/kjs_html.lut.h:
2538         (KJS::):
2539
2540 2003-12-09  Darin Adler  <darin@apple.com>
2541
2542         Reviewed by John.
2543
2544         - fixed 3505277: nil-deref in ownerElement after choosing item from menu at projectnissan.com
2545
2546         * khtml/xml/dom_nodeimpl.cpp: (NodeImpl::dispatchWindowEvent): Add check for nil.
2547
2548 2003-12-09  Darin Adler  <darin@apple.com>
2549
2550         Reviewed by Maciej.
2551
2552         * kwq/KWQKHTMLPart.mm:
2553         (KWQKHTMLPart::saveLocationProperties): Add locking around the call to get the location
2554         since it can allocate.
2555         (KWQKHTMLPart::restoreLocationProperties): Ditto.
2556
2557 2003-12-09  David Hyatt  <hyatt@apple.com>
2558
2559         Fix for mojibake bg painting problem on bofa.com.  The bug # is 3487144.  Transparent colors were not
2560         being handled properly when specified on the body.
2561         
2562         Reviewed by darin
2563
2564         * khtml/rendering/render_box.cpp:
2565         (RenderBox::paintRootBoxDecorations):
2566         (RenderBox::paintBackgroundExtended):
2567
2568 2003-12-09  Darin Adler  <darin@apple.com>
2569
2570         Reviewed by Dave.
2571
2572         - fixed 3505391: REGRESSION (100-116): pages that move cells around don't repaint correctly
2573
2574         * khtml/rendering/render_table.cpp: (RenderTableSection::layoutRows): Added code
2575         similar to the code in RenderBlock::layoutBlock, but for table cells.
2576
2577 2003-12-09  Darin Adler  <darin@apple.com>
2578
2579         Reviewed by Maciej.
2580
2581         * khtml/ecma/kjs_events.cpp: (JSEventListener::handleEvent): Add locking around the call to
2582         push event handler scope. Without this, we hit the "allocated without locking" assertion.
2583
2584 2003-12-09  David Hyatt  <hyatt@apple.com>
2585
2586         Fix the dirty rect checks on various render_objects to be more accurate so that page-break properties don't
2587         have mojibake when printing.
2588         
2589         Reviewed by john
2590
2591         * khtml/rendering/render_block.cpp:
2592         (khtml::RenderBlock::paint):
2593         * khtml/rendering/render_flow.cpp:
2594         (RenderFlow::paintLineBoxBackgroundBorder):
2595         (RenderFlow::paintLineBoxDecorations):
2596         * khtml/rendering/render_replaced.cpp:
2597         (RenderReplaced::paint):
2598         * khtml/rendering/render_table.cpp:
2599         (RenderTable::paint):
2600
2601 2003-12-09  Darin Adler  <darin@apple.com>
2602
2603         Reviewed by Richard.
2604
2605         - fixed 3500408: Web Kit should pass the MAYSCRIPT attribute from the APPLET tag to the Java plug-in
2606
2607         * khtml/html/html_objectimpl.cpp:
2608         (HTMLAppletElementImpl::parseAttribute): Allow the "mayscript" attribute.
2609         (HTMLAppletElementImpl::createRenderer): Pass the value of the "mayscript" attribute
2610         as an argument named "mayScript".
2611
2612         * khtml/misc/htmlattrs.in: Added "mayscript".
2613         * khtml/misc/htmlattrs.c: Regenerated.
2614         * khtml/misc/htmlattrs.h: Regenerated.
2615
2616 2003-12-09  Maciej Stachowiak  <mjs@apple.com>
2617
2618         Reviewed by Darin.
2619
2620         <rdar://problem/3501030>: JavaScript sites crash when a PAC file is in place (WebCore,Safari 1.2)
2621         
2622         * khtml/ecma/kjs_events.cpp:
2623         (JSEventListener::handleEvent): Lock interpreter when needed.
2624         (JSLazyEventListener::parseCode): Likewise.
2625         (KJS::getDOMEvent): Likewise.
2626         * khtml/ecma/kjs_proxy.cpp:
2627         (KJSProxyImpl::evaluate): Likewise.
2628         (KJSProxyImpl::initScript): Likewise.
2629
2630 2003-12-09  David Hyatt  <hyatt@apple.com>
2631
2632         Fix for 3491235, really make <script src="..."/> work in HTML.  My original attempt to fix this only made
2633         the tag flat, but did not ensure that the script got processed.
2634         
2635         Reviewed by john
2636
2637         * khtml/html/htmltokenizer.cpp:
2638         (HTMLTokenizer::parseTag):
2639
2640 2003-12-08  David Hyatt  <hyatt@apple.com>
2641
2642         Fix for 3503652, news.com misrenders badly (footer is out of position).  My fix to 3495748 caused this
2643         regression.  I made the tag priority of <nobr> too high.  It needed to be the same as <div>, and I
2644         accidentally made it higher.  I intended for it to be the same as <div>.
2645
2646         I also had to make a fix (now that <nobr> has a higher priority) to ensure <nobr> can't be nested inside
2647         other <nobr>.  
2648
2649         Both fixes were required to make news.com render correctly again.
2650         
2651         Reviewed by darin
2652
2653         * khtml/html/dtd.cpp:
2654         * khtml/html/htmlparser.cpp:
2655         (KHTMLParser::getElement):
2656
2657 2003-12-08  Chris Blumenberg  <cblu@apple.com>
2658
2659         Fixed: <rdar://problem/3234676>: Support for KEYGEN tag (ie 509 email certificates from www.thawte.com)
2660
2661         Reviewed by mjs.
2662
2663         * WebCore-combined.exp:
2664         * WebCore.exp:
2665         * WebCore.pbproj/project.pbxproj:
2666         * khtml/html/html_formimpl.cpp:
2667         (HTMLKeygenElementImpl::parseAttribute): store the KEYTYPE attribute
2668         (HTMLKeygenElementImpl::encoding): call KSSLKeyGen::signedPublicKeyAndChallengeString
2669         * khtml/html/html_formimpl.h: remove 2 declared but unimplemented methods
2670         * khtml/misc/htmlattrs.c: generated changes
2671         (hash_attr):
2672         (findAttr):
2673         * khtml/misc/htmlattrs.h: generated change
2674         * khtml/misc/htmlattrs.in: added KEYTYPE
2675         * kwq/KWQKSSLKeyGen.h:
2676         * kwq/KWQKSSLKeyGen.mm:
2677         (KSSLKeyGen::supportedKeySizes): call renamed strengthMenuItemTitles
2678         (KSSLKeyGen::signedPublicKeyAndChallengeString): new, calls [WebCoreKeyGenerationFactory signedPublicKeyAndChallengeStringWithStrengthIndex:challenge:] 
2679         * kwq/WebCoreKeyGenerationFactory.h: Added.
2680         * kwq/WebCoreKeyGenerationFactory.m: Added.
2681         (+[WebCoreKeyGenerationFactory sharedFactory]):
2682         (-[WebCoreKeyGenerationFactory init]):
2683         (-[WebCoreKeyGenerationFactory strengthMenuItemTitles]):
2684         (-[WebCoreKeyGenerationFactory signedPublicKeyAndChallengeStringWithStrengthIndex:challenge:]):
2685         * kwq/WebCoreLocalizedStringFactory.h: Removed.
2686         * kwq/WebCoreLocalizedStringFactory.m: Removed.
2687
2688 2003-12-08  Maciej Stachowiak  <mjs@apple.com>
2689
2690         Reviewed by Ken.
2691
2692         <rdar://problem/3504047>: XMLHttpRequest object needs onload event
2693         
2694         * khtml/ecma/xmlhttprequest.cpp:
2695         (KJS::XMLHttpRequest::getValueProperty): Implemented onload property.
2696         (KJS::XMLHttpRequest::putValue): Ditto.
2697         (KJS::XMLHttpRequest::XMLHttpRequest): Ditto.
2698         (KJS::XMLHttpRequest::changeState): Ditto.
2699         * khtml/ecma/xmlhttprequest.h:
2700         * khtml/ecma/xmlhttprequest.lut.h: Regenerated.
2701
2702 2003-12-08  David Hyatt  <hyatt@apple.com>
2703
2704         Fix for 3503022, asahi.com is too wide.  Bugs in line breaking of breakable Japanese characters caused
2705         the breaks to be ignored.
2706         
2707         Reviewed by john
2708
2709         * khtml/rendering/render_text.cpp:
2710         (RenderText::calcMinMaxWidth):
2711
2712 2003-12-05  David Hyatt  <hyatt@apple.com>
2713
2714         Fix the position method to return screen coords like it should and to use the lower left corner instead of
2715         the upper left.
2716         
2717         Reviewed by john
2718
2719         * kwq/KWQAccObject.h:
2720         * kwq/KWQAccObject.mm:
2721         (-[KWQAccObject position]):
2722         (-[KWQAccObject size]):
2723
2724 2003-12-07  Darin Adler  <darin@apple.com>
2725
2726         Reviewed by John.
2727
2728         - fixed 3502347: REGRESSION (100-116): bottom of login window sometimes missing (TR background image)
2729
2730         * khtml/rendering/render_object.h: Added setPixmap.
2731         * khtml/rendering/render_object.cpp: (RenderObject::setPixmap): Moved this
2732         function here from RenderBox. This code is needed for the table row class and
2733         similar classes that supply a background image that is drawn by the table cell,
2734         and those are not RenderBox subclasses.
2735
2736         * khtml/rendering/render_box.cpp: Removed setPixmap.
2737         * khtml/rendering/render_box.h: Removed setPixmap.
2738
2739 2003-12-06  John Sullivan  <sullivan@apple.com>
2740
2741         - fixed <rdar://problem/3502655>: REGRESSION: Repro crash at espn.com
2742
2743         Reviewed by Darin.
2744
2745         * khtml/html/html_objectimpl.cpp:
2746         (HTMLAppletElementImpl::getAppletInstance):
2747         Check for nil RenderApplet before dereferencing rather than after.
2748
2749 2003-12-05  David Hyatt  <hyatt@apple.com>
2750
2751         Add support for link clicking as an accessibility action.
2752         
2753         Reviewed by john
2754
2755         * kwq/KWQAccObject.mm:
2756         (-[KWQAccObject anchorElement]):
2757         (-[KWQAccObject role]):
2758         (-[KWQAccObject accessibilityAttributeNames]):
2759         (-[KWQAccObject accessibilityActionNames]):
2760         (-[KWQAccObject accessibilityActionDescription:]):
2761         (-[KWQAccObject accessibilityPerformAction:]):
2762
2763 2003-12-05  Maciej Stachowiak  <mjs@apple.com>
2764
2765         Reviewed by John.
2766
2767         <rdar://problem/3487222>: Add ability to create working fully standalone document object
2768         
2769         * khtml/css/cssstyleselector.cpp:
2770         (khtml::CSSStyleSelector::CSSStyleSelector):
2771         (khtml::CSSStyleSelector::addSheet):
2772         (khtml::CSSStyleSelector::initForStyleResolve):
2773         (khtml::CSSStyleSelector::applyRule):
2774         * khtml/dom/dom_doc.cpp:
2775         (DOM::Document::part):
2776         * khtml/dom/dom_doc.h:
2777         * khtml/ecma/kjs_dom.cpp:
2778         (DOMDocument::getValueProperty):
2779         (KJS::checkNodeSecurity):
2780         * khtml/ecma/kjs_html.cpp:
2781         (KJS::HTMLDocFunction::tryCall):
2782         (KJS::HTMLDocument::tryGet):
2783         (KJS::HTMLDocument::putValue):
2784         (KJS::HTMLElement::tryGet):
2785         (Image::notifyFinished):
2786         * khtml/ecma/kjs_traversal.cpp:
2787         (JSNodeFilter::acceptNode):
2788         * khtml/ecma/xmlhttprequest.cpp:
2789         (KJS::XMLHttpRequest::changeState):
2790         * khtml/html/html_baseimpl.cpp:
2791         (HTMLBodyElementImpl::insertedIntoDocument):
2792         (HTMLFrameElementImpl::isURLAllowed):
2793         (HTMLFrameElementImpl::attach):
2794         (HTMLFrameElementImpl::detach):
2795         (HTMLFrameElementImpl::contentDocument):
2796         (HTMLIFrameElementImpl::attach):
2797         * khtml/html/html_documentimpl.cpp:
2798         (HTMLDocumentImpl::referrer):
2799         (HTMLDocumentImpl::lastModified):
2800         * khtml/html/html_formimpl.cpp:
2801         (HTMLFormElementImpl::formData):
2802         (HTMLFormElementImpl::prepareSubmit):
2803         (HTMLFormElementImpl::submit):
2804         (HTMLFormElementImpl::reset):
2805         (HTMLGenericFormElementImpl::isKeyboardFocusable):
2806         (HTMLGenericFormElementImpl::defaultEventHandler):
2807         * khtml/html/html_headimpl.cpp:
2808         (HTMLBaseElementImpl::process):
2809         (HTMLLinkElementImpl::process):
2810         * khtml/html/html_inlineimpl.cpp:
2811         (HTMLAnchorElementImpl::isKeyboardFocusable):
2812         (HTMLAnchorElementImpl::defaultEventHandler):
2813         * khtml/html/html_objectimpl.cpp:
2814         (HTMLAppletElementImpl::createRenderer):
2815         (HTMLAppletElementImpl::getAppletInstance):
2816         (HTMLEmbedElementImpl::rendererIsNeeded):
2817         (HTMLObjectElementImpl::rendererIsNeeded):
2818         * khtml/html/htmltokenizer.cpp:
2819         (HTMLTokenizer::scriptExecution):
2820         (HTMLTokenizer::parseTag):
2821         * khtml/rendering/render_applet.cpp:
2822         (RenderApplet::RenderApplet):
2823         * khtml/xml/dom_docimpl.cpp:
2824         (DocumentImpl::setTitle):
2825         (DocumentImpl::part):
2826         (DocumentImpl::close):
2827         (DocumentImpl::processHttpEquiv):
2828         * khtml/xml/dom_docimpl.h:
2829         * khtml/xml/dom_nodeimpl.cpp:
2830         (NodeImpl::dispatchEvent):
2831         * kwq/KWQAccObject.mm:
2832         (-[KWQAccObject textUnderElement]):
2833         * kwq/KWQKHTMLPart.mm:
2834         (KWQKHTMLPart::partForNode):
2835         (KWQKHTMLPart::attributedString):
2836
2837 2003-12-05  Richard Williamson   <rjw@apple.com>
2838
2839         Fixed 3501885.  Added null test to returned node from collection.
2840
2841         Reviewed by John.
2842
2843         * khtml/ecma/kjs_html.cpp:
2844         (KJS::HTMLCollection::tryGet):
2845
2846 2003-12-04  Richard Williamson   <rjw@apple.com>
2847
2848         Added support for named applet access from document node.
2849         Factored creation of KJS::Values from RuntimeObjectImps.
2850
2851         Reviewed by Chris.
2852
2853         * khtml/ecma/kjs_dom.cpp:
2854         (KJS::getDOMNamedNodeMap):
2855         (KJS::getRuntimeObject):
2856         * khtml/ecma/kjs_dom.h:
2857         * khtml/ecma/kjs_html.cpp:
2858         (KJS::HTMLDocument::tryGet):
2859         (KJS::HTMLElement::tryGet):
2860         (KJS::HTMLCollection::tryGet):
2861
2862 2003-12-04  Darin Adler  <darin@apple.com>
2863
2864         Reviewed by John.
2865
2866         - fixed 3498712: REGRESSION (100-115): Safari aborts at http://www11.dht.dk/~blangstrup_org/
2867
2868         This was an uncaught exception thrown by DocumentImpl. But the design of KHTML DOM is that
2869         "impl" classes return exception codes; they don't throw exceptions.
2870
2871         * khtml/dom/dom_doc.cpp:
2872         (DOM::Document::createElement): Throw exception if necessary. The impl function now returns
2873         an exception code.
2874         (DOM::Document::createElementNS): Ditto.
2875
2876         * khtml/html/html_documentimpl.h: Add exception code parameter to createElement.
2877         * khtml/html/html_documentimpl.cpp: (HTMLDocumentImpl::createElement): Pass along the
2878         exception code from the lower level.
2879
2880         * khtml/xml/dom_docimpl.h: Add exception code parameters to createElement, createElementNS,
2881         and createHTMLElement.
2882         * khtml/xml/dom_docimpl.cpp:
2883         (DOMImplementationImpl::createDocument): Handle exception code from createElementNS.
2884         (DocumentImpl::createElement): Add exception code parameter, not set since there is
2885         no exception.
2886         (DocumentImpl::importNode): Handle exception code from createElementNS.
2887         (DocumentImpl::createElementNS): Add exception code parameter. Propagate the exception
2888         codes that we get from createHTMLElement and setPrefix.
2889         (DocumentImpl::createHTMLElement): Add exception code parameter. Use an exception code
2890         rather than a C++ exception for INVALID_CHARACTER_ERR.
2891
2892         * khtml/xml/dom_elementimpl.cpp: (ElementImpl::cloneNode): Pass exception code parameter to
2893         createElement.
2894
2895         * khtml/xml/xml_tokenizer.cpp:
2896         (XMLHandler::startElement): Pass exception code parameter to createElementNS, and return false
2897         if it is not zero. This is where the bug happened. Before we would get an exception from
2898         createElementNS, but "impl" functions are not supposed to throw in KHTML's DOM.
2899         (XMLTokenizer::finish): Add various exception code parameters to compile, but we know we won't
2900         get any exceptions.
2901
2902         * kwq/WebCoreDOMDocument.mm:
2903         (-[WebCoreDOMDocument createElement:]): Pass an (ignored) exception code parameter.
2904         (-[WebCoreDOMDocument createElementNS::]): Pass an (ignored) exception code parameter.
2905
2906 === Safari-116 ===
2907
2908 2003-12-03  Richard Williamson   <rjw@apple.com>
2909
2910         LiveConnect:  Removed some debugging.
2911
2912         Reviewed by Chris.
2913
2914         * khtml/ecma/kjs_html.cpp:
2915         (KJS::HTMLCollection::tryGet):
2916
2917 2003-12-03  David Hyatt  <hyatt@apple.com>
2918
2919         Fix for 3475761, list bullets mislayout after text zooming.
2920         
2921         Reviewed by kocienda
2922
2923         * khtml/rendering/render_block.cpp:
2924         (khtml::RenderBlock::setStyle):
2925
2926 2003-12-03  David Hyatt  <hyatt@apple.com>
2927
2928         Fix for 3493356, table cells didn't repaint properly.
2929         
2930         Reviewed by kocienda
2931
2932         * khtml/rendering/render_object.cpp:
2933         (RenderObject::repaintObjectsBeforeLayout):
2934         * khtml/rendering/render_table.cpp:
2935         (RenderTableCell::getAbsoluteRepaintRect):
2936         * khtml/rendering/render_table.h:
2937
2938 2003-12-03  David Hyatt  <hyatt@apple.com>
2939
2940         Fix for 3495748, hang in parser at ocelot.ca.  <nobr> needs to have very high priority (equal to the
2941         priority of blocks like h1-6, p, and div), so that unclosed <nobr>s will close divs and ps.
2942         
2943         Reviewed by gramps
2944
2945         * khtml/html/dtd.cpp:
2946
2947 2003-12-03  David Hyatt  <hyatt@apple.com>
2948
2949         Fix for 3475767, hang at saabnet.com.  Fix h1-h6 to be more tolerant regarding allowed child elements, to avoid
2950         deeply nested pages.
2951         
2952         Reviewed by darin
2953
2954         * khtml/html/dtd.cpp:
2955         (DOM::checkChild):
2956
2957 2003-12-03  John Sullivan  <sullivan@apple.com>
2958
2959         - fixed these two design issues after Dave and I talked to HI:
2960         <rdar://problem/3497072>: There shouldn't be a focus ring around clicked regions
2961         <rdar://problem/3499315>: Focus ring should use aqua color always
2962
2963         Reviewed by Dave.
2964
2965         * khtml/css/html4.css:
2966
2967 2003-12-03  Maciej Stachowiak  <mjs@apple.com>
2968
2969         Reviewed by Ken.
2970
2971         <rdar://problem/3395759>: results of parent.document.getElementsByTagName can't be added to string
2972         
2973         * khtml/ecma/kjs_dom.cpp:
2974         (DOMNodeList::toPrimitive): Always convert to string instead of trying to convert
2975         to number and failing, as is done for DOMNode.
2976         * khtml/ecma/kjs_dom.h: Prototype new method.
2977
2978 2003-12-02  Richard Williamson   <rjw@apple.com>
2979
2980         Return a value that is backed by RuntimeObjectImpl, instead
2981         of a DOM object for applet[0].  This is better than having
2982         the DOM object redirect to the RuntimeObjectImpl.
2983
2984         Reviewed by Chris.
2985
2986         * khtml/ecma/kjs_html.cpp:
2987         (KJS::HTMLCollection::tryGet):
2988
2989 2003-12-02  Maciej Stachowiak  <mjs@apple.com>
2990
2991         Reviewed by John.
2992
2993         <rdar://problem/3488220>: namespaces test from David Faure causes Safari to crash in DOM::DocumentImpl::createElementNS
2994         
2995         * khtml/xml/dom_docimpl.cpp:
2996         (DocumentImpl::createElementNS): Check if new element is NULL
2997         before messing with it, to avoid a crash.
2998
2999 2003-12-02  David Hyatt  <hyatt@apple.com>
3000
3001         Fix for 3497999, null check the text() of RenderTexts to avoid a crash in current().
3002         
3003         Reviewed by kocienda
3004
3005         * khtml/rendering/bidi.cpp:
3006         (khtml::BidiIterator::current):
3007
3008 2003-12-02  Maciej Stachowiak  <mjs@apple.com>
3009
3010         Reviewed by Darin.
3011
3012         Implemented a simple form of document serialization, enough to take care of:
3013
3014         <rdar://problem/3487190>: implement send of DOMDocument for XMLHttpRequest
3015
3016         * khtml/dom/dom_doc.cpp:
3017         (DOM::Document::toString):
3018         * khtml/dom/dom_doc.h:
3019         * khtml/ecma/xmlhttprequest.cpp:
3020         (KJS::XMLHttpRequest::urlMatchesDocumentDomain):
3021         (KJS::XMLHttpRequestProtoFunc::tryCall):
3022         * khtml/html/html_elementimpl.cpp:
3023         (HTMLElementImpl::toString):
3024         * khtml/html/html_elementimpl.h:
3025         * khtml/xml/dom_docimpl.cpp:
3026         (DocumentImpl::toString):
3027         (DocumentFragmentImpl::toString):
3028         (DocumentTypeImpl::copyFrom):
3029         (DocumentTypeImpl::toString):
3030         * khtml/xml/dom_docimpl.h:
3031         * khtml/xml/dom_elementimpl.cpp:
3032         (AttrImpl::toString):
3033         (ElementImpl::openTagStartToString):
3034         (ElementImpl::toString):
3035         * khtml/xml/dom_elementimpl.h:
3036         * khtml/xml/dom_nodeimpl.h:
3037         * khtml/xml/dom_textimpl.cpp:
3038         (CommentImpl::toString):
3039         (TextImpl::toString):
3040         (CDATASectionImpl::toString):
3041         * khtml/xml/dom_textimpl.h:
3042         * khtml/xml/dom_xmlimpl.cpp:
3043         (EntityImpl::toString):
3044         (EntityReferenceImpl::toString):
3045         (ProcessingInstructionImpl::setStyleSheet):
3046         (ProcessingInstructionImpl::toString):
3047         * khtml/xml/dom_xmlimpl.h:
3048
3049 2003-12-02  David Hyatt  <hyatt@apple.com>
3050
3051         Fix for 3493677, containingBlock() null because we tried to support position:relative on table rows.  Fix
3052         is to disallow this.
3053         
3054         Reviewed by kocienda
3055
3056         * khtml/css/cssstyleselector.cpp:
3057         (khtml::CSSStyleSelector::adjustRenderStyle):
3058
3059 2003-12-02  David Hyatt  <hyatt@apple.com>
3060
3061         Fix for 3493697, nil-deref in bidi code.  Need to null-check strings with no length.
3062         
3063         Reviewed by john
3064
3065         * khtml/rendering/bidi.cpp:
3066         (khtml::addRun):
3067
3068 2003-12-02  David Hyatt  <hyatt@apple.com>
3069
3070         Fix for 3495746, nil deref of containing block (frame inside frameset).
3071         
3072         Reviewed by kocienda
3073
3074         * khtml/rendering/render_box.cpp:
3075         (RenderBox::containingBlockWidth):
3076
3077 2003-12-02  Ken Kocienda  <kocienda@apple.com>
3078
3079         Reviewed by John
3080
3081         * kwq/KWQRect.h:
3082         * kwq/KWQRect.mm:
3083         (QRect::bottomRight): Added helper.
3084
3085 2003-12-02  Maciej Stachowiak  <mjs@apple.com>
3086
3087         Merged the following patch from David Faure to fix:
3088
3089         <rdar://problem/3497663>: Can't look up frames by number using windw[i] notation
3090
3091     2003-11-25  David Faure  <faure@kde.org>
3092
3093         * ecma/kjs_window.cpp: Implement hasProperty and get for frames by number in Window,
3094         to fix window[0] and parent[1] etc. (#56983)
3095
3096 2003-11-21  Maciej Stachowiak  <mjs@apple.com>
3097
3098         Reviewed by Richard.
3099
3100         <rdar://problem/3487185>: implement security checks for XMLHttpRequest
3101         
3102         * khtml/ecma/xmlhttprequest.cpp:
3103         (KJS::XMLHttpRequest::open): Refuse to start if the URL is not one
3104         this document is allowed to access.
3105         (KJS::XMLHttpRequest::slotRedirection): Stop the job if we redirect
3106         to a URL the home document is not allowed to access.
3107         * kwq/KWQResourceLoader.mm:
3108         (-[KWQResourceLoader redirectedToURL:]): emit the right signal
3109         * kwq/WebCoreResourceLoader.h: Prototype new method
3110
3111 2003-12-01  Richard Williamson   <rjw@apple.com>
3112
3113 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.
3114
3115 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.
3116
3117 Added support for getting at Java object fields.
3118
3119         Reviewed by Chris.
3120
3121         * khtml/ecma/kjs_html.cpp:
3122         (KJS::HTMLElement::tryGet):
3123         * khtml/html/html_objectimpl.cpp:
3124         (HTMLAppletElementImpl::createRenderer):
3125         (HTMLAppletElementImpl::getAppletInstance):
3126         * khtml/html/html_objectimpl.h:
3127         * khtml/rendering/render_applet.cpp:
3128         (RenderApplet::createWidgetIfNecessary):
3129         (RenderApplet::layout):
3130         * khtml/rendering/render_applet.h:
3131         (khtml::RenderApplet::renderName):
3132
3133 2003-12-01  Darin Adler  <darin@apple.com>
3134
3135         Reviewed by Dave.
3136
3137         - fixed 3496960: nil-deref in idFromNode inside elementDoesAutoComplete:
3138
3139         * kwq/WebCoreBridge.mm:
3140         (inputElementFromDOMElement): Added nil check.
3141         (formElementFromDOMElement): Added nil check.
3142
3143 2003-12-01  David Hyatt  <hyatt@apple.com>
3144
3145         Fix for 3490959, collapsed border tables don't paint backgrounds.
3146         
3147         Reviewed by darin
3148
3149         * khtml/rendering/render_table.cpp:
3150         (RenderTable::setStyle):
3151         (RenderTable::paint):
3152         (RenderTable::paintBoxDecorations):
3153         * khtml/rendering/render_table.h:
3154
3155 2003-12-01  Darin Adler  <darin@apple.com>
3156
3157         Reviewed by Dave.
3158
3159         - fixed 3493939: ordered lists with type="A" roll over to A' after X rather than after Z
3160
3161         * khtml/rendering/render_list.cpp: (toLetter): Change 24 to 26.
3162
3163 === Safari-115 ===
3164
3165 2003-11-21  Maciej Stachowiak  <mjs@apple.com>
3166
3167         Reviewed by Ken.
3168
3169         WebCore part of fix for:
3170         
3171         <rdar://problem/3487134>: Implement http request/response status and headers for XMLHttpRequest
3172
3173         * khtml/ecma/xmlhttprequest.cpp:
3174         (KJS::XMLHttpRequest::getValueProperty): Call appropriate methods for
3175         status and statusText.
3176         (KJS::XMLHttpRequest::send): Set request headers as "customHeaders"
3177         metadata property.
3178         (KJS::XMLHttpRequest::setRequestHeader): Simply append to header
3179         string.
3180         (KJS::XMLHttpRequest::getAllResponseHeaders): Return the header string
3181         except for the first line.
3182         (KJS::XMLHttpRequest::getResponseHeader): Scan the response header
3183         string for the header field. Not sure if it's worth being more
3184         efficient.
3185         (KJS::XMLHttpRequest::getStatus): Try to pull a code out
3186         of the status line.
3187         (KJS::XMLHttpRequest::getStatusText): Pull the first line
3188         off the headers (if any), otherwise return undefined.
3189         (KJS::XMLHttpRequest::slotData): The first time through, save
3190         the response headers, retrieved from "HTTP-Headers" metadata
3191         property.
3192         (KJS::XMLHttpRequestProtoFunc::tryCall): Make setRequestHeader,
3193         getResponseHeader, getAllResponseHeaders call the right thing.
3194         * khtml/ecma/xmlhttprequest.h:
3195         * kwq/KWQKJobClasses.h:
3196         * kwq/KWQKJobClasses.mm:
3197         (KIO::TransferJobPrivate::TransferJobPrivate): Added header
3198         support.
3199         (KIO::TransferJobPrivate::~TransferJobPrivate):
3200         (KIO::TransferJob::assembleResponseHeaders): Get a header string
3201         out of the response if needed.
3202         (KIO::TransferJob::queryMetaData): Special-case "HTTP-Headers".
3203         (KIO::TransferJob::emitReceivedResponse): Save response.
3204         * kwq/KWQLoader.h:
3205         * kwq/KWQLoader.mm:
3206         (-[NSDictionary _webcore_initWithHeaderString:]): Helper method to
3207         turn a string of header fields into a dictionary.
3208         (KWQServeRequest): Pass custom headers through.
3209         (KWQResponseMIMEType): Admit it's an NSURLResponse *.
3210         (KWQResponseHeaderString): Assembled status code and response
3211         header fields into response header. Cheat a little on the status
3212         line.
3213         * kwq/KWQResourceLoader.mm:
3214         (-[KWQResourceLoader receivedResponse:]): Admit it's an
3215         NSURLResponse *.
3216         * kwq/WebCoreResourceLoader.h: Ditto.
3217         * kwq/WebCoreBridge.h: Add customHeader: arguments.
3218
3219 2003-11-21  Chris Blumenberg  <cblu@apple.com>
3220
3221         Fixed: <rdar://problem/3491907>: When viewing applet, view hierarchy was an empty KWQView
3222
3223         Reviewed by rjw.
3224
3225         * WebCore.pbproj/project.pbxproj:
3226         * khtml/html/html_objectimpl.cpp: removed setupApplet because that work is done when the applet widget is created
3227         (HTMLAppletElementImpl::createRenderer): pass the PARAM args to the render object
3228         (HTMLAppletElementImpl::getAppletInstance): don't call setupApplet
3229         * khtml/rendering/render_applet.cpp:
3230         (RenderApplet::RenderApplet): store args and context, don't call setQWidget here 
3231         (RenderApplet::setStyle): call setQWidget here
3232         (RenderApplet::layout): don't parse args here, that is done in HTMLAppletElementImpl::createRenderer
3233         * khtml/rendering/render_applet.h:
3234         * kwq/KWQKJavaAppletWidget.h:
3235         (KJavaApplet::KJavaApplet): turned into a stub, this work is no longer needed
3236         (KJavaApplet::setAppletClass): ditto
3237         (KJavaApplet::setAppletName): ditto
3238         (KJavaApplet::setArchives): ditto
3239         (KJavaApplet::setBaseURL): ditto
3240         (KJavaApplet::setCodeBase): ditto
3241         (KJavaApplet::setParameter): ditto
3242         (KJavaAppletWidget::~KJavaAppletWidget): ditto
3243         (KJavaAppletWidget::applet): ditto
3244         (KJavaAppletWidget::setBaseURL): ditto
3245         (KJavaAppletWidget::setParameter): ditto
3246         (KJavaAppletWidget::showApplet): ditto 
3247         * kwq/KWQKJavaAppletWidget.mm:
3248         (KJavaAppletWidget::KJavaAppletWidget): create the java here instead of doing it later
3249
3250 2003-11-21  John Sullivan  <sullivan@apple.com>
3251
3252         - WebCore part of fix for <rdar://problem/3333744>: Safari prints page with 
3253         very, very long line very, very small
3254
3255         Reviewed by Ken.
3256
3257         * kwq/KWQKHTMLPart.h:
3258         * kwq/KWQKHTMLPart.mm:
3259         (KWQKHTMLPart::forceLayoutWithPageWidthRange):
3260         Changed method name from forceLayoutForPageWidth; now takes min and max
3261         page width values. Use max page width value to limit how wide page will
3262         get when there's a very long line.
3263         
3264         * kwq/WebCoreBridge.h:
3265         * kwq/WebCoreBridge.mm:
3266         (-[WebCoreBridge forceLayoutWithMinimumPageWidth:maximumPageWidth:adjustingViewSize:]):
3267         changed pageWidth parameter into min and max parameters; pass them along to KWQKHTMLPart.
3268
3269 2003-11-21  Darin Adler  <darin@apple.com>
3270
3271         Reviewed by Ken.
3272
3273         - fixed 3490260: allow &sup1 to be misspelled &supl (lowercase l instead of numeral 1) because WinIE does
3274
3275         * khtml/html/kentities.gperf: Added supl to the list. Maps to U+00B9, just as sup1 does.
3276         * khtml/html/kentities.c: Regenerated.
3277
3278 2003-11-20  Maciej Stachowiak  <mjs@apple.com>
3279
3280         Reviewed by Darin.
3281
3282         - fixed 3487201 - Implement abort for XMLHttpRequest async loads
3283         
3284         * khtml/ecma/xmlhttprequest.cpp:
3285         (KJS::XMLHttpRequest::abort): Kill and clear job.
3286         (KJS::XMLHttpRequest::slotData): Avoid moving to state 3 on early abort.
3287         (KJS::XMLHttpRequestProtoFunc::tryCall): Call abort when appropriate.
3288         * khtml/ecma/xmlhttprequest.h:
3289
3290 2003-11-20  John Sullivan  <sullivan@apple.com>
3291
3292         - WebCore part of <rdar://problem/3183124>: Support page-break-before/after with a value of "always"
3293
3294         Dave wrote this part and we reviewed it together.
3295
3296         * khtml/rendering/render_block.cpp:
3297         (khtml::RenderBlock::paintObject):
3298         if printing, check for CSS page break locations
3299         (khtml::RenderBlock::inRootBlockContext):
3300         new method, used to check whether we're in a context for which
3301         CSS page breaks are legal.
3302         
3303         * khtml/rendering/render_block.h:
3304         prototype for inRootBlockContext; this might be useful for
3305         other code later.
3306         
3307         * khtml/rendering/render_canvas.cpp:
3308         (RenderCanvas::setBestTruncatedAt):
3309         now takes a forcedBreak parameter which overrides others.
3310         
3311         * khtml/rendering/render_canvas.h:
3312         (khtml::RenderCanvas::setTruncatedAt):
3313         set default value for m_forcedPageBreak
3314         
3315         * kwq/WebCoreBridge.h:
3316         * kwq/WebCoreBridge.mm:
3317         (-[WebCoreBridge computePageRects:withPageHeight:]):
3318         do the real work of pagination here
3319
3320 2003-11-20  Chris Blumenberg  <cblu@apple.com>
3321
3322         Fixed: <rdar://problem/3491225>: Need UI and localized strings for <KEYGEN> support
3323
3324         Reviewed by john.
3325
3326         * WebCore-combined.exp:
3327         * WebCore.exp:
3328         * WebCore.pbproj/project.pbxproj:
3329         * kwq/KWQKSSLKeyGen.h:
3330         * kwq/KWQKSSLKeyGen.mm: Added.
3331         (KSSLKeyGen::supportedKeySizes): implemented, calls [WebCoreLocalizedStringFactory keyGenerationMenuItemTitles]
3332         * kwq/WebCoreLocalizedStringFactory.h: Added.
3333         * kwq/WebCoreLocalizedStringFactory.m: Added.
3334         (+[WebCoreLocalizedStringFactory sharedFactory]): new
3335         (-[WebCoreLocalizedStringFactory init]): new
3336         (-[WebCoreLocalizedStringFactory keyGenerationMenuItemTitles]): new
3337
3338 2003-11-19  Maciej Stachowiak  <mjs@apple.com>
3339
3340         Reviewed by Ken.
3341
3342         - fixed 3490086 - support http post for XMLHttpRequest
3343         
3344         * kwq/KWQKJobClasses.h:
3345         * kwq/KWQKJobClasses.mm:
3346         (KIO::TransferJobPrivate::TransferJobPrivate):
3347         (KIO::TransferJob::TransferJob):
3348
3349 2003-11-20  Richard Williamson   <rjw@apple.com>
3350
3351         Cleaned up synchronous applet lookup and initialization.
3352         We need to further cleanup applet instantiation.  It doesn't
3353         need to be lazy with my modified Java Plugin.
3354
3355         Reviewed by Chris.
3356
3357         * khtml/ecma/kjs_html.cpp:
3358         (KJS::HTMLElement::tryGet):
3359         * khtml/html/html_objectimpl.cpp:
3360         (HTMLAppletElementImpl::setupApplet):
3361         (HTMLAppletElementImpl::getAppletInstance):
3362         * khtml/html/html_objectimpl.h:
3363         * kwq/KWQKHTMLPart.mm:
3364         (KWQKHTMLPart::getAppletInstanceForView):
3365         * kwq/KWQKJavaAppletWidget.h:
3366         * kwq/KWQKJavaAppletWidget.mm:
3367         (KJavaAppletWidget::showApplet):
3368
3369 2003-11-20  Ken Kocienda  <kocienda@apple.com>
3370
3371         Reviewed by David
3372
3373         Fix for this bug:
3374
3375         <rdar://problem/3487421>: crash/exception when tabbing to a link without text
3376
3377         * khtml/html/html_inlineimpl.cpp:
3378         (HTMLAnchorElementImpl::isFocusable): A link is also not focusable 
3379         if it has zero width or height, if it has no children, or if it is 
3380         is not a continuation.
3381         * kwq/KWQPainter.mm:
3382         (QPainter::drawFocusRing): Put in a guard against trying to draw a focus
3383         ring with no control points. Log this as an error.
3384
3385 2003-11-19  David Hyatt  <hyatt@apple.com>
3386
3387         Fix for 3486963, crash because generated content was referencing a deleted object.  Fix is to update the
3388         variable to a sane value after deleting old generated content.
3389         
3390         Reviewed by darin
3391
3392         * khtml/rendering/render_container.cpp:
3393         (RenderContainer::updatePseudoChild):
3394
3395 2003-11-19  Maciej Stachowiak  <mjs@apple.com>
3396
3397         Reviewed by John.
3398
3399         - fixed 3486998 - Implement asynchronous http loading for XMLHttpRequest
3400         
3401         * khtml/ecma/xmlhttprequest.cpp:
3402         (KJS::XMLHttpRequestQObject::XMLHttpRequestQObject): New QObject to use to
3403         connect to signals.
3404         (KJS::XMLHttpRequestQObject::slotData): Call XMLHttpRequest.
3405         (KJS::XMLHttpRequestQObject::slotFinished): Ditto.
3406         (KJS::XMLHttpRequestQObject::slotRedirection): Ditto.
3407         (KJS::XMLHttpRequest::getValueProperty): Implemented, onrequeststatechange,
3408         readyState and responseText.
3409         (KJS::XMLHttpRequest::putValue): Implemented onrequeststatechange.
3410         (KJS::XMLHttpRequest::XMLHttpRequest): Initialize new fields.
3411         (KJS::XMLHttpRequest::~XMLHttpRequest): Delete decoder.
3412         (KJS::XMLHttpRequest::changeState): Update state, and send event if needed.
3413         (KJS::XMLHttpRequest::open): Save the parameters.
3414         (KJS::XMLHttpRequest::send): Fire up a post or get job.
3415         (KJS::XMLHttpRequest::slotFinished): go to final state.
3416         (KJS::XMLHttpRequest::slotRedirection): Just stub for now.
3417         (KJS::XMLHttpRequest::slotData): Update state; decode & save data.
3418         (KJS::XMLHttpRequestProtoFunc::tryCall): Implemented open and send.
3419         * khtml/ecma/xmlhttprequest.h: Prototyped new stuff.
3420         * khtml/xml/dom2_eventsimpl.cpp:
3421         (EventImpl::typeToId): Added "readystatechange" event.
3422         (EventImpl::idToType): Ditto.
3423         * khtml/xml/dom2_eventsimpl.h: Ditto.
3424         * kwq/KWQLoader.h:
3425         * kwq/KWQLoader.mm:
3426         (KWQServeRequest): New variant that doesn't need a Request.
3427         * kwq/KWQSlot.mm:
3428         (KWQSlot::KWQSlot): Handle XMLHttpRequestQObject's slots.
3429         (KWQSlot::call): Ditto.
3430
3431 2003-11-19  Richard Williamson   <rjw@apple.com>
3432
3433         More LiveConnect stuff.  With that patch we make the applet
3434         visible to JavaScript in an Bindings::Instance.  Next step
3435         it to flush out implementation of RuntimeObjectImp and
3436         RuntimeFunctionImp.
3437
3438         Reviewed by Ken.
3439
3440         * khtml/html/html_objectimpl.cpp:
3441         (HTMLAppletElementImpl::HTMLAppletElementImpl):
3442         (HTMLAppletElementImpl::~HTMLAppletElementImpl):
3443         (HTMLAppletElementImpl::getAppletInstance):
3444         * khtml/html/html_objectimpl.h:
3445         * kwq/KWQKHTMLPart.h:
3446         * kwq/KWQKHTMLPart.mm:
3447         (KWQKHTMLPart::getAppletInstanceForView):
3448         * kwq/WebCoreBridge.h:
3449
3450 2003-11-19  David Hyatt  <hyatt@apple.com>
3451
3452         Fix for 3488888, about:blank in iframes doesn't repaint properly.  Fix for 3485478, refreshing a remote
3453         page often causes a white flash.  Fix for 3488827, XML/XHTML documents don't fire load events on bodies/framesets.
3454         
3455         Reviewed by darin
3456         
3457         * khtml/html/html_documentimpl.cpp:
3458         (HTMLDocumentImpl::HTMLDocumentImpl):
3459         * khtml/html/html_documentimpl.h:
3460         * khtml/rendering/render_canvas.cpp:
3461         (RenderCanvas::RenderCanvas):
3462         (RenderCanvas::layout):
3463         * khtml/xml/dom_docimpl.cpp:
3464         (DocumentImpl::DocumentImpl):
3465         (DocumentImpl::body):
3466         (DocumentImpl::close):
3467         * khtml/xml/dom_docimpl.h:
3468
3469 2003-11-18  Maciej Stachowiak  <mjs@apple.com>
3470
3471         Reviewed by Darin.
3472
3473         - fixed 3488883 - KIO::TransferJob needs to really use signals instead of calling loader directly
3474         
3475         * khtml/khtml_part.cpp:
3476         (KHTMLPart::openURL):
3477         * khtml/misc/loader.cpp:
3478         (Loader::servePendingRequests):