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