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