Reviewed by Hyatt
[WebKit-https.git] / WebCore / ChangeLog-2005-08-23
1 2004-04-16  Ken Kocienda  <kocienda@apple.com>
2
3         Reviewed by Hyatt
4
5         * khtml/editing/htmlediting_impl.cpp:
6         (DeleteSelectionCommandImpl::containsOnlyWhitespace): New helper.
7         (DeleteSelectionCommandImpl::doApply): Fix deleting collapsed whitespace at the end of a line
8         where text has flowed to the next line and the caret is at the beginning of the next line.
9         * khtml/editing/htmlediting_impl.h: Updated for new helper.
10         * layout-tests/editing/deleting/delete-line-end-ws-001-expected.txt: Added.
11         * layout-tests/editing/deleting/delete-line-end-ws-001.html: Added.
12         * layout-tests/editing/deleting/delete-line-end-ws-002-expected.txt: Added.
13         * layout-tests/editing/deleting/delete-line-end-ws-002.html: Added.
14
15 2004-04-16  Richard Williamson   <rjw@apple.com>
16
17         Added an SPI to allow ObjC instances to be easily bound to 
18         JS.  This is needed by the dashboard guys for their prototyping.
19         Eventually they will use new API.
20
21         Reviewed by Chris.
22
23         * kwq/KWQKHTMLPart.h:
24         * kwq/KWQKHTMLPart.mm:
25         (KWQKHTMLPart::bindObject):
26         * kwq/WebCoreBridge.h:
27         * kwq/WebCoreBridge.mm:
28         (-[WebCoreBridge bindObject:withName:]):
29
30 2004-04-16  Chris Blumenberg  <cblu@apple.com>
31
32         Added DOMHTMLEmbedElement as a DOM extension since EMBED is represented in our DOM even though its not part of the spec.
33         Added all DOMCore and DOMHTML symbols to WebCore's symbols file.
34         Removed isSubresourceURLAttribute from dom node. This was only used for the WebArchive feature and all that work is now done in WebKit.
35
36         Reviewed by kocienda.
37
38         * WebCore-combined.exp:
39         * WebCore.exp:
40         * khtml/html/html_baseimpl.cpp:
41         (HTMLBodyElementImpl::isURLAttribute): renamed from isSubresourceURLAttribute. As a convenience to subclasses, dom_elementimpl would call isSubresourceURLAttribute in isURLAttribute, but this is no longer done
42         (HTMLFrameElementImpl::isURLAttribute): ditto
43         (HTMLIFrameElementImpl::isURLAttribute): ditto
44         * khtml/html/html_baseimpl.h:
45         * khtml/html/html_formimpl.cpp:
46         (HTMLInputElementImpl::isURLAttribute): ditto
47         * khtml/html/html_formimpl.h:
48         * khtml/html/html_headimpl.cpp:
49         (HTMLScriptElementImpl::isURLAttribute): ditto
50         * khtml/html/html_headimpl.h:
51         * khtml/html/html_imageimpl.cpp: 
52         (HTMLImageElementImpl::isURLAttribute): ditto
53         * khtml/html/html_imageimpl.h:
54         * khtml/html/html_objectimpl.cpp:
55         (HTMLEmbedElementImpl::isURLAttribute): ditto
56         (HTMLObjectElementImpl::isURLAttribute): ditto
57         (HTMLParamElementImpl::isURLAttribute): ditto
58         * khtml/html/html_objectimpl.h:
59         * khtml/html/html_tableimpl.cpp:
60         (HTMLTableElementImpl::isURLAttribute): ditto
61         (HTMLTableCellElementImpl::isURLAttribute): ditto
62         * khtml/html/html_tableimpl.h:
63         * khtml/xml/dom2_rangeimpl.cpp:
64         (RangeImpl::toHTMLWithOptions): take a node list (see below)
65         * khtml/xml/dom2_rangeimpl.h:
66         * khtml/xml/dom_elementimpl.cpp:
67         (ElementImpl::isURLAttribute):
68         * khtml/xml/dom_elementimpl.h:
69         * khtml/xml/dom_nodeimpl.cpp:
70         (NodeImpl::recursive_toHTMLWithOptions): append copied nodes to a list of nodes so that WebKit can operate on them
71         * khtml/xml/dom_nodeimpl.h:
72         * kwq/DOM.mm:
73         (+[DOMNode _nodeWithImpl:]): added support for HTML types
74         * kwq/DOMExtensions.h:
75         * kwq/DOMHTML.mm:
76         (-[DOMHTMLPreElement setWidth:]):
77         (-[DOMHTMLEmbedElement _embedElementImpl]):
78         (-[DOMHTMLEmbedElement align]):
79         (-[DOMHTMLEmbedElement setAlign:]):
80         (-[DOMHTMLEmbedElement height]):
81         (-[DOMHTMLEmbedElement setHeight:]):
82         (-[DOMHTMLEmbedElement name]):
83         (-[DOMHTMLEmbedElement setName:]):
84         (-[DOMHTMLEmbedElement src]):
85         (-[DOMHTMLEmbedElement setSrc:]):
86         (-[DOMHTMLEmbedElement type]):
87         (-[DOMHTMLEmbedElement setType:]):
88         (-[DOMHTMLEmbedElement width]):
89         (-[DOMHTMLEmbedElement setWidth:]):
90         (-[DOMHTMLTableElement background]):
91         (-[DOMHTMLTableElement setBackground:]):
92         (-[DOMHTMLTableCellElement background]): new extension 
93         (-[DOMHTMLTableCellElement setBackground:]): ditto
94         * kwq/WebCoreBridge.h:
95         * kwq/WebCoreBridge.mm:
96         (-[WebCoreBridge nodesFromList:]): new
97         (-[WebCoreBridge markupStringFromNode:nodes:]): return a list of nodes instead of subresource URLs so WebKit can operate on the nodes
98         (-[WebCoreBridge markupStringFromRange:nodes:]): ditto
99
100 2004-04-15  David Hyatt  <hyatt@apple.com>
101
102         Fix for 3624335, bugs with overflow and positioned objects.  The scrollbar didn't properly update
103         as you changed the sizes of positioned objects inside an overflow block.
104         
105         Reviewed by rjw
106
107         * khtml/rendering/render_block.cpp:
108         (khtml::RenderBlock::layoutBlock):
109         * khtml/rendering/render_flexbox.cpp:
110         (khtml::RenderFlexibleBox::layoutBlock):
111         * khtml/rendering/render_layer.cpp:
112         (RenderLayer::updateScrollInfoAfterLayout):
113
114 2004-04-15  Ken Kocienda  <kocienda@apple.com>
115
116         Reviewed by Dave
117         
118         Improved selection behavior. As part of this work, I removed
119         almost all of the checkSelectionPoint() functions, leaving
120         only those associated with fonts, and all of the 
121         checkSelectionPointIgnoringContinuations() functions. Each
122         of these has been replaced by a new function called
123         positionForCoordinates(), which returns a DOMPosition.
124         
125         * WebCore.pbproj/project.pbxproj:
126         * khtml/khtml_events.cpp:
127         (khtml::MouseEvent::offset): Converted to use positionForCoordinates.
128         * khtml/khtml_part.cpp: Ditto.
129         (KHTMLPart::isPointInsideSelection):
130         (KHTMLPart::handleMousePressEventDoubleClick): Ditto.
131         (KHTMLPart::handleMousePressEventTripleClick): Ditto.
132         (KHTMLPart::handleMousePressEventSingleClick): Ditto.
133         (KHTMLPart::handleMouseMoveEventSelection): Ditto.
134         (KHTMLPart::khtmlMouseReleaseEvent): Ditto.
135         * khtml/khtml_part.h:
136         * khtml/rendering/render_block.cpp:
137         (khtml::RenderBlock::positionForBox): New helper.
138         (khtml::RenderBlock::positionForRenderer): New helper.
139         (khtml::RenderBlock::positionForCoordinates): New selection-node-offset-finder method.
140         * khtml/rendering/render_block.h:
141         * khtml/rendering/render_br.cpp: Removed checkSelectionPointIgnoringContinuations.
142         No special behavior is needed for this class anymore.
143         * khtml/rendering/render_br.h: Ditoo.
144         * khtml/rendering/render_container.cpp:
145         (RenderContainer::positionForCoordinates): New selection-node-offset-finder method.
146         * khtml/rendering/render_container.h:
147         * khtml/rendering/render_line.cpp:
148         (InlineBox::firstLeafChild): New helper.
149         (InlineBox::lastLeafChild): New helper.
150         (InlineFlowBox::firstLeafChild): New helper.
151         (InlineFlowBox::lastLeafChild): New helper.
152         * khtml/rendering/render_line.h:
153         * khtml/rendering/render_object.cpp:
154         (RenderObject::firstLeafChild): New helper.
155         (RenderObject::lastLeafChild): New helper.
156         (RenderObject::positionForCoordinates):
157         * khtml/rendering/render_object.h:
158         * khtml/rendering/render_replaced.cpp:
159         (RenderReplaced::positionForCoordinates): New selection-node-offset-finder method.
160         * khtml/rendering/render_replaced.h:
161         * khtml/rendering/render_text.cpp:
162         (InlineTextBox::offsetForPosition): New helper, replaces checkSelectionPoint()
163         (RenderText::positionForCoordinates): New selection-node-offset-finder method.
164         * khtml/rendering/render_text.h:
165         * khtml/xml/dom_nodeimpl.cpp: Added positionForCoordinates() convenience here. This
166         checks to see if the node has a renderer before doing the position check.
167         * khtml/xml/dom_nodeimpl.h: Ditto.
168         * kwq/DOM.mm:
169         (-[DOMNode isContentEditable]): Added this unrelated method, since without it, I crash when dragging an image.
170         * kwq/WebCoreBridge.mm:
171         (-[WebCoreBridge moveCaretToPoint:]): Converted to use positionForCoordinates.
172
173 2004-04-15  David Hyatt  <hyatt@apple.com>
174
175         Fix for 3603455, block truncation support.
176         
177         Reviewed by kocienda
178
179         * khtml/css/cssparser.cpp:
180         (CSSParser::parseValue):
181         * khtml/css/cssproperties.c:
182         (hash_prop):
183         (findProp):
184         * khtml/css/cssproperties.h:
185         * khtml/css/cssproperties.in:
186         * khtml/css/cssstyleselector.cpp:
187         (khtml::CSSStyleSelector::applyProperty):
188         * khtml/ecma/kjs_css.cpp:
189         (cssPropertyName):
190         * khtml/rendering/render_block.cpp:
191         (khtml::RenderBlock::lineCount):
192         (khtml::RenderBlock::heightForLineCount):
193         * khtml/rendering/render_block.h:
194         * khtml/rendering/render_flexbox.cpp:
195         (khtml::RenderFlexibleBox::layoutHorizontalBox):
196         (khtml::RenderFlexibleBox::layoutVerticalBox):
197         * khtml/rendering/render_style.cpp:
198         (marquee):
199         (StyleCSS3NonInheritedData::operator==):
200         (RenderStyle::diff):
201         * khtml/rendering/render_style.h:
202         (khtml::RenderStyle::lineClamp):
203         (khtml::RenderStyle::setLineClamp):
204         (khtml::RenderStyle::initialLineClamp):
205
206 2004-04-13  Chris Blumenberg  <cblu@apple.com>
207
208         - Removed WebCoreElementIsEditableKey. This functionality is available via [DOMNode isContentEditable].
209
210         Reviewed by rjw.
211
212         * WebCore-combined.exp:
213         * WebCore.exp:
214         * kwq/WebCoreBridge.h:
215         * kwq/WebCoreBridge.mm:
216         (-[WebCoreBridge elementAtPoint:]): removed use of WebCoreElementIsEditableKey
217         (-[WebCoreBridge URLWithRelativeString:]): new method for WebKit API
218
219 2004-04-13  David Hyatt  <hyatt@apple.com>
220
221         Fix for 3559764, make sure overflow is applied consistently using a separate bit on render objects, so that
222         the body scroll quirk can easily disable overflow even when it is present on the style.
223         
224         Reviewed by kocienda
225
226         * khtml/ecma/kjs_dom.cpp:
227         (DOMNode::putValue):
228         * khtml/rendering/bidi.cpp:
229         (khtml::RenderBlock::layoutInlineChildren):
230         * khtml/rendering/render_block.cpp:
231         (khtml::RenderBlock::setStyle):
232         (khtml::RenderBlock::layoutBlock):
233         (khtml::RenderBlock::layoutBlockChildren):
234         (khtml::RenderBlock::paintObject):
235         (khtml::RenderBlock::rightOffset):
236         (khtml::RenderBlock::lowestPosition):
237         (khtml::RenderBlock::rightmostPosition):
238         (khtml::RenderBlock::leftmostPosition):
239         (khtml::RenderBlock::isPointInScrollbar):
240         (khtml::RenderBlock::nodeAtPoint):
241         (khtml::RenderBlock::inRootBlockContext):
242         * khtml/rendering/render_block.h:
243         (khtml::RenderBlock::overflowHeight):
244         (khtml::RenderBlock::overflowWidth):
245         * khtml/rendering/render_box.cpp:
246         (RenderBox::setStyle):
247         (RenderBox::contentWidth):
248         (RenderBox::contentHeight):
249         (RenderBox::absolutePosition):
250         (RenderBox::computeAbsoluteRepaintRect):
251         (RenderBox::calcAbsoluteVertical):
252         * khtml/rendering/render_flexbox.cpp:
253         (khtml::RenderFlexibleBox::layoutBlock):
254         * khtml/rendering/render_flow.cpp:
255         (RenderFlow::lowestPosition):
256         (RenderFlow::rightmostPosition):
257         (RenderFlow::leftmostPosition):
258         * khtml/rendering/render_layer.cpp:
259         (RenderLayer::updateLayerPosition):
260         (RenderLayer::updateScrollInfoAfterLayout):
261         (RenderLayer::intersectsDamageRect):
262         (RenderLayer::containsPoint):
263         * khtml/rendering/render_object.cpp:
264         (RenderObject::RenderObject):
265         (RenderObject::requiresLayer):
266         (RenderObject::clientWidth):
267         (RenderObject::clientHeight):
268         (RenderObject::scrollWidth):
269         (RenderObject::scrollHeight):
270         (RenderObject::setStyle):
271         (RenderObject::absolutePosition):
272         (RenderObject::nodeAtPoint):
273         (RenderObject::avoidsFloats):
274         * khtml/rendering/render_object.h:
275         (khtml::RenderObject::hasOverflowClip):
276         (khtml::RenderObject::hasAutoScrollbars):
277         (khtml::RenderObject::scrollsOverflow):
278         (khtml::RenderObject::includeScrollbarSize):
279         (khtml::RenderObject::setHasOverflowClip):
280         * khtml/rendering/render_style.h:
281         (khtml::RenderStyle::overflow):
282         (khtml::RenderStyle::isDisplayReplacedType):
283         (khtml::RenderStyle::isDisplayInlineType):
284         * khtml/rendering/render_table.cpp:
285         (RenderTable::setStyle):
286         (RenderTableCell::setStyle):
287         (RenderTableCell::requiresLayer):
288         * khtml/rendering/render_table.h:
289
290 2004-04-12  David Hyatt  <hyatt@apple.com>
291
292         Fix for 3556036, make sure that when the position changes via style that all render layer
293         descendants simply immediately repaint.
294         
295         Reviewed by kocienda
296         
297         * khtml/rendering/render_layer.cpp:
298         (RenderLayer::repaintIncludingDescendants):
299         * khtml/rendering/render_layer.h:
300         * khtml/rendering/render_object.cpp:
301         (RenderObject::setStyle):
302
303 2004-04-12  Chris Blumenberg  <cblu@apple.com>
304
305         - Fixed build failure by removing references to WebArchive in WebCore.
306         - For HTML copy/paste, relative URLs are now made absolute at paste time instead of at copy time. This allows relative URLs to be kept relative if the destination page has the same base URL as the source page.
307
308         Reviewed by kocienda.
309
310         * khtml/editing/htmlediting.cpp:
311         (PasteMarkupCommand::PasteMarkupCommand): take the base URL of the clipping
312         * khtml/editing/htmlediting.h:
313         * khtml/editing/htmlediting_impl.cpp:
314         (PasteMarkupCommandImpl::PasteMarkupCommandImpl): take the base URL of the clipping
315         (PasteMarkupCommandImpl::doApply): if we have a base URL and it is different than the base URL of the document, fix the URLs in the new DOM tree
316         * khtml/editing/htmlediting_impl.h:
317         * khtml/xml/dom2_rangeimpl.cpp:
318         (RangeImpl::toHTMLWithOptions): removed completeURLs param
319         * khtml/xml/dom2_rangeimpl.h:
320         * khtml/xml/dom_nodeimpl.cpp:
321         (NodeImpl::recursive_toHTMLWithOptions): removed completeURLs param
322         (NodeImpl::recursive_toHTML): ditto
323         (NodeImpl::recursive_completeURLs): new
324         * khtml/xml/dom_nodeimpl.h:
325         * kwq/WebCoreBridge.h:
326         * kwq/WebCoreBridge.mm:
327         (-[WebCoreBridge markupStringFromNode:subresourceURLStrings:]): call recursive_toHTML with less params
328         (-[WebCoreBridge markupStringFromRange:subresourceURLStrings:]): ditto
329         (-[WebCoreBridge replaceSelectionWithMarkupString:baseURLString:]): take a base URL
330
331 2004-04-12  Ken Kocienda  <kocienda@apple.com>
332
333         Reviewed by Dave
334
335         Added execCommand support for cut/copy/paste.
336         
337         * khtml/xml/dom_docimpl.cpp:
338         (DocumentImpl::execCommand): Added cut/copy/paste atoms and added else if cases
339         for the commands.
340         * kwq/KWQKHTMLPart.h:
341         * kwq/KWQKHTMLPart.mm:
342         (KWQKHTMLPart::issueCutCommand): Glue for calling from WebCore to do a cut in Cocoa.
343         (KWQKHTMLPart::issueCopyCommand): Same as above, but for copy.
344         (KWQKHTMLPart::issuePasteCommand): Same as above, but for paste.
345         * kwq/WebCoreBridge.h: Declared issueCutCommand, issueCopyCommand, and issuePasteCommand
346         to be implemented on the WebKit side of the bridge.
347         * layout-tests/editing/editing.js: Added cut/copy/paste support to js library to support
348         making layout tests.
349         * layout-tests/editing/pasteboard/copy-paste-text-001-expected.txt: Added.
350         * layout-tests/editing/pasteboard/copy-paste-text-001.html: Added.
351         * layout-tests/editing/pasteboard/cut-paste-text-002-expected.txt: Added.
352         * layout-tests/editing/pasteboard/cut-paste-text-002.html: Added.
353         * layout-tests/editing/pasteboard/cut-text-001-expected.txt: Added.
354         * layout-tests/editing/pasteboard/cut-text-001.html: Added.
355
356 2004-04-12  Ken Kocienda  <kocienda@apple.com>
357
358         Reviewed by John
359         
360         Some delete and insert cleanups.
361
362         * khtml/editing/htmlediting_impl.cpp:
363         (DeleteSelectionCommandImpl::doApply): For ending position case 1,
364         the caret should be placed before the first child of the containing block, 
365         not before the containing block itself. Also, add some code to handle
366         converting nbsp's back to regular spaces. This will need to be improved
367         some day to convert only nbsp's added by the editor to make rendering come out right.
368         (InputTextCommandImpl::execute): 
369         (TypingCommandImpl::issueCommandForDeleteKey): Make deleting collapsible whitespace part 
370         of the work of deleting a selection, rather than something that needs to be done by a 
371         user of DeleteSelectionCommandImpl. This makes it impossible to leave out
372         this essential step.
373         (TypingCommandImpl::deleteKeyPressed): We can't use a possible optimization here until 
374         the code to do deletions properly has been factored better. Big FIXME added.
375         * layout-tests/editing/deleting/delete-block-contents-001-expected.txt: Updated for
376         ending position case 1 behavior change.
377         * layout-tests/editing/deleting/delete-block-contents-002-expected.txt: Ditto. 
378         * layout-tests/editing/deleting/delete-block-contents-003-expected.txt: Ditto.
379
380 2004-04-09  Ken Kocienda  <kocienda@apple.com>
381
382         Reviewed by Darin
383
384         Added support for methods added to flesh out the WebKit 
385         editing API.
386
387         * khtml/khtml_part.h: Removed pasteMarkupString and deleteSelection functions.
388         All this work is now done in WebCoreBridge.
389         * kwq/WebCoreBridge.h:
390         * kwq/WebCoreBridge.mm:
391         (-[WebCoreBridge isSelectionEditable]): Added a FIXME.
392         (-[WebCoreBridge setDrawsBackground:]): Moved this since CVS merged this in the
393         middle of editing code.
394         (-[WebCoreBridge replaceSelectionWithNode:]): New method.
395         (-[WebCoreBridge replaceSelectionWithText:]): Replaces insertText:
396         (-[WebCoreBridge replaceSelectionWithMarkupString:]): New method.
397         (-[WebCoreBridge replaceSelectionWithWebArchive:]): New method.
398         (-[WebCoreBridge replaceSelectionWithNewline]): Replaces insertNewline:
399         (-[WebCoreBridge deleteSelection]): New method.
400         (-[WebCoreBridge applyStyle:toElementsInDOMRange:]): New method.
401
402 2004-04-09  Darin Adler  <darin@apple.com>
403
404         Reviewed by Ken.
405
406         - added "transparent mode"
407
408         * khtml/khtmlview.h: Added isTransparent and setTransparent functions.
409         * khtml/khtmlview.cpp:
410         (KHTMLViewPrivate::KHTMLViewPrivate): Initialize isTransparent to false.
411         (KHTMLView::isTransparent): Return isTransparent.
412         (KHTMLView::setTransparent): Set isTransparent.
413
414         * khtml/rendering/render_box.cpp:
415         (RenderBox::paintRootBoxDecorations): Use slow repaints for the top frame when the view
416         is transparent; also don't draw a background. This is the same thing we do for subframes.
417         (RenderBox::paintBackgroundExtended): Don't do the extra draw so we can blend with the
418         background color for the top frame when the view is transparent.
419         * khtml/rendering/render_canvas.cpp: (RenderCanvas::paintBoxDecorations): More of the same.
420
421         * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::paint): Make "fill with red" debug mode work only
422         when the view is not transparent.
423
424         * kwq/WebCoreBridge.h: Added setDrawsBackground: method.
425         * kwq/WebCoreBridge.mm: (-[WebCoreBridge setDrawsBackground:]): If told NO
426         (don't draw background), then set isTransparent to true on the KHTMLView.
427
428 2004-04-09  Ken Kocienda  <kocienda@apple.com>
429
430         Reviewed by me
431         
432         Added one more layout test for editing.
433
434         * layout-tests/editing/deleting/delete-3608445-fix-expected.txt: Added.
435         * layout-tests/editing/deleting/delete-3608445-fix.html: Added.
436
437 2004-04-08  Maciej Stachowiak  <mjs@apple.com>
438
439         Reviewed by John.
440
441         Changed things so that newly created objects get a prototype based
442         on the scope chain of the current function, rather than the
443         interpreter that started execution. This fixes the following bugs:
444         
445         <rdar://problem/3368523>: ARCH: wrong prototype used to create new objects (hang on lookup.atomica.com)
446         <rdar://problem/3559173>: ARCH: Cannot scan using a HP Jetdirect product (JS object prototypes bind incorrectly)
447
448         * khtml/ecma/kjs_binding.h:
449         (KJS::cacheDOMObject):
450         (KJS::cacheGlobalObject):
451         * khtml/ecma/kjs_css.cpp:
452         (KJS::getDOMStyleSheet):
453         (KJS::getDOMStyleSheetList):
454         (KJS::getDOMCSSValue):
455         * khtml/ecma/kjs_dom.cpp:
456         (KJS::getDOMDocumentNode):
457         (KJS::getDOMNode):
458         * khtml/ecma/kjs_events.cpp:
459         (KJS::getDOMEvent):
460         * khtml/ecma/kjs_html.cpp:
461         (KJS::HTMLDocument::tryGet):
462         (KJS::HTMLDocument::putValue):
463         (KJS::getSelectHTMLCollection):
464         * khtml/ecma/kjs_navigator.cpp:
465         (Navigator::Navigator):
466         (PluginBase::PluginBase):
467         * khtml/ecma/kjs_window.cpp:
468         (KJS::History::History):
469         (KJS::FrameArray::FrameArray):
470         (Screen::Screen):
471         (Window::retrieveActive):
472         (Window::put):
473         (Window::isSafeScript):
474         (WindowFunc::tryCall):
475         (Location::put):
476         (LocationFunc::tryCall):
477
478 2004-04-09  David Hyatt  <hyatt@apple.com>
479
480         Fix for 3613081, repaint glitches when using overflow:auto/overlay.
481         
482         Reviewed by john
483
484         * khtml/rendering/render_layer.cpp:
485         (RenderLayer::updateScrollInfoAfterLayout):
486
487 2004-04-09  David Hyatt  <hyatt@apple.com>
488
489         Fix for 3608445, garbage characters rendered after doing delete.  Delta was unsigned when it was supposed to
490         be signed, since deletion involves a negative delta.  Also had an off-by-one error in the line break end check.
491         
492         Reviewed by john
493
494         * khtml/rendering/render_text.cpp:
495         (RenderText::setTextWithOffset):
496
497 2004-04-09  Ken Kocienda  <kocienda@apple.com>
498
499         Reviewed by me
500         
501         Added two more layout tests for editing.
502
503         * layout-tests/editing/selection/move-between-blocks-no-001-expected.txt: Added.
504         * layout-tests/editing/selection/move-between-blocks-no-001.html: Added.
505         * layout-tests/editing/selection/move-between-blocks-yes-001-expected.txt: Added.
506         * layout-tests/editing/selection/move-between-blocks-yes-001.html: Added.
507
508 2004-04-09  Ken Kocienda  <kocienda@apple.com>
509
510         Reviewed by Dave
511         
512         Small collection of editing improvements.
513
514         * ChangeLog:
515         * khtml/editing/htmlediting_impl.cpp:
516         (shouldDeleteUpstreamPosition): This was deleting significant spaces on preceding
517         lines when the caret was at the start of a line. Fixed. 
518         (DeleteSelectionCommandImpl::doApply): Fixed a case where caret jumped to previous
519         line when deleting a character at the start of a line after a BR.
520         (InputNewlineCommandImpl::doApply): Handle more cases correctly. Previously, this
521         only handled inserting a newline when the caret was already in a text node.
522         (InputTextCommandImpl::prepareForTextInsertion): Ditto.
523         (InputTextCommandImpl::execute): Ditto.
524         * khtml/editing/htmlediting_impl.h:
525         * khtml/rendering/render_block.cpp:
526         (khtml::RenderBlock::checkSelectionPointIgnoringContinuations): Now can place caret
527         with a click in an empty block.
528         * khtml/rendering/render_block.h: Added checkSelectionPointIgnoringContinuations declaration.
529         * khtml/rendering/render_replaced.cpp: 
530         (RenderReplaced::checkSelectionPointIgnoringContinuations): Now can place caret with a click 
531         on a replaced element.
532         * khtml/rendering/render_replaced.h: Added checkSelectionPointIgnoringContinuations declaration.
533         * khtml/rendering/render_text.cpp:
534         (InlineTextBox::checkSelectionPoint): Now can place caret with a click in text on a line made "tall"
535         by an image on the same line.
536         * khtml/xml/dom_docimpl.cpp:
537         (DocumentImpl::createEditingTextNode): This creates a text node subclass that whill always create
538         a renderer for itself.
539         * khtml/xml/dom_docimpl.h:
540         * khtml/xml/dom_position.cpp:
541         (DOMPosition::isLastRenderedPositionInEditableBlock): Improved code to handle more cases.
542         * khtml/xml/dom_textimpl.cpp:
543         (TextImpl::TextImpl): Rolled out m_rendererIsNeeded flag.
544         (TextImpl::rendererIsNeeded): Ditto.
545         (EditingTextImpl::EditingTextImpl): New class.
546         (EditingTextImpl::~EditingTextImpl): New.
547         (EditingTextImpl::rendererIsNeeded): New. Always returns true.
548         * khtml/xml/dom_textimpl.h: New EditingTextImpl class.
549         * layout-tests/editing/deleting/delete-3608430-fix-expected.txt: Added.
550         * layout-tests/editing/deleting/delete-3608430-fix.html: Added.
551         * layout-tests/editing/deleting/delete-3608462-fix-expected.txt: Added.
552         * layout-tests/editing/deleting/delete-3608462-fix.html: Added.
553         * layout-tests/editing/deleting/delete-trailing-ws-002-expected.txt: Added.
554         * layout-tests/editing/deleting/delete-trailing-ws-002.html: Added.
555
556 2004-04-08  Chris Blumenberg  <cblu@apple.com>
557
558         Renamed the PasteHTMLCommand to PasteMarkupCommand. Removed PasteImageCommand because we will use PasteMarkupCommand for pasting images.
559
560         Reviewed by kocienda.
561
562         * ChangeLog:
563         * khtml/editing/htmlediting.cpp:
564         (PasteMarkupCommand::PasteMarkupCommand):
565         (PasteMarkupCommand::~PasteMarkupCommand):
566         (PasteMarkupCommand::impl):
567         (PasteMarkupCommand::markupString):
568         * khtml/editing/htmlediting.h:
569         (khtml::):
570         * khtml/editing/htmlediting_impl.cpp:
571         (PasteMarkupCommandImpl::PasteMarkupCommandImpl):
572         (PasteMarkupCommandImpl::~PasteMarkupCommandImpl):
573         (PasteMarkupCommandImpl::commandID):
574         (PasteMarkupCommandImpl::doApply):
575         * khtml/editing/htmlediting_impl.h:
576         (khtml::PasteMarkupCommandImpl::markupString):
577         * khtml/khtml_part.cpp:
578         (KHTMLPart::pasteMarkupString):
579         * khtml/khtml_part.h:
580         * kwq/WebCoreBridge.h:
581         * kwq/WebCoreBridge.mm:
582         (-[WebCoreBridge pasteMarkupString:]):
583
584
585 2004-04-08  David Hyatt  <hyatt@apple.com>
586
587         Fix for 3608430 and 3608462, crashes in findNextLineBreak when deleting.  Make sure that the removal of line boxes
588         always checks the previous root line box's line break information and dirties the line if it is pointing
589         to the deleted object.
590         
591         Reviewed by kocienda
592
593         * khtml/rendering/render_line.cpp:
594         (InlineFlowBox::removeChild):
595
596 2004-04-08  Chris Blumenberg  <cblu@apple.com>
597
598         Removed DOMExtensions.h from DOM.h until it is public.
599
600         Reviewed by koicienda.
601
602         * kwq/DOM.h:
603
604 2004-04-07  Chris Blumenberg  <cblu@apple.com>
605
606         WebCore side for supporting WebDOMOperations.   
607
608         Reviewed by rjw.
609
610         * WebCore-combined.exp:
611         * WebCore.exp:
612         * kwq/DOM.mm:
613         * kwq/DOMExtensions.h:
614         * kwq/WebCoreBridge.h:
615         * kwq/WebCoreBridge.mm:
616         (+[WebCoreBridge bridgeForDOMDocument:]): new
617         (-[WebCoreBridge imageForImageElement:]): new
618
619 2004-04-07  Darin Adler  <darin@apple.com>
620
621         Reviewed by Chris.
622
623         * kwq/DOMCSS.h: Changed DOMCSS2Properties to be a category on DOMCSSStyleDeclaration
624         (after API review, oops!, but I doubt anyone will even notice).
625         * kwq/DOM-CSS.mm: Implemented the entire DOMCSS2Properties category.
626
627 2004-04-07  Ken Kocienda  <kocienda@apple.com>
628
629         Reviewed by Chris
630
631         * kwq/WebCoreBridge.mm:
632         (-[WebCoreBridge _stringWithDocumentTypeStringAndMarkupString:]): Do not add a newline in between
633         the doctype and the content. The newline was showing up when the content was pasted.
634
635 2004-04-07  Ken Kocienda  <kocienda@apple.com>
636
637         Reviewed by John
638
639         Removed concept of currentSelection from EditCommands and refined concept of
640         startingSelection and endingSelection, making them work more sensibly in the 
641         system of composed editing commands.
642
643         * khtml/editing/htmlediting.cpp: Removed currentSelection().
644         * khtml/editing/htmlediting.h: Ditto.
645         * khtml/editing/htmlediting_impl.cpp: currentSelection().
646         (CompositeEditCommandImpl::applyCommandToComposite): Set the startingSelection 
647         and endingSelection for the command being applied to the endingSelection of
648         its new parent. This is the proper starting and ending point.
649         (CompositeEditCommandImpl::deleteSelection): Changed call to currentSelection
650         to endingSelection.
651         (DeleteCollapsibleWhitespaceCommandImpl::DeleteCollapsibleWhitespaceCommandImpl): Ditto.
652         (DeleteSelectionCommandImpl::DeleteSelectionCommandImpl): Changed call from startingSelection
653         to endingSelection.
654         (DeleteSelectionCommandImpl::joinTextNodesWithSameStyle): Changed call to currentSelection
655         to endingSelection.
656         (InputNewlineCommandImpl::doApply): Ditto.
657         (InputTextCommandImpl::deleteCharacter): Ditto.
658         (InputTextCommandImpl::prepareForTextInsertion): Ditto.
659         (InputTextCommandImpl::execute): Ditto.
660         (PasteHTMLCommandImpl::doApply): Ditto.
661         (TypingCommandImpl::insertText): Remove extraneous call to reset endingSelection. This has
662         already been done by the helpers this command uses to do its work.
663         (TypingCommandImpl::issueCommandForDeleteKey): Changed call to currentSelection
664         to endingSelection.
665         (TypingCommandImpl::deleteKeyPressed): Remove extraneous call to reset endingSelection. This has
666         already been done by the helpers this command uses to do its work.
667         * khtml/editing/htmlediting_impl.h:
668         (khtml::EditCommandImpl::endingSelection): Remove extraneous call to reset endingSelection. This has
669         already been done by the helpers this command uses to do its work.
670
671 2004-04-07  Ken Kocienda  <kocienda@apple.com>
672
673         Reviewed by John
674         
675         Make paste work again. It has been broken for some undetermined
676         period of time.
677
678         * khtml/editing/htmlediting_impl.cpp:
679         (CompositeEditCommandImpl::insertNodeAt): Handle inserting a node when
680         the reference node has children, or is an empty block.
681         (CompositeEditCommandImpl::inputText): New convenience to create and
682         apply an InputTextCommand.
683         (InputTextCommandImpl::execute): Collapse whitespace when selection is
684         not a range. Deleting the selection when it is a range already does that, 
685         so no need to make special accommodation for it.
686         (PasteHTMLCommandImpl::PasteHTMLCommandImpl): Initialize m_HTMLString using 
687         an initialization list.
688         (PasteHTMLCommandImpl::doApply): Collapse whitespace.... as above for 
689         InputTextCommandImpl::execute. Don't need to qualify NodeImpl's with DOM 
690         namespace. Clean up selection access; no need to grep around for it, the
691         desired selection is returned by calling currentSelection(). Treat "simple
692         text paste" like typing. Tighten up and simplify HTML fragment paste; no
693         real change in algorithm. 
694         (SplitTextNodeCommandImpl::SplitTextNodeCommandImpl): m_text1 member variable
695         not initialized. This bug was introduced by a recent change by me. Fixing now.
696         * khtml/editing/htmlediting_impl.h: Add inputText() declaration.
697
698 2004-04-06  Ken Kocienda  <kocienda@apple.com>
699
700         Reviewed by Richard
701
702         * khtml/khtml_part.cpp:
703         (KHTMLPart::setSelection): Now calls setFocusNodeIfNeeded.
704         (KHTMLPart::takeSelectionFrom): Now calls setFocusNodeIfNeeded.
705         (KHTMLPart::clearSelection): Now calls setFocusNodeIfNeeded.
706         (KHTMLPart::invalidateSelection): Now calls setFocusNodeIfNeeded.
707         (KHTMLPart::setSelectionVisible): Now calls setFocusNodeIfNeeded.
708         (KHTMLPart::setFocusNodeIfNeeded): New function focuses first element 
709         of a selection that is contenteditable, if any of the nodes are. The "first"
710         determination is made by doing a document-order search.
711         * khtml/khtml_part.h:
712         * khtml/xml/dom_nodeimpl.cpp: Remove debug spam.
713         * kwq/WebCoreBridge.mm:
714         (-[WebCoreBridge setSelectedDOMRange:]): Now updates document layout before
715         setting the selection. This was needed for Blot, so that setting the 
716         contenteditable attribute on the body is "seen" when the attempt is made
717         to set the selection right immediately after.
718
719 2004-04-06  David Hyatt  <hyatt@apple.com>
720
721         After columns have been expanded to their preferred sizes, if space is left over in the table, then
722         fixed columns should expand to fill space before percentage width columns do.  The old code had it
723         backwards.
724         
725         Reviewed by john
726
727         * khtml/rendering/table_layout.cpp:
728         (AutoTableLayout::layout):
729
730 2004-04-06  Ken Kocienda  <kocienda@apple.com>
731
732         Reviewed by Dave
733
734         * khtml/dom/dom_node.cpp:
735         (Node::isContentEditable): Added. Calls through to impl function of same name.
736         * khtml/dom/dom_node.h: Added isContentEditable declaration.
737         * khtml/khtmlview.cpp:
738         (KHTMLView::viewportMouseMoveEvent): Now, the cursor will change
739         to an i-beam whenever it is over a node that is contenteditable, and nothing, 
740         like a link, takes precedence.
741
742 2004-04-06  Ken Kocienda  <kocienda@apple.com>
743
744         Reviewed by Dave
745
746         * khtml/css/html4.css: Refine focus rules so that HTML and BODY
747         elements do not draw a focus ring around themselves when focused.
748         This prevents a silly-looking focus ring from drawing around a 
749         document's entire contents when a body element is contenteditable.
750
751 2004-04-06  Ken Kocienda  <kocienda@apple.com>
752
753         Reviewed by Dave
754
755         Caret height is now the height of the tallest element on the line,
756         mimicking NSText behavior.
757
758         * khtml/rendering/render_box.cpp:
759         (RenderBox::caretPos): Use root line box topOverflow and bottomOverflow 
760         for the calculation of caret height.
761         * khtml/rendering/render_text.cpp:
762         (RenderText::caretPos): Ditto.
763
764 2004-04-06  Ken Kocienda  <kocienda@apple.com>
765
766         Reviewed by me
767
768         Added a new suite of layout tests for editing, all added
769         in the new layout-tests/editing subtree.
770
771         * layout-tests/editing/abe.jpg: Added.
772         * layout-tests/editing/deleting/delete-block-contents-001-expected.txt: Added.
773         * layout-tests/editing/deleting/delete-block-contents-001.html: Added.
774         * layout-tests/editing/deleting/delete-block-contents-002-expected.txt: Added.
775         * layout-tests/editing/deleting/delete-block-contents-002.html: Added.
776         * layout-tests/editing/deleting/delete-block-contents-003-expected.txt: Added.
777         * layout-tests/editing/deleting/delete-block-contents-003.html: Added.
778         * layout-tests/editing/deleting/delete-br-001-expected.txt: Added.
779         * layout-tests/editing/deleting/delete-br-001.html: Added.
780         * layout-tests/editing/deleting/delete-br-002-expected.txt: Added.
781         * layout-tests/editing/deleting/delete-br-002.html: Added.
782         * layout-tests/editing/deleting/delete-br-003-expected.txt: Added.
783         * layout-tests/editing/deleting/delete-br-003.html: Added.
784         * layout-tests/editing/deleting/delete-br-004-expected.txt: Added.
785         * layout-tests/editing/deleting/delete-br-004.html: Added.
786         * layout-tests/editing/deleting/delete-br-005-expected.txt: Added.
787         * layout-tests/editing/deleting/delete-br-005.html: Added.
788         * layout-tests/editing/deleting/delete-br-006-expected.txt: Added.
789         * layout-tests/editing/deleting/delete-br-006.html: Added.
790         * layout-tests/editing/deleting/delete-character-001-expected.txt: Added.
791         * layout-tests/editing/deleting/delete-character-001.html: Added.
792         * layout-tests/editing/deleting/delete-contiguous-ws-001-expected.txt: Added.
793         * layout-tests/editing/deleting/delete-contiguous-ws-001.html: Added.
794         * layout-tests/editing/deleting/delete-image-001-expected.txt: Added.
795         * layout-tests/editing/deleting/delete-image-001.html: Added.
796         * layout-tests/editing/deleting/delete-image-002-expected.txt: Added.
797         * layout-tests/editing/deleting/delete-image-002.html: Added.
798         * layout-tests/editing/deleting/delete-image-003-expected.txt: Added.
799         * layout-tests/editing/deleting/delete-image-003.html: Added.
800         * layout-tests/editing/deleting/delete-leading-ws-001-expected.txt: Added.
801         * layout-tests/editing/deleting/delete-leading-ws-001.html: Added.
802         * layout-tests/editing/deleting/delete-selection-001-expected.txt: Added.
803         * layout-tests/editing/deleting/delete-selection-001.html: Added.
804         * layout-tests/editing/deleting/delete-trailing-ws-001-expected.txt: Added.
805         * layout-tests/editing/deleting/delete-trailing-ws-001.html: Added.
806         * layout-tests/editing/editing.js: Added.
807         * layout-tests/editing/inserting/typing-001-expected.txt: Added.
808         * layout-tests/editing/inserting/typing-001.html: Added.
809         * layout-tests/editing/inserting/typing-002-expected.txt: Added.
810         * layout-tests/editing/inserting/typing-002.html: Added.
811         * layout-tests/editing/inserting/typing-around-br-001-expected.txt: Added.
812         * layout-tests/editing/inserting/typing-around-br-001.html: Added.
813         * layout-tests/editing/inserting/typing-around-image-001-expected.txt: Added.
814         * layout-tests/editing/inserting/typing-around-image-001.html: Added.
815         * layout-tests/editing/selection/extend-by-character-001-expected.txt: Added.
816         * layout-tests/editing/selection/extend-by-character-001.html: Added.
817         * layout-tests/editing/selection/extend-by-character-002-expected.txt: Added.
818         * layout-tests/editing/selection/extend-by-character-002.html: Added.
819         * layout-tests/editing/selection/extend-by-character-003-expected.txt: Added.
820         * layout-tests/editing/selection/extend-by-character-003.html: Added.
821         * layout-tests/editing/selection/extend-by-character-004-expected.txt: Added.
822         * layout-tests/editing/selection/extend-by-character-004.html: Added.
823         * layout-tests/editing/selection/extend-by-character-005-expected.txt: Added.
824         * layout-tests/editing/selection/extend-by-character-005.html: Added.
825         * layout-tests/editing/selection/move-by-character-001-expected.txt: Added.
826         * layout-tests/editing/selection/move-by-character-001.html: Added.
827         * layout-tests/editing/selection/move-by-character-002-expected.txt: Added.
828         * layout-tests/editing/selection/move-by-character-002.html: Added.
829         * layout-tests/editing/selection/move-by-character-003-expected.txt: Added.
830         * layout-tests/editing/selection/move-by-character-003.html: Added.
831         * layout-tests/editing/selection/move-by-character-004-expected.txt: Added.
832         * layout-tests/editing/selection/move-by-character-004.html: Added.
833         * layout-tests/editing/selection/move-by-character-005-expected.txt: Added.
834         * layout-tests/editing/selection/move-by-character-005.html: Added.
835         * layout-tests/editing/undo/redo-typing-001-expected.txt: Added.
836         * layout-tests/editing/undo/redo-typing-001.html: Added.
837         * layout-tests/editing/undo/undo-typing-001-expected.txt: Added.
838         * layout-tests/editing/undo/undo-typing-001.html: Added.
839
840 2004-04-06  Ken Kocienda  <kocienda@apple.com>
841
842         Reviewed by Dave
843
844         Added execCommand feature. 
845         Added Javascript selection object.
846         This lays the groundwork for layout tests for editing.
847
848         * khtml/dom/dom_doc.cpp:
849         (DOM::Document::execCommand): Added. Calls through to impl's execCommand.
850         * khtml/dom/dom_doc.h: Added execCommand declaration.
851         * khtml/ecma/kjs_dom.cpp:
852         (DOMDocumentProtoFunc::tryCall): Switch on new ExecCommand constant and call through to the document.
853         * khtml/ecma/kjs_dom.h: Added ExecCommand constant.
854         (KJS::DOMDocument::):
855         * khtml/ecma/kjs_dom.lut.h: Generated file.
856         * khtml/ecma/kjs_window.cpp:
857         (Window::Window): Initialize selection object.
858         (Window::selection): Return window's selection object.
859         (Window::mark): Mark selection object.
860         (WindowFunc::tryCall): Return selection object on GetSelection.
861         (LocationFunc::tryCall): Added.
862         (Selection::Selection): Added.
863         (Selection::~Selection): Added.
864         (Selection::get): Added.
865         (Selection::put): Added.
866         (Selection::toPrimitive): Added.
867         (Selection::toString): Added.
868         (SelectionFunc::tryCall): Added.
869         * khtml/ecma/kjs_window.h:
870         (KJS::Selection::): Added.
871         (KJS::Selection::part): Added.
872         (KJS::Selection::classInfo): Added.
873         * khtml/ecma/kjs_window.lut.h: Generated file.
874         * khtml/editing/htmlediting_impl.cpp:
875         (debugPosition): Debugging aid.
876         (DeleteCollapsibleWhitespaceCommandImpl::deleteWhitespace): Move the ending position
877         if you are about to delete it. Fixes a crasher I discovered while writing tests.
878         (DeleteSelectionCommandImpl::doApply): Move to containing editable block position 0
879         instead of 1 in a block in delete case 1.
880         (InputTextCommandImpl::prepareForTextInsertion):
881         (TypingCommandImpl::issueCommandForDeleteKey):
882         * khtml/khtml_part.h:
883         * khtml/khtml_selection.cpp:
884         (KHTMLSelection::validate): Now adjusts the selection down to leaf nodes if needed.
885         (KHTMLSelection::debugPosition): Debugging aid.
886         * khtml/xml/dom_docimpl.cpp:
887         (DocumentImpl::execCommand): Added. Supports five different commands.
888         * khtml/xml/dom_docimpl.h:
889         * khtml/xml/dom_nodeimpl.cpp:
890         (NodeImpl::previousEditable): Use false instead of 0 for equality check.
891         (NodeImpl::nextEditable): Ditto.
892         * khtml/xml/dom_position.cpp:
893         (DOMPosition::equivalentLeafPosition): New function
894         (DOMPosition::previousRenderedEditablePosition): New function
895         (DOMPosition::nextRenderedEditablePosition): New function
896         (DOMPosition::equivalentUpstreamPosition): Refined behavior to handle more cases correctly.
897         (DOMPosition::equivalentDownstreamPosition): Ditto.
898         (DOMPosition::atStartOfContainingEditableBlock):New function
899         (DOMPosition::atStartOfRootEditableBlock):New function
900         * khtml/xml/dom_position.h:
901         * kwq/KWQKHTMLPart.h:
902         * kwq/KWQKHTMLPart.mm:
903         (KWQKHTMLPart::issueUndoCommand): New function for calling undo programatically.
904         (KWQKHTMLPart::issueRedoCommand): Ditto, but for redo.
905         * kwq/KWQRenderTreeDebug.cpp:
906         (nodePositionRelativeToRoot): New function to generate log information for the selection.
907         (writeSelection): Writes the selection if there is one.
908         (externalRepresentation): Calls writeSelection
909         * kwq/WebCoreBridge.h: New declarations for issueUndoCommand and issueRedoCommand.
910
911 2004-04-05  Darin Adler  <darin@apple.com>
912
913         * khtml/html/kentities.gperf: Added &COPY; and &REG;, both supported by Gecko
914         (and presumably by WinIE). Also re-sorted the list.
915         * khtml/html/kentities.c: Regenerated.
916
917 2004-04-05  Darin Adler  <darin@apple.com>
918
919         Reviewed by Dave.
920
921         - rolled over fix from KHTML tree; anchor inside another anchor
922
923         * khtml/rendering/render_layer.cpp: (RenderLayer::nodeAtPoint):
924         Make sure the URL element is the innermost one, by not setting it once
925         it's already set.
926
927 2004-04-05  David Hyatt  <hyatt@apple.com>
928
929         Implement overflow: overlay so that a scrollbar can show/hide without causing a layout.
930         
931         Reviewed by darin
932
933         * ChangeLog:
934         * khtml/css/css_computedstyle.cpp:
935         (DOM::CSSComputedStyleDeclarationImpl::getPropertyCSSValue):
936         * khtml/css/cssparser.cpp:
937         (CSSParser::parseValue):
938         * khtml/css/cssstyleselector.cpp:
939         (khtml::CSSStyleSelector::applyProperty):
940         * khtml/css/cssvalues.c:
941         (hash_val):
942         (findValue):
943         * khtml/css/cssvalues.h:
944         * khtml/css/cssvalues.in:
945         * khtml/rendering/render_block.cpp:
946         (khtml::RenderBlock::layoutBlock):
947         (khtml::RenderBlock::layoutBlockChildren):
948         (khtml::RenderBlock::rightOffset):
949         * khtml/rendering/render_box.cpp:
950         (RenderBox::contentWidth):
951         (RenderBox::contentHeight):
952         * khtml/rendering/render_layer.cpp:
953         (RenderLayer::updateScrollInfoAfterLayout):
954         * khtml/rendering/render_object.cpp:
955         (RenderObject::clientWidth):
956         (RenderObject::clientHeight):
957         * khtml/rendering/render_style.h:
958         (khtml::):
959         (khtml::RenderStyle::hasAutoScrollbars):
960         (khtml::RenderStyle::scrollsOverflow):
961         (khtml::RenderStyle::includeScrollbarSize):
962
963 2004-04-03  David Hyatt  <hyatt@apple.com>
964
965         Implementation of <input type=range>, which makes sliders available in Web pages.
966         
967         Reviewed by john
968
969         * WebCore.pbproj/project.pbxproj:
970         * khtml/ecma/kjs_dom.cpp:
971         (DOMNode::getValueProperty):
972         (DOMNode::putValue):
973         * khtml/ecma/kjs_dom.h:
974         (KJS::DOMNode::):
975         * khtml/ecma/kjs_dom.lut.h:
976         (KJS::):
977         * khtml/html/html_formimpl.cpp:
978         (HTMLInputElementImpl::setType):
979         (HTMLInputElementImpl::type):
980         (HTMLInputElementImpl::click):
981         (HTMLInputElementImpl::accessKeyAction):
982         (HTMLInputElementImpl::parseHTMLAttribute):
983         (HTMLInputElementImpl::rendererIsNeeded):
984         (HTMLInputElementImpl::createRenderer):
985         (HTMLInputElementImpl::encoding):
986         * khtml/html/html_formimpl.h:
987         (DOM::HTMLInputElementImpl::):
988         * khtml/misc/htmlattrs.c:
989         (hash_attr):
990         (findAttr):
991         * khtml/misc/htmlattrs.h:
992         * khtml/misc/htmlattrs.in:
993         * khtml/rendering/render_form.cpp:
994         (RenderLineEdit::slotTextChanged):
995         (:RenderFormElement):
996         (RenderSlider::calcMinMaxWidth):
997         (RenderSlider::updateFromElement):
998         (RenderSlider::slotSliderValueChanged):
999         * khtml/rendering/render_form.h:
1000         (khtml::RenderSlider::element):
1001         (khtml::RenderSlider::renderName):
1002         (khtml::RenderSlider::canHaveIntrinsicMargins):
1003         * khtml/xml/dom2_eventsimpl.cpp:
1004         (EventImpl::typeToId):
1005         (EventImpl::idToType):
1006         * khtml/xml/dom2_eventsimpl.h:
1007         (DOM::EventImpl::):
1008         * kwq/KWQSlider.h: Added.
1009         * kwq/KWQSlider.mm: Added.
1010         (-[KWQSlider initWithQSlider:]):
1011         (-[KWQSlider slide:]):
1012         (m_val):
1013         (QSlider::setFont):
1014         (QSlider::sizeHint):
1015         (QSlider::setValue):
1016         (QSlider::setMinValue):
1017         (QSlider::setMaxValue):
1018         (QSlider::value):
1019         (QSlider::minValue):
1020         (QSlider::maxValue):
1021         (QSlider::sliderValueChanged):
1022         (QSlider::dimensions):
1023         * kwq/KWQSlot.mm:
1024         (KWQSlot::KWQSlot):
1025         (KWQSlot::call):
1026
1027 2004-04-05  Chris Blumenberg  <cblu@apple.com>
1028
1029         Fixed: <rdar://problem/3612580>: SPI: WebPlugin selection
1030
1031         Reviewed by kocienda.
1032
1033         * WebCore.pbproj/project.pbxproj:
1034         * khtml/rendering/render_replaced.cpp:
1035         (RenderWidget::setSelectionState): new override, calls QWidget::setIsSelected
1036         * khtml/rendering/render_replaced.h:
1037         (khtml::RenderWidget::selectionState): new override
1038         * kwq/KWQWidget.h:
1039         * kwq/KWQWidget.mm:
1040         (QWidget::setIsSelected): new, calls [WebCoreBridge setIsSelected:forView:]
1041         (QWidget::isSelected): new, calls [WebCoreBridge isViewSelected:]
1042         * kwq/WebCoreBridge.h:
1043         * kwq/WebCoreBridge.mm:
1044         (-[WebCoreBridge selectionColor]): new
1045
1046 2004-04-03  David Hyatt  <hyatt@apple.com>
1047
1048         Fix for 3601728, text overlaps borders at ejai.org.  Remove all the code in addForbidden for
1049         dir, menu, nobr, and pre that made them too restrictive regarding what child tags they could
1050         contain.
1051         
1052         Reviewed by kocienda
1053
1054         * khtml/html/dtd.cpp:
1055         (DOM::addForbidden):
1056         (DOM::removeForbidden):
1057
1058 2004-04-02  Chris Blumenberg  <cblu@apple.com>
1059
1060         Moved the DOM extensions to their own headers
1061
1062         Reviewed by kocienda.
1063
1064         * WebCore.pbproj/project.pbxproj:
1065         * kwq/DOM.h: include DOMExtensions.h
1066         * kwq/DOMExtensions.h: Added.
1067         * kwq/DOMHTML.h: moved extensions to DOMExtensions.h
1068         * kwq/DOMHTML.mm: Renamed to match header
1069
1070 2004-04-02  David Hyatt  <hyatt@apple.com>
1071
1072         Fix for 3610662, rendering sometimes doesn't update in response to mouse events that change style.
1073         The document changed list was getting messed up.
1074         
1075         Reviewed by darin
1076
1077         * khtml/xml/dom_docimpl.cpp:
1078         (DocumentImpl::updateDocumentsRendering):
1079         * khtml/xml/dom_docimpl.h:
1080
1081 === Safari-135 ===
1082
1083 2004-04-01  Darin Adler  <darin@apple.com>
1084
1085         Based on a fix by Eric Albert.
1086
1087         - fixed <rdar://problem/3594247>: Safari crashes when a background image has a height or width of 0
1088
1089         * khtml/rendering/render_box.cpp: (RenderBox::paintBackgroundExtended):
1090         Change code path so we don't mod with 0.
1091
1092 2004-04-01  Darin Adler  <darin@apple.com>
1093
1094         Reviewed by Dave.
1095
1096         - fixed <rdar://problem/3608305>: DEMO: menu in search field has one disabled item: localized string not found
1097
1098         * khtml/html/html_formimpl.cpp: (HTMLInputElementImpl::HTMLInputElementImpl):
1099         Initialize m_maxResults to 0.
1100
1101 2004-04-01  Darin Adler  <darin@apple.com>
1102
1103         Reviewed by John.
1104
1105         - cleaned up image map code and made it work with XML documents
1106
1107         * khtml/html/html_documentimpl.h: Removed getMap and mapMap.
1108         * khtml/html/html_documentimpl.cpp: Removed getMap; moved to base class.
1109
1110         * khtml/html/html_imageimpl.cpp:
1111         (HTMLMapElementImpl::~HTMLMapElementImpl): Call new removeImageMap function instead
1112         of manipulating the mapMap field directly.
1113         (HTMLMapElementImpl::parseHTMLAttribute): Rewrite name changing code for simplicity
1114         and to avoid running off the end of the bufffer.
1115         Also remove image map before changing name so it doesn't end up in the map twice
1116         under both the old and new names.
1117         * khtml/html/html_imageimpl.h: Use a DOMString instead of QString for the name, since
1118         the public API already uses a DOMString.
1119
1120         * khtml/rendering/render_image.cpp: (RenderImage::nodeAtPoint): Call the new
1121         getImageMap instead of the old getMap.
1122
1123         * khtml/xml/dom_docimpl.h: Added addImageMap, removeImageMap, getImageMap, and m_imageMapsByName.
1124         * khtml/xml/dom_docimpl.cpp:
1125         (DocumentImpl::addImageMap): Added. Stores the image map under its name, unless there's
1126         already another map of the same.
1127         (DocumentImpl::removeImageMap): Added. Removes the image map if it's already filed by
1128         name. Avoid pitfall of removing another image map that has the same name.
1129         (DocumentImpl::getImageMap): Added. Simplified version of logic from getMap in HTMLDocumentImpl.
1130
1131 2004-04-01  Darin Adler  <darin@apple.com>
1132
1133         Reviewed by Ken.
1134
1135         - fixed <rdar://problem/3608978>: dual <map> means you can't select the enter site button at jurassicpark.com (same problem in MacIE, works in Netscape)
1136
1137         * khtml/html/html_imageimpl.cpp: (HTMLMapElementImpl::parseHTMLAttribute):
1138         Make the first <map> seen win, as in other browsers. The old code made the last <map> seen win.
1139
1140 2004-04-01  Ken Kocienda  <kocienda@apple.com>
1141
1142         Reviewed by me
1143         
1144         Missing file broke build after my last checkin
1145
1146         * ForwardingHeaders/rendering/render_line.h: Added.
1147
1148 2004-03-31  Ken Kocienda  <kocienda@apple.com>
1149
1150         Reviewed by Dave.
1151         
1152         Many, many editing improvements, with a concentration on getting
1153         caret navigation and deleting selections working correctly.
1154
1155         * WebCore.pbproj/project.pbxproj:
1156         * khtml/dom/dom_position.cpp: Removed.
1157         * khtml/dom/dom_position.h: Removed.
1158         * khtml/editing/htmlediting.cpp:
1159         (EditCommand::isNull): Inlined.
1160         (EditCommand::notNull): New function.
1161         (EditCommand::parent): Commands now have parents. Allows for walking the tree of composite commands.
1162         (EditCommand::setParent): Ditto.
1163         (EditCommand::emptyCommand): Returns a static empty command.
1164         (AppendNodeCommand::AppendNodeCommand): 
1165         (AppendNodeCommand::parentNode): Member variable name change only. parent -> parentNode.
1166         (DeleteCollapsibleWhitespaceCommand::DeleteCollapsibleWhitespaceCommand): New command.
1167         (InputTextCommand::InputTextCommand):
1168         (InputTextCommand::input):
1169         (InputTextCommand::charactersAdded):
1170         (JoinTextNodesCommand::JoinTextNodesCommand): Now derives directly from EditCommand.
1171         (RemoveNodeAndPruneCommand::RemoveNodeAndPruneCommand): New command.
1172         (SplitTextNodeCommand::SplitTextNodeCommand): Now derives directly from EditCommand.
1173         * khtml/editing/htmlediting.h:
1174         * khtml/editing/htmlediting_impl.cpp:
1175         (isNBSP): New helper.
1176         (isWS): New helper.
1177         (shouldPruneNode): New helper.
1178         (leadingWhitespacePosition): New helper.
1179         (trailingWhitespacePosition): New helper.
1180         (textNodesAreJoinable): New helper.
1181         (nonBreakingSpaceString): Returns a static DOMString containing a non-breaking space.
1182         (EditCommandImpl::EditCommandImpl):
1183         (EditCommandImpl::setStartingSelection): Now recursively sets starting selection on parents.
1184         (EditCommandImpl::setEndingSelection): As above, for ending selection.
1185         (EditCommandImpl::parent): New accessor.
1186         (EditCommandImpl::setParent): New accessor.
1187         (CompositeEditCommandImpl::doUnapply): Removed some logging.
1188         (CompositeEditCommandImpl::doReapply): Removed some logging.
1189         (CompositeEditCommandImpl::applyCommandToComposite): Sets parent.
1190         (CompositeEditCommandImpl::removeNodeAndPrune): New comvenience.
1191         (CompositeEditCommandImpl::replaceText): New comvenience.
1192         (CompositeEditCommandImpl::deleteSelection): New comvenience.
1193         (CompositeEditCommandImpl::deleteCollapsibleWhitespace): New comvenience.
1194         (AppendNodeCommandImpl::AppendNodeCommandImpl): Member variable name change only. parent -> parentNode.
1195         (AppendNodeCommandImpl::~AppendNodeCommandImpl): Ditto.
1196         (AppendNodeCommandImpl::doApply): Ditto.
1197         (AppendNodeCommandImpl::doUnapply): Ditto.
1198         (DeleteCollapsibleWhitespaceCommandImpl::DeleteCollapsibleWhitespaceCommandImpl): New command
1199         (debugPosition): New debugging aid.
1200         (DeleteSelectionCommandImpl::doApply): Major reworking to handle more cases correctly.
1201         (InputNewlineCommandImpl::doApply): Position and selection tweaks.
1202         (InputTextCommandImpl::InputTextCommandImpl): Handles more cases now, like typing after an image.
1203         (JoinTextNodesCommandImpl::JoinTextNodesCommandImpl): Now derives directly from EditCommand.
1204         Implements the guts of the command itself now, rather than replying on its former base class.
1205         (RemoveNodeAndPruneCommandImpl::RemoveNodeAndPruneCommandImpl): New command.
1206         (SplitTextNodeCommandImpl::SplitTextNodeCommandImpl): Now derives directly from EditCommand.
1207         Implements the guts of the command itself now, rather than replying on its former base class.
1208         (TypingCommandImpl::TypingCommandImpl): Major rework to handle more cases correctly.
1209         * khtml/editing/htmlediting_impl.h:
1210         * khtml/html/html_elementimpl.cpp:
1211         (HTMLElementImpl::isContentEditable): More efficient use of the style system to answer the question.
1212         * khtml/khtml_part.cpp:
1213         (KHTMLPart::setSelection): Fixes an issue where the caret would not repaint after being moved when undoing.
1214         (KHTMLPart::takeSelectionFrom): Ditto.
1215         (KHTMLPart::clearSelection): Ditto.
1216         (KHTMLPart::invalidateSelection): Ditto.
1217         (KHTMLPart::setSelectionVisible): Ditto.
1218         (KHTMLPart::slotClearSelection): Ditto.
1219         (KHTMLPart::clearCaretRectIfNeeded):  Ditto.
1220         (KHTMLPart::notifySelectionChanged): Ditto.
1221         (KHTMLPart::unappliedEditing): Now uses EditCommand::emptyCommand().
1222         (KHTMLPart::reappliedEditing): Ditto.
1223         * khtml/khtml_part.h:
1224         * khtml/khtml_selection.cpp:
1225         (KHTMLSelection::KHTMLSelection):
1226         (KHTMLSelection::modify): Updated to work with new DOMPosition API.
1227         (KHTMLSelection::paintCaret): Ditto.
1228         (KHTMLSelection::moveToRenderedContent): Ditto.
1229         (KHTMLSelection::basePosition): New convenience.
1230         (KHTMLSelection::extentPosition): New convenience.
1231         (KHTMLSelection::startPosition): New convenience.
1232         (KHTMLSelection::endPosition): New convenience.
1233         (KHTMLSelection::debugPosition): Modified debug output.
1234         * khtml/khtml_selection.h:
1235         (KHTMLSelection::isEmpty):
1236         (KHTMLSelection::notEmpty):
1237         * khtml/rendering/bidi.cpp:
1238         (khtml::RenderBlock::layoutInlineChildren): Fixed a crasher that happened when deleting content at the start of a line.
1239         * khtml/rendering/render_br.cpp:
1240         (RenderBR::caretMaxRenderedOffset): New function.
1241         (RenderBR::caretPos): Now draws the caret in the right place when a block is empty.
1242         * khtml/rendering/render_br.h:
1243         * khtml/rendering/render_flow.cpp:
1244         (RenderFlow::caretPos): Now draws the caret in the right place when a flow is empty.
1245         * khtml/rendering/render_line.cpp:
1246         (InlineBox::caretMaxRenderedOffset): New function.
1247         * khtml/rendering/render_line.h:
1248         * khtml/rendering/render_object.cpp:
1249         (RenderObject::isEditable):
1250         (RenderObject::caretMaxRenderedOffset): New function.
1251         * khtml/rendering/render_object.h:
1252         * khtml/rendering/render_replaced.cpp:
1253         (RenderReplaced::caretMaxRenderedOffset): New function.
1254         * khtml/rendering/render_replaced.h:
1255         * khtml/rendering/render_text.cpp:
1256         (InlineTextBox::caretMaxRenderedOffset): New function.
1257         (RenderText::detach):
1258         (RenderText::caretMaxOffset):
1259         (RenderText::caretMaxRenderedOffset): New function.
1260         * khtml/rendering/render_text.h:
1261         (khtml::InlineTextBox::len):
1262         * khtml/xml/dom_edititerator.cpp: Added.
1263         * khtml/xml/dom_edititerator.h: Added.
1264         * khtml/xml/dom_nodeimpl.cpp:
1265         (NodeImpl::previousEditable): Improved the correctness of this function.
1266         (NodeImpl::nextEditable): Ditto.
1267         * khtml/xml/dom_nodeimpl.h:
1268         * khtml/xml/dom_position.cpp: Added.
1269         (DOMPosition::renderedOffset): New function.
1270         (DOMPosition::previousCharacterPosition): New function.
1271         (DOMPosition::nextCharacterPosition): New function.
1272         (DOMPosition::equivalentUpstreamPosition): New function.
1273         (DOMPosition::equivalentDownstreamPosition): New function.
1274         (DOMPosition::validUpstreamDownstreamPosition): New function.
1275         (DOMPosition::inRenderedContent): New function.
1276         (inlineBoxForRenderer): New function.
1277         (renderersOnDifferentLine): New function.
1278         (nextRenderedEditable): New function.
1279         (previousRenderedEditable): New function.
1280         (DOMPosition::inRenderedText): New function.
1281         (DOMPosition::rendersOnSameLine): New function.
1282         (DOMPosition::rendersInDifferentPosition): New function.
1283         (DOMPosition::isFirstRenderedPositionOnLine): New function.
1284         (DOMPosition::isLastRenderedPositionOnLine): New function.
1285         (DOMPosition::isLastRenderedPositionInEditableBlock): New function.
1286         (DOMPosition::inFirstEditableInRootEditableBlock): New function.
1287         (DOMPosition::inLastEditableInRootEditableBlock): New function.
1288         (DOMPosition::inFirstEditableInContainingEditableBlock): New function.
1289         (DOMPosition::inLastEditableInContainingEditableBlock): New function.
1290         * khtml/xml/dom_position.h: Added.
1291         (DOM::DOMPosition::notEmpty): New function.
1292         * khtml/xml/dom_stringimpl.cpp:
1293         (DOM::DOMStringImpl::containsOnlyWhitespace): Added a version which takes an offset and length.
1294         * khtml/xml/dom_stringimpl.h:
1295         * khtml/xml/dom_textimpl.cpp:
1296         (CharacterDataImpl::containsOnlyWhitespace): As above
1297         (CharacterDataImpl::maxOffset): New function.
1298         (CharacterDataImpl::caretMaxRenderedOffset): New function.
1299         (TextImpl::TextImpl):
1300         (TextImpl::rendererIsNeeded): A new bit. When set, makes a text renderer unconditionally.
1301         * khtml/xml/dom_textimpl.h:
1302         (DOM::TextImpl::setRendererIsNeeded): Sets the bit.
1303         * kwq/KWQAssertions.m:
1304         (KWQLog): Change to decrease the amount of output for the Editing log level. (my preference)
1305
1306 2004-03-31  David Hyatt  <hyatt@apple.com>
1307
1308         Fix for 3601834, make sure that textareas do a layout when their rows/cols/wrap attributes are dynamically
1309         changed.
1310         
1311         Reviewed by darin.
1312
1313         * khtml/html/html_formimpl.cpp:
1314         (HTMLTextAreaElementImpl::parseHTMLAttribute):
1315
1316 2004-03-30  David Hyatt  <hyatt@apple.com>
1317
1318         Fix for 3604241, simple space collapsing results in a doubled character.  Simplify the ignoring of
1319         whitespace and make sure it works across absolutely positioned spans.
1320         
1321         Reviewed by darin
1322
1323         * khtml/rendering/bidi.cpp:
1324         (khtml::RenderBlock::findNextLineBreak):
1325
1326 2004-03-30  Darin Adler  <darin@apple.com>
1327
1328         Reviewed by Dave.
1329
1330         - fixed <rdar://problem/3570877>: REGRESSION: onfocus handler not working at weather.com
1331
1332         * khtml/ecma/kjs_binding.cpp:
1333         (UString::string): Turn a null UString into a null DOMString, but a non-null empty UString into a
1334         non-null empty DOMString.
1335         (UString::qstring): Ditto, for QString.
1336         (Identifier::string): Ditto, for Identifier.
1337         (Identifier::qstring): Ditto.
1338
1339         * kwq/KWQLineEdit.h: Override focusPolicy.
1340         * kwq/KWQLineEdit.mm: (QLineEdit::focusPolicy): Return StrongFocus instead of TabFocus, since
1341         we allow clicking to focus on these widgets.
1342         * kwq/KWQTextEdit.h: More of the same.
1343         * kwq/KWQTextEdit.mm: (QTextEdit::focusPolicy): And still more.
1344
1345         - fixed <rdar://problem/3605919>: text fields in web pages are too tall
1346
1347         * kwq/KWQTextField.mm:
1348         (-[KWQTextFieldCell _typesetterBehavior]): Ignore the per-application typesetter setting and
1349         instead always use the latest behavior for text fields in web pages.
1350         (-[KWQSecureTextFieldCell _typesetterBehavior]): Ditto.
1351         (-[KWQSearchFieldCell _typesetterBehavior]): Ditto.
1352
1353         - additional cleanup
1354
1355         * khtml/html/html_formimpl.cpp:
1356         (HTMLGenericFormElementImpl::isKeyboardFocusable): Check tab focus bit instead of different modes.
1357         (HTMLGenericFormElementImpl::isMouseFocusable): Check click focus bit instead of different modes.
1358
1359 2004-03-30  David Hyatt  <hyatt@apple.com>
1360
1361         Fix for 3603326, spurious line breaks in encyclopedia articles.  Make sure makeChildrenNonInline knows to
1362         skip over floating/positioned elements so that they remain part of contiguous inline runs for static positioning
1363         purposes.
1364         
1365         Reviewed by darin
1366
1367         * khtml/rendering/render_block.cpp:
1368         (khtml::getInlineRun):
1369
1370 2004-03-30  Darin Adler  <darin@apple.com>
1371
1372         Reviewed by Ken.
1373
1374         - fixed garbage characters seen while I was rigging up the Mozilla JavaScript tests
1375
1376         * kwq/KWQString.h: Add a "move constructor" for KWQStringData that extracts the data
1377         from an existing KWQStringData.
1378         * kwq/KWQString.mm:
1379         (KWQStringData::KWQStringData): Implement the move constructor.
1380         (QString::detachInternal): Use the move constructor rather than making a copy of the
1381         data. Should be both more efficient and preserves both the Unicode and the ASCII. The
1382         bug here is that TokenizerSubstring relies on the Unicode staying around. We still
1383         have a problem in the case where the Unicode is inside the KWQStringData. To deal with
1384         that we'll have to add a new QString call that TokenizerSubstring can use. The new call
1385         will force QString to keep the Unicode outside the internal KWQStringData.
1386
1387 2004-03-30  Darin Adler  <darin@apple.com>
1388
1389         Reviewed by Ken.
1390
1391         - fixed <rdar://problem/3606146>: repro nil-deref in QWidget::move (www.stoltoffshore.com)
1392
1393         * khtml/khtml_part.cpp:
1394         (KHTMLPart::requestObject): Add check for NULL widget.
1395         (KHTMLPart::processObjectRequest): Add check for NULL widget.
1396
1397 2004-03-29  David Hyatt  <hyatt@apple.com>
1398
1399         Make sure "auto" is allowed as a valid value when parsing rect shapes (e.g., for the clip property).
1400         
1401         Reviewed by rjw
1402
1403         * khtml/css/cssparser.cpp:
1404         (CSSParser::parseShape):
1405
1406 2004-03-29  David Hyatt  <hyatt@apple.com>
1407
1408         Followup fix.  Handle the case where a hard line break occurs right after a soft hyphen.  In this
1409         case we were losing a letter of the word in addition to not rendering the soft hyphen.
1410         
1411         Reviewed by kocienda
1412
1413         * khtml/rendering/bidi.cpp:
1414         (khtml::checkMidpoints):
1415
1416 2004-03-29  David Hyatt  <hyatt@apple.com>
1417
1418         Fix for 3604154, support soft hyphens when rendering.  This patch implements soft hyphen support that
1419         matches IE6 on Windows and Opera 7.  Soft hyphens that don't break lines end up getting collapsed away.
1420         Only if the hyphen breaks a line does it render.
1421         
1422         Reviewed by kocienda
1423
1424         * khtml/rendering/bidi.cpp:
1425         (khtml::chopMidpointsAt):
1426         (khtml::appendRunsForObject):
1427         (khtml::RenderBlock::findNextLineBreak):
1428         * khtml/rendering/render_text.cpp:
1429         (RenderText::calcMinMaxWidth):
1430
1431 2004-03-29  John Sullivan  <sullivan@apple.com>
1432
1433         Made menu shortcuts work again when editing HTML
1434
1435         Reviewed by Darin.
1436
1437         * khtml/xml/dom_elementimpl.cpp:
1438         (ElementImpl::defaultEventHandler):
1439         Don't treat key events with command key down as
1440         editing events.
1441
1442 2004-03-28  Darin Adler  <darin@apple.com>
1443
1444         Reviewed by John.
1445
1446         - fixed <rdar://problem/3602202>: "feed:uuid:...." links in Emerson content are being changed into "feed:uuuid:...."
1447
1448         * kwq/KWQKURL.mm: (copyPathRemovingDots): Add special case for empty path. The old code had an
1449         assertion that explicitly allowed this case, but it copied a character from the src buffer,
1450         which was incorrect.
1451
1452 2004-03-26  David Hyatt  <hyatt@apple.com>
1453
1454         Fix for 3600642, letter magnet demo doesn't update until mouse move.  This patch also fixes problems
1455         with the animated text Gecko DOM demos on developer.netscape.com.  Make sure that timer callbacks via
1456         setTimeout always updateRendering after executing the JS code.
1457         
1458         Reviewed by darin
1459
1460         * khtml/ecma/kjs_window.cpp:
1461         (ScheduledAction::execute):
1462
1463 === Safari-134 ===
1464
1465 2004-03-25  David Hyatt  <hyatt@apple.com>
1466
1467         Implement the rest of the search field.  Make it work with form submission.  Implement onscroll at
1468         the document level.
1469         
1470         Reviewed by darin
1471
1472         * khtml/html/html_formimpl.cpp:
1473         (HTMLFormElementImpl::submit):
1474         * khtml/rendering/render_form.cpp:
1475         (RenderLineEdit::addSearchResult):
1476         * khtml/rendering/render_form.h:
1477         * kwq/KWQKHTMLPart.h:
1478         * kwq/KWQKHTMLPart.mm:
1479         (KWQKHTMLPart::sendScrollEvent):
1480         * kwq/KWQLineEdit.h:
1481         * kwq/KWQLineEdit.mm:
1482         (QLineEdit::setMaxResults):
1483         (QLineEdit::setPlaceholderString):
1484         (QLineEdit::addSearchResult):
1485         * kwq/WebCoreBridge.h:
1486         * kwq/WebCoreBridge.mm:
1487         (-[WebCoreBridge sendScrollEvent]):
1488         * kwq/WebCoreViewFactory.h:
1489
1490 2004-03-25  David Hyatt  <hyatt@apple.com>
1491
1492         Fix for 3570700, crash in inlineBox::isDirty.  Make sure line boxes null out parent pointers when those
1493         parents get deleted.  r=john
1494
1495         Fix for .value not being settable on selects.  r=darin
1496         
1497         * khtml/html/html_formimpl.cpp:
1498         (HTMLSelectElementImpl::setValue):
1499         * khtml/rendering/render_block.cpp:
1500         (khtml::RenderBlock::removeChildrenFromLineBoxes):
1501         (khtml::RenderBlock::removeChild):
1502         * khtml/rendering/render_block.h:
1503         * khtml/rendering/render_line.cpp:
1504         (InlineFlowBox::removeChild):
1505         
1506 2004-03-25  Darin Adler  <darin@apple.com>
1507
1508         Fix by Kristin Webster, reviewed by me.
1509
1510         - fixed <rdar://problem/3582431>: HiDPI - Form elements not working when scaling factor != 1.0
1511
1512         * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::passWidgetMouseDownEventToWidget): Pass nil for fromView
1513         rather than passing the top level view.
1514
1515 2004-03-24  Darin Adler  <darin@apple.com>
1516
1517         Reviewed by John.
1518
1519         - fixed <rdar://problem/3566805>: REGRESSION: When the subject of mailto is 2 byte Safari failed to send mail address and subject to Mail.app
1520
1521         * kwq/KWQKURL.mm: (KURL::findHostnamesInMailToURL): Update to handle hostnames that end just before
1522         a '?' since a '?' ends the entire part of the URL that can contain hostnames. Also change the logic so
1523         that the '?' will successfully end the search.
1524
1525 2004-03-24  Darin Adler  <darin@apple.com>
1526
1527         Reviewed by John.
1528
1529         - fixed <rdar://problem/3599650>: main image missing due to incorrect relative URL resolution at www.brother.com
1530
1531         * kwq/KWQKURL.mm: (KURL::KURL): Implement compatibility rule from the URI RFC.
1532         If a URL has a scheme, but does not start with the "/" character, and the scheme
1533         matches the base URL, then treat it as a relative URL.
1534
1535 2004-03-24  Ken Kocienda  <kocienda@apple.com>
1536
1537         Reviewed by me.
1538
1539         I neglected to check in these required changes when I landed previously.
1540         This is what I get for trying to commit when I had other changes in
1541         my tree.
1542
1543         * khtml/dom/html_form.cpp:
1544         (HTMLSelectElement::add): Uses new-style call.
1545         * khtml/html/html_formimpl.cpp:
1546         (HTMLSelectElementImpl::add): Change the interface for this call to use
1547         impl objects instead of API objects. This works around the fact that the
1548         API object's constructor that takes an impl is protected.
1549         * khtml/html/html_formimpl.h: Uses new-style call.
1550
1551 2004-03-24  Ken Kocienda <kocienda@apple.com>
1552
1553         Implemented the remainder of the HTML DOM API.
1554     
1555         Reviewed by Chris.
1556     
1557         * kwq/DOMHTML.h
1558         * kwq/HTMLDOM.mm
1559
1560 2004-03-23  David Hyatt  <hyatt@apple.com>
1561
1562         Fix for 3487207, implement onscroll DOM event for elements with overflow:auto/scroll/hidden.  This does
1563         not handle firing onscroll on the window when the document scrolls, nor does it handle firing onscroll
1564         on textareas.  These are two separate bugs.
1565
1566         This patch finishes stubbing out the onscroll event and adds support for it to the DOM.  It also supports
1567         the firing of the event when overflow blocks scroll.
1568         
1569         Reviewed by darin
1570
1571         * khtml/ecma/kjs_dom.cpp:
1572         (DOMNode::getValueProperty):
1573         (DOMNode::putValue):
1574         * khtml/ecma/kjs_dom.h:
1575         (KJS::DOMNode::):
1576         * khtml/ecma/kjs_dom.lut.h:
1577         (KJS::):
1578         * khtml/ecma/kjs_window.cpp:
1579         (Window::get):
1580         (Window::put):
1581         * khtml/ecma/kjs_window.h:
1582         (KJS::Window::):
1583         * khtml/ecma/kjs_window.lut.h:
1584         (KJS::):
1585         * khtml/html/html_baseimpl.cpp:
1586         (HTMLBodyElementImpl::parseHTMLAttribute):
1587         * khtml/html/html_elementimpl.cpp:
1588         (HTMLElementImpl::parseHTMLAttribute):
1589         * khtml/misc/htmlattrs.c:
1590         (hash_attr):
1591         (findAttr):
1592         * khtml/misc/htmlattrs.h:
1593         * khtml/misc/htmlattrs.in:
1594         * khtml/rendering/render_layer.cpp:
1595         (RenderLayer::scrollToOffset):
1596
1597 2004-03-23  David Hyatt  <hyatt@apple.com>
1598
1599         Fix for 3513627, HTML mail prints upside down occasionally.  Change printing so that it never resizes the
1600         WebHTMLView when formatting for printing.  When computing page rects, instead of using the view's bounds,
1601         use the root layer's width instead.
1602
1603         Reviewed by darin
1604
1605         * khtml/khtmlview.cpp:
1606         (KHTMLView::layout):
1607         * kwq/WebCoreBridge.h:
1608         * kwq/WebCoreBridge.mm:
1609         (-[WebCoreBridge computePageRectsWithPrintWidthScaleFactor:printHeight:]):
1610
1611 2004-03-23  David Hyatt  <hyatt@apple.com>
1612
1613         Fix for crasher 3598204, previousKeyView was calling nextKeyView instead.
1614         
1615         Reviewed by darin
1616
1617         * kwq/KWQTextField.mm:
1618         (-[KWQTextField previousKeyView]):
1619         (-[KWQSecureTextField previousKeyView]):
1620         (-[KWQSearchField previousKeyView]):
1621
1622 2004-03-23  Darin Adler  <darin@apple.com>
1623
1624         Reviewed by Vicki.
1625
1626         - fixed deployment build
1627
1628 2004-03-22  David Hyatt  <hyatt@apple.com>
1629
1630         Wire up NSSearchField to WebCore.  Add support for placeholder strings, autosaving of recent items, the ability to show/hide
1631         the magnifying glass search button, the ability to specify the maximum number of results, the ability to specify an incremental
1632         search or not, etc.  Added a DOM event that fires when the search field indicates that search results should be updated.
1633         
1634         Reviewed by darin
1635
1636         * khtml/ecma/kjs_dom.cpp:
1637         (DOMNode::getValueProperty):
1638         (DOMNode::putValue):
1639         * khtml/ecma/kjs_dom.h:
1640         (KJS::DOMNode::):
1641         * khtml/ecma/kjs_dom.lut.h:
1642         (KJS::):
1643         * khtml/ecma/kjs_window.cpp:
1644         (Window::get):
1645         (Window::put):
1646         * khtml/ecma/kjs_window.h:
1647         (KJS::Window::):
1648         * khtml/ecma/kjs_window.lut.h:
1649         (KJS::):
1650         * khtml/html/html_formimpl.cpp:
1651         (HTMLInputElementImpl::parseHTMLAttribute):
1652         * khtml/html/html_formimpl.h:
1653         (DOM::HTMLInputElementImpl::maxResults):
1654         * khtml/misc/htmlattrs.c:
1655         (hash_attr):
1656         (findAttr):
1657         * khtml/misc/htmlattrs.h:
1658         * khtml/misc/htmlattrs.in:
1659         * khtml/rendering/render_form.cpp:
1660         (RenderLineEdit::RenderLineEdit):
1661         (RenderLineEdit::slotPerformSearch):
1662         (RenderLineEdit::updateFromElement):
1663         * khtml/rendering/render_form.h:
1664         * khtml/xml/dom2_eventsimpl.cpp:
1665         (EventImpl::typeToId):
1666         (EventImpl::idToType):
1667         * khtml/xml/dom2_eventsimpl.h:
1668         (DOM::EventImpl::):
1669         * kwq/KWQLineEdit.h:
1670         (QLineEdit::performSearch):
1671         (QLineEdit::type):
1672         * kwq/KWQLineEdit.mm:
1673         (QLineEdit::QLineEdit):
1674         (QLineEdit::setLiveSearch):
1675         (QLineEdit::setAutoSaveName):
1676         (QLineEdit::setMaxResults):
1677         (QLineEdit::setPlaceholderString):
1678         * kwq/KWQSlot.mm:
1679         (KWQSlot::KWQSlot):
1680         (KWQSlot::call):
1681         * kwq/KWQTextField.mm:
1682         (-[KWQTextFieldController initWithTextField:QLineEdit:]):
1683         (-[KWQTextFieldController invalidate]):
1684         (-[KWQTextFieldController action:]):
1685         (-[KWQTextFieldController controlTextDidBeginEditing:]):
1686         (-[KWQTextFieldController controlTextDidEndEditing:]):
1687         (-[KWQTextFieldController controlTextDidChange:]):
1688         (-[KWQTextFieldController control:textShouldBeginEditing:]):
1689         (-[KWQTextFieldController control:textShouldEndEditing:]):
1690         (-[KWQTextFieldController control:didFailToFormatString:errorDescription:]):
1691         (-[KWQTextFieldController control:didFailToValidatePartialString:errorDescription:]):
1692         (-[KWQTextFieldController control:isValidObject:]):
1693         (-[KWQTextFieldController control:textView:doCommandBySelector:]):
1694         (-[KWQTextFieldController textChanged]):
1695
1696 2004-03-22  David Hyatt  <hyatt@apple.com>
1697
1698         Factoring of form control code to enable sharing between three types of text fields: normal, password, and
1699         the new search field.  Also made search field creatable using <input type="search">.  There are still many
1700         bugs with the field, but you can at least type in it and submit it with a form.
1701         
1702         Reviewed by darin
1703
1704         * khtml/html/html_formimpl.cpp:
1705         (HTMLInputElementImpl::setType):
1706         (HTMLInputElementImpl::type):
1707         (HTMLInputElementImpl::click):
1708         (HTMLInputElementImpl::accessKeyAction):
1709         (HTMLInputElementImpl::rendererIsNeeded):
1710         (HTMLInputElementImpl::createRenderer):
1711         (HTMLInputElementImpl::encoding):
1712         (HTMLInputElementImpl::defaultEventHandler):
1713         (HTMLInputElementImpl::isEditable):
1714         * khtml/html/html_formimpl.h:
1715         (DOM::HTMLInputElementImpl::):
1716         * khtml/rendering/render_form.cpp:
1717         (RenderLineEdit::RenderLineEdit):
1718         * kwq/KWQKLineEdit.h:
1719         (KLineEdit::KLineEdit):
1720         * kwq/KWQLineEdit.h:
1721         (QLineEdit::):
1722         * kwq/KWQLineEdit.mm:
1723         (QLineEdit::QLineEdit):
1724         (QLineEdit::~QLineEdit):
1725         (QLineEdit::setFont):
1726         (QLineEdit::setText):
1727         (QLineEdit::text):
1728         (QLineEdit::setMaxLength):
1729         (QLineEdit::isReadOnly):
1730         (QLineEdit::setReadOnly):
1731         (QLineEdit::maxLength):
1732         (QLineEdit::selectAll):
1733         (QLineEdit::edited):
1734         (QLineEdit::setEdited):
1735         (QLineEdit::sizeForCharacterWidth):
1736         (QLineEdit::baselinePosition):
1737         (QLineEdit::setAlignment):
1738         (QLineEdit::setWritingDirection):
1739         (KWQNSTextAlignmentForAlignmentFlags):
1740         (QLineEdit::setLiveSearch):
1741         * kwq/KWQTextField.h:
1742         * kwq/KWQTextField.mm:
1743         (-[KWQTextFieldController initWithTextField:QLineEdit:]):
1744         (-[KWQTextFieldController action:]):
1745         (-[KWQTextFieldController dealloc]):
1746         (-[KWQTextFieldController widget]):
1747         (-[KWQTextFieldController setMaximumLength:]):
1748         (-[KWQTextFieldController controlTextDidBeginEditing:]):
1749         (-[KWQTextFieldController controlTextDidEndEditing:]):
1750         (-[KWQTextFieldController controlTextDidChange:]):
1751         (-[KWQTextFieldController control:textShouldBeginEditing:]):
1752         (-[KWQTextFieldController control:textShouldEndEditing:]):
1753         (-[KWQTextFieldController control:didFailToFormatString:errorDescription:]):
1754         (-[KWQTextFieldController control:didFailToValidatePartialString:errorDescription:]):
1755         (-[KWQTextFieldController control:isValidObject:]):
1756         (-[KWQTextFieldController control:textView:doCommandBySelector:]):
1757         (-[KWQTextFieldController textChanged]):
1758         (-[KWQTextFieldController setInDrawingMachinery:]):
1759         (-[KWQTextFieldController textView:shouldDrawInsertionPointInRect:color:turnedOn:]):
1760         (-[KWQTextFieldController textView:shouldHandleEvent:]):
1761         (-[KWQTextFieldController textView:didHandleEvent:]):
1762         (-[KWQTextFieldController setBaseWritingDirection:]):
1763         (-[KWQTextFieldController baseWritingDirection]):
1764         (-[KWQTextFieldController selectedRange]):
1765         (-[KWQTextFieldController setSelectedRange:]):
1766         (-[KWQTextFieldController setHasFocus:]):
1767         (-[KWQTextFieldController updateTextAttributes:]):
1768         (+[KWQTextField cellClass]):
1769         (-[KWQTextField initWithQLineEdit:]):
1770         (-[KWQTextField dealloc]):
1771         (-[KWQTextField controller]):
1772         (-[KWQTextField widget]):
1773         (-[KWQTextField selectText:]):
1774         (-[KWQTextField setStringValue:]):
1775         (-[KWQTextField nextKeyView]):
1776         (-[KWQTextField previousKeyView]):
1777         (-[KWQTextField nextValidKeyView]):
1778         (-[KWQTextField previousValidKeyView]):
1779         (-[KWQTextField acceptsFirstResponder]):
1780         (-[KWQTextField display]):
1781         (-[KWQTextField displayRectIgnoringOpacity:]):
1782         (-[KWQTextField textView:shouldDrawInsertionPointInRect:color:turnedOn:]):
1783         (-[KWQTextField textView:shouldHandleEvent:]):
1784         (-[KWQTextField textView:didHandleEvent:]):
1785         (-[KWQTextFieldCell editWithFrame:inView:editor:delegate:event:]):
1786         (-[KWQTextFieldCell selectWithFrame:inView:editor:delegate:start:length:]):
1787         (-[KWQTextFieldCell _textAttributes]):
1788         (-[KWQSecureTextField initWithQLineEdit:]):
1789         (-[KWQSecureTextField dealloc]):
1790         (-[KWQSecureTextField controller]):
1791         (-[KWQSecureTextField widget]):
1792         (-[KWQSecureTextField setStringValue:]):
1793         (-[KWQSecureTextField nextKeyView]):
1794         (-[KWQSecureTextField previousKeyView]):
1795         (-[KWQSecureTextField acceptsFirstResponder]):
1796         (-[KWQSecureTextField display]):
1797         (-[KWQSecureTextField displayRectIgnoringOpacity:]):
1798         (-[KWQSecureTextField textView:shouldDrawInsertionPointInRect:color:turnedOn:]):
1799         (-[KWQSecureTextField textView:shouldHandleEvent:]):
1800         (-[KWQSecureTextField textView:didHandleEvent:]):
1801         (-[KWQSecureTextField selectText:]):
1802         (-[KWQSecureTextFieldCell editWithFrame:inView:editor:delegate:event:]):
1803         (-[KWQSecureTextFieldCell selectWithFrame:inView:editor:delegate:start:length:]):
1804         (-[KWQSecureTextFieldCell _textAttributes]):
1805         (+[KWQSearchField cellClass]):
1806         (-[KWQSearchField initWithQLineEdit:]):
1807         (-[KWQSearchField dealloc]):
1808         (-[KWQSearchField controller]):
1809         (-[KWQSearchField widget]):
1810         (-[KWQSearchField selectText:]):
1811         (-[KWQSearchField setStringValue:]):
1812         (-[KWQSearchField nextKeyView]):
1813         (-[KWQSearchField previousKeyView]):
1814         (-[KWQSearchField nextValidKeyView]):
1815         (-[KWQSearchField previousValidKeyView]):
1816         (-[KWQSearchField acceptsFirstResponder]):
1817         (-[KWQSearchField display]):
1818         (-[KWQSearchField displayRectIgnoringOpacity:]):
1819         (-[KWQSearchField textView:shouldDrawInsertionPointInRect:color:turnedOn:]):
1820         (-[KWQSearchField textView:shouldHandleEvent:]):
1821         (-[KWQSearchField textView:didHandleEvent:]):
1822         (-[KWQSearchFieldCell editWithFrame:inView:editor:delegate:event:]):
1823         (-[KWQSearchFieldCell selectWithFrame:inView:editor:delegate:start:length:]):
1824         (-[KWQSearchFieldCell _textAttributes]):
1825         (-[KWQTextFieldFormatter init]):
1826         (-[KWQTextFieldFormatter setMaximumLength:]):
1827         (-[KWQTextFieldFormatter maximumLength]):
1828         (-[KWQTextFieldFormatter stringForObjectValue:]):
1829         (-[KWQTextFieldFormatter getObjectValue:forString:errorDescription:]):
1830         (-[KWQTextFieldFormatter isPartialStringValid:newEditingString:errorDescription:]):
1831         (-[KWQTextFieldFormatter attributedStringForObjectValue:withDefaultAttributes:]):
1832         (-[NSString _KWQ_truncateToNumComposedCharacterSequences:]):
1833         (-[NSTextField _KWQ_currentEditor]):
1834
1835 === Safari-133 ===
1836
1837 2004-03-19  Darin Adler  <darin@apple.com>
1838
1839         Reviewed by Ken.
1840
1841         - fixed <rdar://problem/3583945>: crash when choosing a file to upload
1842
1843         * kwq/KWQFileButton.mm:
1844         (-[KWQFileButtonAdapter dealloc]): Removed unneeded method.
1845         (-[KWQFileButtonAdapter filenameChanged:]): Check for nil.
1846         (-[KWQFileButtonAdapter focusChanged:]): Ditto.
1847         (-[KWQFileButtonAdapter clicked]): Ditto.
1848
1849 2004-03-17  Darin Adler  <darin@apple.com>
1850
1851         Reviewed by John.
1852
1853         - fixed rdar://problem/3312803>: extra space in copied text (3g.co.uk)
1854
1855         * khtml/khtml_part.cpp: (KHTMLPart::text): Explicitly set neededSpace to false after
1856         processing a line break. Doesn't really have an effect here, but matches the change
1857         to the styled text version.
1858         * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::attributedString): Same change in the styled
1859         text version.
1860
1861 2004-03-16  Darin Adler  <darin@apple.com>
1862
1863         Reviewed by Ken.
1864
1865         - a little more DOM cleanup
1866
1867         * kwq/DOM-CSS.mm: Added DOMCSSUnknownRule.
1868         * kwq/DOM.mm: Split category implementations out to match category interfaces.
1869         * kwq/DOMHTML.h: Removed lowSrc, not in DOM Level 2. Added a category for some
1870         extensions we'll want on DOMElement.
1871         * kwq/DOMInternal.h: Moved _documentImpl method here so it can be used from
1872         separate categories.
1873         * kwq/DOMRange.h: Changed DOMDocumentRange to a category from a protocol.
1874         * kwq/HTMLDOM.mm: Removed unneeded methods.
1875
1876         * WebCore.pbproj/project.pbxproj: Sort DOM header files alphabetically.
1877
1878 2004-03-16  Darin Adler  <darin@apple.com>
1879
1880         Reviewed by Ken.
1881
1882         - update for new DOM namespacing and header organization
1883
1884         * WebCore.pbproj/project.pbxproj:
1885         * kwq/DOM-CSS.h: Removed.
1886         * kwq/DOM-CSS.mm: Update for name changes.
1887         * kwq/DOM.h: Changed to include the other DOM headers.
1888         * kwq/DOM.mm: Update for name changes.
1889         * kwq/DOMCSS.h: Added.
1890         * kwq/DOMCore.h: Added.
1891         * kwq/DOMEvents.h: Added.
1892         * kwq/DOMHTML.h: Added.
1893         * kwq/DOMInternal.h: Update for name changes.
1894         * kwq/DOMRange.h: Added.
1895         * kwq/DOMStylesheets.h: Added.
1896         * kwq/DOMTraversal.h: Added.
1897         * kwq/DOMViews.h: Added.
1898         * kwq/HTMLDOM.h: Removed.
1899         * kwq/HTMLDOM.mm: Update for name changes; add some missing setters.
1900
1901 2004-03-15  Maciej Stachowiak  <mjs@apple.com>
1902
1903         Reviewed by Darin.
1904
1905         - max out our iBench cheat. Don't even paint or lay out a quarter
1906         of the pages.
1907         
1908         * khtml/xml/dom_docimpl.cpp:
1909         (DocumentImpl::close):
1910
1911 2004-03-15  Ken Kocienda  <kocienda@apple.com>
1912
1913         Reviewed by John
1914
1915         Fix for this bug:
1916         
1917         <rdar://problem/3588717>: REGRESSION (125-131u): Tabbing to links and tabbing in bookmarks view no longer works
1918
1919         Change some support methods which feed editing key events to 
1920         WebKit. The real fix is on the WebKit side.
1921
1922         * kwq/KWQKHTMLPart.mm:
1923         (KWQKHTMLPart::editingKeyEvent): Call new -editingKeyDown:
1924         on WebCoreBridge, as described below.
1925         * kwq/WebCoreBridge.h: Changed -keyDown: to -editingKeyDown:
1926         since we want to tell WebView about editing key events
1927         in a way that does not interfere with other key down
1928         events the WebView processes. This is not necessary in the
1929         strictest sense, but it seems reasonable to keep the
1930         terminology clear.
1931
1932 === Safari-132 ===
1933
1934 2004-03-12  Chris Blumenberg  <cblu@apple.com>
1935
1936         Implemented ~25% of the HTML DOM API.
1937
1938         Reviewed by kocienda.
1939
1940         (DOM::HTMLElement::HTMLElement):
1941         * kwq/DOM.mm:
1942         * kwq/DOMInternal.h:
1943         * kwq/HTMLDOM.h:
1944         * kwq/HTMLDOM.mm:
1945         (-[HTMLCollection _initWithCollectionImpl:]):
1946         (+[HTMLCollection _collectionWithImpl:]):
1947         (-[HTMLCollection _collectionImpl]):
1948         (-[HTMLCollection length]):
1949         (-[HTMLCollection item:]):
1950         (-[HTMLCollection namedItem:]):
1951         (-[HTMLElement _initWithElementImpl:]):
1952         (+[HTMLElement _elementWithImpl:]):
1953         (-[HTMLElement _HTMLElementImpl]):
1954         (-[HTMLElement idName]):
1955         (-[HTMLElement setIdName:]):
1956         (-[HTMLElement title]):
1957         (-[HTMLElement setTitle:]):
1958         (-[HTMLElement lang]):
1959         (-[HTMLElement setLang:]):
1960         (-[HTMLElement dir]):
1961         (-[HTMLElement setDir:]):
1962         (-[HTMLElement className]):
1963         (-[HTMLElement setClassName:]):
1964         (-[HTMLDocument _HTMLDocumentImpl]):
1965         (-[HTMLDocument title]):
1966         (-[HTMLDocument setTitle:]):
1967         (-[HTMLDocument referrer]):
1968         (-[HTMLDocument domain]):
1969         (-[HTMLDocument URL]):
1970         (-[HTMLDocument body]):
1971         (-[HTMLDocument images]):
1972         (-[HTMLDocument applets]):
1973         (-[HTMLDocument links]):
1974         (-[HTMLDocument forms]):
1975         (-[HTMLDocument anchors]):
1976         (-[HTMLDocument setBody:]):
1977         (-[HTMLDocument cookie]):
1978         (-[HTMLDocument setCookie:]):
1979         (-[HTMLDocument open]):
1980         (-[HTMLDocument close]):
1981         (-[HTMLDocument write:]):
1982         (-[HTMLDocument writeln:]):
1983         (-[HTMLDocument getElementById:]):
1984         (-[HTMLDocument getElementsByName:]):
1985         (-[HTMLHtmlElement _HTMLHtmlElementImpl]):
1986         (-[HTMLHtmlElement version]):
1987         (-[HTMLHtmlElement setVersion:]):
1988         (-[HTMLHeadElement _headElementImpl]):
1989         (-[HTMLHeadElement profile]):
1990         (-[HTMLHeadElement setProfile:]):
1991         (-[HTMLLinkElement _linkElementImpl]):
1992         (-[HTMLLinkElement disabled]):
1993         (-[HTMLLinkElement setDisabled:]):
1994         (-[HTMLLinkElement charset]):
1995         (-[HTMLLinkElement setCharset:]):
1996         (-[HTMLLinkElement href]):
1997         (-[HTMLLinkElement setHref:]):
1998         (-[HTMLLinkElement hreflang]):
1999         (-[HTMLLinkElement setHreflang:]):
2000         (-[HTMLLinkElement media]):
2001         (-[HTMLLinkElement setMedia:]):
2002         (-[HTMLLinkElement rel]):
2003         (-[HTMLLinkElement setRel:]):
2004         (-[HTMLLinkElement rev]):
2005         (-[HTMLLinkElement setRev:]):
2006         (-[HTMLLinkElement target]):
2007         (-[HTMLLinkElement setTarget:]):
2008         (-[HTMLLinkElement type]):
2009         (-[HTMLLinkElement setType:]):
2010         (-[HTMLTitleElement _titleElementImpl]):
2011         (-[HTMLTitleElement text]):
2012         (-[HTMLTitleElement setText:]):
2013         (-[HTMLMetaElement _metaElementImpl]):
2014         (-[HTMLMetaElement content]):
2015         (-[HTMLMetaElement setContent:]):
2016         (-[HTMLMetaElement httpEquiv]):
2017         (-[HTMLMetaElement setHttpEquiv:]):
2018         (-[HTMLMetaElement name]):
2019         (-[HTMLMetaElement setName:]):
2020         (-[HTMLMetaElement scheme]):
2021         (-[HTMLMetaElement setScheme:]):
2022         (-[HTMLBaseElement _baseElementImpl]):
2023         (-[HTMLBaseElement href]):
2024         (-[HTMLBaseElement setHref:]):
2025         (-[HTMLBaseElement target]):
2026         (-[HTMLBaseElement setTarget:]):
2027         (-[HTMLStyleElement _styleElementImpl]):
2028         (-[HTMLStyleElement disabled]):
2029         (-[HTMLStyleElement setDisabled:]):
2030         (-[HTMLStyleElement media]):
2031         (-[HTMLStyleElement setMedia:]):
2032         (-[HTMLStyleElement type]):
2033         (-[HTMLStyleElement setType:]):
2034         (-[HTMLBodyElement _bodyElementImpl]):
2035         (-[HTMLBodyElement aLink]):
2036         (-[HTMLBodyElement setALink:]):
2037         (-[HTMLBodyElement background]):
2038         (-[HTMLBodyElement setBackground:]):
2039         (-[HTMLBodyElement bgColor]):
2040         (-[HTMLBodyElement setBgColor:]):
2041         (-[HTMLBodyElement link]):
2042         (-[HTMLBodyElement setLink:]):
2043         (-[HTMLBodyElement text]):
2044         (-[HTMLBodyElement setText:]):
2045         (-[HTMLBodyElement vLink]):
2046         (-[HTMLBodyElement setVLink:]):
2047
2048 2004-03-12  David Hyatt  <hyatt@apple.com>
2049
2050         Fix for problem when undoing the deletion of a word in edit mode.
2051         
2052         Reviewed by kocienda
2053
2054         * khtml/rendering/render_text.cpp:
2055         (RenderText::setTextWithOffset):
2056
2057 2004-03-12  Ken Kocienda  <kocienda@apple.com>
2058
2059         Reviewed by Chris
2060
2061         * khtml/khtml_part.cpp:
2062         (KHTMLPart::handleMouseMoveEventSelection): Clear the selection's
2063         "modify bias" since the user clicked, and is therefore no longer
2064         extending the selection with arrow keys.
2065         * khtml/khtml_selection.cpp:
2066         (KHTMLSelection::KHTMLSelection): Add new m_modifyBiasSet flag.
2067         (KHTMLSelection::init): Set the flag to false by default.
2068         (KHTMLSelection::operator=): Copy over the value of the new m_modifyBiasSet flag.
2069         (KHTMLSelection::modify): Set the flag if extending the selection and set the 
2070         base and extent nodes based on the movement direction requested.
2071         * khtml/khtml_selection.h:
2072         * kwq/WebCoreBridge.h: See below.
2073         * kwq/WebCoreBridge.mm:
2074         (-[WebCoreBridge rangeByAlteringCurrentSelection:direction:granularity:]): This
2075         method is used by the WebKit side in response to requests to change the selection
2076         using the arrow keys. It used to be called rangeByModifyingRange:alteration:direction:granularity:
2077         but I changed it to this new format since I explicitly want to use the current selection, and
2078         not some arbitrarily passed in selection. This helps to maintain the "modify bias" correctly.
2079         (-[WebCoreBridge alterCurrentSelection:direction:granularity:]): New method. A command to alter
2080         the current selection as given. Again, applying the command to the current selection, rather
2081         than just setting the selection to a new one, helps to maintain the "modify bias" correctly.
2082
2083 2004-03-11  Chris Blumenberg  <cblu@apple.com>
2084
2085         Added stubs for the HTML DOM API.
2086
2087         Reviewed by rjw.
2088
2089         * WebCore.pbproj/project.pbxproj:
2090         * kwq/HTMLDOM.h: Added.
2091         * kwq/HTMLDOM.mm: Added.
2092         (-[HTMLCollection length]):
2093         (-[HTMLCollection item:]):
2094         (-[HTMLCollection namedItem:]):
2095         (-[HTMLElement idName]):
2096         (-[HTMLElement setIdName:]):
2097         (-[HTMLElement title]):
2098         (-[HTMLElement setTitle:]):
2099         (-[HTMLElement lang]):
2100         (-[HTMLElement setLang:]):
2101         (-[HTMLElement dir]):
2102         (-[HTMLElement setDir:]):
2103         (-[HTMLElement className]):
2104         (-[HTMLElement setClassName:]):
2105         (-[HTMLDocument title]):
2106         (-[HTMLDocument setTitle:]):
2107         (-[HTMLDocument referrer]):
2108         (-[HTMLDocument domain]):
2109         (-[HTMLDocument URL]):
2110         (-[HTMLDocument body]):
2111         (-[HTMLDocument images]):
2112         (-[HTMLDocument applets]):
2113         (-[HTMLDocument links]):
2114         (-[HTMLDocument forms]):
2115         (-[HTMLDocument anchors]):
2116         (-[HTMLDocument setBody:]):
2117         (-[HTMLDocument cookie]):
2118         (-[HTMLDocument setCookie:]):
2119         (-[HTMLDocument open]):
2120         (-[HTMLDocument close]):
2121         (-[HTMLDocument write:]):
2122         (-[HTMLDocument writeln:]):
2123         (-[HTMLDocument getElementById:]):
2124         (-[HTMLDocument getElementsByName:]):
2125         (-[HTMLHtmlElement version]):
2126         (-[HTMLHtmlElement setVersion:]):
2127         (-[HTMLHeadElement profile]):
2128         (-[HTMLHeadElement setProfile:]):
2129         (-[HTMLLinkElement disabled]):
2130         (-[HTMLLinkElement setDisabled:]):
2131         (-[HTMLLinkElement charset]):
2132         (-[HTMLLinkElement setCharset:]):
2133         (-[HTMLLinkElement href]):
2134         (-[HTMLLinkElement setHref:]):
2135         (-[HTMLLinkElement hreflang]):
2136         (-[HTMLLinkElement setHreflang:]):
2137         (-[HTMLLinkElement media]):
2138         (-[HTMLLinkElement setMedia:]):
2139         (-[HTMLLinkElement rel]):
2140         (-[HTMLLinkElement setRrevel:]):
2141         (-[HTMLLinkElement rev]):
2142         (-[HTMLLinkElement setRev:]):
2143         (-[HTMLLinkElement target]):
2144         (-[HTMLLinkElement setTarget:]):
2145         (-[HTMLLinkElement type]):
2146         (-[HTMLLinkElement setType:]):
2147         (-[HTMLTitleElement text]):
2148         (-[HTMLTitleElement setText:]):
2149         (-[HTMLMetaElement content]):
2150         (-[HTMLMetaElement setContent:]):
2151         (-[HTMLMetaElement httpEquiv]):
2152         (-[HTMLMetaElement setHttpEquiv:]):
2153         (-[HTMLMetaElement name]):
2154         (-[HTMLMetaElement setName:]):
2155         (-[HTMLMetaElement scheme]):
2156         (-[HTMLMetaElement setScheme:]):
2157         (-[HTMLBaseElement href]):
2158         (-[HTMLBaseElement setHref:]):
2159         (-[HTMLBaseElement target]):
2160         (-[HTMLBaseElement setTarget:]):
2161         (-[HTMLStyleElement disabled]):
2162         (-[HTMLStyleElement setDisabled:]):
2163         (-[HTMLStyleElement media]):
2164         (-[HTMLStyleElement setMedia:]):
2165         (-[HTMLStyleElement type]):
2166         (-[HTMLStyleElement setType:]):
2167         (-[HTMLBodyElement aLink]):
2168         (-[HTMLBodyElement setALink:]):
2169         (-[HTMLBodyElement background]):
2170         (-[HTMLBodyElement setBackground:]):
2171         (-[HTMLBodyElement bgColor]):
2172         (-[HTMLBodyElement setBgColor:]):
2173         (-[HTMLBodyElement link]):
2174         (-[HTMLBodyElement setLink:]):
2175         (-[HTMLBodyElement text]):
2176         (-[HTMLBodyElement setText:]):
2177         (-[HTMLBodyElement vLink]):
2178         (-[HTMLBodyElement setVLink:]):
2179         (-[HTMLFormElement elements]):
2180         (-[HTMLFormElement length]):
2181         (-[HTMLFormElement name]):
2182         (-[HTMLFormElement setName:]):
2183         (-[HTMLFormElement acceptCharset]):
2184         (-[HTMLFormElement setAcceptCharset:]):
2185         (-[HTMLFormElement action]):
2186         (-[HTMLFormElement setAction:]):
2187         (-[HTMLFormElement enctype]):
2188         (-[HTMLFormElement setEnctype:]):
2189         (-[HTMLFormElement method]):
2190         (-[HTMLFormElement setMethod:]):
2191         (-[HTMLFormElement target]):
2192         (-[HTMLFormElement setTarget:]):
2193         (-[HTMLFormElement submit]):
2194         (-[HTMLFormElement reset]):
2195         (-[HTMLIsIndexElement form]):
2196         (-[HTMLIsIndexElement prompt]):
2197         (-[HTMLIsIndexElement setPrompt:]):
2198         (-[HTMLSelectElement type]):
2199         (-[HTMLSelectElement selectedIndex]):
2200         (-[HTMLSelectElement setSelectedIndex:]):
2201         (-[HTMLSelectElement value]):
2202         (-[HTMLSelectElement setValue:]):
2203         (-[HTMLSelectElement length]):
2204         (-[HTMLSelectElement form]):
2205         (-[HTMLSelectElement options]):
2206         (-[HTMLSelectElement disabled]):
2207         (-[HTMLSelectElement multiple]):
2208         (-[HTMLSelectElement name]):
2209         (-[HTMLSelectElement setName:]):
2210         (-[HTMLSelectElement size]):
2211         (-[HTMLSelectElement tabIndex]):
2212         (-[HTMLSelectElement add::]):
2213         (-[HTMLSelectElement remove:]):
2214         (-[HTMLSelectElement blur]):
2215         (-[HTMLSelectElement focus]):
2216         (-[HTMLOptGroupElement disabled]):
2217         (-[HTMLOptGroupElement setDisabled:]):
2218         (-[HTMLOptGroupElement label]):
2219         (-[HTMLOptGroupElement setLabel:]):
2220         (-[HTMLOptionElement form]):
2221         (-[HTMLOptionElement defaultSelected]):
2222         (-[HTMLOptionElement setDefaultSelected:]):
2223         (-[HTMLOptionElement text]):
2224         (-[HTMLOptionElement index]):
2225         (-[HTMLOptionElement setIndex:]):
2226         (-[HTMLOptionElement disabled]):
2227         (-[HTMLOptionElement setDisabled:]):
2228         (-[HTMLOptionElement label]):
2229         (-[HTMLOptionElement setLabel:]):
2230         (-[HTMLOptionElement selected]):
2231         (-[HTMLOptionElement value]):
2232         (-[HTMLOptionElement setValue:]):
2233         (-[HTMLInputElement defaultValue]):
2234         (-[HTMLInputElement setDefaultValue:]):
2235         (-[HTMLInputElement defaultChecked]):
2236         (-[HTMLInputElement setDefaultChecked:]):
2237         (-[HTMLInputElement form]):
2238         (-[HTMLInputElement accept]):
2239         (-[HTMLInputElement setAccept:]):
2240         (-[HTMLInputElement accessKey]):
2241         (-[HTMLInputElement setAccessKey:]):
2242         (-[HTMLInputElement align]):
2243         (-[HTMLInputElement setAlign:]):
2244         (-[HTMLInputElement alt]):
2245         (-[HTMLInputElement setAlt:]):
2246         (-[HTMLInputElement checked]):
2247         (-[HTMLInputElement setChecked:]):
2248         (-[HTMLInputElement disabled]):
2249         (-[HTMLInputElement setDisabled:]):
2250         (-[HTMLInputElement maxLength]):
2251         (-[HTMLInputElement setMaxLength:]):
2252         (-[HTMLInputElement name]):
2253         (-[HTMLInputElement setName:]):
2254         (-[HTMLInputElement readOnly]):
2255         (-[HTMLInputElement setReadOnly:]):
2256         (-[HTMLInputElement size]):
2257         (-[HTMLInputElement setSize:]):
2258         (-[HTMLInputElement src]):
2259         (-[HTMLInputElement setSrc:]):
2260         (-[HTMLInputElement tabIndex]):
2261         (-[HTMLInputElement setTabIndex:]):
2262         (-[HTMLInputElement type]):
2263         (-[HTMLInputElement useMap]):
2264         (-[HTMLInputElement setUseMap:]):
2265         (-[HTMLInputElement value]):
2266         (-[HTMLInputElement setValue:]):
2267         (-[HTMLInputElement blur]):
2268         (-[HTMLInputElement focus]):
2269         (-[HTMLInputElement select]):
2270         (-[HTMLInputElement click]):
2271         (-[HTMLTextAreaElement defaultValue]):
2272         (-[HTMLTextAreaElement setDefaultValue:]):
2273         (-[HTMLTextAreaElement form]):
2274         (-[HTMLTextAreaElement accessKey]):
2275         (-[HTMLTextAreaElement setAccessKey:]):
2276         (-[HTMLTextAreaElement cols]):
2277         (-[HTMLTextAreaElement setCols:]):
2278         (-[HTMLTextAreaElement disabled]):
2279         (-[HTMLTextAreaElement setDisabled:]):
2280         (-[HTMLTextAreaElement name]):
2281         (-[HTMLTextAreaElement setName:]):
2282         (-[HTMLTextAreaElement readOnly]):
2283         (-[HTMLTextAreaElement setReadOnly:]):
2284         (-[HTMLTextAreaElement rows]):
2285         (-[HTMLTextAreaElement setRows:]):
2286         (-[HTMLTextAreaElement tabIndex]):
2287         (-[HTMLTextAreaElement setTabIndex:]):
2288         (-[HTMLTextAreaElement type]):
2289         (-[HTMLTextAreaElement value]):
2290         (-[HTMLTextAreaElement setValue:]):
2291         (-[HTMLTextAreaElement blur]):
2292         (-[HTMLTextAreaElement focus]):
2293         (-[HTMLTextAreaElement select]):
2294         (-[HTMLButtonElement form]):
2295         (-[HTMLButtonElement accessKey]):
2296         (-[HTMLButtonElement setAccessKey:]):
2297         (-[HTMLButtonElement disabled]):
2298         (-[HTMLButtonElement setDisabled:]):
2299         (-[HTMLButtonElement name]):
2300         (-[HTMLButtonElement setName:]):
2301         (-[HTMLButtonElement tabIndex]):
2302         (-[HTMLButtonElement setTabIndex:]):
2303         (-[HTMLButtonElement type]):
2304         (-[HTMLButtonElement value]):
2305         (-[HTMLButtonElement setValue:]):
2306         (-[HTMLLabelElement form]):
2307         (-[HTMLLabelElement accessKey]):
2308         (-[HTMLLabelElement setAccessKey:]):
2309         (-[HTMLLabelElement htmlFor]):
2310         (-[HTMLLabelElement setHtmlFor:]):
2311         (-[HTMLFieldSetElement form]):
2312         (-[HTMLLegendElement form]):
2313         (-[HTMLLegendElement accessKey]):
2314         (-[HTMLLegendElement setAccessKey:]):
2315         (-[HTMLLegendElement align]):
2316         (-[HTMLLegendElement setAlign:]):
2317         (-[HTMLUListElement compact]):
2318         (-[HTMLUListElement setCompact:]):
2319         (-[HTMLUListElement type]):
2320         (-[HTMLUListElement setType:]):
2321         (-[HTMLOListElement compact]):
2322         (-[HTMLOListElement setCompact:]):
2323         (-[HTMLOListElement start]):
2324         (-[HTMLOListElement setStart:]):
2325         (-[HTMLOListElement type]):
2326         (-[HTMLOListElement setType:]):
2327         (-[HTMLDListElement compact]):
2328         (-[HTMLDListElement setCompact:]):
2329         (-[HTMLDirectoryElement compact]):
2330         (-[HTMLDirectoryElement setCompact:]):
2331         (-[HTMLMenuElement compact]):
2332         (-[HTMLMenuElement setCompact:]):
2333         (-[HTMLLIElement type]):
2334         (-[HTMLLIElement setType:]):
2335         (-[HTMLLIElement value]):
2336         (-[HTMLLIElement setValue:]):
2337         (-[HTMLBlockquoteElement cite]):
2338         (-[HTMLBlockquoteElement setCite:]):
2339         (-[HTMLDivElement align]):
2340         (-[HTMLDivElement setAlign:]):
2341         (-[HTMLParagraphElement align]):
2342         (-[HTMLParagraphElement setAlign:]):
2343         (-[HTMLHeadingElement align]):
2344         (-[HTMLHeadingElement setAlign:]):
2345         (-[HTMLQuoteElement cite]):
2346         (-[HTMLQuoteElement setCite:]):
2347         (-[HTMLPreElement width]):
2348         (-[HTMLPreElement setWidth:]):
2349         (-[HTMLBRElement clear]):
2350         (-[HTMLBRElement setClear:]):
2351         (-[HTMLBaseFontElement color]):
2352         (-[HTMLBaseFontElement setColor:]):
2353         (-[HTMLBaseFontElement face]):
2354         (-[HTMLBaseFontElement setFace:]):
2355         (-[HTMLBaseFontElement size]):
2356         (-[HTMLBaseFontElement setSize:]):
2357         (-[HTMLFontElement color]):
2358         (-[HTMLFontElement setColor:]):
2359         (-[HTMLFontElement face]):
2360         (-[HTMLFontElement setFace:]):
2361         (-[HTMLFontElement size]):
2362         (-[HTMLFontElement setSize:]):
2363         (-[HTMLHRElement align]):
2364         (-[HTMLHRElement setAlign:]):
2365         (-[HTMLHRElement noShade]):
2366         (-[HTMLHRElement setNoShade:]):
2367         (-[HTMLHRElement size]):
2368         (-[HTMLHRElement setSize:]):
2369         (-[HTMLHRElement width]):
2370         (-[HTMLHRElement setWidth:]):
2371         (-[HTMLModElement cite]):
2372         (-[HTMLModElement setCite:]):
2373         (-[HTMLModElement dateTime]):
2374         (-[HTMLModElement setDateTime:]):
2375         (-[HTMLAnchorElement accessKey]):
2376         (-[HTMLAnchorElement setAccessKey:]):
2377         (-[HTMLAnchorElement charset]):
2378         (-[HTMLAnchorElement setCharset:]):
2379         (-[HTMLAnchorElement coords]):
2380         (-[HTMLAnchorElement setCoords:]):
2381         (-[HTMLAnchorElement href]):
2382         (-[HTMLAnchorElement setHref:]):
2383         (-[HTMLAnchorElement hreflang]):
2384         (-[HTMLAnchorElement setHreflang:]):
2385         (-[HTMLAnchorElement name]):
2386         (-[HTMLAnchorElement setName:]):
2387         (-[HTMLAnchorElement rel]):
2388         (-[HTMLAnchorElement setRel:]):
2389         (-[HTMLAnchorElement rev]):
2390         (-[HTMLAnchorElement setRev:]):
2391         (-[HTMLAnchorElement shape]):
2392         (-[HTMLAnchorElement setShape:]):
2393         (-[HTMLAnchorElement tabIndex]):
2394         (-[HTMLAnchorElement setTabIndex:]):
2395         (-[HTMLAnchorElement target]):
2396         (-[HTMLAnchorElement setTarget:]):
2397         (-[HTMLAnchorElement type]):
2398         (-[HTMLAnchorElement setType:]):
2399         (-[HTMLAnchorElement blur]):
2400         (-[HTMLAnchorElement focus]):
2401         (-[HTMLImageElement lowSrc]):
2402         (-[HTMLImageElement setLowSrc:]):
2403         (-[HTMLImageElement name]):
2404         (-[HTMLImageElement setName:]):
2405         (-[HTMLImageElement align]):
2406         (-[HTMLImageElement setAlign:]):
2407         (-[HTMLImageElement alt]):
2408         (-[HTMLImageElement setAlt:]):
2409         (-[HTMLImageElement border]):
2410         (-[HTMLImageElement setBorder:]):
2411         (-[HTMLImageElement height]):
2412         (-[HTMLImageElement setHeight:]):
2413         (-[HTMLImageElement hspace]):
2414         (-[HTMLImageElement setHspace:]):
2415         (-[HTMLImageElement isMap]):
2416         (-[HTMLImageElement setIsMap:]):
2417         (-[HTMLImageElement longDesc]):
2418         (-[HTMLImageElement setLongDesc:]):
2419         (-[HTMLImageElement src]):
2420         (-[HTMLImageElement setSrc:]):
2421         (-[HTMLImageElement useMap]):
2422         (-[HTMLImageElement setUseMap:]):
2423         (-[HTMLImageElement vspace]):
2424         (-[HTMLImageElement setVspace:]):
2425         (-[HTMLImageElement width]):
2426         (-[HTMLImageElement setWidth:]):
2427         (-[HTMLObjectElement form]):
2428         (-[HTMLObjectElement code]):
2429         (-[HTMLObjectElement setCode:]):
2430         (-[HTMLObjectElement align]):
2431         (-[HTMLObjectElement setAlign:]):
2432         (-[HTMLObjectElement archive]):
2433         (-[HTMLObjectElement setArchive:]):
2434         (-[HTMLObjectElement border]):
2435         (-[HTMLObjectElement setBorder:]):
2436         (-[HTMLObjectElement codeBase]):
2437         (-[HTMLObjectElement setCodeBase:]):
2438         (-[HTMLObjectElement codeType]):
2439         (-[HTMLObjectElement setCodeType:]):
2440         (-[HTMLObjectElement data]):
2441         (-[HTMLObjectElement setData:]):
2442         (-[HTMLObjectElement declare]):
2443         (-[HTMLObjectElement setDeclare:]):
2444         (-[HTMLObjectElement height]):
2445         (-[HTMLObjectElement setHeight:]):
2446         (-[HTMLObjectElement hspace]):
2447         (-[HTMLObjectElement setHspace:]):
2448         (-[HTMLObjectElement name]):
2449         (-[HTMLObjectElement setName:]):
2450         (-[HTMLObjectElement standby]):
2451         (-[HTMLObjectElement setStandby:]):
2452         (-[HTMLObjectElement tabIndex]):
2453         (-[HTMLObjectElement setTabIndex:]):
2454         (-[HTMLObjectElement type]):
2455         (-[HTMLObjectElement setType:]):
2456         (-[HTMLObjectElement useMap]):
2457         (-[HTMLObjectElement setUseMap:]):
2458         (-[HTMLObjectElement vspace]):
2459         (-[HTMLObjectElement setVspace:]):
2460         (-[HTMLObjectElement width]):
2461         (-[HTMLObjectElement setWidth:]):
2462         (-[HTMLParamElement name]):
2463         (-[HTMLParamElement setName:]):
2464         (-[HTMLParamElement type]):
2465         (-[HTMLParamElement setType:]):
2466         (-[HTMLParamElement value]):
2467         (-[HTMLParamElement setValue:]):
2468         (-[HTMLParamElement valueType]):
2469         (-[HTMLParamElement setValueType:]):
2470         (-[HTMLAppletElement align]):
2471         (-[HTMLAppletElement setAlign:]):
2472         (-[HTMLAppletElement alt]):
2473         (-[HTMLAppletElement setAlt:]):
2474         (-[HTMLAppletElement archive]):
2475         (-[HTMLAppletElement setArchive:]):
2476         (-[HTMLAppletElement code]):
2477         (-[HTMLAppletElement setCode:]):
2478         (-[HTMLAppletElement codeBase]):
2479         (-[HTMLAppletElement setCodeBase:]):
2480         (-[HTMLAppletElement codeType]):
2481         (-[HTMLAppletElement setCodeType:]):
2482         (-[HTMLAppletElement height]):
2483         (-[HTMLAppletElement setHeight:]):
2484         (-[HTMLAppletElement hspace]):
2485         (-[HTMLAppletElement setHspace:]):
2486         (-[HTMLAppletElement name]):
2487         (-[HTMLAppletElement setName:]):
2488         (-[HTMLAppletElement object]):
2489         (-[HTMLAppletElement setObject:]):
2490         (-[HTMLAppletElement vspace]):
2491         (-[HTMLAppletElement setVspace:]):
2492         (-[HTMLAppletElement width]):
2493         (-[HTMLAppletElement setWidth:]):
2494         (-[HTMLMapElement areas]):
2495         (-[HTMLMapElement name]):
2496         (-[HTMLMapElement setName:]):
2497         (-[HTMLAreaElement accessKey]):
2498         (-[HTMLAreaElement setAccessKey:]):
2499         (-[HTMLAreaElement alt]):
2500         (-[HTMLAreaElement setAlt:]):
2501         (-[HTMLAreaElement coords]):
2502         (-[HTMLAreaElement setCoords:]):
2503         (-[HTMLAreaElement href]):
2504         (-[HTMLAreaElement setHref:]):
2505         (-[HTMLAreaElement noHref]):
2506         (-[HTMLAreaElement setNoHref:]):
2507         (-[HTMLAreaElement shape]):
2508         (-[HTMLAreaElement setShape:]):
2509         (-[HTMLAreaElement tabIndex]):
2510         (-[HTMLAreaElement setTabIndex:]):
2511         (-[HTMLAreaElement target]):
2512         (-[HTMLAreaElement setTarget:]):
2513         (-[HTMLScriptElement text]):
2514         (-[HTMLScriptElement setText:]):
2515         (-[HTMLScriptElement htmlFor]):
2516         (-[HTMLScriptElement setHtmlFor:]):
2517         (-[HTMLScriptElement event]):
2518         (-[HTMLScriptElement setEvent:]):
2519         (-[HTMLScriptElement charset]):
2520         (-[HTMLScriptElement setCharset:]):
2521         (-[HTMLScriptElement defer]):
2522         (-[HTMLScriptElement setDefer:]):
2523         (-[HTMLScriptElement src]):
2524         (-[HTMLScriptElement setSrc:]):
2525         (-[HTMLScriptElement type]):
2526         (-[HTMLScriptElement setType:]):
2527         (-[HTMLTableCaptionElement align]):
2528         (-[HTMLTableCaptionElement setAlign:]):
2529         (-[HTMLTableSectionElement align]):
2530         (-[HTMLTableSectionElement setAlign:]):
2531         (-[HTMLTableSectionElement ch]):
2532         (-[HTMLTableSectionElement setCh:]):
2533         (-[HTMLTableSectionElement chOff]):
2534         (-[HTMLTableSectionElement setChOff:]):
2535         (-[HTMLTableSectionElement vAlign]):
2536         (-[HTMLTableSectionElement setVAlign:]):
2537         (-[HTMLTableSectionElement rows]):
2538         (-[HTMLTableSectionElement insertRow:]):
2539         (-[HTMLTableSectionElement deleteRow:]):
2540         (-[HTMLTableElement caption]):
2541         (-[HTMLTableElement tHead]):
2542         (-[HTMLTableElement tFoot]):
2543         (-[HTMLTableElement rows]):
2544         (-[HTMLTableElement tBodies]):
2545         (-[HTMLTableElement align]):
2546         (-[HTMLTableElement setAlign:]):
2547         (-[HTMLTableElement bgColor]):
2548         (-[HTMLTableElement setBgColor:]):
2549         (-[HTMLTableElement border]):
2550         (-[HTMLTableElement setBorder:]):
2551         (-[HTMLTableElement cellPadding]):
2552         (-[HTMLTableElement setCellPadding:]):
2553         (-[HTMLTableElement cellSpacing]):
2554         (-[HTMLTableElement setCellSpacing:]):
2555         (-[HTMLTableElement frame]):
2556         (-[HTMLTableElement setFrame:]):
2557         (-[HTMLTableElement rules]):
2558         (-[HTMLTableElement setRules:]):
2559         (-[HTMLTableElement summary]):
2560         (-[HTMLTableElement setSummary:]):
2561         (-[HTMLTableElement width]):
2562         (-[HTMLTableElement setWidth:]):
2563         (-[HTMLTableElement createTHead]):
2564         (-[HTMLTableElement deleteTHead]):
2565         (-[HTMLTableElement createTFoot]):
2566         (-[HTMLTableElement deleteTFoot]):
2567         (-[HTMLTableElement createCaption]):
2568         (-[HTMLTableElement deleteCaption]):
2569         (-[HTMLTableElement deleteRow:]):
2570         (-[HTMLTableColElement align]):
2571         (-[HTMLTableColElement setAlign:]):
2572         (-[HTMLTableColElement ch]):
2573         (-[HTMLTableColElement setCh:]):
2574         (-[HTMLTableColElement chOff]):
2575         (-[HTMLTableColElement setChOff:]):
2576         (-[HTMLTableColElement span]):
2577         (-[HTMLTableColElement setSpan:]):
2578         (-[HTMLTableColElement vAlign]):
2579         (-[HTMLTableColElement setVAlign:]):
2580         (-[HTMLTableColElement width]):
2581         (-[HTMLTableColElement setWidth:]):
2582         (-[HTMLTableRowElement rowIndex]):
2583         (-[HTMLTableRowElement setRowIndex:]):
2584         (-[HTMLTableRowElement sectionRowIndex]):
2585         (-[HTMLTableRowElement setSectionRowIndex:]):
2586         (-[HTMLTableRowElement cells]):
2587         (-[HTMLTableRowElement setCells:]):
2588         (-[HTMLTableRowElement align]):
2589         (-[HTMLTableRowElement setAlign:]):
2590         (-[HTMLTableRowElement bgColor]):
2591         (-[HTMLTableRowElement setBgColor:]):
2592         (-[HTMLTableRowElement ch]):
2593         (-[HTMLTableRowElement setCh:]):
2594         (-[HTMLTableRowElement chOff]):
2595         (-[HTMLTableRowElement setChOff:]):
2596         (-[HTMLTableRowElement vAlign]):
2597         (-[HTMLTableRowElement setVAlign:]):
2598         (-[HTMLTableRowElement insertCell:]):
2599         (-[HTMLTableRowElement deleteCell:]):
2600         (-[HTMLTableCellElement cellIndex]):
2601         (-[HTMLTableCellElement setCellIndex:]):
2602         (-[HTMLTableCellElement abbr]):
2603         (-[HTMLTableCellElement setAbbr:]):
2604         (-[HTMLTableCellElement align]):
2605         (-[HTMLTableCellElement setAlign:]):
2606         (-[HTMLTableCellElement axis]):
2607         (-[HTMLTableCellElement setAxis:]):
2608         (-[HTMLTableCellElement bgColor]):
2609         (-[HTMLTableCellElement setBgColor:]):
2610         (-[HTMLTableCellElement ch]):
2611         (-[HTMLTableCellElement setCh:]):
2612         (-[HTMLTableCellElement chOff]):
2613         (-[HTMLTableCellElement setChOff:]):
2614         (-[HTMLTableCellElement colSpan]):
2615         (-[HTMLTableCellElement setColSpan:]):
2616         (-[HTMLTableCellElement headers]):
2617         (-[HTMLTableCellElement setHeaders:]):
2618         (-[HTMLTableCellElement height]):
2619         (-[HTMLTableCellElement setHeight:]):
2620         (-[HTMLTableCellElement noWrap]):
2621         (-[HTMLTableCellElement setNoWrap:]):
2622         (-[HTMLTableCellElement rowSpan]):
2623         (-[HTMLTableCellElement setRowSpan:]):
2624         (-[HTMLTableCellElement scope]):
2625         (-[HTMLTableCellElement setScope:]):
2626         (-[HTMLTableCellElement vAlign]):
2627         (-[HTMLTableCellElement setVAlign:]):
2628         (-[HTMLTableCellElement width]):
2629         (-[HTMLTableCellElement setWidth:]):
2630         (-[HTMLFrameSetElement cols]):
2631         (-[HTMLFrameSetElement setCols:]):
2632         (-[HTMLFrameSetElement rows]):
2633         (-[HTMLFrameSetElement setRows:]):
2634         (-[HTMLFrameElement frameBorder]):
2635         (-[HTMLFrameElement setFrameBorder:]):
2636         (-[HTMLFrameElement longDesc]):
2637         (-[HTMLFrameElement setLongDesc:]):
2638         (-[HTMLFrameElement marginHeight]):
2639         (-[HTMLFrameElement setMarginHeight:]):
2640         (-[HTMLFrameElement marginWidth]):
2641         (-[HTMLFrameElement setMarginWidth:]):
2642         (-[HTMLFrameElement name]):
2643         (-[HTMLFrameElement setName:]):
2644         (-[HTMLFrameElement noResize]):
2645         (-[HTMLFrameElement setNoResize:]):
2646         (-[HTMLFrameElement scrolling]):
2647         (-[HTMLFrameElement setScrolling:]):
2648         (-[HTMLFrameElement src]):
2649         (-[HTMLFrameElement setSrc:]):
2650         (-[HTMLIFrameElement align]):
2651         (-[HTMLIFrameElement setAlign:]):
2652         (-[HTMLIFrameElement frameBorder]):
2653         (-[HTMLIFrameElement setFrameBorder:]):
2654         (-[HTMLIFrameElement height]):
2655         (-[HTMLIFrameElement setHeight:]):
2656         (-[HTMLIFrameElement longDesc]):
2657         (-[HTMLIFrameElement setLongDesc:]):
2658         (-[HTMLIFrameElement marginHeight]):
2659         (-[HTMLIFrameElement setMarginHeight:]):
2660         (-[HTMLIFrameElement marginWidth]):
2661         (-[HTMLIFrameElement setMarginWidth:]):
2662         (-[HTMLIFrameElement name]):
2663         (-[HTMLIFrameElement setName:]):
2664         (-[HTMLIFrameElement scrolling]):
2665         (-[HTMLIFrameElement setScrolling:]):
2666         (-[HTMLIFrameElement src]):
2667         (-[HTMLIFrameElement setSrc:]):
2668         (-[HTMLIFrameElement width]):
2669         (-[HTMLIFrameElement setWidth:]):
2670
2671 2004-03-11  Ken Kocienda  <kocienda@apple.com>
2672
2673         Reviewed by Dave
2674
2675         I have clarified the concept (at least in my head) 
2676         that each edit command has an obligation to put the
2677         selection in the right place after it is applied, 
2678         unapplied, or reapplied. Right now, each edit command 
2679         calls setStartingSelection and setEndingSelection to do
2680         this, I made these function move the selection on 
2681         setting.
2682
2683         * khtml/editing/htmlediting_impl.cpp:
2684         (EditCommandImpl::setStartingSelection)
2685         (EditCommandImpl::setEndingSelection)
2686         (InputTextCommandImpl::coalesce)
2687         (InputTextCommandImpl::deleteCharacter)
2688         (InputTextCommandImpl::execute)
2689         * khtml/editing/htmlediting_impl.h:
2690
2691 2004-03-11  Ken Kocienda  <kocienda@apple.com>
2692
2693         Reviewed by Dave
2694     
2695         Various changes to move us forward on editing.
2696         
2697         1. I reorganized the concrete EditCommand interface and
2698         implementation classes alphabetically in their 
2699         respective files, to make it easier to find things.
2700         
2701         2. I added a TypingCommand composite class to gang 
2702         up all keystrokes and make it possible to pass a 
2703         single command over to the Cocoa undo system in all cases.
2704         
2705         3. I now send all keystrokes back over to WebKit
2706         to be interpreted by the text input system. In concert
2707         with the many new NSResponder method implementations I
2708         added to WebView, we now respond to keystrokes in a much
2709         more Cocoa-like way that sets us down the path to
2710         integrating with the Cocoa text input system some day.
2711
2712         4. I fixed up our integration with the Cocoa undo
2713         system. I also removed much of the undo support code
2714         from the KHTMPart class. As a replacement, I implemented
2715         reporting of undoable commands to KHTMLPart so that 
2716         a KDE hookup is quite feasible. As a result, undo 
2717         should "just work" in Blot (Chris has reported that 
2718         it has been busted).
2719
2720         5. I added the DOM CSS bindings for Objective-C. This
2721         required some rearranging of the existing DOM bindings
2722         code, and while I was there, I did various cleanups in the
2723         existing DOM bindings.
2724
2725         * About 400 lines of changed files and functions elided.
2726         
2727 2004-03-11  Chris Blumenberg  <cblu@apple.com>
2728
2729         Fixed some spacing issues in reconstructed source and web archives that were caused by a malformed doc type string that we were constructing.
2730
2731         Reviewed by darin.
2732
2733         * khtml/html/html_documentimpl.cpp:
2734         (HTMLDocumentImpl::determineParseMode): set the public ID and system ID on the doc type
2735         * khtml/xml/dom_docimpl.cpp:
2736         (DocumentTypeImpl::toString): put a space between DOCTYPE and the name
2737         * khtml/xml/dom_docimpl.h:
2738         (DOM::DocumentTypeImpl::setPublicId): new
2739         (DOM::DocumentTypeImpl::setSystemId): new
2740
2741 2004-03-10  David Hyatt  <hyatt@apple.com>
2742
2743         Fix for 3584646, AxWebArea should encompass all children (its AxSize should).
2744         
2745         Reviewed by mjs
2746
2747         * khtml/rendering/render_canvas.cpp:
2748         (RenderCanvas::absoluteRects):
2749         * khtml/rendering/render_canvas.h:
2750
2751 2004-03-10  Chris Blumenberg  <cblu@apple.com>
2752
2753         Fixed: INPUT images are not part of web archives.
2754
2755         Reviewed by rjw.
2756
2757         * khtml/html/html_formimpl.cpp:
2758         (HTMLInputElementImpl::isSubresourceURLAttribute):
2759         * khtml/html/html_formimpl.h:
2760
2761 2004-03-09  Chris Blumenberg  <cblu@apple.com>
2762
2763         Implemented WebCore side of: <rdar://problem/3577508>: API: web archive related API's
2764
2765         Reviewed by rjw.
2766
2767         * WebCore-combined.exp:
2768         * WebCore.exp:
2769         * kwq/DOM.mm:
2770         (+[DOMRange _rangeWithImpl:]): made internally accessible
2771         (-[DOMRange _rangeImpl]): ditto
2772         * kwq/DOMInternal.h:
2773         * kwq/KWQStringList.h:
2774         * kwq/KWQStringList.mm:
2775         (QStringList::getNSArray): new
2776         * kwq/WebCoreBridge.h:
2777         * kwq/WebCoreBridge.mm:
2778         (-[WebCoreBridge pasteMarkupString:]): renamed from pasteHTMLString since XML pasting may be possible
2779         (-[WebCoreBridge selectedRange]): new
2780         (-[WebCoreBridge _documentTypeString]): new
2781         (-[WebCoreBridge _stringWithDocumentTypeStringAndMarkupString:]): new
2782         (-[WebCoreBridge markupStringFromNode:subresourceURLStrings:]): new, needed for WebKit API's
2783         (-[WebCoreBridge markupStringFromRange:subresourceURLStrings:]): new, needed for WebKit API's
2784
2785 2004-03-09  David Hyatt  <hyatt@apple.com>
2786
2787         Make the AXLinkUIElements attribute always return an array (never return nil).
2788         
2789         * kwq/KWQAccObject.mm:
2790         (-[KWQAccObject accessibilityAttributeValue:]):
2791
2792 2004-03-09  David Hyatt  <hyatt@apple.com>
2793
2794         (1) Change root element in a document to have a role of AXWebArea.
2795         (2) Add support for AXURL to links and children of links.
2796         (3) Add support for AXLinkUIElements to the AXWebArea
2797         
2798         Reviewed by john
2799
2800         * khtml/dom/html_misc.h:
2801         * kwq/KWQAccObject.mm:
2802         (-[KWQAccObject role]):
2803         (-[KWQAccObject roleDescription]):
2804         (-[KWQAccObject accessibilityAttributeNames]):
2805         (-[KWQAccObject accessibilityAttributeValue:]):
2806
2807 2004-03-09  John Sullivan  <sullivan@apple.com>
2808
2809         Reviewed by nobody.
2810
2811         * kwq/KWQKURL.mm:
2812         (KURL::KURL):
2813         Fixed broken build by removing wayward "break" statement.
2814
2815 2004-03-08  Darin Adler  <darin@apple.com>
2816
2817         Reviewed by Maciej.
2818
2819         - fixed <rdar://problem/3554876>: REGRESSION (100-125): cannot upload file if path contains non-ASCII characters
2820
2821         * kwq/KWQKURL.mm: Remove Colon constant so we can fit in 8 bits again.
2822         (KURL::KURL): Rewrite so we don't need isSchemeCharOrColon.
2823
2824 === Safari-131 ===
2825
2826 2004-03-08  Ken Kocienda  <kocienda@apple.com>
2827
2828         Reviewed by Darin
2829
2830         * WebCore.pbproj/project.pbxproj: Added CFBundleName to Info.plist.
2831
2832 2004-03-05  David Hyatt  <hyatt@apple.com>
2833
2834         Fix for first-line inheritance problem caused by incorrectly inheriting first-line into floating
2835         blocks.
2836         
2837         Reviewed by kocienda
2838
2839         * khtml/rendering/render_block.cpp:
2840         (khtml::RenderBlock::firstLineBlock):
2841
2842 2004-03-05  Ken Kocienda  <kocienda@apple.com>
2843
2844         Reviewed by me.
2845
2846         Forgot to add this when I checked in last time.
2847
2848         * ForwardingHeaders/css/css_computedstyle.h: Added.
2849
2850 2004-03-05  Ken Kocienda  <kocienda@apple.com>
2851
2852         Reviewed by Dave.
2853
2854         Added initial support for retrieving the computed 
2855         style of document elements.
2856
2857         * WebCore.pbproj/project.pbxproj:
2858         * khtml/css/css_computedstyle.cpp: Added.
2859         (DOM::valueForLength): Helper to turn a khtml::Length into a computed value string.
2860         (DOM::stringForBorderStyle): Helper to turn an EBorderStyle into a computed value string.
2861         (DOM::stringForTextAlign): Helper to turn an ETextAlign into a computed value string.
2862         (DOM::CSSComputedStyleDeclarationImpl::CSSComputedStyleDeclarationImpl): New function.
2863         (DOM::CSSComputedStyleDeclarationImpl::~CSSComputedStyleDeclarationImpl): Ditto.
2864         (DOM::CSSComputedStyleDeclarationImpl::cssText): Ditto.
2865         (DOM::CSSComputedStyleDeclarationImpl::setCssText): Ditto.
2866         (DOM::CSSComputedStyleDeclarationImpl::getPropertyCSSValue): Ditto.
2867         (DOM::CSSComputedStyleDeclarationImpl::getPropertyValue): Ditto.
2868         (DOM::CSSComputedStyleDeclarationImpl::getPropertyPriority): Ditto.
2869         (DOM::CSSComputedStyleDeclarationImpl::removeProperty): Ditto.
2870         (DOM::CSSComputedStyleDeclarationImpl::setProperty): Ditto.
2871         (DOM::CSSComputedStyleDeclarationImpl::setLengthProperty): Ditto.
2872         (DOM::CSSComputedStyleDeclarationImpl::item): Ditto.
2873         (DOM::CSSComputedStyleDeclarationImpl::property): Ditto.
2874         * khtml/css/css_computedstyle.h: Added.
2875         * khtml/css/css_valueimpl.cpp:
2876         (CSSPrimitiveValueImpl::cssText): Fixed some formatting of Rect. Added
2877         suppoprt for rgba colors.
2878         * khtml/css/css_valueimpl.h:
2879         (DOM::CSSStyleDeclarationImpl::node):
2880         * khtml/ecma/kjs_css.cpp:
2881         (KJS::getDOMCSSStyleDeclaration):
2882         * khtml/ecma/kjs_dom.cpp:
2883         (DOMDocument::getValueProperty): defaultView is a property, used to be a function, 
2884         which was wrong. Fixed.
2885         (DOMDocumentProtoFunc::tryCall): Ditto.
2886         * khtml/ecma/kjs_dom.lut.h:
2887         (KJS::): Regenerated file.
2888         * khtml/misc/khtmllayout.h:
2889         (khtml::Length::length): Added an accessor to the value, to promote better coding
2890         style, rather than peeking and poking the value directly.
2891         * khtml/rendering/render_style.h:
2892         (khtml::RenderStyle::borderLeftWidth): BHIDDEN also should be treated like BNONE when it comes
2893         to returning a zero value. Now it is.
2894         (khtml::RenderStyle::borderRightWidth): Ditto.
2895         (khtml::RenderStyle::borderTopWidth): Ditto.
2896         (khtml::RenderStyle::borderBottomWidth): Ditto.
2897         (khtml::RenderStyle::outlineWidth): Ditto.
2898         (khtml::RenderStyle::outlineOffset): Ditto.
2899         * khtml/xml/dom2_viewsimpl.cpp:
2900         (AbstractViewImpl::getComputedStyle): Added an implementation for this formerly stubbed out function.
2901
2902 2004-03-05  Ken Kocienda  <kocienda@apple.com>
2903
2904         Change by Darin. Reviewed by me.
2905
2906         * kwq/DOM.mm: Fixed the following functions to deal with
2907         casting objects derived from NodeImpl back and forth to
2908         NodeImpl given that the derived classes use multiple
2909         inheritance.
2910         (-[DOMDocument _documentImpl]):
2911         (-[DOMCharacterData _characterDataImpl]):
2912         (-[DOMAttr _attrImpl]):
2913         (-[DOMElement _elementImpl]):
2914         (-[DOMText _textImpl]):
2915         (-[DOMDocumentType _documentTypeImpl]):
2916         (-[DOMNotation _notationImpl]):
2917         (-[DOMEntity _entityImpl]):
2918         (-[DOMProcessingInstruction _processingInstructionImpl]):
2919
2920 2004-03-03  Darin Adler  <darin@apple.com>
2921
2922         Reviewed by Vicki.
2923
2924         * English.lproj/InfoPlist.strings: Removed. No need to localize the version and
2925         copyright string, and that's all that was in here.
2926         * WebCore.pbproj/project.pbxproj: Removed InfoPlist.strings from build.
2927
2928 2004-03-03  David Hyatt  <hyatt@apple.com>
2929
2930         Speed up access to the children arrays of accessibility objects by caching mutable arrays of children
2931         and nulling them out only when the children change.
2932         
2933         Reviewed by john
2934
2935         * khtml/rendering/render_container.cpp:
2936         (RenderContainer::removeChildNode):
2937         (RenderContainer::appendChildNode):
2938         (RenderContainer::insertChildNode):
2939         * kwq/KWQAccObject.h:
2940         * kwq/KWQAccObject.mm:
2941         (-[KWQAccObject detach]):
2942         (-[KWQAccObject accessibilityAttributeValue:]):
2943         (-[KWQAccObject childrenChanged]):
2944         (-[KWQAccObject clearChildren]):
2945         * kwq/KWQAccObjectCache.h:
2946         * kwq/KWQAccObjectCache.mm:
2947         (KWQAccObjectCache::childrenChanged):
2948
2949 2004-03-02  Ken Kocienda  <kocienda@apple.com>
2950
2951         Reviewed by Darin and me. Coding by Darin and me.
2952         
2953         1) Fix some places that were calling [self class], in at
2954         least one case calling a method not defined on the class
2955         (not gonna work).
2956         2) Add underscore prefix for all non-API method names.
2957         3) Make DOMObject refuse to init, which might prevent
2958         problems where people get confused and think they can
2959         subclass or instantiate it or its subclasses.
2960         4) Use some C++ mojo to replace NSStringToDOMString and
2961         DOMStringToNSString with type conversions built into the
2962         DOMString class.
2963         5) Removed NSError out parameters from the API. Methods
2964         now throw NSExceptions.
2965         6) Exception code local variables now initialized before
2966         passing to khtml DOM impl calls.
2967         7) Various other cleanups and tweaks.
2968
2969         * khtml/dom/dom_string.h
2970         * khtml/xml/dom_atomicstring.h
2971         * kwq/DOM.h
2972         * kwq/DOM.mm
2973         * kwq/DOMInternal.h
2974         * kwq/KWQKHTMLPart.mm
2975         * kwq/WebCoreBridge.mm
2976
2977 2004-03-02  Richard Williamson   <rjw@apple.com>
2978
2979         Added NP_SAP API.  This API includes the new entry points
2980         used to bind native interfaces to JavaScript.  It's final location
2981         may change.
2982
2983         Made changes to KWQKHTMLPart.mm to reflect changes in names
2984         on RootObject.
2985         
2986         Reviewed by Chris.
2987
2988         * WebCore.pbproj/project.pbxproj:
2989         * khtml/ecma/NP_SAP.h: Added.
2990         * kwq/KWQKHTMLPart.mm:
2991         (KWQKHTMLPart::cleanupPluginRootObjects):
2992         * kwq/WebCoreBridge.mm:
2993
2994 2004-03-01  Maciej Stachowiak  <mjs@apple.com>
2995
2996         Reviewed by Darin.
2997
2998         <rdar://problem/3549201>: repro crash in KHTMLPart::begin inside JavaScript code (gmpartsdirect.com)
2999
3000         Added some null checks. I am not sure why this page attaches a
3001         document that has no view, but these changes make it work
3002         perfectly.
3003         
3004         * khtml/khtml_part.cpp:
3005         (KHTMLPart::begin): Add check for null view before use.  *
3006         khtml/xml/dom_docimpl.cpp:
3007         (DocumentImpl::close): ditto
3008         (DocumentImpl::recalcStyle): Add check for null paint device.
3009
3010 === Safari-130 ===
3011
3012 2004-03-01  Ken Kocienda  <kocienda@apple.com>
3013
3014         Reviewed by me
3015         
3016         Rollout last night's checkin. The tree was closed.
3017
3018         * kwq/DOM.h
3019         * kwq/DOM.mm
3020         * kwq/DOMInternal.h
3021         * kwq/KWQKHTMLPart.mm
3022         * kwq/WebCoreBridge.mm
3023
3024 2004-03-01  Ken Kocienda  <kocienda@apple.com>
3025
3026         Reviewed by me, changes by Darin.
3027         
3028         Yet another pass at the DOM API, this one by 
3029         Darin to simplify the internal structure of the
3030         implementation. Little has changed in the API;
3031         much has changed in the implementation, particularly
3032         with regard to object creation and data storage and
3033         the class hierarchy.
3034
3035         * kwq/DOM.h
3036         * kwq/DOM.mm
3037         * kwq/DOMInternal.h
3038         * kwq/KWQKHTMLPart.mm
3039         * kwq/WebCoreBridge.mm
3040
3041 2004-03-01  Maciej Stachowiak  <mjs@apple.com>
3042
3043         Reviewed by NOBODY (OOPS!).
3044
3045         - fixed <rdar://problem/3567047>: REGRESSION: repro crash inside KJS (dispatchToBoolean) at www.thedonnas.com
3046         - fixed <rdar://problem/3550461>: REGRESSION: repro crash in JavaScript at www.alaska.com
3047         
3048         * khtml/ecma/kjs_window.cpp:
3049         (Window::getListener): Return Null() when the listener object is
3050         null, indicating the code failed to parse. Otherwise we return a
3051         bad value which can later crash the JS interpreter.
3052
3053 2004-03-01  Darin Adler  <darin@apple.com>
3054
3055         Reviewed by Vicki.
3056
3057         - fixed Tiger build
3058
3059         * kwq/KWQXmlSimpleReader.mm: (QXmlSimpleReader::parse):
3060         Changed SAX structure initialization code so it compiles with both the newer
3061         and older libxml. Not sure this will work right with namespaces with the new
3062         libxml; we'll have to test.
3063
3064 2004-03-01  Ken Kocienda  <kocienda@apple.com>
3065
3066         Reviewed by me, as suggested by Darin
3067
3068         * khtml/misc/htmlattrs.c:
3069         (getAttrName): Generated code no longer has extraneous semicolon.
3070         * khtml/misc/htmltags.c: Generated code no longer has extraneous semicolon.
3071         (getTagName):
3072         * khtml/misc/makeattrs: Removed extraneous semicolon from end of file.
3073         * khtml/misc/maketags: Ditto.
3074
3075 2004-03-01  Ken Kocienda  <kocienda@apple.com>
3076
3077         Reviewed by me
3078
3079         * kwq/DOMInternal.h: Replaced tabs with spaces.
3080
3081 2004-03-01  Ken Kocienda  <kocienda@apple.com>
3082
3083         Reviewed by Darin
3084
3085         Changed all Objective-C DOM classes from protocols to classes, using
3086         a class cluster-like approach.
3087
3088         * WebCore.pbproj/project.pbxproj:
3089         * khtml/dom/html_object.cpp: Put code in DOM namespace.
3090         * khtml/html/html_headimpl.cpp: Pull in entire DOM namespace in using directive to
3091         make up for the removal of it from htmlattrs.
3092         * khtml/html/htmltokenizer.cpp: Add using directives for the DOM classes used.
3093         * khtml/misc/htmlattrs.c:
3094         (getAttrName):
3095         * khtml/misc/htmlattrs.h: 
3096         * khtml/misc/htmltags.c:
3097         (getTagName):
3098         * khtml/misc/makeattrs: Some changes here to avoid pulling in the entire DOM namespace.
3099         Explicitly use DOM namespace scoping for DOMString.
3100         * khtml/misc/maketags: Explicitly use DOM namespace scoping for DOMString.
3101         * khtml/rendering/render_form.cpp: Pull in entire DOM namespace in using directive to
3102         make up for the removal of it from htmlattrs.
3103         * kwq/DOM-compat.h:
3104         * kwq/DOM.h:
3105         * kwq/DOM.mm: Added.
3106         * kwq/WebCoreDOM.h: Removed.
3107         * kwq/WebCoreDOM.mm: Removed.
3108
3109 2004-02-26  Maciej Stachowiak  <mjs@apple.com>
3110
3111         Reviewed by John.
3112
3113         <rdar://problem/3514733>: nil-deref in createHTMLEventListener at skiset.com
3114         <rdar://problem/3510676>: nil-deref of view in DocumentImpl::createHTMLEventListener at kirotv.com
3115         
3116         * khtml/xml/dom_docimpl.cpp:
3117         (DocumentImpl::createHTMLEventListener): Don't create the listener if there is no
3118         part. Also, get the part when going through the view. This prevents problems when
3119         handlers are set or removed from the onUnload handler.
3120
3121 2004-02-27  Maciej Stachowiak  <mjs@apple.com>
3122
3123         Reviewed by Dave.
3124
3125         - fixed <rdar://problem/3571356>: REGRESSION: Crash in isPointInsideSelection clicking on link in Apple web directory frame
3126         
3127         * khtml/khtml_part.cpp:
3128         (KHTMLPart::isPointInsideSelection): Don't crash if innerNode is
3129         NULL, as this can happen mousing over a frame that's in the
3130         process of loading and currently empty. Since such a frame
3131         obviously can't be inside the selection, this seems like a good
3132         enough fix.
3133         
3134 2004-02-26  David Hyatt  <hyatt@apple.com>
3135
3136         Fix for 3528839, wide table cut off because of shorts being used instead of ints.
3137         
3138         Reviewed by darin
3139
3140         * khtml/rendering/render_table.cpp:
3141         (RenderTableSection::layoutRows):
3142         (RenderTableCell::setWidth):
3143         * khtml/rendering/table_layout.cpp:
3144         (FixedTableLayout::calcWidthArray):
3145         (FixedTableLayout::calcMinMaxWidth):
3146         (AutoTableLayout::calcMinMaxWidth):
3147
3148 2004-02-26  Chris Blumenberg  <cblu@apple.com>
3149
3150         Fixed a few problems I found with reconstructed source while on my way to implementing "Mail Page".
3151
3152         Reviewed by hyatt.
3153
3154         * khtml/html/html_headimpl.cpp:
3155         (HTMLLinkElementImpl::isSubresourceURLAttribute): only true for stylesheet and icon
3156         * khtml/html/html_imageimpl.cpp:
3157         (HTMLAreaElementImpl::isURLAttribute): implement isURLAttribute not isSubresourceURLAttribute
3158         * khtml/html/html_imageimpl.h:
3159         * khtml/rendering/render_box.cpp:
3160         (RenderBox::dirtyLineBoxes): crasher fix that I found using libgmalloc
3161         * khtml/xml/dom_nodeimpl.cpp:
3162         (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 
3163         * kwq/WebCoreBridge.mm:
3164         (-[WebCoreBridge HTMLString:]): call recursive_toHTMLWithOptions on the first child of the document so <#document /> isn't part of the source
3165
3166 2004-02-26  David Hyatt  <hyatt@apple.com>
3167
3168         Convert render object widths from short to int.  There was a bug on this, but I can't find it in Radar.
3169         
3170         Reviewed by john
3171
3172         * khtml/rendering/render_applet.cpp:
3173         (RenderApplet::intrinsicWidth):
3174         (RenderEmptyApplet::intrinsicWidth):
3175         * khtml/rendering/render_applet.h:
3176         * khtml/rendering/render_block.cpp:
3177         (khtml::RenderBlock::calcMinMaxWidth):
3178         (khtml::RenderBlock::calcInlineMinMaxWidth):
3179         * khtml/rendering/render_block.h:
3180         * khtml/rendering/render_box.cpp:
3181         (RenderBox::contentWidth):
3182         (RenderBox::width):
3183         (RenderBox::containingBlockWidth):
3184         (RenderBox::calcReplacedWidth):
3185         (RenderBox::setStaticX):
3186         * khtml/rendering/render_box.h:
3187         (khtml::RenderBox::minWidth):
3188         (khtml::RenderBox::maxWidth):
3189         * khtml/rendering/render_br.h:
3190         (khtml::RenderBR::minWidth):
3191         (khtml::RenderBR::maxWidth):
3192         * khtml/rendering/render_canvas.cpp:
3193         (RenderCanvas::layout):
3194         * khtml/rendering/render_flexbox.cpp:
3195         (khtml::RenderFlexibleBox::calcMinMaxWidth):
3196         * khtml/rendering/render_frames.cpp:
3197         (RenderPart::intrinsicWidth):
3198         (RenderPartObject::layout):
3199         * khtml/rendering/render_frames.h:
3200         * khtml/rendering/render_image.cpp:
3201         (RenderImage::layout):
3202         (RenderImage::calcReplacedWidth):
3203         * khtml/rendering/render_image.h:
3204         * khtml/rendering/render_inline.cpp:
3205         (RenderInline::width):
3206         * khtml/rendering/render_inline.h:
3207         * khtml/rendering/render_layer.cpp:
3208         (RenderLayer::scrollWidth):
3209         * khtml/rendering/render_layer.h:
3210         (khtml::RenderLayer::width):
3211         (khtml::RenderLayer::setWidth):
3212         (khtml::RenderLayer::scrollXOffset):
3213         * khtml/rendering/render_line.h:
3214         (khtml::InlineBox::setWidth):
3215         (khtml::InlineBox::width):
3216         (khtml::InlineBox::setXPos):
3217         (khtml::InlineBox::xPos):
3218         * khtml/rendering/render_object.cpp:
3219         (RenderObject::containingBlockWidth):
3220         * khtml/rendering/render_object.h:
3221         (khtml::RenderObject::setStaticX):
3222         (khtml::RenderObject::contentWidth):
3223         (khtml::RenderObject::intrinsicWidth):
3224         (khtml::RenderObject::width):
3225         (khtml::RenderObject::offsetWidth):
3226         (khtml::RenderObject::minWidth):
3227         (khtml::RenderObject::maxWidth):
3228         * khtml/rendering/render_replaced.h:
3229         (khtml::RenderReplaced::intrinsicWidth):
3230         * khtml/rendering/render_table.cpp:
3231         (RenderTable::calcWidth):
3232         * khtml/rendering/render_table.h:
3233         * khtml/rendering/render_text.cpp:
3234         (RenderText::trimmedMinMaxWidth):
3235         (RenderText::width):
3236         * khtml/rendering/render_text.h:
3237         (khtml::RenderText::minWidth):
3238         (khtml::RenderText::maxWidth):
3239         * khtml/rendering/table_layout.cpp:
3240
3241 2004-02-26  Trey Matteson  <trey@apple.com>
3242
3243         3566668 - REGRESSION (125-128): autofill of popup lists is broken
3244         3571271 - autofill parsing of field names should treat _ as a word separator
3245
3246         Reviewed by Chris, Darin
3247
3248         * kwq/KWQComboBox.h:
3249         * kwq/KWQComboBox.mm:
3250         (QComboBox::populate):   New virtual method to force any lazy field population to happen.
3251         * kwq/KWQKHTMLPart.mm:
3252         (KWQKHTMLPart::matchLabelsAgainstElement):  Change _ to ' ', to make it a word separator.
3253         * kwq/KWQWidget.h:
3254         (QWidget::populate):  Implement populate to fill out the menu's data.
3255         * kwq/WebCoreBridge.mm:
3256         (viewForElement):    Make sure widget is populated before handing it out.
3257
3258 2004-02-26  Ken Kocienda  <kocienda@apple.com>
3259
3260         Reviewed by Chris
3261
3262         * WebCore.pbproj/project.pbxproj:
3263         * khtml/xml/dom2_rangeimpl.h: Now includes createInstance glue function as do the other
3264         khtml DOM objects that we reflect into ObjC.
3265         * kwq/DOM-compat.h: Added. Compatibility declarations for DOM SPI. Note that this file 
3266         is copied into WebKit by the build system as needed.
3267         * kwq/DOM.h: Added. New home for DOM SPI. Note that this file is copied into WebKit by the build 
3268         system as needed.
3269         * kwq/KWQKHTMLPart.mm:
3270         (KWQKHTMLPart::recordFormValue): Updated usage to new DOM SPI.
3271         * kwq/WebCoreBridge.h: Updated usage to new DOM SPI.
3272         * kwq/WebCoreBridge.mm: Updated usage to new DOM SPI. Needed to add DOM range impl include since
3273         includes jiggered around and this needed header was no longer included indirectly.
3274         (-[WebCoreBridge elementForView:]): Ditto.
3275         (inputElementFromDOMElement): Ditto.
3276         (formElementFromDOMElement): Ditto.
3277         (-[WebCoreBridge elementWithName:inForm:]): Ditto.
3278         (-[WebCoreBridge elementDoesAutoComplete:]): Ditto.
3279         (-[WebCoreBridge elementIsPassword:]): Ditto.
3280         (-[WebCoreBridge currentForm]): Ditto.
3281         (-[WebCoreBridge controlsInForm:]): Ditto.
3282         (-[WebCoreBridge searchForLabels:beforeElement:]): Ditto.
3283         (-[WebCoreBridge matchLabels:againstElement:]): Ditto.
3284         (-[WebCoreBridge elementAtPoint:]): Ditto.
3285         (-[WebCoreBridge DOMDocument]): Ditto.
3286         (-[WebCoreBridge setSelectionFrom:startOffset:to:endOffset:]): Ditto.
3287         (-[WebCoreBridge attributedStringFrom:startOffset:to:endOffset:]): Ditto.
3288         (-[WebCoreBridge selectionStart]): Ditto.
3289         (-[WebCoreBridge selectionEnd]): Ditto.
3290         * kwq/WebCoreDOM.h: New home for all private declarations needed for reflecting DOM into ObjC.
3291         * kwq/WebCoreDOM.mm: Added. New home for all implementations needed for reflecting DOM into ObjC.
3292         * kwq/WebCoreDOMDocument.mm: Removed. All ObjC DOM implementation now in WebCoreDOM.mm.
3293         * kwq/WebCoreDOMNode.mm: Removed. All ObjC DOM implementation now in WebCoreDOM.mm.
3294         * kwq/WebCoreDOMPrivate.h: Removed.
3295         * kwq/WebDOMDocument.h: Removed.
3296         * kwq/WebDOMElement.h: Removed.
3297         * kwq/WebDOMNode.h: Removed.
3298
3299 2004-02-25  John Sullivan  <sullivan@apple.com>
3300
3301         WebCore part of fix for <rdar://problem/3546370>: add a way to tab to menus, 
3302         checkmarks, and buttons without turning on Full Keyboard Acceess
3303
3304         Reviewed by Ken.
3305
3306         * kwq/KWQKHTMLPart.h:
3307         * kwq/KWQKHTMLPart.mm:
3308         (KWQKHTMLPart::tabsToAllControls):
3309         now checks for option-tab like tabsToLinks
3310         (KWQKHTMLPart::partForWidget):
3311         new method, extracted from bridgeForWidget
3312         (KWQKHTMLPart::bridgeForWidget):
3313         now calls extracted method
3314
3315         * kwq/KWQButton.mm:
3316         (-[KWQButton canBecomeKeyView]):
3317         overridden to handle our rules about full keyboard access, different
3318         than NSView's rules
3319         * kwq/KWQComboBox.mm:
3320         (-[KWQPopUpButton canBecomeKeyView]):
3321         ditto
3322         * kwq/KWQListBox.mm:
3323         (-[KWQTableView canBecomeKeyView]):
3324         ditto
3325         
3326 2004-02-24  Darin Adler  <darin@apple.com>
3327
3328         Reviewed by Ken.
3329
3330         * kwq/KWQString.mm: (QString::endsWith): Fixed broken end of string test, to get rid
3331         of false positives.
3332
3333         * WebCore-tests.exp: Added endsWith so it can be tested.
3334         * WebCore-combined.exp: Regenerated.
3335
3336 2004-02-23  David Hyatt  <hyatt@apple.com>
3337
3338         Fix for 3549772, hangs on border collapsing.
3339         
3340         Reviewed by darin
3341
3342         * khtml/rendering/render_object.cpp:
3343         (RenderObject::collectBorders):
3344         * khtml/rendering/render_object.h:
3345         * khtml/rendering/render_table.cpp:
3346         (RenderTable::paint):
3347         (compareBorders):
3348         (RenderTableCell::paint):
3349         (addBorderStyle):
3350         (RenderTableCell::collectBorders):
3351         * khtml/rendering/render_table.h:
3352
3353 2004-02-23  David Hyatt  <hyatt@apple.com>
3354
3355         Fix for 3558717, make sure that form elements that are removed from a document also remove themselves
3356         from the form.
3357
3358         Reviewed by darin.
3359         
3360         * khtml/html/html_formimpl.cpp:
3361         (HTMLGenericFormElementImpl::removedFromDocument):
3362         * khtml/html/html_formimpl.h:
3363         * khtml/xml/dom_nodeimpl.cpp:
3364         * khtml/xml/dom_nodeimpl.h:
3365
3366         Implement smarter line layout for faster typing and repainting when individual lines change.
3367
3368         Reviewed by kocienda.
3369         
3370         * khtml/khtmlview.cpp:
3371         (KHTMLViewPrivate::KHTMLViewPrivate):
3372         (KHTMLViewPrivate::~KHTMLViewPrivate):
3373         (KHTMLViewPrivate::reset):
3374         (KHTMLView::addRepaintInfo):
3375         (KHTMLView::layout):
3376         * khtml/khtmlview.h:
3377         * khtml/rendering/bidi.cpp:
3378         (khtml::Bidinext):
3379         (khtml::appendRun):
3380         (khtml::embed):
3381         (khtml::RenderBlock::constructLine):
3382         (khtml::RenderBlock::computeHorizontalPositionsForLine):
3383         (khtml::RenderBlock::computeVerticalPositionsForLine):
3384         (khtml::RenderBlock::bidiReorderLine):
3385         (khtml::buildCompactRuns):
3386         (khtml::RenderBlock::layoutInlineChildren):
3387         (khtml::RenderBlock::determineStartPosition):
3388         (khtml::RenderBlock::determineEndPosition):
3389