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