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