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