538eba5d8f4b184fbe59f015c8d2648d8dd844d0
[WebKit-https.git] / WebCore / ChangeLog-2005-08-23
1 2004-05-20  Ken Kocienda  <kocienda@apple.com>
2
3         Reviewed by Hyatt
4
5         Provide the methods to glue the WebView's editing delegate so that these methods work:
6         
7         <rdar://problem/3655316>: "Editing:Ê-webViewShouldBeginEditing:inDOMRange:ÊmethodÊunimplementedÊ(WebKitÊeditingÊAPI)"
8         <rdar://problem/3655317>: "Editing:Ê-webViewShouldEndEditing:inDOMRange:ÊmethodÊunimplementedÊ(WebKitÊeditingÊAPI)"
9
10         While I was in the neighborhood and working on understanding focus shifts, I fixed this bug as well:
11         
12         <rdar://problem/3645154>: "contentEditable div receives focus and blur twice when focus changes to new element"
13
14         * khtml/khtml_part.cpp:
15         (KHTMLPart::invalidateSelection): Do not move focus in this function. That is just a mistake. This function
16         is all about redraw.
17         (KHTMLPart::selectionLayoutChanged): New function. Factor out the redraw parts of notifySelectionChanged so
18         that invalidateSelection can call it.
19         (KHTMLPart::notifySelectionChanged): Call selectionLayoutChanged now that the redraw parts have been
20         factored out.
21         (KHTMLPart::shouldBeginEditing): New function that calls through to the KWQKHTMLPart in an APPLE_CHANGES
22         block. This is part of the code path that will eventually The WebView's delegate to ask the
23         shouldBeginEditing question. 
24         (KHTMLPart::shouldEndEditing): Ditto, except the question is about shouldEndEditing.
25         * khtml/khtml_part.h:
26         * khtml/khtmlview.cpp:
27         (KHTMLView::dispatchMouseEvent): Now looks at the boolean value returned from DocumentImpl::setFocusNode 
28         (described below). If the focus shift was blocked, swallow the mouse event.
29         * khtml/xml/dom_docimpl.cpp:
30         (DocumentImpl::relinquishesEditingFocus): Part of the WebView's delegation call chain described above.
31         (DocumentImpl::acceptsEditingFocus): Ditto.
32         (DocumentImpl::setFocusNode): Many improvements. Now handles WebView delegation and switching focus
33         in the handlers called as a result of the DOM events that this function calls. Also now returns a 
34         boolean to say whether the attempt to set focus was blocked by a handler or by the WebView's delegate.
35         * khtml/xml/dom_docimpl.h:
36         * kwq/KWQKHTMLPart.h:
37         * kwq/KWQKHTMLPart.mm:
38         (KWQKHTMLPart::shouldBeginEditing): More WebView's delegation glue.
39         (KWQKHTMLPart::shouldEndEditing): Ditto.
40         * kwq/WebCoreBridge.h:
41
42 2004-05-20  Richard Williamson   <rjw@apple.com>
43
44         Reviewed by NOBODY (OOPS!).
45
46         * kwq/DOM.mm:
47         (-[DOMObject _init]):
48         * kwq/DOMInternal.mm:
49         (-[WebScriptObject _init]):
50         (-[WebScriptObject _initializeScriptDOMNodeImp]):
51         * kwq/KWQKHTMLPart.h:
52         * kwq/KWQKHTMLPart.mm:
53         (KWQKHTMLPart::KWQKHTMLPart):
54         (KWQKHTMLPart::bindingRootObject):
55         (KWQKHTMLPart::windowScriptObject):
56
57 2004-05-20  Darin Adler  <darin@apple.com>
58
59         Reviewed by Ken.
60
61         - fixed <rdar://problem/3661918>: "repro nil-deref in RenderImage::paint (www.codepoetry.net)"
62
63         * khtml/rendering/render_image.cpp: (RenderImage::paint): Check renderer pointer to see if it's
64         nil before dereferencing it.
65
66         - fixed <rdar://problem/3658455>: "readFromData:options:documentAttributes: crashes when passed page without a body (in WebKit mode)"
67
68         * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::bodyBackgroundColor): Check renderer pointer to see if it's
69         nil before dereferencing it.
70
71         - fixed <rdar://problem/2948112>: "implement addRule for JavaScript for style sheets"
72
73         * khtml/dom/css_stylesheet.h: Added addRule.
74         * khtml/dom/css_stylesheet.cpp: (CSSStyleSheet::addRule): Added.
75         * khtml/css/css_stylesheetimpl.h: Added addRule.
76         * khtml/css/css_stylesheetimpl.cpp: (CSSStyleSheetImpl::addRule): Added an implementation
77         based on the Microsoft documentation. An index of -1 means "at the end of the list".
78
79         * khtml/dom/dom_string.h: Changed the string-append operator to be a non-member function
80         so it works even if the left side has to undergo type conversion.
81         * khtml/dom/dom_string.cpp: (DOM::operator+): Changed implementation to match above.
82         Also changed to not use anything private or protected so it doesn't have to be a friend.
83
84         * khtml/ecma/kjs_css.h: Added addRule to the list of functions for CSS style sheets.
85         * khtml/ecma/kjs_css.cpp: (DOMCSSStyleSheetProtoFunc::tryCall): Add support for addRule,
86         based on the Microsoft documentation; always returns -1. Also removed unused string conversions.
87         * khtml/ecma/kjs_css.lut.h: Regenerated.
88
89 2004-05-19  David Hyatt  <hyatt@apple.com>
90
91         Implement support for notification posting to accessibility clients for layouts and loads.
92         
93         * khtml/khtmlview.cpp:
94         (KHTMLView::layout):
95         * khtml/xml/dom_docimpl.cpp:
96         (DocumentImpl::close):
97         * kwq/KWQAccObjectCache.h:
98         (KWQAccObjectCache::enableAccessibility):
99         (KWQAccObjectCache::accessibilityEnabled):
100         * kwq/KWQAccObjectCache.mm:
101         (KWQAccObjectCache::accObject):
102         (KWQAccObjectCache::setAccObject):
103         (KWQAccObjectCache::removeAccObject):
104         (KWQAccObjectCache::detach):
105         (KWQAccObjectCache::childrenChanged):
106         (KWQAccObjectCache::postNotification):
107         * kwq/WebCoreBridge.mm:
108         (-[WebCoreBridge accessibilityTree]):
109
110 2004-05-19  Chris Blumenberg  <cblu@apple.com>
111
112         Tweaks for forthcoming dragging improvements.
113
114         Reviewed by john.
115
116         * kwq/WebCoreBridge.h:
117         * kwq/WebCoreBridge.mm:
118         (-[WebCoreBridge moveDragCaretToPoint:]): renamed for future reasons, removed text only restrictions
119
120 2004-05-19  Ken Kocienda  <kocienda@apple.com>
121
122         Reviewed by Hyatt and Darin
123
124         Fix for this bug:
125         
126         <rdar://problem/3643230>: "can't tab out of contentEditable Elements"
127
128         * khtml/xml/dom_elementimpl.cpp: Now checks if key event was intercepted by the editing
129         key-handler before setting the event as defaultHandled.
130         (ElementImpl::defaultEventHandler):
131         * kwq/KWQKHTMLPart.h: Name change from editingKeyEvent.
132         Also now returns a BOOL to report whether the event was handled or not.
133         * kwq/KWQKHTMLPart.mm: 
134         (KWQKHTMLPart::interceptEditingKeyEvent): Ditto.
135         * kwq/WebCoreBridge.h: Renamed from _editingKeyDown.
136
137 2004-05-19  Ken Kocienda  <kocienda@apple.com>
138
139         Reviewed by John
140
141         Fix for this bug:
142         
143         <rdar://problem/3655601>: "deleting characters is much slower than inserting them"
144
145         Cleaned up the way selections are set in edit commands, and how KHTMLPart is
146         notified of these changes. This clears up a number of inefficiencies, including unnecessary repaints
147         which were causing the performace problem.
148
149         * khtml/editing/htmlediting.cpp: Removed moveToStartingSelection and moveToEndingSelection functions.
150         This work is going to be done using another pre-existing communication facility shared by edit commands
151         and the part.
152         * khtml/editing/htmlediting.h: Ditto.
153         * khtml/editing/htmlediting_impl.cpp:
154         (khtml::EditCommandImpl::setStartingSelection): Fix coding mistake which caused double recursion while setting
155         ancestor values.
156         (khtml::EditCommandImpl::setEndingSelection): Ditto.
157         (khtml::CompositeEditCommandImpl::doUnapply): No longer calls moveToStartingSelection. Work done in the part now.
158         (khtml::CompositeEditCommandImpl::doReapply): No longer calls moveToEndingSelection. Work done in the part now.
159         (khtml::TypingCommandImpl::typingAddedToOpenCommand): New function. Provides a hook for
160         typing commands to tell the part about additional typing that has been done.
161         (khtml::TypingCommandImpl::insertText): Now calls typingAddedToOpenCommand.
162         (khtml::TypingCommandImpl::insertNewline): Ditto.
163         (khtml::TypingCommandImpl::issueCommandForDeleteKey): Ditto.
164         (khtml::TypingCommandImpl::deleteKeyPressed): Ditto.
165         * khtml/editing/htmlediting_impl.h: Removed moveToStartingSelection and moveToEndingSelection functions.
166         * khtml/khtml_part.cpp:
167         (KHTMLPart::setSelection): Modified to take an argument which tells whether the set closes an active
168         typing command.
169         (KHTMLPart::notifySelectionChanged): Changed endTyping variable to be consistent with "close typing"
170         terminology used elsewhere.
171         (KHTMLPart::appliedEditing): Now sets the selection using the value of the passed-in command. Added
172         an assert for typing cases. Fixed problem where didChangeNotification was not being posted for typing
173         changes after the first one.
174         (KHTMLPart::unappliedEditing): Now sets the selection using the value of the passed-in command.
175         (KHTMLPart::reappliedEditing): Now sets the selection using the value of the passed-in command.
176         * khtml/khtml_part.h:
177         * khtml/rendering/render_canvas.cpp:
178         (RenderCanvas::clearSelection): Do not call repaint when the selection is a caret.
179
180 2004-05-19  Ken Kocienda  <kocienda@apple.com>
181
182         Reviewed by Hyatt
183
184         * khtml/html/html_elementimpl.cpp:
185         (HTMLElementImpl::isContentEditable): Ask if the part is contenteditable.
186         True value is treated as an "override" and will short-circuit, returning true.
187         * khtml/khtml_part.cpp:
188         (KHTMLPart::isContentEditable): Call over bridge. Has the effect of checking the
189         isEditable method on the WebView which contains this part.
190         * khtml/khtml_part.h: Declare isContentEditable.
191         * kwq/KWQKHTMLPart.h: Declare isContentEditable.
192         * kwq/KWQKHTMLPart.mm:
193         (KWQKHTMLPart::isContentEditable): Call over bridge, as described above.
194         * kwq/WebCoreBridge.h: Declare isEditable.
195
196 2004-05-19  Darin Adler  <darin@apple.com>
197
198         - fixed headers with licenses mangled by Xcode auto-indenting
199
200         * kwq/DOMExtensions.h:
201         * kwq/KWQAccObject.h:
202         * kwq/KWQAccObject.mm:
203         * kwq/KWQAccObjectCache.h:
204         * kwq/KWQKSSLKeyGen.mm:
205         * kwq/KWQScrollBar.mm:
206         * kwq/KWQSlider.mm:
207         * kwq/WebCoreGraphicsBridge.h:
208         * kwq/WebCoreGraphicsBridge.m:
209         * kwq/WebCoreKeyGenerator.h:
210         * kwq/WebCoreKeyGenerator.m:
211
212 2004-05-18  David Hyatt  <hyatt@apple.com>
213
214         Add two new attributes for accessibility that can be polled by the screen reader.  AXLayoutCount indicates
215         the number of layouts that have occurred, and AXLoaded indicates whether or not a page has finished loading.
216         
217         * khtml/khtmlview.cpp:
218         (KHTMLViewPrivate::reset):
219         (KHTMLView::layoutCount):
220         (KHTMLView::layout):
221         * khtml/khtmlview.h:
222         * kwq/KWQAccObject.mm:
223         (-[KWQAccObject roleDescription]):
224         (-[KWQAccObject accessibilityAttributeNames]):
225         (-[KWQAccObject accessibilityAttributeValue:]):
226
227 2004-05-18  David Hyatt  <hyatt@apple.com>
228
229         Fix crash when retrieving the AXHelp text.
230         
231         * kwq/KWQAccObject.mm:
232         (-[KWQAccObject helpText]):
233
234 2004-05-18  David Hyatt  <hyatt@apple.com>
235
236         Improve layout scheduling and add instrumentation for debugging layout scheduling
237         
238         Reviewed by kocienda
239
240         * khtml/khtml_part.cpp:
241         (KHTMLPart::slotFinishedParsing):
242         (KHTMLPart::checkCompleted):
243         * khtml/khtmlview.cpp:
244         (KHTMLViewPrivate::KHTMLViewPrivate):
245         (KHTMLViewPrivate::reset):
246         (KHTMLView::layout):
247         (KHTMLView::scheduleRelayout):
248         (KHTMLView::haveDelayedLayoutScheduled):
249         (KHTMLView::unscheduleRelayout):
250         * khtml/khtmlview.h:
251         * khtml/rendering/render_object.cpp:
252         (RenderObject::repaintAfterLayoutIfNeeded):
253         * khtml/rendering/render_replaced.cpp:
254         (RenderWidget::updateWidgetPositions):
255         * khtml/xml/dom_docimpl.cpp:
256         (DocumentImpl::DocumentImpl):
257         (DocumentImpl::close):
258         (DocumentImpl::setParsing):
259         (DocumentImpl::shouldScheduleLayout):
260         (DocumentImpl::minimumLayoutDelay):
261         (DocumentImpl::elapsedTime):
262         (DocumentImpl::finishParsing):
263         (DocumentImpl::updateStyleSelector):
264         * khtml/xml/dom_docimpl.h:
265         (DOM::DocumentImpl::allDataReceived):
266         * kwq/KWQDateTime.h:
267         * kwq/KWQDateTime.mm:
268         (QTime::elapsed):
269         * kwq/KWQWidget.mm:
270         (QWidget::setFrameGeometry):
271
272 2004-05-18  Richard Williamson   <rjw@apple.com>
273
274         Finished implementing support for windowScriptObject.
275
276         Reviewed by Maciej.
277
278         * khtml/khtml_part.cpp:
279         (KHTMLPart::begin):
280         * kwq/KWQKHTMLPart.h:
281         * kwq/KWQKHTMLPart.mm:
282         (KWQKHTMLPart::KWQKHTMLPart):
283         (KWQKHTMLPart::~KWQKHTMLPart):
284         (KWQKHTMLPart::windowScriptObject):
285         * kwq/WebCoreBridge.mm:
286         (updateRenderingForBindings):
287
288 2004-05-18  Richard Williamson   <rjw@apple.com>
289
290         Added stubs to get the WebScriptObject for the window
291         JS object.
292         
293         Made updateRenderingForBindings more robust when handed a
294         nil root object.  This was causing a crash in DB.  Still need to
295         address root cause of nil root object.
296
297         Reviewed by Maciej.
298
299         * khtml/khtml_part.cpp:
300         (KHTMLPart::begin):
301         * kwq/KWQKHTMLPart.h:
302         * kwq/KWQKHTMLPart.mm:
303         (KWQKHTMLPart::windowScriptObject):
304         (KWQKHTMLPart::partClearedInBegin):
305         * kwq/WebCoreBridge.h:
306         * kwq/WebCoreBridge.mm:
307         (updateRenderingForBindings):
308         (-[WebCoreBridge init]):
309         (-[WebCoreBridge stringByEvaluatingJavaScriptFromString:]):
310         (-[WebCoreBridge windowScriptObject]):
311
312 2004-05-17  Maciej Stachowiak  <mjs@apple.com>
313
314         Reviewed by Ken.
315
316         <rdar://problem/3656719>: Implement outerHTML and setOuterHTML DOM extensions
317
318         They were already implemented (by Chris), all that was required
319         was exporting them to JavaScript.
320
321         * khtml/dom/html_element.cpp:
322         (HTMLElement::outerHTML): Call impl.
323         (HTMLElement::setOuterHTML): Ditto.
324         * khtml/dom/html_element.h: Prototype new methods.
325         * khtml/ecma/kjs_html.cpp:
326         (KJS::HTMLElement::getValueProperty): Add OuterHTML.
327         (KJS::HTMLElement::putValue): Add OuterHTML.
328         * khtml/ecma/kjs_html.h: Add new enum values.
329         * khtml/ecma/kjs_html.lut.h: Regenerated.
330
331 2004-05-18  Ken Kocienda  <kocienda@apple.com>
332
333         Reviewed by Hyatt
334
335         Removed support for designMode attribute, which we will not be supporting for Tiger.
336         Removed inEditMode from KHTMLPart. This cached designMode value.
337         Removed KHTMLPart::isEditingAtNode function. Asking a node if it is content-editable
338         is a suitable replacement.
339
340         * khtml/dom/dom_misc.h: Remove TristateFlag enum that was used to track designMode values.
341         * khtml/dom/html_document.cpp: Remove designMode and setDesignMode.
342         * khtml/dom/html_document.h: Ditto.
343         * khtml/ecma/kjs_html.cpp:
344         (KJS::HTMLDocument::tryGet): Remove designMode.
345         (KJS::HTMLDocument::putValue): Ditto.
346         * khtml/ecma/kjs_html.lut.h:
347         (KJS::): Ditto.
348         * khtml/html/html_documentimpl.cpp: Remove designMode and setDesignMode.
349         * khtml/html/html_documentimpl.h: Ditto.
350         * khtml/khtml_part.cpp: Remove setEditMode, editMode, inEditMode, and isEditingAtNode.
351         * khtml/khtml_part.h: Ditto.
352         * khtml/khtmlpart_p.h: Remove m_inEditMode variable.
353         (KHTMLPartPrivate::KHTMLPartPrivate):
354         * khtml/khtmlview.cpp:
355         (KHTMLView::focusNextPrevNode): Change over one use in tree of isEditingAtNode to use
356         isContentEditable instead. isContentEditable will be modified in future patch to handle
357         whether the per-part switch has been thrown to override whether something is editable or not.
358
359 2004-05-17  Richard Williamson   <rjw@apple.com>
360
361         Implemented new API for WebScriptObject.
362         Fixed <rdar://problem/3657145>: (objc to javascript method calls do not cause updates.)
363
364         Reviewed by Hyatt.
365
366         * kwq/WebCoreBridge.mm:
367         (updateRenderingForBindings):
368         (-[WebCoreBridge init]):
369
370 2004-05-14  Vicki Murley  <vicki@apple.com>
371
372         Reviewed by mjs.
373  
374         <rdar://problem/3642427>: framework marketing number should be 2.0 for DoubleBarrel release
375
376         * WebCore.pbproj/project.pbxproj: change CFBundleShortVersionString to 2.0
377
378 2004-05-14  Darin Adler  <darin@apple.com>
379
380         Reviewed by Darin, coded by Maciej.
381
382         - fixed extra repaints when doing auto-fill checks on all pages that have pop-up buttons
383
384         * kwq/KWQComboBox.mm:
385         (QComboBox::populateMenu): Set the populating-menu flag and clear it when done.
386         (-[KWQPopUpButton setPopulatingMenu:]): Added. Sets flag.
387         (-[KWQPopUpButton setNeedsDisplayInRect:]): Do nothing if the flag is set.
388
389 2004-05-14  Darin Adler  <darin@apple.com>
390
391         Reviewed by Dave.
392
393         - fixed <rdar://problem/3650026>: "background property doesn't work right on webdevtips.com due to background:inherit"
394
395         * khtml/css/cssstyleselector.cpp: (khtml::CSSStyleSelector::applyDeclarations):
396         Added CSS_PROP_BACKGROUND to the list of properties that must be applied in the first pass.
397
398 === Safari-140 ===
399
400 2004-05-13  David Hyatt  <hyatt@apple.com>
401
402         Fix image loading for <input type=image> and <object>.  Make sure it works dynamically and make sure
403         the renderer is properly null-checked at attach time.
404         
405         Reviewed by darin
406
407         * khtml/html/html_formimpl.cpp:
408         (HTMLInputElementImpl::HTMLInputElementImpl):
409         (HTMLInputElementImpl::~HTMLInputElementImpl):
410         (HTMLInputElementImpl::parseHTMLAttribute):
411         (HTMLInputElementImpl::attach):
412         * khtml/html/html_formimpl.h:
413         * khtml/html/html_objectimpl.cpp:
414         (HTMLObjectElementImpl::HTMLObjectElementImpl):
415         (HTMLObjectElementImpl::~HTMLObjectElementImpl):
416         (HTMLObjectElementImpl::parseHTMLAttribute):
417         (HTMLObjectElementImpl::attach):
418         * khtml/html/html_objectimpl.h:
419
420 2004-05-14  Chris Blumenberg  <cblu@apple.com>
421
422         - Made DOMEventTarget a formal protocol that is implemented by DOMNode
423         - Made DOMEventListener a formal protocol that any object can implement
424
425         Reviewed by kocienda.
426
427         * kwq/DOMCore.h:
428         * kwq/DOMEvents.h:
429
430 2004-05-13  Richard Williamson   <rjw@apple.com>
431
432         Removed vestigial isSelected method.
433
434         Reviewed by Chris.
435
436         * kwq/KWQWidget.h:
437         * kwq/KWQWidget.mm:
438         (QWidget::setIsSelected):
439         * kwq/WebCoreBridge.h:
440
441 2004-05-13  Chris Blumenberg  <cblu@apple.com>
442
443         Fixed: <rdar://problem/3616555>: (API: Make DOM extensions and WebKit DOM operations public)
444
445         Reviewed by rjw.
446
447         * kwq/DOM.h: added DOMExtensions.h
448         * kwq/DOMHTML.h: renamed frame on DOMHTMLTableElement to frameBorders to avoid NSView conflicts
449         * kwq/DOMHTML.mm:
450         (-[DOMHTMLTableElement frameBorders]):
451         (-[DOMHTMLTableElement setFrameBorders:]):
452
453 2004-05-13  Richard Williamson   <rjw@apple.com>
454
455         Changed imports of all DOM headers.  DOM headers
456         should be imported using the normal #import <WebCore/foo.h>,
457         they import is modified when copied to WebKit.
458
459         Reviewed by Chris.
460
461         * ChangeLog:
462         * kwq/DOM.h:
463         * kwq/DOMCSS.h:
464         * kwq/DOMCore.h:
465         * kwq/DOMEvents.h:
466         * kwq/DOMExtensions.h:
467         * kwq/DOMHTML.h:
468         * kwq/DOMInternal.h:
469         * kwq/DOMRange.h:
470         * kwq/DOMStylesheets.h:
471         * kwq/DOMTraversal.h:
472         * kwq/DOMViews.h:
473
474 2004-05-13  Ken Kocienda  <kocienda@apple.com>
475
476         Reviewed by me
477
478         * khtml/editing/htmlediting_impl.cpp:
479         (khtml::ApplyStyleCommandImpl::applyStyleIfNeeded): Fix deployment
480         build bustage. Uninitialized variable.
481
482 2004-05-13  Ken Kocienda  <kocienda@apple.com>
483
484         Reviewed by Hyatt
485
486         Implemented first cut at text style change code.
487
488         * khtml/editing/htmlediting.cpp:
489         (khtml::ApplyStyleCommand::ApplyStyleCommand):
490         (khtml::ApplyStyleCommand::~ApplyStyleCommand):
491         (khtml::ApplyStyleCommand::impl):
492         (khtml::RemoveCSSPropertyCommand::RemoveCSSPropertyCommand):
493         (khtml::RemoveCSSPropertyCommand::~RemoveCSSPropertyCommand):
494         (khtml::RemoveCSSPropertyCommand::impl):
495         (khtml::RemoveCSSPropertyCommand::styleDeclaration):
496         (khtml::RemoveCSSPropertyCommand::property):
497         (khtml::RemoveNodeAttributeCommand::RemoveNodeAttributeCommand):
498         (khtml::RemoveNodeAttributeCommand::~RemoveNodeAttributeCommand):
499         (khtml::RemoveNodeAttributeCommand::impl):
500         (khtml::RemoveNodeAttributeCommand::element):
501         (khtml::RemoveNodeAttributeCommand::attribute):
502         (khtml::RemoveNodePreservingChildrenCommand::RemoveNodePreservingChildrenCommand):
503         (khtml::RemoveNodePreservingChildrenCommand::~RemoveNodePreservingChildrenCommand):
504         (khtml::RemoveNodePreservingChildrenCommand::impl):
505         (khtml::RemoveNodePreservingChildrenCommand::node):
506         (khtml::SetNodeAttributeCommand::SetNodeAttributeCommand):
507         (khtml::SetNodeAttributeCommand::~SetNodeAttributeCommand):
508         (khtml::SetNodeAttributeCommand::impl):
509         (khtml::SetNodeAttributeCommand::element):
510         (khtml::SetNodeAttributeCommand::attribute):
511         (khtml::SetNodeAttributeCommand::value):
512         * khtml/editing/htmlediting.h:
513         (khtml::):
514         (khtml::ApplyStyleCommand::):
515         
516         Removed a bunch of unnecessary DOM namespace qualifiers.
517         Fixed calls to parent(), which relied on the TreeShared interface to get a parent,
518         and changed to the parentNode() DOM Node call, which is more suitable given the
519         intention.
520         
521         * khtml/editing/htmlediting_impl.cpp:
522         (khtml::CompositeEditCommandImpl::insertNodeBefore):
523         (khtml::CompositeEditCommandImpl::insertNodeAfter):
524         (khtml::CompositeEditCommandImpl::appendNode):
525         (khtml::CompositeEditCommandImpl::removeNode):
526         (khtml::CompositeEditCommandImpl::removeNodeAndPrune):
527         (khtml::CompositeEditCommandImpl::removeNodePreservingChildren):
528         (khtml::CompositeEditCommandImpl::splitTextNode):
529         (khtml::CompositeEditCommandImpl::joinTextNodes):
530         (khtml::CompositeEditCommandImpl::insertText):
531         (khtml::CompositeEditCommandImpl::deleteText):
532         (khtml::CompositeEditCommandImpl::replaceText):
533         (khtml::CompositeEditCommandImpl::removeCSSProperty):
534         (khtml::CompositeEditCommandImpl::removeNodeAttribute):
535         (khtml::CompositeEditCommandImpl::setNodeAttribute):
536         
537         
538         Text style change command implementations.
539         There are a couple more parent() -> parentNode() changes in here as well.
540         
541         (khtml::ApplyStyleCommandImpl::ApplyStyleCommandImpl):
542         (khtml::ApplyStyleCommandImpl::~ApplyStyleCommandImpl):
543         (khtml::ApplyStyleCommandImpl::commandID):
544         (khtml::ApplyStyleCommandImpl::doApply):
545         (khtml::ApplyStyleCommandImpl::isHTMLStyleNode):
546         (khtml::ApplyStyleCommandImpl::removeHTMLStyleNode):
547         (khtml::ApplyStyleCommandImpl::removeCSSStyle):
548         (khtml::ApplyStyleCommandImpl::removeCSSProperty):
549         (khtml::ApplyStyleCommandImpl::setNodeAttribute):
550         (khtml::ApplyStyleCommandImpl::removeNodeAttribute):
551         (khtml::ApplyStyleCommandImpl::removeNodePreservingChildren):
552         (khtml::ApplyStyleCommandImpl::mustExlicitlyApplyStyle):
553         (khtml::ApplyStyleCommandImpl::createExplicitApplyStyleNode):
554         (khtml::ApplyStyleCommandImpl::currentlyHasStyle):
555         (khtml::ApplyStyleCommandImpl::cssProperty):
556         (khtml::ApplyStyleCommandImpl::matchesTargetStyle):
557         (khtml::ApplyStyleCommandImpl::positionInsertionPoint):
558         (khtml::ApplyStyleCommandImpl::splitTextAtStartIfNeeded):
559         (khtml::ApplyStyleCommandImpl::splitTextAtEndIfNeeded):
560         (khtml::ApplyStyleCommandImpl::applyStyleIfNeeded):
561         (khtml::ApplyStyleCommandImpl::removeStyle):
562         (khtml::ApplyStyleCommandImpl::cloneSelection):
563         (khtml::ApplyStyleCommandImpl::insertFragment):
564         (khtml::ApplyStyleCommandImpl::applyInPlace):
565         (khtml::ApplyStyleCommandImpl::applyUsingFragment):
566         (khtml::DeleteSelectionCommandImpl::DeleteSelectionCommandImpl):
567         (khtml::InsertNodeBeforeCommandImpl::doApply):
568         (khtml::InsertNodeBeforeCommandImpl::doUnapply):
569         (khtml::JoinTextNodesCommandImpl::doApply):
570         (khtml::PasteMarkupCommandImpl::PasteMarkupCommandImpl):
571         (khtml::RemoveCSSPropertyCommandImpl::RemoveCSSPropertyCommandImpl):
572         (khtml::RemoveCSSPropertyCommandImpl::~RemoveCSSPropertyCommandImpl):
573         (khtml::RemoveCSSPropertyCommandImpl::commandID):
574         (khtml::RemoveCSSPropertyCommandImpl::doApply):
575         (khtml::RemoveCSSPropertyCommandImpl::doUnapply):
576         (khtml::RemoveNodeAttributeCommandImpl::RemoveNodeAttributeCommandImpl):
577         (khtml::RemoveNodeAttributeCommandImpl::~RemoveNodeAttributeCommandImpl):
578         (khtml::RemoveNodeAttributeCommandImpl::commandID):
579         (khtml::RemoveNodeAttributeCommandImpl::doApply):
580         (khtml::RemoveNodeAttributeCommandImpl::doUnapply):
581         (khtml::RemoveNodePreservingChildrenCommandImpl::RemoveNodePreservingChildrenCommandImpl):
582         (khtml::RemoveNodePreservingChildrenCommandImpl::~RemoveNodePreservingChildrenCommandImpl):
583         (khtml::RemoveNodePreservingChildrenCommandImpl::commandID):
584         (khtml::RemoveNodePreservingChildrenCommandImpl::doApply):
585         (khtml::SetNodeAttributeCommandImpl::SetNodeAttributeCommandImpl):
586         (khtml::SetNodeAttributeCommandImpl::~SetNodeAttributeCommandImpl):
587         (khtml::SetNodeAttributeCommandImpl::commandID):
588         (khtml::SetNodeAttributeCommandImpl::doApply):
589         (khtml::SetNodeAttributeCommandImpl::doUnapply):
590         (khtml::SplitTextNodeCommandImpl::doUnapply):
591         (khtml::TypingCommandImpl::insertText):
592
593
594         Text style change command implementations.
595
596         * khtml/editing/htmlediting_impl.h:
597         (khtml::ApplyStyleCommandImpl::):
598         (khtml::ApplyStyleCommandImpl::removingStyle):
599         (khtml::RemoveCSSPropertyCommandImpl::styleDeclaration):
600         (khtml::RemoveCSSPropertyCommandImpl::property):
601         (khtml::RemoveNodeAttributeCommandImpl::element):
602         (khtml::RemoveNodeAttributeCommandImpl::attribute):
603         (khtml::RemoveNodePreservingChildrenCommandImpl::node):
604         (khtml::SetNodeAttributeCommandImpl::element):
605         (khtml::SetNodeAttributeCommandImpl::attribute):
606         (khtml::SetNodeAttributeCommandImpl::value):
607         
608         
609         Fixed a bug where the TreeWalker returned the current node instead
610         of null when an attempt was made to use the iterator to go to a
611         non-existent location.
612         
613         * khtml/xml/dom2_traversalimpl.cpp:
614         (DOM::TreeWalkerImpl::parentNode):
615         (DOM::TreeWalkerImpl::firstChild):
616         (DOM::TreeWalkerImpl::lastChild):
617         (DOM::TreeWalkerImpl::previousSibling):
618         (DOM::TreeWalkerImpl::nextSibling):
619         (DOM::TreeWalkerImpl::previousNode):
620         (DOM::TreeWalkerImpl::nextNode):
621         
622         
623         A convenience.
624         
625         * khtml/xml/dom_elementimpl.cpp:
626         (ElementImpl::hasAttributes):
627         * khtml/xml/dom_elementimpl.h:
628         
629         
630         New helpers to begin moving us to using DOM Range-compliant positions in our code.
631         
632         * khtml/xml/dom_position.cpp:
633         (DOM::Position::equivalentRangeCompliantPosition):
634         (DOM::Position::equivalentShallowPosition):
635         (DOM::Position::inLastEditableInContainingEditableBlock):
636         
637         
638         (DOM::Position::debugPosition): Debugging aid.
639         * khtml/xml/dom_position.h:
640        
641         * kwq/WebCoreBridge.mm:
642         (-[WebCoreBridge applyStyle:]): First bit of wiring up. Some hard-coded temporary code 
643         in here will need to be improved soon.
644
645 2004-05-12  David Hyatt  <hyatt@apple.com>
646
647         Improve layout scheduling.  Make sure no layouts can be scheduled until over a minimum delay threshold.
648         
649         * khtml/khtmlview.cpp:
650         (KHTMLView::scheduleRelayout):
651         * khtml/rendering/render_frames.cpp:
652         (RenderPart::updateWidgetPositions):
653         * khtml/rendering/render_text.cpp:
654         (RenderText::paint):
655         * khtml/xml/dom_docimpl.cpp:
656         (DocumentImpl::DocumentImpl):
657         (DocumentImpl::close):
658         (DocumentImpl::setParsing):
659         (DocumentImpl::shouldScheduleLayout):
660         (DocumentImpl::minimumLayoutDelay):
661         * khtml/xml/dom_docimpl.h:
662
663 2004-05-11  Chris Blumenberg  <cblu@apple.com>
664
665         Support for: <rdar://problem/3616471>: (API: provide way to get from WebFrame to DOMDocument and vice versa)
666
667         Reviewed by rjw.
668
669         * kwq/DOM.mm:
670         (-[DOMDocument _ownerElement]): new
671         * kwq/DOMInternal.h:
672         * kwq/WebCoreBridge.h:
673         * kwq/WebCoreBridge.mm:
674         (-[WebCoreBridge frameElement]): new
675
676 2004-05-11  David Hyatt  <hyatt@apple.com>
677
678         Fix makeChildrenNonInline so that it does not wrap floats unless an inline is actually found.
679
680         Fix block minmaxwidth to add together contiguous runs of floats.
681
682         Fix the content image loader to not destroy the image when removed from the document.
683
684         Reviewed by darin
685         
686         * ChangeLog:
687         * khtml/html/html_imageimpl.cpp:
688         (HTMLImageLoader::~HTMLImageLoader):
689         (HTMLImageElementImpl::detach):
690         * khtml/html/html_imageimpl.h:
691         (DOM::):
692         * khtml/html/html_objectimpl.cpp:
693         (HTMLObjectElementImpl::createRenderer):
694         * khtml/html/html_objectimpl.h:
695         * khtml/rendering/render_block.cpp:
696         (khtml::getInlineRun):
697         (khtml::RenderBlock::calcInlineMinMaxWidth):
698         (khtml::RenderBlock::calcBlockMinMaxWidth):
699
700 2004-05-06  David Hyatt  <hyatt@apple.com>
701
702         Fix makeChildrenNonInline so that it does not wrap floats unless an inline is actually found.
703
704         Fix block minmaxwidth to add together contiguous runs of floats.
705
706         Fix the content image loader to not destroy the image when removed from the document.
707         
708         Reviewed by darin
709
710         * khtml/rendering/render_block.cpp:
711         (khtml::getInlineRun):
712         (khtml::RenderBlock::calcBlockMinMaxWidth):
713
714 2004-05-11  Vicki Murley  <vicki@apple.com>
715
716         Reviewed by Vicki (fixed by Darin).
717
718         * kwq/KWQKSSLKeyGen.h: fix build failure in B&I due to case sensitivity
719
720 2004-05-09  Maciej Stachowiak  <mjs@apple.com>
721
722         Reviewed by Darin.
723
724         - avoid redecoding animated images that are only used once for
725         ~2.5% iBench speedup (WebCore part of fix)
726
727         * khtml/rendering/render_image.cpp:
728         (RenderImage::setPixmap): Maintain use count for pixmap.
729         (RenderImage::~RenderImage): Likewise.
730         * kwq/KWQPixmap.h:
731         * kwq/KWQPixmap.mm:
732         (QPixmap::increaseUseCount): Call WebCoreImageRenderer
733         (QPixmap::decreaseUseCount): Call WebCoreImageRenderer
734         * kwq/WebCoreImageRenderer.h: Prototype new protocol methods.
735
736 2004-05-10  David Hyatt  <hyatt@apple.com>
737
738         Make sure that when finished parsing if all the right conditions are met, we just go ahead and updateRendering and
739         layout.
740         
741         Reviewed by rjw
742         
743         * khtml/khtmlview.cpp:
744         (KHTMLView::scheduleRelayout):
745
746 2004-05-08  Maciej Stachowiak  <mjs@apple.com>
747
748         Reviewed by Dave.
749
750         - some minor performance tweaks that together give .5% or so on
751         the HTML iBench
752         
753         * khtml/css/css_valueimpl.h: don't use a bitfield for id and important,
754         unpacking the bitfield is too expensive
755         * kwq/KWQArrayImpl.h:
756         * kwq/KWQArrayImpl.mm:
757         (KWQArrayImpl::at): inline this method because it's so hot
758         * kwq/KWQString.mm:
759         (allocateHandle): inline this function because it's so hot
760         (initializeHandleNodes): move this in the file so above can be inlined
761         (allocateNode): ditto
762
763 2004-05-10  David Hyatt  <hyatt@apple.com>
764
765         Move image loading to content.
766         
767         Reviewed by kocienda
768
769         * khtml/html/html_imageimpl.cpp:
770         (m_imageComplete):
771         (HTMLImageLoader::~HTMLImageLoader):
772         (HTMLImageLoader::updateFromElement):
773         (HTMLImageLoader::removedFromDocument):
774         (HTMLImageLoader::dispatchLoadEvent):
775         (HTMLImageLoader::notifyFinished):
776         (HTMLImageElementImpl::HTMLImageElementImpl):
777         (HTMLImageElementImpl::parseHTMLAttribute):
778         (HTMLImageElementImpl::attach):
779         (HTMLImageElementImpl::detach):
780         (HTMLImageElementImpl::removedFromDocument):
781         (HTMLImageElementImpl::currentImage):
782         * khtml/html/html_imageimpl.h:
783         (DOM::):
784         * khtml/html/html_objectimpl.cpp:
785         (HTMLObjectElementImpl::HTMLObjectElementImpl):
786         (HTMLObjectElementImpl::removedFromDocument):
787         (HTMLObjectElementImpl::attach):
788         * khtml/html/html_objectimpl.h:
789         * khtml/misc/loader.cpp:
790         (CachedImage::ref):
791         * khtml/rendering/render_image.cpp:
792         (RenderImage::RenderImage):
793         (RenderImage::setImage):
794         (RenderImage::updateAltText):
795         * khtml/rendering/render_image.h:
796         (khtml::RenderImage::getImage):
797         * khtml/rendering/render_object.cpp:
798         (RenderObject::canvas):
799         * khtml/xml/dom_docimpl.cpp:
800         (DocumentImpl::dispatchImageLoadEventSoon):
801         (DocumentImpl::removeImage):
802         (DocumentImpl::dispatchImageLoadEventsNow):
803         * khtml/xml/dom_docimpl.h:
804
805 2004-05-10  Darin Adler  <darin@apple.com>
806
807         Reviewed by Vicki.
808
809         - fixed build failure seen in B&I log (due to case sensitive file system?)
810
811         * kwq/KWQLoader.h: Include "KWQCString.h" rather than "QCString.h". The latter was
812         failing because the forwarding header is called "qcstring.h" and I guess B&I started
813         building with a case sensitive file system. I could have changed this to "qcstring.h",
814         but it seemed better to use the header's real name since we're inside KWQ here.
815
816 2004-05-07  Maciej Stachowiak  <mjs@apple.com>
817
818         Reviewed by Dave.
819
820         - change things around so extremely hot TokenizerString::current()
821         method doesn't have to do any work. It's cheaper to maintain the
822         relevant state than to always compute it.
823         
824         * khtml/misc/stringit.h:
825         (khtml::TokenizerString::TokenizerString): Initialize m_currentChar
826         (khtml::TokenizerString::push): update m_currentChar
827         (khtml::TokenizerString::advance): ditto
828         (khtml::TokenizerString::current): return m_currentChar
829         * khtml/misc/stringit.cpp:
830         (khtml::TokenizerString::clear): update m_currentChar
831         (khtml::TokenizerString::append): update m_currentChar
832         (khtml::TokenizerString::prepend): update m_currentChar
833
834 2004-05-07  Don Melton  <gramps@apple.com>
835
836         Reviewed by Dave.
837
838         Fixed minor, edge-case regression in KEYGEN RSA logic caused by Dave's
839         "atomic string" patch back in January.
840
841         * khtml/html/html_formimpl.cpp:
842         (HTMLKeygenElementImpl::encoding):
843
844 === Safari-139 ===
845
846 2004-05-06  Maciej Stachowiak  <mjs@apple.com>
847
848         Reviewed by Darin.
849
850         - two trivial changes for a 1% speedup, thanks to Shark
851         
852         * khtml/dom/dom_string.cpp:
853         * khtml/dom/dom_string.h:
854         (DOM::DOMString::~DOMString): inline this method because it's hot and the
855         function call overhead was very costly.
856         * WebCore.pbproj/project.pbxproj: Add -falign-loops=16
857         optimization flag, as suggested by Shark.
858
859 2004-05-06  Chris Blumenberg  <cblu@apple.com>
860
861         Added alpha to DOMRGBColor as an extension.
862
863         Reviewed by dave.
864
865         * kwq/DOM-CSS.mm:
866         (-[DOMRGBColor alpha]): new
867         * kwq/DOMExtensions.h:
868
869 2004-05-05  David Hyatt  <hyatt@apple.com>
870
871         Fix whitespace rendering for brs inside pres. The bug is 3640711.
872         
873         Reviewed by kocienda
874
875         * khtml/rendering/bidi.cpp:
876         (khtml::RenderBlock::layoutInlineChildren):
877         (khtml::RenderBlock::findNextLineBreak):
878
879 2004-04-25  Maciej Stachowiak  <mjs@apple.com>
880
881         Reviewed by Darin.
882
883         * khtml/ecma/kjs_events.cpp:
884         (JSLazyEventListener::parseCode): Make sure to protect the
885         permanent "event" string object.
886
887 2004-05-05  David Hyatt  <hyatt@apple.com>
888
889         Fixes for 3637924, 3643356, and 3558513, all crashes in recalcStyle.  Make sure the tree is always in a
890         sane state when removing children while changing .innerHTML.
891         
892         Reviewed by darin
893
894         * khtml/xml/dom_nodeimpl.cpp:
895
896 2004-05-05  David Hyatt  <hyatt@apple.com>
897
898         A collection of fixes.
899
900         (1) Fix a regression from the style sharing landing that made visited and unvisited links accidentally share.
901         (2) Make sure 100% height divs fill the <body> in quirks mode, even if the body has no height specified.
902         (3) Make sure table cell percentage heights exclude border/padding.
903         (4) Make sure that before flexing auto height is used for the contents of the cells.
904         
905         Reviewed by darin
906
907         * khtml/css/cssstyleselector.cpp:
908         (khtml::CSSStyleSelector::canShareStyleWithElement):
909         (khtml::CSSStyleSelector::locateSharedStyle):
910         * khtml/rendering/render_box.cpp:
911         (RenderBox::calcPercentageHeight):
912         * khtml/rendering/render_table.cpp:
913         (RenderTable::layout):
914         (RenderTableSection::layoutRows):
915
916 2004-05-05  Chris Blumenberg  <cblu@apple.com>
917
918         - DOM Extensions API tweaks
919         - Implemented outerHTML
920
921         Reviewed by kocienda.
922
923         * WebCore-combined.exp:
924         * khtml/html/html_elementimpl.cpp:
925         (HTMLElementImpl::outerHTML): new
926         (HTMLElementImpl::setOuterHTML): mew
927         * khtml/html/html_elementimpl.h:
928         * kwq/DOMExtensions.h: removed background methods on table and table cell since these are unnecessary conveniences
929         * kwq/DOMHTML.mm:
930         (-[DOMHTMLElement outerHTML]): new
931         (-[DOMHTMLElement setOuterHTML:]): mew
932
933 2004-05-04  David Hyatt  <hyatt@apple.com>
934
935         Fix for 3641331, make sure <th> elements don't reset text-align to center if they inherit a specified
936         value.
937
938         Also remove the styles from <abbr> and <acronym>.
939         
940         Reviewed by darin
941
942         * khtml/css/cssstyleselector.cpp:
943         (khtml::CSSStyleSelector::adjustRenderStyle):
944         * khtml/css/html4.css:
945         * khtml/css/quirks.css:
946
947 2004-05-04  Ken Kocienda  <kocienda@apple.com>
948
949         Reviewed by Hyatt
950         
951         Fix for behavior which extends selection drawing to beginning and end of blocks.
952         I added this feature a few days ago, but my checks to see if the extension should
953         be done was naive: Is first or last item in root line box selected? Clearly this 
954         needs to be "selection is *beyond* first or last item in root line box. Done.
955
956         * khtml/rendering/render_image.cpp:
957         (RenderImage::paint): Add selectionState() == SelectionInside check.
958         * khtml/rendering/render_text.cpp:
959         (InlineTextBox::paintSelection): Constrain passed-in offsets to be relative to box.
960         Use passed-in offsets to check whether selection extends beyond this box. Also, now
961         passes in flag to tell whether the whole RenderText has selectionState() == SelectionInside
962         (in which case you always want to extend).
963         (RenderText::paint): Remove box offset constraining from here. Now done in above function.
964         * khtml/rendering/render_text.h: Modify paintSelection interface to add 
965         selectionState() == SelectionInside flag.
966
967 2004-05-04  Ken Kocienda  <kocienda@apple.com>
968
969         Reviewed by me
970         
971         Added layout tests for DOM traversal objects.
972
973         * layout-tests/traversal/node-iterator-001-expected.txt: Added.
974         * layout-tests/traversal/node-iterator-001.html: Added.
975         * layout-tests/traversal/node-iterator-002-expected.txt: Added.
976         * layout-tests/traversal/node-iterator-002.html: Added.
977         * layout-tests/traversal/node-iterator-003-expected.txt: Added.
978         * layout-tests/traversal/node-iterator-003.html: Added.
979         * layout-tests/traversal/node-iterator-004-expected.txt: Added.
980         * layout-tests/traversal/node-iterator-004.html: Added.
981         * layout-tests/traversal/node-iterator-005-expected.txt: Added.
982         * layout-tests/traversal/node-iterator-005.html: Added.
983         * layout-tests/traversal/node-iterator-006-expected.txt: Added.
984         * layout-tests/traversal/node-iterator-006.html: Added.
985         * layout-tests/traversal/node-iterator-007-expected.txt: Added.
986         * layout-tests/traversal/node-iterator-007.html: Added.
987         * layout-tests/traversal/traversal.js: Added.
988         * layout-tests/traversal/tree-walker-001-expected.txt: Added.
989         * layout-tests/traversal/tree-walker-001.html: Added.
990         * layout-tests/traversal/tree-walker-002-expected.txt: Added.
991         * layout-tests/traversal/tree-walker-002.html: Added.
992         * layout-tests/traversal/tree-walker-003-expected.txt: Added.
993         * layout-tests/traversal/tree-walker-003.html: Added.
994         * layout-tests/traversal/tree-walker-004-expected.txt: Added.
995         * layout-tests/traversal/tree-walker-004.html: Added.
996
997 2004-05-04  Ken Kocienda  <kocienda@apple.com>
998
999         Reviewed by Hyatt
1000
1001         * khtml/xml/dom2_traversalimpl.cpp:
1002         (DOM::NodeIteratorImpl::nextNode): Change to make NodeIterators behave like the spec in that
1003         reference node is null until you iterate the first time. 
1004         (DOM::NodeIteratorImpl::previousNode): Ditto.
1005
1006 2004-05-04  Ken Kocienda  <kocienda@apple.com>
1007
1008         Reviewed by me
1009
1010         * WebCore.pbproj/project.pbxproj: Backed out unintentional
1011         change.
1012
1013 2004-05-04  Ken Kocienda  <kocienda@apple.com>
1014
1015         Reviewed by Hyatt
1016         
1017         Implemented DOM traversal objects, NodeIterator and TreeWalker.
1018
1019         * WebCore-combined.exp: Regenerate
1020         * WebCore.exp: Export DOMNodeFilter protocol
1021         * khtml/dom/dom2_traversal.cpp: Completed half-done implementation pulled from KDE tree.
1022         * khtml/dom/dom2_traversal.h: Ditto.
1023         * khtml/dom/dom_doc.cpp:
1024         (DOM::Document::createNodeIterator): Ditto.
1025         (DOM::Document::createTreeWalker): Ditto.
1026         * khtml/dom/dom_doc.h: Ditto.
1027         * khtml/ecma/kjs_dom.cpp:
1028         (DOMDocumentProtoFunc::tryCall): Fix cases that create traversal objects.
1029         * khtml/ecma/kjs_traversal.cpp:
1030         (DOMNodeIterator::getValueProperty): Add referenceNode and pointerBeforeReferenceNode
1031         properties to node interator.
1032         (DOMTreeWalkerProtoFunc::tryCall): Fix typo where DOMTreeWalker::PreviousNode case called previousSibling function.
1033         (JSNodeFilterCondition::JSNodeFilterCondition): Implement JS glue class for node filter conditions.
1034         (JSNodeFilterCondition::acceptNode): Ditto.
1035         * khtml/ecma/kjs_traversal.h:
1036         (KJS::DOMNodeIterator::): Add ReferenceNode and PointerBeforeReferenceNode constants.
1037         * khtml/ecma/kjs_traversal.lut.h:
1038         (KJS::): Regenerated
1039         * khtml/xml/dom2_traversalimpl.cpp: Completed half-done implementation pulled from KDE tree.
1040         * khtml/xml/dom2_traversalimpl.h: Ditto.
1041         * khtml/xml/dom_docimpl.cpp:
1042         (DocumentImpl::createNodeIterator): Ditto.
1043         (DocumentImpl::createTreeWalker): Ditto.
1044         * khtml/xml/dom_docimpl.h: Ditto.
1045         * khtml/xml/dom_nodeimpl.cpp:
1046         (NodeImpl::checkAddChild): Patched due to change in isAncestor function. This was the one pre-existing caller.
1047         (NodeImpl::isAncestor): Changed so that it does not return true for itself: node->isAncestor(node) now returns false.
1048         * khtml/xml/dom_nodeimpl.h: Made isAncestor const.
1049         * kwq/DOM.mm: Implemented obj-c glue for traversal objects.
1050         * kwq/DOMInternal.h: Ditto.
1051         * kwq/DOMTraversal.h: Ditto.
1052
1053 2004-05-04  Darin Adler  <darin@apple.com>
1054
1055         Reviewed by Ken.
1056
1057         - fixed <rdar://problem/3642252>: "starting to drag a link and then releasing needs to activate the link if you are still over it"
1058
1059         * khtml/khtmlview.cpp:
1060         (KHTMLView::viewportMouseMoveEvent): Put hysteresis check inside !APPLE_CHANGES because
1061         the Web Kit does our hysteresis checks.
1062         (KHTMLView::viewportMouseReleaseEvent): Ditto.
1063
1064         * kwq/KWQApplication.h: Removed startDragDistance and globalStrut; unused.
1065         * kwq/KWQApplication.mm: Removed the implementations.
1066         * kwq/KWQPointArray.h: Removed manhattanLength; unused.
1067         * kwq/KWQPoint.mm:  Removed the implementation.
1068
1069         * WebCore-tests.exp: Removed manhattanLength.
1070         * WebCore-combined.exp: Regenerated.
1071
1072 2004-05-03  Ken Kocienda  <kocienda@apple.com>
1073
1074         Reviewed by Hyatt
1075
1076         Nifty hack to work around problem where BR's inserted at the end of a block do not 
1077         render. Since only the *last* BR has this quirk, insert two when at the end of a block.
1078         Once done, you can't caret past the last one, so you never insert two again.
1079
1080         * khtml/editing/htmlediting_impl.cpp:
1081         (InputNewlineCommandImpl::doApply)
1082
1083 2004-05-03  Darin Adler  <darin@apple.com>
1084
1085         Reviewed by Ken
1086
1087         - fixed <rdar://problem/3091531>: "should format copied tables with tabs between cells, spreadsheet-style, for pasting to Excel"
1088         - fixed <rdar://problem/3110002>: "Find doesn't match across formatting boundaries"
1089         - fixed <rdar://problem/3640340>: "REGRESSION (136-137): nil-deref in KHTMLPart::setFocusNodeIfNeeded inside triple click code after repeatedly click/drag selecting text"
1090         - fixed <rdar://problem/3640422>: "too many blank lines between paragraphs in copied text"
1091
1092         * khtml/dom/dom2_range.h: Added == and != operators to DOMRange.
1093         * khtml/dom/dom2_range.cpp: (DOM::operator==): Added.
1094
1095         * khtml/khtml_part.cpp:
1096         (KHTMLPart::init): Don't call findTextBegin any more; it's now not used at all
1097         in WebCore.
1098         (KHTMLPart::clear): Don't call findTextBegin any more. Also don't set up the
1099         load statistics variables.
1100         (KHTMLPart::findTextNext): Roll out APPLE_CHANGES; this function is no longer
1101         used in WebCore any more and instead the entire thing is compiled out.
1102         (KHTMLPart::text): Reimplement this by calling one of the new text operations. All the interesting
1103         parts were moved into the TextIterator class.
1104         (KHTMLPart::setFocusNodeIfNeeded): Add a check for nil; this is the fix for 364030.
1105
1106         * khtml/khtmlpart_p.h: (KHTMLPartPrivate::KHTMLPartPrivate): Put m_findPos,
1107         m_findNode, m_overURL, m_overURLTarget, m_scrollTimer, m_loadedObjects,
1108         m_totalObjectCount, and m_jobPercent inside !APPLE_CHANGES.
1109
1110         * khtml/xml/dom_selection.h: Replaced uses of 4-character tabs with spaces.
1111         (DOM::Selection::Selection): Added a constructor that takes a DOM range.
1112         (DOM::Selection::operator=): Overloaded operator= for DOM range and position.
1113         This is slightly more efficient than letting a second Selection object be constructed.
1114         * khtml/xml/dom_selection.cpp: Replaced uses of 4-character tabs with spaces.
1115         (DOM::Selection::Selection): Added a constructor that takes a DOM range.
1116
1117         * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::findString): Reimplement find so it uses
1118         the new text operations function for finding.
1119
1120         * khtml/misc/khtml_text_operations.h:
1121         * khtml/misc/khtml_text_operations.cpp:
1122         * WebCore.pbproj/project.pbxproj:
1123         Added new text iterator classes that do the heavy lifting.
1124
1125 2004-05-03  David Hyatt  <hyatt@apple.com>
1126
1127         Make sure that XML processing instructions set themselves as the parent node of the stylesheets they load,
1128         so that they will get stylesheetLoaded() notifications when @imported stylesheets are contained inside the
1129         sheet.
1130
1131         Reviewed by cblu
1132
1133         * khtml/xml/dom_xmlimpl.cpp:
1134         (ProcessingInstructionImpl::setStyleSheet):
1135
1136 2004-04-30  Chris Blumenberg  <cblu@apple.com>
1137
1138         Fixed: <rdar://problem/3543662>: HITLIST-137: REGRESSION: reproducible hang copying all text at Dave's blog, and other pages
1139
1140         Reviewed by dave.
1141
1142         * khtml/xml/dom2_rangeimpl.cpp:
1143         (RangeImpl::toHTMLWithOptions): when looping with containingBlock, check the value to see if it is the same
1144
1145 2004-04-30  David Hyatt  <hyatt@apple.com>
1146
1147         Fix for 3639530, regression on generated content pages.  They crash because I forgot to null-check the style
1148         object.
1149         
1150         Reviewed by kocienda
1151
1152         * khtml/css/cssstyleselector.cpp:
1153         (khtml::CSSStyleSelector::checkOneSelector):
1154
1155 2004-04-30  John Sullivan  <sullivan@apple.com>
1156
1157         - added bridge method to get the NSFont used to render a node, to
1158         help with supporting the font panel
1159
1160         Reviewed by Ken.
1161
1162         * kwq/WebCoreBridge.h:
1163         * kwq/WebCoreBridge.mm:
1164         (-[WebCoreBridge renderedFontForNode:]):
1165         return nil if no renderer, otherwise return NSFont
1166
1167 2004-04-29  David Hyatt  <hyatt@apple.com>
1168
1169         Expose summary on tables.
1170         
1171         Reviewed by darin
1172
1173         * kwq/KWQAccObject.mm:
1174         (-[KWQAccObject helpText]):
1175
1176 2004-04-29  David Hyatt  <hyatt@apple.com>
1177
1178         Implement image maps for accessibility.
1179         
1180         Reviewed by darin
1181
1182         * khtml/html/html_imageimpl.cpp:
1183         (HTMLAreaElementImpl::getRect):
1184         * khtml/html/html_imageimpl.h:
1185         * khtml/rendering/render_image.cpp:
1186         (RenderImage::imageMap):
1187         (RenderImage::nodeAtPoint):
1188         * khtml/rendering/render_image.h:
1189         * kwq/KWQAccObject.h:
1190         * kwq/KWQAccObject.mm:
1191         (-[KWQAccObject initWithRenderer:]):
1192         (-[KWQAccObject anchorElement]):
1193         (-[KWQAccObject parentObject]):
1194         (-[KWQAccObject parentObjectUnignored]):
1195         (-[KWQAccObject addChildrenToArray:]):
1196         (-[KWQAccObject role]):
1197         (-[KWQAccObject helpText]):
1198         (-[KWQAccObject value]):
1199         (-[KWQAccObject title]):
1200         (-[KWQAccObject position]):
1201         (-[KWQAccObject size]):
1202         (-[KWQAccObject accessibilityIsIgnored]):
1203         (-[KWQAccObject accessibilityAttributeNames]):
1204         (-[KWQAccObject accessibilityAttributeValue:]):
1205         * kwq/KWQRegion.mm:
1206         (QRegion::boundingRect):
1207
1208 2004-04-29  Chris Blumenberg  <cblu@apple.com>
1209
1210         Fixed:
1211         <rdar://problem/3631431>: web archive of .Mac welcome page renders has gaps in layout
1212         <rdar://problem/3631470>: news.google.com web archive has a different font than the live site
1213
1214         Reviewed by kocienda.
1215
1216         * khtml/html/html_documentimpl.cpp:
1217         (HTMLDocumentImpl::determineParseMode): don't set a name on the doc type when there is no doc type in the source
1218         * khtml/xml/dom_docimpl.cpp:
1219         (DocumentTypeImpl::toString): don't return "<!DOCTYPE>" when there is no doc type in the source
1220         * khtml/xml/dom_nodeimpl.cpp:
1221         (NodeImpl::recursive_toHTMLWithOptions): don't escape STYLE text, don't include the end tags for document nodes just as we don't for start tags
1222
1223 2004-04-29  Darin Adler  <darin@apple.com>
1224
1225         Reviewed by Dave.
1226
1227         - some tweaks on image
1228
1229         * khtml/html/html_imageimpl.h: Remove unused noref bit and unneeded override of isURLAttribute.
1230         * khtml/html/html_imageimpl.cpp:
1231         (HTMLAreaElementImpl::HTMLAreaElementImpl): Remove unused noref bit.
1232         (HTMLAreaElementImpl::parseHTMLAttribute): Remove parsing of noref; no need to store the
1233         bit since it has no meaning.
1234
1235 2004-04-29  David Hyatt  <hyatt@apple.com>
1236
1237         1. Change the role of links from AXButton to AXLink.
1238         2. Add support for list markers using a new role, AXListMarker.
1239         
1240         Reviewed by kocienda
1241
1242         * khtml/rendering/render_list.h:
1243         (khtml::RenderListMarker::text):
1244         * kwq/KWQAccObject.mm:
1245         (-[KWQAccObject role]):
1246         (-[KWQAccObject roleDescription]):
1247         (-[KWQAccObject value]):
1248         (-[KWQAccObject accessibilityIsIgnored]):
1249
1250 2004-04-29  Darin Adler  <darin@apple.com>
1251
1252         Reviewed by Ken.
1253
1254         - fixed <rdar://problem/3636566>: "space bar on a form button hits default button instead (autorestore.apple.com)"
1255
1256         * khtml/html/html_formimpl.cpp: (HTMLInputElementImpl::defaultEventHandler):
1257         Remove special handling for space, falling back to default AppKit behavior. Change enter handling to
1258         click the form element itself in the case of elements other than text input ones.
1259
1260 2004-04-29  Darin Adler  <darin@apple.com>
1261
1262         Reviewed by Ken.
1263
1264         - fixed <rdar://problem/3636673>: "unrepro nil-deref crash in KHTMLPart::frameDetached() (espn.com)"
1265
1266         * kwq/KWQKHTMLPart.mm: (KHTMLPart::frameDetached): Check for nil.
1267
1268 2004-04-28  Chris Blumenberg  <cblu@apple.com>
1269
1270         - Implemented DOMHTMLElementExtensions.
1271         - Added stubs for the rest of the DOM API.
1272
1273         Reviewed by dave.
1274
1275         * WebCore.pbproj/project.pbxproj:
1276         * khtml/dom/html_element.cpp:
1277         (HTMLElement::setContentEditable): moved implementation from here to HTMLElementImpl
1278         * khtml/html/html_elementimpl.cpp:
1279         (HTMLElementImpl::setContentEditable): new, moved from HTMLElement
1280         * khtml/html/html_elementimpl.h:
1281         * kwq/DOM-CSS.mm:
1282         (-[DOMObject sheet]):
1283         (-[DOMDocument getComputedStyle::]):
1284         * kwq/DOM.mm:
1285         (-[DOMAbstractView document]):
1286         (-[DOMDocumentView defaultView]):
1287         (-[DOMDocument createNodeIterator::::]):
1288         (-[DOMDocument createTreeWalker::::]):
1289         (-[DOMNodeFilter acceptNode:]):
1290         (-[DOMNodeIterator root]):
1291         (-[DOMNodeIterator whatToShow]):
1292         (-[DOMNodeIterator filter]):
1293         (-[DOMNodeIterator expandEntityReferences]):
1294         (-[DOMNodeIterator nextNode]):
1295         (-[DOMNodeIterator previousNode]):
1296         (-[DOMNodeIterator detach]):
1297         (-[DOMTreeWalker root]):
1298         (-[DOMTreeWalker whatToShow]):
1299         (-[DOMTreeWalker filter]):
1300         (-[DOMTreeWalker expandEntityReferences]):
1301         (-[DOMTreeWalker currentNode]):
1302         (-[DOMTreeWalker setCurrentNode:]):
1303         (-[DOMTreeWalker parentNode]):
1304         (-[DOMTreeWalker firstChild]):
1305         (-[DOMTreeWalker lastChild]):
1306         (-[DOMTreeWalker previousSibling]):
1307         (-[DOMTreeWalker nextSibling]):
1308         (-[DOMTreeWalker previousNode]):
1309         (-[DOMTreeWalker nextNode]):
1310         * kwq/DOMEvents.mm: Added.
1311         (-[DOMEvent type]):
1312         (-[DOMEvent target]):
1313         (-[DOMEvent currentTarget]):
1314         (-[DOMEvent eventPhase]):
1315         (-[DOMEvent bubbles]):
1316         (-[DOMEvent cancelable]):
1317         (-[DOMEvent timeStamp]):
1318         (-[DOMEvent stopPropagation]):
1319         (-[DOMEvent preventDefault]):
1320         (-[DOMEvent initEvent:::]):
1321         (-[DOMEventTarget addEventListener:::]):
1322         (-[DOMEventTarget removeEventListener:::]):
1323         (-[DOMEventTarget dispatchEvent:]):
1324         (-[DOMMouseEvent screenX]):
1325         (-[DOMMouseEvent screenY]):
1326         (-[DOMMouseEvent clientX]):
1327         (-[DOMMouseEvent clientY]):
1328         (-[DOMMouseEvent ctrlKey]):
1329         (-[DOMMouseEvent shiftKey]):
1330         (-[DOMMouseEvent altKey]):
1331         (-[DOMMouseEvent metaKey]):
1332         (-[DOMMouseEvent button]):
1333         (-[DOMMouseEvent relatedTarget]):
1334         (-[DOMMouseEvent initMouseEvent:::::::::::::::]):
1335         (-[DOMMutationEvent relatedNode]):
1336         (-[DOMMutationEvent prevValue]):
1337         (-[DOMMutationEvent newValue]):
1338         (-[DOMMutationEvent attrName]):
1339         (-[DOMMutationEvent attrChange]):
1340         (-[DOMMutationEvent initMutationEvent::::::::]):
1341         (-[DOMUIEvent view]):
1342         (-[DOMUIEvent detail]):
1343         (-[DOMUIEvent initUIEvent:::::]):
1344         (-[DOMDocument createEvent:]):
1345         * kwq/DOMHTML.mm:
1346         (-[DOMHTMLElement innerHTML]): implemented
1347         (-[DOMHTMLElement setInnerHTML:]): implemented
1348         (-[DOMHTMLElement innerText]): implemented
1349         (-[DOMHTMLElement setInnerText:]): implemented
1350         (-[DOMHTMLElement children]): implemented
1351         (-[DOMHTMLElement contentEditable]): implemented
1352         (-[DOMHTMLElement setContentEditable:]): implemented
1353         (-[DOMHTMLElement isContentEditable]): implemented
1354
1355 2004-04-27  David Hyatt  <hyatt@apple.com>
1356
1357         Implement sharing of similar style objects. Cuts the # of style objects allocated on the PLT by more
1358         than half.
1359         
1360         Reviewed by kocienda
1361
1362         * khtml/css/cssstyleselector.cpp:
1363         (khtml::CSSStyleSelector::initElementAndPseudoState):
1364         (khtml::CSSStyleSelector::initForStyleResolve):
1365         (khtml::cleanpath):
1366         (khtml::checkPseudoState):
1367         (khtml::CSSStyleSelector::locateSiblingList):
1368         (khtml::CSSStyleSelector::canShareStyleWithElement):
1369         (khtml::CSSStyleSelector::locateSharedStyle):
1370         (khtml::CSSStyleSelector::styleForElement):
1371         (khtml::CSSStyleSelector::pseudoStyleForElement):
1372         (khtml::CSSStyleSelector::checkOneSelector):
1373         * khtml/css/cssstyleselector.h:
1374         * khtml/css/html4.css:
1375         * khtml/css/parser.cpp:
1376         * khtml/css/parser.y:
1377         * khtml/html/html_baseimpl.cpp:
1378         (HTMLBodyElementImpl::mapToEntry):
1379         (HTMLIFrameElementImpl::mapToEntry):
1380         * khtml/html/html_baseimpl.h:
1381         * khtml/html/html_blockimpl.cpp:
1382         (HTMLDivElementImpl::mapToEntry):
1383         (HTMLHRElementImpl::mapToEntry):
1384         (HTMLParagraphElementImpl::mapToEntry):
1385         (HTMLMarqueeElementImpl::mapToEntry):
1386         * khtml/html/html_blockimpl.h:
1387         * khtml/html/html_elementimpl.cpp:
1388         (HTMLNamedAttrMapImpl::declCount):
1389         (HTMLNamedAttrMapImpl::mapsEquivalent):
1390         (HTMLElementImpl::attributeChanged):
1391         (HTMLElementImpl::mapToEntry):
1392         * khtml/html/html_elementimpl.h:
1393         (DOM::HTMLElementImpl::isMappedAttribute):
1394         * khtml/html/html_formimpl.cpp:
1395         (HTMLInputElementImpl::mapToEntry):
1396         * khtml/html/html_formimpl.h:
1397         * khtml/html/html_imageimpl.cpp:
1398         (HTMLImageElementImpl::mapToEntry):
1399         * khtml/html/html_imageimpl.h:
1400         * khtml/html/html_inlineimpl.cpp:
1401         (HTMLBRElementImpl::mapToEntry):
1402         (HTMLFontElementImpl::mapToEntry):
1403         * khtml/html/html_inlineimpl.h:
1404         * khtml/html/html_listimpl.cpp:
1405         (HTMLUListElementImpl::mapToEntry):
1406         (HTMLOListElementImpl::mapToEntry):
1407         (HTMLLIElementImpl::mapToEntry):
1408         * khtml/html/html_listimpl.h:
1409         * khtml/html/html_objectimpl.cpp:
1410         (HTMLAppletElementImpl::mapToEntry):
1411         (HTMLEmbedElementImpl::mapToEntry):
1412         (HTMLObjectElementImpl::mapToEntry):
1413         * khtml/html/html_objectimpl.h:
1414         * khtml/html/html_tableimpl.cpp:
1415         (HTMLTableElementImpl::mapToEntry):
1416         (HTMLTablePartElementImpl::mapToEntry):
1417         (HTMLTableCellElementImpl::mapToEntry):
1418         (HTMLTableColElementImpl::mapToEntry):
1419         (HTMLTableCaptionElementImpl::mapToEntry):
1420         * khtml/html/html_tableimpl.h:
1421         * khtml/rendering/render_object.cpp:
1422         (RenderObject::setStyle):
1423         * khtml/rendering/render_style.cpp:
1424         (m_affectedByAttributeSelectors):
1425         (RenderStyle::RenderStyle):
1426         * khtml/rendering/render_style.h:
1427         (khtml::):
1428         (khtml::RenderStyle::pseudoState):
1429         (khtml::RenderStyle::setPseudoState):
1430         (khtml::RenderStyle::affectedByAttributeSelectors):
1431         (khtml::RenderStyle::setAffectedByAttributeSelectors):
1432         * khtml/xml/dom_docimpl.cpp:
1433         (DocumentImpl::DocumentImpl):
1434         * khtml/xml/dom_docimpl.h:
1435         (DOM::DocumentImpl::usesSiblingRules):
1436         (DOM::DocumentImpl::setUsesSiblingRules):
1437
1438 2004-04-28  Darin Adler  <darin@apple.com>
1439
1440         Reviewed by Chris.
1441
1442         - another step of refinement on the reinterpret_cast stuff; now it's a compile-time
1443           error if you do it wrong
1444         - fixed a couple of storage leaks
1445
1446         * kwq/DOMInternal.h: Added new DOM_cast template function. Like reinterpret_cast, but a
1447         compile-time error if you use it with the wrong parameters. Also added type-safe versions
1448         of the wrapper functions that do the DOM_cast automatically.
1449         * kwq/DOMInternal.mm:
1450         (getDOMWrapperImpl): Changed name and parameter type as part of above change.
1451         (addDOMWrapperImpl): Ditto.
1452         (removeDOMWrapper): Ditto.
1453
1454         * kwq/DOM.mm: Use the new DOM_cast instead of reinterpret_cast, and the new
1455         DOM wrapper calls that do the cast automatically.
1456         * kwq/DOM-CSS.mm: More of the same.
1457         (-[DOMCSSStyleSheet dealloc]): Added override to deref, fixes leak.
1458         * kwq/DOMHTML.mm: More of the same.
1459         (-[DOMHTMLCollection dealloc]): Added override to deref, fixes leak.
1460         (-[DOMHTMLOptionsCollection dealloc]): Added override to deref, fixes theoretical leak.
1461
1462 2004-04-28  Darin Adler  <darin@apple.com>
1463
1464         Reviewed by Chris.
1465
1466         - fixed reinterpret_cast mistakes and some style issues in DOM implementation
1467
1468         * kwq/DOM-CSS.mm:
1469         (-[DOMCSSStyleRule _styleRuleImpl]): Fix broken reinterpret_cast; you must reinterpret_cast back
1470         to the class you reinterpret_casted from, not to a derived class.
1471         (-[DOMCSSMediaRule _mediaRuleImpl]): Ditto.
1472         (-[DOMCSSFontFaceRule _fontFaceRuleImpl]): Ditto.
1473         (-[DOMCSSPageRule _pageRuleImpl]): Ditto.
1474         (-[DOMCSSImportRule _importRuleImpl]): Ditto.
1475         (-[DOMCSSCharsetRule _importRuleImpl]): Ditto.
1476         * kwq/DOMHTML.mm:
1477         (-[DOMHTMLOptionsCollection length]): Put in an "unimplemented" version instead of leaving out
1478         the class implementation altogether.
1479         (-[DOMHTMLOptionsCollection setLength:]): Ditto.
1480         (-[DOMHTMLOptionsCollection item:]): Ditto.
1481         (-[DOMHTMLOptionsCollection namedItem:]): Ditto.
1482         (+[DOMHTMLElement _elementWithImpl:]): Corrected this implementation. The wrapper must use a
1483         standard node wrapper, since this is a subclass of DOMNode. Also moved into a separate category
1484         so it gets checked against the declarations above.
1485         (-[DOMHTMLElement _HTMLElementImpl]): Fix broken reinterpret_cast.
1486         (-[DOMHTMLHtmlElement _HTMLHtmlElementImpl]): Ditto.
1487         (-[DOMHTMLHeadElement _headElementImpl]): Ditto.
1488         (-[DOMHTMLLinkElement _linkElementImpl]): Ditto.
1489         (-[DOMHTMLTitleElement _titleElementImpl]): Ditto.
1490         (-[DOMHTMLMetaElement _metaElementImpl]): Ditto.
1491         (-[DOMHTMLBaseElement _baseElementImpl]): Ditto.
1492         (-[DOMHTMLStyleElement _styleElementImpl]): Ditto.
1493         (-[DOMHTMLBodyElement _bodyElementImpl]): Ditto.
1494         (-[DOMHTMLFormElement _formElementImpl]): Ditto.
1495         (+[DOMHTMLFormElement _formElementWithImpl:]): Another DOMNode subclass wrapper fix.
1496         (-[DOMHTMLIsIndexElement _isIndexElementImpl]): Fix broken reinterpret_cast.
1497         (-[DOMHTMLSelectElement _selectElementImpl]): Ditto.
1498         (-[DOMHTMLOptGroupElement _optGroupElementImpl]): Ditto.
1499         (-[DOMHTMLOptionElement _optionElementImpl]): Ditto.
1500         (-[DOMHTMLInputElement _inputElementImpl]): Ditto.
1501         (-[DOMHTMLTextAreaElement _textAreaElementImpl]): Ditto.
1502         (-[DOMHTMLButtonElement _buttonElementImpl]): Ditto.
1503         (-[DOMHTMLLabelElement _labelElementImpl]): Ditto.
1504         (-[DOMHTMLFieldSetElement _fieldSetElementImpl]): Ditto.
1505         (-[DOMHTMLLegendElement _legendElementImpl]): Ditto.
1506         (-[DOMHTMLUListElement _uListElementImpl]): Ditto.
1507         (-[DOMHTMLOListElement _oListElementImpl]): Ditto.
1508         (-[DOMHTMLDListElement _dListElementImpl]): Ditto.
1509         (-[DOMHTMLDirectoryElement _directoryListElementImpl]): Ditto.
1510         (-[DOMHTMLMenuElement _menuListElementImpl]): Ditto.
1511         (-[DOMHTMLLIElement _liElementImpl]): Ditto.
1512         (-[DOMHTMLQuoteElement _quoteElementImpl]): Ditto.
1513         (-[DOMHTMLDivElement _divElementImpl]): Ditto.
1514         (-[DOMHTMLParagraphElement _paragraphElementImpl]): Ditto.
1515         (-[DOMHTMLHeadingElement _headingElementImpl]): Ditto.
1516         (-[DOMHTMLPreElement _preElementImpl]): Ditto.
1517         (-[DOMHTMLBRElement _BRElementImpl]): Ditto.
1518         (-[DOMHTMLBaseFontElement _baseFontElementImpl]): Ditto.
1519         (-[DOMHTMLFontElement _fontElementImpl]): Ditto.
1520         (-[DOMHTMLHRElement _HRElementImpl]): Ditto.
1521         (-[DOMHTMLModElement _modElementImpl]): Ditto.
1522         (-[DOMHTMLAnchorElement _anchorElementImpl]): Ditto.
1523         (-[DOMHTMLImageElement _imageElementImpl]): Ditto.
1524         (-[DOMHTMLObjectElement _objectElementImpl]): Ditto.
1525         (-[DOMHTMLParamElement _paramElementImpl]): Ditto.
1526         (-[DOMHTMLAppletElement _appletElementImpl]): Ditto.
1527         (-[DOMHTMLMapElement _mapElementImpl]): Ditto.
1528         (-[DOMHTMLAreaElement _areaElementImpl]): Ditto.
1529         (-[DOMHTMLScriptElement _scriptElementImpl]): Ditto.
1530         (+[DOMHTMLTableCaptionElement _tableCaptionElementWithImpl:]): Another DOMNode subclass wrapper fix.
1531         (-[DOMHTMLTableCaptionElement _tableCaptionElementImpl]): Fix broken reinterpret_cast.
1532         (+[DOMHTMLTableSectionElement _tableSectionElementWithImpl:]): Another DOMNode subclass wrapper fix.
1533         (-[DOMHTMLTableSectionElement _tableSectionElementImpl]): Fix broken reinterpret_cast.
1534         (+[DOMHTMLTableElement _tableElementWithImpl:]): Another DOMNode subclass wrapper fix.
1535         (-[DOMHTMLTableElement _tableElementImpl]): Fix broken reinterpret_cast.
1536         (-[DOMHTMLTableColElement _tableColElementImpl]): Ditto.
1537         (-[DOMHTMLTableRowElement _tableRowElementImpl]): Ditto.
1538         (+[DOMHTMLTableCellElement _tableCellElementWithImpl:]): Another DOMNode subclass wrapper fix.
1539         (-[DOMHTMLTableCellElement _tableCellElementImpl]): Fix broken reinterpret_cast.
1540         (-[DOMHTMLFrameSetElement _frameSetElementImpl]): Ditto.
1541         (-[DOMHTMLFrameElement _frameElementImpl]): Ditto.
1542         (-[DOMHTMLIFrameElement _IFrameElementImpl]): Ditto.
1543         (-[DOMHTMLEmbedElement _embedElementImpl]): Ditto.
1544
1545         * kwq/HTMLDOM.mm: Removed.
1546
1547 2004-04-28  Ken Kocienda  <kocienda@apple.com>
1548
1549         Reviewed by Darin
1550
1551         * khtml/khtml_part.cpp:
1552         (KHTMLPart::notifySelectionChanged): Call new postDidChangeSelectionNotification function
1553         to send Cocoa notification when the selection changes.
1554         (KHTMLPart::appliedEditing): Call postDidChangeNotification to send Cocoa notification when the document changes
1555         due to editing.
1556         (KHTMLPart::unappliedEditing): Ditto.
1557         (KHTMLPart::reappliedEditing): Ditto.
1558         * kwq/DOMHTML.mm:
1559         (-[DOMHTMLDocument _HTMLDocumentImpl]): Fix cast to account for multiple inheritance used by the impl class.
1560         * kwq/KWQKHTMLPart.h:
1561         * kwq/KWQKHTMLPart.mm:
1562         (KWQKHTMLPart::postDidChangeSelectionNotification): New function. Call the bridge to post the notification.
1563         (KWQKHTMLPart::postDidChangeNotification): Ditto.
1564         * kwq/WebCoreBridge.h: Declare new -postDidChangeSelectionNotification and -postDidChangeNotification methods.
1565
1566 2004-04-28  Darin Adler  <darin@apple.com>
1567
1568         Reviewed by Ken.
1569
1570         - fixed <rdar://problem/3636261>: "nil-deref in selectedStylesheetSet iterating through properties in a non-view document"
1571
1572         * khtml/xml/dom_docimpl.cpp:
1573         (DocumentImpl::selectedStylesheetSet): Add nil check.
1574         (DocumentImpl::setSelectedStylesheetSet): Ditto.
1575
1576 2004-04-27  Richard Williamson   <rjw@apple.com>
1577
1578         <rdar://problem/3564519>: API: please add a way to set the media type for a WebView
1579
1580         Reviewed by Chris.
1581
1582         * khtml/khtmlview.cpp:
1583         (KHTMLView::mediaType):
1584         * kwq/KWQKHTMLPart.h:
1585         * kwq/KWQKHTMLPart.mm:
1586         (KWQKHTMLPart::overrideMediaType):
1587         * kwq/WebCoreBridge.h:
1588
1589 2004-04-27  Ken Kocienda  <kocienda@apple.com>
1590
1591         Reviewed by Hyatt
1592         
1593         Make selections draw in a more Cocoa-like way, where
1594         fully-selected lines draw out to the ends of lines, and
1595         spaces between lines are drawn with the selection color as well.
1596
1597         * WebCore-combined.exp: Add _WebCoreInitializeEmptyTextGeometry symbol
1598         * WebCore.exp: Ditto.
1599         * khtml/khtml_part.cpp:
1600         (KHTMLPart::isPointInsideSelection): Marginally-related change. Fix up this function
1601         so that it works right, given my recent changes to positionForCoordinates. This fix
1602         "really" fixes the problem. Unlike my attempt to fix yesterday.
1603         * khtml/rendering/font.cpp:
1604         (Font::drawHighlightForText): New drawHighlightForText interface which includes extra
1605         information to draw the selection.
1606         * khtml/rendering/font.h: Ditto.
1607         * khtml/rendering/render_block.cpp:
1608         (khtml::RenderBlock::positionForCoordinates): Some minor improvements and cleanups to
1609         make this code work correctly in more cases.
1610         * khtml/rendering/render_block.h: Remove spurious semi-colon after namespace block.
1611         * khtml/rendering/render_container.cpp:
1612         (RenderContainer::positionForCoordinates): Fix typo in comment. Also, clean up
1613         one unnecessary call to absolutePosition.
1614         * khtml/rendering/render_image.cpp:
1615         (RenderImage::paint): Many changes to add the new selection drawing behavior.
1616         * khtml/rendering/render_inline.cpp:
1617         (RenderInline::positionForCoordinates): Added to help make selections work right 
1618         with continuations.
1619         * khtml/rendering/render_inline.h: Ditto.
1620         * khtml/rendering/render_object.h: Give zero default argument to inlineBox() helper.
1621         * khtml/rendering/render_text.cpp:
1622         (InlineTextBox::paintSelection): Many changes to add the new selection drawing behavior.
1623         * kwq/KWQListBox.mm:
1624         (-[KWQTableView drawRow:clipRect:]): Use new WebCoreTextGeometry struct.
1625         * kwq/KWQPainter.h: New drawHighlightForText interface which includes extra
1626         information to draw the selection.
1627         * kwq/KWQPainter.mm:
1628         (QPainter::drawText): Use new WebCoreInitializeEmptyTextGeometry struct.
1629         (QPainter::drawHighlightForText): Use new WebCoreTextGeometry struct.
1630         * kwq/WebCoreTextRenderer.h: Declare new WebCoreTextGeometry struct.
1631         * kwq/WebCoreTextRendererFactory.m:
1632         (WebCoreInitializeEmptyTextGeometry): Initializer for WebCoreTextGeometry struct.
1633
1634 2004-04-27  Richard Williamson   <rjw@apple.com>
1635
1636         Don't do unnecessary string comparisons when no composite operator is
1637         specified.  
1638
1639         Reviewed by Hyatt.
1640
1641         * kwq/KWQPainter.mm:
1642         (compositeOperatorFromString):
1643
1644 2004-04-27  Darin Adler  <darin@apple.com>
1645
1646         Reviewed by Ken.
1647
1648         - fixed <rdar://problem/3623694>: "top level <option> and <optgroup> labels look identical in pop-up menus; should not"
1649
1650         * khtml/rendering/render_form.cpp: (RenderSelect::updateFromElement):
1651         Call appendGroupLabel instead of appendItem for group labels.
1652
1653         * kwq/KWQComboBox.h: Added appendGroupLabel, private setControlSize, labelFont, setTitle, _labelFont,
1654         and make _items a QValueList<KWQListBoxItem> instead of QStringList.
1655         * kwq/KWQComboBox.mm:
1656         (QComboBox::QComboBox): Initializes _labelFont to nil.
1657         (QComboBox::~QComboBox): Release _labelFont.
1658         (QComboBox::setTitle): Added helper function. Uses an attributed string for group labels, and also sets
1659         the action to NULL so they are disabled.
1660         (QComboBox::appendItem): Added isLabel boolean parameter, make KWQListBoxItem, call setTitle.
1661         (QComboBox::sizeHint): Changed to handle group labels with a separate renderer to measure bolded text.
1662         (QComboBox::setCurrentItem): Changed to use setTitle helper.
1663         (QComboBox::setFont): Release _labelFont if control size changed.
1664         (QComboBox::labelFont): Compute label font lazily.
1665         (QComboBox::populateMenu): Changed to use setTitle helper.
1666
1667         * kwq/KWQListBox.h: Removed excess includes, fixed comment.
1668
1669 2004-04-26  Darin Adler  <darin@apple.com>
1670
1671         Reviewed by Maciej.
1672
1673         - follow-on to fix for <rdar://problem/3488892>: "anchor names with non-ASCII characters in them do not work"
1674         This part fixes anchor names with non-ASCII characters in local files.
1675
1676         * kwq/KWQKURL.mm: (KURL::KURL): For file and help URLs, force UTF-8 only for the path part of the URL.
1677         Use the document encoding for the rest of the URL.
1678         * kwq/KWQTextCodec.h: (operator!=): Added.
1679
1680 2004-04-26  David Hyatt  <hyatt@apple.com>
1681
1682         Fix for Emerson truncation problem using apple-line-clamp.  Always dirty positioned objects so that they
1683         will move when the height changes.
1684         
1685         Reviewed by darin
1686
1687         * khtml/rendering/render_block.cpp:
1688         (khtml::RenderBlock::markPositionedObjectsForLayout):
1689         * khtml/rendering/render_block.h:
1690         * khtml/rendering/render_flexbox.cpp:
1691         (khtml::RenderFlexibleBox::layoutVerticalBox):
1692
1693 2004-04-26  Richard Williamson   <rjw@apple.com>
1694
1695         Added support for specifying composite operation on an
1696         image element.  Attribute name is "composite", possible values
1697         are:
1698
1699         clear,
1700         copy
1701         source-over
1702         source-in
1703         source-out
1704         source-atop
1705         destination-over
1706         destination-in
1707         destination-out
1708         destination-atop
1709         xor
1710         darker
1711         highlight
1712         lighter
1713
1714         <img composite="source-over" src="triangle.png">
1715         <img style="position:relative; left:-200px;" composite="destination-in" src="circle.png">
1716
1717         Reviewed by Ken.
1718
1719         * khtml/html/html_imageimpl.cpp:
1720         (HTMLImageElementImpl::parseHTMLAttribute):
1721         * khtml/html/html_imageimpl.h:
1722         (DOM::HTMLImageElementImpl::compositeOperator):
1723         * khtml/misc/htmlattrs.c:
1724         (findAttr):
1725         * khtml/misc/htmlattrs.h:
1726         * khtml/misc/htmlattrs.in:
1727         * khtml/rendering/render_image.cpp:
1728         (RenderImage::paint):
1729         * kwq/KWQPainter.h:
1730         * kwq/KWQPainter.mm:
1731         (compositeOperatorFromString):
1732         (QPainter::drawPixmap):
1733         * kwq/WebCoreImageRenderer.h:
1734
1735 2004-04-26  Darin Adler  <darin@apple.com>
1736
1737         - fixed <rdar://problem/3634145>: "REGRESSION: nil-deref in QTextCodec::toUnicode every time loading page at wiki.wordpress.org"
1738
1739         * kwq/KWQKURL.mm:
1740         (KURL::KURL): Simplify check for nil that defaults to UTF-8.
1741         (KURL::decode_string): Add a similar test here.
1742
1743 2004-04-26  David Hyatt  <hyatt@apple.com>
1744
1745         Implement the quirk that makes the <body> and <html> size to fill the viewport in quirks mode.  This
1746         matches WinIE.
1747         
1748         Reviewed by john
1749
1750         * khtml/rendering/render_box.cpp:
1751         (RenderBox::calcHeight):
1752
1753 2004-04-26  Ken Kocienda  <kocienda@apple.com>
1754
1755         Reviewed by John
1756         
1757         Fix for this bug:
1758         
1759         <rdar://problem/3633458>: "REGRESSION (125-137): Can't drag a selection unless it starts at beginning of line"
1760
1761         * khtml/khtml_part.cpp:
1762         (KHTMLPart::isPointInsideSelection): I flubbed when I converted this
1763         code to use my new positionForCoordinates helper. I failed to add in
1764         the passed in values for x and y to the absolute coordinates for the
1765         clicked node. So, the "unless it starts at beginning of line" behavior 
1766         is exactly as one would expect.
1767
1768 2004-04-25  David Hyatt  <hyatt@apple.com>
1769
1770         Eliminate overhangingContents.  This concept was redundant with the overflowHeight mechanism that I
1771         implemented some time ago, and in fact, it causes us to grovel through much more of the render tree
1772         than we should when painting.  It turns out that none of the places that used this boolean needed
1773         to any longer, and so the entire implementation can now be removed from the tree.
1774         
1775         Reviewed by mjs, darin
1776
1777         * khtml/rendering/render_block.cpp:
1778         (khtml::RenderBlock::addChildToFlow):
1779         (khtml::RenderBlock::layoutBlock):
1780         (khtml::RenderBlock::paint):
1781         (khtml::RenderBlock::insertPositionedObject):
1782         * khtml/rendering/render_box.cpp:
1783         (RenderBox::calcHeight):
1784         * khtml/rendering/render_image.cpp:
1785         (RenderImage::setStyle):
1786         * khtml/rendering/render_inline.cpp:
1787         (RenderInline::addChildToFlow):
1788         * khtml/rendering/render_object.cpp:
1789         (RenderObject::RenderObject):
1790         (RenderObject::containingBlock):
1791         (RenderObject::information):
1792         (RenderObject::dump):
1793         (RenderObject::nodeAtPoint):
1794         * khtml/rendering/render_object.h:
1795         (khtml::RenderObject::minMaxKnown):
1796         * khtml/rendering/render_table.cpp:
1797         (RenderTable::layout):
1798         (RenderTable::paint):
1799         (RenderTableCell::paint):
1800
1801 2004-04-23  David Hyatt  <hyatt@apple.com>
1802
1803         Fix for 3258403, implement support for min-height and max-height on normal flow elements.  With this patch the
1804         only min-height/max-height work that remains to be done is for table cells and positioned elements.
1805         
1806         Reviewed by darin
1807
1808         * khtml/rendering/render_box.cpp:
1809         (RenderBox::calcHeight):
1810         (RenderBox::calcHeightUsing):
1811         (RenderBox::calcPercentageHeight):
1812         * khtml/rendering/render_box.h:
1813         * layout-tests/fast/block/basic/minheight-expected.txt: Added.
1814         * layout-tests/fast/block/basic/minheight.html: Added.
1815
1816 2004-04-25  Darin Adler  <darin@apple.com>
1817
1818         Reviewed by Dave.
1819
1820         - fixed <rdar://problem/3633091>: "add overrideMimeType function to XMLHttpRequest"
1821
1822         * khtml/ecma/xmlhttprequest.cpp:
1823         (KJS::XMLHttpRequest::getValueProperty): Add logic to override MIME type if
1824         OverrideMIMEType was called.
1825         (KJS::XMLHttpRequestProtoFunc::tryCall): Store the MIME type when overrideMimeType is called.
1826         * khtml/ecma/xmlhttprequest.h: Add OverrideMIMEType to the XMLHttpRequest property enum,
1827         and also add a MIMETypeOverride data member to the class.
1828         * khtml/ecma/xmlhttprequest.lut.h: Regenerated.
1829
1830 2004-04-25  Maciej Stachowiak  <mjs@apple.com>
1831
1832         Reviewed by Darin.
1833
1834         <rdar://problem/3628309>: Fedex tracking page so slow it seems like a hang (site change?)
1835         <rdar://problem/3608061>: "ATI Developer site so slow it seems like a hang"
1836         <rdar://problem/3612130>: "Reproducible hang in JavaScript at www.tfl.gov.uk"
1837         <rdar://problem/3626022>: "Safari was consuming > 100% CPU on dual-G5 Mac, sample shows JavaScript"
1838         <rdar://problem/3632348>: "www.whatis.com search for "pivot table" leads to JavaScript hang"
1839         
1840         * khtml/ecma/kjs_html.cpp:
1841         (KJS::HTMLElement::getValueProperty): The "text" property for anchors should be
1842         innerText, not innerHTML.
1843         * khtml/html/html_elementimpl.cpp:
1844         (HTMLElementImpl::innerText): Make sure not to include all the text after an
1845         element if it has no children.
1846         * layout-tests/fast/dom/anchor-text-expected.txt: Added.
1847         * layout-tests/fast/dom/anchor-text.html: Added.
1848         * layout-tests/fast/dom/inner-text-expected.txt: Added.
1849         * layout-tests/fast/dom/inner-text.html: Added.
1850
1851 2004-04-24  Darin Adler  <darin@apple.com>
1852
1853         Reviewed by Dave.
1854
1855         - fixed <rdar://problem/3488892>: "anchor names with non-ASCII characters in them do not work"
1856
1857         * khtml/khtml_part.h: Add new gotoAnchor helper function, private.
1858         * khtml/khtml_part.cpp:
1859         (KHTMLPart::openURL): Call new gotoAnchor helper, since the code is now complex enough
1860         that I don't want to copy and paste.
1861         (KHTMLPart::gotoAnchor): Use the pages own encoding when decoding the string for an
1862         anchor reference when going to an anchor. This matches the behavior of other browsers.
1863         (KHTMLPart::slotFinishedParsing): Call new gotoAnchor helper.
1864         * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::scrollToAnchor): Call new gotoAnchor helper.
1865
1866         * kwq/KWQKURL.h: Removed htmlRef function, and made encodedHtmlRef an inline.
1867         Removed unused encoding hint parameter from setQuery (it's not a "hint" at all, but we
1868         don't use it). Added a codec parameter to decode_string.
1869         * kwq/KWQKURL.mm:
1870         (hexDigitValue): Added. Helper function.
1871         (KURL::setQuery): Removed unused parameter.
1872         (KURL::decode_string): Implemented this function. It needs to use an encoding specified
1873         by the web page. Also, we wanted to make a version that did not use the
1874         CFURLCreateStringByReplacingPercentEscapes function anyway.
1875
1876         * kwq/KWQString.h: Added parameters to copyLatin1. Now you can copy an arbitrary substring.
1877         * kwq/KWQString.mm: (QString::copyLatin1): Updated implementation to handle the two
1878         new parameters.
1879
1880         * WebCore-tests.exp: Updated for change in signature of setQuery and decode_string.
1881         * WebCore-combined.exp: Regenerated.
1882
1883 2004-04-24  Darin Adler  <darin@apple.com>
1884
1885         - fixed <rdar://problem/3570953>: "Update "Acknowledgements" to remove expat and possibly include libxml"
1886
1887         * WebCore.pbproj/project.pbxproj: Removed the part of the copyright notice that was for expat contributors.
1888
1889 2004-04-23  David Hyatt  <hyatt@apple.com>
1890
1891         Fix the apple-line-clamp values to more closely match what is needed, an even split of the max lines between the possible
1892         values.
1893
1894         * khtml/rendering/render_flexbox.cpp:
1895         (khtml::RenderFlexibleBox::layoutVerticalBox):
1896
1897 2004-04-23  David Hyatt  <hyatt@apple.com>
1898
1899         Fix to make the containing block percentage height calculation actually work according to the CSS2 spec.
1900         Percentages other than 100% are now supported, and flexing percentage height blocks inside table cells
1901         are now supported.
1902
1903         Reviewed by kocienda
1904
1905         * khtml/rendering/render_box.cpp:
1906         (RenderBox::calcHeight):
1907         (RenderBox::calcPercentageHeight):
1908         * khtml/rendering/render_box.h:
1909
1910 2004-04-23  Ken Kocienda  <kocienda@apple.com>
1911
1912         Reviewed by John
1913
1914         Fix for this bug:
1915         <rdar://problem/3632163>: "REGRESSSION: crash on css home page"
1916
1917         * khtml/rendering/render_block.cpp:
1918         (khtml::RenderBlock::positionForRenderer): Add null check.
1919
1920 2004-04-20  David Hyatt  <hyatt@apple.com>
1921
1922         Fix hiermenu opacity bug.  Make sure to save/restore the graphics state before pushing and popping
1923         transparency layers, so that alterations to alpha don't accidentally persist.
1924         
1925         Reviewed by kocienda
1926
1927         * kwq/KWQPainter.mm:
1928         (QPainter::beginTransparencyLayer):
1929         (QPainter::endTransparencyLayer):
1930
1931 2004-04-20  David Hyatt  <hyatt@apple.com>
1932
1933         Fix for 3622818, bad rendering on sabernomics.com.  Just eliminate the priority difference between
1934         4 and 5, and make all of the priority 4 tags the same.  This seems to match other browsers.
1935         
1936         Reviewed by kocienda
1937
1938         * khtml/html/dtd.cpp:
1939
1940 2004-04-23  Ken Kocienda  <kocienda@apple.com>
1941
1942         Reviewed by Darin
1943
1944         Changed inlineBoxForRenderer(RenderObject *, int) helper that was static 
1945         in dom_position.cpp into a virtual method on RenderObjects. Function is
1946         now called inlineBox(int). Functionality unchanged.
1947
1948         * khtml/rendering/render_br.cpp:
1949         (RenderBR::inlineBox)
1950         * khtml/rendering/render_br.h:
1951         * khtml/rendering/render_object.cpp:
1952         (RenderObject::caretMaxRenderedOffset)
1953         (RenderObject::inlineBox)
1954         * khtml/rendering/render_object.h:
1955         * khtml/rendering/render_text.cpp:
1956         (RenderText::inlineBox)
1957         * khtml/rendering/render_text.h:
1958         * khtml/xml/dom_position.cpp:
1959         (DOM::renderersOnDifferentLine):
1960         (DOM::nextRenderedEditable)
1961         (DOM::previousRenderedEditable)
1962         (DOM::Position::previousLinePosition)
1963         (DOM::Position::nextLinePosition)
1964         (DOM::Position::rendersInDifferentPosition)
1965
1966 2004-04-23  Ken Kocienda  <kocienda@apple.com>
1967
1968         Reviewed by Darin
1969
1970         * khtml/editing/htmlediting_impl.cpp:
1971         (DeleteSelectionCommandImpl::doApply): Fix editing test
1972         regression with deleting whitespace at the end of the line.
1973         I just made this "improvement" yesterday, and the concept
1974         of the change is a good one, but instead of short-circuiting
1975         if the selection after deleting collapsible whitespace is a
1976         range (which can be confused by "significant" collapsed 
1977         whitespace at the end of a line), short-circuit if the 
1978         upstream start position equals the downstream end position.
1979
1980 === Safari-138 ===
1981
1982 2004-04-23  Ken Kocienda  <kocienda@apple.com>
1983
1984         Reviewed by John
1985
1986         Added some plumbing for applying styles.
1987
1988         * khtml/xml/dom_docimpl.cpp:
1989         (DocumentImpl::createCSSStyleDeclaration): New factory method.
1990         * khtml/xml/dom_docimpl.h: Declare the above.
1991         * kwq/DOM-CSS.mm:
1992         (-[DOMCSSStyleDeclaration _styleDeclarationImpl]): Expose this in the
1993         WebCoreInternal category, "promoting" it from being private to the 
1994         DOM-CSS.mm file.
1995         * kwq/DOM.mm: Add -(DOMCSSStyleDeclaration *)createCSSStyleDeclaration extension.
1996         * kwq/DOMExtensions.h: Delcare the above.
1997         * kwq/DOMInternal.h: Add _styleDeclarationImpl to WebCoreInternal category.
1998
1999 2004-04-23  John Sullivan  <sullivan@apple.com>
2000
2001         - fixed <rdar://problem/3631541>: "repro crash in KHTMLPart::setFocusNodeIfNeeded"
2002
2003         Reviewed by Maciej.
2004
2005         * khtml/khtml_part.cpp:
2006         (KHTMLPart::setFocusNodeIfNeeded):
2007         added nil check
2008
2009 2004-04-23  Maciej Stachowiak  <mjs@apple.com>
2010
2011         Back out one of the previous changes, it causes a crash. Whoops!
2012         
2013         * kwq/KWQScrollView.mm:
2014         (QScrollView::addChild):
2015
2016 2004-04-23  Maciej Stachowiak  <mjs@apple.com>
2017
2018         Reviewed by Dave.
2019
2020         These two tiny changes (made w/ Dave's help) should get us about
2021         1% or so combined on the HTML iBench.
2022
2023         * khtml/rendering/render_br.cpp:
2024         (RenderBR::setStyle): Don't call superclass setStyle, since
2025         according to Dave we don't need any of the work done in there.
2026         * kwq/KWQScrollView.mm:
2027         (QScrollView::addChild): Don't actually move the widget if the x
2028         coordinate is -500000, since we don't need the initial offscreen
2029         positioning that KHTML does and it is costly to do.
2030
2031 2004-04-22  Ken Kocienda  <kocienda@apple.com>
2032
2033         Reviewed by Hyatt
2034
2035         * khtml/editing/htmlediting_impl.cpp:
2036         (DeleteSelectionCommandImpl::doApply): Short-circuit return if the selection
2037         is not a range after collapsing whitespace.
2038
2039 2004-04-22  Ken Kocienda  <kocienda@apple.com>
2040
2041         Reviewed by Hyatt
2042
2043         More work to bring code up to date with the latest API proposal.
2044
2045         * khtml/xml/dom_selection.h: Fix typo in comment.
2046         * kwq/WebCoreBridge.h: -applyStyle:toElementsInDOMRange: is now applyStyle:
2047         * kwq/WebCoreBridge.mm:
2048         (-[WebCoreBridge applyStyle:]): Ditto.
2049
2050 2004-04-22  Ken Kocienda  <kocienda@apple.com>
2051
2052         Reviewed by John
2053
2054         Adds the notion of selection affinity to the editing API, bringing it up to
2055         date with the latest proposal.
2056
2057         * khtml/xml/dom_selection.cpp:
2058         (DOM::Selection::Selection): Adds support for selection affinity member variable.
2059         (DOM::Selection::init): Ditto.
2060         (DOM::Selection::operator=): Ditto.
2061         (DOM::Selection::setAffinity): New function.
2062         (DOM::Selection::layoutCaret): Added comment to indicate that we need to enhance this
2063         function to handle selection affinity.
2064         * khtml/xml/dom_selection.h: Added EAffinity enum and m_affinity member variable.
2065         (DOM::Selection::): Moved the enums above the constructors. No code change.
2066         (DOM::Selection::affinity): New accessor.
2067         * kwq/WebCoreBridge.h:
2068         * kwq/WebCoreBridge.mm: Add selection affinity to API declarations as needed.
2069         (-[WebCoreBridge setSelectedDOMRange:affinity:]): Ditto.
2070         (-[WebCoreBridge selectedDOMRange]): Ditto.
2071         (-[WebCoreBridge selectionAffinity]): Ditto.
2072
2073 2004-04-21  Maciej Stachowiak  <mjs@apple.com>
2074
2075         Reviewed by Darin.
2076
2077         Preliminary change for conservative GC. Use new "protected"
2078         subclasses to GC-protect objects when on heap, since we will soon
2079         remove the built-in refcounting of the normal wrapper classes.
2080         
2081         * ForwardingHeaders/kjs/protect.h: Added.
2082         * khtml/ecma/kjs_binding.h:
2083         * khtml/ecma/kjs_events.h:
2084         * khtml/ecma/kjs_traversal.h:
2085         * khtml/ecma/kjs_window.h:
2086
2087 2004-04-22  Darin Adler  <darin@apple.com>
2088
2089         * khtml/ecma/kjs_window.cpp: (Window::get): Removed code that gets properties from the parent.
2090         This was a mistake we inherited from KHTML, and they have long since fixed it.
2091
2092 2004-04-22  Ken Kocienda  <kocienda@apple.com>
2093
2094         Reviewed by Hyatt
2095
2096         Ensures caret visibility after making an editing action.
2097
2098         * khtml/xml/dom_selection.cpp:
2099         (DOM::Selection::getRepaintRect): Expose this as public.
2100         * khtml/xml/dom_selection.h: Ditto.
2101         * kwq/WebCoreBridge.h: Add ensureCaretVisible method.
2102         * kwq/WebCoreBridge.mm:
2103         (-[WebCoreBridge replaceSelectionWithMarkupString:baseURLString:]):
2104         Unrelated crash fix. Null-check baseURLString.
2105         (-[WebCoreBridge ensureCaretVisible]): Added.
2106
2107 2004-04-21  David Hyatt  <hyatt@apple.com>
2108
2109         Fix for 3245627, nested tables don't expand vertically.  I actually fixed the basic problem in the
2110         previous checkin, but this exposed another basic math error where |numVariable| was not being
2111         decremented properly.  This meant space was mis-allocated when multiple variable height rows both needed
2112         to expand.
2113
2114         * khtml/rendering/render_table.cpp:
2115         (RenderTableSection::layoutRows):
2116
2117 2004-04-21  David Hyatt  <hyatt@apple.com>
2118
2119         Fix for 3020449, ensure that the paint order of cells with rowspans matches other browsers.
2120         
2121         Reviewed by darin
2122
2123         * khtml/rendering/render_table.cpp:
2124         (RenderTableSection::paint):
2125
2126 2004-04-21  David Hyatt  <hyatt@apple.com>
2127
2128         Remove the (incorrect) restriction on table flexing that required the cell to have a fixed width.  In
2129         reality, the style on the cell is completely irrelevant.
2130         
2131         Reviewed by kocienda
2132
2133         * khtml/rendering/render_table.cpp:
2134         (RenderTable::layout):
2135
2136 2004-04-21  David Hyatt  <hyatt@apple.com>
2137
2138         Make sure cells that get flexed vertically in tables don't check text children when looking for 
2139         percentage height children.
2140         
2141         Reviewed by kocienda
2142
2143         * khtml/rendering/render_table.cpp:
2144         (RenderTableSection::layoutRows):
2145
2146 2004-04-21  David Hyatt  <hyatt@apple.com>
2147
2148         Fix for hiermenus bug.  Absolutely positioned images should not contribute to their containing block's
2149         max width.  Make sure to disregard positioned elements when computing min/max width.
2150         
2151         Reviewed by kocienda
2152
2153         * khtml/rendering/render_block.cpp:
2154         (khtml::InlineMinMaxIterator::next):
2155
2156 2004-04-21  Ken Kocienda  <kocienda@apple.com>
2157
2158         Reviewed by Hyatt
2159
2160         * khtml/editing/htmlediting_impl.cpp:
2161         (DeleteSelectionCommandImpl::doApply): Do not shift ending selection downstream
2162         when at position zero of a BR. That's just wrong. Simplify code that does
2163         "onlyWhitespace" delete. No need to handle multiple characters here; we can
2164         only ever have one thanks to the delete-collapsible-whitespace code.
2165         (TypingCommandImpl::issueCommandForDeleteKey): Don't do anything if at the
2166         start of a root editable block. This is a no-op....not an opportunity to crash.
2167         * khtml/rendering/render_block.cpp:
2168         (khtml::RenderBlock::positionForRenderer): Return this renderer's element position
2169         if the passed-in renderer is nil. This helps to make clicking in empty blocks work.
2170         * khtml/rendering/render_container.cpp:
2171         (RenderContainer::positionForCoordinates): Fixed typo in comment.
2172         * khtml/xml/dom_position.cpp:
2173         (DOM::Position::equivalentLeafPosition): Do not attempt to find a leaf if the
2174         position's node does not have a renderer, if the renderer has no kids.
2175         * layout-tests/editing/deleting/delete-br-001-expected.txt: Update expected results for BR fix.
2176         * layout-tests/editing/deleting/delete-br-003-expected.txt: Ditto.
2177         * layout-tests/editing/deleting/delete-br-006-expected.txt: Ditto.
2178         * layout-tests/editing/deleting/delete-br-007.html: Added. New BR test.
2179         * layout-tests/editing/deleting/delete-br-007-expected.txt: Added.
2180
2181 2004-04-21  Ken Kocienda  <kocienda@apple.com>
2182
2183         Reviewed by Hyatt
2184
2185         * khtml/css/css_computedstyle.cpp:
2186         (DOM::CSSComputedStyleDeclarationImpl::getPropertyCSSValue): Added implementations for
2187         these properties: CSS_PROP_TEXT_DECORATION, CSS_PROP_VERTICAL_ALIGN, CSS_PROP_TEXT_INDENT,
2188         CSS_PROP_LETTER_SPACING, CSS_PROP_WORD_SPACING, CSS_PROP_LINE_HEIGHT
2189
2190 2004-04-21  Ken Kocienda  <kocienda@apple.com>
2191
2192         Reviewed by John
2193
2194         The Selection class now uses the Position class throughout its public and
2195         private interface. This replaces the inconsistent use of the Position
2196         class here and node/offset pairs there. There are no functional changes, only
2197         updates to the new Selection class API.
2198
2199         * khtml/ecma/kjs_window.cpp:
2200         (Selection::get):
2201         (SelectionFunc::tryCall):
2202         * khtml/editing/htmlediting_impl.cpp:
2203         (DeleteCollapsibleWhitespaceCommandImpl::doApply):
2204         (DeleteSelectionCommandImpl::joinTextNodesWithSameStyle):
2205         (DeleteSelectionCommandImpl::doApply):
2206         (InputNewlineCommandImpl::doApply):
2207         (InputTextCommandImpl::deleteCharacter):
2208         (InputTextCommandImpl::prepareForTextInsertion):
2209         (InputTextCommandImpl::execute):
2210         (PasteMarkupCommandImpl::doApply):
2211         (TypingCommandImpl::issueCommandForDeleteKey):
2212         * khtml/khtml_part.cpp:
2213         (KHTMLPart::findTextNext):
2214         (KHTMLPart::setFocusNodeIfNeeded):
2215         (KHTMLPart::notifySelectionChanged):
2216         (KHTMLPart::isPointInsideSelection):
2217         (KHTMLPart::handleMouseMoveEventSelection):
2218         (KHTMLPart::khtmlMouseReleaseEvent):
2219         (KHTMLPart::selectAll):
2220         * khtml/rendering/render_block.cpp:
2221         (khtml::RenderBlock::paintObject):
2222         * khtml/xml/dom_docimpl.cpp:
2223         (DocumentImpl::updateSelection):
2224         * khtml/xml/dom_nodeimpl.cpp:
2225         * khtml/xml/dom_selection.cpp:
2226         (DOM::emptyPosition):
2227         (DOM::Selection::Selection):
2228         (DOM::Selection::init):
2229         (DOM::Selection::operator=):
2230         (DOM::Selection::moveTo):
2231         (DOM::Selection::modify):
2232         (DOM::Selection::xPosForVerticalArrowNavigation):
2233         (DOM::Selection::clear):
2234         (DOM::Selection::setBase):
2235         (DOM::Selection::setExtent):
2236         (DOM::Selection::setBaseAndExtent):
2237         (DOM::Selection::setStart):
2238         (DOM::Selection::setEnd):
2239         (DOM::Selection::setStartAndEnd):
2240         (DOM::Selection::toRange):
2241         (DOM::Selection::layoutCaret):
2242         (DOM::Selection::needsCaretRepaint):
2243         (DOM::Selection::paintCaret):
2244         (DOM::Selection::validate):
2245         (DOM::Selection::moveToRenderedContent):
2246         (DOM::Selection::nodeIsBeforeNode):
2247         (DOM::startAndEndLineNodesIncludingNode):
2248         (DOM::Selection::debugRenderer):
2249         (DOM::Selection::debugPosition):
2250         * khtml/xml/dom_selection.h:
2251         (DOM::Selection::~Selection):
2252         (DOM::Selection::base):
2253         (DOM::Selection::extent):
2254         (DOM::Selection::start):
2255         (DOM::Selection::end):
2256         (DOM::Selection::assignBase):
2257         (DOM::Selection::assignExtent):
2258         (DOM::Selection::assignBaseAndExtent):
2259         (DOM::Selection::assignStart):
2260         (DOM::Selection::assignEnd):
2261         (DOM::Selection::assignStartAndEnd):
2262         (DOM::operator==):
2263         * kwq/KWQKHTMLPart.mm:
2264         (KWQKHTMLPart::jumpToSelection):
2265         (KWQKHTMLPart::selectionStartOffset):
2266         (KWQKHTMLPart::selectionEndOffset):
2267         (KWQKHTMLPart::selectionStart):
2268         (KWQKHTMLPart::selectionEnd):
2269         * kwq/KWQRenderTreeDebug.cpp:
2270         (writeSelection):
2271         * kwq/WebCoreBridge.mm:
2272         (-[WebCoreBridge isSelectionEditable]):
2273         (-[WebCoreBridge setSelectionFrom:startOffset:to:endOffset:]):
2274         (-[WebCoreBridge setSelectedDOMRange:]):
2275
2276 2004-04-20  Ken Kocienda  <kocienda@apple.com>
2277
2278         Reviewed by Hyatt
2279         
2280         Renamed DOMPosition class to Position.
2281         Renamed KHTMLSelection to Selection and moved to DOM namespace.
2282
2283         * ForwardingHeaders/xml/dom_selection.h: Added.
2284         * WebCore.pbproj/project.pbxproj: Go Xcode!
2285         * khtml/khtml_selection.cpp: Removed.
2286         * khtml/khtml_selection.h: Removed.
2287         * khtml/xml/dom_position.cpp: Renamed DOMPosition to Position
2288         * khtml/xml/dom_position.h: Ditto.
2289         * khtml/xml/dom_selection.cpp: New home for renamed Selection object.
2290         * khtml/xml/dom_selection.h: Ditto.
2291
2292 2004-04-20  Ken Kocienda  <kocienda@apple.com>
2293
2294         Reviewed by Hyatt
2295
2296         * WebCore.pbproj/project.pbxproj:
2297         * khtml/khtml_part.cpp:
2298         (KHTMLPart::handleMousePressEventDoubleClick): Improved name of expandToElement. Now is expandUsingGranularity.
2299         (KHTMLPart::handleMousePressEventTripleClick): Ditto.
2300         (KHTMLPart::handleMouseMoveEventSelection): Ditto.
2301         * khtml/khtml_selection.cpp:
2302         (KHTMLSelection::modify): Added support for modifying and extending selection right and left by word.
2303         Also added support for extending selection up and down.
2304         (KHTMLSelection::expandUsingGranularity): New name for expandToElement.
2305         (KHTMLSelection::xPosForVerticalArrowNavigation): Made this function handle cases where we know we
2306         want to use a particular position for calculating the right x position. We need this to handle
2307         extending selection up and down, and for setting the caret to the right place when moving up
2308         and down when a range is already selected.
2309         (KHTMLSelection::validate): Name tweak. expandTo variable now granularity.
2310         * khtml/khtml_selection.h: Make declaration changes for changes to cpp file.
2311         * khtml/misc/helper.cpp:
2312         (khtml::findWordBoundary): Added this hook for KDE to do their version of KWQFindWordBoundary
2313         * khtml/misc/helper.h:
2314         * khtml/rendering/render_block.cpp:
2315         (khtml::RenderBlock::positionForCoordinates): Factor out closest box finder code to its own function
2316         * khtml/rendering/render_line.cpp:
2317         (InlineFlowBox::closestChildForXPos): New function. This is the factored code that was taken out of 
2318         render_block.cpp.
2319         (InlineBox::closestLeafChildForXPos): Ditto.
2320         * khtml/rendering/render_line.h: Ditto.
2321         * khtml/rendering/render_replaced.cpp:
2322         (RenderReplaced::positionForCoordinates): I think I am starting to get how the coordinate transforms work.
2323         Made some fixups based on this greater sense of enlightenment.
2324         * khtml/rendering/render_text.cpp:
2325         (RenderText::positionForCoordinates): Ditto. Fix lastTextBox/firstTextBox code mistake.
2326         * khtml/xml/dom_position.cpp:
2327         (DOMPosition::previousWordPosition): Added.
2328         (DOMPosition::nextWordPosition): Added.
2329         (DOMPosition::previousLinePosition): No longer use nodeAtPoint. Use new closestLeafChildForXPos instead.
2330         (DOMPosition::nextLinePosition): Ditto.
2331         (DOMPosition::inLastEditableInContainingEditableBlock):
2332         * khtml/xml/dom_position.h:
2333         * kwq/KWQTextUtilities.cpp: Added.
2334         (KWQFindWordBoundary): Factored out code that was in a static function in khtml_selection.cpp so 
2335         that DOMPosition can use it too.
2336         * kwq/KWQTextUtilities.h: Added.
2337
2338 2004-04-19  Ken Kocienda  <kocienda@apple.com>
2339
2340         Reviewed by Hyatt
2341
2342         * khtml/khtml_part.cpp:
2343         (KHTMLPart::notifySelectionChanged): Clear the value
2344         used for maintaining x position when doing vertical arrow
2345         navigation. WebCoreBridge restores this value when needed. 
2346         (KHTMLPart::setXPosForVerticalArrowNavigation): New accessor.
2347         (KHTMLPart::xPosForVerticalArrowNavigation): New accessor.
2348         * khtml/khtml_part.h:
2349         (KHTMLPart::): Add NoXPosForVerticalArrowNavigation constant.
2350         * khtml/khtml_selection.cpp:
2351         (KHTMLSelection::modify): Add cases for UP and DOWN navigation
2352         (KHTMLSelection::xPosForVerticalArrowNavigation): New helper.
2353         * khtml/khtml_selection.h: Add UP and DOWN constants to EDirection enum.
2354         (KHTMLSelection::):
2355         * khtml/khtmlpart_p.h: Declare storage for m_xPosForVerticalArrowNavigation, 
2356         the value used for maintaining x position when doing vertical arrow
2357         navigation. 
2358         * khtml/rendering/render_block.cpp:
2359         (khtml::RenderBlock::positionForCoordinates): Improved this function to
2360         handle deficiencies exposed when trying to implement new behavior.
2361         * khtml/rendering/render_br.cpp:
2362         (RenderBR::positionForCoordinates): Added implementation of this virtual function.
2363         * khtml/rendering/render_br.h: Declare implementation for positionForCoordinates virtual function.
2364         * khtml/rendering/render_replaced.cpp:
2365         (RenderReplaced::positionForCoordinates): Improved this function to
2366         handle deficiencies exposed when trying to implement new behavior.
2367         * khtml/rendering/render_text.cpp:
2368         (InlineTextBox::offsetForPosition): Remove left/right "bounds" check here.
2369         (RenderText::positionForCoordinates): Improved this function to
2370         handle deficiencies exposed when trying to implement new behavior.
2371         * khtml/xml/dom_position.cpp:
2372         (inlineBoxForRenderer): Moved to top of file so all code in the file can see this static function.
2373         (renderersOnDifferentLine): Ditto.
2374         (nextRenderedEditable): Ditto.
2375         (previousRenderedEditable): Ditto.
2376         (DOMPosition::previousLinePosition): New function. Implements the guts of up/down navigation.
2377         (DOMPosition::nextLinePosition): Ditto.
2378         * khtml/xml/dom_position.h: Added declarations for nextLinePosition and previousLinePosition.
2379         * kwq/WebCoreBridge.h: Add WebSelectUp and WebSelectDown constants.
2380         * kwq/WebCoreBridge.mm:
2381         (-[WebCoreBridge alterCurrentSelection:direction:granularity:]): Handles saving and restoring the 
2382         x position used for doing vertical arrow navigation.
2383
2384 2004-04-16  Ken Kocienda  <kocienda@apple.com>
2385
2386         Reviewed by Hyatt
2387
2388         * khtml/css/css_computedstyle.cpp:
2389         (DOM::CSSComputedStyleDeclarationImpl::getPropertyCSSValue): Added implementations for
2390         these four properties: CSS_PROP_WHITE_SPACE, CSS_PROP_DISPLAY, CSS_PROP_FLOAT, and CSS_PROP_COLOR.
2391
2392 2004-04-16  Chris Blumenberg  <cblu@apple.com>
2393
2394         Subresources weren't being archived for LINK tags.
2395
2396         Reviewed by kocienda.
2397
2398         * khtml/xml/dom_nodeimpl.cpp:
2399         (NodeImpl::recursive_toHTMLWithOptions): indent tweak
2400         * kwq/DOMHTML.mm:
2401         (-[DOMHTMLLinkElement _linkElementImpl]): C+casting voodoo to make methods like rel and href work correctly
2402
2403 2004-04-16  Ken Kocienda  <kocienda@apple.com>
2404
2405         Reviewed by Hyatt
2406
2407         * khtml/html/html_elementimpl.cpp:
2408         (HTMLElementImpl::isContentEditable): Call getDocument()->updateRendering() to make sure 
2409         outstanding changes for this attribute are applied.
2410         (HTMLElementImpl::contentEditable): Call getDocument()->updateRendering() to make sure 
2411         outstanding changes for this attribute are applied.
2412         (HTMLElementImpl::setContentEditable): Call enabled.isEmpty() before strcasecmp(enabled, "true").
2413         It's cheaper.
2414
2415 2004-04-16  Ken Kocienda  <kocienda@apple.com>
2416
2417         Reviewed by Hyatt
2418
2419         * khtml/editing/htmlediting_impl.cpp: New helper.
2420         (DeleteSelectionCommandImpl::containsOnlyWhitespace): Fix deleting collapsed whitespace 
2421         at the end of a line where text has flowed to the next line and the caret is at the 
2422         beginning of the next line. 
2423         (DeleteSelectionCommandImpl::doApply): Updated for new helper.
2424         * khtml/editing/htmlediting_impl.h:
2425         * layout-tests/editing/deleting/delete-line-end-ws-001-expected.txt: Added.
2426         * layout-tests/editing/deleting/delete-line-end-ws-001.html: Added.
2427         * layout-tests/editing/deleting/delete-line-end-ws-002-expected.txt: Added.
2428         * layout-tests/editing/deleting/delete-line-end-ws-002.html: Added.
2429
2430 === Safari-137 ===
2431
2432 2004-04-16  Richard Williamson   <rjw@apple.com>
2433
2434         Added an SPI to allow ObjC instances to be easily bound to 
2435         JS.  This is needed by the dashboard guys for their prototyping.
2436         Eventually they will use new API.
2437
2438         Reviewed by Chris.
2439
2440         * kwq/KWQKHTMLPart.h:
2441         * kwq/KWQKHTMLPart.mm:
2442         (KWQKHTMLPart::bindObject):
2443         * kwq/WebCoreBridge.h:
2444         * kwq/WebCoreBridge.mm:
2445         (-[WebCoreBridge bindObject:withName:]):
2446
2447 2004-04-16  Chris Blumenberg  <cblu@apple.com>
2448
2449         Added DOMHTMLEmbedElement as a DOM extension since EMBED is represented in our DOM even though its not part of the spec.
2450         Added all DOMCore and DOMHTML symbols to WebCore's symbols file.
2451         Removed isSubresourceURLAttribute from dom node. This was only used for the WebArchive feature and all that work is now done in WebKit.
2452
2453         Reviewed by kocienda.
2454
2455         * WebCore-combined.exp:
2456         * WebCore.exp:
2457         * khtml/html/html_baseimpl.cpp:
2458         (HTMLBodyElementImpl::isURLAttribute): renamed from isSubresourceURLAttribute. As a convenience to subclasses, dom_elementimpl would call isSubresourceURLAttribute in isURLAttribute, but this is no longer done
2459         (HTMLFrameElementImpl::isURLAttribute): ditto
2460         (HTMLIFrameElementImpl::isURLAttribute): ditto
2461         * khtml/html/html_baseimpl.h:
2462         * khtml/html/html_formimpl.cpp:
2463         (HTMLInputElementImpl::isURLAttribute): ditto
2464         * khtml/html/html_formimpl.h:
2465         * khtml/html/html_headimpl.cpp:
2466         (HTMLScriptElementImpl::isURLAttribute): ditto
2467         * khtml/html/html_headimpl.h:
2468         * khtml/html/html_imageimpl.cpp: 
2469         (HTMLImageElementImpl::isURLAttribute): ditto
2470         * khtml/html/html_imageimpl.h:
2471         * khtml/html/html_objectimpl.cpp:
2472         (HTMLEmbedElementImpl::isURLAttribute): ditto
2473         (HTMLObjectElementImpl::isURLAttribute): ditto
2474         (HTMLParamElementImpl::isURLAttribute): ditto
2475         * khtml/html/html_objectimpl.h:
2476         * khtml/html/html_tableimpl.cpp:
2477         (HTMLTableElementImpl::isURLAttribute): ditto
2478         (HTMLTableCellElementImpl::isURLAttribute): ditto
2479         * khtml/html/html_tableimpl.h:
2480         * khtml/xml/dom2_rangeimpl.cpp:
2481         (RangeImpl::toHTMLWithOptions): take a node list (see below)
2482         * khtml/xml/dom2_rangeimpl.h:
2483         * khtml/xml/dom_elementimpl.cpp:
2484         (ElementImpl::isURLAttribute):
2485         * khtml/xml/dom_elementimpl.h:
2486         * khtml/xml/dom_nodeimpl.cpp:
2487         (NodeImpl::recursive_toHTMLWithOptions): append copied nodes to a list of nodes so that WebKit can operate on them
2488         * khtml/xml/dom_nodeimpl.h:
2489         * kwq/DOM.mm:
2490         (+[DOMNode _nodeWithImpl:]): added support for HTML types
2491         * kwq/DOMExtensions.h:
2492         * kwq/DOMHTML.mm:
2493         (-[DOMHTMLPreElement setWidth:]):
2494         (-[DOMHTMLEmbedElement _embedElementImpl]):
2495         (-[DOMHTMLEmbedElement align]):
2496         (-[DOMHTMLEmbedElement setAlign:]):
2497         (-[DOMHTMLEmbedElement height]):
2498         (-[DOMHTMLEmbedElement setHeight:]):
2499         (-[DOMHTMLEmbedElement name]):
2500         (-[DOMHTMLEmbedElement setName:]):
2501         (-[DOMHTMLEmbedElement src]):
2502         (-[DOMHTMLEmbedElement setSrc:]):
2503         (-[DOMHTMLEmbedElement type]):
2504         (-[DOMHTMLEmbedElement setType:]):
2505         (-[DOMHTMLEmbedElement width]):
2506         (-[DOMHTMLEmbedElement setWidth:]):
2507         (-[DOMHTMLTableElement background]):
2508         (-[DOMHTMLTableElement setBackground:]):
2509         (-[DOMHTMLTableCellElement background]): new extension 
2510         (-[DOMHTMLTableCellElement setBackground:]): ditto
2511         * kwq/WebCoreBridge.h:
2512         * kwq/WebCoreBridge.mm:
2513         (-[WebCoreBridge nodesFromList:]): new
2514         (-[WebCoreBridge markupStringFromNode:nodes:]): return a list of nodes instead of subresource URLs so WebKit can operate on the nodes
2515         (-[WebCoreBridge markupStringFromRange:nodes:]): ditto
2516
2517 2004-04-15  David Hyatt  <hyatt@apple.com>
2518
2519         Fix for 3624335, bugs with overflow and positioned objects.  The scrollbar didn't properly update
2520         as you changed the sizes of positioned objects inside an overflow block.
2521         
2522         Reviewed by rjw
2523
2524         * khtml/rendering/render_block.cpp:
2525         (khtml::RenderBlock::layoutBlock):
2526         * khtml/rendering/render_flexbox.cpp:
2527         (khtml::RenderFlexibleBox::layoutBlock):
2528         * khtml/rendering/render_layer.cpp:
2529         (RenderLayer::updateScrollInfoAfterLayout):
2530
2531 2004-04-15  Ken Kocienda  <kocienda@apple.com>
2532
2533         Reviewed by Dave
2534         
2535         Improved selection behavior. As part of this work, I removed
2536         almost all of the checkSelectionPoint() functions, leaving
2537         only those associated with fonts, and all of the 
2538         checkSelectionPointIgnoringContinuations() functions. Each
2539         of these has been replaced by a new function called
2540         positionForCoordinates(), which returns a DOMPosition.
2541         
2542         * WebCore.pbproj/project.pbxproj:
2543         * khtml/khtml_events.cpp:
2544         (khtml::MouseEvent::offset): Converted to use positionForCoordinates.
2545         * khtml/khtml_part.cpp: Ditto.
2546         (KHTMLPart::isPointInsideSelection):
2547         (KHTMLPart::handleMousePressEventDoubleClick): Ditto.
2548         (KHTMLPart::handleMousePressEventTripleClick): Ditto.
2549         (KHTMLPart::handleMousePressEventSingleClick): Ditto.
2550         (KHTMLPart::handleMouseMoveEventSelection): Ditto.
2551         (KHTMLPart::khtmlMouseReleaseEvent): Ditto.
2552         * khtml/khtml_part.h:
2553         * khtml/rendering/render_block.cpp:
2554         (khtml::RenderBlock::positionForBox): New helper.
2555         (khtml::RenderBlock::positionForRenderer): New helper.
2556         (khtml::RenderBlock::positionForCoordinates): New selection-node-offset-finder method.
2557         * khtml/rendering/render_block.h:
2558         * khtml/rendering/render_br.cpp: Removed checkSelectionPointIgnoringContinuations.
2559         No special behavior is needed for this class anymore.
2560         * khtml/rendering/render_br.h: Ditoo.
2561         * khtml/rendering/render_container.cpp:
2562         (RenderContainer::positionForCoordinates): New selection-node-offset-finder method.
2563         * khtml/rendering/render_container.h:
2564         * khtml/rendering/render_line.cpp:
2565         (InlineBox::firstLeafChild): New helper.
2566         (InlineBox::lastLeafChild): New helper.
2567         (InlineFlowBox::firstLeafChild): New helper.
2568         (InlineFlowBox::lastLeafChild): New helper.
2569         * khtml/rendering/render_line.h:
2570         * khtml/rendering/render_object.cpp:
2571         (RenderObject::firstLeafChild): New helper.
2572         (RenderObject::lastLeafChild): New helper.
2573         (RenderObject::positionForCoordinates):
2574         * khtml/rendering/render_object.h:
2575         * khtml/rendering/render_replaced.cpp:
2576         (RenderReplaced::positionForCoordinates): New selection-node-offset-finder method.
2577         * khtml/rendering/render_replaced.h:
2578         * khtml/rendering/render_text.cpp:
2579         (InlineTextBox::offsetForPosition): New helper, replaces checkSelectionPoint()
2580         (RenderText::positionForCoordinates): New selection-node-offset-finder method.
2581         * khtml/rendering/render_text.h:
2582         * khtml/xml/dom_nodeimpl.cpp: Added positionForCoordinates() convenience here. This
2583         checks to see if the node has a renderer before doing the position check.
2584         * khtml/xml/dom_nodeimpl.h: Ditto.
2585         * kwq/DOM.mm:
2586         (-[DOMNode isContentEditable]): Added this unrelated method, since without it, I crash when dragging an image.
2587         * kwq/WebCoreBridge.mm:
2588         (-[WebCoreBridge moveCaretToPoint:]): Converted to use positionForCoordinates.
2589
2590 2004-04-15  David Hyatt  <hyatt@apple.com>
2591
2592         Fix for 3603455, block truncation support.
2593         
2594         Reviewed by kocienda
2595
2596         * khtml/css/cssparser.cpp:
2597         (CSSParser::parseValue):
2598         * khtml/css/cssproperties.c:
2599         (hash_prop):
2600         (findProp):
2601         * khtml/css/cssproperties.h:
2602         * khtml/css/cssproperties.in:
2603         * khtml/css/cssstyleselector.cpp:
2604         (khtml::CSSStyleSelector::applyProperty):
2605         * khtml/ecma/kjs_css.cpp:
2606         (cssPropertyName):
2607         * khtml/rendering/render_block.cpp:
2608         (khtml::RenderBlock::lineCount):
2609         (khtml::RenderBlock::heightForLineCount):
2610         * khtml/rendering/render_block.h:
2611         * khtml/rendering/render_flexbox.cpp:
2612         (khtml::RenderFlexibleBox::layoutHorizontalBox):
2613         (khtml::RenderFlexibleBox::layoutVerticalBox):
2614         * khtml/rendering/render_style.cpp:
2615         (marquee):
2616         (StyleCSS3NonInheritedData::operator==):
2617         (RenderStyle::diff):
2618         * khtml/rendering/render_style.h:
2619         (khtml::RenderStyle::lineClamp):
2620         (khtml::RenderStyle::setLineClamp):
2621         (khtml::RenderStyle::initialLineClamp):
2622
2623 2004-04-13  Chris Blumenberg  <cblu@apple.com>
2624
2625         - Removed WebCoreElementIsEditableKey. This functionality is available via [DOMNode isContentEditable].
2626
2627         Reviewed by rjw.
2628
2629         * WebCore-combined.exp:
2630         * WebCore.exp:
2631         * kwq/WebCoreBridge.h:
2632         * kwq/WebCoreBridge.mm:
2633         (-[WebCoreBridge elementAtPoint:]): removed use of WebCoreElementIsEditableKey
2634         (-[WebCoreBridge URLWithRelativeString:]): new method for WebKit API
2635
2636 2004-04-13  David Hyatt  <hyatt@apple.com>
2637
2638         Fix for 3559764, make sure overflow is applied consistently using a separate bit on render objects, so that
2639         the body scroll quirk can easily disable overflow even when it is present on the style.
2640         
2641         Reviewed by kocienda
2642
2643         * khtml/ecma/kjs_dom.cpp:
2644         (DOMNode::putValue):
2645         * khtml/rendering/bidi.cpp:
2646         (khtml::RenderBlock::layoutInlineChildren):
2647         * khtml/rendering/render_block.cpp:
2648         (khtml::RenderBlock::setStyle):
2649         (khtml::RenderBlock::layoutBlock):
2650         (khtml::RenderBlock::layoutBlockChildren):
2651         (khtml::RenderBlock::paintObject):
2652         (khtml::RenderBlock::rightOffset):
2653         (khtml::RenderBlock::lowestPosition):
2654         (khtml::RenderBlock::rightmostPosition):
2655         (khtml::RenderBlock::leftmostPosition):
2656         (khtml::RenderBlock::isPointInScrollbar):
2657         (khtml::RenderBlock::nodeAtPoint):
2658         (khtml::RenderBlock::inRootBlockContext):
2659         * khtml/rendering/render_block.h:
2660         (khtml::RenderBlock::overflowHeight):
2661         (khtml::RenderBlock::overflowWidth):
2662         * khtml/rendering/render_box.cpp:
2663         (RenderBox::setStyle):
2664         (RenderBox::contentWidth):
2665         (RenderBox::contentHeight):
2666         (RenderBox::absolutePosition):
2667         (RenderBox::computeAbsoluteRepaintRect):
2668         (RenderBox::calcAbsoluteVertical):
2669         * khtml/rendering/render_flexbox.cpp:
2670         (khtml::RenderFlexibleBox::layoutBlock):
2671         * khtml/rendering/render_flow.cpp:
2672         (RenderFlow::lowestPosition):
2673         (RenderFlow::rightmostPosition):
2674         (RenderFlow::leftmostPosition):
2675         * khtml/rendering/render_layer.cpp:
2676         (RenderLayer::updateLayerPosition):
2677         (RenderLayer::updateScrollInfoAfterLayout):
2678         (RenderLayer::intersectsDamageRect):
2679         (RenderLayer::containsPoint):
2680         * khtml/rendering/render_object.cpp:
2681         (RenderObject::RenderObject):
2682         (RenderObject::requiresLayer):
2683         (RenderObject::clientWidth):
2684         (RenderObject::clientHeight):
2685         (RenderObject::scrollWidth):
2686         (RenderObject::scrollHeight):
2687         (RenderObject::setStyle):
2688         (RenderObject::absolutePosition):
2689         (RenderObject::nodeAtPoint):
2690         (RenderObject::avoidsFloats):
2691         * khtml/rendering/render_object.h:
2692         (khtml::RenderObject::hasOverflowClip):
2693         (khtml::RenderObject::hasAutoScrollbars):
2694         (khtml::RenderObject::scrollsOverflow):
2695         (khtml::RenderObject::includeScrollbarSize):
2696         (khtml::RenderObject::setHasOverflowClip):
2697         * khtml/rendering/render_style.h:
2698         (khtml::RenderStyle::overflow):
2699         (khtml::RenderStyle::isDisplayReplacedType):
2700         (khtml::RenderStyle::isDisplayInlineType):
2701         * khtml/rendering/render_table.cpp:
2702         (RenderTable::setStyle):
2703         (RenderTableCell::setStyle):
2704         (RenderTableCell::requiresLayer):
2705         * khtml/rendering/render_table.h:
2706
2707 2004-04-12  David Hyatt  <hyatt@apple.com>
2708
2709         Fix for 3556036, make sure that when the position changes via style that all render layer
2710         descendants simply immediately repaint.
2711         
2712         Reviewed by kocienda
2713         
2714         * khtml/rendering/render_layer.cpp:
2715         (RenderLayer::repaintIncludingDescendants):
2716         * khtml/rendering/render_layer.h:
2717         * khtml/rendering/render_object.cpp:
2718         (RenderObject::setStyle):
2719
2720 2004-04-12  Chris Blumenberg  <cblu@apple.com>
2721
2722         - Fixed build failure by removing references to WebArchive in WebCore.
2723         - 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.
2724
2725         Reviewed by kocienda.
2726
2727         * khtml/editing/htmlediting.cpp:
2728         (PasteMarkupCommand::PasteMarkupCommand): take the base URL of the clipping
2729         * khtml/editing/htmlediting.h:
2730         * khtml/editing/htmlediting_impl.cpp:
2731         (PasteMarkupCommandImpl::PasteMarkupCommandImpl): take the base URL of the clipping
2732         (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
2733         * khtml/editing/htmlediting_impl.h:
2734         * khtml/xml/dom2_rangeimpl.cpp:
2735         (RangeImpl::toHTMLWithOptions): removed completeURLs param
2736         * khtml/xml/dom2_rangeimpl.h:
2737         * khtml/xml/dom_nodeimpl.cpp:
2738         (NodeImpl::recursive_toHTMLWithOptions): removed completeURLs param
2739         (NodeImpl::recursive_toHTML): ditto
2740         (NodeImpl::recursive_completeURLs): new
2741         * khtml/xml/dom_nodeimpl.h:
2742         * kwq/WebCoreBridge.h:
2743         * kwq/WebCoreBridge.mm:
2744         (-[WebCoreBridge markupStringFromNode:subresourceURLStrings:]): call recursive_toHTML with less params
2745         (-[WebCoreBridge markupStringFromRange:subresourceURLStrings:]): ditto
2746         (-[WebCoreBridge replaceSelectionWithMarkupString:baseURLString:]): take a base URL
2747
2748 2004-04-12  Ken Kocienda  <kocienda@apple.com>
2749
2750         Reviewed by Dave
2751
2752         Added execCommand support for cut/copy/paste.
2753         
2754         * khtml/xml/dom_docimpl.cpp:
2755         (DocumentImpl::execCommand): Added cut/copy/paste atoms and added else if cases
2756         for the commands.
2757         * kwq/KWQKHTMLPart.h:
2758         * kwq/KWQKHTMLPart.mm:
2759         (KWQKHTMLPart::issueCutCommand): Glue for calling from WebCore to do a cut in Cocoa.
2760         (KWQKHTMLPart::issueCopyCommand): Same as above, but for copy.
2761         (KWQKHTMLPart::issuePasteCommand): Same as above, but for paste.
2762         * kwq/WebCoreBridge.h: Declared issueCutCommand, issueCopyCommand, and issuePasteCommand
2763         to be implemented on the WebKit side of the bridge.
2764         * layout-tests/editing/editing.js: Added cut/copy/paste support to js library to support
2765         making layout tests.
2766         * layout-tests/editing/pasteboard/copy-paste-text-001-expected.txt: Added.
2767         * layout-tests/editing/pasteboard/copy-paste-text-001.html: Added.
2768         * layout-tests/editing/pasteboard/cut-paste-text-002-expected.txt: Added.
2769         * layout-tests/editing/pasteboard/cut-paste-text-002.html: Added.
2770         * layout-tests/editing/pasteboard/cut-text-001-expected.txt: Added.
2771         * layout-tests/editing/pasteboard/cut-text-001.html: Added.
2772
2773 2004-04-12  Ken Kocienda  <kocienda@apple.com>
2774
2775         Reviewed by John
2776         
2777         Some delete and insert cleanups.
2778
2779         * khtml/editing/htmlediting_impl.cpp:
2780         (DeleteSelectionCommandImpl::doApply): For ending position case 1,
2781         the caret should be placed before the first child of the containing block, 
2782         not before the containing block itself. Also, add some code to handle
2783         converting nbsp's back to regular spaces. This will need to be improved
2784         some day to convert only nbsp's added by the editor to make rendering come out right.
2785         (InputTextCommandImpl::execute): 
2786         (TypingCommandImpl::issueCommandForDeleteKey): Make deleting collapsible whitespace part 
2787         of the work of deleting a selection, rather than something that needs to be done by a 
2788         user of DeleteSelectionCommandImpl. This makes it impossible to leave out
2789         this essential step.
2790         (TypingCommandImpl::deleteKeyPressed): We can't use a possible optimization here until 
2791         the code to do deletions properly has been factored better. Big FIXME added.
2792         * layout-tests/editing/deleting/delete-block-contents-001-expected.txt: Updated for
2793         ending position case 1 behavior change.
2794         * layout-tests/editing/deleting/delete-block-contents-002-expected.txt: Ditto. 
2795         * layout-tests/editing/deleting/delete-block-contents-003-expected.txt: Ditto.
2796
2797 2004-04-09  Ken Kocienda  <kocienda@apple.com>
2798
2799         Reviewed by Darin
2800
2801         Added support for methods added to flesh out the WebKit 
2802         editing API.
2803
2804         * khtml/khtml_part.h: Removed pasteMarkupString and deleteSelection functions.
2805         All this work is now done in WebCoreBridge.
2806         * kwq/WebCoreBridge.h:
2807         * kwq/WebCoreBridge.mm:
2808         (-[WebCoreBridge isSelectionEditable]): Added a FIXME.
2809         (-[WebCoreBridge setDrawsBackground:]): Moved this since CVS merged this in the
2810         middle of editing code.
2811         (-[WebCoreBridge replaceSelectionWithNode:]): New method.
2812         (-[WebCoreBridge replaceSelectionWithText:]): Replaces insertText:
2813         (-[WebCoreBridge replaceSelectionWithMarkupString:]): New method.
2814         (-[WebCoreBridge replaceSelectionWithWebArchive:]): New method.
2815         (-[WebCoreBridge replaceSelectionWithNewline]): Replaces insertNewline:
2816         (-[WebCoreBridge deleteSelection]): New method.
2817         (-[WebCoreBridge applyStyle:toElementsInDOMRange:]): New method.
2818
2819 2004-04-09  Darin Adler  <darin@apple.com>
2820
2821         Reviewed by Ken.
2822
2823         - added "transparent mode"
2824
2825         * khtml/khtmlview.h: Added isTransparent and setTransparent functions.
2826         * khtml/khtmlview.cpp:
2827         (KHTMLViewPrivate::KHTMLViewPrivate): Initialize isTransparent to false.
2828         (KHTMLView::isTransparent): Return isTransparent.
2829         (KHTMLView::setTransparent): Set isTransparent.
2830
2831         * khtml/rendering/render_box.cpp:
2832         (RenderBox::paintRootBoxDecorations): Use slow repaints for the top frame when the view
2833         is transparent; also don't draw a background. This is the same thing we do for subframes.
2834         (RenderBox::paintBackgroundExtended): Don't do the extra draw so we can blend with the
2835         background color for the top frame when the view is transparent.
2836         * khtml/rendering/render_canvas.cpp: (RenderCanvas::paintBoxDecorations): More of the same.
2837
2838         * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::paint): Make "fill with red" debug mode work only
2839         when the view is not transparent.
2840
2841         * kwq/WebCoreBridge.h: Added setDrawsBackground: method.
2842         * kwq/WebCoreBridge.mm: (-[WebCoreBridge setDrawsBackground:]): If told NO
2843         (don't draw background), then set isTransparent to true on the KHTMLView.
2844
2845 2004-04-09  Ken Kocienda  <kocienda@apple.com>
2846
2847         Reviewed by me
2848         
2849         Added one more layout test for editing.
2850
2851         * layout-tests/editing/deleting/delete-3608445-fix-expected.txt: Added.
2852         * layout-tests/editing/deleting/delete-3608445-fix.html: Added.
2853
2854 2004-04-08  Maciej Stachowiak  <mjs@apple.com>
2855
2856         Reviewed by John.
2857
2858         Changed things so that newly created objects get a prototype based
2859         on the scope chain of the current function, rather than the
2860         interpreter that started execution. This fixes the following bugs:
2861         
2862         <rdar://problem/3368523>: ARCH: wrong prototype used to create new objects (hang on lookup.atomica.com)
2863         <rdar://problem/3559173>: ARCH: Cannot scan using a HP Jetdirect product (JS object prototypes bind incorrectly)
2864
2865         * khtml/ecma/kjs_binding.h:
2866         (KJS::cacheDOMObject):
2867         (KJS::cacheGlobalObject):
2868         * khtml/ecma/kjs_css.cpp:
2869         (KJS::getDOMStyleSheet):
2870         (KJS::getDOMStyleSheetList):
2871         (KJS::getDOMCSSValue):
2872         * khtml/ecma/kjs_dom.cpp:
2873         (KJS::getDOMDocumentNode):
2874         (KJS::getDOMNode):
2875         * khtml/ecma/kjs_events.cpp:
2876         (KJS::getDOMEvent):
2877         * khtml/ecma/kjs_html.cpp:
2878         (KJS::HTMLDocument::tryGet):
2879         (KJS::HTMLDocument::putValue):
2880         (KJS::getSelectHTMLCollection):
2881         * khtml/ecma/kjs_navigator.cpp:
2882         (Navigator::Navigator):
2883         (PluginBase::PluginBase):
2884         * khtml/ecma/kjs_window.cpp:
2885         (KJS::History::History):
2886         (KJS::FrameArray::FrameArray):
2887         (Screen::Screen):
2888         (Window::retrieveActive):
2889         (Window::put):
2890         (Window::isSafeScript):
2891         (WindowFunc::tryCall):
2892         (Location::put):
2893         (LocationFunc::tryCall):
2894
2895 2004-04-09  David Hyatt  <hyatt@apple.com>
2896
2897         Fix for 3613081, repaint glitches when using overflow:auto/overlay.
2898         
2899         Reviewed by john
2900
2901         * khtml/rendering/render_layer.cpp:
2902         (RenderLayer::updateScrollInfoAfterLayout):
2903
2904 2004-04-09  David Hyatt  <hyatt@apple.com>
2905
2906         Fix for 3608445, garbage characters rendered after doing delete.  Delta was unsigned when it was supposed to
2907         be signed, since deletion involves a negative delta.  Also had an off-by-one error in the line break end check.
2908         
2909         Reviewed by john
2910
2911         * khtml/rendering/render_text.cpp:
2912         (RenderText::setTextWithOffset):
2913
2914 2004-04-09  Ken Kocienda  <kocienda@apple.com>
2915
2916         Reviewed by me
2917         
2918         Added two more layout tests for editing.
2919
2920         * layout-tests/editing/selection/move-between-blocks-no-001-expected.txt: Added.
2921         * layout-tests/editing/selection/move-between-blocks-no-001.html: Added.
2922         * layout-tests/editing/selection/move-between-blocks-yes-001-expected.txt: Added.
2923         * layout-tests/editing/selection/move-between-blocks-yes-001.html: Added.
2924
2925 2004-04-09  Ken Kocienda  <kocienda@apple.com>
2926
2927         Reviewed by Dave
2928         
2929         Small collection of editing improvements.
2930
2931         * ChangeLog:
2932         * khtml/editing/htmlediting_impl.cpp:
2933         (shouldDeleteUpstreamPosition): This was deleting significant spaces on preceding
2934         lines when the caret was at the start of a line. Fixed. 
2935         (DeleteSelectionCommandImpl::doApply): Fixed a case where caret jumped to previous
2936         line when deleting a character at the start of a line after a BR.
2937         (InputNewlineCommandImpl::doApply): Handle more cases correctly. Previously, this
2938         only handled inserting a newline when the caret was already in a text node.
2939         (InputTextCommandImpl::prepareForTextInsertion): Ditto.
2940         (InputTextCommandImpl::execute): Ditto.
2941         * khtml/editing/htmlediting_impl.h:
2942         * khtml/rendering/render_block.cpp:
2943         (khtml::RenderBlock::checkSelectionPointIgnoringContinuations): Now can place caret
2944         with a click in an empty block.
2945         * khtml/rendering/render_block.h: Added checkSelectionPointIgnoringContinuations declaration.
2946         * khtml/rendering/render_replaced.cpp: 
2947         (RenderReplaced::checkSelectionPointIgnoringContinuations): Now can place caret with a click 
2948         on a replaced element.
2949         * khtml/rendering/render_replaced.h: Added checkSelectionPointIgnoringContinuations declaration.
2950         * khtml/rendering/render_text.cpp:
2951         (InlineTextBox::checkSelectionPoint): Now can place caret with a click in text on a line made "tall"
2952         by an image on the same line.
2953         * khtml/xml/dom_docimpl.cpp:
2954         (DocumentImpl::createEditingTextNode): This creates a text node subclass that whill always create
2955         a renderer for itself.
2956         * khtml/xml/dom_docimpl.h:
2957         * khtml/xml/dom_position.cpp:
2958         (DOMPosition::isLastRenderedPositionInEditableBlock): Improved code to handle more cases.
2959         * khtml/xml/dom_textimpl.cpp:
2960         (TextImpl::TextImpl): Rolled out m_rendererIsNeeded flag.
2961         (TextImpl::rendererIsNeeded): Ditto.
2962         (EditingTextImpl::EditingTextImpl): New class.
2963         (EditingTextImpl::~EditingTextImpl): New.
2964         (EditingTextImpl::rendererIsNeeded): New. Always returns true.
2965         * khtml/xml/dom_textimpl.h: New EditingTextImpl class.
2966         * layout-tests/editing/deleting/delete-3608430-fix-expected.txt: Added.
2967         * layout-tests/editing/deleting/delete-3608430-fix.html: Added.
2968         * layout-tests/editing/deleting/delete-3608462-fix-expected.txt: Added.
2969         * layout-tests/editing/deleting/delete-3608462-fix.html: Added.
2970         * layout-tests/editing/deleting/delete-trailing-ws-002-expected.txt: Added.
2971         * layout-tests/editing/deleting/delete-trailing-ws-002.html: Added.
2972
2973 2004-04-08  Chris Blumenberg  <cblu@apple.com>
2974
2975         Renamed the PasteHTMLCommand to PasteMarkupCommand. Removed PasteImageCommand because we will use PasteMarkupCommand for pasting images.
2976
2977         Reviewed by kocienda.
2978
2979         * ChangeLog:
2980         * khtml/editing/htmlediting.cpp:
2981         (PasteMarkupCommand::PasteMarkupCommand):
2982         (PasteMarkupCommand::~PasteMarkupCommand):
2983         (PasteMarkupCommand::impl):
2984         (PasteMarkupCommand::markupString):
2985         * khtml/editing/htmlediting.h:
2986         (khtml::):
2987         * khtml/editing/htmlediting_impl.cpp:
2988         (PasteMarkupCommandImpl::PasteMarkupCommandImpl):
2989         (PasteMarkupCommandImpl::~PasteMarkupCommandImpl):
2990         (PasteMarkupCommandImpl::commandID):
2991         (PasteMarkupCommandImpl::doApply):
2992         * khtml/editing/htmlediting_impl.h:
2993         (khtml::PasteMarkupCommandImpl::markupString):
2994         * khtml/khtml_part.cpp:
2995         (KHTMLPart::pasteMarkupString):
2996         * khtml/khtml_part.h:
2997         * kwq/WebCoreBridge.h:
2998         * kwq/WebCoreBridge.mm:
2999         (-[WebCoreBridge pasteMarkupString:]):
3000
3001
3002 2004-04-08  David Hyatt  <hyatt@apple.com>
3003
3004         Fix for 3608430 and 3608462, crashes in findNextLineBreak when deleting.  Make sure that the removal of line boxes
3005         always checks the previous root line box's line break information and dirties the line if it is pointing
3006         to the deleted object.
3007         
3008         Reviewed by kocienda
3009
3010         * khtml/rendering/render_line.cpp:
3011         (InlineFlowBox::removeChild):
3012
3013 2004-04-08  Chris Blumenberg  <cblu@apple.com>
3014
3015         Removed DOMExtensions.h from DOM.h until it is public.
3016
3017         Reviewed by koicienda.
3018
3019         * kwq/DOM.h:
3020
3021 2004-04-07  Chris Blumenberg  <cblu@apple.com>
3022
3023         WebCore side for supporting WebDOMOperations.   
3024
3025         Reviewed by rjw.
3026
3027         * WebCore-combined.exp:
3028         * WebCore.exp:
3029         * kwq/DOM.mm:
3030         * kwq/DOMExtensions.h:
3031         * kwq/WebCoreBridge.h:
3032         * kwq/WebCoreBridge.mm:
3033         (+[WebCoreBridge bridgeForDOMDocument:]): new
3034         (-[WebCoreBridge imageForImageElement:]): new
3035
3036 2004-04-07  Darin Adler  <darin@apple.com>
3037
3038         Reviewed by Chris.
3039
3040         * kwq/DOMCSS.h: Changed DOMCSS2Properties to be a category on DOMCSSStyleDeclaration
3041         (after API review, oops!, but I doubt anyone will even notice).
3042         * kwq/DOM-CSS.mm: Implemented the entire DOMCSS2Properties category.
3043
3044 2004-04-07  Ken Kocienda  <kocienda@apple.com>
3045
3046         Reviewed by Chris
3047
3048         * kwq/WebCoreBridge.mm:
3049         (-[WebCoreBridge _stringWithDocumentTypeStringAndMarkupString:]): Do not add a newline in between
3050         the doctype and the content. The newline was showing up when the content was pasted.
3051
3052 2004-04-07  Ken Kocienda  <kocienda@apple.com>
3053
3054         Reviewed by John
3055
3056         Removed concept of currentSelection from EditCommands and refined concept of
3057         startingSelection and endingSelection, making them work more sensibly in the 
3058         system of composed editing commands.
3059
3060         * khtml/editing/htmlediting.cpp: Removed currentSelection().
3061         * khtml/editing/htmlediting.h: Ditto.
3062         * khtml/editing/htmlediting_impl.cpp: currentSelection().
3063         (CompositeEditCommandImpl::applyCommandToComposite): Set the startingSelection 
3064         and endingSelection for the command being applied to the endingSelection of
3065         its new parent. This is the proper starting and ending point.
3066         (CompositeEditCommandImpl::deleteSelection): Changed call to currentSelection
3067         to endingSelection.
3068         (DeleteCollapsibleWhitespaceCommandImpl::DeleteCollapsibleWhitespaceCommandImpl): Ditto.
3069         (DeleteSelectionCommandImpl::DeleteSelectionCommandImpl): Changed call from startingSelection
3070         to endingSelection.
3071         (DeleteSelectionCommandImpl::joinTextNodesWithSameStyle): Changed call to currentSelection
3072         to endingSelection.
3073         (InputNewlineCommandImpl::doApply): Ditto.
3074         (InputTextCommandImpl::deleteCharacter): Ditto.
3075         (InputTextCommandImpl::prepareForTextInsertion): Ditto.
3076         (InputTextCommandImpl::execute): Ditto.
3077         (PasteHTMLCommandImpl::doApply): Ditto.
3078         (TypingCommandImpl::insertText): Remove extraneous call to reset endingSelection. This has
3079         already been done by the helpers this command uses to do its work.
3080         (TypingCommandImpl::issueCommandForDeleteKey): Changed call to currentSelection
3081         to endingSelection.
3082         (TypingCommandImpl::deleteKeyPressed): Remove extraneous call to reset endingSelection. This has
3083         already been done by the helpers this command uses to do its work.
3084         * khtml/editing/htmlediting_impl.h:
3085         (khtml::EditCommandImpl::endingSelection): Remove extraneous call to reset endingSelection. This has
3086         already been done by the helpers this command uses to do its work.
3087
3088 2004-04-07  Ken Kocienda  <kocienda@apple.com>
3089
3090         Reviewed by John
3091         
3092         Make paste work again. It has been broken for some undetermined
3093         period of time.
3094
3095         * khtml/editing/htmlediting_impl.cpp:
3096         (CompositeEditCommandImpl::insertNodeAt): Handle inserting a node when
3097         the reference node has children, or is an empty block.
3098         (CompositeEditCommandImpl::inputText): New convenience to create and
3099         apply an InputTextCommand.
3100         (InputTextCommandImpl::execute): Collapse whitespace when selection is
3101         not a range. Deleting the selection when it is a range already does that, 
3102         so no need to make special accommodation for it.
3103         (PasteHTMLCommandImpl::PasteHTMLCommandImpl): Initialize m_HTMLString using 
3104         an initialization list.
3105         (PasteHTMLCommandImpl::doApply): Collapse whitespace.... as above for 
3106         InputTextCommandImpl::execute. Don't need to qualify NodeImpl's with DOM 
3107         namespace. Clean up selection access; no need to grep around for it, the
3108         desired selection is returned by calling currentSelection(). Treat "simple
3109         text paste" like typing. Tighten up and simplify HTML fragment paste; no
3110         real change in algorithm. 
3111         (SplitTextNodeCommandImpl::SplitTextNodeCommandImpl): m_text1 member variable
3112         not initialized. This bug was introduced by a recent change by me. Fixing now.
3113         * khtml/editing/htmlediting_impl.h: Add inputText() declaration.
3114
3115 2004-04-06  Ken Kocienda  <kocienda@apple.com>
3116
3117         Reviewed by Richard
3118
3119         * khtml/khtml_part.cpp:
3120         (KHTMLPart::setSelection): Now calls setFocusNodeIfNeeded.
3121         (KHTMLPart::takeSelectionFrom): Now calls setFocusNodeIfNeeded.
3122         (KHTMLPart::clearSelection): Now calls setFocusNodeIfNeeded.
3123         (KHTMLPart::invalidateSelection): Now calls setFocusNodeIfNeeded.
3124         (KHTMLPart::setSelectionVisible): Now calls setFocusNodeIfNeeded.
3125         (KHTMLPart::setFocusNodeIfNeeded): New function focuses first element 
3126         of a selection that is contenteditable, if any of the nodes are. The "first"
3127         determination is made by doing a document-order search.
3128         * khtml/khtml_part.h:
3129         * khtml/xml/dom_nodeimpl.cpp: Remove debug spam.
3130         * kwq/WebCoreBridge.mm:
3131         (-[WebCoreBridge setSelectedDOMRange:]): Now updates document layout before
3132         setting the selection. This was needed for Blot, so that setting the 
3133         contenteditable attribute on the body is "seen" when the attempt is made
3134         to set the selection right immediately after.
3135
3136 2004-04-06  David Hyatt  <hyatt@apple.com>
3137
3138         After columns have been expanded to their preferred sizes, if space is left over in the table, then
3139         fixed columns should expand to fill space before percentage width columns do.  The old code had it
3140         backwards.
3141         
3142         Reviewed by john
3143
3144         * khtml/rendering/table_layout.cpp:
3145         (AutoTableLayout::layout):
3146
3147 2004-04-06  Ken Kocienda  <kocienda@apple.com>
3148
3149         Reviewed by Dave
3150
3151         * khtml/dom/dom_node.cpp:
3152         (Node::isContentEditable): Added. Calls through to impl function of same name.
3153         * khtml/dom/dom_node.h: Added isContentEditable declaration.
3154         * khtml/khtmlview.cpp:
3155         (KHTMLView::viewportMouseMoveEvent): Now, the cursor will change
3156         to an i-beam whenever it is over a node that is contenteditable, and nothing, 
3157         like a link, takes precedence.
3158
3159 2004-04-06  Ken Kocienda  <kocienda@apple.com>
3160
3161         Reviewed by Dave
3162
3163         * khtml/css/html4.css: Refine focus rules so that HTML and BODY
3164         elements do not draw a focus ring around themselves when focused.
3165         This prevents a silly-looking focus ring from drawing around a 
3166         document's entire contents when a body element is contenteditable.
3167
3168 2004-04-06  Ken Kocienda  <kocienda@apple.com>
3169
3170         Reviewed by Dave
3171
3172         Caret height is now the height of the tallest element on the line,
3173         mimicking NSText behavior.
3174
3175         * khtml/rendering/render_box.cpp:
3176         (RenderBox::caretPos): Use root line box topOverflow and bottomOverflow 
3177         for the calculation of caret height.
3178         * khtml/rendering/render_text.cpp:
3179         (RenderText::caretPos): Ditto.
3180
3181 2004-04-06  Ken Kocienda  <kocienda@apple.com>
3182
3183         Reviewed by me
3184
3185         Added a new suite of layout tests for editing, all added
3186         in the new layout-tests/editing subtree.
3187
3188         * layout-tests/editing/abe.jpg: Added.
3189         * layout-tests/editing/deleting/delete-block-contents-001-expected.txt: Added.
3190         * layout-tests/editing/deleting/delete-block-contents-001.html: Added.
3191         * layout-tests/editing/deleting/delete-block-contents-002-expected.txt: Added.
3192         * layout-tests/editing/deleting/delete-block-contents-002.html: Added.
3193         * layout-tests/editing/deleting/delete-block-contents-003-expected.txt: Added.
3194         * layout-tests/editing/deleting/delete-block-contents-003.html: Added.
3195         * layout-tests/editing/deleting/delete-br-001-expected.txt: Added.
3196         * layout-tests/editing/deleting/delete-br-001.html: Added.
3197         * layout-tests/editing/deleting/delete-br-002-expected.txt: Added.
3198         * layout-tests/editing/deleting/delete-br-002.html: Added.
3199         * layout-tests/editing/deleting/delete-br-003-expected.txt: Added.
3200         * layout-tests/editing/deleting/delete-br-003.html: Added.
3201         * layout-tests/editing/deleting/delete-br-004-expected.txt: Added.
3202         * layout-tests/editing/deleting/delete-br-004.html: Added.
3203         * layout-tests/editing/deleting/delete-br-005-expected.txt: Added.
3204         * layout-tests/editing/deleting/delete-br-005.html: Added.
3205         * layout-tests/editing/deleting/delete-br-006-expected.txt: Added.
3206         * layout-tests/editing/deleting/delete-br-006.html: Added.
3207         * layout-tests/editing/deleting/delete-character-001-expected.txt: Added.
3208         * layout-tests/editing/deleting/delete-character-001.html: Added.
3209         * layout-tests/editing/deleting/delete-contiguous-ws-001-expected.txt: Added.
3210         * layout-tests/editing/deleting/delete-contiguous-ws-001.html: Added.
3211         * layout-tests/editing/deleting/delete-image-001-expected.txt: Added.
3212         * layout-tests/editing/deleting/delete-image-001.html: Added.
3213         * layout-tests/editing/deleting/delete-image-002-expected.txt: Added.
3214         * layout-tests/editing/deleting/delete-image-002.html: Added.
3215         * layout-tests/editing/deleting/delete-image-003-expected.txt: Added.
3216         * layout-tests/editing/deleting/delete-image-003.html: Added.
3217         * layout-tests/editing/deleting/delete-leading-ws-001-expected.txt: Added.
3218         * layout-tests/editing/deleting/delete-leading-ws-001.html: Added.
3219         * layout-tests/editing/deleting/delete-selection-001-expected.txt: Added.
3220         * layout-tests/editing/deleting/delete-selection-001.html: Added.
3221         * layout-tests/editing/deleting/delete-trailing-ws-001-expected.txt: Added.
3222         * layout-tests/editing/deleting/delete-trailing-ws-001.html: Added.
3223         * layout-tests/editing/editing.js: Added.
3224         * layout-tests/editing/inserting/typing-001-expected.txt: Added.
3225         * layout-tests/editing/inserting/typing-001.html: Added.
3226         * layout-tests/editing/inserting/typing-002-expected.txt: Added.
3227         * layout-tests/editing/inserting/typing-002.html: Added.
3228         * layout-tests/editing/inserting/typing-around-br-001-expected.txt: Added.
3229         * layout-tests/editing/inserting/typing-around-br-001.html: Added.
3230         * layout-tests/editing/inserting/typing-around-image-001-expected.txt: Added.
3231         * layout-tests/editing/inserting/typing-around-image-001.html: Added.
3232         * layout-tests/editing/selection/extend-by-character-001-expected.txt: Added.
3233         * layout-tests/editing/selection/extend-by-character-001.html: Added.
3234         * layout-tests/editing/selection/extend-by-character-002-expected.txt: Added.
3235         * layout-tests/editing/selection/extend-by-character-002.html: Added.
3236         * layout-tests/editing/selection/extend-by-character-003-expected.txt: Added.
3237         * layout-tests/editing/selection/extend-by-character-003.html: Added.
3238         * layout-tests/editing/selection/extend-by-character-004-expected.txt: Added.
3239         * layout-tests/editing/selection/extend-by-character-004.html: Added.
3240         * layout-tests/editing/selection/extend-by-character-005-expected.txt: Added.
3241         * layout-tests/editing/selection/extend-by-character-005.html: Added.
3242         * layout-tests/editing/selection/move-by-character-001-expected.txt: Added.
3243         * layout-tests/editing/selection/move-by-character-001.html: Added.
3244         * layout-tests/editing/selection/move-by-character-002-expected.txt: Added.
3245         * layout-tests/editing/selection/move-by-character-002.html: Added.
3246         * layout-tests/editing/selection/move-by-character-003-expected.txt: Added.
3247         * layout-tests/editing/selection/move-by-character-003.html: Added.
3248         * layout-tests/editing/selection/move-by-character-004-expected.txt: Added.
3249         * layout-tests/editing/selection/move-by-character-004.html: Added.
3250         * layout-tests/editing/selection/move-by-character-005-expected.txt: Added.
3251         * layout-tests/editing/selection/move-by-character-005.html: Added.
3252         * layout-tests/editing/undo/redo-typing-001-expected.txt: Added.
3253         * layout-tests/editing/undo/redo-typing-001.html: Added.
3254         * layout-tests/editing/undo/undo-typing-001-expected.txt: Added.
3255         * layout-tests/editing/undo/undo-typing-001.html: Added.
3256
3257 2004-04-06  Ken Kocienda  <kocienda@apple.com>
3258
3259         Reviewed by Dave
3260
3261         Added execCommand feature. 
3262         Added Javascript selection object.
3263         This lays the groundwork for layout tests for editing.
3264
3265         * khtml/dom/dom_doc.cpp:
3266         (DOM::Document::execCommand): Added. Calls through to impl's execCommand.
3267         * khtml/dom/dom_doc.h: Added execCommand declaration.
3268         * khtml/ecma/kjs_dom.cpp:
3269         (DOMDocumentProtoFunc::tryCall): Switch on new ExecCommand constant and call through to the document.
3270         * khtml/ecma/kjs_dom.h: Added ExecCommand constant.
3271         (KJS::DOMDocument::):
3272         * khtml/ecma/kjs_dom.lut.h: Generated file.
3273         * khtml/ecma/kjs_window.cpp:
3274         (Window::Window): Initialize selection object.
3275         (Window::selection): Return window's selection object.
3276         (Window::mark): Mark selection object.
3277         (WindowFunc::tryCall): Return selection object on GetSelection.
3278         (LocationFunc::tryCall): Added.
3279         (Selection::Selection): Added.
3280         (Selection::~Selection): Added.
3281         (Selection::get): Added.
3282         (Selection::put): Added.
3283         (Selection::toPrimitive): Added.
3284         (Selection::toString): Added.
3285         (SelectionFunc::tryCall): Added.
3286         * khtml/ecma/kjs_window.h:
3287         (KJS::Selection::): Added.
3288         (KJS::Selection::part): Added.
3289         (KJS::Selection::classInfo): Added.
3290         * khtml/ecma/kjs_window.lut.h: Generated file.
3291         * khtml/editing/htmlediting_impl.cpp:
3292         (debugPosition): Debugging aid.
3293         (DeleteCollapsibleWhitespaceCommandImpl::deleteWhitespace): Move the ending position
3294         if you are about to delete it. Fixes a crasher I discovered while writing tests.
3295         (DeleteSelectionCommandImpl::doApply): Move to containing editable block position 0
3296         instead of 1 in a block in delete case 1.
3297         (InputTextCommandImpl::prepareForTextInsertion):
3298         (TypingCommandImpl::issueCommandForDeleteKey):
3299         * khtml/khtml_part.h:
3300         * khtml/khtml_selection.cpp:
3301         (KHTMLSelection::validate): Now adjusts the selection down to leaf nodes if needed.
3302         (KHTMLSelection::debugPosition): Debugging aid.
3303         * khtml/xml/dom_docimpl.cpp:
3304         (DocumentImpl::execCommand): Added. Supports five different commands.
3305         * khtml/xml/dom_docimpl.h:
3306         * khtml/xml/dom_nodeimpl.cpp:
3307         (NodeImpl::previousEditable): Use false instead of 0 for equality check.
3308         (NodeImpl::nextEditable): Ditto.
3309         * khtml/xml/dom_position.cpp:
3310         (DOMPosition::equivalentLeafPosition): New function
3311         (DOMPosition::previousRenderedEditablePosition): New function
3312         (DOMPosition::nextRenderedEditablePosition): New function
3313         (DOMPosition::equivalentUpstreamPosition): Refined behavior to handle more cases correctly.
3314         (DOMPosition::equivalentDownstreamPosition): Ditto.
3315         (DOMPosition::atStartOfContainingEditableBlock):New function
3316         (DOMPosition::atStartOfRootEditableBlock):New function
3317         * khtml/xml/dom_position.h:
3318         * kwq/KWQKHTMLPart.h:
3319         * kwq/KWQKHTMLPart.mm:
3320         (KWQKHTMLPart::issueUndoCommand): New function for calling undo programatically.
3321         (KWQKHTMLPart::issueRedoCommand): Ditto, but for redo.
3322         * kwq/KWQRenderTreeDebug.cpp:
3323         (nodePositionRelativeToRoot): New function to generate log information for the selection.
3324         (writeSelection): Writes the selection if there is one.
3325         (externalRepresentation): Calls writeSelection
3326         * kwq/WebCoreBridge.h: New declarations for issueUndoCommand and issueRedoCommand.
3327
3328 2004-04-05  Darin Adler  <darin@apple.com>
3329
3330         * khtml/html/kentities.gperf: Added &COPY; and &REG;, both supported by Gecko
3331         (and presumably by WinIE). Also re-sorted the list.
3332         * khtml/html/kentities.c: Regenerated.
3333
3334 2004-04-05  Darin Adler  <darin@apple.com>
3335
3336         Reviewed by Dave.
3337
3338         - rolled over fix from KHTML tree; anchor inside another anchor
3339
3340         * khtml/rendering/render_layer.cpp: (RenderLayer::nodeAtPoint):
3341         Make sure the URL element is the innermost one, by not setting it once
3342         it's already set.
3343
3344 2004-04-05  David Hyatt  <hyatt@apple.com>
3345
3346         Implement overflow: overlay so that a scrollbar can show/hide without causing a layout.
3347         
3348         Reviewed by darin
3349
3350         * ChangeLog:
3351         * khtml/css/css_computedstyle.cpp:
3352         (DOM::CSSComputedStyleDeclarationImpl::getPropertyCSSValue):
3353         * khtml/css/cssparser.cpp:
3354         (CSSParser::parseValue):
3355         * khtml/css/cssstyleselector.cpp:
3356         (khtml::CSSStyleSelector::applyProperty):
3357         * khtml/css/cssvalues.c:
3358         (hash_val):
3359         (findValue):
3360         * khtml/css/cssvalues.h:
3361         * khtml/css/cssvalues.in:
3362         * khtml/rendering/render_block.cpp:
3363         (khtml::RenderBlock::layoutBlock):
3364         (khtml::RenderBlock::layoutBlockChildren):
3365         (khtml::RenderBlock::rightOffset):
3366         * khtml/rendering/render_box.cpp:
3367         (RenderBox::contentWidth):
3368         (RenderBox::contentHeight):
3369         * khtml/rendering/render_layer.cpp:
3370         (RenderLayer::updateScrollInfoAfterLayout):
3371         * khtml/rendering/render_object.cpp:
3372         (RenderObject::clientWidth):
3373         (RenderObject::clientHeight):
3374         * khtml/rendering/render_style.h:
3375         (khtml::):
3376         (khtml::RenderStyle::hasAutoScrollbars):
3377         (khtml::RenderStyle::scrollsOverflow):
3378         (khtml::RenderStyle::includeScrollbarSize):
3379
3380 2004-04-03  David Hyatt  <hyatt@apple.com>
3381
3382         Implementation of <input type=range>, which makes sliders available in Web pages.
3383         
3384         Reviewed by john
3385
3386         * WebCore.pbproj/project.pbxproj:
3387         * khtml/ecma/kjs_dom.cpp:
3388         (DOMNode::getValueProperty):
3389         (DOMNode::putValue):
3390         * khtml/ecma/kjs_dom.h:
3391         (KJS::DOMNode::):
3392         * khtml/ecma/kjs_dom.lut.h:
3393         (KJS::):
3394         * khtml/html/html_formimpl.cpp:
3395         (HTMLInputElementImpl::setType):
3396         (HTMLInputElementImpl::type):
3397         (HTMLInputElementImpl::click):
3398         (HTMLInputElementImpl::accessKeyAction):
3399         (HTMLInputElementImpl::parseHTMLAttribute):
3400         (HTMLInputElementImpl::rendererIsNeeded):
3401         (HTMLInputElementImpl::createRenderer):
3402         (HTMLInputElementImpl::encoding):
3403         * khtml/html/html_formimpl.h:
3404         (DOM::HTMLInputElementImpl::):
3405         * khtml/misc/htmlattrs.c:
3406         (hash_attr):
3407         (findAttr):
3408         * khtml/misc/htmlattrs.h:
3409         * khtml/misc/htmlattrs.in:
3410         * khtml/rendering/render_form.cpp:
3411         (RenderLineEdit::slotTextChanged):
3412         (:RenderFormElement):
3413         (RenderSlider::calcMinMaxWidth):
3414         (RenderSlider::updateFromElement):
3415         (RenderSlider::slotSliderValueChanged):
3416         * khtml/rendering/render_form.h:
3417         (khtml::RenderSlider::element):
3418         (khtml::RenderSlider::renderName):
3419         (khtml::RenderSlider::canHaveIntrinsicMargins):
3420         * khtml/xml/dom2_eventsimpl.cpp:
3421         (EventImpl::typeToId):
3422         (EventImpl::idToType):
3423         * khtml/xml/dom2_eventsimpl.h:
3424         (DOM::EventImpl::):
3425         * kwq/KWQSlider.h: Added.
3426         * kwq/KWQSlider.mm: Added.
3427         (-[KWQSlider initWithQSlider:]):
3428         (-[KWQSlider slide:]):
3429         (m_val):
3430         (QSlider::setFont):
3431         (QSlider::sizeHint):
3432         (QSlider::setValue):
3433         (QSlider::setMinValue):
3434         (QSlider::setMaxValue):
3435         (QSlider::value):
3436         (QSlider::minValue):
3437         (QSlider::maxValue):
3438         (QSlider::sliderValueChanged):
3439         (QSlider::dimensions):
3440         * kwq/KWQSlot.mm:
3441         (KWQSlot::KWQSlot):
3442         (KWQSlot::call):
3443
3444 2004-04-05  Chris Blumenberg  <cblu@apple.com>
3445
3446         Fixed: <rdar://problem/3612580>: SPI: WebPlugin selection
3447
3448         Reviewed by kocienda.
3449
3450         * WebCore.pbproj/project.pbxproj:
3451         * khtml/rendering/render_replaced.cpp:
3452         (RenderWidget::setSelectionState): new override, calls QWidget::setIsSelected
3453         * khtml/rendering/render_replaced.h:
3454         (khtml::RenderWidget::selectionState): new override
3455         * kwq/KWQWidget.h:
3456         * kwq/KWQWidget.mm:
3457         (QWidget::setIsSelected): new, calls [WebCoreBridge setIsSelected:forView:]
3458         (QWidget::isSelected): new, calls [WebCoreBridge isViewSelected:]
3459         * kwq/WebCoreBridge.h:
3460         * kwq/WebCoreBridge.mm:
3461         (-[WebCoreBridge selectionColor]): new
3462
3463 2004-04-03  David Hyatt  <hyatt@apple.com>
3464
3465         Fix for 3601728, text overlaps borders at ejai.org.  Remove all the code in addForbidden for
3466         dir, menu, nobr, and pre that made them too restrictive regarding what child tags they could
3467         contain.
3468         
3469         Reviewed by kocienda
3470
3471         * khtml/html/dtd.cpp:
3472         (DOM::addForbidden):
3473         (DOM::removeForbidden):
3474
3475 2004-04-02  Chris Blumenberg  <cblu@apple.com>
3476
3477         Moved the DOM extensions to their own headers
3478
3479         Reviewed by kocienda.
3480
3481         * WebCore.pbproj/project.pbxproj:
3482         * kwq/DOM.h: include DOMExtensions.h
3483         * kwq/DOMExtensions.h: Added.
3484         * kwq/DOMHTML.h: moved extensions to DOMExtensions.h
3485         * kwq/DOMHTML.mm: Renamed to match header
3486
3487 2004-04-02  David Hyatt  <hyatt@apple.com>
3488
3489         Fix for 3610662, rendering sometimes doesn't update in response to mouse events that change style.
3490         The document changed list was getting messed up.
3491         
3492         Reviewed by darin
3493
3494         * khtml/xml/dom_docimpl.cpp:
3495         (DocumentImpl::updateDocumentsRendering):
3496         * khtml/xml/dom_docimpl.h:
3497
3498 === Safari-135 ===
3499
3500 2004-04-01  Darin Adler  <darin@apple.com>
3501
3502         Based on a fix by Eric Albert.
3503
3504         - fixed <rdar://problem/3594247>: Safari crashes when a background image has a height or width of 0
3505
3506         * khtml/rendering/render_box.cpp: (RenderBox::paintBackgroundExtended):
3507         Change code path so we don't mod with 0.
3508
3509 2004-04-01  Darin Adler  <darin@apple.com>
3510
3511         Reviewed by Dave.
3512
3513         - fixed <rdar://problem/3608305>: DEMO: menu in search field has one disabled item: localized string not found
3514
3515         * khtml/html/html_formimpl.cpp: (HTMLInputElementImpl::HTMLInputElementImpl):
3516         Initialize m_maxResults to 0.
3517
3518 2004-04-01  Darin Adler  <darin@apple.com>
3519
3520         Reviewed by John.
3521
3522         - cleaned up image map code and made it work with XML documents
3523
3524         * khtml/html/html_documentimpl.h: Removed getMap and mapMap.
3525         * khtml/html/html_documentimpl.cpp: Removed getMap; moved to base class.
3526
3527         * khtml/html/html_imageimpl.cpp:
3528         (HTMLMapElementImpl::~HTMLMapElementImpl): Call new removeImageMap function instead
3529         of manipulating the mapMap field directly.
3530         (HTMLMapElementImpl::parseHTMLAttribute): Rewrite name changing code for simplicity
3531         and to avoid running off the end of the bufffer.
3532         Also remove image map before changing name so it doesn't end up in the map twice
3533         under both the old and new names.
3534         * khtml/html/html_imageimpl.h: Use a DOMString instead of QString for the name, since
3535         the public API already uses a DOMString.
3536
3537         * khtml/rendering/render_image.cpp: (RenderImage::nodeAtPoint): Call the new
3538         getImageMap instead of the old getMap.
3539
3540         * khtml/xml/dom_docimpl.h: Added addImageMap, removeImageMap, getImageMap, and m_imageMapsByName.
3541         * khtml/xml/dom_docimpl.cpp:
3542         (DocumentImpl::addImageMap): Added. Stores the image map under its name, unless there's
3543         already another map of the same.
3544         (DocumentImpl::removeImageMap): Added. Removes the image map if it's already filed by
3545         name. Avoid pitfall of removing another image map that has the same name.
3546         (DocumentImpl::getImageMap): Added. Simplified version of logic from getMap in HTMLDocumentImpl.
3547
3548 2004-04-01  Darin Adler  <darin@apple.com>
3549
3550         Reviewed by Ken.
3551
3552         - 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)
3553
3554         * khtml/html/html_imageimpl.cpp: (HTMLMapElementImpl::parseHTMLAttribute):
3555         Make the first <map> seen win, as in other browsers. The old code made the last <map> seen win.
3556
3557 2004-04-01  Ken Kocienda  <kocienda@apple.com>
3558
3559         Reviewed by me
3560         
3561         Missing file broke build after my last checkin
3562
3563         * ForwardingHeaders/rendering/render_line.h: Added.
3564
3565 2004-03-31  Ken Kocienda  <kocienda@apple.com>
3566
3567         Reviewed by Dave.
3568         
3569         Many, many editing improvements, with a concentration on getting
3570         caret navigation and deleting selections working correctly.
3571
3572         * WebCore.pbproj/project.pbxproj:
3573         * khtml/dom/dom_position.cpp: Removed.
3574         * khtml/dom/dom_position.h: Removed.
3575         * khtml/editing/htmlediting.cpp:
3576         (EditCommand::isNull): Inlined.
3577         (EditCommand::notNull): New function.
3578         (EditCommand::parent): Commands now have parents. Allows for walking the tree of composite commands.
3579         (EditCommand::setParent): Ditto.
3580         (EditCommand::emptyCommand): Returns a static empty command.
3581         (AppendNodeCommand::AppendNodeCommand): 
3582         (AppendNodeCommand::parentNode): Member variable name change only. parent -> parentNode.
3583         (DeleteCollapsibleWhitespaceCommand::DeleteCollapsibleWhitespaceCommand): New command.
3584         (InputTextCommand::InputTextCommand):
3585         (InputTextCommand::input):
3586         (InputTextCommand::charactersAdded):
3587         (JoinTextNodesCommand::JoinTextNodesCommand): Now derives directly from EditCommand.
3588         (RemoveNodeAndPruneCommand::RemoveNodeAndPruneCommand): New command.
3589         (SplitTextNodeCommand::SplitTextNodeCommand): Now derives directly from EditCommand.
3590         * khtml/editing/htmlediting.h:
3591         * khtml/editing/htmlediting_impl.cpp:
3592         (isNBSP): New helper.
3593         (isWS): New helper.
3594         (shouldPruneNode): New helper.
3595         (leadingWhitespacePosition): New helper.
3596         (trailingWhitespacePosition): New helper.
3597         (textNodesAreJoinable): New helper.
3598         (nonBreakingSpaceString): Returns a static DOMString containing a non-breaking space.
3599         (EditCommandImpl::EditCommandImpl):
3600         (EditCommandImpl::setStartingSelection): Now recursively sets starting selection on parents.
3601         (EditCommandImpl::setEndingSelection): As above, for ending selection.
3602         (EditCommandImpl::parent): New accessor.
3603         (EditCommandImpl::setParent): New accessor.
3604         (CompositeEditCommandImpl::doUnapply): Removed some logging.
3605         (CompositeEditCommandImpl::doReapply): Removed some logging.
3606         (CompositeEditCommandImpl::applyCommandToComposite): Sets parent.
3607         (CompositeEditCommandImpl::removeNodeAndPrune): New comvenience.
3608         (CompositeEditCommandImpl::replaceText): New comvenience.
3609         (CompositeEditCommandImpl::deleteSelection): New comvenience.
3610         (CompositeEditCommandImpl::deleteCollapsibleWhitespace): New comvenience.
3611         (AppendNodeCommandImpl::AppendNodeCommandImpl): Member variable name change only. parent -> parentNode.
3612         (AppendNodeCommandImpl::~AppendNodeCommandImpl): Ditto.
3613         (AppendNodeCommandImpl::doApply): Ditto.
3614         (AppendNodeCommandImpl::doUnapply): Ditto.
3615         (DeleteCollapsibleWhitespaceCommandImpl::DeleteCollapsibleWhitespaceCommandImpl): New command
3616         (debugPosition): New debugging aid.
3617         (DeleteSelectionCommandImpl::doApply): Major reworking to handle more cases correctly.
3618         (InputNewlineCommandImpl::doApply): Position and selection tweaks.
3619         (InputTextCommandImpl::InputTextCommandImpl): Handles more cases now, like typing after an image.
3620         (JoinTextNodesCommandImpl::JoinTextNodesCommandImpl): Now derives directly from EditCommand.
3621         Implements the guts of the command itself now, rather than replying on its former base class.
3622         (RemoveNodeAndPruneCommandImpl::RemoveNodeAndPruneCommandImpl): New command.
3623         (SplitTextNodeCommandImpl::SplitTextNodeCommandImpl): Now derives directly from EditCommand.
3624         Implements the guts of the command itself now, rather than replying on its former base class.
3625         (TypingCommandImpl::TypingCommandImpl): Major rework to handle more cases correctly.
3626         * khtml/editing/htmlediting_impl.h:
3627         * khtml/html/html_elementimpl.cpp:
3628         (HTMLElementImpl::isContentEditable): More efficient use of the style system to answer the question.
3629         * khtml/khtml_part.cpp:
3630         (KHTMLPart::setSelection): Fixes an issue where the caret would not repaint after being moved when undoing.
3631         (KHTMLPart::takeSelectionFrom): Ditto.
3632         (KHTMLPart::clearSelection): Ditto.
3633         (KHTMLPart::invalidateSelection): Ditto.
3634         (KHTMLPart::setSelectionVisible): Ditto.
3635         (KHTMLPart::slotClearSelection): Ditto.
3636         (KHTMLPart::clearCaretRectIfNeeded):  Ditto.
3637         (KHTMLPart::notifySelectionChanged): Ditto.
3638         (KHTMLPart::unappliedEditing): Now uses EditCommand::emptyCommand().
3639         (KHTMLPart::reappliedEditing): Ditto.
3640         * khtml/khtml_part.h:
3641         * khtml/khtml_selection.cpp:
3642         (KHTMLSelection::KHTMLSelection):
3643         (KHTMLSelection::modify): Updated to work with new DOMPosition API.
3644         (KHTMLSelection::paintCaret): Ditto.
3645         (KHTMLSelection::moveToRenderedContent): Ditto.
3646         (KHTMLSelection::basePosition): New convenience.
3647         (KHTMLSelection::extentPosition): New convenience.
3648         (KHTMLSelection::startPosition): New convenience.
3649         (KHTMLSelection::endPosition): New convenience.
3650         (KHTMLSelection::debugPosition): Modified debug output.
3651         * khtml/khtml_selection.h:
3652         (KHTMLSelection::isEmpty):
3653         (KHTMLSelection::notEmpty):
3654         * khtml/rendering/bidi.cpp:
3655         (khtml::RenderBlock::layoutInlineChildren): Fixed a crasher that happened when deleting content at the start of a line.
3656         * khtml/rendering/render_br.cpp:
3657         (RenderBR::caretMaxRenderedOffset): New function.
3658         (RenderBR::caretPos): Now draws the caret in the right place when a block is empty.
3659         * khtml/rendering/render_br.h:
3660         * khtml/rendering/render_flow.cpp:
3661         (RenderFlow::caretPos): Now draws the caret in the right place when a flow is empty.
3662         * khtml/rendering/render_line.cpp:
3663         (InlineBox::caretMaxRenderedOffset): New function.
3664         * khtml/rendering/render_line.h:
3665         * khtml/rendering/render_object.cpp:
3666         (RenderObject::isEditable):
3667         (RenderObject::caretMaxRenderedOffset): New function.
3668         * khtml/rendering/render_object.h:
3669         * khtml/rendering/render_replaced.cpp:
3670         (RenderReplaced::caretMaxRenderedOffset): New function.
3671         * khtml/rendering/render_replaced.h:
3672         * khtml/rendering/render_text.cpp:
3673         (InlineTextBox::caretMaxRenderedOffset): New function.
3674         (RenderText::detach):
3675         (RenderText::caretMaxOffset):
3676         (RenderText::caretMaxRenderedOffset): New function.
3677         * khtml/rendering/render_text.h:
3678         (khtml::InlineTextBox::len):
3679         * khtml/xml/dom_edititerator.cpp: Added.
3680         * khtml/xml/dom_edititerator.h: Added.
3681         * khtml/xml/dom_nodeimpl.cpp:
3682         (NodeImpl::previousEditable): Improved the correctness of this function.
3683         (NodeImpl::nextEditable): Ditto.
3684         * khtml/xml/dom_nodeimpl.h:
3685         * khtml/xml/dom_position.cpp: Added.
3686         (DOMPosition::renderedOffset): New function.
3687         (DOMPosition::previousCharacterPosition): New function.
3688         (DOMPosition::nextCharacterPosition): New function.
3689         (DOMPosition::equivalentUpstreamPosition): New function.
3690         (DOMPosition::equivalentDownstreamPosition): New function.
3691         (DOMPosition::validUpstreamDownstreamPosition): New function.
3692         (DOMPosition::inRenderedContent): New function.
3693         (inlineBoxForRenderer): New function.
3694         (renderersOnDifferentLine): New function.
3695         (nextRenderedEditable): New function.
3696         (previousRenderedEditable): New function.
3697         (DOMPosition::inRenderedText): New function.
3698         (DOMPosition::rendersOnSameLine): New function.
3699         (DOMPosition::rendersInDifferentPosition): New function.
3700         (DOMPosition::isFirstRenderedPositionOnLine): New function.
3701         (DOMPosition::isLastRenderedPositionOnLine): New function.
3702         (DOMPosition::isLastRenderedPositionInEditableBlock): New function.
3703         (DOMPosition::inFirstEditableInRootEditableBlock): New function.
3704         (DOMPosition::inLastEditableInRootEditableBlock): New function.
3705         (DOMPosition::inFirstEditableInContainingEditableBlock): New function.
3706         (DOMPosition::inLastEditableInContainingEditableBlock): New function.
3707         * khtml/xml/dom_position.h: Added.
3708         (DOM::DOMPosition::notEmpty): New function.
3709         * khtml/xml/dom_stringimpl.cpp:
3710         (DOM::DOMStringImpl::containsOnlyWhitespace): Added a version which takes an offset and length.
3711         * khtml/xml/dom_stringimpl.h:
3712         * khtml/xml/dom_textimpl.cpp:
3713         (CharacterDataImpl::containsOnlyWhitespace): As above
3714         (CharacterDataImpl::maxOffset): New function.
3715         (CharacterDataImpl::caretMaxRenderedOffset): New function.
3716         (TextImpl::TextImpl):
3717         (TextImpl::rendererIsNeeded): A new bit. When set, makes a text renderer unconditionally.
3718         * khtml/xml/dom_textimpl.h:
3719         (DOM::TextImpl::setRendererIsNeeded): Sets the bit.
3720         * kwq/KWQAssertions.m:
3721         (KWQLog): Change to decrease the amount of output for the Editing log level. (my preference)
3722
3723 2004-03-31  David Hyatt  <hyatt@apple.com>
3724
3725         Fix for 3601834, make sure that textareas do a layout when their rows/cols/wrap attributes are dynamically
3726         changed.
3727         
3728         Reviewed by darin.
3729
3730         * khtml/html/html_formimpl.cpp:
3731         (HTMLTextAreaElementImpl::parseHTMLAttribute):
3732
3733 2004-03-30  David Hyatt  <hyatt@apple.com>
3734
3735         Fix for 3604241, simple space collapsing results in a doubled character.  Simplify the ignoring of
3736         whitespace and make sure it works across absolutely positioned spans.
3737         
3738         Reviewed by darin
3739
3740         * khtml/rendering/bidi.cpp:
3741         (khtml::RenderBlock::findNextLineBreak):
3742
3743 2004-03-30  Darin Adler  <darin@apple.com>
3744
3745         Reviewed by Dave.
3746
3747         - fixed <rdar://problem/3570877>: REGRESSION: onfocus handler not working at weather.com
3748
3749         * khtml/ecma/kjs_binding.cpp:
3750         (UString::string): Turn a null UString into a null DOMString, but a non-null empty UString into a
3751         non-null empty DOMString.
3752         (UString::qstring): Ditto, for QString.
3753         (Identifier::string): Ditto, for Identifier.
3754         (Identifier::qstring): Ditto.
3755
3756         * kwq/KWQLineEdit.h: Override focusPolicy.
3757         * kwq/KWQLineEdit.mm: (QLineEdit::focusPolicy): Return StrongFocus instead of TabFocus, since
3758         we allow clicking to focus on these widgets.
3759         * kwq/KWQTextEdit.h: More of the same.
3760         * kwq/KWQTextEdit.mm: (QTextEdit::focusPolicy): And still more.
3761
3762         - fixed <rdar://problem/3605919>: text fields in web pages are too tall
3763
3764         * kwq/KWQTextField.mm:
3765         (-[KWQTextFieldCell _typesetterBehavior]): Ignore the per-application typesetter setting and
3766         instead always use the latest behavior for text fields in web pages.
3767         (-[KWQSecureTextFieldCell _typesetterBehavior]): Ditto.
3768         (-[KWQSearchFieldCell _typesetterBehavior]): Ditto.
3769
3770         - additional cleanup
3771
3772         * khtml/html/html_formimpl.cpp:
3773         (HTMLGenericFormElementImpl::isKeyboardFocusable): Check tab focus bit instead of different modes.
3774         (HTMLGenericFormElementImpl::isMouseFocusable): Check click focus bit instead of different modes.
3775
3776 2004-03-30  David Hyatt  <hyatt@apple.com>
3777
3778         Fix for 3603326, spurious line breaks in encyclopedia articles.  Make sure makeChildrenNonInline knows to
3779         skip over floating/positioned elements so that they remain part of contiguous inline runs for static positioning
3780         purposes.
3781         
3782         Reviewed by darin
3783
3784         * khtml/rendering/render_block.cpp:
3785         (khtml::getInlineRun):
3786
3787 2004-03-30  Darin Adler  <darin@apple.com>
3788
3789         Reviewed by Ken.
3790
3791         - fixed garbage characters seen while I was rigging up the Mozilla JavaScript tests
3792
3793         * kwq/KWQString.h: Add a "move constructor" for KWQStringData that extracts the data
3794         from an existing KWQStringData.
3795         * kwq/KWQString.mm:
3796         (KWQStringData::KWQStringData): Implement the move constructor.
3797         (QString::detachInternal): Use the move constructor rather than making a copy of the
3798         data. Should be both more efficient and preserves both the Unicode and the ASCII. The
3799         bug here is that TokenizerSubstring relies on the Unicode staying around. We still
3800         have a problem in the case where the Unicode is inside the KWQStringData. To deal with
3801         that we'll have to add a new QString call that TokenizerSubstring can use. The new call
3802         will force QString to keep the Unicode outside the internal KWQStringData.
3803
3804 2004-03-30  Darin Adler  <darin@apple.com>
3805
3806         Reviewed by Ken.
3807
3808         - fixed <rdar://problem/3606146>: repro nil-deref in QWidget::move (www.stoltoffshore.com)
3809
3810         * khtml/khtml_part.cpp:
3811         (KHTMLPart::requestObject): Add check for NULL widget.
3812         (KHTMLPart::processObjectRequest): Add check for NULL widget.
3813
3814 2004-03-29  David Hyatt  <hyatt@apple.com>
3815
3816         Make sure "auto" is allowed as a valid value when parsing rect shapes (e.g., for the clip property).
3817         
3818         Reviewed by rjw
3819
3820         * khtml/css/cssparser.cpp:
3821         (CSSParser::parseShape):
3822
3823 2004-03-29  David Hyatt  <hyatt@apple.com>
3824
3825         Followup fix.  Handle the case where a hard line break occurs right after a soft hyphen.  In this
3826         case we were losing a letter of the word in addition to not rendering the soft hyphen.
3827         
3828         Reviewed by kocienda
3829
3830         * khtml/rendering/bidi.cpp:
3831         (khtml::checkMidpoints):
3832
3833 2004-03-29  David Hyatt  <hyatt@apple.com>
3834
3835         Fix for 3604154, support soft hyphens when rendering.  This patch implements soft hyphen support that
3836         matches IE6 on Windows and Opera 7.  Soft hyphens that don't break lines end up getting collapsed away.
3837         Only if the hyphen breaks a line does it render.
3838         
3839         Reviewed by kocienda
3840
3841         * khtml/rendering/bidi.cpp:
3842         (khtml::chopMidpointsAt):
3843         (khtml::appendRunsForObject):
3844         (khtml::RenderBlock::findNextLineBreak):
3845         * khtml/rendering/render_text.cpp:
3846         (RenderText::calcMinMaxWidth):
3847
3848 2004-03-29  John Sullivan  <sullivan@apple.com>
3849
3850         Made menu shortcuts work again when editing HTML
3851
3852         Reviewed by Darin.
3853
3854         * khtml/xml/dom_elementimpl.cpp:
3855         (ElementImpl::defaultEventHandler):
3856         Don't treat key events with command key down as
3857         editing events.
3858
3859 2004-03-28  Darin Adler  <darin@apple.com>
3860
3861         Reviewed by John.
3862
3863         - fixed <rdar://problem/3602202>: "feed:uuid:...." links in Emerson content are being changed into "feed:uuuid:...."
3864
3865         * kwq/KWQKURL.mm: (copyPathRemovingDots): Add special case for empty path. The old code had an
3866         assertion that explicitly allowed this case, but it copied a character from the src buffer,
3867         which was incorrect.
3868
3869 2004-03-26  David Hyatt  <hyatt@apple.com>
3870
3871         Fix for 3600642, letter magnet demo doesn't update until mouse move.  This patch also fixes problems
3872         with the animated text Gecko DOM demos on developer.netscape.com.  Make sure that timer callbacks via
3873         setTimeout always updateRendering after executing the JS code.
3874         
3875         Reviewed by darin
3876
3877         * khtml/ecma/kjs_window.cpp:
3878         (ScheduledAction::execute):
3879
3880 === Safari-134 ===
3881
3882 2004-03-25  David Hyatt  <hyatt@apple.com>
3883
3884         Implement the rest of the search field.  Make it work with form submission.  Implement onscroll at
3885         the document level.
3886         
3887         Reviewed by darin
3888
3889         * khtml/html/html_formimpl.cpp:
3890         (HTMLFormElementImpl::submit):
3891         * khtml/rendering/render_form.cpp:
3892         (RenderLineEdit::addSearchResult):
3893         * khtml/rendering/render_form.h:
3894         * kwq/KWQKHTMLPart.h:
3895         * kwq/KWQKHTMLPart.mm:
3896         (KWQKHTMLPart::sendScrollEvent):
3897         * kwq/KWQLineEdit.h:
3898         * kwq/KWQLineEdit.mm:
3899         (QLineEdit::setMaxResults):
3900         (QLineEdit::setPlaceholderString):
3901         (QLineEdit::addSearchResult):
3902         * kwq/WebCoreBridge.h:
3903         * kwq/WebCoreBridge.mm:
3904         (-[WebCoreBridge sendScrollEvent]):
3905         * kwq/WebCoreViewFactory.h:
3906
3907 2004-03-25  David Hyatt  <hyatt@apple.com>
3908
3909         Fix for 3570700, crash in inlineBox::isDirty.  Make sure line boxes null out parent pointers when those
3910         parents get deleted.  r=john
3911
3912         Fix for .value not being settable on selects.  r=darin
3913         
3914         * khtml/html/html_formimpl.cpp:
3915         (HTMLSelectElementImpl::setValue):
3916         * khtml/rendering/render_block.cpp:
3917         (khtml::RenderBlock::removeChildrenFromLineBoxes):
3918         (khtml::RenderBlock::removeChild):
3919         * khtml/rendering/render_block.h:
3920         * khtml/rendering/render_line.cpp:
3921         (InlineFlowBox::removeChild):
3922         
3923 2004-03-25  Darin Adler  <darin@apple.com>
3924
3925         Fix by Kristin Webster, reviewed by me.
3926
3927         - fixed <rdar://problem/3582431>: HiDPI - Form elements not working when scaling factor != 1.0
3928
3929         * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::passWidgetMouseDownEventToWidget): Pass nil for fromView
3930         rather than passing the top level view.
3931
3932 2004-03-24  Darin Adler  <darin@apple.com>
3933
3934         Reviewed by John.
3935
3936