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