Make sure "auto" is allowed as a valid value when parsing rect shapes (e.g., for...
[WebKit-https.git] / WebCore / ChangeLog-2005-08-23
1 2004-03-29  David Hyatt  <hyatt@apple.com>
2
3         Make sure "auto" is allowed as a valid value when parsing rect shapes (e.g., for the clip property).
4         
5         Reviewed by rjw
6
7         * khtml/css/cssparser.cpp:
8         (CSSParser::parseShape):
9
10 2004-03-29  David Hyatt  <hyatt@apple.com>
11
12         Followup fix.  Handle the case where a hard line break occurs right after a soft hyphen.  In this
13         case we were losing a letter of the word in addition to not rendering the soft hyphen.
14         
15         Reviewed by kocienda
16
17         * khtml/rendering/bidi.cpp:
18         (khtml::checkMidpoints):
19
20 2004-03-29  David Hyatt  <hyatt@apple.com>
21
22         Fix for 3604154, support soft hyphens when rendering.  This patch implements soft hyphen support that
23         matches IE6 on Windows and Opera 7.  Soft hyphens that don't break lines end up getting collapsed away.
24         Only if the hyphen breaks a line does it render.
25         
26         Reviewed by kocienda
27
28         * khtml/rendering/bidi.cpp:
29         (khtml::chopMidpointsAt):
30         (khtml::appendRunsForObject):
31         (khtml::RenderBlock::findNextLineBreak):
32         * khtml/rendering/render_text.cpp:
33         (RenderText::calcMinMaxWidth):
34
35 2004-03-29  John Sullivan  <sullivan@apple.com>
36
37         Made menu shortcuts work again when editing HTML
38
39         Reviewed by Darin.
40
41         * khtml/xml/dom_elementimpl.cpp:
42         (ElementImpl::defaultEventHandler):
43         Don't treat key events with command key down as
44         editing events.
45
46 2004-03-28  Darin Adler  <darin@apple.com>
47
48         Reviewed by John.
49
50         - fixed <rdar://problem/3602202>: "feed:uuid:...." links in Emerson content are being changed into "feed:uuuid:...."
51
52         * kwq/KWQKURL.mm: (copyPathRemovingDots): Add special case for empty path. The old code had an
53         assertion that explicitly allowed this case, but it copied a character from the src buffer,
54         which was incorrect.
55
56 2004-03-26  David Hyatt  <hyatt@apple.com>
57
58         Fix for 3600642, letter magnet demo doesn't update until mouse move.  This patch also fixes problems
59         with the animated text Gecko DOM demos on developer.netscape.com.  Make sure that timer callbacks via
60         setTimeout always updateRendering after executing the JS code.
61         
62         Reviewed by darin
63
64         * khtml/ecma/kjs_window.cpp:
65         (ScheduledAction::execute):
66
67 === Safari-134 ===
68
69 2004-03-25  David Hyatt  <hyatt@apple.com>
70
71         Implement the rest of the search field.  Make it work with form submission.  Implement onscroll at
72         the document level.
73         
74         Reviewed by darin
75
76         * khtml/html/html_formimpl.cpp:
77         (HTMLFormElementImpl::submit):
78         * khtml/rendering/render_form.cpp:
79         (RenderLineEdit::addSearchResult):
80         * khtml/rendering/render_form.h:
81         * kwq/KWQKHTMLPart.h:
82         * kwq/KWQKHTMLPart.mm:
83         (KWQKHTMLPart::sendScrollEvent):
84         * kwq/KWQLineEdit.h:
85         * kwq/KWQLineEdit.mm:
86         (QLineEdit::setMaxResults):
87         (QLineEdit::setPlaceholderString):
88         (QLineEdit::addSearchResult):
89         * kwq/WebCoreBridge.h:
90         * kwq/WebCoreBridge.mm:
91         (-[WebCoreBridge sendScrollEvent]):
92         * kwq/WebCoreViewFactory.h:
93
94 2004-03-25  David Hyatt  <hyatt@apple.com>
95
96         Fix for 3570700, crash in inlineBox::isDirty.  Make sure line boxes null out parent pointers when those
97         parents get deleted.  r=john
98
99         Fix for .value not being settable on selects.  r=darin
100         
101         * khtml/html/html_formimpl.cpp:
102         (HTMLSelectElementImpl::setValue):
103         * khtml/rendering/render_block.cpp:
104         (khtml::RenderBlock::removeChildrenFromLineBoxes):
105         (khtml::RenderBlock::removeChild):
106         * khtml/rendering/render_block.h:
107         * khtml/rendering/render_line.cpp:
108         (InlineFlowBox::removeChild):
109         
110 2004-03-25  Darin Adler  <darin@apple.com>
111
112         Fix by Kristin Webster, reviewed by me.
113
114         - fixed <rdar://problem/3582431>: HiDPI - Form elements not working when scaling factor != 1.0
115
116         * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::passWidgetMouseDownEventToWidget): Pass nil for fromView
117         rather than passing the top level view.
118
119 2004-03-24  Darin Adler  <darin@apple.com>
120
121         Reviewed by John.
122
123         - fixed <rdar://problem/3566805>: REGRESSION: When the subject of mailto is 2 byte Safari failed to send mail address and subject to Mail.app
124
125         * kwq/KWQKURL.mm: (KURL::findHostnamesInMailToURL): Update to handle hostnames that end just before
126         a '?' since a '?' ends the entire part of the URL that can contain hostnames. Also change the logic so
127         that the '?' will successfully end the search.
128
129 2004-03-24  Darin Adler  <darin@apple.com>
130
131         Reviewed by John.
132
133         - fixed <rdar://problem/3599650>: main image missing due to incorrect relative URL resolution at www.brother.com
134
135         * kwq/KWQKURL.mm: (KURL::KURL): Implement compatibility rule from the URI RFC.
136         If a URL has a scheme, but does not start with the "/" character, and the scheme
137         matches the base URL, then treat it as a relative URL.
138
139 2004-03-24  Ken Kocienda  <kocienda@apple.com>
140
141         Reviewed by me.
142
143         I neglected to check in these required changes when I landed previously.
144         This is what I get for trying to commit when I had other changes in
145         my tree.
146
147         * khtml/dom/html_form.cpp:
148         (HTMLSelectElement::add): Uses new-style call.
149         * khtml/html/html_formimpl.cpp:
150         (HTMLSelectElementImpl::add): Change the interface for this call to use
151         impl objects instead of API objects. This works around the fact that the
152         API object's constructor that takes an impl is protected.
153         * khtml/html/html_formimpl.h: Uses new-style call.
154
155 2004-03-24  Ken Kocienda <kocienda@apple.com>
156
157         Implemented the remainder of the HTML DOM API.
158     
159         Reviewed by Chris.
160     
161         * kwq/DOMHTML.h
162         * kwq/HTMLDOM.mm
163
164 2004-03-23  David Hyatt  <hyatt@apple.com>
165
166         Fix for 3487207, implement onscroll DOM event for elements with overflow:auto/scroll/hidden.  This does
167         not handle firing onscroll on the window when the document scrolls, nor does it handle firing onscroll
168         on textareas.  These are two separate bugs.
169
170         This patch finishes stubbing out the onscroll event and adds support for it to the DOM.  It also supports
171         the firing of the event when overflow blocks scroll.
172         
173         Reviewed by darin
174
175         * khtml/ecma/kjs_dom.cpp:
176         (DOMNode::getValueProperty):
177         (DOMNode::putValue):
178         * khtml/ecma/kjs_dom.h:
179         (KJS::DOMNode::):
180         * khtml/ecma/kjs_dom.lut.h:
181         (KJS::):
182         * khtml/ecma/kjs_window.cpp:
183         (Window::get):
184         (Window::put):
185         * khtml/ecma/kjs_window.h:
186         (KJS::Window::):
187         * khtml/ecma/kjs_window.lut.h:
188         (KJS::):
189         * khtml/html/html_baseimpl.cpp:
190         (HTMLBodyElementImpl::parseHTMLAttribute):
191         * khtml/html/html_elementimpl.cpp:
192         (HTMLElementImpl::parseHTMLAttribute):
193         * khtml/misc/htmlattrs.c:
194         (hash_attr):
195         (findAttr):
196         * khtml/misc/htmlattrs.h:
197         * khtml/misc/htmlattrs.in:
198         * khtml/rendering/render_layer.cpp:
199         (RenderLayer::scrollToOffset):
200
201 2004-03-23  David Hyatt  <hyatt@apple.com>
202
203         Fix for 3513627, HTML mail prints upside down occasionally.  Change printing so that it never resizes the
204         WebHTMLView when formatting for printing.  When computing page rects, instead of using the view's bounds,
205         use the root layer's width instead.
206
207         Reviewed by darin
208
209         * khtml/khtmlview.cpp:
210         (KHTMLView::layout):
211         * kwq/WebCoreBridge.h:
212         * kwq/WebCoreBridge.mm:
213         (-[WebCoreBridge computePageRectsWithPrintWidthScaleFactor:printHeight:]):
214
215 2004-03-23  David Hyatt  <hyatt@apple.com>
216
217         Fix for crasher 3598204, previousKeyView was calling nextKeyView instead.
218         
219         Reviewed by darin
220
221         * kwq/KWQTextField.mm:
222         (-[KWQTextField previousKeyView]):
223         (-[KWQSecureTextField previousKeyView]):
224         (-[KWQSearchField previousKeyView]):
225
226 2004-03-23  Darin Adler  <darin@apple.com>
227
228         Reviewed by Vicki.
229
230         - fixed deployment build
231
232 2004-03-22  David Hyatt  <hyatt@apple.com>
233
234         Wire up NSSearchField to WebCore.  Add support for placeholder strings, autosaving of recent items, the ability to show/hide
235         the magnifying glass search button, the ability to specify the maximum number of results, the ability to specify an incremental
236         search or not, etc.  Added a DOM event that fires when the search field indicates that search results should be updated.
237         
238         Reviewed by darin
239
240         * khtml/ecma/kjs_dom.cpp:
241         (DOMNode::getValueProperty):
242         (DOMNode::putValue):
243         * khtml/ecma/kjs_dom.h:
244         (KJS::DOMNode::):
245         * khtml/ecma/kjs_dom.lut.h:
246         (KJS::):
247         * khtml/ecma/kjs_window.cpp:
248         (Window::get):
249         (Window::put):
250         * khtml/ecma/kjs_window.h:
251         (KJS::Window::):
252         * khtml/ecma/kjs_window.lut.h:
253         (KJS::):
254         * khtml/html/html_formimpl.cpp:
255         (HTMLInputElementImpl::parseHTMLAttribute):
256         * khtml/html/html_formimpl.h:
257         (DOM::HTMLInputElementImpl::maxResults):
258         * khtml/misc/htmlattrs.c:
259         (hash_attr):
260         (findAttr):
261         * khtml/misc/htmlattrs.h:
262         * khtml/misc/htmlattrs.in:
263         * khtml/rendering/render_form.cpp:
264         (RenderLineEdit::RenderLineEdit):
265         (RenderLineEdit::slotPerformSearch):
266         (RenderLineEdit::updateFromElement):
267         * khtml/rendering/render_form.h:
268         * khtml/xml/dom2_eventsimpl.cpp:
269         (EventImpl::typeToId):
270         (EventImpl::idToType):
271         * khtml/xml/dom2_eventsimpl.h:
272         (DOM::EventImpl::):
273         * kwq/KWQLineEdit.h:
274         (QLineEdit::performSearch):
275         (QLineEdit::type):
276         * kwq/KWQLineEdit.mm:
277         (QLineEdit::QLineEdit):
278         (QLineEdit::setLiveSearch):
279         (QLineEdit::setAutoSaveName):
280         (QLineEdit::setMaxResults):
281         (QLineEdit::setPlaceholderString):
282         * kwq/KWQSlot.mm:
283         (KWQSlot::KWQSlot):
284         (KWQSlot::call):
285         * kwq/KWQTextField.mm:
286         (-[KWQTextFieldController initWithTextField:QLineEdit:]):
287         (-[KWQTextFieldController invalidate]):
288         (-[KWQTextFieldController action:]):
289         (-[KWQTextFieldController controlTextDidBeginEditing:]):
290         (-[KWQTextFieldController controlTextDidEndEditing:]):
291         (-[KWQTextFieldController controlTextDidChange:]):
292         (-[KWQTextFieldController control:textShouldBeginEditing:]):
293         (-[KWQTextFieldController control:textShouldEndEditing:]):
294         (-[KWQTextFieldController control:didFailToFormatString:errorDescription:]):
295         (-[KWQTextFieldController control:didFailToValidatePartialString:errorDescription:]):
296         (-[KWQTextFieldController control:isValidObject:]):
297         (-[KWQTextFieldController control:textView:doCommandBySelector:]):
298         (-[KWQTextFieldController textChanged]):
299
300 2004-03-22  David Hyatt  <hyatt@apple.com>
301
302         Factoring of form control code to enable sharing between three types of text fields: normal, password, and
303         the new search field.  Also made search field creatable using <input type="search">.  There are still many
304         bugs with the field, but you can at least type in it and submit it with a form.
305         
306         Reviewed by darin
307
308         * khtml/html/html_formimpl.cpp:
309         (HTMLInputElementImpl::setType):
310         (HTMLInputElementImpl::type):
311         (HTMLInputElementImpl::click):
312         (HTMLInputElementImpl::accessKeyAction):
313         (HTMLInputElementImpl::rendererIsNeeded):
314         (HTMLInputElementImpl::createRenderer):
315         (HTMLInputElementImpl::encoding):
316         (HTMLInputElementImpl::defaultEventHandler):
317         (HTMLInputElementImpl::isEditable):
318         * khtml/html/html_formimpl.h:
319         (DOM::HTMLInputElementImpl::):
320         * khtml/rendering/render_form.cpp:
321         (RenderLineEdit::RenderLineEdit):
322         * kwq/KWQKLineEdit.h:
323         (KLineEdit::KLineEdit):
324         * kwq/KWQLineEdit.h:
325         (QLineEdit::):
326         * kwq/KWQLineEdit.mm:
327         (QLineEdit::QLineEdit):
328         (QLineEdit::~QLineEdit):
329         (QLineEdit::setFont):
330         (QLineEdit::setText):
331         (QLineEdit::text):
332         (QLineEdit::setMaxLength):
333         (QLineEdit::isReadOnly):
334         (QLineEdit::setReadOnly):
335         (QLineEdit::maxLength):
336         (QLineEdit::selectAll):
337         (QLineEdit::edited):
338         (QLineEdit::setEdited):
339         (QLineEdit::sizeForCharacterWidth):
340         (QLineEdit::baselinePosition):
341         (QLineEdit::setAlignment):
342         (QLineEdit::setWritingDirection):
343         (KWQNSTextAlignmentForAlignmentFlags):
344         (QLineEdit::setLiveSearch):
345         * kwq/KWQTextField.h:
346         * kwq/KWQTextField.mm:
347         (-[KWQTextFieldController initWithTextField:QLineEdit:]):
348         (-[KWQTextFieldController action:]):
349         (-[KWQTextFieldController dealloc]):
350         (-[KWQTextFieldController widget]):
351         (-[KWQTextFieldController setMaximumLength:]):
352         (-[KWQTextFieldController controlTextDidBeginEditing:]):
353         (-[KWQTextFieldController controlTextDidEndEditing:]):
354         (-[KWQTextFieldController controlTextDidChange:]):
355         (-[KWQTextFieldController control:textShouldBeginEditing:]):
356         (-[KWQTextFieldController control:textShouldEndEditing:]):
357         (-[KWQTextFieldController control:didFailToFormatString:errorDescription:]):
358         (-[KWQTextFieldController control:didFailToValidatePartialString:errorDescription:]):
359         (-[KWQTextFieldController control:isValidObject:]):
360         (-[KWQTextFieldController control:textView:doCommandBySelector:]):
361         (-[KWQTextFieldController textChanged]):
362         (-[KWQTextFieldController setInDrawingMachinery:]):
363         (-[KWQTextFieldController textView:shouldDrawInsertionPointInRect:color:turnedOn:]):
364         (-[KWQTextFieldController textView:shouldHandleEvent:]):
365         (-[KWQTextFieldController textView:didHandleEvent:]):
366         (-[KWQTextFieldController setBaseWritingDirection:]):
367         (-[KWQTextFieldController baseWritingDirection]):
368         (-[KWQTextFieldController selectedRange]):
369         (-[KWQTextFieldController setSelectedRange:]):
370         (-[KWQTextFieldController setHasFocus:]):
371         (-[KWQTextFieldController updateTextAttributes:]):
372         (+[KWQTextField cellClass]):
373         (-[KWQTextField initWithQLineEdit:]):
374         (-[KWQTextField dealloc]):
375         (-[KWQTextField controller]):
376         (-[KWQTextField widget]):
377         (-[KWQTextField selectText:]):
378         (-[KWQTextField setStringValue:]):
379         (-[KWQTextField nextKeyView]):
380         (-[KWQTextField previousKeyView]):
381         (-[KWQTextField nextValidKeyView]):
382         (-[KWQTextField previousValidKeyView]):
383         (-[KWQTextField acceptsFirstResponder]):
384         (-[KWQTextField display]):
385         (-[KWQTextField displayRectIgnoringOpacity:]):
386         (-[KWQTextField textView:shouldDrawInsertionPointInRect:color:turnedOn:]):
387         (-[KWQTextField textView:shouldHandleEvent:]):
388         (-[KWQTextField textView:didHandleEvent:]):
389         (-[KWQTextFieldCell editWithFrame:inView:editor:delegate:event:]):
390         (-[KWQTextFieldCell selectWithFrame:inView:editor:delegate:start:length:]):
391         (-[KWQTextFieldCell _textAttributes]):
392         (-[KWQSecureTextField initWithQLineEdit:]):
393         (-[KWQSecureTextField dealloc]):
394         (-[KWQSecureTextField controller]):
395         (-[KWQSecureTextField widget]):
396         (-[KWQSecureTextField setStringValue:]):
397         (-[KWQSecureTextField nextKeyView]):
398         (-[KWQSecureTextField previousKeyView]):
399         (-[KWQSecureTextField acceptsFirstResponder]):
400         (-[KWQSecureTextField display]):
401         (-[KWQSecureTextField displayRectIgnoringOpacity:]):
402         (-[KWQSecureTextField textView:shouldDrawInsertionPointInRect:color:turnedOn:]):
403         (-[KWQSecureTextField textView:shouldHandleEvent:]):
404         (-[KWQSecureTextField textView:didHandleEvent:]):
405         (-[KWQSecureTextField selectText:]):
406         (-[KWQSecureTextFieldCell editWithFrame:inView:editor:delegate:event:]):
407         (-[KWQSecureTextFieldCell selectWithFrame:inView:editor:delegate:start:length:]):
408         (-[KWQSecureTextFieldCell _textAttributes]):
409         (+[KWQSearchField cellClass]):
410         (-[KWQSearchField initWithQLineEdit:]):
411         (-[KWQSearchField dealloc]):
412         (-[KWQSearchField controller]):
413         (-[KWQSearchField widget]):
414         (-[KWQSearchField selectText:]):
415         (-[KWQSearchField setStringValue:]):
416         (-[KWQSearchField nextKeyView]):
417         (-[KWQSearchField previousKeyView]):
418         (-[KWQSearchField nextValidKeyView]):
419         (-[KWQSearchField previousValidKeyView]):
420         (-[KWQSearchField acceptsFirstResponder]):
421         (-[KWQSearchField display]):
422         (-[KWQSearchField displayRectIgnoringOpacity:]):
423         (-[KWQSearchField textView:shouldDrawInsertionPointInRect:color:turnedOn:]):
424         (-[KWQSearchField textView:shouldHandleEvent:]):
425         (-[KWQSearchField textView:didHandleEvent:]):
426         (-[KWQSearchFieldCell editWithFrame:inView:editor:delegate:event:]):
427         (-[KWQSearchFieldCell selectWithFrame:inView:editor:delegate:start:length:]):
428         (-[KWQSearchFieldCell _textAttributes]):
429         (-[KWQTextFieldFormatter init]):
430         (-[KWQTextFieldFormatter setMaximumLength:]):
431         (-[KWQTextFieldFormatter maximumLength]):
432         (-[KWQTextFieldFormatter stringForObjectValue:]):
433         (-[KWQTextFieldFormatter getObjectValue:forString:errorDescription:]):
434         (-[KWQTextFieldFormatter isPartialStringValid:newEditingString:errorDescription:]):
435         (-[KWQTextFieldFormatter attributedStringForObjectValue:withDefaultAttributes:]):
436         (-[NSString _KWQ_truncateToNumComposedCharacterSequences:]):
437         (-[NSTextField _KWQ_currentEditor]):
438
439 === Safari-133 ===
440
441 2004-03-19  Darin Adler  <darin@apple.com>
442
443         Reviewed by Ken.
444
445         - fixed <rdar://problem/3583945>: crash when choosing a file to upload
446
447         * kwq/KWQFileButton.mm:
448         (-[KWQFileButtonAdapter dealloc]): Removed unneeded method.
449         (-[KWQFileButtonAdapter filenameChanged:]): Check for nil.
450         (-[KWQFileButtonAdapter focusChanged:]): Ditto.
451         (-[KWQFileButtonAdapter clicked]): Ditto.
452
453 2004-03-17  Darin Adler  <darin@apple.com>
454
455         Reviewed by John.
456
457         - fixed rdar://problem/3312803>: extra space in copied text (3g.co.uk)
458
459         * khtml/khtml_part.cpp: (KHTMLPart::text): Explicitly set neededSpace to false after
460         processing a line break. Doesn't really have an effect here, but matches the change
461         to the styled text version.
462         * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::attributedString): Same change in the styled
463         text version.
464
465 2004-03-16  Darin Adler  <darin@apple.com>
466
467         Reviewed by Ken.
468
469         - a little more DOM cleanup
470
471         * kwq/DOM-CSS.mm: Added DOMCSSUnknownRule.
472         * kwq/DOM.mm: Split category implementations out to match category interfaces.
473         * kwq/DOMHTML.h: Removed lowSrc, not in DOM Level 2. Added a category for some
474         extensions we'll want on DOMElement.
475         * kwq/DOMInternal.h: Moved _documentImpl method here so it can be used from
476         separate categories.
477         * kwq/DOMRange.h: Changed DOMDocumentRange to a category from a protocol.
478         * kwq/HTMLDOM.mm: Removed unneeded methods.
479
480         * WebCore.pbproj/project.pbxproj: Sort DOM header files alphabetically.
481
482 2004-03-16  Darin Adler  <darin@apple.com>
483
484         Reviewed by Ken.
485
486         - update for new DOM namespacing and header organization
487
488         * WebCore.pbproj/project.pbxproj:
489         * kwq/DOM-CSS.h: Removed.
490         * kwq/DOM-CSS.mm: Update for name changes.
491         * kwq/DOM.h: Changed to include the other DOM headers.
492         * kwq/DOM.mm: Update for name changes.
493         * kwq/DOMCSS.h: Added.
494         * kwq/DOMCore.h: Added.
495         * kwq/DOMEvents.h: Added.
496         * kwq/DOMHTML.h: Added.
497         * kwq/DOMInternal.h: Update for name changes.
498         * kwq/DOMRange.h: Added.
499         * kwq/DOMStylesheets.h: Added.
500         * kwq/DOMTraversal.h: Added.
501         * kwq/DOMViews.h: Added.
502         * kwq/HTMLDOM.h: Removed.
503         * kwq/HTMLDOM.mm: Update for name changes; add some missing setters.
504
505 2004-03-15  Maciej Stachowiak  <mjs@apple.com>
506
507         Reviewed by Darin.
508
509         - max out our iBench cheat. Don't even paint or lay out a quarter
510         of the pages.
511         
512         * khtml/xml/dom_docimpl.cpp:
513         (DocumentImpl::close):
514
515 2004-03-15  Ken Kocienda  <kocienda@apple.com>
516
517         Reviewed by John
518
519         Fix for this bug:
520         
521         <rdar://problem/3588717>: REGRESSION (125-131u): Tabbing to links and tabbing in bookmarks view no longer works
522
523         Change some support methods which feed editing key events to 
524         WebKit. The real fix is on the WebKit side.
525
526         * kwq/KWQKHTMLPart.mm:
527         (KWQKHTMLPart::editingKeyEvent): Call new -editingKeyDown:
528         on WebCoreBridge, as described below.
529         * kwq/WebCoreBridge.h: Changed -keyDown: to -editingKeyDown:
530         since we want to tell WebView about editing key events
531         in a way that does not interfere with other key down
532         events the WebView processes. This is not necessary in the
533         strictest sense, but it seems reasonable to keep the
534         terminology clear.
535
536 === Safari-132 ===
537
538 2004-03-12  Chris Blumenberg  <cblu@apple.com>
539
540         Implemented ~25% of the HTML DOM API.
541
542         Reviewed by kocienda.
543
544         (DOM::HTMLElement::HTMLElement):
545         * kwq/DOM.mm:
546         * kwq/DOMInternal.h:
547         * kwq/HTMLDOM.h:
548         * kwq/HTMLDOM.mm:
549         (-[HTMLCollection _initWithCollectionImpl:]):
550         (+[HTMLCollection _collectionWithImpl:]):
551         (-[HTMLCollection _collectionImpl]):
552         (-[HTMLCollection length]):
553         (-[HTMLCollection item:]):
554         (-[HTMLCollection namedItem:]):
555         (-[HTMLElement _initWithElementImpl:]):
556         (+[HTMLElement _elementWithImpl:]):
557         (-[HTMLElement _HTMLElementImpl]):
558         (-[HTMLElement idName]):
559         (-[HTMLElement setIdName:]):
560         (-[HTMLElement title]):
561         (-[HTMLElement setTitle:]):
562         (-[HTMLElement lang]):
563         (-[HTMLElement setLang:]):
564         (-[HTMLElement dir]):
565         (-[HTMLElement setDir:]):
566         (-[HTMLElement className]):
567         (-[HTMLElement setClassName:]):
568         (-[HTMLDocument _HTMLDocumentImpl]):
569         (-[HTMLDocument title]):
570         (-[HTMLDocument setTitle:]):
571         (-[HTMLDocument referrer]):
572         (-[HTMLDocument domain]):
573         (-[HTMLDocument URL]):
574         (-[HTMLDocument body]):
575         (-[HTMLDocument images]):
576         (-[HTMLDocument applets]):
577         (-[HTMLDocument links]):
578         (-[HTMLDocument forms]):
579         (-[HTMLDocument anchors]):
580         (-[HTMLDocument setBody:]):
581         (-[HTMLDocument cookie]):
582         (-[HTMLDocument setCookie:]):
583         (-[HTMLDocument open]):
584         (-[HTMLDocument close]):
585         (-[HTMLDocument write:]):
586         (-[HTMLDocument writeln:]):
587         (-[HTMLDocument getElementById:]):
588         (-[HTMLDocument getElementsByName:]):
589         (-[HTMLHtmlElement _HTMLHtmlElementImpl]):
590         (-[HTMLHtmlElement version]):
591         (-[HTMLHtmlElement setVersion:]):
592         (-[HTMLHeadElement _headElementImpl]):
593         (-[HTMLHeadElement profile]):
594         (-[HTMLHeadElement setProfile:]):
595         (-[HTMLLinkElement _linkElementImpl]):
596         (-[HTMLLinkElement disabled]):
597         (-[HTMLLinkElement setDisabled:]):
598         (-[HTMLLinkElement charset]):
599         (-[HTMLLinkElement setCharset:]):
600         (-[HTMLLinkElement href]):
601         (-[HTMLLinkElement setHref:]):
602         (-[HTMLLinkElement hreflang]):
603         (-[HTMLLinkElement setHreflang:]):
604         (-[HTMLLinkElement media]):
605         (-[HTMLLinkElement setMedia:]):
606         (-[HTMLLinkElement rel]):
607         (-[HTMLLinkElement setRel:]):
608         (-[HTMLLinkElement rev]):
609         (-[HTMLLinkElement setRev:]):
610         (-[HTMLLinkElement target]):
611         (-[HTMLLinkElement setTarget:]):
612         (-[HTMLLinkElement type]):
613         (-[HTMLLinkElement setType:]):
614         (-[HTMLTitleElement _titleElementImpl]):
615         (-[HTMLTitleElement text]):
616         (-[HTMLTitleElement setText:]):
617         (-[HTMLMetaElement _metaElementImpl]):
618         (-[HTMLMetaElement content]):
619         (-[HTMLMetaElement setContent:]):
620         (-[HTMLMetaElement httpEquiv]):
621         (-[HTMLMetaElement setHttpEquiv:]):
622         (-[HTMLMetaElement name]):
623         (-[HTMLMetaElement setName:]):
624         (-[HTMLMetaElement scheme]):
625         (-[HTMLMetaElement setScheme:]):
626         (-[HTMLBaseElement _baseElementImpl]):
627         (-[HTMLBaseElement href]):
628         (-[HTMLBaseElement setHref:]):
629         (-[HTMLBaseElement target]):
630         (-[HTMLBaseElement setTarget:]):
631         (-[HTMLStyleElement _styleElementImpl]):
632         (-[HTMLStyleElement disabled]):
633         (-[HTMLStyleElement setDisabled:]):
634         (-[HTMLStyleElement media]):
635         (-[HTMLStyleElement setMedia:]):
636         (-[HTMLStyleElement type]):
637         (-[HTMLStyleElement setType:]):
638         (-[HTMLBodyElement _bodyElementImpl]):
639         (-[HTMLBodyElement aLink]):
640         (-[HTMLBodyElement setALink:]):
641         (-[HTMLBodyElement background]):
642         (-[HTMLBodyElement setBackground:]):
643         (-[HTMLBodyElement bgColor]):
644         (-[HTMLBodyElement setBgColor:]):
645         (-[HTMLBodyElement link]):
646         (-[HTMLBodyElement setLink:]):
647         (-[HTMLBodyElement text]):
648         (-[HTMLBodyElement setText:]):
649         (-[HTMLBodyElement vLink]):
650         (-[HTMLBodyElement setVLink:]):
651
652 2004-03-12  David Hyatt  <hyatt@apple.com>
653
654         Fix for problem when undoing the deletion of a word in edit mode.
655         
656         Reviewed by kocienda
657
658         * khtml/rendering/render_text.cpp:
659         (RenderText::setTextWithOffset):
660
661 2004-03-12  Ken Kocienda  <kocienda@apple.com>
662
663         Reviewed by Chris
664
665         * khtml/khtml_part.cpp:
666         (KHTMLPart::handleMouseMoveEventSelection): Clear the selection's
667         "modify bias" since the user clicked, and is therefore no longer
668         extending the selection with arrow keys.
669         * khtml/khtml_selection.cpp:
670         (KHTMLSelection::KHTMLSelection): Add new m_modifyBiasSet flag.
671         (KHTMLSelection::init): Set the flag to false by default.
672         (KHTMLSelection::operator=): Copy over the value of the new m_modifyBiasSet flag.
673         (KHTMLSelection::modify): Set the flag if extending the selection and set the 
674         base and extent nodes based on the movement direction requested.
675         * khtml/khtml_selection.h:
676         * kwq/WebCoreBridge.h: See below.
677         * kwq/WebCoreBridge.mm:
678         (-[WebCoreBridge rangeByAlteringCurrentSelection:direction:granularity:]): This
679         method is used by the WebKit side in response to requests to change the selection
680         using the arrow keys. It used to be called rangeByModifyingRange:alteration:direction:granularity:
681         but I changed it to this new format since I explicitly want to use the current selection, and
682         not some arbitrarily passed in selection. This helps to maintain the "modify bias" correctly.
683         (-[WebCoreBridge alterCurrentSelection:direction:granularity:]): New method. A command to alter
684         the current selection as given. Again, applying the command to the current selection, rather
685         than just setting the selection to a new one, helps to maintain the "modify bias" correctly.
686
687 2004-03-11  Chris Blumenberg  <cblu@apple.com>
688
689         Added stubs for the HTML DOM API.
690
691         Reviewed by rjw.
692
693         * WebCore.pbproj/project.pbxproj:
694         * kwq/HTMLDOM.h: Added.
695         * kwq/HTMLDOM.mm: Added.
696         (-[HTMLCollection length]):
697         (-[HTMLCollection item:]):
698         (-[HTMLCollection namedItem:]):
699         (-[HTMLElement idName]):
700         (-[HTMLElement setIdName:]):
701         (-[HTMLElement title]):
702         (-[HTMLElement setTitle:]):
703         (-[HTMLElement lang]):
704         (-[HTMLElement setLang:]):
705         (-[HTMLElement dir]):
706         (-[HTMLElement setDir:]):
707         (-[HTMLElement className]):
708         (-[HTMLElement setClassName:]):
709         (-[HTMLDocument title]):
710         (-[HTMLDocument setTitle:]):
711         (-[HTMLDocument referrer]):
712         (-[HTMLDocument domain]):
713         (-[HTMLDocument URL]):
714         (-[HTMLDocument body]):
715         (-[HTMLDocument images]):
716         (-[HTMLDocument applets]):
717         (-[HTMLDocument links]):
718         (-[HTMLDocument forms]):
719         (-[HTMLDocument anchors]):
720         (-[HTMLDocument setBody:]):
721         (-[HTMLDocument cookie]):
722         (-[HTMLDocument setCookie:]):
723         (-[HTMLDocument open]):
724         (-[HTMLDocument close]):
725         (-[HTMLDocument write:]):
726         (-[HTMLDocument writeln:]):
727         (-[HTMLDocument getElementById:]):
728         (-[HTMLDocument getElementsByName:]):
729         (-[HTMLHtmlElement version]):
730         (-[HTMLHtmlElement setVersion:]):
731         (-[HTMLHeadElement profile]):
732         (-[HTMLHeadElement setProfile:]):
733         (-[HTMLLinkElement disabled]):
734         (-[HTMLLinkElement setDisabled:]):
735         (-[HTMLLinkElement charset]):
736         (-[HTMLLinkElement setCharset:]):
737         (-[HTMLLinkElement href]):
738         (-[HTMLLinkElement setHref:]):
739         (-[HTMLLinkElement hreflang]):
740         (-[HTMLLinkElement setHreflang:]):
741         (-[HTMLLinkElement media]):
742         (-[HTMLLinkElement setMedia:]):
743         (-[HTMLLinkElement rel]):
744         (-[HTMLLinkElement setRrevel:]):
745         (-[HTMLLinkElement rev]):
746         (-[HTMLLinkElement setRev:]):
747         (-[HTMLLinkElement target]):
748         (-[HTMLLinkElement setTarget:]):
749         (-[HTMLLinkElement type]):
750         (-[HTMLLinkElement setType:]):
751         (-[HTMLTitleElement text]):
752         (-[HTMLTitleElement setText:]):
753         (-[HTMLMetaElement content]):
754         (-[HTMLMetaElement setContent:]):
755         (-[HTMLMetaElement httpEquiv]):
756         (-[HTMLMetaElement setHttpEquiv:]):
757         (-[HTMLMetaElement name]):
758         (-[HTMLMetaElement setName:]):
759         (-[HTMLMetaElement scheme]):
760         (-[HTMLMetaElement setScheme:]):
761         (-[HTMLBaseElement href]):
762         (-[HTMLBaseElement setHref:]):
763         (-[HTMLBaseElement target]):
764         (-[HTMLBaseElement setTarget:]):
765         (-[HTMLStyleElement disabled]):
766         (-[HTMLStyleElement setDisabled:]):
767         (-[HTMLStyleElement media]):
768         (-[HTMLStyleElement setMedia:]):
769         (-[HTMLStyleElement type]):
770         (-[HTMLStyleElement setType:]):
771         (-[HTMLBodyElement aLink]):
772         (-[HTMLBodyElement setALink:]):
773         (-[HTMLBodyElement background]):
774         (-[HTMLBodyElement setBackground:]):
775         (-[HTMLBodyElement bgColor]):
776         (-[HTMLBodyElement setBgColor:]):
777         (-[HTMLBodyElement link]):
778         (-[HTMLBodyElement setLink:]):
779         (-[HTMLBodyElement text]):
780         (-[HTMLBodyElement setText:]):
781         (-[HTMLBodyElement vLink]):
782         (-[HTMLBodyElement setVLink:]):
783         (-[HTMLFormElement elements]):
784         (-[HTMLFormElement length]):
785         (-[HTMLFormElement name]):
786         (-[HTMLFormElement setName:]):
787         (-[HTMLFormElement acceptCharset]):
788         (-[HTMLFormElement setAcceptCharset:]):
789         (-[HTMLFormElement action]):
790         (-[HTMLFormElement setAction:]):
791         (-[HTMLFormElement enctype]):
792         (-[HTMLFormElement setEnctype:]):
793         (-[HTMLFormElement method]):
794         (-[HTMLFormElement setMethod:]):
795         (-[HTMLFormElement target]):
796         (-[HTMLFormElement setTarget:]):
797         (-[HTMLFormElement submit]):
798         (-[HTMLFormElement reset]):
799         (-[HTMLIsIndexElement form]):
800         (-[HTMLIsIndexElement prompt]):
801         (-[HTMLIsIndexElement setPrompt:]):
802         (-[HTMLSelectElement type]):
803         (-[HTMLSelectElement selectedIndex]):
804         (-[HTMLSelectElement setSelectedIndex:]):
805         (-[HTMLSelectElement value]):
806         (-[HTMLSelectElement setValue:]):
807         (-[HTMLSelectElement length]):
808         (-[HTMLSelectElement form]):
809         (-[HTMLSelectElement options]):
810         (-[HTMLSelectElement disabled]):
811         (-[HTMLSelectElement multiple]):
812         (-[HTMLSelectElement name]):
813         (-[HTMLSelectElement setName:]):
814         (-[HTMLSelectElement size]):
815         (-[HTMLSelectElement tabIndex]):
816         (-[HTMLSelectElement add::]):
817         (-[HTMLSelectElement remove:]):
818         (-[HTMLSelectElement blur]):
819         (-[HTMLSelectElement focus]):
820         (-[HTMLOptGroupElement disabled]):
821         (-[HTMLOptGroupElement setDisabled:]):
822         (-[HTMLOptGroupElement label]):
823         (-[HTMLOptGroupElement setLabel:]):
824         (-[HTMLOptionElement form]):
825         (-[HTMLOptionElement defaultSelected]):
826         (-[HTMLOptionElement setDefaultSelected:]):
827         (-[HTMLOptionElement text]):
828         (-[HTMLOptionElement index]):
829         (-[HTMLOptionElement setIndex:]):
830         (-[HTMLOptionElement disabled]):
831         (-[HTMLOptionElement setDisabled:]):
832         (-[HTMLOptionElement label]):
833         (-[HTMLOptionElement setLabel:]):
834         (-[HTMLOptionElement selected]):
835         (-[HTMLOptionElement value]):
836         (-[HTMLOptionElement setValue:]):
837         (-[HTMLInputElement defaultValue]):
838         (-[HTMLInputElement setDefaultValue:]):
839         (-[HTMLInputElement defaultChecked]):
840         (-[HTMLInputElement setDefaultChecked:]):
841         (-[HTMLInputElement form]):
842         (-[HTMLInputElement accept]):
843         (-[HTMLInputElement setAccept:]):
844         (-[HTMLInputElement accessKey]):
845         (-[HTMLInputElement setAccessKey:]):
846         (-[HTMLInputElement align]):
847         (-[HTMLInputElement setAlign:]):
848         (-[HTMLInputElement alt]):
849         (-[HTMLInputElement setAlt:]):
850         (-[HTMLInputElement checked]):
851         (-[HTMLInputElement setChecked:]):
852         (-[HTMLInputElement disabled]):
853         (-[HTMLInputElement setDisabled:]):
854         (-[HTMLInputElement maxLength]):
855         (-[HTMLInputElement setMaxLength:]):
856         (-[HTMLInputElement name]):
857         (-[HTMLInputElement setName:]):
858         (-[HTMLInputElement readOnly]):
859         (-[HTMLInputElement setReadOnly:]):
860         (-[HTMLInputElement size]):
861         (-[HTMLInputElement setSize:]):
862         (-[HTMLInputElement src]):
863         (-[HTMLInputElement setSrc:]):
864         (-[HTMLInputElement tabIndex]):
865         (-[HTMLInputElement setTabIndex:]):
866         (-[HTMLInputElement type]):
867         (-[HTMLInputElement useMap]):
868         (-[HTMLInputElement setUseMap:]):
869         (-[HTMLInputElement value]):
870         (-[HTMLInputElement setValue:]):
871         (-[HTMLInputElement blur]):
872         (-[HTMLInputElement focus]):
873         (-[HTMLInputElement select]):
874         (-[HTMLInputElement click]):
875         (-[HTMLTextAreaElement defaultValue]):
876         (-[HTMLTextAreaElement setDefaultValue:]):
877         (-[HTMLTextAreaElement form]):
878         (-[HTMLTextAreaElement accessKey]):
879         (-[HTMLTextAreaElement setAccessKey:]):
880         (-[HTMLTextAreaElement cols]):
881         (-[HTMLTextAreaElement setCols:]):
882         (-[HTMLTextAreaElement disabled]):
883         (-[HTMLTextAreaElement setDisabled:]):
884         (-[HTMLTextAreaElement name]):
885         (-[HTMLTextAreaElement setName:]):
886         (-[HTMLTextAreaElement readOnly]):
887         (-[HTMLTextAreaElement setReadOnly:]):
888         (-[HTMLTextAreaElement rows]):
889         (-[HTMLTextAreaElement setRows:]):
890         (-[HTMLTextAreaElement tabIndex]):
891         (-[HTMLTextAreaElement setTabIndex:]):
892         (-[HTMLTextAreaElement type]):
893         (-[HTMLTextAreaElement value]):
894         (-[HTMLTextAreaElement setValue:]):
895         (-[HTMLTextAreaElement blur]):
896         (-[HTMLTextAreaElement focus]):
897         (-[HTMLTextAreaElement select]):
898         (-[HTMLButtonElement form]):
899         (-[HTMLButtonElement accessKey]):
900         (-[HTMLButtonElement setAccessKey:]):
901         (-[HTMLButtonElement disabled]):
902         (-[HTMLButtonElement setDisabled:]):
903         (-[HTMLButtonElement name]):
904         (-[HTMLButtonElement setName:]):
905         (-[HTMLButtonElement tabIndex]):
906         (-[HTMLButtonElement setTabIndex:]):
907         (-[HTMLButtonElement type]):
908         (-[HTMLButtonElement value]):
909         (-[HTMLButtonElement setValue:]):
910         (-[HTMLLabelElement form]):
911         (-[HTMLLabelElement accessKey]):
912         (-[HTMLLabelElement setAccessKey:]):
913         (-[HTMLLabelElement htmlFor]):
914         (-[HTMLLabelElement setHtmlFor:]):
915         (-[HTMLFieldSetElement form]):
916         (-[HTMLLegendElement form]):
917         (-[HTMLLegendElement accessKey]):
918         (-[HTMLLegendElement setAccessKey:]):
919         (-[HTMLLegendElement align]):
920         (-[HTMLLegendElement setAlign:]):
921         (-[HTMLUListElement compact]):
922         (-[HTMLUListElement setCompact:]):
923         (-[HTMLUListElement type]):
924         (-[HTMLUListElement setType:]):
925         (-[HTMLOListElement compact]):
926         (-[HTMLOListElement setCompact:]):
927         (-[HTMLOListElement start]):
928         (-[HTMLOListElement setStart:]):
929         (-[HTMLOListElement type]):
930         (-[HTMLOListElement setType:]):
931         (-[HTMLDListElement compact]):
932         (-[HTMLDListElement setCompact:]):
933         (-[HTMLDirectoryElement compact]):
934         (-[HTMLDirectoryElement setCompact:]):
935         (-[HTMLMenuElement compact]):
936         (-[HTMLMenuElement setCompact:]):
937         (-[HTMLLIElement type]):
938         (-[HTMLLIElement setType:]):
939         (-[HTMLLIElement value]):
940         (-[HTMLLIElement setValue:]):
941         (-[HTMLBlockquoteElement cite]):
942         (-[HTMLBlockquoteElement setCite:]):
943         (-[HTMLDivElement align]):
944         (-[HTMLDivElement setAlign:]):
945         (-[HTMLParagraphElement align]):
946         (-[HTMLParagraphElement setAlign:]):
947         (-[HTMLHeadingElement align]):
948         (-[HTMLHeadingElement setAlign:]):
949         (-[HTMLQuoteElement cite]):
950         (-[HTMLQuoteElement setCite:]):
951         (-[HTMLPreElement width]):
952         (-[HTMLPreElement setWidth:]):
953         (-[HTMLBRElement clear]):
954         (-[HTMLBRElement setClear:]):
955         (-[HTMLBaseFontElement color]):
956         (-[HTMLBaseFontElement setColor:]):
957         (-[HTMLBaseFontElement face]):
958         (-[HTMLBaseFontElement setFace:]):
959         (-[HTMLBaseFontElement size]):
960         (-[HTMLBaseFontElement setSize:]):
961         (-[HTMLFontElement color]):
962         (-[HTMLFontElement setColor:]):
963         (-[HTMLFontElement face]):
964         (-[HTMLFontElement setFace:]):
965         (-[HTMLFontElement size]):
966         (-[HTMLFontElement setSize:]):
967         (-[HTMLHRElement align]):
968         (-[HTMLHRElement setAlign:]):
969         (-[HTMLHRElement noShade]):
970         (-[HTMLHRElement setNoShade:]):
971         (-[HTMLHRElement size]):
972         (-[HTMLHRElement setSize:]):
973         (-[HTMLHRElement width]):
974         (-[HTMLHRElement setWidth:]):
975         (-[HTMLModElement cite]):
976         (-[HTMLModElement setCite:]):
977         (-[HTMLModElement dateTime]):
978         (-[HTMLModElement setDateTime:]):
979         (-[HTMLAnchorElement accessKey]):
980         (-[HTMLAnchorElement setAccessKey:]):
981         (-[HTMLAnchorElement charset]):
982         (-[HTMLAnchorElement setCharset:]):
983         (-[HTMLAnchorElement coords]):
984         (-[HTMLAnchorElement setCoords:]):
985         (-[HTMLAnchorElement href]):
986         (-[HTMLAnchorElement setHref:]):
987         (-[HTMLAnchorElement hreflang]):
988         (-[HTMLAnchorElement setHreflang:]):
989         (-[HTMLAnchorElement name]):
990         (-[HTMLAnchorElement setName:]):
991         (-[HTMLAnchorElement rel]):
992         (-[HTMLAnchorElement setRel:]):
993         (-[HTMLAnchorElement rev]):
994         (-[HTMLAnchorElement setRev:]):
995         (-[HTMLAnchorElement shape]):
996         (-[HTMLAnchorElement setShape:]):
997         (-[HTMLAnchorElement tabIndex]):
998         (-[HTMLAnchorElement setTabIndex:]):
999         (-[HTMLAnchorElement target]):
1000         (-[HTMLAnchorElement setTarget:]):
1001         (-[HTMLAnchorElement type]):
1002         (-[HTMLAnchorElement setType:]):
1003         (-[HTMLAnchorElement blur]):
1004         (-[HTMLAnchorElement focus]):
1005         (-[HTMLImageElement lowSrc]):
1006         (-[HTMLImageElement setLowSrc:]):
1007         (-[HTMLImageElement name]):
1008         (-[HTMLImageElement setName:]):
1009         (-[HTMLImageElement align]):
1010         (-[HTMLImageElement setAlign:]):
1011         (-[HTMLImageElement alt]):
1012         (-[HTMLImageElement setAlt:]):
1013         (-[HTMLImageElement border]):
1014         (-[HTMLImageElement setBorder:]):
1015         (-[HTMLImageElement height]):
1016         (-[HTMLImageElement setHeight:]):
1017         (-[HTMLImageElement hspace]):
1018         (-[HTMLImageElement setHspace:]):
1019         (-[HTMLImageElement isMap]):
1020         (-[HTMLImageElement setIsMap:]):
1021         (-[HTMLImageElement longDesc]):
1022         (-[HTMLImageElement setLongDesc:]):
1023         (-[HTMLImageElement src]):
1024         (-[HTMLImageElement setSrc:]):
1025         (-[HTMLImageElement useMap]):
1026         (-[HTMLImageElement setUseMap:]):
1027         (-[HTMLImageElement vspace]):
1028         (-[HTMLImageElement setVspace:]):
1029         (-[HTMLImageElement width]):
1030         (-[HTMLImageElement setWidth:]):
1031         (-[HTMLObjectElement form]):
1032         (-[HTMLObjectElement code]):
1033         (-[HTMLObjectElement setCode:]):
1034         (-[HTMLObjectElement align]):
1035         (-[HTMLObjectElement setAlign:]):
1036         (-[HTMLObjectElement archive]):
1037         (-[HTMLObjectElement setArchive:]):
1038         (-[HTMLObjectElement border]):
1039         (-[HTMLObjectElement setBorder:]):
1040         (-[HTMLObjectElement codeBase]):
1041         (-[HTMLObjectElement setCodeBase:]):
1042         (-[HTMLObjectElement codeType]):
1043         (-[HTMLObjectElement setCodeType:]):
1044         (-[HTMLObjectElement data]):
1045         (-[HTMLObjectElement setData:]):
1046         (-[HTMLObjectElement declare]):
1047         (-[HTMLObjectElement setDeclare:]):
1048         (-[HTMLObjectElement height]):
1049         (-[HTMLObjectElement setHeight:]):
1050         (-[HTMLObjectElement hspace]):
1051         (-[HTMLObjectElement setHspace:]):
1052         (-[HTMLObjectElement name]):
1053         (-[HTMLObjectElement setName:]):
1054         (-[HTMLObjectElement standby]):
1055         (-[HTMLObjectElement setStandby:]):
1056         (-[HTMLObjectElement tabIndex]):
1057         (-[HTMLObjectElement setTabIndex:]):
1058         (-[HTMLObjectElement type]):
1059         (-[HTMLObjectElement setType:]):
1060         (-[HTMLObjectElement useMap]):
1061         (-[HTMLObjectElement setUseMap:]):
1062         (-[HTMLObjectElement vspace]):
1063         (-[HTMLObjectElement setVspace:]):
1064         (-[HTMLObjectElement width]):
1065         (-[HTMLObjectElement setWidth:]):
1066         (-[HTMLParamElement name]):
1067         (-[HTMLParamElement setName:]):
1068         (-[HTMLParamElement type]):
1069         (-[HTMLParamElement setType:]):
1070         (-[HTMLParamElement value]):
1071         (-[HTMLParamElement setValue:]):
1072         (-[HTMLParamElement valueType]):
1073         (-[HTMLParamElement setValueType:]):
1074         (-[HTMLAppletElement align]):
1075         (-[HTMLAppletElement setAlign:]):
1076         (-[HTMLAppletElement alt]):
1077         (-[HTMLAppletElement setAlt:]):
1078         (-[HTMLAppletElement archive]):
1079         (-[HTMLAppletElement setArchive:]):
1080         (-[HTMLAppletElement code]):
1081         (-[HTMLAppletElement setCode:]):
1082         (-[HTMLAppletElement codeBase]):
1083         (-[HTMLAppletElement setCodeBase:]):
1084         (-[HTMLAppletElement codeType]):
1085         (-[HTMLAppletElement setCodeType:]):
1086         (-[HTMLAppletElement height]):
1087         (-[HTMLAppletElement setHeight:]):
1088         (-[HTMLAppletElement hspace]):
1089         (-[HTMLAppletElement setHspace:]):
1090         (-[HTMLAppletElement name]):
1091         (-[HTMLAppletElement setName:]):
1092         (-[HTMLAppletElement object]):
1093         (-[HTMLAppletElement setObject:]):
1094         (-[HTMLAppletElement vspace]):
1095         (-[HTMLAppletElement setVspace:]):
1096         (-[HTMLAppletElement width]):
1097         (-[HTMLAppletElement setWidth:]):
1098         (-[HTMLMapElement areas]):
1099         (-[HTMLMapElement name]):
1100         (-[HTMLMapElement setName:]):
1101         (-[HTMLAreaElement accessKey]):
1102         (-[HTMLAreaElement setAccessKey:]):
1103         (-[HTMLAreaElement alt]):
1104         (-[HTMLAreaElement setAlt:]):
1105         (-[HTMLAreaElement coords]):
1106         (-[HTMLAreaElement setCoords:]):
1107         (-[HTMLAreaElement href]):
1108         (-[HTMLAreaElement setHref:]):
1109         (-[HTMLAreaElement noHref]):
1110         (-[HTMLAreaElement setNoHref:]):
1111         (-[HTMLAreaElement shape]):
1112         (-[HTMLAreaElement setShape:]):
1113         (-[HTMLAreaElement tabIndex]):
1114         (-[HTMLAreaElement setTabIndex:]):
1115         (-[HTMLAreaElement target]):
1116         (-[HTMLAreaElement setTarget:]):
1117         (-[HTMLScriptElement text]):
1118         (-[HTMLScriptElement setText:]):
1119         (-[HTMLScriptElement htmlFor]):
1120         (-[HTMLScriptElement setHtmlFor:]):
1121         (-[HTMLScriptElement event]):
1122         (-[HTMLScriptElement setEvent:]):
1123         (-[HTMLScriptElement charset]):
1124         (-[HTMLScriptElement setCharset:]):
1125         (-[HTMLScriptElement defer]):
1126         (-[HTMLScriptElement setDefer:]):
1127         (-[HTMLScriptElement src]):
1128         (-[HTMLScriptElement setSrc:]):
1129         (-[HTMLScriptElement type]):
1130         (-[HTMLScriptElement setType:]):
1131         (-[HTMLTableCaptionElement align]):
1132         (-[HTMLTableCaptionElement setAlign:]):
1133         (-[HTMLTableSectionElement align]):
1134         (-[HTMLTableSectionElement setAlign:]):
1135         (-[HTMLTableSectionElement ch]):
1136         (-[HTMLTableSectionElement setCh:]):
1137         (-[HTMLTableSectionElement chOff]):
1138         (-[HTMLTableSectionElement setChOff:]):
1139         (-[HTMLTableSectionElement vAlign]):
1140         (-[HTMLTableSectionElement setVAlign:]):
1141         (-[HTMLTableSectionElement rows]):
1142         (-[HTMLTableSectionElement insertRow:]):
1143         (-[HTMLTableSectionElement deleteRow:]):
1144         (-[HTMLTableElement caption]):
1145         (-[HTMLTableElement tHead]):
1146         (-[HTMLTableElement tFoot]):
1147         (-[HTMLTableElement rows]):
1148         (-[HTMLTableElement tBodies]):
1149         (-[HTMLTableElement align]):
1150         (-[HTMLTableElement setAlign:]):
1151         (-[HTMLTableElement bgColor]):
1152         (-[HTMLTableElement setBgColor:]):
1153         (-[HTMLTableElement border]):
1154         (-[HTMLTableElement setBorder:]):
1155         (-[HTMLTableElement cellPadding]):
1156         (-[HTMLTableElement setCellPadding:]):
1157         (-[HTMLTableElement cellSpacing]):
1158         (-[HTMLTableElement setCellSpacing:]):
1159         (-[HTMLTableElement frame]):
1160         (-[HTMLTableElement setFrame:]):
1161         (-[HTMLTableElement rules]):
1162         (-[HTMLTableElement setRules:]):
1163         (-[HTMLTableElement summary]):
1164         (-[HTMLTableElement setSummary:]):
1165         (-[HTMLTableElement width]):
1166         (-[HTMLTableElement setWidth:]):
1167         (-[HTMLTableElement createTHead]):
1168         (-[HTMLTableElement deleteTHead]):
1169         (-[HTMLTableElement createTFoot]):
1170         (-[HTMLTableElement deleteTFoot]):
1171         (-[HTMLTableElement createCaption]):
1172         (-[HTMLTableElement deleteCaption]):
1173         (-[HTMLTableElement deleteRow:]):
1174         (-[HTMLTableColElement align]):
1175         (-[HTMLTableColElement setAlign:]):
1176         (-[HTMLTableColElement ch]):
1177         (-[HTMLTableColElement setCh:]):
1178         (-[HTMLTableColElement chOff]):
1179         (-[HTMLTableColElement setChOff:]):
1180         (-[HTMLTableColElement span]):
1181         (-[HTMLTableColElement setSpan:]):
1182         (-[HTMLTableColElement vAlign]):
1183         (-[HTMLTableColElement setVAlign:]):
1184         (-[HTMLTableColElement width]):
1185         (-[HTMLTableColElement setWidth:]):
1186         (-[HTMLTableRowElement rowIndex]):
1187         (-[HTMLTableRowElement setRowIndex:]):
1188         (-[HTMLTableRowElement sectionRowIndex]):
1189         (-[HTMLTableRowElement setSectionRowIndex:]):
1190         (-[HTMLTableRowElement cells]):
1191         (-[HTMLTableRowElement setCells:]):
1192         (-[HTMLTableRowElement align]):
1193         (-[HTMLTableRowElement setAlign:]):
1194         (-[HTMLTableRowElement bgColor]):
1195         (-[HTMLTableRowElement setBgColor:]):
1196         (-[HTMLTableRowElement ch]):
1197         (-[HTMLTableRowElement setCh:]):
1198         (-[HTMLTableRowElement chOff]):
1199         (-[HTMLTableRowElement setChOff:]):
1200         (-[HTMLTableRowElement vAlign]):
1201         (-[HTMLTableRowElement setVAlign:]):
1202         (-[HTMLTableRowElement insertCell:]):
1203         (-[HTMLTableRowElement deleteCell:]):
1204         (-[HTMLTableCellElement cellIndex]):
1205         (-[HTMLTableCellElement setCellIndex:]):
1206         (-[HTMLTableCellElement abbr]):
1207         (-[HTMLTableCellElement setAbbr:]):
1208         (-[HTMLTableCellElement align]):
1209         (-[HTMLTableCellElement setAlign:]):
1210         (-[HTMLTableCellElement axis]):
1211         (-[HTMLTableCellElement setAxis:]):
1212         (-[HTMLTableCellElement bgColor]):
1213         (-[HTMLTableCellElement setBgColor:]):
1214         (-[HTMLTableCellElement ch]):
1215         (-[HTMLTableCellElement setCh:]):
1216         (-[HTMLTableCellElement chOff]):
1217         (-[HTMLTableCellElement setChOff:]):
1218         (-[HTMLTableCellElement colSpan]):
1219         (-[HTMLTableCellElement setColSpan:]):
1220         (-[HTMLTableCellElement headers]):
1221         (-[HTMLTableCellElement setHeaders:]):
1222         (-[HTMLTableCellElement height]):
1223         (-[HTMLTableCellElement setHeight:]):
1224         (-[HTMLTableCellElement noWrap]):
1225         (-[HTMLTableCellElement setNoWrap:]):
1226         (-[HTMLTableCellElement rowSpan]):
1227         (-[HTMLTableCellElement setRowSpan:]):
1228         (-[HTMLTableCellElement scope]):
1229         (-[HTMLTableCellElement setScope:]):
1230         (-[HTMLTableCellElement vAlign]):
1231         (-[HTMLTableCellElement setVAlign:]):
1232         (-[HTMLTableCellElement width]):
1233         (-[HTMLTableCellElement setWidth:]):
1234         (-[HTMLFrameSetElement cols]):
1235         (-[HTMLFrameSetElement setCols:]):
1236         (-[HTMLFrameSetElement rows]):
1237         (-[HTMLFrameSetElement setRows:]):
1238         (-[HTMLFrameElement frameBorder]):
1239         (-[HTMLFrameElement setFrameBorder:]):
1240         (-[HTMLFrameElement longDesc]):
1241         (-[HTMLFrameElement setLongDesc:]):
1242         (-[HTMLFrameElement marginHeight]):
1243         (-[HTMLFrameElement setMarginHeight:]):
1244         (-[HTMLFrameElement marginWidth]):
1245         (-[HTMLFrameElement setMarginWidth:]):
1246         (-[HTMLFrameElement name]):
1247         (-[HTMLFrameElement setName:]):
1248         (-[HTMLFrameElement noResize]):
1249         (-[HTMLFrameElement setNoResize:]):
1250         (-[HTMLFrameElement scrolling]):
1251         (-[HTMLFrameElement setScrolling:]):
1252         (-[HTMLFrameElement src]):
1253         (-[HTMLFrameElement setSrc:]):
1254         (-[HTMLIFrameElement align]):
1255         (-[HTMLIFrameElement setAlign:]):
1256         (-[HTMLIFrameElement frameBorder]):
1257         (-[HTMLIFrameElement setFrameBorder:]):
1258         (-[HTMLIFrameElement height]):
1259         (-[HTMLIFrameElement setHeight:]):
1260         (-[HTMLIFrameElement longDesc]):
1261         (-[HTMLIFrameElement setLongDesc:]):
1262         (-[HTMLIFrameElement marginHeight]):
1263         (-[HTMLIFrameElement setMarginHeight:]):
1264         (-[HTMLIFrameElement marginWidth]):
1265         (-[HTMLIFrameElement setMarginWidth:]):
1266         (-[HTMLIFrameElement name]):
1267         (-[HTMLIFrameElement setName:]):
1268         (-[HTMLIFrameElement scrolling]):
1269         (-[HTMLIFrameElement setScrolling:]):
1270         (-[HTMLIFrameElement src]):
1271         (-[HTMLIFrameElement setSrc:]):
1272         (-[HTMLIFrameElement width]):
1273         (-[HTMLIFrameElement setWidth:]):
1274
1275 2004-03-11  Ken Kocienda  <kocienda@apple.com>
1276
1277         Reviewed by Dave
1278
1279         I have clarified the concept (at least in my head) 
1280         that each edit command has an obligation to put the
1281         selection in the right place after it is applied, 
1282         unapplied, or reapplied. Right now, each edit command 
1283         calls setStartingSelection and setEndingSelection to do
1284         this, I made these function move the selection on 
1285         setting.
1286
1287         * khtml/editing/htmlediting_impl.cpp:
1288         (EditCommandImpl::setStartingSelection)
1289         (EditCommandImpl::setEndingSelection)
1290         (InputTextCommandImpl::coalesce)
1291         (InputTextCommandImpl::deleteCharacter)
1292         (InputTextCommandImpl::execute)
1293         * khtml/editing/htmlediting_impl.h:
1294
1295 2004-03-11  Ken Kocienda  <kocienda@apple.com>
1296
1297         Reviewed by Dave
1298     
1299         Various changes to move us forward on editing.
1300         
1301         1. I reorganized the concrete EditCommand interface and
1302         implementation classes alphabetically in their 
1303         respective files, to make it easier to find things.
1304         
1305         2. I added a TypingCommand composite class to gang 
1306         up all keystrokes and make it possible to pass a 
1307         single command over to the Cocoa undo system in all cases.
1308         
1309         3. I now send all keystrokes back over to WebKit
1310         to be interpreted by the text input system. In concert
1311         with the many new NSResponder method implementations I
1312         added to WebView, we now respond to keystrokes in a much
1313         more Cocoa-like way that sets us down the path to
1314         integrating with the Cocoa text input system some day.
1315
1316         4. I fixed up our integration with the Cocoa undo
1317         system. I also removed much of the undo support code
1318         from the KHTMPart class. As a replacement, I implemented
1319         reporting of undoable commands to KHTMLPart so that 
1320         a KDE hookup is quite feasible. As a result, undo 
1321         should "just work" in Blot (Chris has reported that 
1322         it has been busted).
1323
1324         5. I added the DOM CSS bindings for Objective-C. This
1325         required some rearranging of the existing DOM bindings
1326         code, and while I was there, I did various cleanups in the
1327         existing DOM bindings.
1328
1329         * About 400 lines of changed files and functions elided.
1330         
1331 2004-03-11  Chris Blumenberg  <cblu@apple.com>
1332
1333         Fixed some spacing issues in reconstructed source and web archives that were caused by a malformed doc type string that we were constructing.
1334
1335         Reviewed by darin.
1336
1337         * khtml/html/html_documentimpl.cpp:
1338         (HTMLDocumentImpl::determineParseMode): set the public ID and system ID on the doc type
1339         * khtml/xml/dom_docimpl.cpp:
1340         (DocumentTypeImpl::toString): put a space between DOCTYPE and the name
1341         * khtml/xml/dom_docimpl.h:
1342         (DOM::DocumentTypeImpl::setPublicId): new
1343         (DOM::DocumentTypeImpl::setSystemId): new
1344
1345 2004-03-10  David Hyatt  <hyatt@apple.com>
1346
1347         Fix for 3584646, AxWebArea should encompass all children (its AxSize should).
1348         
1349         Reviewed by mjs
1350
1351         * khtml/rendering/render_canvas.cpp:
1352         (RenderCanvas::absoluteRects):
1353         * khtml/rendering/render_canvas.h:
1354
1355 2004-03-10  Chris Blumenberg  <cblu@apple.com>
1356
1357         Fixed: INPUT images are not part of web archives.
1358
1359         Reviewed by rjw.
1360
1361         * khtml/html/html_formimpl.cpp:
1362         (HTMLInputElementImpl::isSubresourceURLAttribute):
1363         * khtml/html/html_formimpl.h:
1364
1365 2004-03-09  Chris Blumenberg  <cblu@apple.com>
1366
1367         Implemented WebCore side of: <rdar://problem/3577508>: API: web archive related API's
1368
1369         Reviewed by rjw.
1370
1371         * WebCore-combined.exp:
1372         * WebCore.exp:
1373         * kwq/DOM.mm:
1374         (+[DOMRange _rangeWithImpl:]): made internally accessible
1375         (-[DOMRange _rangeImpl]): ditto
1376         * kwq/DOMInternal.h:
1377         * kwq/KWQStringList.h:
1378         * kwq/KWQStringList.mm:
1379         (QStringList::getNSArray): new
1380         * kwq/WebCoreBridge.h:
1381         * kwq/WebCoreBridge.mm:
1382         (-[WebCoreBridge pasteMarkupString:]): renamed from pasteHTMLString since XML pasting may be possible
1383         (-[WebCoreBridge selectedRange]): new
1384         (-[WebCoreBridge _documentTypeString]): new
1385         (-[WebCoreBridge _stringWithDocumentTypeStringAndMarkupString:]): new
1386         (-[WebCoreBridge markupStringFromNode:subresourceURLStrings:]): new, needed for WebKit API's
1387         (-[WebCoreBridge markupStringFromRange:subresourceURLStrings:]): new, needed for WebKit API's
1388
1389 2004-03-09  David Hyatt  <hyatt@apple.com>
1390
1391         Make the AXLinkUIElements attribute always return an array (never return nil).
1392         
1393         * kwq/KWQAccObject.mm:
1394         (-[KWQAccObject accessibilityAttributeValue:]):
1395
1396 2004-03-09  David Hyatt  <hyatt@apple.com>
1397
1398         (1) Change root element in a document to have a role of AXWebArea.
1399         (2) Add support for AXURL to links and children of links.
1400         (3) Add support for AXLinkUIElements to the AXWebArea
1401         
1402         Reviewed by john
1403
1404         * khtml/dom/html_misc.h:
1405         * kwq/KWQAccObject.mm:
1406         (-[KWQAccObject role]):
1407         (-[KWQAccObject roleDescription]):
1408         (-[KWQAccObject accessibilityAttributeNames]):
1409         (-[KWQAccObject accessibilityAttributeValue:]):
1410
1411 2004-03-09  John Sullivan  <sullivan@apple.com>
1412
1413         Reviewed by nobody.
1414
1415         * kwq/KWQKURL.mm:
1416         (KURL::KURL):
1417         Fixed broken build by removing wayward "break" statement.
1418
1419 2004-03-08  Darin Adler  <darin@apple.com>
1420
1421         Reviewed by Maciej.
1422
1423         - fixed <rdar://problem/3554876>: REGRESSION (100-125): cannot upload file if path contains non-ASCII characters
1424
1425         * kwq/KWQKURL.mm: Remove Colon constant so we can fit in 8 bits again.
1426         (KURL::KURL): Rewrite so we don't need isSchemeCharOrColon.
1427
1428 === Safari-131 ===
1429
1430 2004-03-08  Ken Kocienda  <kocienda@apple.com>
1431
1432         Reviewed by Darin
1433
1434         * WebCore.pbproj/project.pbxproj: Added CFBundleName to Info.plist.
1435
1436 2004-03-05  David Hyatt  <hyatt@apple.com>
1437
1438         Fix for first-line inheritance problem caused by incorrectly inheriting first-line into floating
1439         blocks.
1440         
1441         Reviewed by kocienda
1442
1443         * khtml/rendering/render_block.cpp:
1444         (khtml::RenderBlock::firstLineBlock):
1445
1446 2004-03-05  Ken Kocienda  <kocienda@apple.com>
1447
1448         Reviewed by me.
1449
1450         Forgot to add this when I checked in last time.
1451
1452         * ForwardingHeaders/css/css_computedstyle.h: Added.
1453
1454 2004-03-05  Ken Kocienda  <kocienda@apple.com>
1455
1456         Reviewed by Dave.
1457
1458         Added initial support for retrieving the computed 
1459         style of document elements.
1460
1461         * WebCore.pbproj/project.pbxproj:
1462         * khtml/css/css_computedstyle.cpp: Added.
1463         (DOM::valueForLength): Helper to turn a khtml::Length into a computed value string.
1464         (DOM::stringForBorderStyle): Helper to turn an EBorderStyle into a computed value string.
1465         (DOM::stringForTextAlign): Helper to turn an ETextAlign into a computed value string.
1466         (DOM::CSSComputedStyleDeclarationImpl::CSSComputedStyleDeclarationImpl): New function.
1467         (DOM::CSSComputedStyleDeclarationImpl::~CSSComputedStyleDeclarationImpl): Ditto.
1468         (DOM::CSSComputedStyleDeclarationImpl::cssText): Ditto.
1469         (DOM::CSSComputedStyleDeclarationImpl::setCssText): Ditto.
1470         (DOM::CSSComputedStyleDeclarationImpl::getPropertyCSSValue): Ditto.
1471         (DOM::CSSComputedStyleDeclarationImpl::getPropertyValue): Ditto.
1472         (DOM::CSSComputedStyleDeclarationImpl::getPropertyPriority): Ditto.
1473         (DOM::CSSComputedStyleDeclarationImpl::removeProperty): Ditto.
1474         (DOM::CSSComputedStyleDeclarationImpl::setProperty): Ditto.
1475         (DOM::CSSComputedStyleDeclarationImpl::setLengthProperty): Ditto.
1476         (DOM::CSSComputedStyleDeclarationImpl::item): Ditto.
1477         (DOM::CSSComputedStyleDeclarationImpl::property): Ditto.
1478         * khtml/css/css_computedstyle.h: Added.
1479         * khtml/css/css_valueimpl.cpp:
1480         (CSSPrimitiveValueImpl::cssText): Fixed some formatting of Rect. Added
1481         suppoprt for rgba colors.
1482         * khtml/css/css_valueimpl.h:
1483         (DOM::CSSStyleDeclarationImpl::node):
1484         * khtml/ecma/kjs_css.cpp:
1485         (KJS::getDOMCSSStyleDeclaration):
1486         * khtml/ecma/kjs_dom.cpp:
1487         (DOMDocument::getValueProperty): defaultView is a property, used to be a function, 
1488         which was wrong. Fixed.
1489         (DOMDocumentProtoFunc::tryCall): Ditto.
1490         * khtml/ecma/kjs_dom.lut.h:
1491         (KJS::): Regenerated file.
1492         * khtml/misc/khtmllayout.h:
1493         (khtml::Length::length): Added an accessor to the value, to promote better coding
1494         style, rather than peeking and poking the value directly.
1495         * khtml/rendering/render_style.h:
1496         (khtml::RenderStyle::borderLeftWidth): BHIDDEN also should be treated like BNONE when it comes
1497         to returning a zero value. Now it is.
1498         (khtml::RenderStyle::borderRightWidth): Ditto.
1499         (khtml::RenderStyle::borderTopWidth): Ditto.
1500         (khtml::RenderStyle::borderBottomWidth): Ditto.
1501         (khtml::RenderStyle::outlineWidth): Ditto.
1502         (khtml::RenderStyle::outlineOffset): Ditto.
1503         * khtml/xml/dom2_viewsimpl.cpp:
1504         (AbstractViewImpl::getComputedStyle): Added an implementation for this formerly stubbed out function.
1505
1506 2004-03-05  Ken Kocienda  <kocienda@apple.com>
1507
1508         Change by Darin. Reviewed by me.
1509
1510         * kwq/DOM.mm: Fixed the following functions to deal with
1511         casting objects derived from NodeImpl back and forth to
1512         NodeImpl given that the derived classes use multiple
1513         inheritance.
1514         (-[DOMDocument _documentImpl]):
1515         (-[DOMCharacterData _characterDataImpl]):
1516         (-[DOMAttr _attrImpl]):
1517         (-[DOMElement _elementImpl]):
1518         (-[DOMText _textImpl]):
1519         (-[DOMDocumentType _documentTypeImpl]):
1520         (-[DOMNotation _notationImpl]):
1521         (-[DOMEntity _entityImpl]):
1522         (-[DOMProcessingInstruction _processingInstructionImpl]):
1523
1524 2004-03-03  Darin Adler  <darin@apple.com>
1525
1526         Reviewed by Vicki.
1527
1528         * English.lproj/InfoPlist.strings: Removed. No need to localize the version and
1529         copyright string, and that's all that was in here.
1530         * WebCore.pbproj/project.pbxproj: Removed InfoPlist.strings from build.
1531
1532 2004-03-03  David Hyatt  <hyatt@apple.com>
1533
1534         Speed up access to the children arrays of accessibility objects by caching mutable arrays of children
1535         and nulling them out only when the children change.
1536         
1537         Reviewed by john
1538
1539         * khtml/rendering/render_container.cpp:
1540         (RenderContainer::removeChildNode):
1541         (RenderContainer::appendChildNode):
1542         (RenderContainer::insertChildNode):
1543         * kwq/KWQAccObject.h:
1544         * kwq/KWQAccObject.mm:
1545         (-[KWQAccObject detach]):
1546         (-[KWQAccObject accessibilityAttributeValue:]):
1547         (-[KWQAccObject childrenChanged]):
1548         (-[KWQAccObject clearChildren]):
1549         * kwq/KWQAccObjectCache.h:
1550         * kwq/KWQAccObjectCache.mm:
1551         (KWQAccObjectCache::childrenChanged):
1552
1553 2004-03-02  Ken Kocienda  <kocienda@apple.com>
1554
1555         Reviewed by Darin and me. Coding by Darin and me.
1556         
1557         1) Fix some places that were calling [self class], in at
1558         least one case calling a method not defined on the class
1559         (not gonna work).
1560         2) Add underscore prefix for all non-API method names.
1561         3) Make DOMObject refuse to init, which might prevent
1562         problems where people get confused and think they can
1563         subclass or instantiate it or its subclasses.
1564         4) Use some C++ mojo to replace NSStringToDOMString and
1565         DOMStringToNSString with type conversions built into the
1566         DOMString class.
1567         5) Removed NSError out parameters from the API. Methods
1568         now throw NSExceptions.
1569         6) Exception code local variables now initialized before
1570         passing to khtml DOM impl calls.
1571         7) Various other cleanups and tweaks.
1572
1573         * khtml/dom/dom_string.h
1574         * khtml/xml/dom_atomicstring.h
1575         * kwq/DOM.h
1576         * kwq/DOM.mm
1577         * kwq/DOMInternal.h
1578         * kwq/KWQKHTMLPart.mm
1579         * kwq/WebCoreBridge.mm
1580
1581 2004-03-02  Richard Williamson   <rjw@apple.com>
1582
1583         Added NP_SAP API.  This API includes the new entry points
1584         used to bind native interfaces to JavaScript.  It's final location
1585         may change.
1586
1587         Made changes to KWQKHTMLPart.mm to reflect changes in names
1588         on RootObject.
1589         
1590         Reviewed by Chris.
1591
1592         * WebCore.pbproj/project.pbxproj:
1593         * khtml/ecma/NP_SAP.h: Added.
1594         * kwq/KWQKHTMLPart.mm:
1595         (KWQKHTMLPart::cleanupPluginRootObjects):
1596         * kwq/WebCoreBridge.mm:
1597
1598 2004-03-01  Maciej Stachowiak  <mjs@apple.com>
1599
1600         Reviewed by Darin.
1601
1602         <rdar://problem/3549201>: repro crash in KHTMLPart::begin inside JavaScript code (gmpartsdirect.com)
1603
1604         Added some null checks. I am not sure why this page attaches a
1605         document that has no view, but these changes make it work
1606         perfectly.
1607         
1608         * khtml/khtml_part.cpp:
1609         (KHTMLPart::begin): Add check for null view before use.  *
1610         khtml/xml/dom_docimpl.cpp:
1611         (DocumentImpl::close): ditto
1612         (DocumentImpl::recalcStyle): Add check for null paint device.
1613
1614 === Safari-130 ===
1615
1616 2004-03-01  Ken Kocienda  <kocienda@apple.com>
1617
1618         Reviewed by me
1619         
1620         Rollout last night's checkin. The tree was closed.
1621
1622         * kwq/DOM.h
1623         * kwq/DOM.mm
1624         * kwq/DOMInternal.h
1625         * kwq/KWQKHTMLPart.mm
1626         * kwq/WebCoreBridge.mm
1627
1628 2004-03-01  Ken Kocienda  <kocienda@apple.com>
1629
1630         Reviewed by me, changes by Darin.
1631         
1632         Yet another pass at the DOM API, this one by 
1633         Darin to simplify the internal structure of the
1634         implementation. Little has changed in the API;
1635         much has changed in the implementation, particularly
1636         with regard to object creation and data storage and
1637         the class hierarchy.
1638
1639         * kwq/DOM.h
1640         * kwq/DOM.mm
1641         * kwq/DOMInternal.h
1642         * kwq/KWQKHTMLPart.mm
1643         * kwq/WebCoreBridge.mm
1644
1645 2004-03-01  Maciej Stachowiak  <mjs@apple.com>
1646
1647         Reviewed by NOBODY (OOPS!).
1648
1649         - fixed <rdar://problem/3567047>: REGRESSION: repro crash inside KJS (dispatchToBoolean) at www.thedonnas.com
1650         - fixed <rdar://problem/3550461>: REGRESSION: repro crash in JavaScript at www.alaska.com
1651         
1652         * khtml/ecma/kjs_window.cpp:
1653         (Window::getListener): Return Null() when the listener object is
1654         null, indicating the code failed to parse. Otherwise we return a
1655         bad value which can later crash the JS interpreter.
1656
1657 2004-03-01  Darin Adler  <darin@apple.com>
1658
1659         Reviewed by Vicki.
1660
1661         - fixed Tiger build
1662
1663         * kwq/KWQXmlSimpleReader.mm: (QXmlSimpleReader::parse):
1664         Changed SAX structure initialization code so it compiles with both the newer
1665         and older libxml. Not sure this will work right with namespaces with the new
1666         libxml; we'll have to test.
1667
1668 2004-03-01  Ken Kocienda  <kocienda@apple.com>
1669
1670         Reviewed by me, as suggested by Darin
1671
1672         * khtml/misc/htmlattrs.c:
1673         (getAttrName): Generated code no longer has extraneous semicolon.
1674         * khtml/misc/htmltags.c: Generated code no longer has extraneous semicolon.
1675         (getTagName):
1676         * khtml/misc/makeattrs: Removed extraneous semicolon from end of file.
1677         * khtml/misc/maketags: Ditto.
1678
1679 2004-03-01  Ken Kocienda  <kocienda@apple.com>
1680
1681         Reviewed by me
1682
1683         * kwq/DOMInternal.h: Replaced tabs with spaces.
1684
1685 2004-03-01  Ken Kocienda  <kocienda@apple.com>
1686
1687         Reviewed by Darin
1688
1689         Changed all Objective-C DOM classes from protocols to classes, using
1690         a class cluster-like approach.
1691
1692         * WebCore.pbproj/project.pbxproj:
1693         * khtml/dom/html_object.cpp: Put code in DOM namespace.
1694         * khtml/html/html_headimpl.cpp: Pull in entire DOM namespace in using directive to
1695         make up for the removal of it from htmlattrs.
1696         * khtml/html/htmltokenizer.cpp: Add using directives for the DOM classes used.
1697         * khtml/misc/htmlattrs.c:
1698         (getAttrName):
1699         * khtml/misc/htmlattrs.h: 
1700         * khtml/misc/htmltags.c:
1701         (getTagName):
1702         * khtml/misc/makeattrs: Some changes here to avoid pulling in the entire DOM namespace.
1703         Explicitly use DOM namespace scoping for DOMString.
1704         * khtml/misc/maketags: Explicitly use DOM namespace scoping for DOMString.
1705         * khtml/rendering/render_form.cpp: Pull in entire DOM namespace in using directive to
1706         make up for the removal of it from htmlattrs.
1707         * kwq/DOM-compat.h:
1708         * kwq/DOM.h:
1709         * kwq/DOM.mm: Added.
1710         * kwq/WebCoreDOM.h: Removed.
1711         * kwq/WebCoreDOM.mm: Removed.
1712
1713 2004-02-26  Maciej Stachowiak  <mjs@apple.com>
1714
1715         Reviewed by John.
1716
1717         <rdar://problem/3514733>: nil-deref in createHTMLEventListener at skiset.com
1718         <rdar://problem/3510676>: nil-deref of view in DocumentImpl::createHTMLEventListener at kirotv.com
1719         
1720         * khtml/xml/dom_docimpl.cpp:
1721         (DocumentImpl::createHTMLEventListener): Don't create the listener if there is no
1722         part. Also, get the part when going through the view. This prevents problems when
1723         handlers are set or removed from the onUnload handler.
1724
1725 2004-02-27  Maciej Stachowiak  <mjs@apple.com>
1726
1727         Reviewed by Dave.
1728
1729         - fixed <rdar://problem/3571356>: REGRESSION: Crash in isPointInsideSelection clicking on link in Apple web directory frame
1730         
1731         * khtml/khtml_part.cpp:
1732         (KHTMLPart::isPointInsideSelection): Don't crash if innerNode is
1733         NULL, as this can happen mousing over a frame that's in the
1734         process of loading and currently empty. Since such a frame
1735         obviously can't be inside the selection, this seems like a good
1736         enough fix.
1737         
1738 2004-02-26  David Hyatt  <hyatt@apple.com>
1739
1740         Fix for 3528839, wide table cut off because of shorts being used instead of ints.
1741         
1742         Reviewed by darin
1743
1744         * khtml/rendering/render_table.cpp:
1745         (RenderTableSection::layoutRows):
1746         (RenderTableCell::setWidth):
1747         * khtml/rendering/table_layout.cpp:
1748         (FixedTableLayout::calcWidthArray):
1749         (FixedTableLayout::calcMinMaxWidth):
1750         (AutoTableLayout::calcMinMaxWidth):
1751
1752 2004-02-26  Chris Blumenberg  <cblu@apple.com>
1753
1754         Fixed a few problems I found with reconstructed source while on my way to implementing "Mail Page".
1755
1756         Reviewed by hyatt.
1757
1758         * khtml/html/html_headimpl.cpp:
1759         (HTMLLinkElementImpl::isSubresourceURLAttribute): only true for stylesheet and icon
1760         * khtml/html/html_imageimpl.cpp:
1761         (HTMLAreaElementImpl::isURLAttribute): implement isURLAttribute not isSubresourceURLAttribute
1762         * khtml/html/html_imageimpl.h:
1763         * khtml/rendering/render_box.cpp:
1764         (RenderBox::dirtyLineBoxes): crasher fix that I found using libgmalloc
1765         * khtml/xml/dom_nodeimpl.cpp:
1766         (NodeImpl::recursive_toHTMLWithOptions): don't escape SCRIPT and TEXTAREA text, write close tags for tags that need them instead of relying on the children check 
1767         * kwq/WebCoreBridge.mm:
1768         (-[WebCoreBridge HTMLString:]): call recursive_toHTMLWithOptions on the first child of the document so <#document /> isn't part of the source
1769
1770 2004-02-26  David Hyatt  <hyatt@apple.com>
1771
1772         Convert render object widths from short to int.  There was a bug on this, but I can't find it in Radar.
1773         
1774         Reviewed by john
1775
1776         * khtml/rendering/render_applet.cpp:
1777         (RenderApplet::intrinsicWidth):
1778         (RenderEmptyApplet::intrinsicWidth):
1779         * khtml/rendering/render_applet.h:
1780         * khtml/rendering/render_block.cpp:
1781         (khtml::RenderBlock::calcMinMaxWidth):
1782         (khtml::RenderBlock::calcInlineMinMaxWidth):
1783         * khtml/rendering/render_block.h:
1784         * khtml/rendering/render_box.cpp:
1785         (RenderBox::contentWidth):
1786         (RenderBox::width):
1787         (RenderBox::containingBlockWidth):
1788         (RenderBox::calcReplacedWidth):
1789         (RenderBox::setStaticX):
1790         * khtml/rendering/render_box.h:
1791         (khtml::RenderBox::minWidth):
1792         (khtml::RenderBox::maxWidth):
1793         * khtml/rendering/render_br.h:
1794         (khtml::RenderBR::minWidth):
1795         (khtml::RenderBR::maxWidth):
1796         * khtml/rendering/render_canvas.cpp:
1797         (RenderCanvas::layout):
1798         * khtml/rendering/render_flexbox.cpp:
1799         (khtml::RenderFlexibleBox::calcMinMaxWidth):
1800         * khtml/rendering/render_frames.cpp:
1801         (RenderPart::intrinsicWidth):
1802         (RenderPartObject::layout):
1803         * khtml/rendering/render_frames.h:
1804         * khtml/rendering/render_image.cpp:
1805         (RenderImage::layout):
1806         (RenderImage::calcReplacedWidth):
1807         * khtml/rendering/render_image.h:
1808         * khtml/rendering/render_inline.cpp:
1809         (RenderInline::width):
1810         * khtml/rendering/render_inline.h:
1811         * khtml/rendering/render_layer.cpp:
1812         (RenderLayer::scrollWidth):
1813         * khtml/rendering/render_layer.h:
1814         (khtml::RenderLayer::width):
1815         (khtml::RenderLayer::setWidth):
1816         (khtml::RenderLayer::scrollXOffset):
1817         * khtml/rendering/render_line.h:
1818         (khtml::InlineBox::setWidth):
1819         (khtml::InlineBox::width):
1820         (khtml::InlineBox::setXPos):
1821         (khtml::InlineBox::xPos):
1822         * khtml/rendering/render_object.cpp:
1823         (RenderObject::containingBlockWidth):
1824         * khtml/rendering/render_object.h:
1825         (khtml::RenderObject::setStaticX):
1826         (khtml::RenderObject::contentWidth):
1827         (khtml::RenderObject::intrinsicWidth):
1828         (khtml::RenderObject::width):
1829         (khtml::RenderObject::offsetWidth):
1830         (khtml::RenderObject::minWidth):
1831         (khtml::RenderObject::maxWidth):
1832         * khtml/rendering/render_replaced.h:
1833         (khtml::RenderReplaced::intrinsicWidth):
1834         * khtml/rendering/render_table.cpp:
1835         (RenderTable::calcWidth):
1836         * khtml/rendering/render_table.h:
1837         * khtml/rendering/render_text.cpp:
1838         (RenderText::trimmedMinMaxWidth):
1839         (RenderText::width):
1840         * khtml/rendering/render_text.h:
1841         (khtml::RenderText::minWidth):
1842         (khtml::RenderText::maxWidth):
1843         * khtml/rendering/table_layout.cpp:
1844
1845 2004-02-26  Trey Matteson  <trey@apple.com>
1846
1847         3566668 - REGRESSION (125-128): autofill of popup lists is broken
1848         3571271 - autofill parsing of field names should treat _ as a word separator
1849
1850         Reviewed by Chris, Darin
1851
1852         * kwq/KWQComboBox.h:
1853         * kwq/KWQComboBox.mm:
1854         (QComboBox::populate):   New virtual method to force any lazy field population to happen.
1855         * kwq/KWQKHTMLPart.mm:
1856         (KWQKHTMLPart::matchLabelsAgainstElement):  Change _ to ' ', to make it a word separator.
1857         * kwq/KWQWidget.h:
1858         (QWidget::populate):  Implement populate to fill out the menu's data.
1859         * kwq/WebCoreBridge.mm:
1860         (viewForElement):    Make sure widget is populated before handing it out.
1861
1862 2004-02-26  Ken Kocienda  <kocienda@apple.com>
1863
1864         Reviewed by Chris
1865
1866         * WebCore.pbproj/project.pbxproj:
1867         * khtml/xml/dom2_rangeimpl.h: Now includes createInstance glue function as do the other
1868         khtml DOM objects that we reflect into ObjC.
1869         * kwq/DOM-compat.h: Added. Compatibility declarations for DOM SPI. Note that this file 
1870         is copied into WebKit by the build system as needed.
1871         * kwq/DOM.h: Added. New home for DOM SPI. Note that this file is copied into WebKit by the build 
1872         system as needed.
1873         * kwq/KWQKHTMLPart.mm:
1874         (KWQKHTMLPart::recordFormValue): Updated usage to new DOM SPI.
1875         * kwq/WebCoreBridge.h: Updated usage to new DOM SPI.
1876         * kwq/WebCoreBridge.mm: Updated usage to new DOM SPI. Needed to add DOM range impl include since
1877         includes jiggered around and this needed header was no longer included indirectly.
1878         (-[WebCoreBridge elementForView:]): Ditto.
1879         (inputElementFromDOMElement): Ditto.
1880         (formElementFromDOMElement): Ditto.
1881         (-[WebCoreBridge elementWithName:inForm:]): Ditto.
1882         (-[WebCoreBridge elementDoesAutoComplete:]): Ditto.
1883         (-[WebCoreBridge elementIsPassword:]): Ditto.
1884         (-[WebCoreBridge currentForm]): Ditto.
1885         (-[WebCoreBridge controlsInForm:]): Ditto.
1886         (-[WebCoreBridge searchForLabels:beforeElement:]): Ditto.
1887         (-[WebCoreBridge matchLabels:againstElement:]): Ditto.
1888         (-[WebCoreBridge elementAtPoint:]): Ditto.
1889         (-[WebCoreBridge DOMDocument]): Ditto.
1890         (-[WebCoreBridge setSelectionFrom:startOffset:to:endOffset:]): Ditto.
1891         (-[WebCoreBridge attributedStringFrom:startOffset:to:endOffset:]): Ditto.
1892         (-[WebCoreBridge selectionStart]): Ditto.
1893         (-[WebCoreBridge selectionEnd]): Ditto.
1894         * kwq/WebCoreDOM.h: New home for all private declarations needed for reflecting DOM into ObjC.
1895         * kwq/WebCoreDOM.mm: Added. New home for all implementations needed for reflecting DOM into ObjC.
1896         * kwq/WebCoreDOMDocument.mm: Removed. All ObjC DOM implementation now in WebCoreDOM.mm.
1897         * kwq/WebCoreDOMNode.mm: Removed. All ObjC DOM implementation now in WebCoreDOM.mm.
1898         * kwq/WebCoreDOMPrivate.h: Removed.
1899         * kwq/WebDOMDocument.h: Removed.
1900         * kwq/WebDOMElement.h: Removed.
1901         * kwq/WebDOMNode.h: Removed.
1902
1903 2004-02-25  John Sullivan  <sullivan@apple.com>
1904
1905         WebCore part of fix for <rdar://problem/3546370>: add a way to tab to menus, 
1906         checkmarks, and buttons without turning on Full Keyboard Acceess
1907
1908         Reviewed by Ken.
1909
1910         * kwq/KWQKHTMLPart.h:
1911         * kwq/KWQKHTMLPart.mm:
1912         (KWQKHTMLPart::tabsToAllControls):
1913         now checks for option-tab like tabsToLinks
1914         (KWQKHTMLPart::partForWidget):
1915         new method, extracted from bridgeForWidget
1916         (KWQKHTMLPart::bridgeForWidget):
1917         now calls extracted method
1918
1919         * kwq/KWQButton.mm:
1920         (-[KWQButton canBecomeKeyView]):
1921         overridden to handle our rules about full keyboard access, different
1922         than NSView's rules
1923         * kwq/KWQComboBox.mm:
1924         (-[KWQPopUpButton canBecomeKeyView]):
1925         ditto
1926         * kwq/KWQListBox.mm:
1927         (-[KWQTableView canBecomeKeyView]):
1928         ditto
1929         
1930 2004-02-24  Darin Adler  <darin@apple.com>
1931
1932         Reviewed by Ken.
1933
1934         * kwq/KWQString.mm: (QString::endsWith): Fixed broken end of string test, to get rid
1935         of false positives.
1936
1937         * WebCore-tests.exp: Added endsWith so it can be tested.
1938         * WebCore-combined.exp: Regenerated.
1939
1940 2004-02-23  David Hyatt  <hyatt@apple.com>
1941
1942         Fix for 3549772, hangs on border collapsing.
1943         
1944         Reviewed by darin
1945
1946         * khtml/rendering/render_object.cpp:
1947         (RenderObject::collectBorders):
1948         * khtml/rendering/render_object.h:
1949         * khtml/rendering/render_table.cpp:
1950         (RenderTable::paint):
1951         (compareBorders):
1952         (RenderTableCell::paint):
1953         (addBorderStyle):
1954         (RenderTableCell::collectBorders):
1955         * khtml/rendering/render_table.h:
1956
1957 2004-02-23  David Hyatt  <hyatt@apple.com>
1958
1959         Fix for 3558717, make sure that form elements that are removed from a document also remove themselves
1960         from the form.
1961
1962         Reviewed by darin.
1963         
1964         * khtml/html/html_formimpl.cpp:
1965         (HTMLGenericFormElementImpl::removedFromDocument):
1966         * khtml/html/html_formimpl.h:
1967         * khtml/xml/dom_nodeimpl.cpp:
1968         * khtml/xml/dom_nodeimpl.h:
1969
1970         Implement smarter line layout for faster typing and repainting when individual lines change.
1971
1972         Reviewed by kocienda.
1973         
1974         * khtml/khtmlview.cpp:
1975         (KHTMLViewPrivate::KHTMLViewPrivate):
1976         (KHTMLViewPrivate::~KHTMLViewPrivate):
1977         (KHTMLViewPrivate::reset):
1978         (KHTMLView::addRepaintInfo):
1979         (KHTMLView::layout):
1980         * khtml/khtmlview.h:
1981         * khtml/rendering/bidi.cpp:
1982         (khtml::Bidinext):
1983         (khtml::appendRun):
1984         (khtml::embed):
1985         (khtml::RenderBlock::constructLine):
1986         (khtml::RenderBlock::computeHorizontalPositionsForLine):
1987         (khtml::RenderBlock::computeVerticalPositionsForLine):
1988         (khtml::RenderBlock::bidiReorderLine):
1989         (khtml::buildCompactRuns):
1990         (khtml::RenderBlock::layoutInlineChildren):
1991         (khtml::RenderBlock::determineStartPosition):
1992         (khtml::RenderBlock::determineEndPosition):
1993         (khtml::RenderBlock::matchedEndLine):
1994         (khtml::RenderBlock::findNextLineBreak):
1995         * khtml/rendering/render_block.cpp:
1996         (khtml:::RenderFlow):
1997         (khtml::RenderBlock::layoutBlock):
1998         (khtml::RenderBlock::layoutBlockChildren):
1999         (khtml::RenderBlock::positionNewFloats):
2000         (khtml::RenderBlock::lowestPosition):
2001         (khtml::RenderBlock::rightmostPosition):
2002         (khtml::RenderBlock::leftmostPosition):
2003         * khtml/rendering/render_block.h:
2004         (khtml::RenderBlock::firstRootBox):
2005         (khtml::RenderBlock::lastRootBox):
2006         (khtml::RenderBlock::setLinesAppended):
2007         (khtml::RenderBlock::linesAppended):
2008         * khtml/rendering/render_box.cpp:
2009         (RenderBox::dirtyLineBoxes):
2010         (RenderBox::deleteLineBoxWrapper):
2011         (RenderBox::setInlineBoxWrapper):
2012         * khtml/rendering/render_box.h:
2013         * khtml/rendering/render_br.cpp:
2014         (RenderBR::createInlineBox):
2015         (RenderBR::position):
2016         * khtml/rendering/render_br.h:
2017         * khtml/rendering/render_container.cpp:
2018         (RenderContainer::appendChildNode):
2019         (RenderContainer::insertChildNode):
2020         * khtml/rendering/render_flexbox.cpp:
2021         (khtml::RenderFlexibleBox::placeChild):
2022         * khtml/rendering/render_flow.cpp:
2023         (RenderFlow::extractLineBox):
2024         (RenderFlow::attachLineBox):
2025         (RenderFlow::removeLineBox):
2026         (RenderFlow::dirtyLinesFromChangedChild):
2027         (RenderFlow::dirtyLineBoxes):
2028         (RenderFlow::createInlineBox):
2029         * khtml/rendering/render_flow.h:
2030         * khtml/rendering/render_line.cpp:
2031         (InlineBox::dirtyLineBoxes):
2032         (InlineBox::deleteLine):
2033         (InlineBox::extractLine):
2034         (InlineBox::attachLine):
2035         (InlineBox::adjustVerticalPosition):
2036         (InlineBox::root):
2037         (InlineBox::nextOnLineExists):
2038         (InlineBox::prevOnLineExists):
2039         (InlineFlowBox::removeChild):
2040         (InlineFlowBox::deleteLine):
2041         (InlineFlowBox::extractLine):
2042         (InlineFlowBox::attachLine):
2043         (InlineFlowBox::adjustVerticalPosition):
2044         (InlineFlowBox::verticallyAlignBoxes):
2045         (InlineFlowBox::adjustMaxAscentAndDescent):
2046         (RootInlineBox::adjustVerticalPosition):
2047         (RootInlineBox::childRemoved):
2048         * khtml/rendering/render_line.h:
2049         (khtml::InlineBox::m_extracted):
2050         (khtml::InlineBox::setExtracted):
2051         (khtml::InlineBox::object):
2052         (khtml::InlineBox::parent):
2053         (khtml::InlineBox::isDirty):
2054         (khtml::InlineBox::markDirty):
2055         (khtml::InlineFlowBox::prevFlowBox):
2056         (khtml::InlineFlowBox::nextFlowBox):
2057         (khtml::RootInlineBox::RootInlineBox):
2058         (khtml::RootInlineBox::nextRootBox):
2059         (khtml::RootInlineBox::prevRootBox):
2060         (khtml::RootInlineBox::setLineBreakInfo):
2061         (khtml::RootInlineBox::setLineBreakPos):
2062         (khtml::RootInlineBox::setBlockHeight):
2063         (khtml::RootInlineBox::setEndsWithBreak):
2064         (khtml::RootInlineBox::blockHeight):
2065         (khtml::RootInlineBox::endsWithBreak):
2066         (khtml::RootInlineBox::lineBreakObj):
2067         (khtml::RootInlineBox::lineBreakPos):
2068         * khtml/rendering/render_object.cpp:
2069         (RenderObject::repaintAfterLayoutIfNeeded):
2070         (RenderObject::repaintObjectsBeforeLayout):
2071         (RenderObject::dirtyLinesFromChangedChild):
2072         (RenderObject::createInlineBox):
2073         (RenderObject::dirtyLineBoxes):
2074         (RenderObject::setInlineBoxWrapper):
2075         (RenderObject::deleteLineBoxWrapper):
2076         * khtml/rendering/render_object.h:
2077         (khtml::RenderObject::RepaintInfo::m_repaintRect):
2078         * khtml/rendering/render_table.cpp:
2079         (RenderTableSection::layoutRows):
2080         * khtml/rendering/render_text.cpp:
2081         (InlineTextBox::deleteLine):
2082         (InlineTextBox::extractLine):
2083         (InlineTextBox::attachLine):
2084         (RenderText::RenderText):
2085         (RenderText::detach):
2086         (RenderText::extractTextBox):
2087         (RenderText::attachTextBox):
2088         (RenderText::removeTextBox):
2089         (RenderText::setTextWithOffset):
2090         (RenderText::setText):
2091         (RenderText::dirtyLineBoxes):
2092         (RenderText::createInlineBox):
2093         * khtml/rendering/render_text.h:
2094         (khtml::InlineTextBox::start):
2095         (khtml::InlineTextBox::end):
2096         (khtml::InlineTextBox::offsetRun):
2097         * khtml/xml/dom_textimpl.cpp:
2098         (CharacterDataImpl::setData):
2099         (CharacterDataImpl::appendData):
2100         (CharacterDataImpl::insertData):
2101         (CharacterDataImpl::deleteData):
2102         (CharacterDataImpl::replaceData):
2103         (TextImpl::splitText):
2104         * kwq/KWQRenderTreeDebug.cpp:
2105         (write):
2106
2107         RenderBlock contains two other fixes.  The first is a fix to rightmost/lowestPosition to properly add in
2108         margins to floats.
2109
2110         Reviewed by mjs
2111
2112         The second fix is to repair a bug in block-level replaced elements with margins.  If the floats they moved to
2113         dodge can fit in their margins, then they don't technically have to move at all.
2114
2115         Reviewed by john
2116
2117 2004-02-20  Maciej Stachowiak  <mjs@apple.com>
2118
2119         Reviewed by Darin.
2120
2121         <rdar://problem/3552346>: REGRESSION 100-125: nil-dereference in KHTMLPart::isPointInsideSelection (progz.ru, many other sites)
2122         
2123         * khtml/rendering/render_layer.cpp:
2124         (RenderLayer::nodeAtPointForLayer): To cover the case of
2125         positioned generated content, make sure to find an element if we
2126         don't have one yet when we get to the layer level.
2127
2128 === Safari-129 ===
2129
2130 2004-02-19  Chris Blumenberg  <cblu@apple.com>
2131
2132         Fixed: <rdar://problem/3563402>: when copying HTML, relative URLs should be made absolute
2133
2134         - Added isSubresourceURLAttribute to ElementImpl which is overridden by subclasses determine if an attribute refers to a subresource.
2135         - Added isURLAttribute to ElementImpl which is overridden by subclasses determine if an attribute refers to any kind of URL.
2136
2137         Reviewed by Dave.
2138
2139         * khtml/html/html_baseimpl.cpp:
2140         (HTMLBodyElementImpl::isSubresourceURLAttribute):
2141         (HTMLFrameElementImpl::isSubresourceURLAttribute):
2142         (HTMLIFrameElementImpl::openURL):
2143         (HTMLIFrameElementImpl::isSubresourceURLAttribute):
2144         * khtml/html/html_baseimpl.h:
2145         * khtml/html/html_formimpl.cpp:
2146         (HTMLFormElementImpl::isURLAttribute):
2147         * khtml/html/html_formimpl.h:
2148         * khtml/html/html_headimpl.cpp:
2149         (HTMLLinkElementImpl::isSubresourceURLAttribute):
2150         (HTMLScriptElementImpl::id):
2151         (HTMLScriptElementImpl::isSubresourceURLAttribute):
2152         * khtml/html/html_headimpl.h:
2153         * khtml/html/html_imageimpl.cpp:
2154         (HTMLImageElementImpl::isSubresourceURLAttribute):
2155         (HTMLAreaElementImpl::getRegion):
2156         (HTMLAreaElementImpl::isSubresourceURLAttribute):
2157         * khtml/html/html_imageimpl.h:
2158         * khtml/html/html_inlineimpl.cpp:
2159         (HTMLAnchorElementImpl::isURLAttribute):
2160         * khtml/html/html_inlineimpl.h:
2161         * khtml/html/html_objectimpl.cpp:
2162         (HTMLEmbedElementImpl::isSubresourceURLAttribute):
2163         (HTMLObjectElementImpl::isSubresourceURLAttribute):
2164         (HTMLParamElementImpl::parseHTMLAttribute):
2165         (HTMLParamElementImpl::isSubresourceURLAttribute):
2166         * khtml/html/html_objectimpl.h:
2167         * khtml/html/html_tableimpl.cpp:
2168         (HTMLTableElementImpl::isSubresourceURLAttribute):
2169         (HTMLTableCellElementImpl::attach):
2170         (HTMLTableCellElementImpl::isSubresourceURLAttribute):
2171         * khtml/html/html_tableimpl.h:
2172         * khtml/xml/dom2_rangeimpl.cpp:
2173         (RangeImpl::toHTMLWithOptions): take completeURLs and subresourceURLs arguments
2174         (RangeImpl::toHTML): call toHTMLWithOptions with default options
2175         * khtml/xml/dom2_rangeimpl.h:
2176         * khtml/xml/dom_elementimpl.cpp:
2177         (ElementImpl::isURLAttribute):
2178         (ElementImpl::isSubresourceURLAttribute):
2179         * khtml/xml/dom_elementimpl.h:
2180         * khtml/xml/dom_nodeimpl.cpp:
2181         (NodeImpl::recursive_toHTMLWithOptions): take completeURLs and subresourceURLs arguments
2182         (NodeImpl::recursive_toHTML): call recursive_toHTML with default options
2183         * khtml/xml/dom_nodeimpl.h:
2184         * kwq/WebCoreBridge.h:
2185         * kwq/WebCoreBridge.mm:
2186         (-[WebCoreBridge selectedHTML:]): renamed to return subresource URL strings
2187
2188 2004-02-17  Maciej Stachowiak  <mjs@apple.com>
2189
2190         Reviewed by Darin.
2191
2192         <rdar://problem/3537397>: REGRESSION (100-114): Return doesn't work in Japanese input method for some HomePage fields
2193         
2194         * kwq/KWQTextArea.mm:
2195         (-[KWQTextAreaTextView keyDown:]): Don't send events through DOM when there is marked
2196         text.
2197         (-[KWQTextAreaTextView keyUp:]): Ditto.
2198         * kwq/KWQTextField.mm:
2199         (-[KWQTextField textView:shouldHandleEvent:]): Ditto.
2200         (-[KWQSecureTextField textView:shouldHandleEvent:]): Ditto.
2201         * khtml/html/html_formimpl.cpp:
2202         (HTMLInputElementImpl::defaultEventHandler): No need to check for
2203         marked text on "return" any more, because we won't send key events
2204         through the DOM at all when there is marked text.
2205         * kwq/KWQLineEdit.h:
2206         * kwq/KWQLineEdit.mm: Removed haveMarkedText method, no longer
2207         used by anything.
2208
2209 2004-02-16  Chris Blumenberg  <cblu@apple.com>
2210
2211         WebCore side of pasting image data.
2212
2213         Reviewed by kocienda.
2214
2215         * khtml/editing/htmlediting.cpp:
2216         (PasteImageCommand::PasteImageCommand): new
2217         (PasteImageCommand::~PasteImageCommand): new
2218         (PasteImageCommand::impl): new
2219         * khtml/editing/htmlediting.h:
2220         (khtml::):
2221         * khtml/editing/htmlediting_impl.cpp:
2222         (EditCommandImpl::name): added support for PasteImageCommandID
2223         (CompositeEditCommandImpl::insertNodeAt): new, factored out from PasteHTMLCommandImpl::apply
2224         (PasteHTMLCommandImpl::apply): call insertNodeAt
2225         (PasteImageCommandImpl::PasteImageCommandImpl): new
2226         (PasteImageCommandImpl::~PasteImageCommandImpl): new
2227         (PasteImageCommandImpl::apply): new
2228         * khtml/editing/htmlediting_impl.h:
2229         * khtml/khtml_part.cpp:
2230         (KHTMLPart::pasteHTMLString): unchanged
2231         (KHTMLPart::pasteImage): new
2232         * khtml/khtml_part.h:
2233         * kwq/WebCoreBridge.h:
2234         * kwq/WebCoreBridge.mm:
2235         (-[WebCoreBridge pasteImageWithURL:]): new
2236
2237 2004-02-16  Darin Adler  <darin@apple.com>
2238
2239         Reviewed by Ken.
2240
2241         - Fixed some dynamic casts that Dirk complained about to use virtual functions instead.
2242           Since the virtual functions were already there, this is faster and better in most
2243           ways anyway.
2244
2245         * khtml/dom/dom2_events.cpp:
2246         (UIEvent::keyCode): Use virtual function instead of dynamic_cast.
2247         (UIEvent::charCode): Ditto.
2248         (UIEvent::pageX): Ditto.
2249         (UIEvent::pageY): Ditto.
2250         (UIEvent::layerX): Ditto.
2251         (UIEvent::layerY): Ditto.
2252         (UIEvent::which): Ditto.
2253
2254 2004-02-15  Darin Adler  <darin@apple.com>
2255
2256         Reviewed by Dave.
2257
2258         * WebCore.pbproj/project.pbxproj: Tweak build styles a bit, fixing OptimizedWithSymbols,
2259         and removing redundant settings of things that match defaults in other build styles.
2260
2261 2004-02-15  Darin Adler  <darin@apple.com>
2262
2263         Reviewed by Dave.
2264
2265         - fixed 3548533: crash in XMLHttpRequest::slotData using Orkut's rating system
2266
2267         * khtml/ecma/xmlhttprequest.cpp: (KJS::XMLHttpRequest::~XMLHttpRequest):
2268         Delete the QObject side, which has a side effect of disconnecting the
2269         signals which seem to be firing after the request is gone. There may be
2270         another way of addressing the crash by correcting some other problem with
2271         killing the job, but this demonstrably works and fixes a storage leak.
2272
2273 2004-02-12  Maciej Stachowiak  <mjs@apple.com>
2274
2275         Reviewed by John.
2276
2277         - redo visited link history checking for a 2% speed improvement
2278
2279         * kwq/KWQKHistoryProvider.mm:
2280         (KParts::HistoryProvider::contains): Don't make a KURL or an
2281         NSString. Punt on canonicalization and directly pass the internal
2282         Latin1 or unicode buffer.
2283         * kwq/KWQString.h:
2284         * kwq/KWQString.mm:
2285         (QString::hasFastLatin1): New method to check whether getting the
2286         latin1 buffer is fast (doesn't allocate).
2287         * kwq/WebCoreHistory.h: add new methods to look up by raw latin1
2288         or unicode buffer instead of NSString.
2289
2290 === Safari-128 ===
2291
2292 2004-02-12  David Hyatt  <hyatt@apple.com>
2293
2294         Fix for 3557850 and 3557607.  Make sure to setParent(0) on the body's link declaration, so that TreeShared
2295         will delete it.
2296         
2297         * khtml/html/html_baseimpl.cpp:
2298         (HTMLBodyElementImpl::~HTMLBodyElementImpl):
2299
2300 2004-02-12  Ken Kocienda  <kocienda@apple.com>
2301
2302         Reviewed by Hyatt
2303
2304         Refactored object design for edit commands into something that's
2305         starting to feel more solid. Added some accessors to edit 
2306         commands.
2307
2308         * WebCore.pbproj/project.pbxproj:
2309         * khtml/editing/htmlediting_impl.h: Added.
2310         * khtml/editing/htmlediting_impl.m: Added.
2311
2312 2004-02-11  David Hyatt  <hyatt@apple.com>
2313
2314         Fix for 3550005, 936 leaks when loading checkbox page of pain.  Make sure to nuke the inline box
2315         wrapper when detaching the RenderWidget.
2316
2317         * khtml/rendering/render_replaced.cpp:
2318         (RenderWidget::detach):
2319
2320 2004-02-11  David Hyatt  <hyatt@apple.com>
2321
2322         Add some more polish to ensure the ypos estimate is right.  Correct the clearing of images so that
2323         their top margins do not get added in when they clear the float because of having a large width.
2324         
2325         Reviewed by kocienda
2326
2327         * khtml/rendering/render_block.cpp:
2328         (khtml::RenderBlock::layoutBlockChildren):
2329         * layout-tests/fast/block/margin-collapse/101-expected.txt: Added.
2330         * layout-tests/fast/block/margin-collapse/101.html: Added.
2331         * layout-tests/fast/block/margin-collapse/102-expected.txt: Added.
2332         * layout-tests/fast/block/margin-collapse/102.html: Added.
2333
2334 2004-02-11  David Hyatt  <hyatt@apple.com>
2335
2336         Fix for 3556702, margin collapsing gets disabled when images spill out of the containing block.
2337         
2338         Reviewed by kocienda
2339
2340         * khtml/rendering/render_block.cpp:
2341         (khtml::RenderBlock::layoutBlockChildren):
2342
2343 2004-02-11  David Hyatt  <hyatt@apple.com>
2344
2345         Fix the .rows and .cells arrays on tables by merging with the KHTML trunk.  TH was being included
2346         as a row instead of as a cell.
2347         
2348         Reviewed by kocienda
2349
2350         * khtml/html/html_miscimpl.cpp:
2351         (HTMLCollectionImpl::calcLength):
2352         (HTMLCollectionImpl::getItem):
2353         (HTMLCollectionImpl::getNamedItem):
2354
2355 2004-02-11  David Hyatt  <hyatt@apple.com>
2356
2357         Remove my bogus refs of the elementSheet.  Fixes 3554213 and 3555467.
2358         
2359         * khtml/html/html_baseimpl.cpp:
2360         (HTMLBodyElementImpl::createLinkDecl):
2361         * khtml/html/html_tableimpl.cpp:
2362         (HTMLTableElementImpl::additionalAttributeStyleDecl):
2363         (HTMLTableElementImpl::getSharedCellDecl):
2364
2365 2004-02-11  David Hyatt  <hyatt@apple.com>
2366
2367         Fix for 3556037, regression where display:block generated content didn't work.
2368         
2369         Reviewed by kocienda
2370
2371         * khtml/rendering/render_block.cpp:
2372         (khtml::RenderBlock::setStyle):
2373         (khtml::RenderBlock::addChildToFlow):
2374         (khtml::RenderBlock::removeChild):
2375         (khtml::RenderBlock::renderName):
2376         * khtml/rendering/render_container.cpp:
2377         (RenderContainer::insertChildNode):
2378         (RenderContainer::removeLeftoverAnonymousBoxes):
2379         * khtml/rendering/render_inline.cpp:
2380         (RenderInline::splitFlow):
2381         (RenderInline::renderName):
2382         * khtml/rendering/render_list.cpp:
2383         (RenderListItem::updateMarkerLocation):
2384         * khtml/rendering/render_object.h:
2385         (khtml::RenderObject::isAnonymousBlock):
2386         * layout-tests/css1/pseudo/firstletter-expected.txt:
2387         * layout-tests/css1/pseudo/multiple_pseudo_elements-expected.txt:
2388         * layout-tests/fast/css-generated-content/002-expected.txt:
2389         * layout-tests/fast/css-generated-content/004-expected.txt:
2390         * layout-tests/fast/css-generated-content/005-expected.txt:
2391         * layout-tests/fast/css-generated-content/006-expected.txt:
2392         * layout-tests/fast/css-generated-content/007-expected.txt:
2393         * layout-tests/fast/css-generated-content/009-expected.txt:
2394         * layout-tests/fast/css-generated-content/010-expected.txt:
2395         * layout-tests/fast/selectors/039-expected.txt:
2396         * layout-tests/fast/selectors/039b-expected.txt:
2397         * layout-tests/fast/selectors/041-expected.txt:
2398         * layout-tests/fast/selectors/042-expected.txt:
2399         * layout-tests/fast/selectors/166a-expected.txt:
2400         * layout-tests/fast/selectors/168-expected.txt:
2401         * layout-tests/fast/selectors/168a-expected.txt:
2402         * layout-tests/fast/selectors/169-expected.txt:
2403         * layout-tests/fast/selectors/169a-expected.txt:
2404         * layout-tests/fast/text/firstline/002-expected.txt:
2405         * layout-tests/fast/text/firstline/003-expected.txt:
2406
2407 2004-02-11  Darin Adler   <darin@apple.com>
2408
2409         Reviewed by Richard.
2410
2411         * kwq/KWQTextCodec.mm:
2412         (KWQTextDecoder::convertLatin1):
2413         Fix off by one error.
2414
2415 2004-02-11  David Hyatt  <hyatt@apple.com>
2416
2417         Convert paint methods over to use a new PaintInfo struct.  Eliminate the paintObject method.
2418         
2419         Reviewed by kocienda
2420
2421         * khtml/rendering/render_block.cpp:
2422         (khtml::RenderBlock::paint):
2423         (khtml::RenderBlock::paintObject):
2424         (khtml::RenderBlock::paintFloats):
2425         * khtml/rendering/render_block.h:
2426         * khtml/rendering/render_box.cpp:
2427         (RenderBox::paint):
2428         (RenderBox::paintRootBoxDecorations):
2429         (RenderBox::paintBoxDecorations):
2430         * khtml/rendering/render_box.h:
2431         * khtml/rendering/render_br.h:
2432         (khtml::RenderBR::paint):
2433         * khtml/rendering/render_canvas.cpp:
2434         (RenderCanvas::paint):
2435         (RenderCanvas::paintBoxDecorations):
2436         * khtml/rendering/render_canvas.h:
2437         * khtml/rendering/render_flow.cpp:
2438         (RenderFlow::paintLineBoxBackgroundBorder):
2439         (RenderFlow::paintLineBoxDecorations):
2440         * khtml/rendering/render_flow.h:
2441         * khtml/rendering/render_form.cpp:
2442         (RenderFieldset::paintBoxDecorations):
2443         * khtml/rendering/render_form.h:
2444         * khtml/rendering/render_image.cpp:
2445         (RenderImage::paint):
2446         (RenderImage::updateFromElement):
2447         * khtml/rendering/render_image.h:
2448         * khtml/rendering/render_inline.cpp:
2449         (RenderInline::paint):
2450         * khtml/rendering/render_inline.h:
2451         * khtml/rendering/render_layer.cpp:
2452         (RenderLayer::paintLayer):
2453         * khtml/rendering/render_line.cpp:
2454         (InlineFlowBox::paintBackgroundAndBorder):
2455         (InlineFlowBox::paintDecorations):
2456         * khtml/rendering/render_line.h:
2457         (khtml::InlineRunBox::paintBackgroundAndBorder):
2458         (khtml::InlineRunBox::paintDecorations):
2459         * khtml/rendering/render_list.cpp:
2460         (RenderListItem::paint):
2461         (RenderListMarker::paint):
2462         * khtml/rendering/render_list.h:
2463         * khtml/rendering/render_object.cpp:
2464         (RenderObject::paint):
2465         * khtml/rendering/render_object.h:
2466         (khtml::RenderObject::PaintInfo::PaintInfo):
2467         (khtml::RenderObject::paintBoxDecorations):
2468         * khtml/rendering/render_replaced.cpp:
2469         (RenderReplaced::shouldPaint):
2470         (RenderWidget::paint):
2471         * khtml/rendering/render_replaced.h:
2472         * khtml/rendering/render_table.cpp:
2473         (RenderTable::paint):
2474         (RenderTable::paintBoxDecorations):
2475         (RenderTableSection::paint):
2476         (RenderTableCell::paint):
2477         (RenderTableCell::paintBoxDecorations):
2478         * khtml/rendering/render_table.h:
2479         * khtml/rendering/render_text.cpp:
2480         (RenderText::paint):
2481         * khtml/rendering/render_text.h:
2482
2483 2004-02-11  Ken Kocienda  <kocienda@apple.com>
2484
2485         Reviewed by me
2486
2487                 Removed include file I was considering checking, but 
2488                 decided against. Of course, this dangling include
2489                 broke the build.
2490                 
2491         * kwq/KWQKHTMLPart.mm
2492         * kwq/WebCoreBridge.mm
2493
2494 2004-02-10  Ken Kocienda  <kocienda@apple.com>
2495
2496         Reviewed by Hyatt
2497         
2498         Several big changes.
2499         
2500         EditSteps are now all EditCommands.
2501         Smart pointer for Shared classes added to shared.h.
2502                 Some events, like text input events, are now coalesced.
2503                 "Undo typing" now implemented, even though the name is not in the menu yet.
2504                 Integer id's added to EditCommand and its subclasses.
2505                 A bunch of cleanup in the EditCommand classes.
2506
2507         * khtml/editing/htmlediting.cpp:
2508         (EditCommand::EditCommand):
2509         (EditCommand::~EditCommand):
2510         (EditCommand::commandID):
2511         (EditCommand::reapply):
2512         (EditCommand::beginApply):
2513         (EditCommand::endApply):
2514         (EditCommand::beginUnapply):
2515         (EditCommand::endUnapply):
2516         (EditCommand::beginReapply):
2517         (EditCommand::endReapply):
2518         (EditCommand::currentSelection):
2519         (EditCommand::coalesce):
2520         (EditCommand::groupForUndo):
2521         (EditCommand::groupForRedo):
2522         (EditCommand::moveToStartingSelection):
2523         (EditCommand::moveToEndingSelection):
2524         (EditCommand::name):
2525         (CompositeEditCommand::CompositeEditCommand):
2526         (CompositeEditCommand::~CompositeEditCommand):
2527         (CompositeEditCommand::unapply):
2528         (CompositeEditCommand::reapply):
2529         (CompositeEditCommand::applyCommand):
2530         (CompositeEditCommand::insertNodeBefore):
2531         (CompositeEditCommand::insertNodeAfter):
2532         (CompositeEditCommand::appendNode):
2533         (CompositeEditCommand::removeNode):
2534         (CompositeEditCommand::splitTextNode):
2535         (CompositeEditCommand::joinTextNodes):
2536         (CompositeEditCommand::insertText):
2537         (CompositeEditCommand::deleteText):
2538         (CompositeEditCommand::moveSelectionTo):
2539         (CompositeEditCommand::deleteSelection):
2540         (InsertNodeBeforeCommand::InsertNodeBeforeCommand):
2541         (InsertNodeBeforeCommand::~InsertNodeBeforeCommand):
2542         (InsertNodeBeforeCommand::apply):
2543         (InsertNodeBeforeCommand::unapply):
2544         (AppendNodeCommand::AppendNodeCommand):
2545         (AppendNodeCommand::~AppendNodeCommand):
2546         (AppendNodeCommand::apply):
2547         (AppendNodeCommand::unapply):
2548         (RemoveNodeCommand::RemoveNodeCommand):
2549         (RemoveNodeCommand::~RemoveNodeCommand):
2550         (RemoveNodeCommand::apply):
2551         (RemoveNodeCommand::unapply):
2552         (ModifyTextNodeCommand::ModifyTextNodeCommand):
2553         (ModifyTextNodeCommand::~ModifyTextNodeCommand):
2554         (ModifyTextNodeCommand::splitTextNode):
2555         (ModifyTextNodeCommand::joinTextNodes):
2556         (SplitTextNodeCommand::SplitTextNodeCommand):
2557         (SplitTextNodeCommand::~SplitTextNodeCommand):
2558         (SplitTextNodeCommand::apply):
2559         (SplitTextNodeCommand::unapply):
2560         (JoinTextNodesCommand::JoinTextNodesCommand):
2561         (JoinTextNodesCommand::~JoinTextNodesCommand):
2562         (JoinTextNodesCommand::apply):
2563         (JoinTextNodesCommand::unapply):
2564         (InsertTextCommand::InsertTextCommand):
2565         (InsertTextCommand::~InsertTextCommand):
2566         (InsertTextCommand::apply):
2567         (InsertTextCommand::unapply):
2568         (DeleteTextCommand::DeleteTextCommand):
2569         (DeleteTextCommand::~DeleteTextCommand):
2570         (DeleteTextCommand::apply):
2571         (DeleteTextCommand::unapply):
2572         (MoveSelectionToCommand::MoveSelectionToCommand):
2573         (MoveSelectionToCommand::~MoveSelectionToCommand):
2574         (MoveSelectionToCommand::commandID):
2575         (MoveSelectionToCommand::apply):
2576         (MoveSelectionToCommand::unapply):
2577         (DeleteSelectionCommand::DeleteSelectionCommand):
2578         (DeleteSelectionCommand::~DeleteSelectionCommand):
2579         (DeleteSelectionCommand::apply):
2580         (InputTextCommand::InputTextCommand):
2581         (InputTextCommand::~InputTextCommand):
2582         (InputTextCommand::commandID):
2583         (InputTextCommand::isLineBreak):
2584         (InputTextCommand::isSpace):
2585         (InputTextCommand::apply):
2586         (InputTextCommand::coalesce):
2587         (InputTextCommand::groupForUndo):
2588         (InputTextCommand::groupForRedo):
2589         (InputTextCommand::execute):
2590         (DeleteKeyCommand::DeleteKeyCommand):
2591         (DeleteKeyCommand::~DeleteKeyCommand):
2592         (DeleteKeyCommand::commandID):
2593         (DeleteKeyCommand::apply):
2594         (DeleteKeyCommand::groupForUndo):
2595         (DeleteKeyCommand::groupForRedo):
2596         (PasteHTMLCommand::PasteHTMLCommand):
2597         (PasteHTMLCommand::~PasteHTMLCommand):
2598         (PasteHTMLCommand::apply):
2599         * khtml/editing/htmlediting.h:
2600         (khtml::):
2601         (khtml::EditCommand::):
2602         (khtml::EditCommand::document):
2603         (khtml::EditCommand::state):
2604         (khtml::EditCommand::setState):
2605         (khtml::SplitTextNodeCommand::joinState):
2606         (khtml::SplitTextNodeCommand::splitState):
2607         (khtml::JoinTextNodesCommand::joinState):
2608         (khtml::JoinTextNodesCommand::splitState):
2609         * khtml/khtml_part.cpp:
2610         (KHTMLPart::openURL):
2611         (KHTMLPart::deleteSelection):
2612         (KHTMLPart::applyCommand):
2613         (KHTMLPart::undoEditing):
2614         (KHTMLPart::redoEditing):
2615         (KHTMLPart::pasteHTMLString):
2616         * khtml/khtml_part.h:
2617         * khtml/khtmlpart_p.h:
2618         (KHTMLPartPrivate::~KHTMLPartPrivate):
2619         * khtml/misc/shared.h:
2620         (khtml::SharedPtr::SharedPtr):
2621         (khtml::SharedPtr::~SharedPtr):
2622         (khtml::SharedPtr::isEmpty):
2623         (khtml::SharedPtr::get):
2624         (khtml::SharedPtr::operator*):
2625         (khtml::SharedPtr::operator->):
2626         (khtml::SharedPtr::operator!):
2627         (khtml::SharedPtr::operator==):
2628         (khtml::::operator):
2629         (khtml::operator!=):
2630         * khtml/xml/dom_elementimpl.cpp:
2631         (ElementImpl::defaultEventHandler):
2632         * kwq/KWQKHTMLPart.h:
2633         * kwq/KWQKHTMLPart.mm:
2634         (KWQKHTMLPart::registerCommandForUndo):
2635         (KWQKHTMLPart::registerCommandForRedo):
2636         (KWQKHTMLPart::clearUndoRedoOperations):
2637         * kwq/WebCoreBridge.h:
2638         * kwq/WebCoreBridge.mm:
2639         (-[WebCoreBridge undoEditing:]):
2640         (-[WebCoreBridge redoEditing:]):
2641
2642 2004-02-10  David Hyatt  <hyatt@apple.com>
2643
2644         Eliminate the double-completion and double-parsing of KURLs for every single image request.
2645         
2646         * khtml/misc/loader.cpp:
2647         (DocLoader::requestImage):
2648         (Cache::requestImage):
2649         * khtml/misc/loader.h:
2650
2651 2004-02-10  David Hyatt  <hyatt@apple.com>
2652
2653         Merged patch that fixes clear:both for floats.  This patch comes from the KHTML tree.
2654         
2655         * khtml/rendering/render_block.cpp:
2656         (khtml::RenderBlock::positionNewFloats):
2657         * layout-tests/fast/block/float/029-expected.txt: Added.
2658         * layout-tests/fast/block/float/029.html: Added.
2659
2660 2004-02-10  David Hyatt  <hyatt@apple.com>
2661
2662         Fix crasher in list code caused by incorrect style deallocation.  Regression from the
2663         arena changes for RenderStyles.
2664         
2665         Reviewed by darin
2666
2667         * khtml/rendering/render_object.cpp:
2668         (RenderObject::remove):
2669         (RenderObject::arenaDelete):
2670
2671 2004-02-10  David Hyatt  <hyatt@apple.com>
2672
2673         Fix for osnews.com's wacky layout problem.  Put back in the check for isEmpty.
2674         
2675         Reviewed by darin
2676
2677         * khtml/html/htmltokenizer.cpp:
2678         (khtml::HTMLTokenizer::scriptHandler):
2679
2680 2004-02-10  David Hyatt  <hyatt@apple.com>
2681
2682         Fix for the bad background color on abcnews.com.  Make cloning optionally drop the style declarations.
2683
2684         * khtml/html/html_elementimpl.cpp:
2685         (HTMLAttributeImpl::clone):
2686         * khtml/html/html_elementimpl.h:
2687         * khtml/html/htmlparser.cpp:
2688         (KHTMLParser::insertNode):
2689         * khtml/xml/dom_elementimpl.cpp:
2690         (AttributeImpl::clone):
2691         * khtml/xml/dom_elementimpl.h:
2692
2693 2004-02-10  Chris Blumenberg  <cblu@apple.com>
2694
2695         Fixed: <rdar://problem/3552545>: Cut, Paste and Delete must support Undo and Redo
2696
2697         Reviewed by kocienda.
2698
2699         * khtml/editing/htmlediting.cpp:
2700         (ModifyTextNodeStep::splitTextNode): ken's fix that fixes a problem with unapply
2701         (ModifyTextNodeStep::joinTextNodes): my fix that fixes a problem with unapply
2702         (PasteHTMLCommand::PasteHTMLCommand): new
2703         (PasteHTMLCommand::apply): moved from dom_docimpl.cpp and improved
2704         * khtml/editing/htmlediting.h:
2705         (khtml::PasteHTMLCommand::~PasteHTMLCommand):
2706         * khtml/khtml_part.cpp:
2707         (KHTMLPart::deleteSelection): new, create and applies a DeleteTextCommand
2708         (KHTMLPart::pasteHTMLString): new, create and applies a PasteHTMLCommand
2709         * khtml/khtml_part.h:
2710         * khtml/xml/dom_docimpl.cpp: moved paste code to htmlediting.cpp
2711         * khtml/xml/dom_docimpl.h:
2712         * kwq/WebCoreBridge.mm:
2713         (-[WebCoreBridge pasteHTMLString:]): call pasteHTMLString on the part instead of the bridge
2714         (-[WebCoreBridge deleteSelection]): call deleteSelection on the part instead of the bridge
2715
2716 2004-02-10  David Hyatt  <hyatt@apple.com>
2717
2718         Fix crash on abcnews.com by adding isEmpty checks before dereferencing.
2719         
2720         * khtml/html/htmltokenizer.cpp:
2721         (khtml::HTMLTokenizer::parseTag):
2722
2723 2004-02-10  David Hyatt  <hyatt@apple.com>
2724
2725         Improve attribute parsing of mapped attributes (that map to CSS properties) so that they can pull the
2726         style declarations from a global cache.
2727
2728         Made RenderStyles be arena allocated as well.
2729         
2730         Reviewed by darin
2731
2732         * khtml/css/css_valueimpl.cpp:
2733         (CSSImageValueImpl::CSSImageValueImpl):
2734         (CSSImageValueImpl::image):
2735         * khtml/css/css_valueimpl.h:
2736         * khtml/css/cssstyleselector.cpp:
2737         (khtml::CSSStyleSelector::initForStyleResolve):
2738         (khtml::CSSStyleSelector::styleForElement):
2739         (khtml::CSSStyleSelector::pseudoStyleForElement):
2740         (khtml::CSSStyleSelector::applyProperty):
2741         * khtml/css/cssstyleselector.h:
2742         * khtml/css/html4.css:
2743         * khtml/css/quirks.css:
2744         * khtml/dom/dom_element.cpp:
2745         (Element::style):
2746         * khtml/dom/html_element.cpp:
2747         * khtml/dom/html_element.h:
2748         * khtml/html/html_baseimpl.cpp:
2749         (HTMLBodyElementImpl::HTMLBodyElementImpl):
2750         (HTMLBodyElementImpl::mapToEntry):
2751         (HTMLBodyElementImpl::parseHTMLAttribute):
2752         (HTMLBodyElementImpl::insertedIntoDocument):
2753         (HTMLFrameElementImpl::parseHTMLAttribute):
2754         (HTMLFrameSetElementImpl::parseHTMLAttribute):
2755         (HTMLIFrameElementImpl::mapToEntry):
2756         (HTMLIFrameElementImpl::parseHTMLAttribute):
2757         * khtml/html/html_baseimpl.h:
2758         * khtml/html/html_blockimpl.cpp:
2759         (HTMLDivElementImpl::mapToEntry):
2760         (HTMLDivElementImpl::parseHTMLAttribute):
2761         (HTMLHRElementImpl::mapToEntry):
2762         (HTMLHRElementImpl::parseHTMLAttribute):
2763         (HTMLParagraphElementImpl::mapToEntry):
2764         (HTMLParagraphElementImpl::parseHTMLAttribute):
2765         (HTMLMarqueeElementImpl::mapToEntry):
2766         (HTMLMarqueeElementImpl::parseHTMLAttribute):
2767         (HTMLLayerElementImpl::HTMLLayerElementImpl):
2768         (HTMLLayerElementImpl::id):
2769         * khtml/html/html_blockimpl.h:
2770         * khtml/html/html_documentimpl.cpp:
2771         (HTMLDocumentImpl::determineParseMode):
2772         * khtml/html/html_documentimpl.h:
2773         * khtml/html/html_elementimpl.cpp:
2774         (CSSMappedAttributeDeclarationImpl::~CSSMappedAttributeDeclarationImpl):
2775         (HTMLElementImpl::getMappedAttributeDecl):
2776         (HTMLElementImpl::setMappedAttributeDecl):
2777         (HTMLElementImpl::removeMappedAttributeDecl):
2778         (HTMLAttributeImpl::~HTMLAttributeImpl):
2779         (HTMLAttributeImpl::clone):
2780         (m_mappedAttributeCount):
2781         (HTMLNamedAttrMapImpl::clearAttributes):
2782         (HTMLElementImpl::HTMLElementImpl):
2783         (HTMLElementImpl::~HTMLElementImpl):
2784         (HTMLElementImpl::createAttribute):
2785         (HTMLElementImpl::createInlineStyleDecl):
2786         (HTMLElementImpl::attributeChanged):
2787         (HTMLElementImpl::mapToEntry):
2788         (HTMLElementImpl::parseHTMLAttribute):
2789         (HTMLElementImpl::additionalAttributeStyleDecl):
2790         (isHexDigit):
2791         (toHex):
2792         (HTMLElementImpl::addCSSProperty):
2793         (HTMLElementImpl::addCSSStringProperty):
2794         (HTMLElementImpl::addCSSImageProperty):
2795         (HTMLElementImpl::addCSSLength):
2796         (HTMLElementImpl::addHTMLColor):
2797         (HTMLElementImpl::createMappedDecl):
2798         (HTMLElementImpl::addHTMLAlignment):
2799         (HTMLElementImpl::setContentEditable):
2800         * khtml/html/html_elementimpl.h:
2801         (DOM::):
2802         (DOM::CSSMappedAttributeDeclarationImpl::CSSMappedAttributeDeclarationImpl):
2803         (DOM::CSSMappedAttributeDeclarationImpl::setMappedState):
2804         (DOM::HTMLAttributeImpl::HTMLAttributeImpl):
2805         (DOM::HTMLAttributeImpl::decl):
2806         (DOM::HTMLAttributeImpl::setDecl):
2807         (DOM::HTMLNamedAttrMapImpl::hasMappedAttributes):
2808         (DOM::HTMLNamedAttrMapImpl::declRemoved):
2809         (DOM::HTMLNamedAttrMapImpl::declAdded):
2810         (DOM::HTMLNamedAttrMapImpl::attributeItem):
2811         (DOM::HTMLElementImpl::hasMappedAttributes):
2812         (DOM::HTMLElementImpl::htmlAttributes):
2813         (DOM::HTMLElementImpl::inlineStyleDecl):
2814         * khtml/html/html_formimpl.cpp:
2815         (HTMLFormElementImpl::parseHTMLAttribute):
2816         (HTMLGenericFormElementImpl::parseHTMLAttribute):
2817         (HTMLButtonElementImpl::parseHTMLAttribute):
2818         (HTMLInputElementImpl::setType):
2819         (HTMLInputElementImpl::mapToEntry):
2820         (HTMLInputElementImpl::parseHTMLAttribute):
2821         (HTMLInputElementImpl::attach):
2822         (HTMLLabelElementImpl::parseHTMLAttribute):
2823         (HTMLSelectElementImpl::parseHTMLAttribute):
2824         (HTMLKeygenElementImpl::parseHTMLAttribute):
2825         (HTMLOptGroupElementImpl::parseHTMLAttribute):
2826         (HTMLOptionElementImpl::parseHTMLAttribute):
2827         (HTMLTextAreaElementImpl::parseHTMLAttribute):
2828         (HTMLIsIndexElementImpl::parseHTMLAttribute):
2829         * khtml/html/html_formimpl.h:
2830         * khtml/html/html_headimpl.cpp:
2831         (HTMLBaseElementImpl::parseHTMLAttribute):
2832         (HTMLLinkElementImpl::parseHTMLAttribute):
2833         (HTMLMetaElementImpl::parseHTMLAttribute):
2834         (HTMLStyleElementImpl::parseHTMLAttribute):
2835         * khtml/html/html_headimpl.h:
2836         * khtml/html/html_imageimpl.cpp:
2837         (HTMLImageElementImpl::mapToEntry):
2838         (HTMLImageElementImpl::parseHTMLAttribute):
2839         (HTMLMapElementImpl::parseHTMLAttribute):
2840         (HTMLAreaElementImpl::parseHTMLAttribute):
2841         * khtml/html/html_imageimpl.h:
2842         * khtml/html/html_inlineimpl.cpp:
2843         (HTMLAnchorElementImpl::parseHTMLAttribute):
2844         (HTMLBRElementImpl::mapToEntry):
2845         (HTMLBRElementImpl::parseHTMLAttribute):
2846         (HTMLFontElementImpl::mapToEntry):
2847         (HTMLFontElementImpl::parseHTMLAttribute):
2848         * khtml/html/html_inlineimpl.h:
2849         * khtml/html/html_listimpl.cpp:
2850         (HTMLUListElementImpl::mapToEntry):
2851         (HTMLUListElementImpl::parseHTMLAttribute):
2852         (HTMLOListElementImpl::mapToEntry):
2853         (HTMLOListElementImpl::parseHTMLAttribute):
2854         (HTMLLIElementImpl::mapToEntry):
2855         (HTMLLIElementImpl::parseHTMLAttribute):
2856         * khtml/html/html_listimpl.h:
2857         * khtml/html/html_objectimpl.cpp:
2858         (HTMLAppletElementImpl::mapToEntry):
2859         (HTMLAppletElementImpl::parseHTMLAttribute):
2860         (HTMLEmbedElementImpl::HTMLEmbedElementImpl):
2861         (HTMLEmbedElementImpl::mapToEntry):
2862         (HTMLEmbedElementImpl::parseHTMLAttribute):
2863         (HTMLEmbedElementImpl::attach):
2864         (HTMLObjectElementImpl::mapToEntry):
2865         (HTMLObjectElementImpl::parseHTMLAttribute):
2866         (HTMLParamElementImpl::parseHTMLAttribute):
2867         * khtml/html/html_objectimpl.h:
2868         * khtml/html/html_tableimpl.cpp:
2869         (HTMLTableElementImpl::HTMLTableElementImpl):
2870         (HTMLTableElementImpl::~HTMLTableElementImpl):
2871         (HTMLTableElementImpl::mapToEntry):
2872         (HTMLTableElementImpl::parseHTMLAttribute):
2873         (HTMLTableElementImpl::additionalAttributeStyleDecl):
2874         (HTMLTableElementImpl::getSharedCellDecl):
2875         (HTMLTableElementImpl::attach):
2876         (HTMLTablePartElementImpl::mapToEntry):
2877         (HTMLTablePartElementImpl::parseHTMLAttribute):
2878         (HTMLTableCellElementImpl::mapToEntry):
2879         (HTMLTableCellElementImpl::parseHTMLAttribute):
2880         (HTMLTableCellElementImpl::additionalAttributeStyleDecl):
2881         (HTMLTableCellElementImpl::attach):
2882         (HTMLTableColElementImpl::mapToEntry):
2883         (HTMLTableColElementImpl::parseHTMLAttribute):
2884         (HTMLTableCaptionElementImpl::mapToEntry):
2885         (HTMLTableCaptionElementImpl::parseHTMLAttribute):
2886         * khtml/html/html_tableimpl.h:
2887         * khtml/html/htmlparser.cpp:
2888         (KHTMLParser::insertNode):
2889         (KHTMLParser::getElement):
2890         * khtml/html/htmltokenizer.h:
2891         (khtml::Token::addAttribute):
2892         * khtml/misc/htmlattrs.c:
2893         (hash_attr):
2894         (findAttr):
2895         * khtml/misc/htmlattrs.h:
2896         * khtml/misc/htmlattrs.in:
2897         * khtml/rendering/render_block.cpp:
2898         (khtml::RenderBlock::setStyle):
2899         (khtml::RenderBlock::updateFirstLetter):
2900         * khtml/rendering/render_container.cpp:
2901         (RenderContainer::addChild):
2902         (RenderContainer::updatePseudoChild):
2903         * khtml/rendering/render_frames.cpp:
2904         (RenderPartObject::updateWidget):
2905         * khtml/rendering/render_inline.cpp:
2906         (RenderInline::addChildToFlow):
2907         * khtml/rendering/render_list.cpp:
2908         (RenderListItem::setStyle):
2909         * khtml/rendering/render_object.cpp:
2910         (RenderObject::~RenderObject):
2911         (RenderObject::createAnonymousBlock):
2912         (RenderObject::setStyle):
2913         (RenderObject::remove):
2914         * khtml/rendering/render_style.cpp:
2915         (throw):
2916         (RenderStyle::operator delete):
2917         (RenderStyle::arenaDelete):
2918         (RenderStyle::RenderStyle):
2919         (RenderStyle::~RenderStyle):
2920         (RenderStyle::addPseudoStyle):
2921         * khtml/rendering/render_style.h:
2922         (khtml::RenderStyle::ref):
2923         (khtml::RenderStyle::deref):
2924         (khtml::RenderStyle::hasOneRef):
2925         (khtml::RenderStyle::refCount):
2926         * khtml/rendering/render_table.cpp:
2927         (RenderTable::addChild):
2928         (RenderTableSection::addChild):
2929         (RenderTableRow::addChild):
2930         * khtml/xml/dom_docimpl.cpp:
2931         (DocumentImpl::DocumentImpl):
2932         (DocumentImpl::createAttribute):
2933         (DocumentImpl::recalcStyle):
2934         * khtml/xml/dom_docimpl.h:
2935         * khtml/xml/dom_elementimpl.cpp:
2936         (AttributeImpl::clone):
2937         (AttrImpl::setValue):
2938         (AttrImpl::cloneNode):
2939         (ElementImpl::setAttribute):
2940         (ElementImpl::createAttribute):
2941         (ElementImpl::setAttributeMap):
2942         (ElementImpl::recalcStyle):
2943         (NamedAttrMapImpl::~NamedAttrMapImpl):
2944         (NamedAttrMapImpl::operator=):
2945         (NamedAttrMapImpl::addAttribute):
2946         (NamedAttrMapImpl::removeAttribute):
2947         * khtml/xml/dom_elementimpl.h:
2948         (DOM::AttributeImpl::~AttributeImpl):
2949         (DOM::ElementImpl::attributeChanged):
2950         (DOM::NamedAttrMapImpl::length):
2951         * khtml/xml/dom_nodeimpl.cpp:
2952
2953 2004-02-09  Darin Adler  <darin@apple.com>
2954
2955         Reviewed by Dave.
2956
2957         * khtml/html/html_formimpl.cpp: (HTMLGenericFormElementImpl::defaultEventHandler):
2958         Removed bogus extra setActive/focus code. Dave says this is no longer needed for
2959         the active state handling, and the focus call caused a problem, although I can't
2960         find the bug report at the moment.
2961
2962 2004-02-08  Darin Adler  <darin@apple.com>
2963
2964         Reviewed by Don.
2965
2966         - fixed an assertion failure when putting up Java applets caused by my last change
2967
2968         * kwq/KWQKJavaAppletWidget.mm: (KJavaAppletWidget::KJavaAppletWidget):
2969         Don't try to get x() and y(). They are always zero because the widget is just being
2970         created at this point and has not yet been positioned; trying to get them
2971         leads to an assertion because there is no NSView until we call setView().
2972         Before my change, there was a KWQView object at 0,0 that was released when we called
2973         setView, which is why the problem is new.
2974
2975 2004-02-08  Darin Adler  <darin@apple.com>
2976
2977         Reviewed by Dave.
2978
2979         - fixed things seen in the profile, for a total speedup of 4% on cvs-base
2980         - fixed some layout regressions from my last speedup due to text measurement inconsistencies
2981
2982         * WebCorePrefix.h: Add a workaround for a bug in our system headers that prevents the <ctype.h>
2983         macros from working right in C++ code that uses the <cctype> header.
2984
2985         * khtml/css/cssstyleselector.cpp:
2986         (khtml::checkPseudoState): Use prepend instead of operator + here. Will probably be obviated if
2987         someone fixes the checkPseudoState problem.
2988         (khtml::colorForCSSValue): Get rid of all the code that uses QPalette; it wasn't doing any good
2989         in Safari. Instead, hardcode the UI colors.
2990
2991         * kwq/KWQChar.mm:
2992         (QChar::isDigitNonASCII): Non-inline part. The ASCII case is handled with an inline now.
2993         (QChar::isLetterNonASCII): Ditto.
2994         (QChar::isNumberNonASCII): Ditto.
2995         (QChar::isLetterOrNumberNonASCII): Ditto.
2996         (QChar::lowerNonASCII): Ditto.
2997         (QChar::upperNonASCII): Ditto.
2998         (QChar::digitValueNonASCII): Ditto.
2999
3000         * kwq/KWQColorGroup.mm: Put all roles base inside #if, since we don't need them, and copying
3001         the color group and palette was making things slow.
3002
3003         * kwq/KWQComboBox.h: Remove KWQComboBoxAdapter, not needed any more.
3004         * kwq/KWQComboBox.mm:
3005         (QComboBox::QComboBox): Remove KWQComboBoxAdapter, not needed any more.
3006         (QComboBox::~QComboBox): Ditto.
3007         (QComboBox::sizeHint): Turn off rounding; we use that in web text, but not in widgets.
3008         (-[KWQPopUpButton action:]): Moved the action method here.
3009
3010         * kwq/KWQLineEdit.mm: (QLineEdit::sizeForCharacterWidth): Turn off rounding. We use it in web
3011         page text, but not in widgets.
3012         * kwq/KWQListBox.mm:
3013         (QListBox::sizeForNumberOfLines): Ditto.
3014         (-[KWQTableView drawRow:clipRect:]): Ditto.
3015
3016         * kwq/KWQKURL.mm:
3017         (KURL::KURL): Added code to put the "file:" in front of a path without making a QString.
3018         (hasSlashDotOrDotDot): Added. Faster than two calls to strstr.
3019         (matchLetter): Added. Faster than tolower calls on each letter.
3020         (KURL::parse): Changed to use matchLetter and hasSlashDotOrDotDot.
3021
3022         * kwq/KWQPalette.h: Remove all roles except base, and all groups except active, since we don't
3023         need them, and copying the color group and palette was making things slow.
3024         * kwq/KWQPalette.mm: Ditto.
3025
3026         * kwq/KWQRegExp.mm: (QRegExp::match): Fixed logic so we don't create and destroy a QCString
3027         in the fast case. Also avoid UTF-8/UTF-16 offset mapping.
3028
3029         * kwq/KWQString.h:
3030         (QChar::isDigit): Add inline section for ASCII.
3031         (QChar::isLetter): Ditto.
3032         (QChar::isNumber): Ditto.
3033         (QChar::isLetterOrNumber): Ditto.
3034         (QChar::digitValue): Ditto.
3035         (QChar::lower): Ditto.
3036         (QChar::upper): Ditto.
3037         (QString::utf8): Add a new version that returns the length; used by QRegExp.
3038         (QString::operator+=): Call a new append function.
3039         * kwq/KWQString.mm:
3040         (ucstrcmp): Made this function inline.
3041         (equal): Added, replacing various strcmp functions.
3042         (equalCaseInsensitive): Ditto.
3043         (ok_in_base): Changed to use <ctype.h> isdigit and isalpha instead of QChar functions.
3044         (QString::detachInternal): Moved up so it will be inlined.
3045         (QString::~QString): Streamlined a little.
3046         (QString::utf8): Changed to return the length.
3047         (QString::find): Use unicode() instead of cell() in various places. Also refined a faster
3048         version of the one that takes a char *.
3049         (QString::contains): Changed all of the overloads to have structure that's more similar,
3050         and made them slightly faster too.
3051         (QString::isAllLatin1): Added.
3052         (QString::copyLatin1): Added. Lets you get the string as a char * buffer without changing
3053         the string itself into that format.
3054         (QString::toLong): Changed to use <ctype.h> isdigit instead of QChar function.
3055         (QString::toULong): Ditto.
3056         (QString::setUnicode): Call the new detachAndDiscardCharacters; not implemented yet.
3057         (QString::setLatin1): Call the new detachAndDiscardCharacters; not implemented yet.
3058         (QString::sprintf): Call the new detachAndDiscardCharacters; not implemented yet.
3059         (QString::insert): Remove one memmove call for the case that appends at the end.
3060         (QString::detach): Change code to use the internal data if we can; saves at destructor time.
3061         (QString::detachAndDiscardCharacters): Added. Placeholder for now that just calls detach().
3062         (QString::setLength): Optimize the setLength(0) case.
3063         (QString::fill): Call the new detachAndDiscardCharacters; not implemented yet.
3064         (QString::append): Renamed from operator+=, which now simply calls append().
3065         (QString::reserve): Added. Useful when building up a string, like in QTextCodec.
3066
3067         * WebCore-tests.exp: Added new function names for QChar.
3068         * WebCore-combined.exp: Updated.
3069
3070         * kwq/KWQTextCodec.mm:
3071         (KWQTextDecoder::convertLatin1): Added. Since this is the most common encoding, and very
3072         easy to decode (built into QString, in fact), best to do it as a special case, not with TEC.
3073         (KWQTextDecoder::convertUTF16): Added a reserve() call for better performance and made the
3074         stack buffer larger.
3075         (KWQTextDecoder::convertUsingTEC): Added a reserve() call for better performance and made the
3076         stack buffer larger.
3077         (KWQTextDecoder::convert): Added a switch statement and convertLatin1 case.
3078
3079         * kwq/KWQView.h: Removed the KWQView class.
3080         * kwq/KWQView.mm: Removed.
3081         * WebCore.pbproj/project.pbxproj: Removed KWQView.mm.
3082
3083         * kwq/KWQWidget.h: Changed name of QWidgetPrivate to KWQWidgetPrivate.
3084         * kwq/KWQWidget.mm:
3085         (QWidget::QWidget): Got rid of code that makes a KWQView when no view is passed in. We were
3086         creating and destroying extra views because of this.
3087         (QWidget::setFrameGeometry): Only call getOuterView() once, not three times. Also, don't do
3088         any work at all if the frame is already correct.
3089         * khtml/khtmlview.cpp: (KHTMLView::init): Removed a call that will hit an assertion due to the
3090         way a new KHTMLView does not yet have an NSView.
3091
3092         * kwq/WebCoreTextRenderer.h: Broke applyRounding into applyRunRounding and applyWordRounding.
3093         * kwq/WebCoreTextRendererFactory.m: (WebCoreInitializeEmptyTextStyle): Initialize both rounding
3094         flags on.
3095
3096 2004-02-07  Darin Adler  <darin@apple.com>
3097
3098         Reviewed by Dave.
3099
3100         - switched KWQComboBox, KWQListBox, and KWQLineEdit to use WebKit text measuring/rendering instead of AppKit
3101         - fixed width calculation for KWQListBox that made them too wide (the computation used the width of standard scroll
3102           bars rather than the small scroll bars they actually use)
3103
3104         Speeds up cvs-base by 5%!
3105
3106         * khtml/rendering/render_form.cpp: (RenderSelect::updateFromElement):
3107         Get rid of beginBatchInsert, and rename endBatchInsert. Use our own "append" calls instead of "insert" calls.
3108
3109         * kwq/KWQComboBox.h: Replace insertItem with appendItem. Add a new populateMenu call (for internal use,
3110         but public). Change width member to be int instead of float. Remove updateCurrentItem(), and add a
3111         menuPopulated boolean and a QStringList containing the items.
3112         * kwq/KWQComboBox.mm:
3113         (QComboBox::QComboBox): Initialize currentItem directly instead of calling updateCurrentItem. Also initialize
3114         menuPopulated to true.
3115         (QComboBox::appendItem): Replaces insertItem. Put items in a string list. Don't keep the menu populated unless
3116         the button is highlighted (which indicates the menu is showing).
3117         (QComboBox::sizeHint): Compute widths using WebCoreTextRenderer, and the string list.
3118         (QComboBox::baselinePosition): Change ceil to ceilf, since we are dealing with floats, not doubles.
3119         (QComboBox::clear): Clear the items list. Also reset the currentItem field directly instead of using updateCurrentItem().
3120         (QComboBox::setCurrentItem): If the menu is not populated, then keep a single item with the appropriate title.
3121         If the menu is populated, then select the appropriate item.
3122         (QComboBox::itemSelected): Moved the logic from updateCurrentItem in here for simplicity.
3123         (QComboBox::focusPolicy): Tweaked the comment.
3124         (QComboBox::populateMenu): Added.
3125         (-[KWQPopUpButtonCell setHighlighted:]): Populate the menu when the cell is highlighted.
3126
3127         * kwq/KWQLineEdit.mm:
3128         (QLineEdit::sizeForCharacterWidth): Put an empty string in the cell, and add in a separately-computed width
3129         for the string.
3130         (QLineEdit::baselinePosition): Use ceilf instead of ceil since we are doing floats, not doubles.
3131
3132         * kwq/KWQListBox.h: Changed the items list from an NSArray to a QValueList.
3133         (KWQListBoxItem::KWQListBoxItem): Added a new class to keep the string and the "is label" boolean.
3134         (QListBox::count): Now inline.
3135         (QListBox::appendItem): Replaced insertItem with this.
3136         (QListBox::appendGroupLabel): Replaced insertGroupLabel with this.
3137         (QListBox::itemAtIndex): Replaced itemIsGroupLabel with this.
3138         * kwq/KWQListBox.mm:
3139         (itemTextRenderer): Replaced itemFont with this, which returns a WebCoreTextRenderer.
3140         (groupLabelTextRenderer): Ditto.
3141         (QListBox::QListBox): Removed the _insertingItems boolean, and handling of the _items list.
3142         (QListBox::~QListBox): Ditto.
3143         (QListBox::clear): Now clears the items list. Doesn't both with reloadData, since doneAppendingItems
3144         handles that.
3145         (QListBox::appendItem): Replaced insertItem. Just adds to the list. No need to construct attributed
3146         strings any more.
3147         (QListBox::doneAppendingItems): Replaced endBatchInsert. No need to clear the obsolete _insertingItems
3148         boolean.
3149         (QListBox::setEnabled): Added a call to reloadData.
3150         (QListBox::sizeForNumberOfLines): Compute widths using WebCoreTextRenderer, and the string list.
3151         Also adjust for the difference in widths between small and default scrollers and add in margins.
3152         (QListBox::setWritingDirection): Remove code that updates the direction in attributed strings.
3153         (-[KWQTableView initWithListBox:]): Compute height from font, not cell.
3154         (-[KWQTableView numberOfRowsInTableView:]): Get count from QListBox instead of items array.
3155         (-[KWQTableView tableView:objectValueForTableColumn:row:]): Return nil becase we don't want to
3156         create an NSString for each cell. We'll draw the appropriate thing.
3157         (-[KWQTableView tableView:shouldSelectRow:]): Update for change to QComboBox function.
3158         (-[KWQTableView drawRow:clipRect:]): Added. Draws the text in the cell, with the appropriate color
3159         and position, using WebCoreTextRenderer for speed.
3160         (-[KWQTableView _accessibilityTableCell:tableColumn:]): Set up cell with a string in this case,
3161         because we need the string to be seen by the accessibilty framework.
3162
3163         * kwq/WebCoreTextRenderer.h: Fixed typo in comment.
3164         * kwq/WebCoreTextRendererFactory.m: Removed bogus inline specifiers.
3165
3166         * khtml/rendering/render_layer.cpp: Fixed a couple of cases of RenderLayer::RenderLayer that just
3167         should have said RenderLayer.
3168
3169 2004-02-07  Darin Adler  <darin@apple.com>
3170
3171         * WebCore.pbproj/project.pbxproj: Get rid of the DEPLOYMENT_LOCATION and DEPLOYMENT_POSTPROCESSING
3172         flags that were in the Deployment build style. These were causing the need to chmod all the time
3173         after building WebCore successfully, and were doing us no good.
3174
3175 2004-02-07  Darin Adler  <darin@apple.com>
3176
3177         * kwq/can-convert.mm: Added test program to see which conversions are actually supported by TEC.
3178
3179 2004-02-06  David Hyatt  <hyatt@apple.com>
3180
3181         Implemented a TokenizerString that can walk a list of substrings, so that data can be enqueued
3182         in the list without having to do a copy.  Speeds up voodooextreme by 20% or so, giving the overall
3183         page-load tests get a 2% boost.
3184         
3185         Reviewed by darin
3186
3187         * WebCore.pbproj/project.pbxproj:
3188         * khtml/html/html_documentimpl.h:
3189         * khtml/html/htmltokenizer.cpp:
3190         (khtml::HTMLTokenizer::begin):
3191         (khtml::HTMLTokenizer::processListing):
3192         (khtml::HTMLTokenizer::parseSpecial):
3193         (khtml::HTMLTokenizer::scriptHandler):
3194         (khtml::HTMLTokenizer::parseComment):
3195         (khtml::HTMLTokenizer::parseServer):
3196         (khtml::HTMLTokenizer::parseProcessingInstruction):
3197         (khtml::HTMLTokenizer::parseText):
3198         (khtml::HTMLTokenizer::parseEntity):
3199         (khtml::HTMLTokenizer::parseTag):
3200         (khtml::HTMLTokenizer::write):
3201         (khtml::HTMLTokenizer::notifyFinished):
3202         (khtml::HTMLTokenizer::setSrc):
3203         (khtml::HTMLTokenizer::setOnHold):
3204         * khtml/html/htmltokenizer.h:
3205         (khtml::Token::Token):
3206         (khtml::Token::~Token):
3207         (khtml::Token::addAttribute):
3208         (khtml::Token::reset):
3209         * khtml/khtml_part.cpp:
3210         (KHTMLPart::handleMousePressEventDoubleClick):
3211         * khtml/khtml_part.h:
3212         * khtml/misc/stringit.cpp: Added.
3213         (khtml::TokenizerString::length):
3214         (khtml::TokenizerString::clear):
3215         (khtml::TokenizerString::append):
3216         (khtml::TokenizerString::prepend):
3217         (khtml::TokenizerString::advanceSubstring):
3218         (khtml::TokenizerString::toString):
3219         * khtml/misc/stringit.h:
3220         (khtml::TokenizerSubstring::TokenizerSubstring):
3221         (khtml::TokenizerSubstring::clear):
3222         (khtml::TokenizerSubstring::appendTo):
3223         (khtml::TokenizerString::TokenizerString):
3224         (khtml::TokenizerString::push):
3225         (khtml::TokenizerString::isEmpty):
3226         (khtml::TokenizerString::advance):
3227         (khtml::TokenizerString::escaped):
3228         (khtml::TokenizerString::lineCount):
3229         (khtml::TokenizerString::resetLineCount):
3230         (khtml::TokenizerString::operator++):
3231         (khtml::TokenizerString::operator*):
3232         (khtml::TokenizerString::operator->):
3233         (khtml::TokenizerString::current):
3234         * khtml/xbl/xbl_docimpl.cpp:
3235         * khtml/xbl/xbl_docimpl.h:
3236         (XBL::):
3237         * khtml/xbl/xbl_tokenizer.h:
3238         (XBL::):
3239         * khtml/xml/dom_docimpl.h:
3240         (DOM::DocumentImpl::tokenizer):
3241         * khtml/xml/xml_tokenizer.cpp:
3242         (khtml::XMLTokenizer::write):
3243         * khtml/xml/xml_tokenizer.h:
3244         * kwq/KWQSignalStubs.mm:
3245         * kwq/KWQValueList.h:
3246         (QValueList::insert):
3247         (QValueList::fromLast):
3248         * kwq/KWQValueListImpl.h:
3249         * kwq/KWQValueListImpl.mm:
3250         (KWQValueListImpl::clear):
3251         (KWQValueListImpl::insert):
3252         (KWQValueListImpl::fromLast):
3253
3254 === Safari-127 ===
3255
3256 2004-02-06  Ken Kocienda  <kocienda@apple.com>
3257
3258         Reviewed by Chris
3259
3260         Steps no longer return int error codes. Steps are operations
3261         that should succeed. (When was the last time that typing in
3262         a text editor failed for reasons which could not have been
3263         figured out ahead of time...like file permissions?).
3264         If this does not work for the future, perhaps we can change 
3265         some or all of the many asserts in the code to throw C++ 
3266         exceptions instead, which can be caught and handled at a
3267         suitable level.
3268
3269         I also made some nice convenience functions to create and apply
3270         EditStep objects, and moved the command code to use the new
3271         functions.
3272
3273         * khtml/editing/htmlediting.cpp:
3274         (EditStep::EditStep):
3275         (EditStep::~EditStep):
3276         (EditStep::reapply):
3277         (EditStep::beginApply):
3278         (EditStep::endApply):
3279         (EditStep::beginUnapply):
3280         (EditStep::endUnapply):
3281         (EditStep::beginReapply):
3282         (EditStep::endReapply):
3283         (CompositeEditStep::unapply):
3284         (CompositeEditStep::reapply):
3285         (CompositeEditStep::applyStep):
3286         (CompositeEditStep::insertNodeBefore):
3287         (CompositeEditStep::insertNodeAfter):
3288         (CompositeEditStep::appendNode):
3289         (CompositeEditStep::removeNode):
3290         (CompositeEditStep::splitTextNode):
3291         (CompositeEditStep::joinTextNodes):
3292         (CompositeEditStep::insertText):
3293         (CompositeEditStep::deleteText):
3294         (CompositeEditStep::moveSelectionTo):
3295         (CompositeEditStep::deleteSelection):
3296         (InsertNodeBeforeStep::InsertNodeBeforeStep):
3297         (InsertNodeBeforeStep::apply):
3298         (InsertNodeBeforeStep::unapply):
3299         (AppendNodeStep::AppendNodeStep):
3300         (AppendNodeStep::apply):
3301         (AppendNodeStep::unapply):
3302         (RemoveNodeStep::RemoveNodeStep):
3303         (RemoveNodeStep::apply):
3304         (RemoveNodeStep::unapply):
3305         (ModifyTextNodeStep::ModifyTextNodeStep):
3306         (ModifyTextNodeStep::splitTextNode):
3307         (ModifyTextNodeStep::joinTextNodes):
3308         (SplitTextNodeStep::apply):
3309         (SplitTextNodeStep::unapply):
3310         (JoinTextNodesStep::apply):
3311         (JoinTextNodesStep::unapply):
3312         (InsertTextStep::InsertTextStep):
3313         (InsertTextStep::apply):
3314         (InsertTextStep::unapply):
3315         (DeleteTextStep::DeleteTextStep):
3316         (DeleteTextStep::apply):
3317         (DeleteTextStep::unapply):
3318         (MoveSelectionToStep::MoveSelectionToStep):
3319         (MoveSelectionToStep::apply):
3320         (MoveSelectionToStep::unapply):
3321         (DeleteSelectionStep::apply):
3322         (EditCommand::EditCommand):
3323         (EditCommand::~EditCommand):
3324         (EditCommand::currentSelection):
3325         (InputTextCommand::apply):
3326         (DeleteTextCommand::apply):
3327         * khtml/editing/htmlediting.h:
3328         (khtml::MoveSelectionToStep::~MoveSelectionToStep):
3329         (khtml::EditCommand::cookie):
3330         * khtml/khtml_part.cpp:
3331         (KHTMLPart::applyCommand):
3332         (KHTMLPart::undoRedoEditing):
3333         (KHTMLPart::undoEditing):
3334         (KHTMLPart::redoEditing):
3335         * khtml/khtml_part.h:
3336         * khtml/xml/dom_elementimpl.cpp:
3337         (ElementImpl::defaultEventHandler):
3338
3339 2004-02-05  Ken Kocienda  <kocienda@apple.com>
3340
3341         Reviewed by Hyatt
3342         
3343         This patch includes two major pieces of work.
3344         
3345         1. The KHTMLSelection object has been reworked to be a value object.
3346         Part-related state has been moved out to KHTMLPart. This change makes
3347         it much easier to program with these objects, since they can now be
3348         treating unambigously like built-in types. As part of this work, I
3349         did a pass over the API and improved some function names. A related
3350         part of work was to clean up the relationship between KHTMLSelection, 
3351         KHTMLPart and DOMDocumentImpl, and cleared up how to change the selection
3352         when that is necessary. (There is now a small set of functions on KHTMLPart). 
3353         
3354         2. Implemented undo/redo, and hooked into the Cocoa undo architecture. The
3355         notion of EditCommands has been enhanced by the addition of EditSteps, which
3356         are primitive operations out of which edit commands are built. Most of the
3357         existing operations have been updated to use this new design. The last couple
3358         will be updated soon, so that all supported editing operations will be undoable.
3359
3360         * khtml/editing/htmlediting.cpp:
3361         * khtml/editing/htmlediting.h:
3362         * khtml/html/html_elementimpl.cpp:
3363         (HTMLElementImpl::isFocusable): Prevents children of content editable parents
3364         from receiving focus.
3365         * khtml/khtml_part.cpp: Modified to work with new KHTMLSelection class design.
3366         Also added some new code to work with new edit command architecture. 
3367         * khtml/khtml_part.h:
3368         * khtml/khtml_selection.cpp: Reworked as a value class. Too much state was
3369         being stored in this object for it to be convenient to use as a value. That
3370         has been fixed.
3371         * khtml/khtml_selection.h:
3372         * khtml/khtmlpart_p.h:
3373         (KHTMLPartPrivate::KHTMLPartPrivate):
3374         (KHTMLPartPrivate::~KHTMLPartPrivate):
3375         * khtml/khtmlview.cpp: Modified to work with new KHTMLSelection class design.
3376         * khtml/rendering/render_block.cpp: Modified to work with new KHTMLSelection class design.
3377         (khtml::RenderBlock::paintObject):
3378         * khtml/xml/dom_docimpl.cpp:
3379         (DocumentImpl::updateSelection):
3380         (DocumentImpl::deleteSelection):
3381         (DocumentImpl::pasteHTMLString):
3382         * khtml/xml/dom_docimpl.h:
3383         * khtml/xml/dom_elementimpl.cpp: 
3384         (ElementImpl::defaultEventHandler): Modified to work with new edit command architecture.
3385         * kwq/KWQKHTMLPart.h:
3386         * kwq/KWQKHTMLPart.mm:
3387         (KWQKHTMLPart::registerCommandForUndo): Added hook to Cocoa undo/redo architecture.
3388         * kwq/WebCoreBridge.h:
3389         * kwq/WebCoreBridge.mm:
3390         (-[WebCoreBridge isSelectionEditable]): Modified to work with new edit command architecture.
3391         (-[WebCoreBridge moveCaretToPoint:]): Ditto
3392         (-[WebCoreBridge haveSelection]): Ditto
3393         (-[WebCoreBridge selectedHTML]): Ditto
3394         (-[WebCoreBridge setSelectionFrom:startOffset:to:endOffset:]): Ditto
3395         (-[WebCoreBridge reconstructedSource]): Ditto
3396         (-[WebCoreBridge undoRedoEditing:]): Added hook to Cocoa undo/redo architecture.
3397
3398 2004-02-04  David Hyatt  <hyatt@apple.com>
3399
3400         Improve rule matching in the style system.  Filter out most rules up front, so that only a small
3401         number of rules need to be walked for any given element.  Yields a ~4-5% improvement on the PLT.
3402         
3403         Reviewed by kocienda
3404
3405         * khtml/css/css_base.cpp:
3406         (StyleBaseImpl::setParsedValue):