f83ecc65983b448b3306e8645bd1ccbfd1f26e26
[WebKit-https.git] / WebCore / ChangeLog-2005-08-23
1 2004-02-11  David Hyatt  <hyatt@apple.com>
2
3         Remove my bogus refs of the elementSheet.  Fixes 3554213 and 3555467.
4         
5         * khtml/html/html_baseimpl.cpp:
6         (HTMLBodyElementImpl::createLinkDecl):
7         * khtml/html/html_tableimpl.cpp:
8         (HTMLTableElementImpl::additionalAttributeStyleDecl):
9         (HTMLTableElementImpl::getSharedCellDecl):
10
11 2004-02-11  David Hyatt  <hyatt@apple.com>
12
13         Fix for 3556037, regression where display:block generated content didn't work.
14         
15         Reviewed by kocienda
16
17         * khtml/rendering/render_block.cpp:
18         (khtml::RenderBlock::setStyle):
19         (khtml::RenderBlock::addChildToFlow):
20         (khtml::RenderBlock::removeChild):
21         (khtml::RenderBlock::renderName):
22         * khtml/rendering/render_container.cpp:
23         (RenderContainer::insertChildNode):
24         (RenderContainer::removeLeftoverAnonymousBoxes):
25         * khtml/rendering/render_inline.cpp:
26         (RenderInline::splitFlow):
27         (RenderInline::renderName):
28         * khtml/rendering/render_list.cpp:
29         (RenderListItem::updateMarkerLocation):
30         * khtml/rendering/render_object.h:
31         (khtml::RenderObject::isAnonymousBlock):
32         * layout-tests/css1/pseudo/firstletter-expected.txt:
33         * layout-tests/css1/pseudo/multiple_pseudo_elements-expected.txt:
34         * layout-tests/fast/css-generated-content/002-expected.txt:
35         * layout-tests/fast/css-generated-content/004-expected.txt:
36         * layout-tests/fast/css-generated-content/005-expected.txt:
37         * layout-tests/fast/css-generated-content/006-expected.txt:
38         * layout-tests/fast/css-generated-content/007-expected.txt:
39         * layout-tests/fast/css-generated-content/009-expected.txt:
40         * layout-tests/fast/css-generated-content/010-expected.txt:
41         * layout-tests/fast/selectors/039-expected.txt:
42         * layout-tests/fast/selectors/039b-expected.txt:
43         * layout-tests/fast/selectors/041-expected.txt:
44         * layout-tests/fast/selectors/042-expected.txt:
45         * layout-tests/fast/selectors/166a-expected.txt:
46         * layout-tests/fast/selectors/168-expected.txt:
47         * layout-tests/fast/selectors/168a-expected.txt:
48         * layout-tests/fast/selectors/169-expected.txt:
49         * layout-tests/fast/selectors/169a-expected.txt:
50         * layout-tests/fast/text/firstline/002-expected.txt:
51         * layout-tests/fast/text/firstline/003-expected.txt:
52
53 2004-02-11  Darin Adler   <darin@apple.com>
54
55         Reviewed by Richard.
56
57         * kwq/KWQTextCodec.mm:
58         (KWQTextDecoder::convertLatin1):
59         Fix off by one error.
60
61
62 2004-02-11  David Hyatt  <hyatt@apple.com>
63
64         Convert paint methods over to use a new PaintInfo struct.  Eliminate the paintObject method.
65         
66         Reviewed by kocienda
67
68         * khtml/rendering/render_block.cpp:
69         (khtml::RenderBlock::paint):
70         (khtml::RenderBlock::paintObject):
71         (khtml::RenderBlock::paintFloats):
72         * khtml/rendering/render_block.h:
73         * khtml/rendering/render_box.cpp:
74         (RenderBox::paint):
75         (RenderBox::paintRootBoxDecorations):
76         (RenderBox::paintBoxDecorations):
77         * khtml/rendering/render_box.h:
78         * khtml/rendering/render_br.h:
79         (khtml::RenderBR::paint):
80         * khtml/rendering/render_canvas.cpp:
81         (RenderCanvas::paint):
82         (RenderCanvas::paintBoxDecorations):
83         * khtml/rendering/render_canvas.h:
84         * khtml/rendering/render_flow.cpp:
85         (RenderFlow::paintLineBoxBackgroundBorder):
86         (RenderFlow::paintLineBoxDecorations):
87         * khtml/rendering/render_flow.h:
88         * khtml/rendering/render_form.cpp:
89         (RenderFieldset::paintBoxDecorations):
90         * khtml/rendering/render_form.h:
91         * khtml/rendering/render_image.cpp:
92         (RenderImage::paint):
93         (RenderImage::updateFromElement):
94         * khtml/rendering/render_image.h:
95         * khtml/rendering/render_inline.cpp:
96         (RenderInline::paint):
97         * khtml/rendering/render_inline.h:
98         * khtml/rendering/render_layer.cpp:
99         (RenderLayer::paintLayer):
100         * khtml/rendering/render_line.cpp:
101         (InlineFlowBox::paintBackgroundAndBorder):
102         (InlineFlowBox::paintDecorations):
103         * khtml/rendering/render_line.h:
104         (khtml::InlineRunBox::paintBackgroundAndBorder):
105         (khtml::InlineRunBox::paintDecorations):
106         * khtml/rendering/render_list.cpp:
107         (RenderListItem::paint):
108         (RenderListMarker::paint):
109         * khtml/rendering/render_list.h:
110         * khtml/rendering/render_object.cpp:
111         (RenderObject::paint):
112         * khtml/rendering/render_object.h:
113         (khtml::RenderObject::PaintInfo::PaintInfo):
114         (khtml::RenderObject::paintBoxDecorations):
115         * khtml/rendering/render_replaced.cpp:
116         (RenderReplaced::shouldPaint):
117         (RenderWidget::paint):
118         * khtml/rendering/render_replaced.h:
119         * khtml/rendering/render_table.cpp:
120         (RenderTable::paint):
121         (RenderTable::paintBoxDecorations):
122         (RenderTableSection::paint):
123         (RenderTableCell::paint):
124         (RenderTableCell::paintBoxDecorations):
125         * khtml/rendering/render_table.h:
126         * khtml/rendering/render_text.cpp:
127         (RenderText::paint):
128         * khtml/rendering/render_text.h:
129
130 2004-02-11  Ken Kocienda  <kocienda@apple.com>
131
132         Reviewed by me
133
134                 Removed include file I was considering checking, but 
135                 decided against. Of course, this dangling include
136                 broke the build.
137                 
138         * kwq/KWQKHTMLPart.mm
139         * kwq/WebCoreBridge.mm
140
141 2004-02-10  Ken Kocienda  <kocienda@apple.com>
142
143         Reviewed by Hyatt
144         
145         Several big changes.
146         
147         EditSteps are now all EditCommands.
148         Smart pointer for Shared classes added to shared.h.
149                 Some events, like text input events, are now coalesced.
150                 "Undo typing" now implemented, even though the name is not in the menu yet.
151                 Integer id's added to EditCommand and its subclasses.
152                 A bunch of cleanup in the EditCommand classes.
153
154         * khtml/editing/htmlediting.cpp:
155         (EditCommand::EditCommand):
156         (EditCommand::~EditCommand):
157         (EditCommand::commandID):
158         (EditCommand::reapply):
159         (EditCommand::beginApply):
160         (EditCommand::endApply):
161         (EditCommand::beginUnapply):
162         (EditCommand::endUnapply):
163         (EditCommand::beginReapply):
164         (EditCommand::endReapply):
165         (EditCommand::currentSelection):
166         (EditCommand::coalesce):
167         (EditCommand::groupForUndo):
168         (EditCommand::groupForRedo):
169         (EditCommand::moveToStartingSelection):
170         (EditCommand::moveToEndingSelection):
171         (EditCommand::name):
172         (CompositeEditCommand::CompositeEditCommand):
173         (CompositeEditCommand::~CompositeEditCommand):
174         (CompositeEditCommand::unapply):
175         (CompositeEditCommand::reapply):
176         (CompositeEditCommand::applyCommand):
177         (CompositeEditCommand::insertNodeBefore):
178         (CompositeEditCommand::insertNodeAfter):
179         (CompositeEditCommand::appendNode):
180         (CompositeEditCommand::removeNode):
181         (CompositeEditCommand::splitTextNode):
182         (CompositeEditCommand::joinTextNodes):
183         (CompositeEditCommand::insertText):
184         (CompositeEditCommand::deleteText):
185         (CompositeEditCommand::moveSelectionTo):
186         (CompositeEditCommand::deleteSelection):
187         (InsertNodeBeforeCommand::InsertNodeBeforeCommand):
188         (InsertNodeBeforeCommand::~InsertNodeBeforeCommand):
189         (InsertNodeBeforeCommand::apply):
190         (InsertNodeBeforeCommand::unapply):
191         (AppendNodeCommand::AppendNodeCommand):
192         (AppendNodeCommand::~AppendNodeCommand):
193         (AppendNodeCommand::apply):
194         (AppendNodeCommand::unapply):
195         (RemoveNodeCommand::RemoveNodeCommand):
196         (RemoveNodeCommand::~RemoveNodeCommand):
197         (RemoveNodeCommand::apply):
198         (RemoveNodeCommand::unapply):
199         (ModifyTextNodeCommand::ModifyTextNodeCommand):
200         (ModifyTextNodeCommand::~ModifyTextNodeCommand):
201         (ModifyTextNodeCommand::splitTextNode):
202         (ModifyTextNodeCommand::joinTextNodes):
203         (SplitTextNodeCommand::SplitTextNodeCommand):
204         (SplitTextNodeCommand::~SplitTextNodeCommand):
205         (SplitTextNodeCommand::apply):
206         (SplitTextNodeCommand::unapply):
207         (JoinTextNodesCommand::JoinTextNodesCommand):
208         (JoinTextNodesCommand::~JoinTextNodesCommand):
209         (JoinTextNodesCommand::apply):
210         (JoinTextNodesCommand::unapply):
211         (InsertTextCommand::InsertTextCommand):
212         (InsertTextCommand::~InsertTextCommand):
213         (InsertTextCommand::apply):
214         (InsertTextCommand::unapply):
215         (DeleteTextCommand::DeleteTextCommand):
216         (DeleteTextCommand::~DeleteTextCommand):
217         (DeleteTextCommand::apply):
218         (DeleteTextCommand::unapply):
219         (MoveSelectionToCommand::MoveSelectionToCommand):
220         (MoveSelectionToCommand::~MoveSelectionToCommand):
221         (MoveSelectionToCommand::commandID):
222         (MoveSelectionToCommand::apply):
223         (MoveSelectionToCommand::unapply):
224         (DeleteSelectionCommand::DeleteSelectionCommand):
225         (DeleteSelectionCommand::~DeleteSelectionCommand):
226         (DeleteSelectionCommand::apply):
227         (InputTextCommand::InputTextCommand):
228         (InputTextCommand::~InputTextCommand):
229         (InputTextCommand::commandID):
230         (InputTextCommand::isLineBreak):
231         (InputTextCommand::isSpace):
232         (InputTextCommand::apply):
233         (InputTextCommand::coalesce):
234         (InputTextCommand::groupForUndo):
235         (InputTextCommand::groupForRedo):
236         (InputTextCommand::execute):
237         (DeleteKeyCommand::DeleteKeyCommand):
238         (DeleteKeyCommand::~DeleteKeyCommand):
239         (DeleteKeyCommand::commandID):
240         (DeleteKeyCommand::apply):
241         (DeleteKeyCommand::groupForUndo):
242         (DeleteKeyCommand::groupForRedo):
243         (PasteHTMLCommand::PasteHTMLCommand):
244         (PasteHTMLCommand::~PasteHTMLCommand):
245         (PasteHTMLCommand::apply):
246         * khtml/editing/htmlediting.h:
247         (khtml::):
248         (khtml::EditCommand::):
249         (khtml::EditCommand::document):
250         (khtml::EditCommand::state):
251         (khtml::EditCommand::setState):
252         (khtml::SplitTextNodeCommand::joinState):
253         (khtml::SplitTextNodeCommand::splitState):
254         (khtml::JoinTextNodesCommand::joinState):
255         (khtml::JoinTextNodesCommand::splitState):
256         * khtml/khtml_part.cpp:
257         (KHTMLPart::openURL):
258         (KHTMLPart::deleteSelection):
259         (KHTMLPart::applyCommand):
260         (KHTMLPart::undoEditing):
261         (KHTMLPart::redoEditing):
262         (KHTMLPart::pasteHTMLString):
263         * khtml/khtml_part.h:
264         * khtml/khtmlpart_p.h:
265         (KHTMLPartPrivate::~KHTMLPartPrivate):
266         * khtml/misc/shared.h:
267         (khtml::SharedPtr::SharedPtr):
268         (khtml::SharedPtr::~SharedPtr):
269         (khtml::SharedPtr::isEmpty):
270         (khtml::SharedPtr::get):
271         (khtml::SharedPtr::operator*):
272         (khtml::SharedPtr::operator->):
273         (khtml::SharedPtr::operator!):
274         (khtml::SharedPtr::operator==):
275         (khtml::::operator):
276         (khtml::operator!=):
277         * khtml/xml/dom_elementimpl.cpp:
278         (ElementImpl::defaultEventHandler):
279         * kwq/KWQKHTMLPart.h:
280         * kwq/KWQKHTMLPart.mm:
281         (KWQKHTMLPart::registerCommandForUndo):
282         (KWQKHTMLPart::registerCommandForRedo):
283         (KWQKHTMLPart::clearUndoRedoOperations):
284         * kwq/WebCoreBridge.h:
285         * kwq/WebCoreBridge.mm:
286         (-[WebCoreBridge undoEditing:]):
287         (-[WebCoreBridge redoEditing:]):
288
289 2004-02-10  David Hyatt  <hyatt@apple.com>
290
291         Eliminate the double-completion and double-parsing of KURLs for every single image request.
292         
293         * khtml/misc/loader.cpp:
294         (DocLoader::requestImage):
295         (Cache::requestImage):
296         * khtml/misc/loader.h:
297
298 2004-02-10  David Hyatt  <hyatt@apple.com>
299
300         Merged patch that fixes clear:both for floats.  This patch comes from the KHTML tree.
301         
302         * khtml/rendering/render_block.cpp:
303         (khtml::RenderBlock::positionNewFloats):
304         * layout-tests/fast/block/float/029-expected.txt: Added.
305         * layout-tests/fast/block/float/029.html: Added.
306
307 2004-02-10  David Hyatt  <hyatt@apple.com>
308
309         Fix crasher in list code caused by incorrect style deallocation.  Regression from the
310         arena changes for RenderStyles.
311         
312         Reviewed by darin
313
314         * khtml/rendering/render_object.cpp:
315         (RenderObject::remove):
316         (RenderObject::arenaDelete):
317
318 2004-02-10  David Hyatt  <hyatt@apple.com>
319
320         Fix for osnews.com's wacky layout problem.  Put back in the check for isEmpty.
321         
322         Reviewed by darin
323
324         * khtml/html/htmltokenizer.cpp:
325         (khtml::HTMLTokenizer::scriptHandler):
326
327 2004-02-10  David Hyatt  <hyatt@apple.com>
328
329         Fix for the bad background color on abcnews.com.  Make cloning optionally drop the style declarations.
330
331         * khtml/html/html_elementimpl.cpp:
332         (HTMLAttributeImpl::clone):
333         * khtml/html/html_elementimpl.h:
334         * khtml/html/htmlparser.cpp:
335         (KHTMLParser::insertNode):
336         * khtml/xml/dom_elementimpl.cpp:
337         (AttributeImpl::clone):
338         * khtml/xml/dom_elementimpl.h:
339
340 2004-02-10  Chris Blumenberg  <cblu@apple.com>
341
342         Fixed: <rdar://problem/3552545>: Cut, Paste and Delete must support Undo and Redo
343
344         Reviewed by kocienda.
345
346         * khtml/editing/htmlediting.cpp:
347         (ModifyTextNodeStep::splitTextNode): ken's fix that fixes a problem with unapply
348         (ModifyTextNodeStep::joinTextNodes): my fix that fixes a problem with unapply
349         (PasteHTMLCommand::PasteHTMLCommand): new
350         (PasteHTMLCommand::apply): moved from dom_docimpl.cpp and improved
351         * khtml/editing/htmlediting.h:
352         (khtml::PasteHTMLCommand::~PasteHTMLCommand):
353         * khtml/khtml_part.cpp:
354         (KHTMLPart::deleteSelection): new, create and applies a DeleteTextCommand
355         (KHTMLPart::pasteHTMLString): new, create and applies a PasteHTMLCommand
356         * khtml/khtml_part.h:
357         * khtml/xml/dom_docimpl.cpp: moved paste code to htmlediting.cpp
358         * khtml/xml/dom_docimpl.h:
359         * kwq/WebCoreBridge.mm:
360         (-[WebCoreBridge pasteHTMLString:]): call pasteHTMLString on the part instead of the bridge
361         (-[WebCoreBridge deleteSelection]): call deleteSelection on the part instead of the bridge
362
363 2004-02-10  David Hyatt  <hyatt@apple.com>
364
365         Fix crash on abcnews.com by adding isEmpty checks before dereferencing.
366         
367         * khtml/html/htmltokenizer.cpp:
368         (khtml::HTMLTokenizer::parseTag):
369
370 2004-02-10  David Hyatt  <hyatt@apple.com>
371
372         Improve attribute parsing of mapped attributes (that map to CSS properties) so that they can pull the
373         style declarations from a global cache.
374
375         Made RenderStyles be arena allocated as well.
376         
377         Reviewed by darin
378
379         * khtml/css/css_valueimpl.cpp:
380         (CSSImageValueImpl::CSSImageValueImpl):
381         (CSSImageValueImpl::image):
382         * khtml/css/css_valueimpl.h:
383         * khtml/css/cssstyleselector.cpp:
384         (khtml::CSSStyleSelector::initForStyleResolve):
385         (khtml::CSSStyleSelector::styleForElement):
386         (khtml::CSSStyleSelector::pseudoStyleForElement):
387         (khtml::CSSStyleSelector::applyProperty):
388         * khtml/css/cssstyleselector.h:
389         * khtml/css/html4.css:
390         * khtml/css/quirks.css:
391         * khtml/dom/dom_element.cpp:
392         (Element::style):
393         * khtml/dom/html_element.cpp:
394         * khtml/dom/html_element.h:
395         * khtml/html/html_baseimpl.cpp:
396         (HTMLBodyElementImpl::HTMLBodyElementImpl):
397         (HTMLBodyElementImpl::mapToEntry):
398         (HTMLBodyElementImpl::parseHTMLAttribute):
399         (HTMLBodyElementImpl::insertedIntoDocument):
400         (HTMLFrameElementImpl::parseHTMLAttribute):
401         (HTMLFrameSetElementImpl::parseHTMLAttribute):
402         (HTMLIFrameElementImpl::mapToEntry):
403         (HTMLIFrameElementImpl::parseHTMLAttribute):
404         * khtml/html/html_baseimpl.h:
405         * khtml/html/html_blockimpl.cpp:
406         (HTMLDivElementImpl::mapToEntry):
407         (HTMLDivElementImpl::parseHTMLAttribute):
408         (HTMLHRElementImpl::mapToEntry):
409         (HTMLHRElementImpl::parseHTMLAttribute):
410         (HTMLParagraphElementImpl::mapToEntry):
411         (HTMLParagraphElementImpl::parseHTMLAttribute):
412         (HTMLMarqueeElementImpl::mapToEntry):
413         (HTMLMarqueeElementImpl::parseHTMLAttribute):
414         (HTMLLayerElementImpl::HTMLLayerElementImpl):
415         (HTMLLayerElementImpl::id):
416         * khtml/html/html_blockimpl.h:
417         * khtml/html/html_documentimpl.cpp:
418         (HTMLDocumentImpl::determineParseMode):
419         * khtml/html/html_documentimpl.h:
420         * khtml/html/html_elementimpl.cpp:
421         (CSSMappedAttributeDeclarationImpl::~CSSMappedAttributeDeclarationImpl):
422         (HTMLElementImpl::getMappedAttributeDecl):
423         (HTMLElementImpl::setMappedAttributeDecl):
424         (HTMLElementImpl::removeMappedAttributeDecl):
425         (HTMLAttributeImpl::~HTMLAttributeImpl):
426         (HTMLAttributeImpl::clone):
427         (m_mappedAttributeCount):
428         (HTMLNamedAttrMapImpl::clearAttributes):
429         (HTMLElementImpl::HTMLElementImpl):
430         (HTMLElementImpl::~HTMLElementImpl):
431         (HTMLElementImpl::createAttribute):
432         (HTMLElementImpl::createInlineStyleDecl):
433         (HTMLElementImpl::attributeChanged):
434         (HTMLElementImpl::mapToEntry):
435         (HTMLElementImpl::parseHTMLAttribute):
436         (HTMLElementImpl::additionalAttributeStyleDecl):
437         (isHexDigit):
438         (toHex):
439         (HTMLElementImpl::addCSSProperty):
440         (HTMLElementImpl::addCSSStringProperty):
441         (HTMLElementImpl::addCSSImageProperty):
442         (HTMLElementImpl::addCSSLength):
443         (HTMLElementImpl::addHTMLColor):
444         (HTMLElementImpl::createMappedDecl):
445         (HTMLElementImpl::addHTMLAlignment):
446         (HTMLElementImpl::setContentEditable):
447         * khtml/html/html_elementimpl.h:
448         (DOM::):
449         (DOM::CSSMappedAttributeDeclarationImpl::CSSMappedAttributeDeclarationImpl):
450         (DOM::CSSMappedAttributeDeclarationImpl::setMappedState):
451         (DOM::HTMLAttributeImpl::HTMLAttributeImpl):
452         (DOM::HTMLAttributeImpl::decl):
453         (DOM::HTMLAttributeImpl::setDecl):
454         (DOM::HTMLNamedAttrMapImpl::hasMappedAttributes):
455         (DOM::HTMLNamedAttrMapImpl::declRemoved):
456         (DOM::HTMLNamedAttrMapImpl::declAdded):
457         (DOM::HTMLNamedAttrMapImpl::attributeItem):
458         (DOM::HTMLElementImpl::hasMappedAttributes):
459         (DOM::HTMLElementImpl::htmlAttributes):
460         (DOM::HTMLElementImpl::inlineStyleDecl):
461         * khtml/html/html_formimpl.cpp:
462         (HTMLFormElementImpl::parseHTMLAttribute):
463         (HTMLGenericFormElementImpl::parseHTMLAttribute):
464         (HTMLButtonElementImpl::parseHTMLAttribute):
465         (HTMLInputElementImpl::setType):
466         (HTMLInputElementImpl::mapToEntry):
467         (HTMLInputElementImpl::parseHTMLAttribute):
468         (HTMLInputElementImpl::attach):
469         (HTMLLabelElementImpl::parseHTMLAttribute):
470         (HTMLSelectElementImpl::parseHTMLAttribute):
471         (HTMLKeygenElementImpl::parseHTMLAttribute):
472         (HTMLOptGroupElementImpl::parseHTMLAttribute):
473         (HTMLOptionElementImpl::parseHTMLAttribute):
474         (HTMLTextAreaElementImpl::parseHTMLAttribute):
475         (HTMLIsIndexElementImpl::parseHTMLAttribute):
476         * khtml/html/html_formimpl.h:
477         * khtml/html/html_headimpl.cpp:
478         (HTMLBaseElementImpl::parseHTMLAttribute):
479         (HTMLLinkElementImpl::parseHTMLAttribute):
480         (HTMLMetaElementImpl::parseHTMLAttribute):
481         (HTMLStyleElementImpl::parseHTMLAttribute):
482         * khtml/html/html_headimpl.h:
483         * khtml/html/html_imageimpl.cpp:
484         (HTMLImageElementImpl::mapToEntry):
485         (HTMLImageElementImpl::parseHTMLAttribute):
486         (HTMLMapElementImpl::parseHTMLAttribute):
487         (HTMLAreaElementImpl::parseHTMLAttribute):
488         * khtml/html/html_imageimpl.h:
489         * khtml/html/html_inlineimpl.cpp:
490         (HTMLAnchorElementImpl::parseHTMLAttribute):
491         (HTMLBRElementImpl::mapToEntry):
492         (HTMLBRElementImpl::parseHTMLAttribute):
493         (HTMLFontElementImpl::mapToEntry):
494         (HTMLFontElementImpl::parseHTMLAttribute):
495         * khtml/html/html_inlineimpl.h:
496         * khtml/html/html_listimpl.cpp:
497         (HTMLUListElementImpl::mapToEntry):
498         (HTMLUListElementImpl::parseHTMLAttribute):
499         (HTMLOListElementImpl::mapToEntry):
500         (HTMLOListElementImpl::parseHTMLAttribute):
501         (HTMLLIElementImpl::mapToEntry):
502         (HTMLLIElementImpl::parseHTMLAttribute):
503         * khtml/html/html_listimpl.h:
504         * khtml/html/html_objectimpl.cpp:
505         (HTMLAppletElementImpl::mapToEntry):
506         (HTMLAppletElementImpl::parseHTMLAttribute):
507         (HTMLEmbedElementImpl::HTMLEmbedElementImpl):
508         (HTMLEmbedElementImpl::mapToEntry):
509         (HTMLEmbedElementImpl::parseHTMLAttribute):
510         (HTMLEmbedElementImpl::attach):
511         (HTMLObjectElementImpl::mapToEntry):
512         (HTMLObjectElementImpl::parseHTMLAttribute):
513         (HTMLParamElementImpl::parseHTMLAttribute):
514         * khtml/html/html_objectimpl.h:
515         * khtml/html/html_tableimpl.cpp:
516         (HTMLTableElementImpl::HTMLTableElementImpl):
517         (HTMLTableElementImpl::~HTMLTableElementImpl):
518         (HTMLTableElementImpl::mapToEntry):
519         (HTMLTableElementImpl::parseHTMLAttribute):
520         (HTMLTableElementImpl::additionalAttributeStyleDecl):
521         (HTMLTableElementImpl::getSharedCellDecl):
522         (HTMLTableElementImpl::attach):
523         (HTMLTablePartElementImpl::mapToEntry):
524         (HTMLTablePartElementImpl::parseHTMLAttribute):
525         (HTMLTableCellElementImpl::mapToEntry):
526         (HTMLTableCellElementImpl::parseHTMLAttribute):
527         (HTMLTableCellElementImpl::additionalAttributeStyleDecl):
528         (HTMLTableCellElementImpl::attach):
529         (HTMLTableColElementImpl::mapToEntry):
530         (HTMLTableColElementImpl::parseHTMLAttribute):
531         (HTMLTableCaptionElementImpl::mapToEntry):
532         (HTMLTableCaptionElementImpl::parseHTMLAttribute):
533         * khtml/html/html_tableimpl.h:
534         * khtml/html/htmlparser.cpp:
535         (KHTMLParser::insertNode):
536         (KHTMLParser::getElement):
537         * khtml/html/htmltokenizer.h:
538         (khtml::Token::addAttribute):
539         * khtml/misc/htmlattrs.c:
540         (hash_attr):
541         (findAttr):
542         * khtml/misc/htmlattrs.h:
543         * khtml/misc/htmlattrs.in:
544         * khtml/rendering/render_block.cpp:
545         (khtml::RenderBlock::setStyle):
546         (khtml::RenderBlock::updateFirstLetter):
547         * khtml/rendering/render_container.cpp:
548         (RenderContainer::addChild):
549         (RenderContainer::updatePseudoChild):
550         * khtml/rendering/render_frames.cpp:
551         (RenderPartObject::updateWidget):
552         * khtml/rendering/render_inline.cpp:
553         (RenderInline::addChildToFlow):
554         * khtml/rendering/render_list.cpp:
555         (RenderListItem::setStyle):
556         * khtml/rendering/render_object.cpp:
557         (RenderObject::~RenderObject):
558         (RenderObject::createAnonymousBlock):
559         (RenderObject::setStyle):
560         (RenderObject::remove):
561         * khtml/rendering/render_style.cpp:
562         (throw):
563         (RenderStyle::operator delete):
564         (RenderStyle::arenaDelete):
565         (RenderStyle::RenderStyle):
566         (RenderStyle::~RenderStyle):
567         (RenderStyle::addPseudoStyle):
568         * khtml/rendering/render_style.h:
569         (khtml::RenderStyle::ref):
570         (khtml::RenderStyle::deref):
571         (khtml::RenderStyle::hasOneRef):
572         (khtml::RenderStyle::refCount):
573         * khtml/rendering/render_table.cpp:
574         (RenderTable::addChild):
575         (RenderTableSection::addChild):
576         (RenderTableRow::addChild):
577         * khtml/xml/dom_docimpl.cpp:
578         (DocumentImpl::DocumentImpl):
579         (DocumentImpl::createAttribute):
580         (DocumentImpl::recalcStyle):
581         * khtml/xml/dom_docimpl.h:
582         * khtml/xml/dom_elementimpl.cpp:
583         (AttributeImpl::clone):
584         (AttrImpl::setValue):
585         (AttrImpl::cloneNode):
586         (ElementImpl::setAttribute):
587         (ElementImpl::createAttribute):
588         (ElementImpl::setAttributeMap):
589         (ElementImpl::recalcStyle):
590         (NamedAttrMapImpl::~NamedAttrMapImpl):
591         (NamedAttrMapImpl::operator=):
592         (NamedAttrMapImpl::addAttribute):
593         (NamedAttrMapImpl::removeAttribute):
594         * khtml/xml/dom_elementimpl.h:
595         (DOM::AttributeImpl::~AttributeImpl):
596         (DOM::ElementImpl::attributeChanged):
597         (DOM::NamedAttrMapImpl::length):
598         * khtml/xml/dom_nodeimpl.cpp:
599
600 2004-02-09  Darin Adler  <darin@apple.com>
601
602         Reviewed by Dave.
603
604         * khtml/html/html_formimpl.cpp: (HTMLGenericFormElementImpl::defaultEventHandler):
605         Removed bogus extra setActive/focus code. Dave says this is no longer needed for
606         the active state handling, and the focus call caused a problem, although I can't
607         find the bug report at the moment.
608
609 2004-02-08  Darin Adler  <darin@apple.com>
610
611         Reviewed by Don.
612
613         - fixed an assertion failure when putting up Java applets caused by my last change
614
615         * kwq/KWQKJavaAppletWidget.mm: (KJavaAppletWidget::KJavaAppletWidget):
616         Don't try to get x() and y(). They are always zero because the widget is just being
617         created at this point and has not yet been positioned; trying to get them
618         leads to an assertion because there is no NSView until we call setView().
619         Before my change, there was a KWQView object at 0,0 that was released when we called
620         setView, which is why the problem is new.
621
622 2004-02-08  Darin Adler  <darin@apple.com>
623
624         Reviewed by Dave.
625
626         - fixed things seen in the profile, for a total speedup of 4% on cvs-base
627         - fixed some layout regressions from my last speedup due to text measurement inconsistencies
628
629         * WebCorePrefix.h: Add a workaround for a bug in our system headers that prevents the <ctype.h>
630         macros from working right in C++ code that uses the <cctype> header.
631
632         * khtml/css/cssstyleselector.cpp:
633         (khtml::checkPseudoState): Use prepend instead of operator + here. Will probably be obviated if
634         someone fixes the checkPseudoState problem.
635         (khtml::colorForCSSValue): Get rid of all the code that uses QPalette; it wasn't doing any good
636         in Safari. Instead, hardcode the UI colors.
637
638         * kwq/KWQChar.mm:
639         (QChar::isDigitNonASCII): Non-inline part. The ASCII case is handled with an inline now.
640         (QChar::isLetterNonASCII): Ditto.
641         (QChar::isNumberNonASCII): Ditto.
642         (QChar::isLetterOrNumberNonASCII): Ditto.
643         (QChar::lowerNonASCII): Ditto.
644         (QChar::upperNonASCII): Ditto.
645         (QChar::digitValueNonASCII): Ditto.
646
647         * kwq/KWQColorGroup.mm: Put all roles base inside #if, since we don't need them, and copying
648         the color group and palette was making things slow.
649
650         * kwq/KWQComboBox.h: Remove KWQComboBoxAdapter, not needed any more.
651         * kwq/KWQComboBox.mm:
652         (QComboBox::QComboBox): Remove KWQComboBoxAdapter, not needed any more.
653         (QComboBox::~QComboBox): Ditto.
654         (QComboBox::sizeHint): Turn off rounding; we use that in web text, but not in widgets.
655         (-[KWQPopUpButton action:]): Moved the action method here.
656
657         * kwq/KWQLineEdit.mm: (QLineEdit::sizeForCharacterWidth): Turn off rounding. We use it in web
658         page text, but not in widgets.
659         * kwq/KWQListBox.mm:
660         (QListBox::sizeForNumberOfLines): Ditto.
661         (-[KWQTableView drawRow:clipRect:]): Ditto.
662
663         * kwq/KWQKURL.mm:
664         (KURL::KURL): Added code to put the "file:" in front of a path without making a QString.
665         (hasSlashDotOrDotDot): Added. Faster than two calls to strstr.
666         (matchLetter): Added. Faster than tolower calls on each letter.
667         (KURL::parse): Changed to use matchLetter and hasSlashDotOrDotDot.
668
669         * kwq/KWQPalette.h: Remove all roles except base, and all groups except active, since we don't
670         need them, and copying the color group and palette was making things slow.
671         * kwq/KWQPalette.mm: Ditto.
672
673         * kwq/KWQRegExp.mm: (QRegExp::match): Fixed logic so we don't create and destroy a QCString
674         in the fast case. Also avoid UTF-8/UTF-16 offset mapping.
675
676         * kwq/KWQString.h:
677         (QChar::isDigit): Add inline section for ASCII.
678         (QChar::isLetter): Ditto.
679         (QChar::isNumber): Ditto.
680         (QChar::isLetterOrNumber): Ditto.
681         (QChar::digitValue): Ditto.
682         (QChar::lower): Ditto.
683         (QChar::upper): Ditto.
684         (QString::utf8): Add a new version that returns the length; used by QRegExp.
685         (QString::operator+=): Call a new append function.
686         * kwq/KWQString.mm:
687         (ucstrcmp): Made this function inline.
688         (equal): Added, replacing various strcmp functions.
689         (equalCaseInsensitive): Ditto.
690         (ok_in_base): Changed to use <ctype.h> isdigit and isalpha instead of QChar functions.
691         (QString::detachInternal): Moved up so it will be inlined.
692         (QString::~QString): Streamlined a little.
693         (QString::utf8): Changed to return the length.
694         (QString::find): Use unicode() instead of cell() in various places. Also refined a faster
695         version of the one that takes a char *.
696         (QString::contains): Changed all of the overloads to have structure that's more similar,
697         and made them slightly faster too.
698         (QString::isAllLatin1): Added.
699         (QString::copyLatin1): Added. Lets you get the string as a char * buffer without changing
700         the string itself into that format.
701         (QString::toLong): Changed to use <ctype.h> isdigit instead of QChar function.
702         (QString::toULong): Ditto.
703         (QString::setUnicode): Call the new detachAndDiscardCharacters; not implemented yet.
704         (QString::setLatin1): Call the new detachAndDiscardCharacters; not implemented yet.
705         (QString::sprintf): Call the new detachAndDiscardCharacters; not implemented yet.
706         (QString::insert): Remove one memmove call for the case that appends at the end.
707         (QString::detach): Change code to use the internal data if we can; saves at destructor time.
708         (QString::detachAndDiscardCharacters): Added. Placeholder for now that just calls detach().
709         (QString::setLength): Optimize the setLength(0) case.
710         (QString::fill): Call the new detachAndDiscardCharacters; not implemented yet.
711         (QString::append): Renamed from operator+=, which now simply calls append().
712         (QString::reserve): Added. Useful when building up a string, like in QTextCodec.
713
714         * WebCore-tests.exp: Added new function names for QChar.
715         * WebCore-combined.exp: Updated.
716
717         * kwq/KWQTextCodec.mm:
718         (KWQTextDecoder::convertLatin1): Added. Since this is the most common encoding, and very
719         easy to decode (built into QString, in fact), best to do it as a special case, not with TEC.
720         (KWQTextDecoder::convertUTF16): Added a reserve() call for better performance and made the
721         stack buffer larger.
722         (KWQTextDecoder::convertUsingTEC): Added a reserve() call for better performance and made the
723         stack buffer larger.
724         (KWQTextDecoder::convert): Added a switch statement and convertLatin1 case.
725
726         * kwq/KWQView.h: Removed the KWQView class.
727         * kwq/KWQView.mm: Removed.
728         * WebCore.pbproj/project.pbxproj: Removed KWQView.mm.
729
730         * kwq/KWQWidget.h: Changed name of QWidgetPrivate to KWQWidgetPrivate.
731         * kwq/KWQWidget.mm:
732         (QWidget::QWidget): Got rid of code that makes a KWQView when no view is passed in. We were
733         creating and destroying extra views because of this.
734         (QWidget::setFrameGeometry): Only call getOuterView() once, not three times. Also, don't do
735         any work at all if the frame is already correct.
736         * khtml/khtmlview.cpp: (KHTMLView::init): Removed a call that will hit an assertion due to the
737         way a new KHTMLView does not yet have an NSView.
738
739         * kwq/WebCoreTextRenderer.h: Broke applyRounding into applyRunRounding and applyWordRounding.
740         * kwq/WebCoreTextRendererFactory.m: (WebCoreInitializeEmptyTextStyle): Initialize both rounding
741         flags on.
742
743 2004-02-07  Darin Adler  <darin@apple.com>
744
745         Reviewed by Dave.
746
747         - switched KWQComboBox, KWQListBox, and KWQLineEdit to use WebKit text measuring/rendering instead of AppKit
748         - fixed width calculation for KWQListBox that made them too wide (the computation used the width of standard scroll
749           bars rather than the small scroll bars they actually use)
750
751         Speeds up cvs-base by 5%!
752
753         * khtml/rendering/render_form.cpp: (RenderSelect::updateFromElement):
754         Get rid of beginBatchInsert, and rename endBatchInsert. Use our own "append" calls instead of "insert" calls.
755
756         * kwq/KWQComboBox.h: Replace insertItem with appendItem. Add a new populateMenu call (for internal use,
757         but public). Change width member to be int instead of float. Remove updateCurrentItem(), and add a
758         menuPopulated boolean and a QStringList containing the items.
759         * kwq/KWQComboBox.mm:
760         (QComboBox::QComboBox): Initialize currentItem directly instead of calling updateCurrentItem. Also initialize
761         menuPopulated to true.
762         (QComboBox::appendItem): Replaces insertItem. Put items in a string list. Don't keep the menu populated unless
763         the button is highlighted (which indicates the menu is showing).
764         (QComboBox::sizeHint): Compute widths using WebCoreTextRenderer, and the string list.
765         (QComboBox::baselinePosition): Change ceil to ceilf, since we are dealing with floats, not doubles.
766         (QComboBox::clear): Clear the items list. Also reset the currentItem field directly instead of using updateCurrentItem().
767         (QComboBox::setCurrentItem): If the menu is not populated, then keep a single item with the appropriate title.
768         If the menu is populated, then select the appropriate item.
769         (QComboBox::itemSelected): Moved the logic from updateCurrentItem in here for simplicity.
770         (QComboBox::focusPolicy): Tweaked the comment.
771         (QComboBox::populateMenu): Added.
772         (-[KWQPopUpButtonCell setHighlighted:]): Populate the menu when the cell is highlighted.
773
774         * kwq/KWQLineEdit.mm:
775         (QLineEdit::sizeForCharacterWidth): Put an empty string in the cell, and add in a separately-computed width
776         for the string.
777         (QLineEdit::baselinePosition): Use ceilf instead of ceil since we are doing floats, not doubles.
778
779         * kwq/KWQListBox.h: Changed the items list from an NSArray to a QValueList.
780         (KWQListBoxItem::KWQListBoxItem): Added a new class to keep the string and the "is label" boolean.
781         (QListBox::count): Now inline.
782         (QListBox::appendItem): Replaced insertItem with this.
783         (QListBox::appendGroupLabel): Replaced insertGroupLabel with this.
784         (QListBox::itemAtIndex): Replaced itemIsGroupLabel with this.
785         * kwq/KWQListBox.mm:
786         (itemTextRenderer): Replaced itemFont with this, which returns a WebCoreTextRenderer.
787         (groupLabelTextRenderer): Ditto.
788         (QListBox::QListBox): Removed the _insertingItems boolean, and handling of the _items list.
789         (QListBox::~QListBox): Ditto.
790         (QListBox::clear): Now clears the items list. Doesn't both with reloadData, since doneAppendingItems
791         handles that.
792         (QListBox::appendItem): Replaced insertItem. Just adds to the list. No need to construct attributed
793         strings any more.
794         (QListBox::doneAppendingItems): Replaced endBatchInsert. No need to clear the obsolete _insertingItems
795         boolean.
796         (QListBox::setEnabled): Added a call to reloadData.
797         (QListBox::sizeForNumberOfLines): Compute widths using WebCoreTextRenderer, and the string list.
798         Also adjust for the difference in widths between small and default scrollers and add in margins.
799         (QListBox::setWritingDirection): Remove code that updates the direction in attributed strings.
800         (-[KWQTableView initWithListBox:]): Compute height from font, not cell.
801         (-[KWQTableView numberOfRowsInTableView:]): Get count from QListBox instead of items array.
802         (-[KWQTableView tableView:objectValueForTableColumn:row:]): Return nil becase we don't want to
803         create an NSString for each cell. We'll draw the appropriate thing.
804         (-[KWQTableView tableView:shouldSelectRow:]): Update for change to QComboBox function.
805         (-[KWQTableView drawRow:clipRect:]): Added. Draws the text in the cell, with the appropriate color
806         and position, using WebCoreTextRenderer for speed.
807         (-[KWQTableView _accessibilityTableCell:tableColumn:]): Set up cell with a string in this case,
808         because we need the string to be seen by the accessibilty framework.
809
810         * kwq/WebCoreTextRenderer.h: Fixed typo in comment.
811         * kwq/WebCoreTextRendererFactory.m: Removed bogus inline specifiers.
812
813         * khtml/rendering/render_layer.cpp: Fixed a couple of cases of RenderLayer::RenderLayer that just
814         should have said RenderLayer.
815
816 2004-02-07  Darin Adler  <darin@apple.com>
817
818         * WebCore.pbproj/project.pbxproj: Get rid of the DEPLOYMENT_LOCATION and DEPLOYMENT_POSTPROCESSING
819         flags that were in the Deployment build style. These were causing the need to chmod all the time
820         after building WebCore successfully, and were doing us no good.
821
822 2004-02-07  Darin Adler  <darin@apple.com>
823
824         * kwq/can-convert.mm: Added test program to see which conversions are actually supported by TEC.
825
826 2004-02-06  David Hyatt  <hyatt@apple.com>
827
828         Implemented a TokenizerString that can walk a list of substrings, so that data can be enqueued
829         in the list without having to do a copy.  Speeds up voodooextreme by 20% or so, giving the overall
830         page-load tests get a 2% boost.
831         
832         Reviewed by darin
833
834         * WebCore.pbproj/project.pbxproj:
835         * khtml/html/html_documentimpl.h:
836         * khtml/html/htmltokenizer.cpp:
837         (khtml::HTMLTokenizer::begin):
838         (khtml::HTMLTokenizer::processListing):
839         (khtml::HTMLTokenizer::parseSpecial):
840         (khtml::HTMLTokenizer::scriptHandler):
841         (khtml::HTMLTokenizer::parseComment):
842         (khtml::HTMLTokenizer::parseServer):
843         (khtml::HTMLTokenizer::parseProcessingInstruction):
844         (khtml::HTMLTokenizer::parseText):
845         (khtml::HTMLTokenizer::parseEntity):
846         (khtml::HTMLTokenizer::parseTag):
847         (khtml::HTMLTokenizer::write):
848         (khtml::HTMLTokenizer::notifyFinished):
849         (khtml::HTMLTokenizer::setSrc):
850         (khtml::HTMLTokenizer::setOnHold):
851         * khtml/html/htmltokenizer.h:
852         (khtml::Token::Token):
853         (khtml::Token::~Token):
854         (khtml::Token::addAttribute):
855         (khtml::Token::reset):
856         * khtml/khtml_part.cpp:
857         (KHTMLPart::handleMousePressEventDoubleClick):
858         * khtml/khtml_part.h:
859         * khtml/misc/stringit.cpp: Added.
860         (khtml::TokenizerString::length):
861         (khtml::TokenizerString::clear):
862         (khtml::TokenizerString::append):
863         (khtml::TokenizerString::prepend):
864         (khtml::TokenizerString::advanceSubstring):
865         (khtml::TokenizerString::toString):
866         * khtml/misc/stringit.h:
867         (khtml::TokenizerSubstring::TokenizerSubstring):
868         (khtml::TokenizerSubstring::clear):
869         (khtml::TokenizerSubstring::appendTo):
870         (khtml::TokenizerString::TokenizerString):
871         (khtml::TokenizerString::push):
872         (khtml::TokenizerString::isEmpty):
873         (khtml::TokenizerString::advance):
874         (khtml::TokenizerString::escaped):
875         (khtml::TokenizerString::lineCount):
876         (khtml::TokenizerString::resetLineCount):
877         (khtml::TokenizerString::operator++):
878         (khtml::TokenizerString::operator*):
879         (khtml::TokenizerString::operator->):
880         (khtml::TokenizerString::current):
881         * khtml/xbl/xbl_docimpl.cpp:
882         * khtml/xbl/xbl_docimpl.h:
883         (XBL::):
884         * khtml/xbl/xbl_tokenizer.h:
885         (XBL::):
886         * khtml/xml/dom_docimpl.h:
887         (DOM::DocumentImpl::tokenizer):
888         * khtml/xml/xml_tokenizer.cpp:
889         (khtml::XMLTokenizer::write):
890         * khtml/xml/xml_tokenizer.h:
891         * kwq/KWQSignalStubs.mm:
892         * kwq/KWQValueList.h:
893         (QValueList::insert):
894         (QValueList::fromLast):
895         * kwq/KWQValueListImpl.h:
896         * kwq/KWQValueListImpl.mm:
897         (KWQValueListImpl::clear):
898         (KWQValueListImpl::insert):
899         (KWQValueListImpl::fromLast):
900
901 === Safari-127 ===
902
903 2004-02-06  Ken Kocienda  <kocienda@apple.com>
904
905         Reviewed by Chris
906
907         Steps no longer return int error codes. Steps are operations
908         that should succeed. (When was the last time that typing in
909         a text editor failed for reasons which could not have been
910         figured out ahead of time...like file permissions?).
911         If this does not work for the future, perhaps we can change 
912         some or all of the many asserts in the code to throw C++ 
913         exceptions instead, which can be caught and handled at a
914         suitable level.
915
916         I also made some nice convenience functions to create and apply
917         EditStep objects, and moved the command code to use the new
918         functions.
919
920         * khtml/editing/htmlediting.cpp:
921         (EditStep::EditStep):
922         (EditStep::~EditStep):
923         (EditStep::reapply):
924         (EditStep::beginApply):
925         (EditStep::endApply):
926         (EditStep::beginUnapply):
927         (EditStep::endUnapply):
928         (EditStep::beginReapply):
929         (EditStep::endReapply):
930         (CompositeEditStep::unapply):
931         (CompositeEditStep::reapply):
932         (CompositeEditStep::applyStep):
933         (CompositeEditStep::insertNodeBefore):
934         (CompositeEditStep::insertNodeAfter):
935         (CompositeEditStep::appendNode):
936         (CompositeEditStep::removeNode):
937         (CompositeEditStep::splitTextNode):
938         (CompositeEditStep::joinTextNodes):
939         (CompositeEditStep::insertText):
940         (CompositeEditStep::deleteText):
941         (CompositeEditStep::moveSelectionTo):
942         (CompositeEditStep::deleteSelection):
943         (InsertNodeBeforeStep::InsertNodeBeforeStep):
944         (InsertNodeBeforeStep::apply):
945         (InsertNodeBeforeStep::unapply):
946         (AppendNodeStep::AppendNodeStep):
947         (AppendNodeStep::apply):
948         (AppendNodeStep::unapply):
949         (RemoveNodeStep::RemoveNodeStep):
950         (RemoveNodeStep::apply):
951         (RemoveNodeStep::unapply):
952         (ModifyTextNodeStep::ModifyTextNodeStep):
953         (ModifyTextNodeStep::splitTextNode):
954         (ModifyTextNodeStep::joinTextNodes):
955         (SplitTextNodeStep::apply):
956         (SplitTextNodeStep::unapply):
957         (JoinTextNodesStep::apply):
958         (JoinTextNodesStep::unapply):
959         (InsertTextStep::InsertTextStep):
960         (InsertTextStep::apply):
961         (InsertTextStep::unapply):
962         (DeleteTextStep::DeleteTextStep):
963         (DeleteTextStep::apply):
964         (DeleteTextStep::unapply):
965         (MoveSelectionToStep::MoveSelectionToStep):
966         (MoveSelectionToStep::apply):
967         (MoveSelectionToStep::unapply):
968         (DeleteSelectionStep::apply):
969         (EditCommand::EditCommand):
970         (EditCommand::~EditCommand):
971         (EditCommand::currentSelection):
972         (InputTextCommand::apply):
973         (DeleteTextCommand::apply):
974         * khtml/editing/htmlediting.h:
975         (khtml::MoveSelectionToStep::~MoveSelectionToStep):
976         (khtml::EditCommand::cookie):
977         * khtml/khtml_part.cpp:
978         (KHTMLPart::applyCommand):
979         (KHTMLPart::undoRedoEditing):
980         (KHTMLPart::undoEditing):
981         (KHTMLPart::redoEditing):
982         * khtml/khtml_part.h:
983         * khtml/xml/dom_elementimpl.cpp:
984         (ElementImpl::defaultEventHandler):
985
986 2004-02-05  Ken Kocienda  <kocienda@apple.com>
987
988         Reviewed by Hyatt
989         
990         This patch includes two major pieces of work.
991         
992         1. The KHTMLSelection object has been reworked to be a value object.
993         Part-related state has been moved out to KHTMLPart. This change makes
994         it much easier to program with these objects, since they can now be
995         treating unambigously like built-in types. As part of this work, I
996         did a pass over the API and improved some function names. A related
997         part of work was to clean up the relationship between KHTMLSelection, 
998         KHTMLPart and DOMDocumentImpl, and cleared up how to change the selection
999         when that is necessary. (There is now a small set of functions on KHTMLPart). 
1000         
1001         2. Implemented undo/redo, and hooked into the Cocoa undo architecture. The
1002         notion of EditCommands has been enhanced by the addition of EditSteps, which
1003         are primitive operations out of which edit commands are built. Most of the
1004         existing operations have been updated to use this new design. The last couple
1005         will be updated soon, so that all supported editing operations will be undoable.
1006
1007         * khtml/editing/htmlediting.cpp:
1008         * khtml/editing/htmlediting.h:
1009         * khtml/html/html_elementimpl.cpp:
1010         (HTMLElementImpl::isFocusable): Prevents children of content editable parents
1011         from receiving focus.
1012         * khtml/khtml_part.cpp: Modified to work with new KHTMLSelection class design.
1013         Also added some new code to work with new edit command architecture. 
1014         * khtml/khtml_part.h:
1015         * khtml/khtml_selection.cpp: Reworked as a value class. Too much state was
1016         being stored in this object for it to be convenient to use as a value. That
1017         has been fixed.
1018         * khtml/khtml_selection.h:
1019         * khtml/khtmlpart_p.h:
1020         (KHTMLPartPrivate::KHTMLPartPrivate):
1021         (KHTMLPartPrivate::~KHTMLPartPrivate):
1022         * khtml/khtmlview.cpp: Modified to work with new KHTMLSelection class design.
1023         * khtml/rendering/render_block.cpp: Modified to work with new KHTMLSelection class design.
1024         (khtml::RenderBlock::paintObject):
1025         * khtml/xml/dom_docimpl.cpp:
1026         (DocumentImpl::updateSelection):
1027         (DocumentImpl::deleteSelection):
1028         (DocumentImpl::pasteHTMLString):
1029         * khtml/xml/dom_docimpl.h:
1030         * khtml/xml/dom_elementimpl.cpp: 
1031         (ElementImpl::defaultEventHandler): Modified to work with new edit command architecture.
1032         * kwq/KWQKHTMLPart.h:
1033         * kwq/KWQKHTMLPart.mm:
1034         (KWQKHTMLPart::registerCommandForUndo): Added hook to Cocoa undo/redo architecture.
1035         * kwq/WebCoreBridge.h:
1036         * kwq/WebCoreBridge.mm:
1037         (-[WebCoreBridge isSelectionEditable]): Modified to work with new edit command architecture.
1038         (-[WebCoreBridge moveCaretToPoint:]): Ditto
1039         (-[WebCoreBridge haveSelection]): Ditto
1040         (-[WebCoreBridge selectedHTML]): Ditto
1041         (-[WebCoreBridge setSelectionFrom:startOffset:to:endOffset:]): Ditto
1042         (-[WebCoreBridge reconstructedSource]): Ditto
1043         (-[WebCoreBridge undoRedoEditing:]): Added hook to Cocoa undo/redo architecture.
1044
1045 2004-02-04  David Hyatt  <hyatt@apple.com>
1046
1047         Improve rule matching in the style system.  Filter out most rules up front, so that only a small
1048         number of rules need to be walked for any given element.  Yields a ~4-5% improvement on the PLT.
1049         
1050         Reviewed by kocienda
1051
1052         * khtml/css/css_base.cpp:
1053         (StyleBaseImpl::setParsedValue):
1054         (CSSSelector::specificity):
1055         (CSSSelector::extractPseudoType):
1056         (CSSSelector::operator == ):
1057         * khtml/css/css_base.h:
1058         (DOM::CSSSelector::CSSSelector):
1059         (DOM::CSSSelector::~CSSSelector):
1060         (DOM::CSSSelector::append):
1061         (DOM::CSSSelector::next):
1062         (DOM::CSSSelector::):
1063         (DOM::StyleBaseImpl::StyleBaseImpl):
1064         * khtml/css/css_ruleimpl.cpp:
1065         (CSSStyleRuleImpl::selectorText):
1066         (CSSRuleListImpl::insertRule):
1067         * khtml/css/css_ruleimpl.h:
1068         (DOM::CSSStyleRuleImpl::setSelector):
1069         (DOM::CSSStyleRuleImpl::selector):
1070         * khtml/css/css_stylesheetimpl.cpp:
1071         * khtml/css/css_stylesheetimpl.h:
1072         * khtml/css/css_valueimpl.cpp:
1073         (CSSStyleDeclarationImpl::getPropertyCSSValue):
1074         (CSSStyleDeclarationImpl::removeProperty):
1075         (CSSStyleDeclarationImpl::setProperty):
1076         (CSSStyleDeclarationImpl::setStringProperty):
1077         (CSSStyleDeclarationImpl::setImageProperty):
1078         (CSSStyleDeclarationImpl::setLengthProperty):
1079         (CSSStyleDeclarationImpl::cssText):
1080         (CSSStyleDeclarationImpl::setCssText):
1081         * khtml/css/css_valueimpl.h:
1082         (DOM::CSSStyleDeclarationImpl::node):
1083         (DOM::CSSProperty::CSSProperty):
1084         (DOM::CSSProperty::id):
1085         (DOM::CSSProperty::isImportant):
1086         * khtml/css/cssparser.cpp:
1087         (CSSParser::CSSParser):
1088         (ParseString::lower):
1089         (CSSParser::parseValue):
1090         (CSSParser::parseDeclaration):
1091         (CSSParser::addProperty):
1092         (CSSParser::parseShadow):
1093         * khtml/css/cssparser.h:
1094         * khtml/css/cssstyleselector.cpp:
1095         (khtml::):
1096         (khtml::CSSStyleSelector::CSSStyleSelector):
1097         (khtml::CSSStyleSelector::init):
1098         (khtml::CSSStyleSelector::~CSSStyleSelector):
1099         (khtml::CSSStyleSelector::loadDefaultStyle):
1100         (khtml::CSSStyleSelector::addMatchedRule):
1101         (khtml::CSSStyleSelector::addMatchedDeclaration):
1102         (khtml::CSSStyleSelector::matchRules):
1103         (khtml::CSSStyleSelector::matchRulesForList):
1104         (khtml::operator >):
1105         (khtml::operator <=):
1106         (khtml::CSSStyleSelector::sortMatchedRules):
1107         (khtml::CSSStyleSelector::initForStyleResolve):
1108         (khtml::CSSStyleSelector::styleForElement):
1109         (khtml::CSSStyleSelector::pseudoStyleForElement):
1110         (khtml::checkPseudoState):
1111         (khtml::CSSStyleSelector::checkSelector):
1112         (khtml::CSSStyleSelector::checkOneSelector):
1113         (khtml::CSSRuleSet::CSSRuleSet):
1114         (khtml::CSSRuleSet::addToRuleSet):
1115         (khtml::CSSRuleSet::addRule):
1116         (khtml::CSSRuleSet::addRulesFromSheet):
1117         (khtml::CSSStyleSelector::applyDeclarations):
1118         (khtml::CSSStyleSelector::applyProperty):
1119         (khtml::CSSStyleSelector::smallerFontSize):
1120         (khtml::CSSStyleSelector::getColorFromPrimitiveValue):
1121         * khtml/css/cssstyleselector.h:
1122         (khtml::):
1123         (khtml::CSSRuleData::m_next):
1124         (khtml::CSSRuleData::~CSSRuleData):
1125         (khtml::CSSRuleData::position):
1126         (khtml::CSSRuleData::rule):
1127         (khtml::CSSRuleData::selector):
1128         (khtml::CSSRuleData::next):
1129         (khtml::CSSRuleDataList::CSSRuleDataList):
1130         (khtml::CSSRuleDataList::~CSSRuleDataList):
1131         (khtml::CSSRuleDataList::first):
1132         (khtml::CSSRuleDataList::last):
1133         (khtml::CSSRuleDataList::append):
1134         (khtml::CSSRuleSet::~CSSRuleSet):
1135         (khtml::CSSRuleSet::getIDRules):
1136         (khtml::CSSRuleSet::getClassRules):
1137         (khtml::CSSRuleSet::getTagRules):
1138         (khtml::CSSRuleSet::getUniversalRules):
1139         * khtml/css/cssvalues.c:
1140         (hash_val):
1141         (findValue):
1142         * khtml/css/cssvalues.h:
1143         * khtml/css/cssvalues.in:
1144         * khtml/css/html4.css:
1145         * khtml/css/parser.cpp:
1146         * khtml/css/parser.h:
1147         * khtml/css/parser.y:
1148         * khtml/dom/dom_element.cpp:
1149         (Element::style):
1150         * khtml/html/html_baseimpl.cpp:
1151         (HTMLBodyElementImpl::HTMLBodyElementImpl):
1152         (HTMLBodyElementImpl::~HTMLBodyElementImpl):
1153         (HTMLBodyElementImpl::createLinkDecl):
1154         (HTMLBodyElementImpl::parseAttribute):
1155         * khtml/html/html_baseimpl.h:
1156         * khtml/html/html_elementimpl.cpp:
1157         (HTMLNamedAttrMapImpl::parseClassAttribute):
1158         (HTMLElementImpl::HTMLElementImpl):
1159         (HTMLElementImpl::~HTMLElementImpl):
1160         (HTMLElementImpl::createInlineStyleDecl):
1161         (HTMLElementImpl::createMappedAttributeDecl):
1162         (HTMLElementImpl::parseAttribute):
1163         (HTMLElementImpl::getClassList):
1164         (HTMLElementImpl::addCSSProperty):
1165         (HTMLElementImpl::addCSSStringProperty):
1166         (HTMLElementImpl::addCSSImageProperty):
1167         (HTMLElementImpl::addCSSLength):
1168         (HTMLElementImpl::addHTMLColor):
1169         (HTMLElementImpl::removeCSSProperty):
1170         * khtml/html/html_elementimpl.h:
1171         (DOM::HTMLNamedAttrMapImpl::getClassList):
1172         (DOM::HTMLElementImpl::inlineStyleDecl):
1173         (DOM::HTMLElementImpl::attributeStyleDecl):
1174         (DOM::HTMLElementImpl::getInlineStyleDecl):
1175         * khtml/html/html_tableimpl.cpp:
1176         (HTMLTableElementImpl::createSharedCellDecls):
1177         (HTMLTableCellElementImpl::additionalAttributeStyleDecl):
1178         * khtml/html/html_tableimpl.h:
1179         * khtml/xml/dom_atomicstring.cpp:
1180         (DOM::AtomicString::add):
1181         (DOM::AtomicString::remove):
1182         * khtml/xml/dom_docimpl.cpp:
1183         (DocumentImpl::DocumentImpl):
1184         (DocumentImpl::resetLinkColor):
1185         (DocumentImpl::resetVisitedLinkColor):
1186         (DocumentImpl::resetActiveLinkColor):
1187         (DocumentImpl::recalcStyleSelector):
1188         * khtml/xml/dom_docimpl.h:
1189         (DOM::DocumentImpl::linkColor):
1190         (DOM::DocumentImpl::visitedLinkColor):
1191         (DOM::DocumentImpl::activeLinkColor):
1192         (DOM::DocumentImpl::setLinkColor):
1193         (DOM::DocumentImpl::setVisitedLinkColor):
1194         (DOM::DocumentImpl::setActiveLinkColor):
1195         * khtml/xml/dom_elementimpl.cpp:
1196         (ElementImpl::ElementImpl):
1197         (ElementImpl::~ElementImpl):
1198         (ElementImpl::getClassList):
1199         (ElementImpl::getIDAttribute):
1200         (ElementImpl::cloneNode):
1201         (XMLElementImpl::cloneNode):
1202         * khtml/xml/dom_elementimpl.h:
1203         (DOM::ElementImpl::inlineStyleDecl):
1204         (DOM::ElementImpl::attributeStyleDecl):
1205         (DOM::ElementImpl::getInlineStyleDecl):
1206         (DOM::ElementImpl::additionalAttributeStyleDecl):
1207         (DOM::NamedAttrMapImpl::id):
1208         (DOM::NamedAttrMapImpl::setID):
1209         * khtml/xml/dom_stringimpl.cpp:
1210         (DOM::DOMStringImpl::DOMStringImpl):
1211         (DOM::DOMStringImpl::~DOMStringImpl):
1212         (DOM::DOMStringImpl::append):
1213         (DOM::DOMStringImpl::insert):
1214         (DOM::DOMStringImpl::truncate):
1215         (DOM::DOMStringImpl::remove):
1216         (DOM::DOMStringImpl::split):
1217         * khtml/xml/dom_stringimpl.h:
1218         (DOM::DOMStringImpl::DOMStringImpl):
1219
1220 2004-02-04  David Hyatt  <hyatt@apple.com>
1221
1222         Fix line-height regression on altavista.
1223
1224         * khtml/rendering/render_br.cpp:
1225         (RenderBR::RenderBR):
1226         (RenderBR::position):
1227         (RenderBR::lineHeight):
1228         (RenderBR::setStyle):
1229         * khtml/rendering/render_br.h:
1230         * khtml/rendering/render_flow.h:
1231         (khtml::RenderFlow::RenderFlow):
1232
1233 2004-02-04  David Hyatt  <hyatt@apple.com>
1234
1235         Fix a regression in the line-height of first-lines and inline-blocks.
1236         
1237         Reviewed by darin
1238
1239         * khtml/rendering/render_flow.cpp:
1240         (RenderFlow::lineHeight):
1241         * khtml/rendering/render_text.cpp:
1242         (RenderText::lineHeight):
1243
1244 2004-02-02  Chris Blumenberg  <cblu@apple.com>
1245
1246         Fixed: <rdar://problem/3546924>: REGRESSION: dragging text or images over a WebView is jerky
1247
1248
1249         Reviewed by mjs.
1250
1251         * WebCore-combined.exp:
1252         * WebCore.exp:
1253         * kwq/WebCoreBridge.h: added the DOM node element key constant (SPI for now)
1254         * kwq/WebCoreBridge.mm:
1255         (-[WebCoreBridge elementAtPoint:]): instead of calling toHTML for every node, put the node on the element so the caller can get the HTML string representation when it needs to.
1256         * kwq/WebCoreDOMNode.mm:
1257         (-[WebCoreDOMNode HTMLString]): new
1258
1259 2004-02-02  Darin Adler  <darin@apple.com>
1260
1261         Reviewed by Maciej.
1262
1263         - use toInt32 where we really need an int, rather than toInteger,
1264           because toInteger needs to return an integral number as a double,
1265           not as an int
1266
1267         * khtml/ecma/kjs_css.cpp:
1268         (DOMCSSStyleDeclarationProtoFunc::tryCall): Call toInt32 intead of toInteger.
1269         (DOMStyleSheetListFunc::tryCall): Ditto.
1270         (KJS::DOMMediaListProtoFunc::tryCall): Ditto.
1271         (DOMCSSStyleSheetProtoFunc::tryCall): Ditto.
1272         (DOMCSSRuleListFunc::tryCall): Ditto.
1273         (DOMCSSRuleFunc::tryCall): Ditto.
1274         (DOMCSSPrimitiveValueProtoFunc::tryCall): Ditto.
1275         (DOMCSSValueListFunc::tryCall): Ditto.
1276         * khtml/ecma/kjs_dom.cpp:
1277         (DOMCharacterDataProtoFunc::tryCall): Ditto.
1278         (DOMTextProtoFunc::tryCall): Ditto.
1279         * khtml/ecma/kjs_events.cpp:
1280         (DOMUIEventProtoFunc::tryCall): Ditto.
1281         (DOMMouseEventProtoFunc::tryCall): Ditto.
1282         (DOMKeyboardEventProtoFunc::tryCall): Ditto.
1283         (DOMMutationEventProtoFunc::tryCall): Ditto.
1284         * khtml/ecma/kjs_html.cpp:
1285         (KJS::HTMLElementFunction::tryCall): Ditto.
1286         (KJS::HTMLElement::putValue): Ditto.
1287         (KJS::HTMLSelectCollection::tryPut): Ditto.
1288         * khtml/ecma/kjs_range.cpp:
1289         (DOMRangeProtoFunc::tryCall): Ditto.
1290         * khtml/ecma/kjs_traversal.cpp: (JSNodeFilter::acceptNode): Ditto.
1291         * khtml/ecma/kjs_window.cpp:
1292         (WindowFunc::tryCall): Ditto.
1293         (HistoryFunc::tryCall): Ditto.
1294
1295 2004-02-02  Darin Adler  <darin@apple.com>
1296
1297         Reviewed by John.
1298
1299         - fix at least some of <rdar://problem/3546393>: 10,000 leaks, many of DOM::AtomicString::add, after one run of cvs-base
1300
1301         * khtml/xml/dom_atomicstring.cpp: (DOM::AtomicString::add): Remove extra allocation of strings.
1302         This should speed things up a bit as well as fixing one big leak.
1303
1304 2004-02-02  Chris Blumenberg  <cblu@apple.com>
1305
1306         Fixed: <rdar://problem/3546379>: support for editing via drag & drop
1307
1308         Reviewed by kocienda.
1309
1310         * khtml/xml/dom_docimpl.cpp:
1311         (DocumentImpl::deleteSelection): fixed a crash I encountered while attempting to delete and empty selection
1312         * kwq/WebCoreBridge.h:
1313         * kwq/WebCoreBridge.mm:
1314         (-[WebCoreBridge isSelectionEditable]): renamed from isEditable
1315         (-[WebCoreBridge moveCaretToPoint:]): new
1316         (-[WebCoreBridge elementAtPoint:]): added support for WebCoreElementHTMLStringKey and WebCoreElementIsEditableKey
1317
1318 2004-01-30  David Hyatt  <hyatt@apple.com>
1319
1320         Fix for 3522497, <br>s should not get AXObjects created.
1321         
1322         Reviewed by mjs
1323
1324         * kwq/KWQAccObject.mm:
1325         (-[KWQAccObject accessibilityIsIgnored]):
1326
1327 === Safari-126 ===
1328
1329 2004-01-30  David Hyatt  <hyatt@apple.com>
1330
1331         Fix a regression I introduced in my atomicstring patch.  I meant to say !attr->isNull() in the contentedtiable
1332         attribute parsing code.
1333         
1334         Reviewed by cblu
1335
1336         * khtml/html/html_elementimpl.cpp:
1337         (HTMLElementImpl::parseAttribute):
1338
1339 2004-01-30  David Hyatt  <hyatt@apple.com>
1340
1341         Make m_lineHeight be cached on RenderFlow instead of RenderText and avoid recomputing it so much when it
1342         is not set by CSS (since calls to fontMetrics().lineSpacing() are expensive).
1343
1344         Yields ~1.5% performance improvement.
1345         
1346         Reviewed by darin
1347
1348         * khtml/rendering/render_block.cpp:
1349         (khtml::RenderBlock::setStyle):
1350         * khtml/rendering/render_flow.cpp:
1351         (RenderFlow::lineHeight):
1352         * khtml/rendering/render_flow.h:
1353         * khtml/rendering/render_inline.cpp:
1354         (RenderInline::setStyle):
1355         * khtml/rendering/render_object.cpp:
1356         (RenderObject::verticalPositionHint):
1357         (RenderObject::lineHeight):
1358         * khtml/rendering/render_object.h:
1359         * khtml/rendering/render_text.cpp:
1360         (RenderText::setStyle):
1361         (RenderText::checkSelectionPointIgnoringContinuations):
1362         (RenderText::height):
1363         (RenderText::lineHeight):
1364         * khtml/rendering/render_text.h:
1365
1366 2004-01-30  David Hyatt  <hyatt@apple.com>
1367
1368         Disable XBL.  The loadBindings call was taking 0.1-0.25%.  While I know how to get rid of this overhead,
1369         it's easier for now to just disable all of XBL.
1370
1371         * WebCorePrefix.h:
1372         * khtml/misc/loader.h:
1373         * khtml/xbl/xbl_binding.cpp:
1374         * khtml/xbl/xbl_binding_manager.cpp:
1375         * khtml/xbl/xbl_docimpl.cpp:
1376         * khtml/xbl/xbl_protobinding.cpp:
1377         * khtml/xbl/xbl_protohandler.cpp:
1378         * khtml/xbl/xbl_protoimplementation.cpp:
1379         * khtml/xbl/xbl_tokenizer.cpp:
1380
1381 2004-01-29  David Hyatt  <hyatt@apple.com>
1382
1383         Atomize font families (KWQFontFamily) and all attribute values.  Move atomic string into separate files.
1384
1385         In my testing, this patch yields the same score as Safari-125 in tests and recovers all lost performance
1386         (mostly from excess copying of AtomicStrings where DOMStringImpl* used to be returned).
1387         
1388         Reviewed by darin
1389
1390         * ForwardingHeaders/xml/dom_atomicstring.h: Added.
1391         * WebCore.pbproj/project.pbxproj:
1392         * khtml/css/css_base.cpp:
1393         (CSSSelector::print):
1394         (CSSSelector::extractPseudoType):
1395         (CSSSelector::selectorText):
1396         * khtml/css/css_valueimpl.cpp:
1397         (FontFamilyValueImpl::FontFamilyValueImpl):
1398         * khtml/css/cssparser.cpp:
1399         (CSSParser::parseFontFamily):
1400         * khtml/css/cssparser.h:
1401         * khtml/css/cssstyleselector.cpp:
1402         (khtml::checkPseudoState):
1403         (khtml::CSSStyleSelector::checkOneSelector):
1404         (khtml::CSSStyleSelector::applyRule):
1405         * khtml/dom/dom_element.cpp:
1406         (Element::getAttributeNS):
1407         * khtml/dom/dom_string.cpp:
1408         (DOMString::toInt):
1409         (DOMString::toLengthArray):
1410         (DOM::operator==):
1411         * khtml/dom/dom_string.h:
1412         (DOM::operator==):
1413         (DOM::operator!=):
1414         * khtml/ecma/kjs_navigator.cpp:
1415         (Plugins::get):
1416         (MimeTypes::get):
1417         (Plugin::get):
1418         * khtml/html/html_baseimpl.cpp:
1419         (HTMLBodyElementImpl::parseAttribute):
1420         (HTMLFrameElementImpl::isURLAllowed):
1421         (HTMLFrameElementImpl::openURL):
1422         (HTMLFrameElementImpl::parseAttribute):
1423         (HTMLFrameElementImpl::attach):
1424         (HTMLFrameElementImpl::setLocation):
1425         (HTMLFrameSetElementImpl::parseAttribute):
1426         (HTMLIFrameElementImpl::attach):
1427         * khtml/html/html_baseimpl.h:
1428         * khtml/html/html_blockimpl.cpp:
1429         (HTMLHRElementImpl::parseAttribute):
1430         (HTMLHRElementImpl::attach):
1431         (HTMLMarqueeElementImpl::parseAttribute):
1432         * khtml/html/html_documentimpl.cpp:
1433         (HTMLDocumentImpl::documentElement):
1434         * khtml/html/html_documentimpl.h:
1435         * khtml/html/html_elementimpl.cpp:
1436         (HTMLElementImpl::parseAttribute):
1437         (HTMLElementImpl::addCSSLength):
1438         (HTMLElementImpl::addHTMLAlignment):
1439         * khtml/html/html_elementimpl.h:
1440         * khtml/html/html_formimpl.cpp:
1441         (HTMLGenericFormElementImpl::parseAttribute):
1442         (HTMLInputElementImpl::parseAttribute):
1443         (HTMLInputElementImpl::attach):
1444         (HTMLSelectElementImpl::parseAttribute):
1445         (HTMLKeygenElementImpl::parseAttribute):
1446         (HTMLKeygenElementImpl::encoding):
1447         (HTMLOptionElementImpl::parseAttribute):
1448         (HTMLTextAreaElementImpl::parseAttribute):
1449         * khtml/html/html_formimpl.h:
1450         * khtml/html/html_headimpl.cpp:
1451         (HTMLLinkElementImpl::parseAttribute):
1452         (HTMLStyleElementImpl::parseAttribute):
1453         * khtml/html/html_imageimpl.cpp:
1454         (HTMLImageElementImpl::parseAttribute):
1455         (HTMLAreaElementImpl::parseAttribute):
1456         * khtml/html/html_inlineimpl.cpp:
1457         (HTMLAnchorElementImpl::parseAttribute):
1458         * khtml/html/html_listimpl.cpp:
1459         (HTMLOListElementImpl::parseAttribute):
1460         (HTMLLIElementImpl::parseAttribute):
1461         * khtml/html/html_miscimpl.cpp:
1462         (HTMLCollectionImpl::getNamedItem):
1463         (HTMLFormCollectionImpl::getNamedFormItem):
1464         (HTMLFormCollectionImpl::getNamedImgItem):
1465         * khtml/html/html_objectimpl.cpp:
1466         (HTMLEmbedElementImpl::parseAttribute):
1467         (HTMLObjectElementImpl::parseAttribute):
1468         (HTMLParamElementImpl::HTMLParamElementImpl):
1469         (HTMLParamElementImpl::~HTMLParamElementImpl):
1470         (HTMLParamElementImpl::parseAttribute):
1471         * khtml/html/html_objectimpl.h:
1472         (DOM::HTMLParamElementImpl::name):
1473         (DOM::HTMLParamElementImpl::value):
1474         * khtml/html/html_tableimpl.cpp:
1475         (HTMLTableElementImpl::parseAttribute):
1476         (HTMLTablePartElementImpl::parseAttribute):
1477         (HTMLTableCellElementImpl::parseAttribute):
1478         (HTMLTableColElementImpl::parseAttribute):
1479         * khtml/html/htmlparser.cpp:
1480         (KHTMLParser::insertNode):
1481         (KHTMLParser::handleIsindex):
1482         * khtml/html/htmltokenizer.cpp:
1483         (HTMLTokenizer::parseTag):
1484         * khtml/html/htmltokenizer.h:
1485         (khtml::Token::addAttribute):
1486         * khtml/khtml_part.cpp:
1487         (KHTMLPart::init):
1488         * khtml/khtmlview.cpp:
1489         (KHTMLToolTip::maybeTip):
1490         * khtml/xml/dom_atomicstring.cpp: Added.
1491         (DOM::AtomicStringStatisticsExitLogger::~AtomicStringStatisticsExitLogger):
1492         (DOM::AtomicString::equal):
1493         (DOM::AtomicString::add):
1494         (DOM::AtomicString::insert):
1495         (DOM::AtomicString::remove):
1496         (DOM::AtomicString::expand):
1497         (DOM::AtomicString::shrink):
1498         (DOM::AtomicString::rehash):
1499         (DOM::AtomicString::init):
1500         (DOM::operator==):
1501         (DOM::equalsIgnoreCase):
1502         * khtml/xml/dom_atomicstring.h: Added.
1503         (DOM::AtomicString::AtomicString):
1504         (DOM::AtomicString:::m_string):
1505         (DOM::AtomicString::operator const DOMString&):
1506         (DOM::AtomicString::domString):
1507         (DOM::AtomicString::string):
1508         (DOM::AtomicString::implementation):
1509         (DOM::AtomicString::unicode):
1510         (DOM::AtomicString::length):
1511         (DOM::AtomicString::ascii):
1512         (DOM::AtomicString::find):
1513         (DOM::AtomicString::toInt):
1514         (DOM::AtomicString::percentage):
1515         (DOM::AtomicString::toLengthArray):
1516         (DOM::AtomicString::isNull):
1517         (DOM::AtomicString::isEmpty):
1518         (DOM::AtomicString::equal):
1519         (DOM::operator==):
1520         (DOM::operator!=):
1521         * khtml/xml/dom_atomicstringlist.h: Added.
1522         (DOM::AtomicStringList:::m_next):
1523         (DOM::AtomicStringList::m_next):
1524         (DOM::AtomicStringList::~AtomicStringList):
1525         (DOM::AtomicStringList::next):
1526         (DOM::AtomicStringList::setNext):
1527         (DOM::AtomicStringList::string):
1528         (DOM::AtomicStringList::setString):
1529         (DOM::AtomicStringList::clone):
1530         (DOM::AtomicStringList::clear):
1531         * khtml/xml/dom_docimpl.h:
1532         * khtml/xml/dom_elementimpl.cpp:
1533         (AttrImpl::nodeValue):
1534         (AttrImpl::cloneNode):
1535         (ElementImpl::getAttribute):
1536         (ElementImpl::getAttributeNS):
1537         (ElementImpl::setAttribute):
1538         (ElementImpl::setAttributeMap):
1539         (ElementImpl::attach):
1540         (ElementImpl::detach):
1541         (ElementImpl::updateId):
1542         (NamedAttrMapImpl::setNamedItem):
1543         (NamedAttrMapImpl::removeNamedItem):
1544         (NamedAttrMapImpl::getAttributeItem):
1545         (NamedAttrMapImpl::operator=):
1546         (NamedAttrMapImpl::removeAttribute):
1547         * khtml/xml/dom_elementimpl.h:
1548         (DOM::AttributeImpl::AttributeImpl):
1549         (DOM::AttributeImpl::value):
1550         (DOM::AttributeImpl::prefix):
1551         (DOM::AttributeImpl::isNull):
1552         (DOM::AttributeImpl::isEmpty):
1553         (DOM::AttributeImpl::setValue):
1554         (DOM::AttributeImpl::setPrefix):
1555         (DOM::ElementImpl::getAttribute):
1556         * khtml/xml/dom_nameimpl.cpp: Removed.
1557         * khtml/xml/dom_nameimpl.h:
1558         (DOM::Name::namespaceURI):
1559         (DOM::Name::localName):
1560         * khtml/xml/dom_nodeimpl.h:
1561         * khtml/xml/dom_stringimpl.cpp:
1562         * kwq/KWQFont.mm:
1563         (QFont::family):
1564         * kwq/KWQFontFamily.h:
1565         (KWQFontFamily::family):
1566         * kwq/KWQFontFamily.mm:
1567         (retainDOMStringImpl):
1568         (releaseDOMStringImpl):
1569         (KWQFontFamily::getNSFamily):
1570         (KWQFontFamily::setFamily):
1571         (KWQFontFamily::operator==):
1572         * kwq/KWQKHTMLPart.mm:
1573         (KWQKHTMLPart::fileWrapperForElement):
1574         * kwq/WebCoreBridge.mm:
1575         (-[WebCoreBridge elementAtPoint:]):
1576
1577 2004-01-29  Chris Blumenberg  <cblu@apple.com>
1578
1579         Fixed: <rdar://problem/3543619>: copied HTML is strangely formatted, random whitespace and return characters
1580
1581         Reviewed by dave.
1582
1583         * khtml/xml/dom_nodeimpl.cpp:
1584         (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
1585
1586 2004-01-28  John Sullivan  <sullivan@apple.com>
1587
1588         Reviewed by Dave.
1589
1590         * khtml/rendering/render_text.cpp:
1591         (RenderText::paintObject):
1592         Increment s in the while() clause so it is incremented even
1593         after a continue statement. This fixes an infinite loop I ran
1594         into in the printing code path at certain scaled print sizes
1595         on certain pages.
1596
1597 2004-01-28  Chris Blumenberg  <cblu@apple.com>
1598
1599         Fixed: <rdar://problem/3543041>: when pasting an image, cursor should be after the image, not before
1600
1601         Reviewed by rjw.
1602
1603         * khtml/xml/dom_docimpl.cpp:
1604         (DocumentImpl::pasteHTMLString): when the last node of the paste is non-text, use 1 instead of 0 as the start offset of the caret
1605
1606 2004-01-28  Ken Kocienda  <kocienda@apple.com>
1607
1608         Reviewed by Hyatt
1609
1610         A small collection of fixes and improvements to editing.
1611
1612         Added a forwarding header for dom_position.h
1613         Added some debugging output to KHTMLSelection
1614         Added support for left arrow navigation.
1615         Greatly improved support for right arrow navigation.
1616         Added include guards to dom_position.h. Oops!
1617         Removed pruneEmptyNodes() function from htmlediting.cpp. That was crack.
1618         Improved the text insert command so that it splits the text node being
1619             operated on only when necessary.
1620         Added support for placing the caret in and arrowing into BR elements.
1621         Moved precedesLineBreak/followsLineBreak from RenderText to RenderObject.       
1622
1623         * ForwardingHeaders/dom/dom_position.h: Added.
1624         * khtml/dom/dom_position.h:
1625         * khtml/editing/htmlediting.cpp:
1626         (InputTextCommand::apply):
1627         (DeleteTextCommand::apply):
1628         * khtml/khtml_selection.cpp:
1629         (KHTMLSelection::setSelection):
1630         (KHTMLSelection::alterSelection):
1631         (KHTMLSelection::update):
1632         (KHTMLSelection::previousCharacterPosition):
1633         (KHTMLSelection::nextCharacterPosition):
1634         (startAndEndLineNodesIncludingNode):
1635         (KHTMLSelection::debugRenderer):
1636         (KHTMLSelection::debugPosition):
1637         * khtml/khtml_selection.h:
1638         * khtml/rendering/render_br.cpp:
1639         (RenderBR::RenderBR):
1640         (RenderBR::position):
1641         (RenderBR::caretMaxOffset):
1642         (RenderBR::caretPos):
1643         * khtml/rendering/render_br.h:
1644         (khtml::RenderBR::xPos):
1645         (khtml::RenderBR::yPos):
1646         (khtml::RenderBR::height):
1647         * khtml/rendering/render_object.cpp:
1648         (RenderObject::precedesLineBreak):
1649         (RenderObject::followsLineBreak):
1650         (RenderObject::isEditable):
1651         * khtml/rendering/render_object.h:
1652         * khtml/rendering/render_text.cpp:
1653         (RenderText::caretPos):
1654         (RenderText::position):
1655         (RenderText::caretMaxOffset):
1656         * khtml/rendering/render_text.h:
1657         * khtml/xml/dom_elementimpl.cpp:
1658         (ElementImpl::defaultEventHandler):
1659
1660 2004-01-28  David Hyatt  <hyatt@apple.com>
1661
1662         Fix for 3537694, make blocks for parents of inline children be axobjects.
1663         
1664         Reviewed by kocienda
1665
1666         * kwq/KWQAccObject.mm:
1667         (-[KWQAccObject role]):
1668         (-[KWQAccObject accessibilityIsIgnored]):
1669
1670 2004-01-28  David Hyatt  <hyatt@apple.com>
1671
1672         Make AtomicString a new class that owns DOMStrings, instead of using KJS::Identifier.  One day when we
1673         convert DOMString and UString to have the same underlying rep, then these classes could possibly re-merge.
1674         For now this provides an easy migration path for all the code that is using DOMStringImpl*.
1675
1676         Also fixed a bug with float clearing in the style cascade.
1677         
1678         Reviewed by darin
1679
1680         * khtml/css/cssparser.h:
1681         (DOM::atomicString):
1682         * khtml/css/cssstyleselector.cpp:
1683         (khtml::CSSStyleSelector::checkOneSelector):
1684         (khtml::CSSStyleSelector::applyRule):
1685         * khtml/dom/dom_string.cpp:
1686         (DOMString::DOMString):
1687         * khtml/xml/dom_nameimpl.cpp:
1688         (DOM::AtomicStringStatisticsExitLogger::~AtomicStringStatisticsExitLogger):
1689         (DOM::AtomicString::equal):
1690         (DOM::AtomicString::add):
1691         (DOM::AtomicString::insert):
1692         (DOM::AtomicString::remove):
1693         (DOM::AtomicString::expand):
1694         (DOM::AtomicString::shrink):
1695         (DOM::AtomicString::rehash):
1696         (DOM::AtomicString::null):
1697         (DOM::AtomicString::init):
1698         (DOM::operator==):
1699         (DOM::equalsIgnoreCase):
1700         * khtml/xml/dom_nameimpl.h:
1701         (DOM::AtomicString::AtomicString):
1702         (DOM::AtomicString:::m_string):
1703         (DOM::AtomicString::string):
1704         (DOM::AtomicString::qstring):
1705         (DOM::AtomicString::implementation):
1706         (DOM::AtomicString::unicode):
1707         (DOM::AtomicString::length):
1708         (DOM::AtomicString::ascii):
1709         (DOM::AtomicString::find):
1710         (DOM::AtomicString::isNull):
1711         (DOM::AtomicString::isEmpty):
1712         (DOM::AtomicString::equal):
1713         (DOM::operator==):
1714         (DOM::operator!=):
1715         * khtml/xml/dom_stringimpl.cpp:
1716         (DOM::DOMStringImpl::empty):
1717         (DOM::DOMStringImpl::DOMStringImpl):
1718         (DOM::DOMStringImpl::~DOMStringImpl):
1719         (DOM::DOMStringImpl::append):
1720         (DOM::DOMStringImpl::insert):
1721         (DOM::DOMStringImpl::truncate):
1722         (DOM::DOMStringImpl::remove):
1723         (DOM::DOMStringImpl::split):
1724         (DOM::DOMStringImpl::substring):
1725         (DOM::DOMStringImpl::replace):
1726         (DOM::DOMStringImpl::computeHash):
1727         * khtml/xml/dom_stringimpl.h:
1728         (DOM::DOMStringImpl::DOMStringImpl):
1729         (DOM::DOMStringImpl::hash):
1730         * khtml/xml/dom_textimpl.cpp:
1731         (CharacterDataImpl::CharacterDataImpl):
1732
1733 2004-01-27  Chris Blumenberg  <cblu@apple.com>
1734
1735         Fixed:
1736         <rdar://problem/3541812>: Implement Paste menu item
1737         <rdar://problem/3541814>: Implement Delete menu item
1738         <rdar://problem/3541811>: Implement Cut menu item
1739
1740         Reviewed by dave.
1741
1742         * khtml/xml/dom_docimpl.cpp:
1743         (DocumentImpl::deleteSelection): new
1744         (DocumentImpl::pasteHTMLString): new
1745         * khtml/xml/dom_docimpl.h:
1746         * kwq/WebCoreBridge.h:
1747         * kwq/WebCoreBridge.mm:
1748         (-[WebCoreBridge isEditable]): new
1749         (-[WebCoreBridge pasteHTMLString:]): new
1750         (-[WebCoreBridge deleteSelection]): new
1751         (-[WebCoreBridge haveSelection]): new
1752
1753 2004-01-27  David Hyatt  <hyatt@apple.com>
1754
1755         Add a new AtomicString type (that is really just a KJS::Identifier).  Define a Name class that will eventually
1756         be used for element and attribute names.
1757
1758         Atomize the CSS selector's "value" field, used to hold class names, identifier names, attribute values, and
1759         pseudo-element names.
1760         
1761         Reviewed by rjw
1762
1763         * ForwardingHeaders/kjs/identifier.h: Added.
1764         * WebCore.pbproj/project.pbxproj:
1765         * khtml/css/css_base.cpp:
1766         (CSSSelector::print):
1767         (CSSSelector::specificity):
1768         (CSSSelector::extractPseudoType):
1769         (CSSSelector::selectorText):
1770         * khtml/css/css_base.h:
1771         (DOM::CSSSelector::):
1772         * khtml/css/cssparser.cpp:
1773         (ParseString::lower):
1774         * khtml/css/cssparser.h:
1775         (DOM::atomicString):
1776         * khtml/css/cssstyleselector.cpp:
1777         (khtml::CSSStyleSelector::checkOneSelector):
1778         * khtml/css/parser.cpp:
1779         * khtml/css/parser.y:
1780         * khtml/html/html_elementimpl.cpp:
1781         (:NamedAttrMapImpl):
1782         (HTMLNamedAttrMapImpl::clearAttributes):
1783         (HTMLNamedAttrMapImpl::isHTMLAttributeMap):
1784         (HTMLNamedAttrMapImpl::parseClassAttribute):
1785         (HTMLNamedAttrMapImpl::matchesCSSClass):
1786         (HTMLElementImpl::parseAttribute):
1787         (HTMLElementImpl::createAttributeMap):
1788         (HTMLElementImpl::matchesCSSClass):
1789         * khtml/html/html_elementimpl.h:
1790         * khtml/html/html_objectimpl.cpp:
1791         (HTMLObjectElementImpl::recalcStyle):
1792         * khtml/html/htmltokenizer.h:
1793         (khtml::Token::addAttribute):
1794         * khtml/xml/dom_elementimpl.cpp:
1795         (ElementImpl::matchesCSSClass):
1796         (NamedAttrMapImpl::isHTMLAttributeMap):
1797         (NamedAttrMapImpl::operator=):
1798         * khtml/xml/dom_elementimpl.h:
1799         * khtml/xml/dom_nameimpl.cpp: Added.
1800         (DOM::AtomicStringList::clone):
1801         (DOM::operator==):
1802         (DOM::equalsIgnoreCase):
1803         * khtml/xml/dom_nameimpl.h: Added.
1804         (DOM::AtomicStringList:::m_next):
1805         (DOM::AtomicStringList::m_next):
1806         (DOM::AtomicStringList::~AtomicStringList):
1807         (DOM::AtomicStringList::next):
1808         (DOM::AtomicStringList::setNext):
1809         (DOM::AtomicStringList::string):
1810         (DOM::AtomicStringList::setString):
1811         (DOM::AtomicStringList::clear):
1812         (DOM::Name::Name):
1813         (DOM::Name::m_localName):
1814         (DOM::Name::namespaceURI):
1815         (DOM::Name::localName):
1816         (DOM::operator==):
1817         (DOM::operator!=):
1818         * khtml/xml/dom_nodeimpl.h:
1819
1820 2004-01-27  Darin Adler  <darin@apple.com>
1821
1822         Reviewed by Ken.
1823
1824         - fixed <rdar://problem/3526056>: W3C says that DEL key identifier should be U+00007F, we give ForwardDelete instead
1825
1826         * kwq/KWQEvent.mm: (keyIdentifierForKeyEvent): Correct the key identifiers for the Delete, Insert,
1827         Menu, Scroll Lock, and Select keys, as well as some obscure F25 and higher keys. Also add some
1828         explicit constants for the keys defined in NSEvent.h that we map to a key identifier using the
1829         vendor-area Unicode values (which are probably not appropriate).
1830
1831 2004-01-27  David Hyatt  <hyatt@apple.com>
1832
1833         Make a change suggested by kocienda to add a remove() method to InlineBoxes.
1834         
1835         Reviewed by kocienda
1836
1837         * khtml/rendering/render_box.cpp:
1838         (RenderBox::detach):
1839         (RenderBox::position):
1840         * khtml/rendering/render_line.cpp:
1841         (InlineBox::remove):
1842         * khtml/rendering/render_line.h:
1843         * khtml/rendering/render_text.cpp:
1844         (RenderText::detach):
1845         (RenderText::position):
1846
1847 2004-01-26  Darin Adler  <darin@apple.com>
1848
1849         Reviewed by Maciej.
1850
1851         - follow-on to the text-align change I did earlier today
1852
1853         * khtml/css/html4.css: Set input and textarea so they do not inherit text-align
1854         from their parent by doing "text-align: -khtml-auto". This fixes google.com among others.
1855
1856 2004-01-26  Darin Adler  <darin@apple.com>
1857
1858         Reviewed by Maciej.
1859
1860         - fixed <rdar://problem/3539414>: pop-up windows appear very narrow because of bogus width (carad.com/ebaymotors)
1861
1862         * khtml/ecma/kjs_window.cpp: (WindowFunc::tryCall): Check the "OK" result from toFloat in
1863         window.open, and omit any parameters that can't be parsed.
1864
1865 2004-01-26  Darin Adler  <darin@apple.com>
1866
1867         Reviewed by Maciej.
1868
1869         - fixed <rdar://problem/3537371>: REGRESSION (100-125): optgroup labels are no longer indented as they were before
1870
1871         * khtml/rendering/render_form.cpp: (RenderSelect::updateFromElement):
1872         Move code that adds spaces after code that strips whitespace. Also simplify
1873         the code a bit by using DOMString::string().
1874
1875 2004-01-26  Darin Adler  <darin@apple.com>
1876
1877         Reviewed by Dave.
1878
1879         - fixed <rdar://problem/3539286>: text with a transparent background color pastes as black on black
1880
1881         * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::attributedString): Don't put color in the mutable
1882         string if it's entirely transparent.
1883         * kwq/KWQColor.mm: (QColor::getNSColor): Fix bug where we would return nil for RGBA of 0.
1884
1885 2004-01-26  Darin Adler  <darin@apple.com>
1886
1887         Reviewed by Maciej.
1888
1889         - fixed <rdar://problem/3529120>: text-align style property not respected on input fields
1890
1891         * khtml/rendering/render_form.h: Added textAlignment function.
1892         * khtml/rendering/render_form.cpp:
1893         (RenderFormElement::textAlignment): Added. Converts style alignment to Qt alignment.
1894         (RenderLineEdit::setStyle): Call textAlignment intead of using direction from style.
1895         (RenderTextArea::setStyle): Call textAlignment intead of using direction from style.
1896
1897         * kwq/KWQLineEdit.h: Added KWQNSTextAlignmentForAlignmentFlags function.
1898         * kwq/KWQLineEdit.mm:
1899         (QLineEdit::setAlignment): Use KWQNSTextAlignmentForAlignmentFlags instead of code
1900         that handles only left and right alignment.
1901         (KWQNSTextAlignmentForAlignmentFlags): Added. Converts Qt alignment to NS alignment.
1902         * kwq/KWQTextEdit.mm: (QTextEdit::setAlignment): Use KWQNSTextAlignmentForAlignmentFlags
1903         instead of code that handles only left and right alignment.
1904
1905 2004-01-26  Darin Adler  <darin@apple.com>
1906
1907         Reviewed by Dave.
1908
1909         - fixed <rdar://problem/3477707>: background image with apostrophe in name missing at http://www.nbc.com
1910
1911         * khtml/html/html_baseimpl.cpp: (HTMLBodyElementImpl::parseAttribute): Use addCSSImageProperty
1912         instead of addCSSProperty, obviating the need for the "url()" syntax (and fixing quoting issues).
1913
1914         * khtml/html/html_tableimpl.cpp:
1915         (HTMLTableElementImpl::parseAttribute): Ditto.
1916         (HTMLTablePartElementImpl::parseAttribute): Ditto.
1917
1918         * khtml/html/html_elementimpl.h: Added addCSSStringProperty and addCSSImageProperty.
1919         * khtml/html/html_elementimpl.cpp:
1920         (HTMLElementImpl::addCSSStringProperty): Added. Calls setStringProperty. Not used yet.
1921         (HTMLElementImpl::addCSSImageProperty): Added. Calls setImageProperty.
1922
1923         * khtml/css/css_valueimpl.h: Added setStringProperty and setImageProperty.
1924         * khtml/css/css_valueimpl.cpp:
1925         (CSSStyleDeclarationImpl::setStringProperty): Added. Sets a property without parsing.
1926         (CSSStyleDeclarationImpl::setImageProperty): Added. Sets a property without parsing.
1927         You'd think we'd be able to just use setStringProperty, but that's not how the image
1928         properties work.
1929
1930 2004-01-26  Darin Adler  <darin@apple.com>
1931
1932         * Makefile.am: Switch from pbxbuild to xcodebuild.
1933
1934 2004-01-26  David Hyatt  <hyatt@apple.com>
1935
1936         Add CSS3 @namespace support.  The whole way namespaces, element, and attribute names are being handled
1937         right now is temporary.  This code gives us a baseline of functionality (for regression testing) that we
1938         can use when we implement namespaces "the right way."
1939         
1940         Reviewed by darin
1941
1942         * WebCore.pbproj/project.pbxproj:
1943         * khtml/css/css_base.cpp:
1944         (CSSSelector::specificity):
1945         (CSSSelector::selectorText):
1946         * khtml/css/css_base.h:
1947         (DOM::CSSNamespace::m_parent):
1948         (DOM::CSSNamespace::~CSSNamespace):
1949         (DOM::CSSNamespace::uri):
1950         (DOM::CSSNamespace::prefix):
1951         (DOM::CSSNamespace::namespaceForPrefix):
1952         (DOM::CSSSelector::CSSSelector):
1953         * khtml/css/css_stylesheetimpl.cpp:
1954         (CSSStyleSheetImpl::CSSStyleSheetImpl):
1955         (CSSStyleSheetImpl::addNamespace):
1956         (CSSStyleSheetImpl::determineNamespace):
1957         * khtml/css/css_stylesheetimpl.h:
1958         (DOM::CSSStyleSheetImpl::~CSSStyleSheetImpl):
1959         * khtml/css/cssparser.cpp:
1960         (CSSParser::CSSParser):
1961         (CSSParser::parseSheet):
1962         * khtml/css/cssparser.h:
1963         * khtml/css/cssstyleselector.cpp:
1964         (khtml::CSSStyleSelector::styleForElement):
1965         (khtml::CSSStyleSelector::pseudoStyleForElement):
1966         (khtml::CSSStyleSelector::checkSelector):
1967         (khtml::CSSStyleSelector::checkOneSelector):
1968         (khtml::CSSStyleSelector::buildLists):
1969         * khtml/css/html4.css:
1970         * khtml/css/parser.cpp:
1971         * khtml/css/parser.y:
1972         * khtml/xml/dom_docimpl.cpp:
1973         (DocumentImpl::DocumentImpl):
1974         (DocumentImpl::~DocumentImpl):
1975         (DocumentImpl::attrId):
1976         (DocumentImpl::attrName):
1977         (DocumentImpl::tagId):
1978         (DocumentImpl::tagName):
1979         (DocumentImpl::namespaceURI):
1980         * khtml/xml/dom_elementimpl.cpp:
1981         (NamedAttrMapImpl::getAttributeItem):
1982         * khtml/xml/dom_nodeimpl.cpp:
1983         (NodeImpl::checkSetPrefix):
1984         * khtml/xml/dom_nodeimpl.h:
1985         (DOM::namespacePart):
1986         (DOM::localNamePart):
1987         (DOM::makeId):
1988         * khtml/xml/dom_xmlimpl.cpp:
1989         (ProcessingInstructionImpl::checkStyleSheet):
1990         * khtml/xml/xml_namespace_table.cpp: Added.
1991         (DOM::XmlNamespaceTable::getNamespaceID):
1992         (DOM::XmlNamespaceTable::getNamespaceURI):
1993         * khtml/xml/xml_namespace_table.h: Added.
1994         (DOM::XmlNamespaceEntry::m_uri):
1995
1996 2004-01-26  Darin Adler  <darin@apple.com>
1997
1998         Reviewed by Dave.
1999
2000         - fixed <rdar://problem/3532519>: <select> menus show label property instead of tag contents (ups.com time and cost site)
2001
2002         * khtml/html/html_formimpl.cpp: (HTMLOptionElementImpl::text): Ignore the label property as
2003         a quirk. Neither WinIE nor Mozilla implement the label property, so neither shall we (except
2004         on strict pages, where we just go crazy and do everything "right").
2005
2006 2004-01-26  Ken Kocienda  <kocienda@apple.com>
2007
2008         Reviewed by Hyatt
2009
2010         * khtml/rendering/render_line.h:
2011         (khtml::InlineBox::isFirstLineStyle): Helper to return whether
2012         the line box has the first line style bit set.
2013         * khtml/rendering/render_text.cpp:
2014         (RenderText::caretPos): Noe correctly accounts for white space
2015         which can precede an inline text box.
2016
2017 2004-01-26  David Hyatt  <hyatt@apple.com>
2018
2019         Remove incremental repainting ifdef.
2020
2021         * khtml/khtmlview.h:
2022         * khtml/rendering/bidi.cpp:
2023         (khtml::RenderBlock::layoutInlineChildren):
2024         * khtml/rendering/render_block.cpp:
2025         (khtml::RenderBlock::layoutBlock):
2026         (khtml::RenderBlock::layoutBlockChildren):
2027         (khtml::RenderBlock::repaintObjectsBeforeLayout):
2028         (khtml::RenderBlock::positionNewFloats):
2029         * khtml/rendering/render_block.h:
2030         * khtml/rendering/render_box.cpp:
2031         (RenderBox::computeAbsoluteRepaintRect):
2032         (RenderBox::repaintDuringLayoutIfMoved):
2033         * khtml/rendering/render_box.h:
2034         * khtml/rendering/render_container.cpp:
2035         (RenderContainer::removeChildNode):
2036         * khtml/rendering/render_flexbox.cpp:
2037         (khtml::RenderFlexibleBox::layoutBlock):
2038         (khtml::RenderFlexibleBox::placeChild):
2039         * khtml/rendering/render_flow.cpp:
2040         (RenderFlow::getAbsoluteRepaintRect):
2041         * khtml/rendering/render_image.cpp:
2042         (RenderImage::layout):
2043         * khtml/rendering/render_layer.cpp:
2044         (RenderLayer::RenderLayer):
2045         (RenderLayer::computeRepaintRects):
2046         (RenderLayer::updateLayerPositions):
2047         (RenderLayer::updateLayerPosition):
2048         (RenderLayer::paintLayer):
2049         * khtml/rendering/render_layer.h:
2050         (khtml::RenderLayer::relativePositionOffset):
2051         * khtml/rendering/render_object.cpp:
2052         (RenderObject::setNeedsLayout):
2053         (RenderObject::setChildNeedsLayout):
2054         (RenderObject::markContainingBlocksForLayout):
2055         (RenderObject::getAbsoluteRepaintRectIncludingFloats):
2056         (RenderObject::detach):
2057         (RenderObject::scheduleRelayout):
2058         * khtml/rendering/render_object.h:
2059         * khtml/rendering/render_table.cpp:
2060         (RenderTable::layout):
2061         (RenderTableSection::layoutRows):
2062
2063 2004-01-26  David Hyatt  <hyatt@apple.com>
2064
2065         Preserve the integrity of the line box tree when elements get removed.  Change RenderText over to using
2066         the same data structures as inlines and blocks for maintaining its list of line boxes.
2067         
2068         Reviewed by kocienda
2069
2070         * khtml/khtml_part.cpp:
2071         (KHTMLPart::text):
2072         (KHTMLPart::customEvent):
2073         * khtml/khtml_selection.cpp:
2074         (KHTMLSelection::nextCharacterPosition):
2075         (firstRunAt):
2076         (lastRunAt):
2077         * khtml/rendering/bidi.cpp:
2078         (khtml::RenderBlock::layoutInlineChildren):
2079         * khtml/rendering/render_block.cpp:
2080         (khtml::RenderBlock::removeChild):
2081         * khtml/rendering/render_box.cpp:
2082         (RenderBox::RenderBox):
2083         (RenderBox::detach):
2084         (RenderBox::position):
2085         (RenderBox::inlineBoxWrapper):
2086         (RenderBox::deleteLineBoxWrapper):
2087         * khtml/rendering/render_box.h:
2088         * khtml/rendering/render_container.cpp:
2089         (RenderContainer::removeChildNode):
2090         * khtml/rendering/render_flow.cpp:
2091         (RenderFlow::detach):
2092         * khtml/rendering/render_line.cpp:
2093         (InlineFlowBox::removeChild):
2094         * khtml/rendering/render_line.h:
2095         (khtml::InlineBox::nextOnLine):
2096         (khtml::InlineBox::prevOnLine):
2097         (khtml::InlineBox::setNextOnLine):
2098         (khtml::InlineBox::setPrevOnLine):
2099         (khtml::InlineRunBox::prevLineBox):
2100         (khtml::InlineRunBox::nextLineBox):
2101         * khtml/rendering/render_object.cpp:
2102         (RenderObject::isEditable):
2103         (RenderObject::inlineBoxWrapper):
2104         (RenderObject::deleteLineBoxWrapper):
2105         * khtml/rendering/render_object.h:
2106         (khtml::RenderObject::documentBeingDestroyed):
2107         * khtml/rendering/render_text.cpp:
2108         (RenderText::RenderText):
2109         (RenderText::detach):
2110         (RenderText::deleteTextBoxes):
2111         (RenderText::absoluteRects):
2112         (RenderText::findNextInlineTextBox):
2113         (RenderText::nodeAtPoint):
2114         (RenderText::checkSelectionPointIgnoringContinuations):
2115         (RenderText::caretPos):
2116         (RenderText::paintObject):
2117         (RenderText::paint):
2118         (RenderText::minXPos):
2119         (RenderText::xPos):
2120         (RenderText::yPos):
2121         (RenderText::height):
2122         (RenderText::createInlineBox):
2123         (RenderText::position):
2124         (RenderText::width):
2125         (RenderText::caretMinOffset):
2126         (RenderText::caretMaxOffset):
2127         * khtml/rendering/render_text.h:
2128         (khtml::InlineTextBox:::InlineRunBox):
2129         (khtml::InlineTextBox::nextTextBox):
2130         (khtml::InlineTextBox::prevTextBox):
2131         (khtml::RenderText::firstTextBox):
2132         (khtml::RenderText::lastTextBox):
2133         * kwq/KWQAccObject.mm:
2134         (-[KWQAccObject accessibilityIsIgnored]):
2135         * kwq/KWQDef.h:
2136         * kwq/KWQKHTMLPart.mm:
2137         (KWQKHTMLPart::attributedString):
2138         * kwq/KWQRenderTreeDebug.cpp:
2139         (write):
2140
2141 2004-01-24  David Hyatt  <hyatt@apple.com>
2142
2143         Polish the error message from the xml tokenizer.
2144
2145         * khtml/xml/xml_tokenizer.cpp:
2146         (XMLTokenizer::finish):
2147
2148 2004-01-23  Ken Kocienda  <kocienda@apple.com>
2149
2150         Reviewed by Richard
2151
2152         * kwq/KWQKHTMLPart.mm:
2153         (KWQKHTMLPart::setShowsFirstResponder): Now adjusts caret visibility
2154         apprpropriately.
2155
2156 2004-01-23  David Hyatt  <hyatt@apple.com>
2157
2158         Stub out @namespace support.  Implement the callbacks into the stylesheet that will enable us to
2159         store namespace information for simple selectors.
2160
2161         Basically with this patch we no longer bomb when we encounter namespaced stylesheets, but we don't handle
2162         them properly yet either.
2163         
2164         Reviewed by kocienda
2165
2166         * khtml/css/css_stylesheetimpl.cpp:
2167         (CSSStyleSheetImpl::addNamespace):
2168         (CSSStyleSheetImpl::determineNamespace):
2169         * khtml/css/css_stylesheetimpl.h:
2170         * khtml/css/cssparser.cpp:
2171         (DOM::CSSParser::lex):
2172         * khtml/css/cssparser.h:
2173         * khtml/css/parser.cpp:
2174         * khtml/css/parser.h:
2175         * khtml/css/parser.y:
2176         * khtml/css/tokenizer.cpp:
2177         * khtml/css/tokenizer.flex:
2178
2179 2004-01-23  Ken Kocienda  <kocienda@apple.com>
2180
2181         Reviewed by Hyatt
2182
2183         Merged HTML editing progress to TOT from the branch
2184         I have been maintaining.
2185
2186         * khtml/dom/dom_position.cpp: Added.
2187         * khtml/dom/dom_position.h: Added.
2188         * khtml/editing/htmlediting.cpp: Added.
2189         * khtml/editing/htmlediting.h: Added.
2190         * khtml/khtml_selection.cpp: Added.
2191         * khtml/khtml_selection.h: Added.
2192
2193 2004-01-22  David Hyatt  <hyatt@apple.com>
2194
2195         Fix a bug I accidentally introduced in static positioned elements.  Add more margin collapsing tests.
2196         
2197         * ChangeLog:
2198         * khtml/rendering/render_block.cpp:
2199         (khtml::RenderBlock::layoutBlockChildren):
2200         * layout-tests/fast/block/margin-collapse/044-expected.txt: Added.
2201         * layout-tests/fast/block/margin-collapse/044.html: Added.
2202         * layout-tests/fast/block/margin-collapse/045-expected.txt: Added.
2203         * layout-tests/fast/block/margin-collapse/045.html: Added.
2204         * layout-tests/fast/block/margin-collapse/062-expected.txt: Added.
2205         * layout-tests/fast/block/margin-collapse/062.html: Added.
2206         * layout-tests/fast/block/margin-collapse/063-expected.txt: Added.
2207         * layout-tests/fast/block/margin-collapse/063.html: Added.
2208         * layout-tests/fast/block/positioning/007-expected.txt:
2209
2210 2004-01-22  David Hyatt  <hyatt@apple.com>
2211
2212         Reviewed by NOBODY (OOPS!).
2213
2214         * khtml/rendering/render_block.cpp:
2215         (khtml::RenderBlock::layoutBlockChildren):
2216         * layout-tests/fast/block/margin-collapse/062-expected.txt: Added.
2217         * layout-tests/fast/block/margin-collapse/062.html: Added.
2218         * layout-tests/fast/block/margin-collapse/063-expected.txt: Added.
2219         * layout-tests/fast/block/margin-collapse/063.html: Added.
2220         * layout-tests/fast/block/positioning/007-expected.txt:
2221
2222 2004-01-22  David Hyatt  <hyatt@apple.com>
2223
2224         (1) Implement better XML error handling.
2225         (2) Fix a minor z-index bug with the 'initial' value.
2226         (3) Initial landing of XBL support.  Code is all ifnef KHTML_NO_XBL so that it can be turned off easily if
2227         XBL never comes to fruition.
2228         
2229         Reviewed by darin
2230
2231         * ForwardingHeaders/xbl/xbl_binding_manager.h: Added.
2232         * ForwardingHeaders/xbl/xbl_docimpl.h: Added.
2233         * WebCore.pbproj/project.pbxproj:
2234         * khtml/css/cssparser.cpp:
2235         (CSSParser::parseValue):
2236         * khtml/css/cssproperties.c:
2237         (hash_prop):
2238         (findProp):
2239         * khtml/css/cssproperties.h:
2240         * khtml/css/cssproperties.in:
2241         * khtml/css/cssstyleselector.cpp:
2242         (khtml::CSSStyleSelector::applyRule):
2243         * khtml/dom/dom_element.cpp:
2244         (Element::getAttributeNS):
2245         * khtml/misc/loader.cpp:
2246         (CachedXBLDocument::CachedXBLDocument):
2247         (CachedXBLDocument::~CachedXBLDocument):
2248         (CachedXBLDocument::ref):
2249         (CachedXBLDocument::deref):
2250         (CachedXBLDocument::data):
2251         (CachedXBLDocument::checkNotify):
2252         (CachedXBLDocument::error):
2253         (DocLoader::requestXBLDocument):
2254         (Cache::requestXBLDocument):
2255         (CachedObjectClient::setXBLDocument):
2256         (Cache::getStatistics):
2257         * khtml/misc/loader.h:
2258         (khtml::CachedObject::):
2259         (khtml::CachedXBLDocument::document):
2260         (khtml::CachedXBLDocument::schedule):
2261         * khtml/misc/loader_client.h:
2262         * khtml/rendering/render_style.cpp:
2263         (bindingURI):
2264         (marquee):
2265         (StyleCSS3NonInheritedData::~StyleCSS3NonInheritedData):
2266         (StyleCSS3NonInheritedData::bindingsEquivalent):
2267         (StyleCSS3NonInheritedData::operator==):
2268         (:m_next):
2269         (BindingURI::~BindingURI):
2270         (BindingURI::copy):
2271         (BindingURI::operator==):
2272         (RenderStyle::addBindingURI):
2273         * khtml/rendering/render_style.h:
2274         (khtml::BindingURI::operator!=):
2275         (khtml::BindingURI::next):
2276         (khtml::BindingURI::setNext):
2277         (khtml::BindingURI::uri):
2278         (khtml::RenderStyle::bindingURIs):
2279         (khtml::RenderStyle::setHasAutoZIndex):
2280         (khtml::RenderStyle::setZIndex):
2281         (khtml::RenderStyle::deleteBindingURIs):
2282         (khtml::RenderStyle::inheritBindingURIs):
2283         * khtml/xbl/xbl_binding.cpp: Added.
2284         (XBL::m_markedForDeath):
2285         (XBL::XBLBindingChain::~XBLBindingChain):
2286         (XBL::XBLBindingChain::firstStyleBindingChain):
2287         (XBL::XBLBindingChain::lastBindingChain):
2288         (XBL::XBLBindingChain::insertBindingChain):
2289         (XBL::XBLBindingChain::markForDeath):
2290         (XBL::XBLBindingChain::loaded):
2291         (XBL::XBLBindingChain::hasStylesheets):
2292         (XBL::XBLBindingChain::failed):
2293         (XBL::m_nextBinding):
2294         (XBL::XBLBinding::~XBLBinding):
2295         (XBL::XBLBinding::loaded):
2296         (XBL::XBLBinding::setXBLDocument):
2297         * khtml/xbl/xbl_binding.h: Added.
2298         (XBL::):
2299         (XBL::XBLBindingChain::uri):
2300         (XBL::XBLBindingChain::nextChain):
2301         (XBL::XBLBindingChain::previousChain):
2302         (XBL::XBLBindingChain::setNextBindingChain):
2303         (XBL::XBLBindingChain::setPreviousBindingChain):
2304         (XBL::XBLBindingChain::markedForDeath):
2305         (XBL::XBLBindingChain::element):
2306         * khtml/xbl/xbl_binding_manager.cpp: Added.
2307         (XBL::m_bindingChainTable):
2308         (XBL::XBLBindingManager::~XBLBindingManager):
2309         (XBL::XBLBindingManager::getBindingChain):
2310         (XBL::XBLBindingManager::setBindingChain):
2311         (XBL::XBLBindingManager::loadBindings):
2312         (XBL::XBLBindingManager::checkLoadState):
2313         * khtml/xbl/xbl_binding_manager.h: Added.
2314         * khtml/xbl/xbl_docimpl.cpp: Added.
2315         (XBL:::DocumentImpl):
2316         (XBL::XBLDocumentImpl::~XBLDocumentImpl):
2317         (XBL::XBLDocumentImpl::createTokenHandler):
2318         (XBL::XBLDocumentImpl::setPrototypeBinding):
2319         (XBL::XBLDocumentImpl::prototypeBinding):
2320         * khtml/xbl/xbl_docimpl.h: Added.
2321         (XBL::):
2322         * khtml/xbl/xbl_protobinding.cpp: Added.
2323         (XBL::m_handler):
2324         (XBL::XBLPrototypeBinding::initialize):
2325         (XBL::XBLPrototypeBinding::document):
2326         (XBL::XBLPrototypeBinding::addResource):
2327         * khtml/xbl/xbl_protobinding.h: Added.
2328         (XBL::XBLPrototypeBinding::element):
2329         (XBL::XBLPrototypeBinding::setHandler):
2330         (XBL::XBLPrototypeBinding::handler):
2331         * khtml/xbl/xbl_protohandler.cpp: Added.
2332         (XBL::m_unused):
2333         (XBL::XBLPrototypeHandler::~XBLPrototypeHandler):
2334         (XBL::XBLPrototypeHandler::appendData):
2335         * khtml/xbl/xbl_protohandler.h: Added.
2336         (XBL::XBLPrototypeHandler::setNext):
2337         (XBL::XBLPrototypeHandler::next):
2338         * khtml/xbl/xbl_protoimplementation.cpp: Added.
2339         (XBL::m_compiled):
2340         (XBL::m_next):
2341         (XBL::XBLPrototypeMember::appendData):
2342         (XBL:::XBLPrototypeMember):
2343         (XBL::XBLPrototypeMethod::isConstructor):
2344         (XBL::XBLPrototypeMethod::isDestructor):
2345         (XBL::XBLPrototypeMethod::addParameter):
2346         (XBL:::XBLPrototypeMethod):
2347         (XBL::XBLPrototypeConstructor::isConstructor):
2348         (XBL::XBLPrototypeDestructor::isDestructor):
2349         (XBL::m_readonly):
2350         (XBL::XBLPrototypeProperty::appendGetterText):
2351         (XBL::XBLPrototypeProperty::appendSetterText):
2352         * khtml/xbl/xbl_protoimplementation.h: Added.
2353         (XBL::XBLPrototypeMember::~XBLPrototypeMember):
2354         (XBL::XBLPrototypeMember::setNext):
2355         (XBL::XBLPrototypeMember::next):
2356         (XBL::XBLPrototypeImplementation::~XBLPrototypeImplementation):
2357         (XBL::XBLPrototypeImplementation::setMember):
2358         (XBL::XBLPrototypeParameter::m_next):
2359         (XBL::XBLPrototypeParameter::~XBLPrototypeParameter):
2360         (XBL::XBLPrototypeParameter::next):
2361         (XBL::XBLPrototypeParameter::setNext):
2362         (XBL::):
2363         * khtml/xbl/xbl_tokenizer.cpp: Added.
2364         (XBL::XBLTokenHandler::XBLTokenHandler):
2365         (XBL::XBLTokenHandler::~XBLTokenHandler):
2366         (XBL::XBLTokenHandler::xblDocument):
2367         (XBL::XBLTokenHandler::startElement):
2368         (XBL::XBLTokenHandler::endElement):
2369         (XBL::XBLTokenHandler::characters):
2370         (XBL::XBLTokenHandler::createBinding):
2371         (XBL::XBLTokenHandler::createHandler):
2372         (XBL::XBLTokenHandler::createResource):
2373         (XBL::XBLTokenHandler::createImplementation):
2374         (XBL::XBLTokenHandler::addMember):
2375         (XBL::XBLTokenHandler::createConstructor):
2376         (XBL::XBLTokenHandler::createDestructor):
2377         (XBL::XBLTokenHandler::createField):
2378         (XBL::XBLTokenHandler::createProperty):
2379         (XBL::XBLTokenHandler::createMethod):
2380         (XBL::XBLTokenHandler::createParameter):
2381         * khtml/xbl/xbl_tokenizer.h: Added.
2382         (XBL::):
2383         * khtml/xml/dom_docimpl.cpp:
2384         (DocumentImpl::DocumentImpl):
2385         (DocumentImpl::~DocumentImpl):
2386         (DocumentImpl::createTokenHandler):
2387         (DocumentTypeImpl::DocumentTypeImpl):
2388         (DocumentTypeImpl::~DocumentTypeImpl):
2389         * khtml/xml/dom_docimpl.h:
2390         (DOM::DocumentImpl::bindingManager):
2391         * khtml/xml/dom_elementimpl.cpp:
2392         (ElementImpl::getAttributeNS):
2393         (ElementImpl::childAllowed):
2394         * khtml/xml/dom_elementimpl.h:
2395         (DOM::ElementImpl::getAttribute):
2396         * khtml/xml/dom_nodeimpl.cpp:
2397         * khtml/xml/xml_tokenizer.cpp:
2398         (XMLHandler::XMLHandler):
2399         (XMLHandler::startDocument):
2400         (XMLHandler::startElement):
2401         (XMLHandler::endElement):
2402         (XMLHandler::startCDATA):
2403         (XMLHandler::endCDATA):
2404         (XMLHandler::characters):
2405         (XMLHandler::comment):
2406         (XMLHandler::processingInstruction):
2407         (XMLHandler::warning):
2408         (XMLHandler::error):
2409         (XMLHandler::fatalError):
2410         (XMLTokenizer::finish):
2411         * khtml/xml/xml_tokenizer.h:
2412         * kwq/KWQXmlSimpleReader.h:
2413         (QXmlSimpleReader::sawError):
2414         (QXmlSimpleReader::recordError):
2415         * kwq/KWQXmlSimpleReader.mm:
2416         (warningHandler):
2417         (fatalErrorHandler):
2418         (normalErrorHandler):
2419         (QXmlSimpleReader::parse):
2420
2421 2004-01-22  Chris Blumenberg  <cblu@apple.com>
2422
2423         Fixed: <rdar://problem/3537542>: support for copying HTML
2424
2425         Reviewed by dave.
2426
2427         * khtml/xml/dom2_rangeimpl.cpp:
2428         (RangeImpl::toHTML): implemented
2429         * khtml/xml/dom_nodeimpl.cpp:
2430         (NodeImpl::recursive_toHTMLWithRange): new
2431         * khtml/xml/dom_nodeimpl.h:
2432         * kwq/WebCoreBridge.h:
2433         * kwq/WebCoreBridge.mm:
2434         (-[WebCoreBridge selectedHTML]): new
2435         (-[WebCoreBridge reconstructedSource]): new
2436
2437 2004-01-21  David Hyatt  <hyatt@apple.com>
2438
2439         Fix for two margin collapsing edge cases.
2440         
2441         Reviewed by darin
2442
2443         * khtml/rendering/render_block.cpp:
2444         (khtml::RenderBlock::layoutBlockChildren):
2445
2446 2004-01-21  David Hyatt  <hyatt@apple.com>
2447
2448         Switch from expat to libxml and implement namespace support in the simplereader.
2449         
2450         Reviewed by darin
2451
2452         * ChangeLog:
2453         * expat/Changes: Removed.
2454         * expat/MANIFEST: Removed.
2455         * expat/README: Removed.
2456         * expat/expat_config.h: Removed.
2457         * expat/lib/ascii.h: Removed.
2458         * expat/lib/asciitab.h: Removed.
2459         * expat/lib/expat.h: Removed.
2460         * expat/lib/iasciitab.h: Removed.
2461         * expat/lib/internal.h: Removed.
2462         * expat/lib/latin1tab.h: Removed.
2463         * expat/lib/nametab.h: Removed.
2464         * expat/lib/utf8tab.h: Removed.
2465         * expat/lib/xmlparse.c: Removed.
2466         * expat/lib/xmlrole.c: Removed.
2467         * expat/lib/xmlrole.h: Removed.
2468         * expat/lib/xmltok.c: Removed.
2469         * expat/lib/xmltok.h: Removed.
2470         * expat/lib/xmltok_impl.c: Removed.
2471         * expat/lib/xmltok_impl.h: Removed.
2472         * expat/lib/xmltok_ns.c: Removed.
2473         * kwq/KWQXmlAttributes.h:
2474         (QXmlAttributes::QXmlAttributes):
2475         (QXmlAttributes::qName):
2476         (QXmlAttributes::uri):
2477         * kwq/KWQXmlAttributes.mm:
2478         (QXmlAttributes::QXmlAttributes):
2479         (QXmlAttributes::~QXmlAttributes):
2480         (QXmlAttributes::operator=):
2481         (QXmlAttributes::localName):
2482         (QXmlAttributes::split):
2483         * kwq/KWQXmlSimpleReader.h:
2484         (KWQXmlNamespace::m_ref):
2485         (KWQXmlNamespace::uriForPrefix):
2486         (KWQXmlNamespace::ref):
2487         (KWQXmlNamespace::deref):
2488         (QXmlParseException::QXmlParseException):
2489         (QXmlParseException::message):
2490         (QXmlParseException::columnNumber):
2491         (QXmlParseException::lineNumber):
2492         (QXmlSimpleReader::errorHandler):
2493         (QXmlSimpleReader::xmlNamespace):
2494         (QXmlSimpleReader::parserStopped):
2495         * kwq/KWQXmlSimpleReader.mm:
2496         (startElementHandler):
2497         (endElementHandler):
2498         (charactersHandler):
2499         (processingInstructionHandler):
2500         (cdataBlockHandler):
2501         (commentHandler):
2502         (warningHandler):
2503         (fatalErrorHandler):
2504         (QXmlSimpleReader::pushNamespaces):
2505         (QXmlSimpleReader::popNamespaces):
2506         (QXmlSimpleReader::parse):
2507         (QXmlSimpleReader::stopParsing):
2508         (QXmlSimpleReader::lineNumber):
2509         (QXmlSimpleReader::columnNumber):
2510
2511 2004-01-21  David Hyatt  <hyatt@apple.com>
2512
2513         Reviewed by NOBODY (OOPS!).
2514
2515         * ForwardingHeaders/xbl/xbl_binding_manager.h: Added.
2516         * ForwardingHeaders/xbl/xbl_docimpl.h: Added.
2517         * WebCore.pbproj/project.pbxproj:
2518         * expat/COPYING: Removed.
2519         * expat/Changes: Removed.
2520         * expat/MANIFEST: Removed.
2521         * expat/README: Removed.
2522         * expat/expat_config.h: Removed.
2523         * expat/lib/ascii.h: Removed.
2524         * expat/lib/asciitab.h: Removed.
2525         * expat/lib/expat.h: Removed.
2526         * expat/lib/iasciitab.h: Removed.
2527         * expat/lib/internal.h: Removed.
2528         * expat/lib/latin1tab.h: Removed.
2529         * expat/lib/nametab.h: Removed.
2530         * expat/lib/utf8tab.h: Removed.
2531         * expat/lib/xmlparse.c: Removed.
2532         * expat/lib/xmlrole.c: Removed.
2533         * expat/lib/xmlrole.h: Removed.
2534         * expat/lib/xmltok.c: Removed.
2535         * expat/lib/xmltok.h: Removed.
2536         * expat/lib/xmltok_impl.c: Removed.
2537         * expat/lib/xmltok_impl.h: Removed.
2538         * expat/lib/xmltok_ns.c: Removed.
2539         * khtml/css/cssparser.cpp:
2540         (CSSParser::parseValue):
2541         * khtml/css/cssproperties.c:
2542         (hash_prop):
2543         (findProp):
2544         * khtml/css/cssproperties.h:
2545         * khtml/css/cssproperties.in:
2546         * khtml/css/cssstyleselector.cpp:
2547         (khtml::CSSStyleSelector::applyRule):
2548         * khtml/dom/dom_element.cpp:
2549         (Element::getAttributeNS):
2550         * khtml/misc/loader.cpp:
2551         (CachedXBLDocument::CachedXBLDocument):
2552         (CachedXBLDocument::~CachedXBLDocument):
2553         (CachedXBLDocument::ref):
2554         (CachedXBLDocument::deref):
2555         (CachedXBLDocument::data):
2556         (CachedXBLDocument::checkNotify):
2557         (CachedXBLDocument::error):
2558         (DocLoader::requestXBLDocument):
2559         (Cache::requestXBLDocument):
2560         (CachedObjectClient::setXBLDocument):
2561         (Cache::getStatistics):
2562         * khtml/misc/loader.h:
2563         (khtml::CachedObject::):
2564         (khtml::CachedXBLDocument::document):
2565         (khtml::CachedXBLDocument::schedule):
2566         * khtml/misc/loader_client.h:
2567         * khtml/rendering/render_block.cpp:
2568         (khtml::RenderBlock::layoutBlockChildren):
2569         * khtml/rendering/render_style.cpp:
2570         (bindingURI):
2571         (marquee):
2572         (StyleCSS3NonInheritedData::~StyleCSS3NonInheritedData):
2573         (StyleCSS3NonInheritedData::bindingsEquivalent):
2574         (StyleCSS3NonInheritedData::operator==):
2575         (:m_next):
2576         (BindingURI::~BindingURI):
2577         (BindingURI::copy):
2578         (BindingURI::operator==):
2579         (RenderStyle::addBindingURI):
2580         * khtml/rendering/render_style.h:
2581         (khtml::BindingURI::operator!=):
2582         (khtml::BindingURI::next):
2583         (khtml::BindingURI::setNext):
2584         (khtml::BindingURI::uri):
2585         (khtml::RenderStyle::bindingURIs):
2586         (khtml::RenderStyle::setHasAutoZIndex):
2587         (khtml::RenderStyle::setZIndex):
2588         (khtml::RenderStyle::deleteBindingURIs):
2589         (khtml::RenderStyle::inheritBindingURIs):
2590         * khtml/xbl/xbl_binding.cpp: Added.
2591         (XBL::m_markedForDeath):
2592         (XBL::XBLBindingChain::~XBLBindingChain):
2593         (XBL::XBLBindingChain::firstStyleBindingChain):
2594         (XBL::XBLBindingChain::lastBindingChain):
2595         (XBL::XBLBindingChain::insertBindingChain):
2596         (XBL::XBLBindingChain::markForDeath):
2597         (XBL::XBLBindingChain::loaded):
2598         (XBL::XBLBindingChain::hasStylesheets):
2599         (XBL::XBLBindingChain::failed):
2600         (XBL::m_nextBinding):
2601         (XBL::XBLBinding::~XBLBinding):
2602         (XBL::XBLBinding::loaded):
2603         (XBL::XBLBinding::setXBLDocument):
2604         * khtml/xbl/xbl_binding.h: Added.
2605         (XBL::):
2606         (XBL::XBLBindingChain::uri):
2607         (XBL::XBLBindingChain::nextChain):
2608         (XBL::XBLBindingChain::previousChain):
2609         (XBL::XBLBindingChain::setNextBindingChain):
2610         (XBL::XBLBindingChain::setPreviousBindingChain):
2611         (XBL::XBLBindingChain::markedForDeath):
2612         (XBL::XBLBindingChain::element):
2613         * khtml/xbl/xbl_binding_manager.cpp: Added.
2614         (XBL::m_bindingChainTable):
2615         (XBL::XBLBindingManager::~XBLBindingManager):
2616         (XBL::XBLBindingManager::getBindingChain):
2617         (XBL::XBLBindingManager::setBindingChain):
2618         (XBL::XBLBindingManager::loadBindings):
2619         (XBL::XBLBindingManager::checkLoadState):
2620         * khtml/xbl/xbl_binding_manager.h: Added.
2621         * khtml/xbl/xbl_docimpl.cpp: Added.
2622         (XBL:::DocumentImpl):
2623         (XBL::XBLDocumentImpl::~XBLDocumentImpl):
2624         (XBL::XBLDocumentImpl::createTokenHandler):
2625         (XBL::XBLDocumentImpl::setPrototypeBinding):
2626         (XBL::XBLDocumentImpl::prototypeBinding):
2627         * khtml/xbl/xbl_docimpl.h: Added.
2628         (XBL::):
2629         * khtml/xbl/xbl_protobinding.cpp: Added.
2630         (XBL::m_handler):
2631         (XBL::XBLPrototypeBinding::initialize):
2632         (XBL::XBLPrototypeBinding::document):
2633         (XBL::XBLPrototypeBinding::addResource):
2634         * khtml/xbl/xbl_protobinding.h: Added.
2635         (XBL::XBLPrototypeBinding::element):
2636         (XBL::XBLPrototypeBinding::setHandler):
2637         (XBL::XBLPrototypeBinding::handler):
2638         * khtml/xbl/xbl_protohandler.cpp: Added.
2639         (XBL::m_unused):
2640         (XBL::XBLPrototypeHandler::~XBLPrototypeHandler):
2641         (XBL::XBLPrototypeHandler::appendData):
2642         * khtml/xbl/xbl_protohandler.h: Added.
2643         (XBL::XBLPrototypeHandler::setNext):
2644         (XBL::XBLPrototypeHandler::next):
2645         * khtml/xbl/xbl_protoimplementation.cpp: Added.
2646         (XBL::m_compiled):
2647         (XBL::m_next):
2648         (XBL::XBLPrototypeMember::appendData):
2649         (XBL:::XBLPrototypeMember):
2650         (XBL::XBLPrototypeMethod::isConstructor):
2651         (XBL::XBLPrototypeMethod::isDestructor):
2652         (XBL::XBLPrototypeMethod::addParameter):
2653         (XBL:::XBLPrototypeMethod):
2654         (XBL::XBLPrototypeConstructor::isConstructor):
2655         (XBL::XBLPrototypeDestructor::isDestructor):
2656         (XBL::m_readonly):
2657         (XBL::XBLPrototypeProperty::appendGetterText):
2658         (XBL::XBLPrototypeProperty::appendSetterText):
2659         * khtml/xbl/xbl_protoimplementation.h: Added.
2660         (XBL::XBLPrototypeMember::~XBLPrototypeMember):
2661         (XBL::XBLPrototypeMember::setNext):
2662         (XBL::XBLPrototypeMember::next):
2663         (XBL::XBLPrototypeImplementation::~XBLPrototypeImplementation):
2664         (XBL::XBLPrototypeImplementation::setMember):
2665         (XBL::XBLPrototypeParameter::m_next):
2666         (XBL::XBLPrototypeParameter::~XBLPrototypeParameter):
2667         (XBL::XBLPrototypeParameter::next):
2668         (XBL::XBLPrototypeParameter::setNext):
2669         (XBL::):
2670         * khtml/xbl/xbl_tokenizer.cpp: Added.
2671         (XBL::XBLTokenHandler::XBLTokenHandler):
2672         (XBL::XBLTokenHandler::~XBLTokenHandler):
2673         (XBL::XBLTokenHandler::xblDocument):
2674         (XBL::XBLTokenHandler::startElement):
2675         (XBL::XBLTokenHandler::endElement):
2676         (XBL::XBLTokenHandler::characters):
2677         (XBL::XBLTokenHandler::createBinding):
2678         (XBL::XBLTokenHandler::createHandler):
2679         (XBL::XBLTokenHandler::createResource):
2680         (XBL::XBLTokenHandler::createImplementation):
2681         (XBL::XBLTokenHandler::addMember):
2682         (XBL::XBLTokenHandler::createConstructor):
2683         (XBL::XBLTokenHandler::createDestructor):
2684         (XBL::XBLTokenHandler::createField):
2685         (XBL::XBLTokenHandler::createProperty):
2686         (XBL::XBLTokenHandler::createMethod):
2687         (XBL::XBLTokenHandler::createParameter):
2688         * khtml/xbl/xbl_tokenizer.h: Added.
2689         (XBL::):
2690         * khtml/xml/dom_docimpl.cpp:
2691         (DocumentImpl::DocumentImpl):
2692         (DocumentImpl::~DocumentImpl):
2693         (DocumentImpl::createTokenHandler):
2694         (DocumentTypeImpl::DocumentTypeImpl):
2695         (DocumentTypeImpl::~DocumentTypeImpl):
2696         * khtml/xml/dom_docimpl.h:
2697         (DOM::DocumentImpl::bindingManager):
2698         * khtml/xml/dom_elementimpl.cpp:
2699         (ElementImpl::getAttributeNS):
2700         * khtml/xml/dom_elementimpl.h:
2701         (DOM::ElementImpl::getAttribute):
2702         * khtml/xml/dom_nodeimpl.cpp:
2703         * khtml/xml/xml_tokenizer.cpp:
2704         (XMLHandler::startElement):
2705         (XMLTokenizer::finish):
2706         * khtml/xml/xml_tokenizer.h:
2707         * kwq/KWQXmlAttributes.h:
2708         (QXmlAttributes::QXmlAttributes):
2709         (QXmlAttributes::qName):
2710         (QXmlAttributes::uri):
2711         * kwq/KWQXmlAttributes.mm:
2712         (QXmlAttributes::QXmlAttributes):
2713         (QXmlAttributes::~QXmlAttributes):
2714         (QXmlAttributes::operator=):
2715         (QXmlAttributes::localName):
2716         (QXmlAttributes::split):
2717         * kwq/KWQXmlSimpleReader.h:
2718         (XmlNamespace::m_ref):
2719         (XmlNamespace::uriForPrefix):
2720         (XmlNamespace::ref):
2721         (XmlNamespace::deref):
2722         (QXmlParseException::QXmlParseException):
2723         (QXmlParseException::message):
2724         (QXmlParseException::columnNumber):
2725         (QXmlParseException::lineNumber):
2726         (QXmlSimpleReader::errorHandler):
2727         (QXmlSimpleReader::xmlNamespace):
2728         (QXmlSimpleReader::parserStopped):
2729         * kwq/KWQXmlSimpleReader.mm:
2730         (startElementHandler):
2731         (endElementHandler):
2732         (charactersHandler):
2733         (processingInstructionHandler):
2734         (cdataBlockHandler):
2735         (commentHandler):
2736         (warningHandler):
2737         (fatalErrorHandler):
2738         (QXmlSimpleReader::pushNamespaces):
2739         (QXmlSimpleReader::popNamespaces):
2740         (QXmlSimpleReader::parse):
2741         (QXmlSimpleReader::stopParsing):
2742         (QXmlSimpleReader::lineNumber):
2743         (QXmlSimpleReader::columnNumber):
2744         * layout-tests/fast/overflow/003.xml:
2745
2746 2004-01-21  David Hyatt  <hyatt@apple.com>
2747
2748         Add some methods to dicts and stacks that exist in Qt.
2749         
2750         Reviewed by darin
2751
2752         * kwq/KWQDict.h:
2753         (QDict::replace):
2754         * kwq/KWQPtrDict.h:
2755         (QPtrDict::replace):
2756         (QPtrDict::find):
2757         * kwq/KWQPtrStack.h:
2758         (QPtrStack::current):
2759         (QPtrStack::setAutoDelete):
2760
2761 2004-01-19  Maciej Stachowiak  <mjs@apple.com>
2762
2763         Reviewed by John, Ken, Dave.
2764
2765         <rdar://problem/3533319>: Safari allows upload of arbitrary local files w/o user's knowledge or permission
2766         
2767         * khtml/html/html_formimpl.cpp:
2768         (HTMLInputElementImpl::value): Don't fall back to the value
2769         attribute for file inputs, since that way malicious HTML could
2770         force the user to upload files unexpectedly.
2771
2772 2004-01-18  David Hyatt  <hyatt@apple.com>
2773
2774         Fix for 3532569, bugzilla patch viewer doesn't work.  My previous fix for 3531983 caused moves to happen
2775         when they should not have, due to childX and childY not being implemented at all on KWQScrollView.
2776
2777         Reviewed by darin
2778         
2779         * kwq/KWQScrollView.mm:
2780         (QScrollView::childX):
2781         (QScrollView::childY):
2782
2783 === Safari-124 ===
2784
2785 2004-01-16  David Hyatt  <hyatt@apple.com>
2786
2787         Fix for 3531983, fixed positioning not working for widgets.  Make sure to move widgets at paint time
2788         if necessary.
2789         
2790         Reviewed by darin
2791         
2792         * khtml/rendering/render_replaced.cpp:
2793         (RenderWidget::paintObject):
2794
2795 2004-01-15  David Hyatt  <hyatt@apple.com>
2796
2797         Fix for 3530734, many java applets don't show up.  Go ahead and just use the width/height from the style
2798         system as the initial size when the width/height are fixed.
2799         
2800         Reviewed by rjw
2801
2802         * khtml/rendering/render_applet.cpp:
2803         (RenderApplet::createWidgetIfNecessary):
2804
2805 2004-01-15  Richard Williamson   <rjw@apple.com>
2806
2807         Fixed 3529426.  Exclude pages that contain Java applets from 
2808         the page cache.  The means applets get the normal stop/destroy
2809         messages that they expect when a user leaves a page.
2810
2811         Reviewed by John.
2812
2813         * kwq/KWQKHTMLPart.mm:
2814         (KWQKHTMLPart::canCachePage):
2815
2816 2004-01-15  Vicki Murley  <vicki@apple.com>
2817
2818         Reviewed by Darin.
2819
2820         * WebCore.pbproj/project.pbxproj: Update copyright date to 2004.
2821
2822 2004-01-15  Darin Adler  <darin@apple.com>
2823
2824         Reviewed by Ken.
2825
2826         - fixed 3529943: REGRESSION (119-120): nil-deref in KHTMLPart::javaEnabled when hitting back button
2827
2828         * khtml/html/html_objectimpl.cpp: (HTMLAppletElementImpl::getAppletInstance):
2829         Add missing nil check that the other call to javaEnabled has.
2830
2831 === Safari-122 ===
2832
2833 2004-01-14  David Hyatt  <hyatt@apple.com>
2834
2835         Fix for 3527819, marquee makes page layout too wide.  Make sure marquees have a minimum width of 0.
2836         
2837         Reviewed by john
2838
2839         * khtml/rendering/render_block.cpp:
2840         (khtml::RenderBlock::calcMinMaxWidth):
2841         (khtml::RenderBlock::calcInlineMinMaxWidth):
2842
2843 2004-01-13  David Hyatt  <hyatt@apple.com>
2844
2845         Fix for 3527707, crash on w3c css page.  Make sure height isn't allowed to be negative when computing
2846         positioned elements' heights.  Also bulletproof the crash in case there are other negative height code
2847         paths.
2848         
2849         Reviewed by john
2850
2851         * khtml/rendering/render_block.cpp:
2852         (khtml::RenderBlock::layoutBlock):
2853         (khtml::RenderBlock::getAbsoluteRepaintRectIncludingFloats):
2854         * khtml/rendering/render_box.cpp:
2855         (RenderBox::calcAbsoluteVertical):
2856
2857 2004-01-13  Maciej Stachowiak  <mjs@apple.com>
2858
2859         Reviewed by Darin.
2860
2861         <rdar://problem/3527853>: REGRESSION (119-120): Peoplesoft menus do not work
2862         
2863         * kwq/KWQKHTMLPart.mm:
2864         (KWQKHTMLPart::scrollToAnchor): Right before calling checkCompleted(), set
2865         m_bComplete to false, so it can get set right back to true if we're actually done
2866         loading and fire all the right signals.
2867
2868 2004-01-13  David Hyatt  <hyatt@apple.com>
2869
2870         Fix for 3526710, applets need to have the correct initial size after a layout has been done, since our
2871         Java applets can't yet resize.
2872         
2873         Reviewed by john
2874
2875         * khtml/rendering/render_applet.cpp:
2876         (RenderApplet::createWidgetIfNecessary):
2877         (RenderApplet::layout):
2878         (RenderEmptyApplet::layout):
2879
2880 === Safari-121 ===
2881
2882 2004-01-11  Darin Adler  <darin@apple.com>
2883
2884         - fixed Dave's check-in so it compiles; I assume he forgot to land one source file
2885
2886         * khtml/khtmlview.h: Add RenderPart to the friends of KHTMLView.
2887
2888 2004-01-11  David Hyatt  <hyatt@apple.com>
2889
2890         Fix for frame repainting bugs (3510669, 3515442).  This is a narrower fix than the previous attempt.
2891         
2892         Reviewed by darin
2893
2894         * khtml/rendering/render_frames.cpp:
2895         (RenderPart::updateWidgetPositions):
2896         * khtml/rendering/render_frames.h:
2897         * khtml/rendering/render_replaced.cpp:
2898         (RenderWidget::updateWidgetPositions):
2899
2900 2004-01-10  Darin Adler  <darin@apple.com>
2901
2902         Reviewed by John.
2903
2904         - fixed 3525468: REGRESSION (114-115): HOMEPAGE: after hitting textarea limit, backspace key is ignored
2905
2906         * kwq/KWQEvent.mm:
2907         (keyIdentifierForKeyEvent): Treat 7F as 08; matches other browsers.
2908         (QKeyEvent::QKeyEvent): Ditto.
2909
2910 2004-01-09  David Hyatt  <hyatt@apple.com>
2911
2912         Fixes for 3510669 and 3515442, blank frame problems caused by WebKit's use of a separate needsLayout boolean.
2913         
2914         Reviewed by darin
2915
2916         * kwq/WebCoreBridge.h:
2917         * kwq/WebCoreBridge.mm:
2918         (-[WebCoreBridge setNeedsLayout]):
2919
2920 2004-01-08  David Hyatt  <hyatt@apple.com>
2921
2922         Fix for 3524118, floats don't repaint when moved.
2923         
2924         Reviewed by darin
2925
2926          * khtml/rendering/render_block.cpp:
2927         (khtml::RenderBlock::positionNewFloats):
2928  
2929 2004-01-08  David Hyatt  <hyatt@apple.com>
2930
2931         Fix for 3519003, crash in mail because <dir> and <menu> don't allow the same children as <ul> and <ol>.
2932         
2933         Reviewed by darin
2934
2935         * khtml/html/dtd.cpp:
2936         (DOM::checkChild):
2937
2938 2004-01-08  John Sullivan  <sullivan@apple.com>
2939
2940         - fixed <rdar://problem/3524359>: REGRESSSION (119-120): 
2941         Double click to select text in form broken
2942
2943         Reviewed by Dave and Darin.
2944
2945         * khtml/khtmlview.cpp:
2946         (KHTMLView::dispatchMouseEvent):
2947         Don't blur the focused node if that's the one you clicked on.
2948
2949 2004-01-07  Richard Williamson   <rjw@apple.com>
2950
2951         Fixed 3517550.  Named array lookup of applet failed, i.e.:
2952         var appletobj = document.applets['myapplet']
2953
2954         Reviewed by Chris.
2955
2956         * khtml/ecma/kjs_html.cpp:
2957         (KJS::HTMLCollection::getNamedItems):
2958
2959 === Safari-120 ===
2960
2961 2004-01-06  David Hyatt  <hyatt@apple.com>
2962
2963         Possible fix for table bugs 3510005 and 3492945, repainting glitches that occurred when table cells moved.
2964
2965         Fix for 33522497, empty AXElements appear in AXBrowser.
2966         
2967         Reviewed by darin
2968
2969         * khtml/rendering/render_table.cpp:
2970         (RenderTableSection::layoutRows):
2971         (RenderTableCell::setWidth):
2972         * khtml/rendering/render_table.h:
2973
2974         * kwq/KWQAccObject.mm:
2975         (-[KWQAccObject accessibilityIsIgnored]):
2976
2977 2004-01-06  John Sullivan  <sullivan@apple.com>
2978
2979         - fixed <rdar://problem/3484465>: REGRESSION (118): button click does 
2980         not take focus away from <textarea>; breaks Outlook Web Access
2981
2982         Reviewed by Dave.
2983
2984         * khtml/khtmlview.cpp:
2985         (KHTMLView::dispatchMouseEvent):
2986         Removed nodeimpl == nil test that was preventing button/link clicks
2987         from blurring previously-focused text field.
2988
2989 2004-01-06  David Hyatt  <hyatt@apple.com>
2990
2991         Fix for 3520636, infinite loop in page breaking code when printing.
2992         
2993         Reviewed by darin
2994
2995         * khtml/rendering/render_text.cpp:
2996         (RenderText::paintObject):
2997         * kwq/WebCoreBridge.mm:
2998         (-[WebCoreBridge computePageRectsWithPrintWidth:printHeight:]):
2999
3000 2004-01-05  David Hyatt  <hyatt@apple.com>
3001
3002         Fix for 3521466, generated image content should not try to calcWidth/height when it isn't yet rooted in
3003         the rendering tree.
3004         
3005         Reviewed by john
3006
3007         * khtml/rendering/render_image.cpp:
3008         (RenderImage::setPixmap):
3009
3010 2003-12-26  Darin Adler  <darin@apple.com>
3011
3012         - one more small step to make -[KWQPageState dealloc] safer
3013
3014         * kwq/KWQPageState.mm: (-[KWQPageState dealloc]): Only do the real detach() if the
3015         document is already in the detached state; we don't want to detach prematurely.
3016
3017 2003-12-23  John Sullivan  <sullivan@apple.com>
3018
3019         - fixed <rdar://problem/3451306>: address book search fails at Airborne 
3020         Express Corporate site (Apple Shipping wants to use it)
3021
3022         Reviewed by Darin.
3023
3024         * khtml/ecma/kjs_html.cpp:
3025         commented out definition of document.all; now sites like this one that
3026         set document.all to a value will work.
3027         * khtml/ecma/kjs_html.lut.h: regenerated this file
3028
3029 2003-12-23  Darin Adler  <darin@apple.com>
3030
3031         Reviewed by John.
3032
3033         - another try at fixing the -[KWQPageState dealloc] bug, even though we don't fully understand it
3034         
3035         This change saves the renderer inside the document rather than in the KWQPageState to
3036         try to eliminate the possibility that multiple KWQPageState objects could restore the
3037         same renderer multiple times, resulting in multiple detaches of the same renderer.
3038
3039         * khtml/xml/dom_docimpl.h: Add a m_savedRenderer field.
3040         * khtml/xml/dom_docimpl.cpp:
3041         (DocumentImpl::DocumentImpl): Initialize m_savedRenderer to 0.
3042         (DocumentImpl::~DocumentImpl): Added some asserts to make sure we don't get destroyed
3043         while we are in the page cache.
3044         (DocumentImpl::attach): Added an assert.
3045         (DocumentImpl::setInPageCache): Save the renderer when setting the flag, and restore
3046         the renderer when clearing it.
3047
3048         * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::openURLFromPageCache): Instead of doing a restoreRenderer
3049         call, just do setInPageCache(NO), which will restore the renderer as a side effect.
3050
3051         * kwq/KWQPageState.h: Removed the renderer method and field.
3052         * kwq/KWQPageState.mm:
3053         (-[KWQPageState initWithDocument:URL:windowProperties:locationProperties:interpreterBuiltins:]):
3054         Don't store a pointer to the renderer.
3055         (-[KWQPageState clear]): New method, shared by invalidate and dealloc.
3056         (-[KWQPageState invalidate]): Removed code relating to "relinquishing object ownership";
3057         just deallocate everything here without doing a detach().
3058         (-[KWQPageState dealloc]): Removed restoreRenderer now that setInPageCache(NO) handles that.
3059         Added some assertions. Share code with invalidate by calling clear.
3060
3061 2003-12-22  John Sullivan  <sullivan@apple.com>
3062
3063         - fixed <rdar://problem/3508798>: ACCESSIBILITY: role/description/value strings not defined
3064
3065         Reviewed by Darin.
3066
3067         * kwq/KWQAccObject.mm:
3068         (-[KWQAccObject roleDescription]):
3069         provide not-yet-localized strings for all the role descriptions that this class uses.
3070         (-[KWQAccObject value]):
3071         return nil string rather than dummy string for the cases where we don't have a value attribute.
3072         (-[KWQAccObject accessibilityActionDescription:]):
3073         changed comment passed to UI_STRING bogus macro so it won't have to change if/when macro
3074         loses its bogosity
3075
3076 2003-12-22  John Sullivan  <sullivan@apple.com>
3077
3078         - WebCore part of fix for <rdar://problem/3515706>: 
3079         REGRESSION (100-118): Web Kit printing does not honor Page Setup scale factor
3080
3081         Reviewed by Darin.
3082
3083         * kwq/WebCoreBridge.h:
3084         * kwq/WebCoreBridge.mm:
3085         (-[WebCoreBridge computePageRectsWithPrintWidth:printHeight:]):
3086         renamed method for clarity; now iterates over pages horizontally as well 
3087         as vertically; assume x starts at 0 as we were already assuming that y
3088         starts at 0; now returns autoreleased result
3089
3090 2003-12-22  Darin Adler  <darin@apple.com>
3091
3092         Reviewed by John.
3093
3094         - follow-on to my fix for 3467919: handle collapsed spaces at the starts of runs too, not just at the
3095           end, and make sure that a space inherits style from the run it was collapsed from rather than always
3096           from the run it precedes
3097
3098         * khtml/khtml_part.cpp: (KHTMLPart::text): Add code to deal with collapsed spaces at the start of runs.
3099         * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::attributedString): Change code to keep the style of a space that
3100         was collapsed at the end of the run, and use that styled space if necessary. Also add the code to deal
3101         with collapsed spaces at the start of runs. Also remove comment that refers to long-since-deleted code.
3102
3103 2003-12-21  Darin Adler  <darin@apple.com>
3104
3105         Reviewed by John.
3106
3107         - fixed 3467919: REGRESSION (91-92): space missing when copying text with link at start or end of line
3108
3109         * khtml/khtml_part.cpp: (KHTMLPart::text):
3110         * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::attributedString):
3111         Changed both "turn HTML into text" code paths to generate spaces in a different way.
3112         First, corrected the logic so it notices spaces left out at the end of a RenderText object.
3113         Second, don't emit the space until we are emitting more text, to prevent emitting trailing
3114         spaces. To get this completely right for the attributed string case, I had to add code to
3115         adjust the offset used to mark links.
3116
3117 2003-12-21  Darin Adler  <darin@apple.com>
3118
3119         Reviewed by John.
3120
3121         - fixed 3477453: nowrap in a fixed-width TD is ignored on screen but not when printed (Williams-Sonoma)
3122
3123         * khtml/rendering/render_table.cpp: (RenderTableCell::setStyle):
3124         Compute the proper whitespace mode before calling the base class setStyle,
3125         since the base class setStyle may create styles that inherit from our style,
3126         and we want them to inherit the computed whitespace mode.
3127
3128         * WebCore.pbproj/project.pbxproj: Let Xcode be 1.1, as it was meant to be.
3129
3130 2003-12-21  Darin Adler  <darin@apple.com>
3131
3132         Reviewed by Dave.
3133
3134         - fixed a storage leak
3135
3136         * khtml/rendering/render_style.h: Added a destructor and a private unimplemented assignment
3137         operator to StyleCSS3InheritedData, since the textShadow field that needs to be allocated
3138         and deallocated and the default destructor and assignment operator don't do that.
3139         * khtml/rendering/render_style.cpp: (StyleCSS3InheritedData::~StyleCSS3InheritedData):
3140         Added destructor that deletes the textShadow object.
3141
3142         - fixed locking for JavaScript debugging tools in Caches window
3143
3144         * kwq/WebCoreJavaScript.mm:
3145         (+[WebCoreJavaScript rootObjectClasses]): Lock and unlock around call to JavaScriptCore.
3146         (+[WebCoreJavaScript garbageCollect]): Ditto.
3147
3148 2003-12-19  David Hyatt  <hyatt@apple.com>
3149
3150         Fix for 3483130, repaint doesn't occur when font is decreased dynamically when at the bottom of
3151         amazon.com.
3152         
3153         Reviewed by john
3154
3155         * khtml/khtml_part.cpp:
3156         (KHTMLPart::setZoomFactor):
3157         * kwq/WebCoreBridge.mm:
3158         (-[WebCoreBridge setTextSizeMultiplier:]):
3159
3160 2003-12-19  Richard Williamson   <rjw@apple.com>
3161
3162         Fixed 3515590.  Return Undefined to JS for applet if
3163         Java is disabled.
3164
3165         Reviewed by Chris.
3166
3167         * khtml/html/html_objectimpl.cpp:
3168         (HTMLAppletElementImpl::getAppletInstance):
3169
3170 2003-12-19  Maciej Stachowiak  <mjs@apple.com>
3171
3172         Reviewed by Chris.
3173
3174         <rdar://problem/3512545>: reproducible assertion failure in KWQKHTMLPart::addData scrolling to anchor while page loads
3175         
3176         * kwq/KWQKHTMLPart.mm:
3177         (KWQKHTMLPart::scrollToAnchor): Don't pretend we finished loading,
3178         because we don't actually make anchor scrolling stop the current
3179         page load.
3180
3181 === Safari-119 ===
3182
3183 2003-12-18  Richard Williamson   <rjw@apple.com>
3184
3185         Fixed 3511415.  We have to un-visually order visually ordered text
3186         before passing to ATSU.
3187
3188         Reviewed by John.
3189
3190         * khtml/rendering/font.cpp:
3191         (Font::drawHighlightForText):
3192         (Font::drawText):
3193         * khtml/rendering/font.h:
3194         * khtml/rendering/render_text.cpp:
3195         (InlineTextBox::paintSelection):
3196         (RenderText::paintObject):
3197         * kwq/KWQPainter.h:
3198         * kwq/KWQPainter.mm:
3199         (QPainter::drawText):
3200         (QPainter::drawHighlightForText):
3201         * kwq/WebCoreTextRenderer.h:
3202         * kwq/WebCoreTextRendererFactory.m:
3203         (WebCoreInitializeEmptyTextStyle):
3204
3205 2003-12-17  Richard Williamson   <rjw@apple.com>
3206
3207         Reviewed by NOBODY (OOPS!).
3208
3209         * khtml/html/html_objectimpl.cpp:
3210         (HTMLAppletElementImpl::getAppletInstance):
3211         * khtml/html/html_objectimpl.h:
3212         * kwq/KWQKHTMLPart.h:
3213         * kwq/KWQKHTMLPart.mm:
3214         (KWQKHTMLPart::getAppletInstanceForView):
3215         (KWQKHTMLPart::addPluginRootObject):
3216         (KWQKHTMLPart::cleanupPluginRootObjects):
3217         * kwq/WebCoreBridge.mm:
3218         (-[WebCoreBridge init]):
3219
3220 2003-12-17  Darin Adler  <darin@apple.com>
3221
3222         Reviewed by Dave.
3223
3224         - fixed 3469085: can't tab to all links on aintitcool.com
3225
3226         * khtml/html/html_inlineimpl.cpp:
3227         (HTMLAnchorElementImpl::isFocusable): Re-implemented this to check width and height of
3228         all continuations, not just the main render object. Also, check the absoluteRects after
3229         checking all the render objects to catch things like floats.
3230         (HTMLAnchorElementImpl::isMouseFocusable): Clean up the code here a bit.
3231
3232         * khtml/rendering/render_inline.h:
3233         * khtml/rendering/render_inline.cpp: (RenderInline::absoluteRects):
3234         * khtml/rendering/render_object.h:
3235         * khtml/rendering/render_object.cpp: (RenderObject::absoluteRects):
3236         * khtml/rendering/render_text.h:
3237         * khtml/rendering/render_text.cpp: (RenderText::absoluteRects):
3238         * kwq/KWQAccObject.mm: (boundingBoxRect):
3239         Use QValueList instead of QPtrList for clarity and to fix storage leaks.
3240
3241 === Safari-118 ===
3242
3243 2003-12-16  David Hyatt  <hyatt@apple.com>
3244
3245         Fix for 3510956, crash on mezzoblue.com.  Relax the float-list searching code that runs when
3246         a float is removed.
3247         
3248         Reviewed by darin
3249
3250         * khtml/rendering/render_object.cpp:
3251         (checkFloats):
3252         (RenderObject::removeFromObjectLists):
3253
3254 2003-12-16  John Sullivan  <sullivan@apple.com>
3255
3256         fixed <rdar://problem/3482852>: oft-seen, non-repro, nil-deref in 
3257         HTMLTokenizer::notifyFinished (snapfish.com, etc.)
3258         
3259         At least one of the dupes of this bug is a separate (still reproducible) issue;
3260         I'll clone it back to life and test the others.
3261
3262         Reviewed by Darin.
3263
3264         * khtml/html/htmltokenizer.cpp:
3265         (HTMLTokenizer::notifyFinished):
3266         Move check of cachedScript.isEmpty() until after scriptExecution()
3267         call, because cachedScript.isEmpty() value can be changed by that call.
3268
3269 2003-12-15  David Hyatt  <hyatt@apple.com>
3270
3271         Fix for 3508807, positions/sizes wrong for text elts and multi-line elts for accessibility.
3272         
3273         Reviewed by john
3274
3275         * khtml/rendering/render_inline.cpp:
3276         (RenderInline::absoluteRects):
3277         * khtml/rendering/render_inline.h:
3278         * khtml/rendering/render_object.cpp:
3279         (RenderObject::absoluteRects):
3280         * khtml/rendering/render_object.h:
3281         * khtml/rendering/render_text.cpp:
3282         (RenderText::absoluteRects):
3283         * khtml/rendering/render_text.h:
3284         * kwq/KWQAccObject.mm:
3285         (boundingBoxRect):
3286         (-[KWQAccObject position]):
3287         (-[KWQAccObject size]):
3288
3289 2003-12-15  Richard Williamson   <rjw@apple.com>
3290
3291         Return 0 if the view doesn't have a bridge.
3292
3293         Reviewed by John.
3294
3295         * kwq/WebCoreBridge.mm:
3296         (rootForView):
3297
3298 2003-12-15  David Hyatt  <hyatt@apple.com>
3299
3300         Fix for 3508792.  Remove tables and cells as AxObjects.
3301         
3302         Reviewed by john
3303
3304         * kwq/KWQAccObject.mm:
3305         (-[KWQAccObject role]):
3306         (-[KWQAccObject accessibilityIsIgnored]):
3307
3308 2003-12-15  John Sullivan  <sullivan@apple.com>
3309
3310         - fixed <rdar://problem/3510459>: REGRESSION (100-113): Pressing button at google.com 
3311         removes focus from text field
3312
3313         Reviewed by Dave.
3314
3315         * khtml/khtmlview.cpp:
3316         (KHTMLView::dispatchMouseEvent):
3317         Don't clear the focused widget when a mousedown occurs on a widget that is focusable
3318         in the abstract sense but is not mouse focusable or currently keyboard focusable. This
3319         matches the behavior of older Safaris (clicking in background or page text will make the
3320         webview itself be first responder, but clicking on a button won't).
3321
3322 2003-12-14  Darin Adler  <darin@apple.com>
3323
3324         Reviewed by Maciej.
3325
3326         - fixed 3458937: nil-deref in timed layout
3327
3328         * khtml/khtmlview.cpp: (KHTMLView::layout): Add a nil check for m_part.
3329
3330 2003-12-14  Darin Adler  <darin@apple.com>
3331
3332         Reviewed by Maciej.
3333
3334         - fixed 3311205: click() on a file input type form element does not work bring up the file chooser as it does in IE
3335
3336         * khtml/html/html_formimpl.cpp:
3337         (HTMLInputElementImpl::click): Add a case for FILE that calls RenderFileButton's click() function.
3338         Get rid of the default case and list more cases explicitly.
3339         (HTMLInputElementImpl::accessKeyAction): Change FILE from just focus to focus/click.
3340
3341         * khtml/rendering/render_form.h: Added a click() function to RenderFileButton.
3342         * khtml/rendering/render_form.cpp:
3343         (RenderFileButton::slotTextChanged): Added call to onChange on the element to match text input
3344         fields; helpful for the test case Adobe supplied.
3345         (RenderFileButton::click): Added. Calls click() on KWQFileButton.
3346
3347         * kwq/KWQFileButton.h: Added a click function.
3348         * kwq/KWQFileButton.mm: (KWQFileButton::click): Added. Calls performClick on the file button.
3349
3350         * kwq/WebCoreBridge.h: Add a performClick method to WebCoreFileButton.
3351
3352 2003-12-13  Maciej Stachowiak  <mjs@apple.com>
3353
3354         Reviewed by Darin.
3355
3356         <rdar://problem/3269212>: FILEMAKER: can't use Option objects created in a different window
3357
3358         * khtml/ecma/kjs_binding.cpp:
3359         (ScriptInterpreter::updateDOMObjectDocument): Update per-document
3360         caching for the DOM object - let it be protected by both the old
3361         and the new document.
3362         * khtml/ecma/kjs_binding.h: Prototype new method.
3363         * khtml/xml/dom_nodeimpl.cpp:
3364         (NodeImpl::setDocument): New method to change a node's document pointer.
3365         (NodeImpl::checkAddChild): If the new child node is owned by the
3366         wrong document but not actually in it, change its document (using
3367         the two aforementioned methods) instead of throwing an exception.
3368         * khtml/xml/dom_nodeimpl.h: Prototype new method.
3369
3370 2003-12-14  Darin Adler  <darin@apple.com>
3371
3372         Reviewed by Maciej.
3373
3374         - fixed 3332280: REGRESSION (74-85): setting src of iframe results in two GETs
3375
3376         * khtml/html/html_baseimpl.h: Added openURL virtual function.
3377         * khtml/html/html_baseimpl.cpp:
3378         (HTMLFrameElementImpl::updateForNewURL): Call openURL to do the meat of the work,
3379         since it's different for frames and iframes.
3380         (HTMLFrameElementImpl::openURL): Move the part that's different for frames in here.
3381         (HTMLFrameElementImpl::parseAttribute): Call setLocation to share code.
3382         (HTMLFrameElementImpl::setLocation): Do nothing if the location is not changing.
3383         Not needed to fix this bug, but could eliminate other cases of extra GETs.
3384         (HTMLIFrameElementImpl::parseAttribute): Remove special handling of SRC, because now
3385         we will end up calling openURL, which will do the right thing for iframes.
3386         (HTMLIFrameElementImpl::openURL): Instead of doing the change to the frame directly,
3387         use updateWidget, since that's what we do for other changes to iframes. To trigger a
3388         call to updateWidget(), set needWidgetUpdate and mark the node changed.
3389
3390 2003-12-13  Maciej Stachowiak  <mjs@apple.com>
3391
3392         Reviewed by Darin.
3393
3394         <rdar://problem/3507885>: REGRESSION (100-116): frames missing due to cross-domain check (derstandard.at)
3395         
3396         * khtml/ecma/kjs_window.cpp:
3397         (Window::isSafeScript): Loosen the frame access rules a bit. We already allowed access to
3398         a document loaded as empty from the parent or opener. Now also allow access from any document
3399         in the same domain as the parent or opener, so that, for instance, a sibling frame can access it
3400         so long as it is in the same domain as the parent.
3401
3402 2003-12-13  Darin Adler  <darin@apple.com>
3403
3404         Reviewed by Maciej.
3405
3406         - fixed 3506204: homepage.mac slide show window is wrong size on 2nd monitor
3407
3408         * kwq/KWQApplication.mm: (QDesktopWidget::screenGeometry): Add code to flip the Y coordinate.
3409         This has no effect on the main screen, but a big effect on others. I used the same code to
3410         flip Y screen coordinates that is used KWQWindowWidget.mm and KWQKHTMLPartBrowserExtension.mm.
3411         * kwq/KWQKWinModule.mm: (KWinModule::workArea): Replaced the incorrect code to flip the Y
3412         coordinate here with correct code. The code flipped based on the frame of the main screen,
3413         but it needs to flip based on the frame of screen 0.
3414
3415 2003-12-12  Chris Blumenberg  <cblu@apple.com>
3416
3417         Fixed: <rdar://problem/3505208>: keys added to keychain from KEYGEN need better UI names
3418
3419         Reviewed by rjw.
3420
3421         * khtml/html/html_formimpl.cpp:
3422         (HTMLKeygenElementImpl::encoding): pass the page URL to signedPublicKeyAndChallengeString
3423         * kwq/KWQKSSLKeyGen.h:
3424         * kwq/KWQKSSLKeyGen.mm:
3425         (KSSLKeyGen::signedPublicKeyAndChallengeString): take a URL
3426         * kwq/WebCoreKeyGenerator.h:
3427         * kwq/WebCoreKeyGenerator.m:
3428         (-[WebCoreKeyGenerator signedPublicKeyAndChallengeStringWithStrengthIndex:challenge:pageURL:]): take a URL
3429
3430 2003-12-12  David Hyatt  <hyatt@apple.com>
3431
3432         Fix for 3254534, CSS background-image style should be loaded lazily only when used.
3433         
3434         Reviewed by rjw
3435
3436         * ChangeLog:
3437         * khtml/css/css_valueimpl.cpp:
3438         (CSSImageValueImpl::CSSImageValueImpl):
3439         (CSSImageValueImpl::~CSSImageValueImpl):
3440         (CSSImageValueImpl::image):
3441         * khtml/css/css_valueimpl.h:
3442         
3443 2003-12-11  David Hyatt  <hyatt@apple.com>
3444
3445         WebCore part of 3453214.  This ensures that all outline styles except for auto (which has a CG bug) will
3446         be displayed properly during the PaintActionOutline phase.
3447         
3448         Reviewed by john and darin
3449
3450         * khtml/rendering/render_block.cpp:
3451         (khtml::RenderBlock::paint):
3452         * khtml/rendering/render_box.cpp:
3453         (RenderBox::setStyle):
3454         * khtml/rendering/render_canvas.cpp:
3455         (RenderCanvas::RenderCanvas):
3456         * khtml/rendering/render_canvas.h:
3457         (khtml::RenderCanvas::setMaximalOutlineSize):
3458         (khtml::RenderCanvas::maximalOutlineSize):
3459         * khtml/rendering/render_object.cpp:
3460         (RenderObject::maximalOutlineSize):
3461         * khtml/rendering/render_object.h:
3462         * khtml/rendering/render_replaced.cpp:
3463         (RenderReplaced::paint):
3464         * khtml/rendering/render_table.cpp:
3465         (RenderTable::paint):
3466         (RenderTableSection::paint):
3467         (RenderTableCell::paint):
3468
3469 2003-12-12  John Sullivan  <sullivan@apple.com>
3470
3471         - fixed <rdar://problem/3508825>: REGRESSION (100-116): crash in 
3472         HTMLGenericFormElementImpl::attach at sonyericsson.com
3473
3474         Reviewed by Maciej.
3475
3476         * khtml/html/html_formimpl.cpp:
3477         (HTMLGenericFormElementImpl::attach):
3478         Move a few lines inside an existing nil check to prevent nil dereference.
3479
3480 2003-12-12  John Sullivan  <sullivan@apple.com>
3481
3482         - fixed <rdar://problem/3508760>: tabbing to out-of-sight link behaves 
3483         differently than tabbing to out-of-sight form control
3484
3485         Reviewed by Dave.
3486
3487         * kwq/KWQScrollView.h:
3488         * kwq/KWQScrollView.mm:
3489         (QScrollView::ensureVisible):
3490         added comments and changed parameter names to reveal differences between
3491         what we've implemented and what QScrollView was intended to do.
3492         (QScrollView::ensureRectVisibleCentered):
3493         New method that calls _KWQ_scrollRectToVisible, which is the method
3494         we use when scrolling to reveal form controls.
3495
3496         * kwq/KWQKHTMLPart.mm:
3497         (KWQKHTMLPart::nextKeyViewInFrame):
3498         call ensureRectVisibleCentered so tabbing to a link will use the
3499         same scroll-to-reveal code as tabbing to a form control
3500         
3501 2003-12-11  Maciej Stachowiak  <mjs@apple.com>
3502
3503         Reviewed by John.
3504
3505         <rdar://problem/3507856>: XMLHttpRequest xhtml test displays but doesn't load
3506
3507         * khtml/ecma/xmlhttprequest.cpp:
3508         (KJS::XMLHttpRequestProtoFunc::tryCall): complete the URL using the document,
3509         not the htmlDocument.
3510
3511 2003-12-12  Richard Williamson   <rjw@apple.com>
3512
3513         Replace call to global functions with static member functions.
3514
3515         Reviewed by Ken.
3516
3517         * kwq/KWQKHTMLPart.mm:
3518         (KWQKHTMLPart::cleanupPluginRootObjects):
3519         * kwq/WebCoreBridge.mm:
3520         (rootForView):
3521         (-[WebCoreBridge init]):
3522
3523 2003-12-11  Maciej Stachowiak  <mjs@apple.com>
3524
3525         Reviewed by Darin.
3526
3527         <rdar://problem/3464315>: createDocument creates document with initial child element, unlike other browsers
3528         
3529         * khtml/xml/dom_docimpl.cpp:
3530         (DOMImplementationImpl::createDocument): Don;t add initial element.
3531
3532 2003-12-11  Maciej Stachowiak  <mjs@apple.com>
3533
3534         Reviewed by Darin. 
3535
3536         <rdar://problem/3507863>: XMLHttpRequest should not parse response if HTML
3537         
3538         * khtml/ecma/xmlhttprequest.cpp:
3539         (KJS::XMLHttpRequest::getValueProperty):
3540
3541 2003-12-11  Richard Williamson   <rjw@apple.com>
3542
3543         Cleaned up and verified reference counting scheme, and
3544         dereferencing of vended JavaScript objects when applet is
3545         destroyed (actually when part is destroyed).
3546
3547         Reviewed by Ken.
3548
3549         * kwq/KWQKHTMLPart.h:
3550         * kwq/KWQKHTMLPart.mm:
3551         (KWQKHTMLPart::~KWQKHTMLPart):
3552         (KWQKHTMLPart::getAppletInstanceForView):
3553         (KWQKHTMLPart::addPluginRootObject):
3554         (KWQKHTMLPart::cleanupPluginRootObjects):
3555         * kwq/WebCoreBridge.h:
3556         * kwq/WebCoreBridge.mm:
3557         (rootForView):
3558         (-[WebCoreBridge init]):
3559
3560 2003-12-11  Maciej Stachowiak  <mjs@apple.com>
3561
3562         Reviewed by John.
3563
3564         <rdar://problem/3507862>: XMLHttpRequest documents that reference external resources (e.g. stylesheets) cause crash
3565
3566         * khtml/html/html_headimpl.cpp:
3567         (HTMLLinkElementImpl::process):
3568         * khtml/html/htmltokenizer.cpp:
3569         (HTMLTokenizer::scriptHandler):
3570         * khtml/xml/dom_xmlimpl.cpp:
3571         (ProcessingInstructionImpl::checkStyleSheet):
3572         * khtml/xml/xml_tokenizer.cpp:
3573         (XMLHandler::processingInstruction):
3574         (XMLTokenizer::executeScripts):
3575
3576 2003-12-11  Maciej Stachowiak  <mjs@apple.com>
3577
3578         Reviewed by Chris.
3579
3580         <rdar://problem/3507859>: Status text should only include "OK", not full "HTTP/1.0 200 OK" status line
3581         
3582         * khtml/ecma/xmlhttprequest.cpp:
3583         (KJS::XMLHttpRequest::getStatusText): Include only the status
3584         text, not the full status line.
3585
3586 === Safari-117 ===
3587
3588 2003-12-11  David Hyatt  <hyatt@apple.com>
3589
3590         Fix for 3507164, scrolling really slow on hixie's web forms spec page.  Hixie has 12 little transparent layers
3591         at various points on this page, and beginning/ending transparency on only those 12 layers as you scroll
3592         is enough to kill scrolling performance.
3593
3594         This patch works around the issue by lazily beginning transparency layers only when we determine that
3595         we're actually painting a descendant layer of a transparent ancestor or a transparent layer.
3596
3597         Also fixing QColor's comparison operator.  It was broken and not comparing the "valid" bit, so invalid and
3598         valid colors were being assumed to be the same.
3599
3600         Also fixed the render dumper to not dump transparent and invalid background colors and fixed it do dump the
3601         alpha for colors with an alpha < 0xFF.
3602         
3603         Reviewed by mjs (opacity changes), darin (color changes) and john (render tree dumper changes)
3604
3605         * ChangeLog:
3606         * khtml/rendering/render_layer.cpp:
3607         (RenderLayer::RenderLayer):
3608         (RenderLayer::beginTransparencyLayers):
3609         (RenderLayer::paint):
3610         (RenderLayer::paintLayer):
3611         * khtml/rendering/render_layer.h:
3612         * kwq/KWQColor.h:
3613         (operator==):
3614         (operator!=):
3615         * kwq/KWQColor.mm:
3616         (QColor::name):
3617         * kwq/KWQRenderTreeDebug.cpp:
3618         (operator<<):
3619
3620 2003-12-11  Ken Kocienda  <kocienda@apple.com>
3621
3622         * kwq/KWQLoader.mm:
3623         (KWQCacheObjectExpiresTime): Fixed deployment build bustage.
3624
3625 2003-12-09  Ken Kocienda  <kocienda@apple.com>
3626
3627         Reviewed by Darin
3628         
3629         <rdar://problem/3505444>: WebCore cache does not use expiration dates on cache items
3630         
3631         * khtml/misc/loader.cpp:
3632         (Loader::slotFinished): Don't reset expiration date. We set this once in
3633         slotReceivedResponse.
3634         (Loader::slotReceivedResponse): Call new KWQ function to get a cache object's
3635         expiration date using its NSURLResponse data.
3636         (Cache::requestImage): Don't reset expiration date. We set this once in
3637         slotReceivedResponse, and we do not want the value from the DocLoader
3638         anyway.
3639         (Cache::requestStyleSheet): Ditto.
3640         (Cache::requestScript): Ditto.
3641         * kwq/KWQLoader.h:
3642         * kwq/KWQLoader.mm:
3643         (KWQCacheObjectExpiresTime): New function. Call over bridge to get access
3644         to SPI in NSURLResponse to calculate expiration time.
3645         * kwq/WebCoreBridge.h: Declare bridge method.
3646
3647 2003-12-10  Maciej Stachowiak  <mjs@apple.com>
3648
3649         Reviewed by Darin.
3650
3651         <rdar://problem/3504156>: XMLHttpRequest reuse test fails
3652         <rdar://problem/3505158>: XMLHttpRequest "abort with open" test fails
3653
3654         * khtml/ecma/xmlhttprequest.cpp:
3655         (KJS::XMLHttpRequest::open):
3656         (KJS::XMLHttpRequest::abort):
3657         (KJS::XMLHttpRequestProtoFunc::tryCall):
3658
3659 2003-12-10  Maciej Stachowiak  <mjs@apple.com>
3660
3661         Reviewed by Darin.
3662
3663         <rdar://problem/3507175>: Setting timeout function can allocate JS objects without lock
3664
3665         * khtml/ecma/kjs_window.cpp:
3666         (ScheduledAction::execute): Lock interpreter around code that
3667         might allocate JS objects.
3668
3669 2003-12-10  David Hyatt  <hyatt@apple.com>
3670
3671         Fix for 3507097, overflow:auto should include the height of the horizontal scrollbar when the height
3672         of the block is auto.
3673         
3674         Reviewed by darin
3675
3676         * khtml/rendering/bidi.cpp:
3677         (khtml::RenderBlock::layoutInlineChildren):
3678         * khtml/rendering/render_block.cpp:
3679         (khtml::RenderBlock::layoutBlock):
3680         (khtml::RenderBlock::layoutBlockChildren):
3681
3682 2003-12-10  Darin Adler  <darin@apple.com>
3683
3684         Reviewed by Maciej.
3685
3686         - fixed 3506739: nil-deref in DocumentImpl::setSelection triple clicking (generated content)
3687
3688         * khtml/khtml_part.cpp: (KHTMLPart::khtmlMousePressEvent): Check for the case where
3689         m_selectionEnd is 0. This doesn't fix the behavior completely, but it does prevent a crash.
3690
3691 2003-12-10  Maciej Stachowiak  <mjs@apple.com>
3692
3693         Reviewed by Richard.
3694
3695         <rdar://problem/3487160>: Implement synchronous loading for XMLHttpRequest
3696         
3697         * khtml/ecma/xmlhttprequest.cpp:
3698         (KJS::XMLHttpRequest::XMLHttpRequest):
3699         (KJS::XMLHttpRequest::send):
3700         (KJS::XMLHttpRequest::abort):
3701         (KJS::XMLHttpRequest::processSyncLoadResults):
3702         (KJS::XMLHttpRequest::slotRedirection):
3703         (KJS::XMLHttpRequest::slotData):
3704         * khtml/ecma/xmlhttprequest.h:
3705         * kwq/KWQLoader.h:
3706         * kwq/KWQLoader.mm:
3707         (KWQHeaderStringFromDictionary):
3708         (KWQServeSynchronousRequest):
3709         (KWQResponseHeaderString):
3710         * kwq/WebCoreBridge.h:
3711
3712 2003-12-10  Darin Adler  <darin@apple.com>
3713
3714         Reviewed by Maciej.
3715
3716         - fixed 3506706: REGRESSION (100-115): onkeyup handlers called twice for active input fields
3717
3718         * kwq/KWQTextArea.mm: (-[KWQTextAreaTextView keyUp:]): Don't call super because we
3719         don't want to pass the event down the responder chain.
3720         * kwq/KWQTextField.mm: (-[KWQTextField textView:shouldHandleEvent:]): Return NO for
3721         key up events because we don't want to pass the event down the responder chain.
3722
3723 2003-12-10  Richard Williamson   <rjw@apple.com>
3724
3725         Added method to get to the bridge from a view.  This is
3726         used to ultimately get the part and KJS::Window for a
3727         particular applet.
3728
3729         Reviewed by Hyatt.
3730
3731         * kwq/WebCoreBridge.h:
3732         * kwq/WebCoreBridge.mm:
3733         (rootForView):
3734         (-[WebCoreBridge init]):
3735         * kwq/WebCoreViewFactory.h:
3736         * kwq/WebCoreViewFactory.m:
3737
3738 2003-12-10  John Sullivan  <sullivan@apple.com>
3739
3740         - WebCore part of fix for:
3741         <rdar://problem/3505231>: REGRESSION (100-114): Some sites autoscroll to bottom of page when loading
3742
3743         Reviewed by Darin.
3744
3745         * kwq/KWQNSViewExtras.h:
3746         * kwq/KWQNSViewExtras.m:
3747         (-[NSView _KWQ_scrollPointRecursive:]):
3748         (-[NSView _KWQ_scrollPointRecursive:inView:]):
3749         new methods, similar to existing scrollRect methods
3750         except that the preferred position for the point is
3751         the top-left corner rather than centered in the visible area
3752         
3753         * kwq/KWQScrollView.h:
3754         * kwq/KWQScrollView.mm:
3755         (QScrollView::setContentsPosRecursive):
3756         new method, calls _KWQ_scrollPointRecursive:
3757
3758         * khtml/khtml_part.cpp:
3759         (KHTMLPart::gotoAnchor):
3760         call setContentsPosRecursive instead of setContentsPos; also remove
3761         the 50 pixel offset that upset Hyatt so.
3762         
3763
3764 2003-12-10  Chris Blumenberg  <cblu@apple.com>
3765
3766         * kwq/KWQKSSLKeyGen.mm:
3767         (KSSLKeyGen::signedPublicKeyAndChallengeString): removed unnecessary includes
3768
3769 2003-12-10  David Hyatt  <hyatt@apple.com>
3770
3771         Fix for 3505846, overflow:auto region doesn't update when scrolled.  The child layers inside an overflow:auto
3772         block were not updating their positions.
3773         
3774         Reviewed by john
3775
3776         * khtml/khtmlview.cpp:
3777         (KHTMLView::layout):
3778         * khtml/rendering/render_layer.cpp:
3779         (RenderLayer::updateLayerPositions):
3780         (RenderLayer::scrollToOffset):
3781         * khtml/rendering/render_layer.h:
3782
3783 2003-12-09  Maciej Stachowiak  <mjs@apple.com>
3784
3785         Reviewed by John.
3786
3787         <rdar://problem/3505795>: loading invalid XML document crashes trying to create h1 element
3788         <rdar://problem/3504158>: XMLHttpRequest xhtml test totally fails
3789         
3790         * khtml/xml/dom_docimpl.cpp:
3791         (DocumentImpl::isValidName): include "0123456789" instead of
3792         "0-9", it's not a regexp it's just a list of characters.
3793
3794 2003-12-09  Maciej Stachowiak  <mjs@apple.com>
3795
3796         Reviewed by John.
3797
3798         <rdar://problem/3504155>: Safari fails XMLHttpRequest abort test
3799         
3800         * khtml/ecma/xmlhttprequest.cpp:
3801         (KJS::XMLHttpRequestProtoFunc::tryCall): Avoid throwing an
3802         exception after send().
3803
3804 2003-12-09  David Hyatt  <hyatt@apple.com>
3805
3806         Rename -apple-aqua to auto for outline styles.
3807         
3808         Reviewed by darin
3809
3810         * khtml/css/cssparser.cpp:
3811         (CSSParser::parseValue):
3812         * khtml/css/cssstyleselector.cpp:
3813         (khtml::CSSStyleSelector::applyRule):
3814         * khtml/css/cssvalues.c:
3815         (hash_val):
3816         (findValue):
3817         * khtml/css/cssvalues.h:
3818         * khtml/css/cssvalues.in:
3819         * khtml/css/html4.css:
3820         * khtml/rendering/render_inline.cpp:
3821         (RenderInline::paintObject):
3822         * khtml/rendering/render_object.cpp:
3823         (RenderObject::drawBorder):
3824         (RenderObject::paintOutline):
3825         * khtml/rendering/render_style.h:
3826         (khtml::):
3827         (khtml::OutlineValue::OutlineValue):
3828         (khtml::RenderStyle::outlineStyleIsAuto):
3829         (khtml::RenderStyle::outlineOffset):
3830         (khtml::RenderStyle::setOutlineStyle):
3831         (khtml::RenderStyle::setOutlineOffset):
3832         * kwq/KWQRenderTreeDebug.cpp:
3833         (printBorderStyle):
3834
3835 2003-12-09  Maciej Stachowiak  <mjs@apple.com>
3836
3837         Reviewed by John.
3838
3839         <rdar://problem/3487195>: Implement responseXML property for XMLHttpRequest
3840         
3841         * khtml/ecma/xmlhttprequest.cpp:
3842         (KJS::XMLHttpRequest::getValueProperty): Implemented responseXML by parsing the
3843         document and returning it.
3844         (KJS::XMLHttpRequest::XMLHttpRequest): Initialize new field
3845         * khtml/ecma/xmlhttprequest.h:
3846
3847         * khtml/ecma/kjs_window.cpp: 
3848         (Windw::get): Forgot this in last commit; add XMLSerializer
3849         constructor.
3850         * khtml/ecma/kjs_window.lut.h:
3851         * khtml/ecma/Makefile.am: Forgot to include this in the last commit.
3852
3853 2003-12-09  Maciej Stachowiak  <mjs@apple.com>
3854
3855         Reviewed by Richard.
3856
3857         <rdar://problem/3504049>: XMLSerializer object and serializeToString method needed for XMLHttpRequest testing
3858
3859         Also fixed some lasst-minute mistakes in the DOM serialization
3860         code that was already there.
3861         
3862         * WebCore.pbproj/project.pbxproj:
3863         * khtml/dom/dom_doc.h:
3864         * khtml/ecma/Makefile.am:
3865         * khtml/ecma/kjs_window.cpp:
3866         (Window::get):
3867         * khtml/ecma/kjs_window.h:
3868         (KJS::Window::):
3869         * khtml/ecma/kjs_window.lut.h:
3870         (KJS::):
3871         * khtml/ecma/xmlserializer.cpp: Added.
3872         (KJS::XMLSerializerConstructorImp::XMLSerializerConstructorImp):
3873         (KJS::XMLSerializerConstructorImp::implementsConstruct):
3874         (KJS::XMLSerializerConstructorImp::construct):
3875         (KJS::):
3876         (KJS::XMLSerializer::XMLSerializer):
3877         (KJS::XMLSerializerProtoFunc::tryCall):
3878         * khtml/ecma/xmlserializer.h: Added.
3879         (KJS::XMLSerializer::toBoolean):
3880         (KJS::XMLSerializer::classInfo):
3881         (KJS::XMLSerializer::):
3882         * khtml/ecma/xmlserializer.lut.h: Added.
3883         (KJS::):
3884         * khtml/xml/dom_docimpl.cpp:
3885         (DocumentImpl::toString):
3886         (DocumentFragmentImpl::toString):
3887         * khtml/xml/dom_elementimpl.cpp:
3888         (AttrImpl::toString):
3889         (ElementImpl::toString):
3890
3891 2003-12-09  David Hyatt  <hyatt@apple.com>
3892
3893         Implement start() and stop() for marquees.
3894         
3895         Reviewed by darin
3896
3897         * khtml/ecma/kjs_html.cpp:
3898         (KJS::HTMLElement::classInfo):
3899         (KJS::HTMLElementFunction::tryCall):
3900         * khtml/ecma/kjs_html.h:
3901         (KJS::HTMLElement::):
3902         * khtml/ecma/kjs_html.lut.h:
3903         (KJS::):
3904
3905 2003-12-09  Darin Adler  <darin@apple.com>
3906
3907         Reviewed by John.
3908
3909         - fixed 3505277: nil-deref in ownerElement after choosing item from menu at projectnissan.com
3910
3911         * khtml/xml/dom_nodeimpl.cpp: (NodeImpl::dispatchWindowEvent): Add check for nil.
3912
3913 2003-12-09  Darin Adler  <darin@apple.com>
3914
3915         Reviewed by Maciej.
3916
3917         * kwq/KWQKHTMLPart.mm:
3918         (KWQKHTMLPart::saveLocationProperties): Add locking around the call to get the location
3919         since it can allocate.
3920         (KWQKHTMLPart::restoreLocationProperties): Ditto.
3921
3922 2003-12-09  David Hyatt  <hyatt@apple.com>
3923
3924         Fix for mojibake bg painting problem on bofa.com.  The bug # is 3487144.  Transparent colors were not
3925         being handled properly when specified on the body.
3926         
3927         Reviewed by darin
3928
3929         * khtml/rendering/render_box.cpp:
3930         (RenderBox::paintRootBoxDecorations):
3931         (RenderBox::paintBackgroundExtended):
3932
3933 2003-12-09  Darin Adler  <darin@apple.com>
3934
3935         Reviewed by Dave.
3936
3937         - fixed 3505391: REGRESSION (100-116): pages that move cells around don't repaint correctly
3938
3939         * khtml/rendering/render_table.cpp: (RenderTableSection::layoutRows): Added code
3940         similar to the code in RenderBlock::layoutBlock, but for table cells.
3941
3942 2003-12-09  Darin Adler  <darin@apple.com>
3943
3944         Reviewed by Maciej.
3945
3946         * khtml/ecma/kjs_events.cpp: (JSEventListener::handleEvent): Add locking around the call to
3947         push event handler scope. Without this, we hit the "allocated without locking" assertion.
3948
3949 2003-12-09  David Hyatt  <hyatt@apple.com>
3950
3951         Fix the dirty rect checks on various render_objects to be more accurate so that page-break properties don't
3952         have mojibake when printing.
3953         
3954         Reviewed by john
3955
3956         * khtml/rendering/render_block.cpp:
3957         (khtml::RenderBlock::paint):
3958         * khtml/rendering/render_flow.cpp:
3959         (RenderFlow::paintLineBoxBackgroundBorder):
3960         (RenderFlow::paintLineBoxDecorations):
3961         * khtml/rendering/render_replaced.cpp:
3962         (RenderReplaced::paint):
3963         * khtml/rendering/render_table.cpp:
3964         (RenderTable::paint):
3965
3966 2003-12-09  Darin Adler  <darin@apple.com>
3967
3968         Reviewed by Richard.
3969
3970         - fixed 3500408: Web Kit should pass the MAYSCRIPT attribute from the APPLET tag to the Java plug-in
3971
3972         * khtml/html/html_objectimpl.cpp:
3973         (HTMLAppletElementImpl::parseAttribute): Allow the "mayscript" attribute.
3974         (HTMLAppletElementImpl::createRenderer): Pass the value of the "mayscript" attribute
3975         as an argument named "mayScript".
3976
3977         * khtml/misc/htmlattrs.in: Added "mayscript".
3978         * khtml/misc/htmlattrs.c: Regenerated.
3979         * khtml/misc/htmlattrs.h: Regenerated.
3980
3981 2003-12-09  Maciej Stachowiak  <mjs@apple.com>
3982
3983         Reviewed by Darin.
3984
3985         <rdar://problem/3501030>: JavaScript sites crash when a PAC file is in place (WebCore,Safari 1.2)
3986         
3987         * khtml/ecma/kjs_events.cpp:
3988         (JSEventListener::handleEvent): Lock interpreter when needed.
3989         (JSLazyEventListener::parseCode): Likewise.
3990         (KJS::getDOMEvent): Likewise.
3991         * khtml/ecma/kjs_proxy.cpp:
3992         (KJSProxyImpl::evaluate): Likewise.
3993         (KJSProxyImpl::initScript): Likewise.
3994
3995 2003-12-09  David Hyatt  <hyatt@apple.com>
3996
3997         Fix for 3491235, really make <script src="..."/> work in HTML.  My original attempt to fix this only made
3998         the tag flat, but did not ensure that the script got processed.
3999         
4000         Reviewed by john
4001
4002         * khtml/html/htmltokenizer.cpp:
4003         (HTMLTokenizer::parseTag):
4004
4005 2003-12-08  David Hyatt  <hyatt@apple.com>
4006
4007         Fix for 3503652, news.com misrenders badly (footer is out of position).  My fix to 3495748 caused this
4008         regression.  I made the tag priority of <nobr> too high.  It needed to be the same as <div>, and I
4009         accidentally made it higher.  I intended for it to be the same as <div>.
4010
4011         I also had to make a fix (now that <nobr> has a higher priority) to ensure <nobr> can't be nested inside
4012         other <nobr>.  
4013
4014         Both fixes were required to make news.com render correctly again.
4015         
4016         Reviewed by darin
4017
4018         * khtml/html/dtd.cpp:
4019         * khtml/html/htmlparser.cpp:
4020         (KHTMLParser::getElement):
4021
4022 2003-12-08  Chris Blumenberg  <cblu@apple.com>
4023
4024         Fixed: <rdar://problem/3234676>: Support for KEYGEN tag (ie 509 email certificates from www.thawte.com)
4025
4026         Reviewed by mjs.
4027
4028         * WebCore-combined.exp:
4029         * WebCore.exp:
4030         * WebCore.pbproj/project.pbxproj:
4031         * khtml/html/html_formimpl.cpp:
4032         (HTMLKeygenElementImpl::parseAttribute): store the KEYTYPE attribute
4033         (HTMLKeygenElementImpl::encoding): call KSSLKeyGen::signedPublicKeyAndChallengeString