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