Reviewed by John.
[WebKit-https.git] / WebCore / ChangeLog-2005-08-23
1 2005-05-24  Maciej Stachowiak  <mjs@apple.com>
2
3         Reviewed by John.
4
5         - fixed <rdar://problem/3598589> onunload handler doesn't fire when a window is closed
6
7         Test cases added: 
8         * layout-tests/fast/events/onunload-expected.txt: Added.
9         * layout-tests/fast/events/onunload.html: Added.
10
11         * khtml/xml/dom_docimpl.cpp:
12         (DocumentImpl::detach): Don't remove all event handlers from the document here...
13         * khtml/khtml_part.cpp:
14         (KHTMLPart::closeURL): ...instead do it here, after firing the unload event, but only
15         if the document is not in the back/forward cache...
16         * kwq/KWQPageState.mm:
17         (-[KWQPageState finalize]): ...and take care of the back/forward cache case here.
18
19 2005-05-24  John Sullivan  <sullivan@apple.com>
20
21         Reviewed by Kevin.
22         
23         - WebCore part of <rdar://problem/4125783> WebKit needs a way to control whether textareas are resizable
24
25         * kwq/KWQKHTMLSettings.h:
26         (KHTMLSettings::textAreasAreResizable):
27         new getter
28         (KHTMLSettings::setTextAreasAreResizable):
29         new setter
30         
31         * kwq/KWQTextArea.h:
32         * kwq/KWQTextArea.mm:
33         eliminated ALLOW_RESIZING_TEXT_AREAS #define in favor of using runtime setting
34         (-[KWQTextArea isResizableByUser]):
35         get value from settings, and cache it in KWQTextArea instance
36         (-[KWQTextAreaTextView _enclosingTextArea]):
37         new convenience method, extracted from _trackResizeFromMouseDown:
38         (-[KWQTextAreaTextView _trackResizeFromMouseDown:]):
39         now uses extracted method
40         
41         (-[KWQTextAreaTextView drawRect:]):
42         now checks isResizableByUser
43         (-[KWQTextAreaTextView mouseDown:]):
44         ditto
45         
46         * kwq/WebCoreSettings.h:
47         * kwq/WebCoreSettings.mm:
48         (-[WebCoreSettings setTextAreasAreResizable:]):
49         new setter
50         (-[WebCoreSettings textAreasAreResizable]):
51         new getter
52
53 2005-05-23  Maciej Stachowiak  <mjs@apple.com>
54
55         Reviewed by John.
56
57         - split remaining editing command classes out of htmlediting.cpp
58         - rename InsertParagraphSeparatorInQuotedContentCommand to BreakBlockquoteCommand
59
60         No layout tests needed - this is a pure refactoring change.
61         
62         * WebCore.pbproj/project.pbxproj:
63         * khtml/editing/apply_style_command.cpp:
64         * khtml/editing/break_blockquote_command.cpp: Added.
65         * khtml/editing/break_blockquote_command.h: Added.
66         * khtml/editing/composite_edit_command.cpp:
67         * khtml/editing/delete_selection_command.cpp:
68         * khtml/editing/edit_command.cpp:
69         * khtml/editing/htmlediting.cpp:
70         * khtml/editing/htmlediting.h:
71         * khtml/editing/insert_line_break_command.cpp: Added.
72         * khtml/editing/insert_line_break_command.h: Added.
73         * khtml/editing/insert_paragraph_separator_command.cpp: Added.
74         * khtml/editing/insert_paragraph_separator_command.h: Added.
75         * khtml/editing/insert_text_command.cpp: Added.
76         * khtml/editing/insert_text_command.h: Added.
77         * khtml/editing/join_text_nodes_command.cpp: Added.
78         * khtml/editing/join_text_nodes_command.h: Added.
79         * khtml/editing/merge_identical_elements_command.cpp: Added.
80         * khtml/editing/merge_identical_elements_command.h: Added.
81         * khtml/editing/move_selection_command.cpp: Added.
82         * khtml/editing/move_selection_command.h: Added.
83         * khtml/editing/rebalance_whitespace_command.cpp: Added.
84         * khtml/editing/rebalance_whitespace_command.h: Added.
85         * khtml/editing/remove_css_property_command.cpp: Added.
86         * khtml/editing/remove_css_property_command.h: Added.
87         * khtml/editing/remove_node_attribute_command.cpp: Added.
88         * khtml/editing/remove_node_attribute_command.h: Added.
89         * khtml/editing/remove_node_command.cpp: Added.
90         * khtml/editing/remove_node_command.h: Added.
91         * khtml/editing/remove_node_preserving_children_command.cpp: Added.
92         * khtml/editing/remove_node_preserving_children_command.h: Added.
93         * khtml/editing/replace_selection_command.cpp: Added.
94         * khtml/editing/replace_selection_command.h: Added.
95         * khtml/editing/set_node_attribute_command.cpp: Added.
96         * khtml/editing/set_node_attribute_command.h: Added.
97         * khtml/editing/split_element_command.cpp: Added.
98         * khtml/editing/split_element_command.h: Added.
99         * khtml/editing/split_text_node_command.cpp: Added.
100         * khtml/editing/split_text_node_command.h: Added.
101         * khtml/editing/split_text_node_containing_element_command.h: Added.
102         * khtml/editing/typing_command.cpp: Added.
103         * khtml/editing/typing_command.h: Added.
104         * khtml/editing/wrap_contents_in_dummy_span_command.cpp: Added.
105         * khtml/editing/wrap_contents_in_dummy_span_command.h: Added.
106
107 2005-05-23  Darin Adler  <darin@apple.com>
108
109         * WebCore.exp: Sorted file for more readable diffs.
110
111 2005-05-23  Adele Peterson  <adele@apple.com>
112
113         Reviewed by Darin.
114
115         fix for <rdar://problem/4122661> Regression: 10.3.8-10.3.9: Next lesson doesn't work on Dale Carnegie Action Systems page
116
117         * khtml/ecma/kjs_window.cpp: (KJS::WindowFunc::tryCall): added checks for NaN, in case it is passed into window.open for screenx, screeny, left, top, height, or width.
118
119 2005-05-23  David Harrison  <harrison@apple.com>
120
121         Reviewed by Darin.
122
123         Prevent crash when going from no selection to selection with mispelling checks enabled.
124                 
125         * kwq/KWQKHTMLPart.mm:
126         (KWQKHTMLPart::markMisspellings):
127         Repair check for null searchRange.  Was inadvertently broken in recent checkin.
128
129 2005-05-23  John Sullivan  <sullivan@apple.com>
130
131         Reviewed by Dave Hyatt.
132         
133         - fixed <rdar://problem/4123592> Can't resize textareas that have a width specified by a style
134
135         * kwq/KWQTextArea.mm:
136         (-[KWQTextArea getNumColumns:andNumRows:forSize:]):
137         removed this method, which I had added earlier to set cols and rows correctly
138         (-[KWQTextAreaTextView _trackResizeFromMouseDown:]):
139         set width and height instead of cols and rows; handle the intrinsic margin that sometimes appears
140         on form elements
141
142 2005-05-22  Adele Peterson  <adele@apple.com>
143
144         Reviewed by Maciej.
145
146         fix for <rdar://problem/4127101> REGRESSION(412-TOT) crash when creating Option element
147
148         * khtml/ecma/kjs_html.cpp: (KJS::OptionConstructorImp::construct):
149         Changed ElementImpl pointer to a SharedPtr because it was getting destroyed before we were done with it.  
150
151 2005-05-20  John Sullivan  <sullivan@apple.com>
152
153         Reviewed by Chris.
154         
155         - fixed <rdar://problem/4126160> Crash sending mouse-exited event after reloading 
156         page with resizable textarea
157
158         * kwq/KWQTextArea.mm:
159         (-[KWQTextAreaTextView resetCursorRects]):
160         This was some side effect of tracking rect code used for resizable textareas. I discovered
161         that I didn't need the tracking rect code at all (at least to achieve the level of only-somewhat-working
162         cursor behavior that I already had). Removing it caused the bug to vanish.
163
164 2005-05-19  Darin Adler  <darin@apple.com>
165
166         Reviewed by Maciej.
167         
168         - turned off exceptions and RTTI; seems to cut WebCore code size by about 35%
169
170         * WebCore.pbproj/project.pbxproj: Turn off exceptions and RTTI for the framework.
171
172 2005-05-19  Darin Adler  <darin@apple.com>
173
174         Reviewed by Chris Petersen.
175
176         - fixed a mistake I introduced in my previous check-in that caused a Deployment build failure
177
178         * kwq/DOM.mm: (-[DOMDocument createTreeWalker::::]): Initialize cppFilter to 0, which fixes both
179         the build failure and a potential bug!
180
181 2005-05-17  Darin Adler  <darin@apple.com>
182
183         Reviewed by Maciej.
184         No new layout tests required.
185
186         - remove all dependencies on exceptions and RTTI (but don't turn them off yet, that will be in a later patch)
187
188         * WebCore.pbproj/project.pbxproj: Set a new KHTML_NO_CPLUSPLUS_DOM define.
189         Removed all C++ DOM wrapper files that we don't need to compile any more.
190
191         * khtml/dom/css_stylesheet.h: Added more KHTML_NO_CPLUSPLUS_DOM checks so we don't include any
192         headers when including this file.
193
194         * khtml/dom/dom2_events.h: Fixed up KHTML_NO_CPLUSPLUS_DOM checks so that everything but EventListener
195         is turned off when that's on. Also moved the public so that the constants from KeyboardEvent are public.
196         * khtml/dom/dom2_events.cpp: Put everything except for EventListener inside KHTML_NO_CPLUSPLUS_DOM.
197
198         * khtml/dom/dom2_range.h: Added KHTML_NO_CPLUSPLUS_DOM checks so that only the constants are defined,
199         no classes.
200
201         * khtml/dom/dom2_traversal.cpp: Put everything except for NodeFilterCondition inside KHTML_NO_CPLUSPLUS_DOM.
202
203         * khtml/dom/dom_node.h: Added more KHTML_NO_CPLUSPLUS_DOM checks so we don't include any
204         headers when including this file.
205
206         * khtml/ecma/kjs_binding.cpp:
207         (KJS::DOMObject::get): Removed exception-handling code. Now we can eliminate tryGet altogether.
208         (KJS::DOMObject::put): Ditto.
209         (KJS::DOMFunction::get): Ditto.
210         (KJS::DOMFunction::call): Ditto.
211
212         * khtml/editing/visible_text.h: Added an include of <qstring.h>.
213
214         * khtml/misc/loader.h: Added isKHTMLLoader.
215         * khtml/misc/loader.cpp: (Loader::isKHTMLLoader): Added. Poor-man's replacement for dynamic_cast.
216
217         * khtml/rendering/render_form.h:
218         * khtml/rendering/render_form.cpp: (RenderFormElement::slotTextChanged): Added. Hack to make KWQSlot work
219         for this function.
220
221         * khtml/xml/dom2_rangeimpl.h: Added a forward declaration of class DOMString, needed now that the C++
222         DOM wrappers aren't defining it.
223
224         * khtml/xml/dom_docimpl.cpp:
225         (DocumentImpl::defaultEventHandler): Changed to call handleEventImpl so we don't have to make the
226         C++ DOM wrapper for the event.
227         * khtml/xml/dom_nodeimpl.cpp:
228         (NodeImpl::handleLocalEvents): Ditto.
229         (ContainerNodeImpl::insertBefore): Used SharedPtr<NodeImpl> rather than Node to protect the child node.
230         (ContainerNodeImpl::replaceChild): Ditto.
231         (ContainerNodeImpl::appendChild): Ditto.
232         (ContainerNodeImpl::addChild): Ditto.
233
234         * kwq/DOM.mm:
235         (ObjCNodeFilterCondition::acceptNode): Update to add a KHTML_NO_CPLUSPLUS_DOM check since FilterCondition
236         has a different API depending on the state.
237         (-[DOMDocument createNodeIterator::::]): Rewrote to use NodeFilterImpl instead of NodeFilter.
238         (-[DOMDocument createTreeWalker::::]): Ditto.
239
240         * kwq/KWQAccObject.mm:
241         (-[KWQAccObject role]): Use identifier instead of casting to Node and using elementId.
242         (-[KWQAccObject title]): Ditto.
243         (-[KWQAccObject accessibilityIsIgnored]): Ditto.
244         (-[KWQAccObject rendererForView:]): Ditto.
245
246         * kwq/KWQFrame.mm: (QFrame::setFrameStyle): Use isKHTMLView instead of dynamic_cast.
247
248         * kwq/KWQKHTMLPart.mm:
249         (KWQKHTMLPart::currentForm): Use focusNode instead of activeNode.
250         (KWQKHTMLPart::nextKeyViewInFrame): Use isWidget instead of dynamic_cast.
251         (KWQKHTMLPart::currentEventIsMouseDownInWidget): Use KHTMLView's nodeUnderMouse instead of our public one
252         that uses a DOM C++ wrapper.
253         (KWQKHTMLPart::partForWidget): Use isKHTMLView instead of dynamic_cast.
254         (KWQKHTMLPart::passSubframeEventToSubframe): Use isWidget instead of dynamic_cast.
255
256         * kwq/KWQObject.h: Made isXXX functions all public since we use them in a few more places now.
257         Also added isKHTMLLoader.
258         * kwq/KWQObject.mm: (QObject::isKHTMLLoader): Added. Returns false by default.
259
260         * kwq/KWQSlot.mm: Removed all uses of dynamic_cast.
261
262         * kwq/WebCoreBridge.mm:
263         (-[WebCoreBridge stringForRange:]): Used plainText instead of text.
264         (-[WebCoreBridge copyRenderNode:copier:]): Used isWidget instead of dynamic_cast.
265
266 2005-05-16  Darin Adler  <darin@apple.com>
267
268         - attempt to get things building under "Saffron" development tools
269
270         * WebCore.pbproj/project.pbxproj: Use BUILT_PRODUCTS_DIR instead of SYMROOT.
271
272 2005-05-16  Adele Peterson  <adele@apple.com>
273
274         Changes by Darin. Reviewed by myself.
275
276         Changed the Render Tree debug code to write out an indication that the affinity is upstream
277         when writing out caret position. Updated the one layout test with output affected by the change.
278         Also updated one test to use the new dumpAsText method in dumpRenderTree.
279
280         * kwq/KWQRenderTreeDebug.cpp: (writeSelection): writes out affinity if it's upstream in the caret case
281         * layout-tests/editing/style/create-block-for-style-004-expected.txt: new results that contain the affinity
282         * layout-tests/fast/js/char-at.html: now calls layoutController.dumpAsText()
283         * layout-tests/fast/js/char-at-expected.txt: plain text result (replaces old render tree result)
284
285 2005-05-16  Darin Adler  <darin@apple.com>
286
287         Reviewed by Adele.
288
289         - fixed issues preventing us from compiling with newer versions of gcc 4.0
290
291         * khtml/dom/dom2_events.cpp: Add definitions of some static data member constants, as required
292         by the C++ standard and the gcc 4.0 compiler.
293
294         * khtml/editing/selection.h: Specified KHTMLPart friend class as ::KHTMLPart, since if it's
295         not explicitly qualified, it means DOM::KHTMLPart.
296
297         * khtml/dom/dom_string.cpp:
298         (DOM::strcasecmp): Removed redundant and illegal DOM:: prefix.
299         (DOM::operator==): Ditto.
300         * khtml/ecma/kjs_binding.cpp:
301         (KJS::getStringOrNull): Removed redundant and illegal KJS:: prefix.
302         (KJS::ValueToVariant): Ditto.
303         * khtml/ecma/kjs_css.cpp:
304         (KJS::getCSSRuleConstructor): Ditto.
305         (KJS::getCSSValueConstructor): Ditto.
306         (KJS::getCSSPrimitiveValueConstructor): Ditto.
307         * khtml/ecma/kjs_events.cpp:
308         (KJS::getEventConstructor): Ditto.
309         (KJS::getEventExceptionConstructor): Ditto.
310         (KJS::getMutationEventConstructor): Ditto.
311         * khtml/ecma/kjs_traversal.cpp:
312         (KJS::getNodeFilterConstructor): Ditto.
313
314         * khtml/misc/loader_client.h: Added an empty virtual destructor to CachedObjectClient
315         to quiet the compiler. This doesn't really do any good, but also does no harm.
316         * khtml/misc/loader.cpp: (CachedObjectClient::~CachedObjectClient): Added.
317
318         * khtml/rendering/render_block.cpp: (khtml::RenderBlock::fillBlockSelectionGaps):
319         Initialize a couple of variables that should have been initialized to 0.
320         Not just about making the compiler happy -- warning found a real bug!
321
322         * kwq/KWQTextArea.mm: (RangeOfParagraph): Change else structure to work around compiler
323         warning bug.
324
325 2005-05-13  John Sullivan  <sullivan@apple.com>
326
327         * kwq/KWQTextArea.mm:
328         (-[KWQTextAreaTextView _trackResizeFromMouseDown:]):
329         added Radar numbers to FIXMEs about resizable textareas
330         (-[KWQTextAreaTextView resetCursorRects]):
331         ditto
332         (-[KWQTextAreaTextView mouseDown:]):
333         ditto
334
335 2005-05-12  Darin Adler  <darin@apple.com>
336
337         Reviewed by Chris Blumenberg.
338
339         - more "getting off the C++ DOM wrappers" changes
340           This pass involves replacing uses of DOM::Range with use of DOM::RangeImpl
341           plus some more use of DOM::DocumentImpl instead of DOM::Document.
342
343         * khtml/dom/dom2_range.cpp:
344         * khtml/dom/dom2_range.h:
345         * khtml/ecma/kjs_window.cpp:
346         (KJS::Window::get):
347         (KJS::WindowFunc::tryCall):
348         (KJS::Window::updateLayout):
349         (KJS::ScheduledAction::execute):
350         (KJS::Selection::toString):
351         * khtml/ecma/xmlhttprequest.cpp:
352         (KJS::XMLHttpRequestProtoFunc::tryCall):
353         * khtml/editing/htmlediting.cpp:
354         (khtml::InsertLineBreakCommand::doApply):
355         * khtml/editing/selection.cpp:
356         (khtml::Selection::Selection):
357         (khtml::Selection::moveTo):
358         (khtml::Selection::toRange):
359         * khtml/editing/selection.h:
360         * khtml/editing/visible_position.cpp:
361         (khtml::makeRange):
362         (khtml::startVisiblePosition):
363         (khtml::endVisiblePosition):
364         (khtml::setStart):
365         (khtml::setEnd):
366         * khtml/editing/visible_position.h:
367         * khtml/editing/visible_range.h:
368         * khtml/editing/visible_text.cpp:
369         (khtml::TextIterator::TextIterator):
370         (khtml::TextIterator::range):
371         (khtml::SimplifiedBackwardsTextIterator::SimplifiedBackwardsTextIterator):
372         (khtml::SimplifiedBackwardsTextIterator::range):
373         (khtml::CharacterIterator::CharacterIterator):
374         (khtml::CharacterIterator::range):
375         (khtml::WordAwareIterator::WordAwareIterator):
376         (khtml::WordAwareIterator::advance):
377         (khtml::TextIterator::rangeLength):
378         (khtml::TextIterator::rangeFromLocationAndLength):
379         (khtml::plainText):
380         (khtml::findPlainText):
381         * khtml/editing/visible_text.h:
382         (khtml::WordAwareIterator::range):
383         * khtml/editing/visible_units.cpp:
384         (khtml::previousBoundary):
385         (khtml::nextBoundary):
386         * khtml/html/html_elementimpl.cpp:
387         (HTMLElementImpl::innerText):
388         * khtml/html/htmltokenizer.cpp:
389         (khtml::HTMLTokenizer::scriptExecution):
390         * khtml/khtml_part.cpp:
391         (KHTMLPart::text):
392         (KHTMLPart::selectedText):
393         (KHTMLPart::shouldBeginEditing):
394         (KHTMLPart::shouldEndEditing):
395         (KHTMLPart::selectionComputedStyle):
396         * khtml/khtml_part.h:
397         * khtml/khtmlview.h:
398         * khtml/rendering/render_text.cpp:
399         (InlineTextBox::paint):
400         * khtml/xml/dom2_rangeimpl.cpp:
401         (DOM::operator==):
402         (DOM::rangeOfContents):
403         * khtml/xml/dom2_rangeimpl.h:
404         (DOM::operator!=):
405         * khtml/xml/dom_docimpl.cpp:
406         (DocumentImpl::relinquishesEditingFocus):
407         (DocumentImpl::acceptsEditingFocus):
408         (DocumentImpl::addMarker):
409         (DocumentImpl::removeMarker):
410         * khtml/xml/dom_docimpl.h:
411         * khtml/xml/dom_position.cpp:
412         (DOM::startPosition):
413         * khtml/xml/dom_position.h:
414         * kwq/DOMHTML.mm:
415         (-[DOMHTMLLinkElement href]):
416         (-[DOMHTMLBaseElement href]):
417         (-[DOMHTMLInputElement src]):
418         (-[DOMHTMLAnchorElement href]):
419         (-[DOMHTMLImageElement src]):
420         (-[DOMHTMLAreaElement href]):
421         * kwq/KWQAccObject.mm:
422         (-[KWQAccObject textUnderElement]):
423         (-[KWQAccObject value]):
424         (-[KWQAccObject doAXStringForTextMarkerRange:]):
425         (-[KWQAccObject doAXAttributedStringForTextMarkerRange:]):
426         * kwq/KWQKHTMLPart.h:
427         (KWQKHTMLPart::markedTextRange):
428         * kwq/KWQKHTMLPart.mm:
429         (KWQKHTMLPart::findString):
430         (KWQKHTMLPart::advanceToNextMisspelling):
431         (KWQKHTMLPart::fontForSelection):
432         (KWQKHTMLPart::markMisspellings):
433         (KWQKHTMLPart::respondToChangedSelection):
434         (KWQKHTMLPart::shouldBeginEditing):
435         (KWQKHTMLPart::shouldEndEditing):
436         (convertAttributesToUnderlines):
437         (KWQKHTMLPart::setMarkedTextRange):
438         * kwq/WebCoreBridge.mm:
439         (-[WebCoreBridge elementAtPoint:]):
440         (-[WebCoreBridge rangeByExpandingSelectionWithGranularity:]):
441         (-[WebCoreBridge rangeByAlteringCurrentSelection:direction:granularity:]):
442         (-[WebCoreBridge rangeByAlteringCurrentSelection:verticalDistance:]):
443         (-[WebCoreBridge selectedDOMRange]):
444         (-[WebCoreBridge convertToNSRange:DOM::]):
445         (-[WebCoreBridge convertToDOMRange:]):
446         (-[WebCoreBridge convertToObjCDOMRange:]):
447         (-[WebCoreBridge selectNSRange:]):
448         (-[WebCoreBridge selectedNSRange]):
449         (-[WebCoreBridge markDOMRange]):
450         (-[WebCoreBridge markedTextDOMRange]):
451         (-[WebCoreBridge markedTextNSRange]):
452         (-[WebCoreBridge replaceMarkedTextWithText:]):
453         (-[WebCoreBridge smartDeleteRangeForProposedRange:]):
454         (-[WebCoreBridge dragCaretDOMRange]):
455         (-[WebCoreBridge editableDOMRangeForPoint:]):
456         (-[WebCoreBridge rangeOfCharactersAroundCaret]):
457
458 2005-05-13  Maciej Stachowiak  <mjs@apple.com>
459
460         Reviewed by Dave.
461
462         - more splitting up of htmlediting.cpp
463
464         * WebCore.pbproj/project.pbxproj:
465         * khtml/editing/composite_edit_command.cpp:
466         * khtml/editing/delete_from_text_node_command.cpp: Added.
467         * khtml/editing/delete_from_text_node_command.h: Added.
468         * khtml/editing/delete_selection_command.cpp: Added.
469         * khtml/editing/delete_selection_command.h: Added.
470         * khtml/editing/htmlediting.cpp:
471         * khtml/editing/htmlediting.h:
472         * khtml/editing/insert_into_text_node_command.cpp: Added.
473         * khtml/editing/insert_into_text_node_command.h: Added.
474         * khtml/editing/insert_node_before_command.cpp: Added.
475         * khtml/editing/insert_node_before_command.h: Added.
476
477 2005-05-12  Adele Peterson  <adele@apple.com>
478
479         Reviewed by Maciej.
480
481         fix for  <rdar://problem/4117656> deleting an input element in its onBlur handler crashes Safari
482
483         * khtml/rendering/render_form.cpp: (RenderLineEdit::handleFocusOut): added nil check for element
484
485 2005-05-12  John Sullivan  <sullivan@apple.com>
486
487         Reviewed by Kevin.
488         
489         - rolled in changes from experimental-ui-branch to support resizable textareas
490         and find-as-you-type. The files/functions modified are listed just below. After
491         that are the ChangeLog comments from the branch.
492
493         * Resources/textAreaResizeCorner.tiff: Added.
494         * WebCore.pbproj/project.pbxproj:
495         * kwq/KWQKHTMLPart.h:
496         * kwq/KWQKHTMLPart.mm:
497         (KWQKHTMLPart::findString):
498         * kwq/KWQTextArea.mm:
499         (-[KWQTextArea textDidChange:]):
500         (-[KWQTextAreaTextView _resizeCornerImage]):
501         (-[KWQTextAreaTextView _resizeCornerRect]):
502         (-[KWQTextAreaTextView resetCursorRects]):
503         (-[KWQTextAreaTextView drawRect:]):
504         (-[KWQTextAreaTextView mouseDown:]):
505         * kwq/WebCoreBridge.h:
506         * kwq/WebCoreBridge.mm:
507         (-[WebCoreBridge searchFor:direction:caseSensitive:wrap:findInSelection:]):
508
509         2005-05-05  John Sullivan  <sullivan@apple.com>
510
511                 Reviewed by Chris.
512
513                 * kwq/KWQTextArea.mm:
514                 (-[KWQTextAreaTextView _resizeCornerRect]):
515                 Get corner rect from enclosing clipView, rather than using visibleRect.
516                 VisibleRect would return the wrong result when the textarea was clipped
517                 by the bottom of the window, leading to redraw schmutz among other things.
518
519         2005-05-02  John Sullivan  <sullivan@apple.com>
520
521                 Reviewed by Chris.
522                 
523                 Improvements to resizable textarea experiment:
524                 - resize image is now drawn in the resize corner
525                 - cursor sometimes tracks to arrow when over resize corner (but usually not)
526                 - cursor changes to arrow on mouse down in any case
527
528                 * Resources/textAreaResizeCorner.tiff: Added.
529                 * WebCore.pbproj/project.pbxproj:
530                 updated for added image file
531                 
532                 * kwq/KWQTextArea.mm:
533                 (-[KWQTextAreaTextView _resizeCornerImage]):
534                 new method, reads resize image once and caches it
535                 (-[KWQTextAreaTextView _resizeCornerRect]):
536                 new method, computes rect from image
537                 (-[KWQTextAreaTextView resetCursorRects]):
538                 overridden to attempt to make the cursor change to an arrow when over this
539                 corner. Only works sometimes, as explained in comments.
540                 (-[KWQTextAreaTextView drawRect:]):
541                 overridden to draw resize image
542                 (-[KWQTextAreaTextView mouseDown:]):
543                 now uses _resizeCornerRect, and sets cursor to arrow when pressed in resize corner
544
545         2005-04-18  John Sullivan  <sullivan@apple.com>
546
547                 WebCore support for notifying a form delegate when a
548                 textarea's contents have changed (as opposed to a 
549                 textfield, which was already handled).
550
551                 Reviewed by Maciej.
552
553                 * kwq/WebCoreBridge.h:
554                 add textDidChange: method
555
556                 * kwq/KWQTextArea.mm:
557                 (-[KWQTextArea textDidChange:]):
558                 call through to bridge
559
560         2005-04-07  John Sullivan  <sullivan@apple.com>
561
562                 WebCore support for find-as-you-type; needed an additional parameter
563                 to findString and searchFor:...
564
565                 Reviewed by Dave Hyatt.
566
567                 * kwq/KWQKHTMLPart.h:
568                 * kwq/KWQKHTMLPart.mm:
569                 (KWQKHTMLPart::findString):
570                 new findInSelection parameter; if true, start from the beginning of the selection
571                 when searching forward, or the end of the selection when searching backward
572                 
573                 * kwq/WebCoreBridge.h:
574                 * kwq/WebCoreBridge.mm:
575                 (-[WebCoreBridge searchFor:direction:caseSensitive:wrap:findInSelection:]):
576                 new findInSelection parameter; passed through to findString
577
578 2005-05-12  Darin Adler  <darin@apple.com>
579
580         Reviewed by Maciej (except for some parts outside the ECMA directory).
581
582         - switch KJS wrappers over to using the DOM impl. classes rather than using
583           the DOM wrappers; will allow us to not even compile the DOM wrappers and
584           make the code smaller
585
586         * khtml/css/css_valueimpl.h: Added CSSStyleDeclarationImpl::isPropertyName,
587         removed CSSStyleDeclarationImpl::propertyID.
588         * khtml/css/css_valueimpl.cpp:
589         (DOM::propertyID): Added. Gets property ID given a DOM string. Replaces the
590         previous version that had hacks that we want to leave in the JS wrapper for now.
591         (DOM::CSSStyleDeclarationImpl::isPropertyName): Added.
592
593         * khtml/css/cssproperties.in: Fixed up comments.
594
595         * khtml/css/makeprop: Added new maxCSSPropertyNameLength constant, used for
596         buffer size in the propertyID function.
597
598         * khtml/dom/dom2_events.h: Added handleEventImpl, making it easier to call
599         handleEvent in a way that works either with or without the C++ DOM wrappers.
600         * khtml/dom/dom2_events.cpp: (EventListener::handleEventImpl): Added.
601
602         * khtml/dom/dom2_views.cpp: Added now-needed include.
603         * khtml/dom/dom_doc.cpp: Added now-needed include.
604         * khtml/dom/dom_element.cpp: Tweaked includes.
605
606         * khtml/editing/htmlediting.cpp: Removed now-unneeded include.
607         * khtml/html/html_baseimpl.cpp: Ditto.
608         * khtml/html/html_formimpl.h: Ditto.
609         * khtml/rendering/render_form.h: Ditto.
610         * khtml/rendering/render_style.h: Ditto.
611         * khtml/xml/dom2_eventsimpl.cpp: Ditto.
612         * khtml/xml/dom2_viewsimpl.h: Ditto.
613         * khtml/xml/dom_elementimpl.h: Ditto.
614         * khtml/xml/dom_stringimpl.h: Ditto.
615         * kwq/DOM.mm: Ditto.
616         * kwq/DOMHTML.mm: Ditto.
617
618         * khtml/khtml_part.cpp: Tweaked incluudes.
619         * khtml/khtmlpart_p.h: Ditto.
620
621         * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::canCachePage): Change to use DOM impl. rather
622         than C++ DOM.
623
624         * khtml/xml/dom_docimpl.cpp:
625         (DOMImplementationImpl::createDocumentType): Disabled the calls to the not-implemented
626         name checks in the C++ DOM wrappers. If we add name changes, we'll want them inside the
627         impl, not in the wrappers.
628         (DOMImplementationImpl::createDocument): Ditto.
629         * khtml/xml/dom_nodeimpl.cpp: (NodeImpl::checkSetPrefix): Ditto.
630
631         * khtml/ecma/kjs_binding.cpp:
632         (KJS::ScriptInterpreter::wasRunByUserGesture):
633         (KJS::KJS::ValueToVariant):
634         (KJS::setDOMException):
635         * khtml/ecma/kjs_binding.h:
636         (KJS::ScriptInterpreter::setCurrentEvent):
637         (KJS::ScriptInterpreter::getCurrentEvent):
638         (KJS::cacheDOMObject):
639         (KJS::DOMExceptionTranslator::DOMExceptionTranslator):
640         (KJS::DOMExceptionTranslator::~DOMExceptionTranslator):
641         (KJS::DOMExceptionTranslator::operator int &):
642         (KJS::cacheGlobalObject):
643         * khtml/ecma/kjs_css.cpp:
644         (KJS::cssPropertyName):
645         (KJS::isCSSPropertyName):
646         (KJS::DOMCSSStyleDeclaration::DOMCSSStyleDeclaration):
647         (KJS::DOMCSSStyleDeclaration::~DOMCSSStyleDeclaration):
648         (KJS::DOMCSSStyleDeclaration::hasProperty):
649         (KJS::DOMCSSStyleDeclaration::tryGet):
650         (KJS::DOMCSSStyleDeclaration::tryPut):
651         (KJS::DOMCSSStyleDeclarationProtoFunc::tryCall):
652         (KJS::getDOMCSSStyleDeclaration):
653         (KJS::DOMStyleSheet::~DOMStyleSheet):
654         (KJS::DOMStyleSheet::getValueProperty):
655         (KJS::DOMStyleSheet::tryPut):
656         (KJS::getDOMStyleSheet):
657         (KJS::DOMStyleSheetList::~DOMStyleSheetList):
658         (KJS::DOMStyleSheetList::tryGet):
659         (KJS::getDOMStyleSheetList):
660         (KJS::DOMStyleSheetListFunc::tryCall):
661         (KJS::DOMMediaList::DOMMediaList):
662         (KJS::DOMMediaList::~DOMMediaList):
663         (KJS::DOMMediaList::tryGet):
664         (KJS::DOMMediaList::tryPut):
665         (KJS::getDOMMediaList):
666         (KJS::KJS::DOMMediaListProtoFunc::tryCall):
667         (KJS::DOMCSSStyleSheet::DOMCSSStyleSheet):
668         (KJS::DOMCSSStyleSheet::tryGet):
669         (KJS::DOMCSSStyleSheetProtoFunc::tryCall):
670         (KJS::DOMCSSRuleList::~DOMCSSRuleList):
671         (KJS::DOMCSSRuleList::tryGet):
672         (KJS::DOMCSSRuleListFunc::tryCall):
673         (KJS::getDOMCSSRuleList):
674         (KJS::DOMCSSRule::~DOMCSSRule):
675         (KJS::DOMCSSRule::classInfo):
676         (KJS::DOMCSSRule::tryGet):
677         (KJS::DOMCSSRule::getValueProperty):
678         (KJS::DOMCSSRule::putValue):
679         (KJS::DOMCSSRuleFunc::tryCall):
680         (KJS::getDOMCSSRule):
681         (KJS::DOMCSSValue::~DOMCSSValue):
682         (KJS::DOMCSSValue::tryGet):
683         (KJS::DOMCSSValue::tryPut):
684         (KJS::getDOMCSSValue):
685         (KJS::DOMCSSPrimitiveValue::DOMCSSPrimitiveValue):
686         (KJS::DOMCSSPrimitiveValue::tryGet):
687         (KJS::DOMCSSPrimitiveValueProtoFunc::tryCall):
688         (KJS::DOMCSSValueList::DOMCSSValueList):
689         (KJS::DOMCSSValueList::tryGet):
690         (KJS::DOMCSSValueListFunc::tryCall):
691         (KJS::DOMRGBColor::getValueProperty):
692         (KJS::getDOMRGBColor):
693         (KJS::DOMRect::~DOMRect):
694         (KJS::DOMRect::getValueProperty):
695         (KJS::getDOMRect):
696         (KJS::DOMCounter::~DOMCounter):
697         (KJS::DOMCounter::getValueProperty):
698         (KJS::getDOMCounter):
699         * khtml/ecma/kjs_css.h:
700         (KJS::DOMCSSStyleDeclaration::impl):
701         (KJS::DOMStyleSheet::DOMStyleSheet):
702         (KJS::DOMStyleSheet::impl):
703         (KJS::DOMStyleSheetList::DOMStyleSheetList):
704         (KJS::DOMStyleSheetList::impl):
705         (KJS::DOMMediaList::impl):
706         (KJS::DOMCSSStyleSheet::):
707         (KJS::DOMCSSRuleList::DOMCSSRuleList):
708         (KJS::DOMCSSRuleList::impl):
709         (KJS::DOMCSSRule::DOMCSSRule):
710         (KJS::DOMCSSRule::impl):
711         (KJS::DOMCSSValue::DOMCSSValue):
712         (KJS::DOMCSSValue::impl):
713         (KJS::DOMCSSValueList::):
714         (KJS::DOMRGBColor::DOMRGBColor):
715         (KJS::DOMRect::DOMRect):
716         (KJS::DOMCounter::DOMCounter):
717         * khtml/ecma/kjs_dom.cpp:
718         (KJS::DOMNodeListFunc::):
719         (KJS::DOMNode::DOMNode):
720         (KJS::DOMNode::toBoolean):
721         (KJS::DOMNode::getValueProperty):
722         (KJS::DOMNode::putValue):
723         (KJS::DOMNode::toPrimitive):
724         (KJS::DOMNode::toString):
725         (KJS::DOMNode::setListener):
726         (KJS::DOMNode::getListener):
727         (KJS::DOMNodeProtoFunc::tryCall):
728         (KJS::toNode):
729         (KJS::DOMNodeList::~DOMNodeList):
730         (KJS::DOMNodeList::toPrimitive):
731         (KJS::DOMNodeList::tryGet):
732         (KJS::DOMNodeList::tryCall):
733         (KJS::DOMNodeListFunc::tryCall):
734         (KJS::DOMAttr::DOMAttr):
735         (KJS::DOMAttr::getValueProperty):
736         (KJS::DOMAttr::putValue):
737         (KJS::toAttr):
738         (KJS::DOMDocument::DOMDocument):
739         (KJS::DOMDocument::~DOMDocument):
740         (KJS::DOMDocument::getValueProperty):
741         (KJS::DOMDocument::putValue):
742         (KJS::DOMDocumentProtoFunc::tryCall):
743         (KJS::DOMElement::DOMElement):
744         (KJS::DOMElement::tryGet):
745         (KJS::DOMElementProtoFunc::tryCall):
746         (KJS::toElement):
747         (KJS::DOMDOMImplementation::DOMDOMImplementation):
748         (KJS::DOMDOMImplementation::~DOMDOMImplementation):
749         (KJS::DOMDOMImplementationProtoFunc::tryCall):
750         (KJS::DOMDocumentType::DOMDocumentType):
751         (KJS::DOMDocumentType::getValueProperty):
752         (KJS::toDocumentType):
753         (KJS::DOMNamedNodeMap::DOMNamedNodeMap):
754         (KJS::DOMNamedNodeMap::~DOMNamedNodeMap):
755         (KJS::DOMNamedNodeMap::tryGet):
756         (KJS::DOMNamedNodeMapProtoFunc::tryCall):
757         (KJS::DOMProcessingInstruction::DOMProcessingInstruction):
758         (KJS::DOMProcessingInstruction::getValueProperty):
759         (KJS::DOMProcessingInstruction::tryPut):
760         (KJS::DOMNotation::DOMNotation):
761         (KJS::DOMNotation::getValueProperty):
762         (KJS::DOMEntity::DOMEntity):
763         (KJS::DOMEntity::getValueProperty):
764         (KJS::getDOMDocumentNode):
765         (KJS::checkNodeSecurity):
766         (KJS::getDOMNode):
767         (KJS::getDOMNamedNodeMap):
768         (KJS::getRuntimeObject):
769         (KJS::getDOMNodeList):
770         (KJS::getDOMDOMImplementation):
771         (KJS::getNodeConstructor):
772         (KJS::getDOMExceptionConstructor):
773         (KJS::DOMNamedNodesCollection::DOMNamedNodesCollection):
774         (KJS::DOMNamedNodesCollection::tryGet):
775         (KJS::DOMCharacterData::DOMCharacterData):
776         (KJS::DOMCharacterData::getValueProperty):
777         (KJS::DOMCharacterData::tryPut):
778         (KJS::DOMCharacterDataProtoFunc::tryCall):
779         (KJS::DOMText::DOMText):
780         (KJS::DOMTextProtoFunc::tryCall):
781         * khtml/ecma/kjs_dom.h:
782         (KJS::DOMNode::impl):
783         (KJS::DOMNodeList::DOMNodeList):
784         (KJS::DOMNodeList::impl):
785         (KJS::DOMDOMImplementation::impl):
786         (KJS::DOMNamedNodeMap::impl):
787         * khtml/ecma/kjs_events.cpp:
788         (KJS::JSAbstractEventListener::handleEvent):
789         (KJS::JSLazyEventListener::handleEvent):
790         (KJS::getNodeEventListener):
791         (KJS::DOMEvent::DOMEvent):
792         (KJS::DOMEvent::~DOMEvent):
793         (KJS::DOMEvent::getValueProperty):
794         (KJS::DOMEvent::putValue):
795         (KJS::DOMEventProtoFunc::tryCall):
796         (KJS::getDOMEvent):
797         (KJS::toEvent):
798         (KJS::DOMUIEvent::DOMUIEvent):
799         (KJS::DOMUIEvent::getValueProperty):
800         (KJS::DOMUIEventProtoFunc::tryCall):
801         (KJS::DOMMouseEvent::DOMMouseEvent):
802         (KJS::DOMMouseEvent::getValueProperty):
803         (KJS::DOMMouseEventProtoFunc::tryCall):
804         (KJS::DOMKeyboardEvent::DOMKeyboardEvent):
805         (KJS::DOMKeyboardEvent::getValueProperty):
806         (KJS::DOMKeyboardEventProtoFunc::tryCall):
807         (KJS::DOMMutationEvent::DOMMutationEvent):
808         (KJS::DOMMutationEvent::getValueProperty):
809         (KJS::DOMMutationEventProtoFunc::tryCall):
810         (KJS::DOMWheelEvent::DOMWheelEvent):
811         (KJS::DOMWheelEvent::getValueProperty):
812         (KJS::ClipboardProtoFunc::tryCall):
813         * khtml/ecma/kjs_events.h:
814         (KJS::DOMEvent::impl):
815         (KJS::DOMUIEvent::):
816         (KJS::DOMMouseEvent::):
817         (KJS::DOMKeyboardEvent::):
818         (KJS::DOMMutationEvent::):
819         * khtml/ecma/kjs_html.cpp:
820         (KJS::KJS::HTMLDocFunction::tryCall):
821         (KJS::HTMLDocument::HTMLDocument):
822         (KJS::HTMLDocument::hasProperty):
823         (KJS::HTMLDocument::tryGet):
824         (KJS::KJS::HTMLDocument::putValue):
825         (KJS::KJS::HTMLElement::classInfo):
826         (KJS::HTMLElement::HTMLElement):
827         (KJS::KJS::HTMLElement::tryGet):
828         (KJS::KJS::HTMLElement::implementsCall):
829         (KJS::KJS::HTMLElement::call):
830         (KJS::KJS::HTMLElement::getValueProperty):
831         (KJS::KJS::HTMLElement::hasProperty):
832         (KJS::KJS::HTMLElement::toString):
833         (KJS::getForm):
834         (KJS::KJS::HTMLElement::pushEventHandlerScope):
835         (KJS::KJS::HTMLElementFunction::tryCall):
836         (KJS::KJS::HTMLElement::tryPut):
837         (KJS::HTMLElement::putValue):
838         (KJS::toHTMLElement):
839         (KJS::toHTMLTableCaptionElement):
840         (KJS::toHTMLTableSectionElement):
841         (KJS::HTMLCollection::HTMLCollection):
842         (KJS::HTMLCollection::~HTMLCollection):
843         (KJS::KJS::HTMLCollection::tryGet):
844         (KJS::KJS::HTMLCollection::tryCall):
845         (KJS::KJS::HTMLCollection::getNamedItems):
846         (KJS::KJS::HTMLCollectionProtoFunc::tryCall):
847         (KJS::HTMLSelectCollection::HTMLSelectCollection):
848         (KJS::KJS::HTMLSelectCollection::tryGet):
849         (KJS::KJS::HTMLSelectCollection::tryPut):
850         (KJS::OptionConstructorImp::OptionConstructorImp):
851         (KJS::OptionConstructorImp::construct):
852         (KJS::ImageConstructorImp::ImageConstructorImp):
853         (KJS::ImageConstructorImp::construct):
854         (KJS::Image::notifyFinished):
855         (KJS::Image::Image):
856         (KJS::KJS::Context2DFunction::tryCall):
857         (KJS::):
858         (KJS::colorRefFromValue):
859         (KJS::colorFromValue):
860         (KJS::Context2D::putValue):
861         (KJS::Context2D::Context2D):
862         (KJS::Context2D::mark):
863         (KJS::GradientFunction::tryCall):
864         (KJS::ImagePattern::tryGet):
865         (KJS::getHTMLCollection):
866         (KJS::getSelectHTMLCollection):
867         * khtml/ecma/kjs_html.h:
868         (KJS::HTMLDocument::):
869         (KJS::HTMLElement::):
870         (KJS::HTMLCollection::impl):
871         * khtml/ecma/kjs_navigator.cpp:
872         * khtml/ecma/kjs_proxy.cpp:
873         (KJSProxyImpl::evaluate):
874         (KJSProxyImpl::finishedWithEvent):
875         * khtml/ecma/kjs_proxy.h:
876         * khtml/ecma/kjs_range.cpp:
877         (KJS::DOMRange::DOMRange):
878         (KJS::DOMRange::~DOMRange):
879         (KJS::DOMRange::tryGet):
880         (KJS::DOMRange::getValueProperty):
881         (KJS::DOMRangeProtoFunc::tryCall):
882         (KJS::getDOMRange):
883         (KJS::RangeConstructor::tryGet):
884         (KJS::getRangeConstructor):
885         (KJS::toRange):
886         * khtml/ecma/kjs_range.h:
887         (KJS::DOMRange::impl):
888         * khtml/ecma/kjs_traversal.cpp:
889         (KJS::DOMNodeIterator::DOMNodeIterator):
890         (KJS::DOMNodeIterator::~DOMNodeIterator):
891         (KJS::DOMNodeIterator::getValueProperty):
892         (KJS::DOMNodeIteratorProtoFunc::tryCall):
893         (KJS::getDOMNodeIterator):
894         (KJS::DOMNodeFilter::DOMNodeFilter):
895         (KJS::DOMNodeFilter::~DOMNodeFilter):
896         (KJS::DOMNodeFilterProtoFunc::tryCall):
897         (KJS::getDOMNodeFilter):
898         (KJS::toNodeFilter):
899         (KJS::DOMTreeWalker::DOMTreeWalker):
900         (KJS::DOMTreeWalker::~DOMTreeWalker):
901         (KJS::DOMTreeWalker::getValueProperty):
902         (KJS::DOMTreeWalker::tryPut):
903         (KJS::DOMTreeWalkerProtoFunc::tryCall):
904         (KJS::getDOMTreeWalker):
905         (KJS::JSNodeFilterCondition::acceptNode):
906         * khtml/ecma/kjs_traversal.h:
907         (KJS::DOMNodeIterator::impl):
908         (KJS::DOMNodeFilter::impl):
909         (KJS::DOMTreeWalker::impl):
910         * khtml/ecma/kjs_views.cpp:
911         (KJS::DOMAbstractView::~DOMAbstractView):
912         (KJS::DOMAbstractView::tryGet):
913         (KJS::DOMAbstractViewFunc::tryCall):
914         (KJS::getDOMAbstractView):
915         (KJS::toAbstractView):
916         * khtml/ecma/kjs_views.h:
917         (KJS::DOMAbstractView::DOMAbstractView):
918         (KJS::DOMAbstractView::impl):
919         * khtml/ecma/kjs_window.cpp:
920         (KJS::Window::get):
921         (KJS::Window::hasProperty):
922         (KJS::Window::put):
923         (KJS::Window::setListener):
924         (KJS::Window::getListener):
925         (KJS::Window::setCurrentEvent):
926         (KJS::WindowFunc::tryCall):
927         (KJS::Location::put):
928         (KJS::LocationFunc::tryCall):
929         (KJS::Selection::get):
930         (KJS::SelectionFunc::tryCall):
931         * khtml/ecma/kjs_window.h:
932         * khtml/ecma/xmlhttprequest.cpp:
933         (KJS::XMLHttpRequestConstructorImp::XMLHttpRequestConstructorImp):
934         (KJS::XMLHttpRequestConstructorImp::~XMLHttpRequestConstructorImp):
935         (KJS::XMLHttpRequestConstructorImp::construct):
936         (KJS::XMLHttpRequest::getValueProperty):
937         (KJS::XMLHttpRequest::XMLHttpRequest):
938         (KJS::XMLHttpRequest::changeState):
939         (KJS::XMLHttpRequest::open):
940         (KJS::XMLHttpRequestProtoFunc::tryCall):
941         * khtml/ecma/xmlhttprequest.h:
942         * khtml/ecma/xmlserializer.cpp:
943         (KJS::XMLSerializerProtoFunc::tryCall):
944         * khtml/ecma/xmlserializer.h:
945         * kwq/DOMInternal.mm:
946         (-[WebScriptObject _initializeScriptDOMNodeImp]):
947         * kwq/DOMUtility.mm:
948         (KJS::ScriptInterpreter::createObjcInstanceForValue):
949
950 2005-05-11  David Hyatt  <hyatt@apple.com>
951
952         Improve the display of apple.com.  innerWidth and innerHeight refer to the size of the visible view and
953         so they do not need to do a layout in order to yield correct values from JS.  Removing this stops an
954         early layout and paint before the apple.com images are typically loaded.
955
956         This is an improvement of the fix for wired.com's FOUC.  For that bug I eliminated the need to ignore pending
957         stylesheets, but now I'm going further and just eliminating the layout all together.  This means that the old
958         updateLayout function can be reverted to how it was before the wired.com fix.
959         
960         Reviewed by john
961
962         * khtml/ecma/kjs_window.cpp:
963         (Window::get):
964         (Window::updateLayout):
965         * khtml/ecma/kjs_window.h:
966
967 2005-05-11  Maciej Stachowiak  <mjs@apple.com>
968
969         Reviewed by Kevin.
970
971         - split some more individual classes out of htmlediting.cpp
972         (CompositeEditcommand, AppendnodeCommand, ApplyStyleCommand)
973
974         Also moves StyleChange directly into ApplyStyleCommand
975         implementation file, it doesn't need to be in a header at all.
976         
977         * WebCore.pbproj/project.pbxproj:
978         * khtml/editing/append_node_command.cpp: Added.
979         * khtml/editing/append_node_command.h: Added.
980         * khtml/editing/apply_style_command.cpp: Added.
981         * khtml/editing/apply_style_command.h: Added.
982         * khtml/editing/composite_edit_command.cpp: Added.
983         * khtml/editing/composite_edit_command.h: Added.
984         * khtml/editing/edit_command.cpp: Minor clean-ups.
985         * khtml/editing/edit_command.h:
986         * khtml/editing/htmlediting.cpp:
987         * khtml/editing/htmlediting.h:
988
989 2005-05-11  Adele Peterson  <adele@apple.com>
990
991         Reviewed by Darin.
992
993         fix for <rdar://problem/4061979> crash in DOM::ElementImpl::setAttribute at www.nitto-kohki.co.jp
994
995         * khtml/html/html_imageimpl.cpp: (HTMLImageLoader::updateFromElement): added a nil check for the document
996         * khtml/xml/dom_nodeimpl.h: (DOM::NodeImpl::inDocument): added check for document in case the document has been destroyed before the node has been removed.  A lot of code already assumes that if inDocument returns true, a document exists.
997  
998         * layout-tests/fast/events/onload-re-entry.html: removed alert.
999         * layout-tests/fast/events/onload-re-entry-expected.txt: updated.
1000         * layout-tests/fast/dom/attr_dead_doc-expected.txt: Added.
1001         * layout-tests/fast/dom/attr_dead_doc.html: Added.
1002         * layout-tests/fast/dom/resources/apple.gif: Added.
1003         * layout-tests/fast/dom/resources/mozilla.gif: Added.
1004         * layout-tests/fast/dom/resources/top.html: Added.
1005
1006 2005-05-10  Maciej Stachowiak  <mjs@apple.com>
1007
1008         Reviewed by Kevin.
1009
1010         - start on splitting htmlediting.cpp into smaller files - pull
1011         EditCommand and EditCommandPtr out.
1012
1013         * WebCore.pbproj/project.pbxproj:
1014         * khtml/editing/edit_command.cpp: Added.
1015         * khtml/editing/edit_command.h: Added.
1016         * khtml/editing/htmlediting.cpp: Took EditCommand and EditCommandPtr out.
1017         * khtml/editing/htmlediting.h: Ditto.
1018
1019 2005-05-10  David Hyatt  <hyatt@apple.com>
1020
1021         Refactor the DOM so that the concept of class/style/id is no longer unique to HTML elements.  This paves the way
1022         for SVG and MathML elements to also support these capabilities.  In addition the concept of presentational
1023         attributes has also been factored out.
1024         
1025         Reviewed by mjs
1026
1027         * khtml/css/css_ruleimpl.cpp:
1028         (CSSStyleRuleImpl::setDeclaration):
1029         * khtml/css/cssstyleselector.cpp:
1030         (khtml::parseUASheet):
1031         (khtml::CSSStyleSelector::loadDefaultStyle):
1032         (khtml::CSSStyleSelector::initElementAndPseudoState):
1033         (khtml::CSSStyleSelector::canShareStyleWithElement):
1034         (khtml::CSSStyleSelector::locateSharedStyle):
1035         (khtml::CSSStyleSelector::styleForElement):
1036         (khtml::CSSStyleSelector::checkOneSelector):
1037         * khtml/css/cssstyleselector.h:
1038         * khtml/html/html_baseimpl.cpp:
1039         (HTMLBodyElementImpl::parseMappedAttribute):
1040         (HTMLFrameElementImpl::parseMappedAttribute):
1041         (HTMLFrameSetElementImpl::parseMappedAttribute):
1042         (HTMLIFrameElementImpl::parseMappedAttribute):
1043         * khtml/html/html_baseimpl.h:
1044         * khtml/html/html_blockimpl.cpp:
1045         (HTMLDivElementImpl::parseMappedAttribute):
1046         (HTMLHRElementImpl::parseMappedAttribute):
1047         (HTMLParagraphElementImpl::parseMappedAttribute):
1048         (HTMLMarqueeElementImpl::parseMappedAttribute):
1049         * khtml/html/html_blockimpl.h:
1050         * khtml/html/html_canvasimpl.cpp:
1051         (HTMLCanvasElementImpl::parseMappedAttribute):
1052         * khtml/html/html_canvasimpl.h:
1053         * khtml/html/html_elementimpl.cpp:
1054         (HTMLElementImpl::HTMLElementImpl):
1055         (HTMLElementImpl::~HTMLElementImpl):
1056         (HTMLElementImpl::mapToEntry):
1057         (HTMLElementImpl::parseMappedAttribute):
1058         (HTMLElementImpl::addHTMLAlignment):
1059         (HTMLElementImpl::setContentEditable):
1060         (HTMLElementImpl::toString):
1061         * khtml/html/html_elementimpl.h:
1062         * khtml/html/html_formimpl.cpp:
1063         (DOM::HTMLFormElementImpl::parseMappedAttribute):
1064         (DOM::HTMLGenericFormElementImpl::parseMappedAttribute):
1065         (DOM::HTMLButtonElementImpl::parseMappedAttribute):
1066         (DOM::HTMLInputElementImpl::setType):
1067         (DOM::HTMLInputElementImpl::parseMappedAttribute):
1068         (DOM::HTMLLabelElementImpl::parseMappedAttribute):
1069         (DOM::HTMLSelectElementImpl::parseMappedAttribute):
1070         (DOM::HTMLKeygenElementImpl::parseMappedAttribute):
1071         (DOM::HTMLOptGroupElementImpl::parseMappedAttribute):
1072         (DOM::HTMLOptionElementImpl::parseMappedAttribute):
1073         (DOM::HTMLTextAreaElementImpl::parseMappedAttribute):
1074         (DOM::HTMLIsIndexElementImpl::parseMappedAttribute):
1075         * khtml/html/html_formimpl.h:
1076         * khtml/html/html_headimpl.cpp:
1077         (HTMLBaseElementImpl::parseMappedAttribute):
1078         (HTMLLinkElementImpl::parseMappedAttribute):
1079         (HTMLMetaElementImpl::parseMappedAttribute):
1080         (HTMLStyleElementImpl::parseMappedAttribute):
1081         * khtml/html/html_headimpl.h:
1082         * khtml/html/html_imageimpl.cpp:
1083         (HTMLImageElementImpl::parseMappedAttribute):
1084         (HTMLMapElementImpl::parseMappedAttribute):
1085         (HTMLAreaElementImpl::parseMappedAttribute):
1086         * khtml/html/html_imageimpl.h:
1087         * khtml/html/html_inlineimpl.cpp:
1088         (DOM::HTMLAnchorElementImpl::parseMappedAttribute):
1089         (DOM::HTMLBRElementImpl::parseMappedAttribute):
1090         (DOM::HTMLFontElementImpl::parseMappedAttribute):
1091         * khtml/html/html_inlineimpl.h:
1092         * khtml/html/html_listimpl.cpp:
1093         (DOM::HTMLUListElementImpl::parseMappedAttribute):
1094         (DOM::HTMLOListElementImpl::parseMappedAttribute):
1095         (DOM::HTMLLIElementImpl::parseMappedAttribute):
1096         * khtml/html/html_listimpl.h:
1097         * khtml/html/html_objectimpl.cpp:
1098         (DOM::HTMLAppletElementImpl::parseMappedAttribute):
1099         (DOM::HTMLEmbedElementImpl::parseMappedAttribute):
1100         (DOM::HTMLObjectElementImpl::parseMappedAttribute):
1101         (DOM::HTMLParamElementImpl::parseMappedAttribute):
1102         * khtml/html/html_objectimpl.h:
1103         * khtml/html/html_tableimpl.cpp:
1104         (DOM::HTMLTableElementImpl::parseMappedAttribute):
1105         (DOM::HTMLTableElementImpl::additionalAttributeStyleDecl):
1106         (DOM::HTMLTableElementImpl::getSharedCellDecl):
1107         (DOM::HTMLTablePartElementImpl::parseMappedAttribute):
1108         (DOM::HTMLTableCellElementImpl::parseMappedAttribute):
1109         (DOM::HTMLTableColElementImpl::parseMappedAttribute):
1110         (DOM::HTMLTableCaptionElementImpl::parseMappedAttribute):
1111         * khtml/html/html_tableimpl.h:
1112         * khtml/html/htmltokenizer.h:
1113         (khtml::Token::addAttribute):
1114         * khtml/misc/htmlattrs.in:
1115         * khtml/misc/htmltags.in:
1116         * khtml/xml/dom_docimpl.cpp:
1117         (DocumentImpl::createAttribute):
1118         (DocumentImpl::createElementNS):
1119         (DocumentImpl::createHTMLElement):
1120         * khtml/xml/dom_elementimpl.cpp:
1121         (XMLElementImpl::cloneNode):
1122         (NamedAttrMapImpl::isMappedAttributeMap):
1123         (CSSMappedAttributeDeclarationImpl::~CSSMappedAttributeDeclarationImpl):
1124         (StyledElementImpl::getMappedAttributeDecl):
1125         (StyledElementImpl::setMappedAttributeDecl):
1126         (StyledElementImpl::removeMappedAttributeDecl):
1127         (StyledElementImpl::invalidateStyleAttribute):
1128         (StyledElementImpl::updateStyleAttributeIfNeeded):
1129         (MappedAttributeImpl::~MappedAttributeImpl):
1130         (MappedAttributeImpl::clone):
1131         (m_mappedAttributeCount):
1132         (NamedMappedAttrMapImpl::clearAttributes):
1133         (NamedMappedAttrMapImpl::isMappedAttributeMap):
1134         (NamedMappedAttrMapImpl::declCount):
1135         (NamedMappedAttrMapImpl::mapsEquivalent):
1136         (NamedMappedAttrMapImpl::parseClassAttribute):
1137         (StyledElementImpl::StyledElementImpl):
1138         (StyledElementImpl::~StyledElementImpl):
1139         (StyledElementImpl::createAttribute):
1140         (StyledElementImpl::createInlineStyleDecl):
1141         (StyledElementImpl::destroyInlineStyleDecl):
1142         (StyledElementImpl::attributeChanged):
1143         (StyledElementImpl::mapToEntry):
1144         (StyledElementImpl::parseMappedAttribute):
1145         (StyledElementImpl::createAttributeMap):
1146         (StyledElementImpl::getInlineStyleDecl):
1147         (StyledElementImpl::style):
1148         (StyledElementImpl::additionalAttributeStyleDecl):
1149         (StyledElementImpl::getClassList):
1150         (isHexDigit):
1151         (toHex):
1152         (StyledElementImpl::addCSSProperty):
1153         (StyledElementImpl::addCSSStringProperty):
1154         (StyledElementImpl::addCSSImageProperty):
1155         (StyledElementImpl::addCSSLength):
1156         (StyledElementImpl::addCSSColor):
1157         (StyledElementImpl::createMappedDecl):
1158         * khtml/xml/dom_elementimpl.h:
1159         (DOM::):
1160         (DOM::CSSMappedAttributeDeclarationImpl::CSSMappedAttributeDeclarationImpl):
1161         (DOM::CSSMappedAttributeDeclarationImpl::setMappedState):
1162         (DOM::MappedAttributeImpl::MappedAttributeImpl):
1163         (DOM::MappedAttributeImpl::decl):
1164         (DOM::MappedAttributeImpl::setDecl):
1165         (DOM::NamedMappedAttrMapImpl::getClassList):
1166         (DOM::NamedMappedAttrMapImpl::hasMappedAttributes):
1167         (DOM::NamedMappedAttrMapImpl::declRemoved):
1168         (DOM::NamedMappedAttrMapImpl::declAdded):
1169         (DOM::NamedMappedAttrMapImpl::attributeItem):
1170         (DOM::StyledElementImpl::isStyledElement):
1171         (DOM::StyledElementImpl::hasMappedAttributes):
1172         (DOM::StyledElementImpl::mappedAttributes):
1173         (DOM::StyledElementImpl::isMappedAttribute):
1174         (DOM::StyledElementImpl::inlineStyleDecl):
1175         * khtml/xml/dom_nodeimpl.h:
1176         (DOM::NodeImpl::isStyledElement):
1177
1178 2005-05-10  Darin Adler  <darin@apple.com>
1179
1180         Reviewed by Dave Hyatt.
1181         No new layout tests needed.
1182
1183         - remove all remaining uses of QMIN/QMAX and KMIN/KMAX.
1184
1185         * kwq/KWQDef.h: Remove the macros.
1186
1187         Remove all use of the macros (and fix a few compile errors by changing the types of
1188         some integer and floating point constants).
1189
1190         * khtml/css/cssparser.cpp:
1191         (CSSParser::parseColorFromValue):
1192         * khtml/css/cssstyleselector.cpp:
1193         (khtml::CSSStyleSelector::getComputedSizeFromSpecifiedSize):
1194         * khtml/html/html_elementimpl.cpp:
1195         (HTMLElementImpl::addHTMLColor):
1196         * khtml/html/html_formimpl.cpp:
1197         (DOM::HTMLSelectElementImpl::parseHTMLAttribute):
1198         * khtml/html/htmltokenizer.cpp:
1199         (khtml::HTMLTokenizer::parseComment):
1200         * khtml/rendering/render_block.cpp:
1201         (khtml::RenderBlock::nearestFloatBottom):
1202         (khtml::RenderBlock::calcMinMaxWidth):
1203         * khtml/rendering/render_flow.cpp:
1204         (RenderFlow::paintOutlineForLine):
1205         * khtml/rendering/render_form.cpp:
1206         (RenderLineEdit::calcMinMaxWidth):
1207         (RenderFieldset::layoutLegend):
1208         (RenderFileButton::calcMinMaxWidth):
1209         (RenderSelect::layout):
1210         (RenderTextArea::calcMinMaxWidth):
1211         * khtml/rendering/render_object.cpp:
1212         (RenderObject::drawBorder):
1213         * khtml/rendering/render_replaced.cpp:
1214         (RenderWidget::resizeWidget):
1215         * khtml/rendering/render_table.cpp:
1216         (RenderTableSection::layoutRows):
1217         * khtml/rendering/table_layout.cpp:
1218         (AutoTableLayout::recalcColumn):
1219         (AutoTableLayout::calcEffectiveWidth):
1220
1221 2005-05-10  Darin Adler  <darin@apple.com>
1222
1223         Reviewed by Chris Blumenberg.
1224
1225         - next pass of moving code from C++ DOM wrappers into the DOM impl. classes
1226           (this step adds still more member functions missing from the DOM impl. and
1227            changes some of the C++ and Objective-C DOM to call the new ones; also
1228            changes various places that use the C++ DOM to use the DOM impl. instead)
1229
1230         * khtml/css/css_computedstyle.cpp:
1231         (DOM::CSSComputedStyleDeclarationImpl::getPropertyCSSValue):
1232         * khtml/css/css_computedstyle.h:
1233         * khtml/css/css_stylesheetimpl.cpp:
1234         (CSSStyleSheetImpl::cssRules):
1235         * khtml/css/css_stylesheetimpl.h:
1236         * khtml/css/css_valueimpl.cpp:
1237         (DOM::CSSStyleDeclarationImpl::getPropertyCSSValue):
1238         (DOM::CSSStyleDeclarationImpl::getPropertyValue):
1239         (DOM::CSSStyleDeclarationImpl::getPropertyPriority):
1240         (DOM::CSSStyleDeclarationImpl::setProperty):
1241         (DOM::CSSStyleDeclarationImpl::removeProperty):
1242         (DOM::CSSMutableStyleDeclarationImpl::getPropertyValue):
1243         (DOM::CSSPrimitiveValueImpl::CSSPrimitiveValueImpl):
1244         (DOM::operator==):
1245         (DOM::CSSStyleDeclarationImpl::propertyID):
1246         * khtml/css/css_valueimpl.h:
1247         (DOM::CSSValueImpl::setCssText):
1248         (DOM::CSSPrimitiveValueImpl::getDashboardRegionValue):
1249         * khtml/dom/css_rule.cpp:
1250         * khtml/dom/css_rule.h:
1251         * khtml/dom/css_stylesheet.h:
1252         (DOM::CSSException::):
1253         * khtml/dom/css_value.cpp:
1254         (DOM::CSSStyleDeclaration::getPropertyValue):
1255         (DOM::CSSStyleDeclaration::getPropertyCSSValue):
1256         (DOM::CSSStyleDeclaration::removeProperty):
1257         (DOM::CSSStyleDeclaration::getPropertyPriority):
1258         (DOM::CSSStyleDeclaration::setProperty):
1259         * khtml/dom/css_value.h:
1260         * khtml/dom/dom2_events.cpp:
1261         (EventListener::handleEvent):
1262         * khtml/dom/dom2_events.h:
1263         * khtml/dom/dom2_traversal.h:
1264         * khtml/dom/dom_doc.cpp:
1265         (DOM::DOMImplementation::createHTMLDocument):
1266         (DOM::DOMImplementation::createCSSStyleSheet):
1267         (DOM::Document::doctype):
1268         (DOM::Document::createAttribute):
1269         (DOM::Document::createAttributeNS):
1270         (DOM::Document::queryCommandValue):
1271         (DOM::Document::handle):
1272         * khtml/dom/dom_doc.h:
1273         * khtml/dom/dom_element.cpp:
1274         (Attr::name):
1275         (Attr::value):
1276         (Element::getAttribute):
1277         (Element::setAttribute):
1278         (Element::removeAttribute):
1279         (Element::getAttributeNode):
1280         (Element::setAttributeNode):
1281         (Element::removeAttributeNode):
1282         (Element::getElementsByTagName):
1283         (Element::getElementsByTagNameNS):
1284         (Element::getAttributeNS):
1285         (Element::setAttributeNS):
1286         (Element::removeAttributeNS):
1287         (Element::getAttributeNodeNS):
1288         (Element::setAttributeNodeNS):
1289         (Element::hasAttribute):
1290         (Element::hasAttributeNS):
1291         (Element::style):
1292         * khtml/dom/dom_exception.h:
1293         * khtml/dom/dom_misc.cpp:
1294         (DOM::DomShared::deleteMe):
1295         * khtml/dom/dom_misc.h:
1296         (DOM::DomShared::deleteMe):
1297         * khtml/dom/dom_node.cpp:
1298         (NamedNodeMap::getNamedItemNS):
1299         (NamedNodeMap::setNamedItemNS):
1300         (NamedNodeMap::removeNamedItemNS):
1301         (Node::ownerDocument):
1302         (Node::hasAttributes):
1303         (Node::isSupported):
1304         (Node::addEventListener):
1305         (Node::removeEventListener):
1306         * khtml/dom/dom_node.h:
1307         * khtml/dom/html_document.cpp:
1308         (HTMLDocument::setTitle):
1309         (HTMLDocument::completeURL):
1310         (HTMLDocument::getElementsByName):
1311         * khtml/dom/html_element.cpp:
1312         (HTMLElement::setInnerHTML):
1313         (HTMLElement::setInnerText):
1314         (HTMLElement::setOuterHTML):
1315         (HTMLElement::setOuterText):
1316         * khtml/dom/html_form.cpp:
1317         (HTMLLabelElement::form):
1318         (HTMLSelectElement::setValue):
1319         (HTMLSelectElement::options):
1320         (HTMLOptionElement::setValue):
1321         * khtml/dom/html_inline.cpp:
1322         (HTMLAnchorElement::accessKey):
1323         (HTMLAnchorElement::setAccessKey):
1324         (HTMLAnchorElement::charset):
1325         (HTMLAnchorElement::setCharset):
1326         (HTMLAnchorElement::coords):
1327         (HTMLAnchorElement::setCoords):
1328         (HTMLAnchorElement::href):
1329         (HTMLAnchorElement::setHref):
1330         (HTMLAnchorElement::hreflang):
1331         (HTMLAnchorElement::setHreflang):
1332         (HTMLAnchorElement::name):
1333         (HTMLAnchorElement::setName):
1334         (HTMLAnchorElement::rel):
1335         (HTMLAnchorElement::setRel):
1336         (HTMLAnchorElement::rev):
1337         (HTMLAnchorElement::setRev):
1338         (HTMLAnchorElement::shape):
1339         (HTMLAnchorElement::setShape):
1340         (HTMLAnchorElement::tabIndex):
1341         (HTMLAnchorElement::setTabIndex):
1342         (HTMLAnchorElement::target):
1343         (HTMLAnchorElement::setTarget):
1344         (HTMLAnchorElement::type):
1345         (HTMLAnchorElement::setType):
1346         (HTMLAnchorElement::blur):
1347         (HTMLAnchorElement::focus):
1348         (HTMLBRElement::clear):
1349         (HTMLBRElement::setClear):
1350         (HTMLFontElement::color):
1351         (HTMLFontElement::setColor):
1352         (HTMLFontElement::face):
1353         (HTMLFontElement::setFace):
1354         (HTMLFontElement::size):
1355         (HTMLFontElement::setSize):
1356         (HTMLModElement::cite):
1357         (HTMLModElement::setCite):
1358         (HTMLModElement::dateTime):
1359         (HTMLModElement::setDateTime):
1360         (HTMLQuoteElement::cite):
1361         (HTMLQuoteElement::setCite):
1362         * khtml/dom/html_misc.cpp:
1363         (HTMLCollection::HTMLCollection):
1364         (HTMLCollection::base):
1365         (HTMLCollection::namedItems):
1366         * khtml/dom/html_misc.h:
1367         * khtml/editing/htmlediting.cpp:
1368         * khtml/editing/selection.cpp:
1369         * khtml/html/html_documentimpl.cpp:
1370         (DOM::HTMLDocumentImpl::determineParseMode):
1371         (DOM::HTMLDocumentImpl::doctype):
1372         * khtml/html/html_documentimpl.h:
1373         * khtml/html/html_elementimpl.cpp:
1374         (HTMLElementImpl::setInnerHTML):
1375         (HTMLElementImpl::setOuterHTML):
1376         (HTMLElementImpl::setInnerText):
1377         (HTMLElementImpl::setOuterText):
1378         (HTMLElementImpl::style):
1379         (HTMLElementImpl::idDOM):
1380         (HTMLElementImpl::setId):
1381         (HTMLElementImpl::title):
1382         (HTMLElementImpl::setTitle):
1383         (HTMLElementImpl::lang):
1384         (HTMLElementImpl::setLang):
1385         (HTMLElementImpl::dir):
1386         (HTMLElementImpl::setDir):
1387         (HTMLElementImpl::className):
1388         (HTMLElementImpl::setClassName):
1389         (HTMLElementImpl::children):
1390         (HTMLGenericElementImpl::HTMLGenericElementImpl):
1391         (HTMLGenericElementImpl::id):
1392         * khtml/html/html_elementimpl.h:
1393         (DOM::HTMLElementImpl::isGenericFormElement):
1394         * khtml/html/html_formimpl.cpp:
1395         (DOM::HTMLFormElementImpl::parseEnctype):
1396         (DOM::HTMLFormElementImpl::parseHTMLAttribute):
1397         (DOM::HTMLFormElementImpl::elements):
1398         (DOM::HTMLFormElementImpl::name):
1399         (DOM::HTMLFormElementImpl::setName):
1400         (DOM::HTMLFormElementImpl::acceptCharset):
1401         (DOM::HTMLFormElementImpl::setAcceptCharset):
1402         (DOM::HTMLFormElementImpl::action):
1403         (DOM::HTMLFormElementImpl::setAction):
1404         (DOM::HTMLFormElementImpl::setEnctype):
1405         (DOM::HTMLFormElementImpl::method):
1406         (DOM::HTMLFormElementImpl::setMethod):
1407         (DOM::HTMLFormElementImpl::target):
1408         (DOM::HTMLFormElementImpl::setTarget):
1409         (DOM::HTMLGenericFormElementImpl::HTMLGenericFormElementImpl):
1410         (DOM::HTMLGenericFormElementImpl::~HTMLGenericFormElementImpl):
1411         (DOM::HTMLGenericFormElementImpl::parseHTMLAttribute):
1412         (DOM::HTMLGenericFormElementImpl::name):
1413         (DOM::HTMLGenericFormElementImpl::setName):
1414         (DOM::HTMLGenericFormElementImpl::setOverrideName):
1415         (DOM::HTMLGenericFormElementImpl::setDisabled):
1416         (DOM::HTMLGenericFormElementImpl::setReadOnly):
1417         (DOM::HTMLGenericFormElementImpl::tabIndex):
1418         (DOM::HTMLGenericFormElementImpl::setTabIndex):
1419         (DOM::HTMLButtonElementImpl::accessKey):
1420         (DOM::HTMLButtonElementImpl::setAccessKey):
1421         (DOM::HTMLButtonElementImpl::value):
1422         (DOM::HTMLButtonElementImpl::setValue):
1423         (DOM::HTMLInputElementImpl::HTMLInputElementImpl):
1424         (DOM::HTMLInputElementImpl::parseHTMLAttribute):
1425         (DOM::HTMLInputElementImpl::defaultValue):
1426         (DOM::HTMLInputElementImpl::setDefaultValue):
1427         (DOM::HTMLInputElementImpl::defaultChecked):
1428         (DOM::HTMLInputElementImpl::setDefaultChecked):
1429         (DOM::HTMLInputElementImpl::accept):
1430         (DOM::HTMLInputElementImpl::setAccept):
1431         (DOM::HTMLInputElementImpl::accessKey):
1432         (DOM::HTMLInputElementImpl::setAccessKey):
1433         (DOM::HTMLInputElementImpl::align):
1434         (DOM::HTMLInputElementImpl::setAlign):
1435         (DOM::HTMLInputElementImpl::alt):
1436         (DOM::HTMLInputElementImpl::setAlt):
1437         (DOM::HTMLInputElementImpl::setMaxLength):
1438         (DOM::HTMLInputElementImpl::sizeDOM):
1439         (DOM::HTMLInputElementImpl::setSize):
1440         (DOM::HTMLInputElementImpl::src):
1441         (DOM::HTMLInputElementImpl::setSrc):
1442         (DOM::HTMLInputElementImpl::useMap):
1443         (DOM::HTMLInputElementImpl::setUseMap):
1444         (DOM::HTMLLabelElementImpl::form):
1445         (DOM::HTMLLabelElementImpl::accessKey):
1446         (DOM::HTMLLabelElementImpl::setAccessKey):
1447         (DOM::HTMLLabelElementImpl::htmlFor):
1448         (DOM::HTMLLabelElementImpl::setHtmlFor):
1449         (DOM::HTMLLegendElementImpl::accessKey):
1450         (DOM::HTMLLegendElementImpl::setAccessKey):
1451         (DOM::HTMLLegendElementImpl::align):
1452         (DOM::HTMLLegendElementImpl::setAlign):
1453         (DOM::HTMLSelectElementImpl::setValue):
1454         (DOM::HTMLSelectElementImpl::optionsHTMLCollection):
1455         (DOM::HTMLSelectElementImpl::setMultiple):
1456         (DOM::HTMLSelectElementImpl::setSize):
1457         (DOM::HTMLOptGroupElementImpl::label):
1458         (DOM::HTMLOptGroupElementImpl::setLabel):
1459         (DOM::HTMLOptionElementImpl::setText):
1460         (DOM::HTMLOptionElementImpl::setIndex):
1461         (DOM::HTMLOptionElementImpl::setValue):
1462         (DOM::HTMLOptionElementImpl::defaultSelected):
1463         (DOM::HTMLOptionElementImpl::setDefaultSelected):
1464         (DOM::HTMLOptionElementImpl::label):
1465         (DOM::HTMLOptionElementImpl::setLabel):
1466         (DOM::HTMLTextAreaElementImpl::accessKey):
1467         (DOM::HTMLTextAreaElementImpl::setAccessKey):
1468         (DOM::HTMLTextAreaElementImpl::setCols):
1469         (DOM::HTMLTextAreaElementImpl::setRows):
1470         (DOM::HTMLIsIndexElementImpl::HTMLIsIndexElementImpl):
1471         (DOM::HTMLIsIndexElementImpl::parseHTMLAttribute):
1472         (DOM::HTMLIsIndexElementImpl::prompt):
1473         (DOM::HTMLIsIndexElementImpl::setPrompt):
1474         * khtml/html/html_formimpl.h:
1475         * khtml/html/html_headimpl.cpp:
1476         (HTMLBaseElementImpl::setHref):
1477         (HTMLBaseElementImpl::setTarget):
1478         (HTMLLinkElementImpl::disabled):
1479         (HTMLLinkElementImpl::setDisabled):
1480         (HTMLLinkElementImpl::charset):
1481         (HTMLLinkElementImpl::setCharset):
1482         (HTMLLinkElementImpl::href):
1483         (HTMLLinkElementImpl::setHref):
1484         (HTMLLinkElementImpl::hreflang):
1485         (HTMLLinkElementImpl::setHreflang):
1486         (HTMLLinkElementImpl::media):
1487         (HTMLLinkElementImpl::setMedia):
1488         (HTMLLinkElementImpl::rel):
1489         (HTMLLinkElementImpl::setRel):
1490         (HTMLLinkElementImpl::rev):
1491         (HTMLLinkElementImpl::setRev):
1492         (HTMLLinkElementImpl::target):
1493         (HTMLLinkElementImpl::setTarget):
1494         (HTMLLinkElementImpl::type):
1495         (HTMLLinkElementImpl::setType):
1496         (HTMLMetaElementImpl::content):
1497         (HTMLMetaElementImpl::setContent):
1498         (HTMLMetaElementImpl::httpEquiv):
1499         (HTMLMetaElementImpl::setHttpEquiv):
1500         (HTMLMetaElementImpl::name):
1501         (HTMLMetaElementImpl::setName):
1502         (HTMLMetaElementImpl::scheme):
1503         (HTMLMetaElementImpl::setScheme):
1504         (HTMLScriptElementImpl::id):
1505         (HTMLScriptElementImpl::isURLAttribute):
1506         (HTMLScriptElementImpl::insertedIntoDocument):
1507         (HTMLScriptElementImpl::notifyFinished):
1508         (HTMLScriptElementImpl::text):
1509         (HTMLScriptElementImpl::setText):
1510         (HTMLScriptElementImpl::htmlFor):
1511         (HTMLScriptElementImpl::setHtmlFor):
1512         (HTMLScriptElementImpl::event):
1513         (HTMLScriptElementImpl::setEvent):
1514         (HTMLScriptElementImpl::charset):
1515         (HTMLScriptElementImpl::setCharset):
1516         (HTMLScriptElementImpl::defer):
1517         (HTMLScriptElementImpl::setDefer):
1518         (HTMLScriptElementImpl::src):
1519         (HTMLScriptElementImpl::setSrc):
1520         (HTMLScriptElementImpl::type):
1521         (HTMLScriptElementImpl::setType):
1522         (HTMLStyleElementImpl::disabled):
1523         (HTMLStyleElementImpl::setDisabled):
1524         (HTMLStyleElementImpl::media):
1525         (HTMLStyleElementImpl::setMedia):
1526         (HTMLStyleElementImpl::type):
1527         (HTMLStyleElementImpl::setType):
1528         (HTMLTitleElementImpl::insertedIntoDocument):
1529         (HTMLTitleElementImpl::childrenChanged):
1530         (HTMLTitleElementImpl::text):
1531         (HTMLTitleElementImpl::setText):
1532         * khtml/html/html_headimpl.h:
1533         * khtml/html/html_miscimpl.cpp:
1534         (DOM::HTMLBaseFontElementImpl::id):
1535         (DOM::HTMLBaseFontElementImpl::color):
1536         (DOM::HTMLBaseFontElementImpl::setColor):
1537         (DOM::HTMLBaseFontElementImpl::face):
1538         (DOM::HTMLBaseFontElementImpl::setFace):
1539         (DOM::HTMLBaseFontElementImpl::size):
1540         (DOM::HTMLBaseFontElementImpl::setSize):
1541         (DOM::HTMLCollectionImpl::HTMLCollectionImpl):
1542         (DOM::HTMLCollectionImpl::~HTMLCollectionImpl):
1543         (DOM::HTMLCollectionImpl::resetCollectionInfo):
1544         (DOM::HTMLCollectionImpl::traverseNextItem):
1545         (DOM::HTMLCollectionImpl::calcLength):
1546         (DOM::HTMLCollectionImpl::item):
1547         (DOM::HTMLCollectionImpl::namedItem):
1548         (DOM::HTMLCollectionImpl::updateNameCache):
1549         (DOM::HTMLCollectionImpl::namedItems):
1550         (DOM::HTMLCollectionImpl::nextNamedItem):
1551         (DOM::HTMLFormCollectionImpl::HTMLFormCollectionImpl):
1552         (DOM::HTMLFormCollectionImpl::calcLength):
1553         (DOM::HTMLFormCollectionImpl::item):
1554         (DOM::HTMLFormCollectionImpl::getNamedFormItem):
1555         (DOM::HTMLFormCollectionImpl::nextNamedItemInternal):
1556         (DOM::HTMLFormCollectionImpl::namedItem):
1557         (DOM::HTMLFormCollectionImpl::updateNameCache):
1558         * khtml/html/html_miscimpl.h:
1559         (DOM::HTMLCollectionImpl::base):
1560         * khtml/html/htmlparser.cpp:
1561         (KHTMLParser::parseToken):
1562         (KHTMLParser::insertNode):
1563         * khtml/html/htmltokenizer.cpp:
1564         (khtml::HTMLTokenizer::scriptExecution):
1565         * khtml/khtml_events.cpp:
1566         (khtml::MouseEvent::MouseEvent):
1567         (khtml::MouseEvent::offset):
1568         * khtml/khtml_events.h:
1569         (khtml::MouseEvent::innerNode):
1570         (khtml::MousePressEvent::MousePressEvent):
1571         (khtml::MouseDoubleClickEvent::MouseDoubleClickEvent):
1572         (khtml::MouseMoveEvent::MouseMoveEvent):
1573         (khtml::MouseReleaseEvent::MouseReleaseEvent):
1574         * khtml/khtml_part.cpp:
1575         (KHTMLPart::closeURL):
1576         (KHTMLPart::executeScript):
1577         (KHTMLPart::scheduleScript):
1578         (KHTMLPart::executeScheduledScript):
1579         (KHTMLPart::clear):
1580         (KHTMLPart::selectClosestWordFromMouseEvent):
1581         (KHTMLPart::handleMousePressEventDoubleClick):
1582         (KHTMLPart::handleMousePressEventTripleClick):
1583         (KHTMLPart::handleMousePressEventSingleClick):
1584         (KHTMLPart::khtmlMousePressEvent):
1585         (KHTMLPart::handleMouseMoveEventDrag):
1586         (KHTMLPart::handleMouseMoveEventOver):
1587         (KHTMLPart::handleMouseMoveEventSelection):
1588         (KHTMLPart::khtmlMouseReleaseEvent):
1589         (KHTMLPart::selectionHasStyle):
1590         (KHTMLPart::selectionStartHasStyle):
1591         * khtml/khtml_part.h:
1592         * khtml/khtmlpart_p.h:
1593         * khtml/khtmlview.cpp:
1594         (KHTMLViewPrivate::reset):
1595         (KHTMLView::viewportMousePressEvent):
1596         (KHTMLView::viewportMouseDoubleClickEvent):
1597         (KHTMLView::contentsContextMenuEvent):
1598         (KHTMLView::updateDragAndDrop):
1599         (KHTMLView::cancelDragAndDrop):
1600         (KHTMLView::performDragAndDrop):
1601         (KHTMLView::focusNextPrevNode):
1602         * kwq/DOM-CSS.mm:
1603         (-[DOMCSSStyleSheet cssRules]):
1604         (-[DOMCSSStyleDeclaration getPropertyValue:]):
1605         (-[DOMCSSStyleDeclaration getPropertyCSSValue:]):
1606         (-[DOMCSSStyleDeclaration removeProperty:]):
1607         (-[DOMCSSStyleDeclaration getPropertyPriority:]):
1608         (-[DOMCSSStyleDeclaration setProperty:::]):
1609         (-[DOMCSSValue setCssText:]):
1610         * kwq/DOMCSS.h:
1611         * kwq/DOMHTML.mm:
1612         (-[DOMHTMLElement setInnerHTML:]):
1613         (-[DOMHTMLElement setOuterHTML:]):
1614         (-[DOMHTMLElement setInnerText:]):
1615         (-[DOMHTMLElement setOuterText:]):
1616         (-[DOMHTMLSelectElement setLength:]):
1617         (-[DOMHTMLTableSectionElement insertRow:]):
1618         * kwq/DOMInternal.h:
1619         * kwq/DOMInternal.mm:
1620         (raiseDOMException):
1621         (-[WebScriptObject _initializeScriptDOMNodeImp]):
1622         * kwq/DOMUtility.mm:
1623         (KJS::ScriptInterpreter::createObjcInstanceForValue):
1624         * kwq/KWQAccObject.mm:
1625         (-[KWQAccObject accessibilityAttributeValue:]):
1626         * kwq/KWQKHTMLPart.h:
1627         * kwq/KWQKHTMLPart.mm:
1628         (KWQKHTMLPart::KWQKHTMLPart):
1629         (KWQKHTMLPart::advanceToNextMisspelling):
1630         (KWQKHTMLPart::scrollOverflow):
1631         (KWQKHTMLPart::paint):
1632         (KWQKHTMLPart::openURLFromPageCache):
1633         (KWQKHTMLPart::khtmlMousePressEvent):
1634         (KWQKHTMLPart::passWidgetMouseDownEventToWidget):
1635         (KWQKHTMLPart::dispatchDragSrcEvent):
1636         (KWQKHTMLPart::eventMayStartDrag):
1637         (KWQKHTMLPart::khtmlMouseMoveEvent):
1638         (KWQKHTMLPart::dragSourceEndedAt):
1639         (KWQKHTMLPart::mouseDown):
1640         (KWQKHTMLPart::sendContextMenuEvent):
1641         (listParent):
1642         (isTextFirstInListItem):
1643         (KWQKHTMLPart::attributedString):
1644         (KWQKHTMLPart::snapshotDragImage):
1645         (KWQKHTMLPart::mousePressNode):
1646         * kwq/WebCoreBridge.mm:
1647         (updateRenderingForBindings):
1648         (-[WebCoreBridge _documentTypeString]):
1649
1650 2005-05-10  Maciej Stachowiak  <mjs@apple.com>
1651
1652         Reviewed by John.
1653
1654         - rename hasAnchor method to isLink
1655
1656         * khtml/css/cssstyleselector.cpp:
1657         (khtml::checkPseudoState):
1658         (khtml::CSSStyleSelector::canShareStyleWithElement):
1659         (khtml::CSSStyleSelector::styleForElement):
1660         (khtml::CSSStyleSelector::checkOneSelector):
1661         * khtml/editing/htmlediting.cpp:
1662         (khtml::isSpecialElement):
1663         * khtml/html/html_imageimpl.cpp:
1664         (HTMLImageElementImpl::parseHTMLAttribute):
1665         * khtml/html/html_inlineimpl.cpp:
1666         (DOM::HTMLAnchorElementImpl::isFocusable):
1667         (DOM::HTMLAnchorElementImpl::defaultEventHandler):
1668         (DOM::HTMLAnchorElementImpl::parseHTMLAttribute):
1669         * khtml/rendering/render_flexbox.cpp:
1670         (khtml::RenderFlexibleBox::layoutVerticalBox):
1671         * khtml/rendering/render_layer.cpp:
1672         (RenderLayer::hitTest):
1673         * khtml/rendering/render_object.cpp:
1674         (RenderObject::information):
1675         * khtml/xml/dom_nodeimpl.cpp:
1676         (NodeImpl::NodeImpl):
1677         * khtml/xml/dom_nodeimpl.h:
1678         (DOM::NodeImpl::isLink):
1679         * kwq/KWQAccObject.mm:
1680         (-[KWQAccObject anchorElement]):
1681         (-[KWQAccObject addChildrenToArray:]):
1682         (-[KWQAccObject role]):
1683         (-[KWQAccObject title]):
1684         (-[KWQAccObject accessibilityIsIgnored]):
1685         (-[KWQAccObject accessibilityAttributeNames]):
1686         (-[KWQAccObject accessibilityAttributeValue:]):
1687         * kwq/KWQKHTMLPart.mm:
1688         (KWQKHTMLPart::khtmlMouseMoveEvent):
1689
1690 2005-05-09  Maciej Stachowiak  <mjs@apple.com>
1691
1692         Reviewed by John.
1693
1694         - remove init hint argument from VisiblePosition 
1695
1696         * khtml/editing/visible_position.cpp:
1697         (khtml::VisiblePosition::VisiblePosition):
1698         (khtml::VisiblePosition::init):
1699         * khtml/editing/visible_position.h:
1700         * khtml/editing/visible_units.cpp:
1701         (khtml::previousBoundary):
1702         (khtml::nextBoundary):
1703         * khtml/xml/dom_docimpl.cpp:
1704         (DocumentImpl::updateSelection):
1705         * kwq/KWQKHTMLPart.mm:
1706         (KWQKHTMLPart::styleForSelectionStart):
1707         * kwq/WebCoreBridge.mm:
1708         (-[WebCoreBridge setSelectedDOMRange:affinity:closeTyping:]):
1709
1710 2005-05-10  Darin Adler  <darin@apple.com>
1711
1712         Reviewed by David Harrison.
1713
1714         - next pass of moving code from C++ DOM wrappers into the DOM impl. classes
1715           (this step adds more member functions missing from the DOM impl. and
1716            changes some of the Objective-C DOM to call the new ones; also changes some
1717            parameter types in the DOM impl.)
1718
1719         * khtml/dom/dom2_events.cpp:
1720         (UIEvent::initUIEvent):
1721         (MouseEvent::initMouseEvent):
1722         (MutationEvent::initMutationEvent):
1723         (KeyboardEvent::initKeyboardEvent):
1724         * khtml/dom/dom_doc.cpp:
1725         (DOM::DOMImplementation::createDocument):
1726         (DOM::Document::getElementsByTagName):
1727         (DOM::Document::getElementsByTagNameNS):
1728         * khtml/dom/dom_element.cpp:
1729         (Element::removeAttributeNode):
1730         (Element::getElementsByTagName):
1731         (Element::getElementsByTagNameNS):
1732         (Element::setAttributeNodeNS):
1733         * khtml/dom/dom_node.cpp:
1734         (NamedNodeMap::setNamedItemNS):
1735         (NamedNodeMap::removeNamedItemNS):
1736         * khtml/ecma/kjs_binding.cpp:
1737         * khtml/ecma/kjs_events.cpp:
1738         (ClipboardProtoFunc::tryCall):
1739         * khtml/editing/jsediting.cpp:
1740         * khtml/khtml_part.cpp:
1741         (KHTMLPart::applyEditingStyleToBodyElement):
1742         (KHTMLPart::removeEditingStyleFromBodyElement):
1743         * khtml/khtmlview.cpp:
1744         (KHTMLView::viewportMousePressEvent):
1745         (KHTMLView::viewportMouseDoubleClickEvent):
1746         (KHTMLView::viewportMouseMoveEvent):
1747         (KHTMLView::viewportMouseReleaseEvent):
1748         (KHTMLView::updateDragAndDrop):
1749         (KHTMLView::dispatchMouseEvent):
1750         * khtml/misc/shared.h:
1751         (khtml::SharedPtr::reset):
1752         (khtml::::operator):
1753         (khtml::static_pointer_cast):
1754         (khtml::const_pointer_cast):
1755         * khtml/xml/dom2_eventsimpl.cpp:
1756         (UIEventImpl::initUIEvent):
1757         (UIEventImpl::keyCode):
1758         (UIEventImpl::charCode):
1759         (UIEventImpl::layerX):
1760         (UIEventImpl::layerY):
1761         (UIEventImpl::pageX):
1762         (UIEventImpl::pageY):
1763         (UIEventImpl::which):
1764         (MouseRelatedEventImpl::pageX):
1765         (MouseRelatedEventImpl::pageY):
1766         (MouseEventImpl::initMouseEvent):
1767         (MouseEventImpl::which):
1768         (KeyboardEventImpl::initKeyboardEvent):
1769         (KeyboardEventImpl::which):
1770         (MutationEventImpl::MutationEventImpl):
1771         (MutationEventImpl::initMutationEvent):
1772         * khtml/xml/dom2_eventsimpl.h:
1773         (DOM::MutationEventImpl::relatedNode):
1774         * khtml/xml/dom2_rangeimpl.h:
1775         * khtml/xml/dom2_traversalimpl.cpp:
1776         (DOM::NodeFilterImpl::acceptNode):
1777         * khtml/xml/dom2_traversalimpl.h:
1778         * khtml/xml/dom_docimpl.cpp:
1779         (DOMImplementationImpl::createDocument):
1780         (DOMImplementationImpl::createCSSStyleSheet):
1781         (DOMImplementationImpl::createHTMLDocument):
1782         (DocumentImpl::createAttribute):
1783         (DocumentImpl::createHTMLElement):
1784         (DocumentImpl::getOverrideStyle):
1785         (DocumentImpl::defaultEventHandler):
1786         (DocumentImpl::completeURL):
1787         (DocumentImpl::topDocument):
1788         (DocumentImpl::createAttributeNS):
1789         (DocumentImpl::images):
1790         (DocumentImpl::applets):
1791         (DocumentImpl::embeds):
1792         (DocumentImpl::objects):
1793         (DocumentImpl::links):
1794         (DocumentImpl::forms):
1795         (DocumentImpl::anchors):
1796         (DocumentImpl::all):
1797         (DocumentImpl::nameableItems):
1798         (DocumentImpl::getElementsByName):
1799         * khtml/xml/dom_docimpl.h:
1800         (DOM::DocumentImpl::realDocType):
1801         (DOM::DocumentImpl::createAttribute):
1802         * khtml/xml/dom_elementimpl.cpp:
1803         (AttrImpl::nodeName):
1804         (AttrImpl::nodeValue):
1805         (AttrImpl::name):
1806         (AttrImpl::value):
1807         (ElementImpl::attributes):
1808         (ElementImpl::isURLAttribute):
1809         (ElementImpl::setAttributeNode):
1810         (ElementImpl::removeAttributeNode):
1811         (ElementImpl::setAttributeNS):
1812         (ElementImpl::removeAttributeNS):
1813         (ElementImpl::getAttributeNodeNS):
1814         (ElementImpl::hasAttributeNS):
1815         (ElementImpl::style):
1816         (XMLElementImpl::cloneNode):
1817         (NamedAttrMapImpl::setNamedItem):
1818         (NamedAttrMapImpl::removeNamedItem):
1819         * khtml/xml/dom_elementimpl.h:
1820         (DOM::ElementImpl::hasAttribute):
1821         (DOM::ElementImpl::getAttribute):
1822         (DOM::ElementImpl::setAttribute):
1823         (DOM::ElementImpl::removeAttribute):
1824         (DOM::ElementImpl::getAttributeNode):
1825         (DOM::ElementImpl::setAttributeNodeNS):
1826         * khtml/xml/dom_nodeimpl.cpp:
1827         (NodeImpl::handleLocalEvents):
1828         (NodeImpl::isAncestor):
1829         (NodeImpl::addEventListener):
1830         (NodeImpl::removeEventListener):
1831         (NodeImpl::getElementsByTagNameNS):
1832         (NodeImpl::isSupported):
1833         (NodeImpl::ownerDocument):
1834         (NodeImpl::hasAttributes):
1835         (NodeImpl::attributes):
1836         (ContainerNodeImpl::removeChildren):
1837         (NamedNodeMapImpl::~NamedNodeMapImpl):
1838         (NamedNodeMapImpl::getNamedItemNS):
1839         (NamedNodeMapImpl::removeNamedItemNS):
1840         * khtml/xml/dom_nodeimpl.h:
1841         (DOM::NodeImpl::getElementsByTagName):
1842         (DOM::NamedNodeMapImpl::NamedNodeMapImpl):
1843         (DOM::NamedNodeMapImpl::getNamedItem):
1844         (DOM::NamedNodeMapImpl::removeNamedItem):
1845         (DOM::NamedNodeMapImpl::setNamedItemNS):
1846         (DOM::NamedNodeMapImpl::isReadOnly):
1847         * khtml/xml/dom_textimpl.h:
1848         * khtml/xml/dom_xmlimpl.h:
1849         * kwq/DOM.mm:
1850         (-[DOMNode isSupported::]):
1851         (-[DOMNode namespaceURI]):
1852         (-[DOMNode hasAttributes]):
1853         (-[DOMNamedNodeMap getNamedItem:]):
1854         (-[DOMNamedNodeMap setNamedItem:]):
1855         (-[DOMNamedNodeMap removeNamedItem:]):
1856         (-[DOMNamedNodeMap getNamedItemNS::]):
1857         (-[DOMNamedNodeMap setNamedItemNS:]):
1858         (-[DOMNamedNodeMap removeNamedItemNS::]):
1859         (-[DOMImplementation createDocument:::]):
1860         (-[DOMImplementation createCSSStyleSheet::]):
1861         (-[DOMDocument createAttribute:]):
1862         (-[DOMDocument getElementsByTagName:]):
1863         (-[DOMDocument createAttributeNS::]):
1864         (-[DOMDocument getElementsByTagNameNS::]):
1865         (-[DOMElement setAttribute::]):
1866         (-[DOMElement removeAttribute:]):
1867         (-[DOMElement getAttributeNode:]):
1868         (-[DOMElement setAttributeNode:]):
1869         (-[DOMElement removeAttributeNode:]):
1870         (-[DOMElement getElementsByTagName:]):
1871         (-[DOMElement getAttributeNS::]):
1872         (-[DOMElement setAttributeNS:::]):
1873         (-[DOMElement removeAttributeNS::]):
1874         (-[DOMElement getAttributeNodeNS::]):
1875         (-[DOMElement setAttributeNodeNS:]):
1876         (-[DOMElement getElementsByTagNameNS::]):
1877         (-[DOMElement hasAttribute:]):
1878         (-[DOMElement hasAttributeNS::]):
1879         (-[DOMElement style]):
1880         (-[DOMDocumentType _documentTypeImpl]):
1881         (ObjCNodeFilterCondition::acceptNode):
1882         * kwq/DOMEvents.mm:
1883         (-[DOMMutationEvent relatedNode]):
1884         * kwq/KWQClipboard.h:
1885         * kwq/KWQClipboard.mm:
1886         (KWQClipboard::KWQClipboard):
1887         (KWQClipboard::setDragImage):
1888         (KWQClipboard::dragImageElement):
1889         (KWQClipboard::setDragImageElement):
1890         (KWQClipboard::dragNSImage):
1891         * kwq/KWQKHTMLPart.mm:
1892         (KWQKHTMLPart::khtmlMouseMoveEvent):
1893         (KWQKHTMLPart::passSubframeEventToSubframe):
1894         (KWQKHTMLPart::sendContextMenuEvent):
1895
1896 2005-05-10  Darin Adler  <darin@apple.com>
1897
1898         Reviewed by David Harrison.
1899
1900         - first pass of moving code from C++ DOM wrappers into the DOM impl. classes
1901           (this step mostly adds member functions missing from the DOM impl.; later steps
1902            will change the C++, JavaScript, and ObjC wrappers to call these functions)
1903
1904         * khtml/css/parser.y:
1905         * khtml/css/css_ruleimpl.cpp:
1906         (CSSRuleListImpl::CSSRuleListImpl):
1907         * khtml/css/css_ruleimpl.h:
1908         (DOM::CSSRuleListImpl::CSSRuleListImpl):
1909         * khtml/html/html_baseimpl.cpp:
1910         (HTMLBodyElementImpl::aLink):
1911         (HTMLBodyElementImpl::setALink):
1912         (HTMLBodyElementImpl::background):
1913         (HTMLBodyElementImpl::setBackground):
1914         (HTMLBodyElementImpl::bgColor):
1915         (HTMLBodyElementImpl::setBgColor):
1916         (HTMLBodyElementImpl::link):
1917         (HTMLBodyElementImpl::setLink):
1918         (HTMLBodyElementImpl::text):
1919         (HTMLBodyElementImpl::setText):
1920         (HTMLBodyElementImpl::vLink):
1921         (HTMLBodyElementImpl::setVLink):
1922         (HTMLFrameElementImpl::HTMLFrameElementImpl):
1923         (HTMLFrameElementImpl::updateForNewURL):
1924         (HTMLFrameElementImpl::openURL):
1925         (HTMLFrameElementImpl::parseHTMLAttribute):
1926         (HTMLFrameElementImpl::rendererIsNeeded):
1927         (HTMLFrameElementImpl::attach):
1928         (HTMLFrameElementImpl::detach):
1929         (HTMLFrameElementImpl::setLocation):
1930         (HTMLFrameElementImpl::contentPart):
1931         (HTMLFrameElementImpl::frameBorder):
1932         (HTMLFrameElementImpl::setFrameBorder):
1933         (HTMLFrameElementImpl::longDesc):
1934         (HTMLFrameElementImpl::setLongDesc):
1935         (HTMLFrameElementImpl::marginHeight):
1936         (HTMLFrameElementImpl::setMarginHeight):
1937         (HTMLFrameElementImpl::marginWidth):
1938         (HTMLFrameElementImpl::setMarginWidth):
1939         (HTMLFrameElementImpl::name):
1940         (HTMLFrameElementImpl::setName):
1941         (HTMLFrameElementImpl::setNoResize):
1942         (HTMLFrameElementImpl::scrolling):
1943         (HTMLFrameElementImpl::setScrolling):
1944         (HTMLFrameElementImpl::src):
1945         (HTMLFrameElementImpl::setSrc):
1946         (HTMLFrameSetElementImpl::parseHTMLAttribute):
1947         (HTMLFrameSetElementImpl::cols):
1948         (HTMLFrameSetElementImpl::setCols):
1949         (HTMLFrameSetElementImpl::rows):
1950         (HTMLFrameSetElementImpl::setRows):
1951         (HTMLHeadElementImpl::profile):
1952         (HTMLHeadElementImpl::setProfile):
1953         (HTMLHtmlElementImpl::version):
1954         (HTMLHtmlElementImpl::setVersion):
1955         (HTMLIFrameElementImpl::HTMLIFrameElementImpl):
1956         (HTMLIFrameElementImpl::rendererIsNeeded):
1957         (HTMLIFrameElementImpl::attach):
1958         (HTMLIFrameElementImpl::isURLAttribute):
1959         (HTMLIFrameElementImpl::align):
1960         (HTMLIFrameElementImpl::setAlign):
1961         (HTMLIFrameElementImpl::height):
1962         (HTMLIFrameElementImpl::setHeight):
1963         (HTMLIFrameElementImpl::src):
1964         (HTMLIFrameElementImpl::width):
1965         (HTMLIFrameElementImpl::setWidth):
1966         * khtml/html/html_baseimpl.h:
1967         (DOM::HTMLFrameElementImpl::noResize):
1968         (DOM::HTMLFrameElementImpl::scrollingMode):
1969         (DOM::HTMLFrameElementImpl::getMarginWidth):
1970         (DOM::HTMLFrameElementImpl::getMarginHeight):
1971         * khtml/html/html_blockimpl.cpp:
1972         (HTMLBlockquoteElementImpl::cite):
1973         (HTMLBlockquoteElementImpl::setCite):
1974         (HTMLDivElementImpl::align):
1975         (HTMLDivElementImpl::setAlign):
1976         (HTMLHRElementImpl::align):
1977         (HTMLHRElementImpl::setAlign):
1978         (HTMLHRElementImpl::noShade):
1979         (HTMLHRElementImpl::setNoShade):
1980         (HTMLHRElementImpl::size):
1981         (HTMLHRElementImpl::setSize):
1982         (HTMLHRElementImpl::width):
1983         (HTMLHRElementImpl::setWidth):
1984         (HTMLHeadingElementImpl::align):
1985         (HTMLHeadingElementImpl::setAlign):
1986         (HTMLParagraphElementImpl::align):
1987         (HTMLParagraphElementImpl::setAlign):
1988         (HTMLPreElementImpl::width):
1989         (HTMLPreElementImpl::setWidth):
1990         * khtml/html/html_blockimpl.h:
1991         * khtml/html/html_imageimpl.cpp:
1992         (HTMLImageElementImpl::name):
1993         (HTMLImageElementImpl::setName):
1994         (HTMLImageElementImpl::align):
1995         (HTMLImageElementImpl::setAlign):
1996         (HTMLImageElementImpl::alt):
1997         (HTMLImageElementImpl::setAlt):
1998         (HTMLImageElementImpl::border):
1999         (HTMLImageElementImpl::setBorder):
2000         (HTMLImageElementImpl::setHeight):
2001         (HTMLImageElementImpl::hspace):
2002         (HTMLImageElementImpl::setHspace):
2003         (HTMLImageElementImpl::isMap):
2004         (HTMLImageElementImpl::setIsMap):
2005         (HTMLImageElementImpl::longDesc):
2006         (HTMLImageElementImpl::setLongDesc):
2007         (HTMLImageElementImpl::src):
2008         (HTMLImageElementImpl::setSrc):
2009         (HTMLImageElementImpl::useMap):
2010         (HTMLImageElementImpl::setUseMap):
2011         (HTMLImageElementImpl::vspace):
2012         (HTMLImageElementImpl::setVspace):
2013         (HTMLImageElementImpl::setWidth):
2014         (HTMLImageElementImpl::x):
2015         (HTMLImageElementImpl::y):
2016         (HTMLMapElementImpl::parseHTMLAttribute):
2017         (HTMLMapElementImpl::areas):
2018         (HTMLMapElementImpl::name):
2019         (HTMLMapElementImpl::setName):
2020         (HTMLAreaElementImpl::HTMLAreaElementImpl):
2021         (HTMLAreaElementImpl::parseHTMLAttribute):
2022         (HTMLAreaElementImpl::getRegion):
2023         (HTMLAreaElementImpl::accessKey):
2024         (HTMLAreaElementImpl::setAccessKey):
2025         (HTMLAreaElementImpl::alt):
2026         (HTMLAreaElementImpl::setAlt):
2027         (HTMLAreaElementImpl::coords):
2028         (HTMLAreaElementImpl::setCoords):
2029         (HTMLAreaElementImpl::href):
2030         (HTMLAreaElementImpl::setHref):
2031         (HTMLAreaElementImpl::noHref):
2032         (HTMLAreaElementImpl::setNoHref):
2033         (HTMLAreaElementImpl::shape):
2034         (HTMLAreaElementImpl::setShape):
2035         (HTMLAreaElementImpl::tabIndex):
2036         (HTMLAreaElementImpl::setTabIndex):
2037         (HTMLAreaElementImpl::target):
2038         (HTMLAreaElementImpl::setTarget):
2039         * khtml/html/html_imageimpl.h:
2040         (DOM::HTMLImageElementImpl::pixmap):
2041         (DOM::HTMLAreaElementImpl::isDefault):
2042         (DOM::HTMLMapElementImpl::getName):
2043         * khtml/html/html_inlineimpl.cpp:
2044         (DOM::HTMLAnchorElementImpl::accessKey):
2045         (DOM::HTMLAnchorElementImpl::setAccessKey):
2046         (DOM::HTMLAnchorElementImpl::charset):
2047         (DOM::HTMLAnchorElementImpl::setCharset):
2048         (DOM::HTMLAnchorElementImpl::coords):
2049         (DOM::HTMLAnchorElementImpl::setCoords):
2050         (DOM::HTMLAnchorElementImpl::href):
2051         (DOM::HTMLAnchorElementImpl::setHref):
2052         (DOM::HTMLAnchorElementImpl::hreflang):
2053         (DOM::HTMLAnchorElementImpl::setHreflang):
2054         (DOM::HTMLAnchorElementImpl::name):
2055         (DOM::HTMLAnchorElementImpl::setName):
2056         (DOM::HTMLAnchorElementImpl::rel):
2057         (DOM::HTMLAnchorElementImpl::setRel):
2058         (DOM::HTMLAnchorElementImpl::rev):
2059         (DOM::HTMLAnchorElementImpl::setRev):
2060         (DOM::HTMLAnchorElementImpl::shape):
2061         (DOM::HTMLAnchorElementImpl::setShape):
2062         (DOM::HTMLAnchorElementImpl::tabIndex):
2063         (DOM::HTMLAnchorElementImpl::setTabIndex):
2064         (DOM::HTMLAnchorElementImpl::target):
2065         (DOM::HTMLAnchorElementImpl::setTarget):
2066         (DOM::HTMLAnchorElementImpl::type):
2067         (DOM::HTMLAnchorElementImpl::setType):
2068         (DOM::HTMLAnchorElementImpl::blur):
2069         (DOM::HTMLAnchorElementImpl::focus):
2070         (DOM::HTMLBRElementImpl::clear):
2071         (DOM::HTMLBRElementImpl::setClear):
2072         (DOM::HTMLFontElementImpl::parseHTMLAttribute):
2073         (DOM::HTMLFontElementImpl::color):
2074         (DOM::HTMLFontElementImpl::setColor):
2075         (DOM::HTMLFontElementImpl::face):
2076         (DOM::HTMLFontElementImpl::setFace):
2077         (DOM::HTMLFontElementImpl::size):
2078         (DOM::HTMLFontElementImpl::setSize):
2079         (DOM::HTMLModElementImpl::HTMLModElementImpl):
2080         (DOM::HTMLModElementImpl::cite):
2081         (DOM::HTMLModElementImpl::setCite):
2082         (DOM::HTMLModElementImpl::dateTime):
2083         (DOM::HTMLModElementImpl::setDateTime):
2084         (DOM::HTMLQuoteElementImpl::HTMLQuoteElementImpl):
2085         (DOM::HTMLQuoteElementImpl::id):
2086         (DOM::HTMLQuoteElementImpl::cite):
2087         (DOM::HTMLQuoteElementImpl::setCite):
2088         * khtml/html/html_inlineimpl.h:
2089         * khtml/html/html_listimpl.cpp:
2090         (DOM::HTMLUListElementImpl::compact):
2091         (DOM::HTMLUListElementImpl::setCompact):
2092         (DOM::HTMLUListElementImpl::type):
2093         (DOM::HTMLUListElementImpl::setType):
2094         (DOM::HTMLDirectoryElementImpl::compact):
2095         (DOM::HTMLDirectoryElementImpl::setCompact):
2096         (DOM::HTMLMenuElementImpl::compact):
2097         (DOM::HTMLMenuElementImpl::setCompact):
2098         (DOM::HTMLOListElementImpl::compact):
2099         (DOM::HTMLOListElementImpl::setCompact):
2100         (DOM::HTMLOListElementImpl::setStart):
2101         (DOM::HTMLOListElementImpl::type):
2102         (DOM::HTMLOListElementImpl::setType):
2103         (DOM::HTMLLIElementImpl::type):
2104         (DOM::HTMLLIElementImpl::setType):
2105         (DOM::HTMLLIElementImpl::value):
2106         (DOM::HTMLLIElementImpl::setValue):
2107         (DOM::HTMLDListElementImpl::compact):
2108         (DOM::HTMLDListElementImpl::setCompact):
2109         * khtml/html/html_listimpl.h:
2110         (DOM::HTMLUListElementImpl::start):
2111         (DOM::HTMLDirectoryElementImpl::HTMLDirectoryElementImpl):
2112         (DOM::HTMLMenuElementImpl::HTMLMenuElementImpl):
2113         (DOM::HTMLOListElementImpl::HTMLOListElementImpl):
2114         (DOM::HTMLOListElementImpl::start):
2115         * khtml/html/html_objectimpl.cpp:
2116         (DOM::HTMLAppletElementImpl::align):
2117         (DOM::HTMLAppletElementImpl::setAlign):
2118         (DOM::HTMLAppletElementImpl::alt):
2119         (DOM::HTMLAppletElementImpl::setAlt):
2120         (DOM::HTMLAppletElementImpl::archive):
2121         (DOM::HTMLAppletElementImpl::setArchive):
2122         (DOM::HTMLAppletElementImpl::code):
2123         (DOM::HTMLAppletElementImpl::setCode):
2124         (DOM::HTMLAppletElementImpl::codeBase):
2125         (DOM::HTMLAppletElementImpl::setCodeBase):
2126         (DOM::HTMLAppletElementImpl::height):
2127         (DOM::HTMLAppletElementImpl::setHeight):
2128         (DOM::HTMLAppletElementImpl::hspace):
2129         (DOM::HTMLAppletElementImpl::setHspace):
2130         (DOM::HTMLAppletElementImpl::name):
2131         (DOM::HTMLAppletElementImpl::setName):
2132         (DOM::HTMLAppletElementImpl::object):
2133         (DOM::HTMLAppletElementImpl::setObject):
2134         (DOM::HTMLAppletElementImpl::vspace):
2135         (DOM::HTMLAppletElementImpl::setVspace):
2136         (DOM::HTMLAppletElementImpl::width):
2137         (DOM::HTMLAppletElementImpl::setWidth):
2138         (DOM::HTMLObjectElementImpl::code):
2139         (DOM::HTMLObjectElementImpl::setCode):
2140         (DOM::HTMLObjectElementImpl::align):
2141         (DOM::HTMLObjectElementImpl::setAlign):
2142         (DOM::HTMLObjectElementImpl::archive):
2143         (DOM::HTMLObjectElementImpl::setArchive):
2144         (DOM::HTMLObjectElementImpl::border):
2145         (DOM::HTMLObjectElementImpl::setBorder):
2146         (DOM::HTMLObjectElementImpl::codeBase):
2147         (DOM::HTMLObjectElementImpl::setCodeBase):
2148         (DOM::HTMLObjectElementImpl::codeType):
2149         (DOM::HTMLObjectElementImpl::setCodeType):
2150         (DOM::HTMLObjectElementImpl::data):
2151         (DOM::HTMLObjectElementImpl::setData):
2152         (DOM::HTMLObjectElementImpl::declare):
2153         (DOM::HTMLObjectElementImpl::setDeclare):
2154         (DOM::HTMLObjectElementImpl::height):
2155         (DOM::HTMLObjectElementImpl::setHeight):
2156         (DOM::HTMLObjectElementImpl::hspace):
2157         (DOM::HTMLObjectElementImpl::setHspace):
2158         (DOM::HTMLObjectElementImpl::name):
2159         (DOM::HTMLObjectElementImpl::setName):
2160         (DOM::HTMLObjectElementImpl::standby):
2161         (DOM::HTMLObjectElementImpl::setStandby):
2162         (DOM::HTMLObjectElementImpl::tabIndex):
2163         (DOM::HTMLObjectElementImpl::setTabIndex):
2164         (DOM::HTMLObjectElementImpl::type):
2165         (DOM::HTMLObjectElementImpl::setType):
2166         (DOM::HTMLObjectElementImpl::useMap):
2167         (DOM::HTMLObjectElementImpl::setUseMap):
2168         (DOM::HTMLObjectElementImpl::vspace):
2169         (DOM::HTMLObjectElementImpl::setVspace):
2170         (DOM::HTMLObjectElementImpl::width):
2171         (DOM::HTMLObjectElementImpl::setWidth):
2172         (DOM::HTMLParamElementImpl::isURLAttribute):
2173         (DOM::HTMLParamElementImpl::setName):
2174         (DOM::HTMLParamElementImpl::type):
2175         (DOM::HTMLParamElementImpl::setType):
2176         (DOM::HTMLParamElementImpl::setValue):
2177         (DOM::HTMLParamElementImpl::valueType):
2178         (DOM::HTMLParamElementImpl::setValueType):
2179         * khtml/html/html_objectimpl.h:
2180         (DOM::HTMLParamElementImpl::name):
2181         (DOM::HTMLParamElementImpl::value):
2182         * khtml/html/html_tableimpl.cpp:
2183         (DOM::HTMLTableElementImpl::rows):
2184         (DOM::HTMLTableElementImpl::tBodies):
2185         (DOM::HTMLTableElementImpl::align):
2186         (DOM::HTMLTableElementImpl::setAlign):
2187         (DOM::HTMLTableElementImpl::bgColor):
2188         (DOM::HTMLTableElementImpl::setBgColor):
2189         (DOM::HTMLTableElementImpl::border):
2190         (DOM::HTMLTableElementImpl::setBorder):
2191         (DOM::HTMLTableElementImpl::cellPadding):
2192         (DOM::HTMLTableElementImpl::setCellPadding):
2193         (DOM::HTMLTableElementImpl::cellSpacing):
2194         (DOM::HTMLTableElementImpl::setCellSpacing):
2195         (DOM::HTMLTableElementImpl::frame):
2196         (DOM::HTMLTableElementImpl::setFrame):
2197         (DOM::HTMLTableElementImpl::rules):
2198         (DOM::HTMLTableElementImpl::setRules):
2199         (DOM::HTMLTableElementImpl::summary):
2200         (DOM::HTMLTableElementImpl::setSummary):
2201         (DOM::HTMLTableElementImpl::width):
2202         (DOM::HTMLTableElementImpl::setWidth):
2203         (DOM::HTMLTableSectionElementImpl::align):
2204         (DOM::HTMLTableSectionElementImpl::setAlign):
2205         (DOM::HTMLTableSectionElementImpl::ch):
2206         (DOM::HTMLTableSectionElementImpl::setCh):
2207         (DOM::HTMLTableSectionElementImpl::chOff):
2208         (DOM::HTMLTableSectionElementImpl::setChOff):
2209         (DOM::HTMLTableSectionElementImpl::vAlign):
2210         (DOM::HTMLTableSectionElementImpl::setVAlign):
2211         (DOM::HTMLTableSectionElementImpl::rows):
2212         (DOM::HTMLTableRowElementImpl::cells):
2213         (DOM::HTMLTableRowElementImpl::setCells):
2214         (DOM::HTMLTableRowElementImpl::align):
2215         (DOM::HTMLTableRowElementImpl::setAlign):
2216         (DOM::HTMLTableRowElementImpl::bgColor):
2217         (DOM::HTMLTableRowElementImpl::setBgColor):
2218         (DOM::HTMLTableRowElementImpl::ch):
2219         (DOM::HTMLTableRowElementImpl::setCh):
2220         (DOM::HTMLTableRowElementImpl::chOff):
2221         (DOM::HTMLTableRowElementImpl::setChOff):
2222         (DOM::HTMLTableRowElementImpl::vAlign):
2223         (DOM::HTMLTableRowElementImpl::setVAlign):
2224         (DOM::HTMLTableCellElementImpl::abbr):
2225         (DOM::HTMLTableCellElementImpl::setAbbr):
2226         (DOM::HTMLTableCellElementImpl::align):
2227         (DOM::HTMLTableCellElementImpl::setAlign):
2228         (DOM::HTMLTableCellElementImpl::axis):
2229         (DOM::HTMLTableCellElementImpl::setAxis):
2230         (DOM::HTMLTableCellElementImpl::bgColor):
2231         (DOM::HTMLTableCellElementImpl::setBgColor):
2232         (DOM::HTMLTableCellElementImpl::ch):
2233         (DOM::HTMLTableCellElementImpl::setCh):
2234         (DOM::HTMLTableCellElementImpl::chOff):
2235         (DOM::HTMLTableCellElementImpl::setChOff):
2236         (DOM::HTMLTableCellElementImpl::setColSpan):
2237         (DOM::HTMLTableCellElementImpl::headers):
2238         (DOM::HTMLTableCellElementImpl::setHeaders):
2239         (DOM::HTMLTableCellElementImpl::height):
2240         (DOM::HTMLTableCellElementImpl::setHeight):
2241         (DOM::HTMLTableCellElementImpl::noWrap):
2242         (DOM::HTMLTableCellElementImpl::setNoWrap):
2243         (DOM::HTMLTableCellElementImpl::setRowSpan):
2244         (DOM::HTMLTableCellElementImpl::scope):
2245         (DOM::HTMLTableCellElementImpl::setScope):
2246         (DOM::HTMLTableCellElementImpl::vAlign):
2247         (DOM::HTMLTableCellElementImpl::setVAlign):
2248         (DOM::HTMLTableCellElementImpl::width):
2249         (DOM::HTMLTableCellElementImpl::setWidth):
2250         (DOM::HTMLTableColElementImpl::align):
2251         (DOM::HTMLTableColElementImpl::setAlign):
2252         (DOM::HTMLTableColElementImpl::ch):
2253         (DOM::HTMLTableColElementImpl::setCh):
2254         (DOM::HTMLTableColElementImpl::chOff):
2255         (DOM::HTMLTableColElementImpl::setChOff):
2256         (DOM::HTMLTableColElementImpl::setSpan):
2257         (DOM::HTMLTableColElementImpl::vAlign):
2258         (DOM::HTMLTableColElementImpl::setVAlign):
2259         (DOM::HTMLTableColElementImpl::width):
2260         (DOM::HTMLTableColElementImpl::setWidth):
2261         (DOM::HTMLTableCaptionElementImpl::parseHTMLAttribute):
2262         (DOM::HTMLTableCaptionElementImpl::align):
2263         (DOM::HTMLTableCaptionElementImpl::setAlign):
2264         * khtml/html/html_tableimpl.h:
2265         (DOM::HTMLTableColElementImpl::span):
2266         * khtml/rendering/render_applet.cpp:
2267         (RenderApplet::createWidgetIfNecessary):
2268         * khtml/rendering/render_frames.cpp:
2269         (RenderFrame::slotViewCleared):
2270         (RenderPartObject::updateWidget):
2271         (RenderPartObject::slotViewCleared):
2272         * khtml/xml/dom_docimpl.cpp:
2273         (DocumentImpl::completeURL):
2274         * khtml/xml/dom_docimpl.h:
2275
2276 2005-05-09  Maciej Stachowiak  <mjs@apple.com>
2277
2278         Reviewed by Kevin.
2279
2280         - remove more isFirst/isLast functions and use isStart/isEnd verions instead
2281
2282         * khtml/editing/htmlediting.cpp:
2283         (khtml::DeleteSelectionCommand::initializePositionData):
2284         (khtml::InsertParagraphSeparatorCommand::calculateStyleBeforeInsertion):
2285         (khtml::InsertTextCommand::input):
2286         (khtml::ReplaceSelectionCommand::doApply):
2287         (khtml::ReplaceSelectionCommand::removeLinePlaceholderIfNeeded):
2288         * khtml/editing/visible_position.cpp:
2289         (khtml::VisiblePosition::previous):
2290         (khtml::setAffinityUsingLinePosition):
2291         (khtml::isFirstVisiblePositionInNode):
2292         * khtml/editing/visible_position.h:
2293         * khtml/editing/visible_units.cpp:
2294         (khtml::endOfLine):
2295         (khtml::previousLinePosition):
2296         * khtml/xml/dom_position.cpp:
2297         (DOM::Position::previousCharacterPosition):
2298         (DOM::Position::nextCharacterPosition):
2299         * kwq/WebCoreBridge.mm:
2300         (-[WebCoreBridge smartInsertForString:replacingRange:beforeString:afterString:]):
2301
2302 2005-05-09  Maciej Stachowiak  <mjs@apple.com>
2303
2304         Reviewed by Kevin.
2305
2306         - remove isFirstVisiblePositionInBlock and isLastVisiblePositionInBlock, in favor of isStartOfBlock and isEndOfBlock
2307
2308         It turned out that both isEndOfBlock and isLastVisiblePositionInBlock had (different) bugs,
2309         and there was code relying on the bugs of each. So in addition I fixed isEndOfBlock and fixed 
2310         the parts of the code relying on buggy behavior.
2311
2312         I also removed the includeEndOfLine parameter to endOfBlock since no one used it and it's not
2313         clear if it would ever be useful.
2314         
2315         * khtml/editing/htmlediting.cpp:
2316         (khtml::InsertLineBreakCommand::doApply): Use new calls.
2317         (khtml::InsertParagraphSeparatorCommand::calculateStyleBeforeInsertion): Don't gratuitously make
2318         an UPSTREAM VisiblePosition, as this will cause trouble comparing it to end of block.
2319         (khtml::InsertParagraphSeparatorCommand::doApply): Use new calls.
2320         (khtml::ReplaceSelectionCommand::doApply): Use new calls. Also, don't make a position <BR,0> and test
2321         if it is the end of a block, that can never be true, although the buggy code in 
2322         isLastVisiblePositionInBlock would say it is. Make <BR,1> instead.
2323         * khtml/editing/markup.cpp:
2324         (khtml::createMarkup): Instead of checking isEndOfBlock on the start position, check if the start's
2325         next is in a different block, to avoid relying on the buggy old isEndOfBlock behavior.
2326         * khtml/editing/visible_position.cpp:
2327         (khtml::isFirstVisiblePositionInParagraph): Use isStartOfBlock.
2328         (khtml::isLastVisiblePositionInParagraph): Use isEndOfBlock.
2329         * khtml/editing/visible_position.h:
2330         * khtml/editing/visible_units.cpp:
2331         (khtml::endOfBlock): Greatly simplify, and no longer consider the start of a descendant
2332         block to be the end of the block. That's inconsistent with how startOfBlock works. Also
2333         remove include end of line parameter.
2334         (khtml::isEndOfBlock): Don't pass unneeded parameter.
2335         * khtml/editing/visible_units.h:
2336
2337 2005-05-09  Adele Peterson  <adele@apple.com>
2338
2339         fix for <rdar://problem/4110775> Crash will occur when double-clicking outerHTML link on W3 DOM test
2340
2341         Reviewed by Darin.
2342
2343         * khtml/html/html_elementimpl.cpp: (HTMLElementImpl::setOuterHTML): added nil check.  
2344         This was causing a crash when you tried to set the outerHTML on an element that was no longer in the DOM tree.
2345
2346         * layout-tests/fast/dom/outerText-no-element.html: Added. Tests case where you try to set outerText on an element no longer in the DOM tree.
2347         * layout-tests/fast/dom/outerText-no-element-expected.txt: Added.
2348         * layout-tests/fast/dynamic/outerHTML-doc.html: Added.  Tests case where someone tries to set outerHTML on the document.
2349         * layout-tests/fast/dynamic/outerHTML-doc-expected.txt: Added..
2350         * layout-tests/fast/dynamic/outerHTML-no-element.html: Added. Tests case where you try to set outerHTML on an element no longer in the DOM tree.
2351         * layout-tests/fast/dynamic/outerHTML-no-element-expected.txt: Added.
2352         * layout-tests/fast/dynamic/outerHTML-img.html: moved images to resources directory
2353         * layout-tests/fast/dynamic/resources/apple.gif: Added.
2354         * layout-tests/fast/dynamic/resources/mozilla.gif: Added.
2355
2356 2005-05-09  Maciej Stachowiak  <mjs@apple.com>
2357
2358         Reviewed by Kevin.
2359
2360         - remove code for DoNotStayInBlock variant of upstream/downstream and make
2361         the methods take no parameters
2362
2363         * khtml/editing/htmlediting.cpp:
2364         (khtml::CompositeEditCommand::deleteInsignificantTextDownstream):
2365         (khtml::CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessary):
2366         (khtml::ApplyStyleCommand::applyRelativeFontStyleChange):
2367         (khtml::ApplyStyleCommand::applyInlineStyle):
2368         (khtml::ApplyStyleCommand::removeInlineStyle):
2369         (khtml::ApplyStyleCommand::nodeFullySelected):
2370         (khtml::ApplyStyleCommand::nodeFullyUnselected):
2371         (khtml::DeleteSelectionCommand::initializePositionData):
2372         (khtml::DeleteSelectionCommand::fixupWhitespace):
2373         (khtml::InsertLineBreakCommand::insertNodeAfterPosition):
2374         (khtml::InsertLineBreakCommand::insertNodeBeforePosition):
2375         (khtml::InsertLineBreakCommand::doApply):
2376         (khtml::InsertParagraphSeparatorCommand::doApply):
2377         (khtml::InsertParagraphSeparatorInQuotedContentCommand::doApply):
2378         (khtml::InsertTextCommand::prepareForTextInsertion):
2379         (khtml::InsertTextCommand::input):
2380         (khtml::InsertTextCommand::insertSpace):
2381         (khtml::ReplaceSelectionCommand::doApply):
2382         * khtml/editing/selection.cpp:
2383         (khtml::Selection::toRange):
2384         (khtml::Selection::validate):
2385         * khtml/editing/visible_position.cpp:
2386         (khtml::VisiblePosition::previousVisiblePosition):
2387         (khtml::VisiblePosition::nextVisiblePosition):
2388         (khtml::VisiblePosition::downstreamDeepEquivalent):
2389         (khtml::isFirstVisiblePositionInParagraph):
2390         (khtml::isFirstVisiblePositionInBlock):
2391         (khtml::isLastVisiblePositionInParagraph):
2392         * khtml/xml/dom2_rangeimpl.cpp:
2393         (DOM::RangeImpl::editingStartPosition):
2394         * khtml/xml/dom_position.cpp:
2395         (DOM::isStreamer):
2396         (DOM::Position::upstream):
2397         (DOM::Position::downstream):
2398         (DOM::Position::leadingWhitespacePosition):
2399         (DOM::Position::trailingWhitespacePosition):
2400         * khtml/xml/dom_position.h:
2401         * kwq/WebCoreBridge.mm:
2402         (-[WebCoreBridge smartDeleteRangeForProposedRange:]):
2403
2404 2005-05-08  Maciej Stachowiak  <mjs@apple.com>
2405
2406         Reviewed by Dave Harrison.
2407
2408         - remove remaining uses of upstream/downstream DoNotStayInBlock
2409         
2410         * khtml/editing/htmlediting.cpp:
2411         (khtml::CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessary):
2412         (khtml::ApplyStyleCommand::nodeFullySelected):
2413         (khtml::ApplyStyleCommand::nodeFullyUnselected):
2414         (khtml::DeleteSelectionCommand::insertPlaceholderForAncestorBlockContent):
2415         (khtml::InsertParagraphSeparatorCommand::doApply):
2416         (khtml::InsertParagraphSeparatorInQuotedContentCommand::doApply):
2417         (khtml::InsertTextCommand::insertSpace):
2418         (khtml::ReplaceSelectionCommand::doApply):
2419         
2420         * khtml/editing/visible_position.cpp:
2421         (khtml::enclosingBlockFlowElement): New helper function.
2422         * khtml/editing/visible_position.h:
2423
2424         * khtml/editing/visible_units.cpp:
2425         (khtml::inSameBlock): Check enclosing block flows instead of comparing
2426         visible block starts. Two nested blocks may have the same visible start but
2427         different visible ends, so the old check would give false positives.
2428
2429 2005-05-09  David Harrison  <harrison@apple.com>
2430
2431         Add layout test for <rdar://problem/4110366>.
2432
2433         * layout-tests/editing/deleting/delete-at-paragraph-boundaries-011-expected.txt: Added.
2434         * layout-tests/editing/deleting/delete-at-paragraph-boundaries-011.html: Added.
2435
2436 2005-05-09  Darin Adler  <darin@apple.com>
2437
2438         - checked in a result for the Flash replacement test that Dave added
2439
2440         * layout-tests/fast/dynamic/flash-replacement-test-expected.txt: Added.
2441         Hope it's right! If not, Dave can update it.
2442
2443 2005-05-09  Darin Adler  <darin@apple.com>
2444
2445         * Makefile.am: Don't set up PBXIntermediatesDirectory explicitly;
2446         Not needed to make builds work, spews undesirable error messages too.
2447
2448         * WebCore.pbproj/project.pbxproj: Remove unneeded $(DSTROOT) in framework paths.
2449
2450 2005-05-07  Maciej Stachowiak  <mjs@apple.com>
2451
2452         Reviewed by Kevin.
2453
2454         - remove some of the uses of upstream/downstream DoNotStayInBlock
2455         
2456         * khtml/editing/markup.cpp:
2457         (khtml::createMarkup): Instead of using upstream to decide if a line break should be 
2458         added at the end, use inSameParagraph.
2459         * khtml/editing/selection.cpp:
2460         (khtml::Selection::debugPosition): Remove the code to print upstream and downstream,
2461         the selection endpoints themselves are adequate for debugging and are what we use for
2462         layout tests.
2463         * khtml/xml/dom2_rangeimpl.cpp:
2464         (DOM::RangeImpl::editingStartPosition): Skip a possible paragraph break at the start
2465         of the selection in a more explicit way to avoid DoNotStayInBlock.
2466
2467 2005-05-07  David Harrison  <harrison@apple.com>
2468
2469         Reviewed by John.
2470
2471         <rdar://problem/4110366> Deleting text at the end of email moves insertion point to the top of the document
2472         
2473         * khtml/editing/htmlediting.cpp:
2474         (khtml::DeleteSelectionCommand::handleGeneralDelete):
2475         Update m_upstreamStart when deleting m_downstreamEnd.node() if the former is no longer in the document.
2476         Better to update here than trying to recover later in calculateEndingPosition().
2477
2478 2005-05-07  David Harrison  <harrison@apple.com>
2479         
2480         Remove workaround for <rdar://problem/4103339>.
2481         
2482         * khtml/editing/htmlediting.cpp:
2483         (khtml::DeleteSelectionCommand::initializePositionData):
2484
2485 2005-05-06  Maciej Stachowiak  <mjs@apple.com>
2486
2487         Reviewed by Dave Harrison.
2488
2489         - make StayInBlock vs DoNotStayInBlock explicit in all calls to
2490         upstream/downstream, in preparation for phasing out the
2491         DoNotStayInBlock variant.
2492
2493         * khtml/editing/htmlediting.cpp:
2494         (khtml::ApplyStyleCommand::nodeFullySelected):
2495         (khtml::ApplyStyleCommand::nodeFullyUnselected):
2496         (khtml::DeleteSelectionCommand::insertPlaceholderForAncestorBlockContent):
2497         (khtml::InsertParagraphSeparatorInQuotedContentCommand::doApply):
2498         (khtml::InsertTextCommand::insertSpace):
2499         (khtml::ReplaceSelectionCommand::doApply):
2500         * khtml/editing/markup.cpp:
2501         (khtml::createMarkup):
2502         * khtml/editing/selection.cpp:
2503         (khtml::Selection::debugPosition):
2504         * khtml/xml/dom_position.h:
2505
2506 2005-05-06  David Harrison  <harrison@apple.com>
2507
2508         Reviewed by Maciej, Darin.
2509
2510         <rdar://problem/4103339> VisiblePosition and PositionIterator iterators do not return positions in order
2511
2512         * WebCore.pbproj/project.pbxproj:
2513         Removed dom_positioniterator.h and dom_positioniterator.cpp.
2514         
2515         * khtml/editing/htmlediting.cpp:
2516         Removed unused include of dom_positioniterator.h and "using" of PositionIterator.
2517         
2518         * khtml/editing/selection.cpp:
2519         Removed unused include of dom_positioniterator.h.
2520
2521         * khtml/editing/visible_position.h:
2522         * khtml/editing/visible_position.cpp:
2523         (khtml::VisiblePosition::previousVisiblePosition):
2524         (khtml::VisiblePosition::nextVisiblePosition):
2525         (khtml::VisiblePosition::downstreamDeepEquivalent):
2526         Use Position::next(), Position::previous(), Position::atStart(), Position::atEnd() instead of duplicated code.
2527         
2528         * khtml/xml/dom_nodeimpl.h:
2529         * khtml/xml/dom_nodeimpl.cpp:
2530         (NodeImpl::maxDeepOffset):
2531         Added to support Position::next(), Position::previous(), Position::atStart(), Position::atEnd()
2532         
2533         * khtml/xml/dom_position.h:
2534         * khtml/xml/dom_position.cpp:
2535         (DOM::Position::previous):
2536         (DOM::Position::next):
2537         (DOM::Position::atStart):
2538         (DOM::Position::atEnd):
2539         Moved here, replacing VisiblePosition's duplicate and PositionIterator.  Fixed to
2540         return positions in order and not skip positions.
2541         
2542         (DOM::Position::previousCharacterPosition):
2543         (DOM::Position::nextCharacterPosition):
2544         Use Position::next(), Position::previous(), Position::atStart(), Position::atEnd() instead of PositionIterator.
2545
2546         (DOM::isStreamer):
2547         (DOM::Position::upstream):
2548         (DOM::Position::downstream):
2549         Use Position::next(), Position::previous(), Position::atStart(), Position::atEnd() instead of PositionIterator.
2550
2551         * khtml/xml/dom_positioniterator.cpp: Removed.
2552         * khtml/xml/dom_positioniterator.h: Removed.
2553         Removed in favor of Position::next(), Position::previous(), Position::atStart(), Position::atEnd()
2554
2555 2005-05-05  Maciej Stachowiak  <mjs@apple.com>
2556
2557         Reviewed by Darin.
2558
2559         <rdar://problem/4058167> Unit Converter and Weather widgets crashed in KJS::Collector::markCurrentThreadConservatively
2560         
2561         Avoid possibly allocating new prototype objects as parameters to
2562         superclass constructors - there may be an allocated but
2563         uninitilized object so this is a bad time to allocate. Instead,
2564         set the prototype in the constructor body, since the object is
2565         happily allocated by then.
2566
2567         * khtml/ecma/kjs_binding.h:
2568         * khtml/ecma/kjs_css.cpp:
2569         (DOMCSSStyleDeclaration::DOMCSSStyleDeclaration):
2570         (DOMMediaList::DOMMediaList):
2571         (DOMCSSStyleSheet::DOMCSSStyleSheet):
2572         (DOMCSSPrimitiveValue::DOMCSSPrimitiveValue):
2573         (DOMCSSValueList::DOMCSSValueList):
2574         * khtml/ecma/kjs_css.h:
2575         (KJS::DOMStyleSheet::DOMStyleSheet):
2576         (KJS::DOMCSSValue::DOMCSSValue):
2577         * khtml/ecma/kjs_dom.cpp:
2578         (DOMNode::DOMNode):
2579         (DOMDocument::DOMDocument):
2580         (DOMElement::DOMElement):
2581         (DOMDOMImplementation::DOMDOMImplementation):
2582         (DOMNamedNodeMap::DOMNamedNodeMap):
2583         (DOMNamedNodesCollection::DOMNamedNodesCollection):
2584         (DOMCharacterData::DOMCharacterData):
2585         (DOMText::DOMText):
2586         * khtml/ecma/kjs_dom.h:
2587         (KJS::NodeConstructor::NodeConstructor):
2588         (KJS::DOMExceptionConstructor::DOMExceptionConstructor):
2589         * khtml/ecma/kjs_events.cpp:
2590         (DOMEvent::DOMEvent):
2591         (Clipboard::Clipboard):
2592         * khtml/ecma/kjs_html.cpp:
2593         (HTMLCollection::HTMLCollection):
2594         * khtml/ecma/kjs_range.cpp:
2595         (DOMRange::DOMRange):
2596         * khtml/ecma/kjs_traversal.cpp:
2597         (DOMNodeIterator::DOMNodeIterator):
2598         (DOMNodeFilter::DOMNodeFilter):
2599         (DOMTreeWalker::DOMTreeWalker):
2600         * khtml/ecma/xmlhttprequest.cpp:
2601         (KJS::XMLHttpRequest::XMLHttpRequest):
2602         * khtml/ecma/xmlserializer.cpp:
2603         (KJS::XMLSerializer::XMLSerializer):
2604
2605 2005-05-06  Darin Adler  <darin@apple.com>
2606
2607         Reviewed by Maciej.
2608
2609         - make building multiple trees with make work better
2610
2611         * Makefile.am: Set up Xcode build directory before invoking xcodebuild.
2612
2613 2005-05-05  David Hyatt  <hyatt@apple.com>
2614
2615         Eliminate the FOUCS on wired.com.  innerWidth and innerHeight on window should not do a layout that ignores
2616         pending stylesheets, since even if stylesheets are loading the correct window dimensions can be determined with
2617         a normal layout.
2618
2619         The radar # is 4109888.
2620         
2621         Reviewed by rjw
2622
2623         * khtml/ecma/kjs_window.cpp:
2624         (Window::get):
2625         (Window::updateLayout):
2626         * khtml/ecma/kjs_window.h:
2627
2628 2005-05-05  David Hyatt  <hyatt@apple.com>
2629
2630         Fix for 4109667, sIFR flash replacement technique often malfunctions.  This bug occurs when the plugin
2631         widget update causes the onload for the document to fire.  Because you can be in the middle of a style
2632         recalc when doing an attach (in response to a stylesheet load), the onload fires in the middle of the attach
2633         process when the tree is in a bogus state.
2634
2635         The fix is to add a bit to the document that tells style recalc that the implicitClose() method was invoked
2636         during the style recalc process and the code has been patched so that when this situation occurs, the close is
2637         deferred until after the style recalc has finished.
2638         
2639         Reviewed by John Sullivan
2640
2641         * khtml/xml/dom_docimpl.cpp:
2642         (DocumentImpl::DocumentImpl):
2643         (DocumentImpl::recalcStyle):
2644         (DocumentImpl::implicitClose):
2645         * khtml/xml/dom_docimpl.h:
2646         * layout-tests/fast/dynamic/flash-replacement-test.html: Added.
2647
2648 2005-05-05  Darin Adler  <darin@apple.com>
2649
2650         Reviewed by Dave Hyatt.
2651
2652         - fixed <rdar://problem/4109564> REGRESSION (Atlanta): maps.google.com doesn't always center California correctly
2653
2654         * khtml/ecma/kjs_events.cpp: (offsetFromTarget): Fix two places that said X where they should say Y.
2655
2656 2005-05-05  David Harrison  <harrison@apple.com>
2657
2658         Restore fixed setEndingSelection.  Fixed method was ifdef'd out
2659         because change was at end of Tiger development, but method is
2660         unused.  You just can never be _too_ safe.
2661         
2662         * khtml/editing/htmlediting.cpp:
2663         (khtml::EditCommandPtr::setEndingSelection):
2664
2665 2005-05-02  Maciej Stachowiak  <mjs@apple.com>
2666
2667         Reviewed by Vicki.
2668
2669         - renamed NodeBaseImpl to ContainerNodeImpl
2670
2671         * khtml/ecma/kjs_dom.cpp:
2672         (DOMNodeProtoFunc::tryCall): Avoid use of NodeBaseImpl and avoid
2673         use of obsolete checkNoOwner call, use isAncestor instead.
2674         * khtml/html/html_elementimpl.cpp:
2675         (HTMLElementImpl::setOuterText): Avoid gratuitous use of
2676         NodeBaseImpl.
2677         * khtml/xml/dom_nodeimpl.cpp:
2678         (NodeBaseImpl::checkNoOwner): Removed.
2679         
2680         Ther rest is all just simple renaming.
2681         
2682         * khtml/xml/dom_docimpl.cpp:
2683         (DocumentImpl::DocumentImpl):
2684         (DocumentImpl::attach):
2685         (DocumentImpl::detach):
2686         (DocumentFragmentImpl::DocumentFragmentImpl):
2687         * khtml/xml/dom_docimpl.h:
2688         * khtml/xml/dom_elementimpl.cpp:
2689         (AttrImpl::AttrImpl):
2690         (ElementImpl::ElementImpl):
2691         (ElementImpl::insertedIntoDocument):
2692         (ElementImpl::removedFromDocument):
2693         (ElementImpl::attach):
2694         (ElementImpl::dump):
2695         * khtml/xml/dom_elementimpl.h:
2696         * khtml/xml/dom_nodeimpl.cpp:
2697         (ContainerNodeImpl::ContainerNodeImpl):
2698         (ContainerNodeImpl::~ContainerNodeImpl):
2699         (ContainerNodeImpl::firstChild):
2700         (ContainerNodeImpl::lastChild):
2701         (ContainerNodeImpl::insertBefore):
2702         (ContainerNodeImpl::replaceChild):
2703         (ContainerNodeImpl::removeChild):
2704         (ContainerNodeImpl::removeChildren):
2705         (ContainerNodeImpl::appendChild):
2706         (ContainerNodeImpl::hasChildNodes):
2707         (ContainerNodeImpl::setFirstChild):
2708         (ContainerNodeImpl::setLastChild):
2709         (ContainerNodeImpl::checkSameDocument):
2710         (ContainerNodeImpl::checkIsChild):
2711         (ContainerNodeImpl::addChild):
2712         (ContainerNodeImpl::attach):
2713         (ContainerNodeImpl::detach):
2714         (ContainerNodeImpl::insertedIntoDocument):
2715         (ContainerNodeImpl::removedFromDocument):
2716         (ContainerNodeImpl::cloneChildNodes):
2717         (ContainerNodeImpl::getElementsByTagNameNS):
2718         (ContainerNodeImpl::getUpperLeftCorner):
2719         (ContainerNodeImpl::getLowerRightCorner):
2720         (ContainerNodeImpl::getRect):
2721         (ContainerNodeImpl::setFocus):
2722         (ContainerNodeImpl::setActive):
2723         (ContainerNodeImpl::childNodeCount):
2724         (ContainerNodeImpl::childNode):
2725         (ContainerNodeImpl::dispatchChildInsertedEvents):
2726         (ContainerNodeImpl::dispatchChildRemovalEvents):
2727         * khtml/xml/dom_nodeimpl.h:
2728         * khtml/xml/dom_xmlimpl.cpp:
2729         (DOM::EntityImpl::EntityImpl):
2730         (DOM::EntityReferenceImpl::EntityReferenceImpl):
2731         (DOM::NotationImpl::NotationImpl):
2732         (DOM::ProcessingInstructionImpl::ProcessingInstructionImpl):
2733         * khtml/xml/dom_xmlimpl.h:
2734
2735 2005-05-04  Vicki Murley  <vicki@apple.com>
2736
2737         Reviewed by Darin.
2738
2739         - fix mismatched parentheses in one of the ifdefs
2740  
2741         * khtml/html/html_headimpl.cpp:
2742         (HTMLTitleElementImpl::childrenChanged):
2743
2744 2005-05-04  Darin Adler  <darin@apple.com>
2745
2746         Reviewed by Dave Hyatt.
2747
2748         - fixed build rules to match other projects
2749
2750         * WebCore.pbproj/project.pbxproj: Set deployment target to 10.3 in the build styles.
2751         When built without a build style (by Apple B&I) we want to get the target from the
2752         environment. But when built with a build style (by Safari engineers and others), we want
2753         to use 10.3.
2754
2755         * Makefile.am: Took out extra parameters that make command-line building different from
2756         Xcode building. Now that this is fixed, you should not get a full rebuild if you switch
2757         from command line to Xcode or back.
2758
2759 2005-05-04  Vicki Murley  <vicki@apple.com>
2760
2761         Reviewed by darin.
2762
2763         - fixed <rdar://problem/3986228> Not able to load additional script blocks dynamically
2764
2765         Run scripts when they're inserted into the document. Use createdByParser bit to make sure
2766         that scripts aren't run twice, once while parsing and again when inserting.
2767
2768         * khtml/html/html_headimpl.cpp:
2769         (HTMLScriptElementImpl::HTMLScriptElementImpl):
2770         (HTMLScriptElementImpl::~HTMLScriptElementImpl):
2771         (HTMLScriptElementImpl::insertedIntoDocument): 
2772         (HTMLScriptElementImpl::removedFromDocument): 
2773         (HTMLScriptElementImpl::notifyFinished): 
2774         * khtml/html/html_headimpl.h:
2775         (DOM::HTMLScriptElementImpl::setCreatedByParser):
2776         * khtml/html/htmlparser.cpp:
2777         (KHTMLParser::getElement): 
2778         * khtml/xml/xml_tokenizer.cpp:
2779         (khtml::XMLTokenizer::startElement): 
2780
2781 2005-05-03  David Hyatt  <hyatt@apple.com>
2782
2783         Normalize all our custom properties in our implementation to be -khtml (remove all the -apple).
2784
2785         Make sure that -apple, -khtml, and -moz are all able to be used.  -apple and -moz just map to -khtml.
2786
2787         Add support for automatically converting -khtml-opacity to opacity (for legacy Safari 1.1 compat).
2788         
2789         Reviewed by darin
2790
2791         * khtml/css/css_computedstyle.cpp:
2792         (DOM::):
2793         (DOM::CSSComputedStyleDeclarationImpl::getPropertyCSSValue):
2794         * khtml/css/cssparser.cpp:
2795         (CSSParser::parseValue):
2796         * khtml/css/cssproperties.in:
2797         * khtml/css/cssstyleselector.cpp:
2798         (khtml::CSSStyleSelector::applyDeclarations):
2799         (khtml::CSSStyleSelector::applyProperty):
2800         * khtml/css/parser.y:
2801         * khtml/ecma/kjs_css.cpp:
2802         (cssPropertyName):
2803
2804 2005-05-03  Darin Adler  <darin@apple.com>
2805
2806         - fix the build
2807
2808         * WebCore.pbproj/project.pbxproj: Fix some SYMROOTS that should have been SYMROOT.
2809
2810 2005-05-03  David Hyatt  <hyatt@apple.com>
2811
2812         Fix for 4098281, news.com missing a bunch of content.  Make sure not to apply strict SGML parsing
2813         when stripping comments out of scripts.
2814
2815         New test is comments-in-script.html
2816         
2817         * khtml/html/htmltokenizer.cpp:
2818         (khtml::HTMLTokenizer::parseComment):
2819
2820 2005-05-03  David Hyatt  <hyatt@apple.com>
2821
2822         Remove unused notification to avoid ERROR messages spewing on the acid2 test.
2823         
2824         Reviewed by darin
2825
2826         * khtml/khtml_part.cpp:
2827         (KHTMLPart::processObjectRequest):
2828         * khtml/rendering/render_frames.cpp:
2829         (RenderPartObject::updateWidget):
2830         * khtml/rendering/render_frames.h:
2831
2832 2005-05-03  Darin Adler  <darin@apple.com>
2833
2834         Reviewed by Dave Hyatt.
2835         No new layout tests needed.
2836
2837         - eliminated the bogus kMin/kMax macros that we had in addition to inline functions
2838           of the same name
2839
2840         * kwq/KWQKGlobal.h: Remove the kMin/kMax macros.
2841
2842         * khtml/css/cssstyleselector.cpp:
2843         (khtml::CSSStyleSelector::applyProperty): Change type of constant so both sides
2844         of kMin calls match.
2845         (khtml::CSSStyleSelector::fontSizeForKeyword): Ditto.
2846         * khtml/html/htmltokenizer.cpp: (khtml::HTMLTokenizer::parseEntity): Ditto.
2847
2848         - remove unused parameter to dirtyLinesFromChangedChild for clarity
2849
2850         * khtml/rendering/render_object.h: Don't take the parameter.
2851         * khtml/rendering/render_object.cpp: (RenderObject::dirtyLinesFromChangedChild): Ditto.
2852
2853         * khtml/rendering/render_flow.h: Don't take the parameter.
2854         * khtml/rendering/render_flow.cpp:
2855         (RenderFlow::detach): Don't pass the parameter.
2856         (RenderFlow::dirtyLinesFromChangedChild): Don't take the parameter.
2857
2858         * khtml/rendering/render_text.cpp: (RenderText::detach): Don't pass the parameter.
2859
2860         - convert DOM::NodeImpl into an abstract base class by making a couple of functions
2861           pure virtual for clarity
2862
2863         * khtml/xml/dom_nodeimpl.h: Made nodeName and nodeType pure virtual.
2864         * khtml/xml/dom_nodeimpl.cpp: Remove bodies of nodeName and nodeType.
2865
2866 2005-05-03  David Hyatt  <hyatt@apple.com>
2867
2868         Fix for object element to support fallback content.  WIth this change Safari passes the Acid2 test.
2869         
2870         Reviewed by Maciej
2871
2872         * khtml/css/html4.css:
2873         * khtml/html/html_objectimpl.cpp:
2874         (HTMLObjectElementImpl::HTMLObjectElementImpl):
2875         (HTMLObjectElementImpl::parseHTMLAttribute):
2876         (HTMLObjectElementImpl::rendererIsNeeded):
2877         (HTMLObjectElementImpl::createRenderer):
2878         (HTMLObjectElementImpl::attach):
2879         (HTMLObjectElementImpl::detach):
2880         (HTMLObjectElementImpl::recalcStyle):
2881         (HTMLObjectElementImpl::childrenChanged):
2882         (HTMLObjectElementImpl::isURLAttribute):
2883         (HTMLObjectElementImpl::isImageType):
2884         (HTMLObjectElementImpl::renderFallbackContent):
2885         * khtml/html/html_objectimpl.h:
2886         * khtml/khtml_part.cpp:
2887         (KHTMLPart::requestObject):
2888         (KHTMLPart::selectFrameElementInParentIfFullySelected):
2889         (KHTMLPart::handleFallbackContent):
2890         * khtml/khtml_part.h:
2891         * khtml/khtmlpart_p.h:
2892         (khtml::ChildFrame::ChildFrame):
2893         * khtml/rendering/render_frames.cpp:
2894         (RenderPartObject::RenderPartObject):
2895         (RenderPartObject::updateWidget):
2896         * khtml/rendering/render_frames.h:
2897         (khtml::RenderPart::hasFallbackContent):
2898         * khtml/rendering/render_replaced.cpp:
2899         (RenderReplaced::RenderReplaced):
2900         * kwq/KWQKHTMLPart.mm:
2901         (KWQKHTMLPart::createPart):
2902         * kwq/WebCoreBridge.h:
2903         * kwq/WebCoreBridge.mm:
2904         (-[WebCoreBridge mainResourceError]):
2905
2906 2005-05-01  Darin Adler  <darin@apple.com>
2907
2908         - move to Xcode native targets and stop checking in generated files
2909
2910         * WebCore.pbproj/project.pbxproj: Updated to use native targets and generate all the generated
2911         files, so we don't have to check them in any more.
2912         * Info.plist: Added. Native targets use a separate file for this.
2913
2914         * Makefile.am: Removed rule to generate WebCore-combined.exp since this is now handled by the
2915         Xcode project. Removed the code to remove the embedded copy of the framework since we don't
2916         do that any more. Removed timestamp cleaning rules since we don't use those any more.
2917
2918         * WebCore-tests.exp: Removed symbols that aren't really needed. The native target gives an
2919         error when you mention a nonexistent symbol, so we can't have them any more.
2920
2921         * khtml/css/parser_wrapper.cpp: Added. Shell used to compile parser.cpp since we can't add
2922         a generated file easily to the list of files to be compiled.
2923
2924         * .cvsignore: Removed various timestamp files.
2925
2926         * WebCore-combined.exp: Removed.
2927         * force-clean-timestamp: Removed.
2928         * force-js-clean-timestamp: Removed.
2929         * khtml/.cvsignore: Removed.
2930         * khtml/Makefile.am: Removed.
2931         * khtml/css/.cvsignore: Removed.
2932         * khtml/css/Makefile.am: Removed.
2933         * khtml/css/cssproperties.c: Removed.
2934         * khtml/css/cssproperties.h: Removed.
2935         * khtml/css/cssvalues.c: Removed.
2936         * khtml/css/cssvalues.h: Removed.
2937         * khtml/css/parser.cpp: Removed.
2938         * khtml/css/parser.h: Removed.
2939         * khtml/css/tokenizer.cpp: Removed.
2940         * khtml/ecma/.cvsignore: Removed.
2941         * khtml/ecma/Makefile.am: Removed.
2942         * khtml/ecma/kjs_css.lut.h: Removed.
2943         * khtml/ecma/kjs_dom.lut.h: Removed.
2944         * khtml/ecma/kjs_events.lut.h: Removed.
2945         * khtml/ecma/kjs_html.lut.h: Removed.
2946         * khtml/ecma/kjs_navigator.lut.h: Removed.
2947         * khtml/ecma/kjs_range.lut.h: Removed.
2948         * khtml/ecma/kjs_traversal.lut.h: Removed.
2949         * khtml/ecma/kjs_views.lut.h: Removed.
2950         * khtml/ecma/kjs_window.lut.h: Removed.
2951         * khtml/ecma/xmlhttprequest.lut.h: Removed.
2952         * khtml/ecma/xmlserializer.lut.h: Removed.
2953         * khtml/html/.cvsignore: Removed.
2954         * khtml/html/Makefile.am: Removed.
2955         * khtml/html/doctypes.cpp: Removed.
2956         * khtml/html/kentities.c: Removed.
2957         * khtml/misc/.cvsignore: Removed.
2958         * khtml/misc/Makefile.am: Removed.
2959         * khtml/misc/htmlattrs.c: Removed.
2960         * khtml/misc/htmlattrs.h: Removed.
2961         * khtml/misc/htmltags.c: Removed.
2962         * khtml/misc/htmltags.h: Removed.
2963         * kwq/.cvsignore: Removed.
2964         * kwq/KWQCharsetData.c: Removed.
2965         * kwq/KWQColorData.c: Removed.
2966         * kwq/Makefile.am: Removed.
2967
2968 2005-05-02  Darin Adler  <darin@apple.com>
2969
2970         Reviewed by Vicki.
2971         Added two layout tests for regression testing.
2972
2973         - redid frameElement (fix for 4091082 below)
2974
2975         The first version lacked a security check, and was also broken.
2976
2977         * khtml/ecma/kjs_window.cpp:
2978         (frameElement): Refactored into separate function; added isSafeScript check.
2979         (Window::get): Call the new frameElement function.
2980
2981         * layout-tests/fast/frames/frameElement-frame.html: Added.
2982         * layout-tests/fast/frames/frameElement-frame-expected.txt: Added.
2983         * layout-tests/fast/frames/frameElement-iframe.html: Added.
2984         * layout-tests/fast/frames/frameElement-iframe-expected.txt: Added.
2985         * layout-tests/fast/frames/resources/frameElement-contents.html: Added.
2986
2987 2005-05-02  David Harrison  <harrison@apple.com>
2988
2989         Reviewed by Vicki.
2990
2991         Fix isStartOfEditableContent and isEndOfEditableContent to return actual, rather than inverted, answers.
2992         No Radar.  Found this when trying to use isEndOfEditableContent() in some new code.
2993         
2994         * khtml/editing/visible_units.cpp:
2995         (khtml::isStartOfEditableContent):
2996         (khtml::isEndOfEditableContent):
2997         Flip expressions.
2998
2999 2005-04-29  Darin Adler  <darin@apple.com>
3000
3001         Reviewed by David Harrison.
3002
3003         * khtml/xml/dom_nodeimpl.cpp: (NodeImpl::displayNode): Turn newlines into \n for better dumping.
3004
3005 2005-04-29  David Harrison  <harrison@apple.com>
3006
3007         Reviewed by Darin.
3008
3009         <rdar://problem/4083333> When deleting link at end of sentence, entire sentence gets deleted
3010         
3011         * khtml/editing/htmlediting.cpp:
3012         (khtml::DeleteSelectionCommand::initializePositionData):
3013         Work around bug #4103339 (whose real fix is somewhat risky), so this fix can get into a software update.
3014         
3015         (khtml::DeleteSelectionCommand::handleGeneralDelete):
3016         Add isAncestor check when comparing m_downstreamEnd.node() and m_startNode.
3017
3018         * layout-tests/editing/deleting/delete-4083333-fix-expected.txt: Added.
3019         * layout-tests/editing/deleting/delete-4083333-fix.html: Added.
3020
3021 2005-04-29  Darin Adler  <darin@apple.com>
3022
3023         Reviewed by Dave Harrison.
3024
3025         - changed layout tests to dump more minimal information about caret and selection
3026
3027         * kwq/KWQRenderTreeDebug.cpp:
3028         (nodePosition): Changed name; now does position relative to document.
3029         (writeSelection): Removed upstream/downstream code and changed format slightly.
3030
3031         * layout-tests/editing/*-expected.txt: Regenerated in new format.
3032
3033 2005-04-29  Darin Adler  <darin@apple.com>
3034
3035         Reviewed by Chris Blumenberg.
3036         Added two layout tests for regression testing.
3037
3038         - fixed <rdar://problem/4097849> REGRESSION (162-163): importNode creates non-HTML elements, thus style attributes (and some others) don't work
3039
3040         * khtml/xml/dom_docimpl.cpp:
3041         (DocumentImpl::importNode): Reorganized and partly rewrote this. The change that fixes the bug at
3042         hand is to explicitly use XHTML_NAMESPACE for HTML elements, since the old way of getting the namespace
3043         will return the null string for HTML elements, and createElementNS will not create an HTML element
3044         if passed a null string for the namespace.
3045         (DocumentImpl::processHttpEquiv): Removed some bogus getDocument() calls -- no need to call getDocument()
3046         in a document object.
3047         (DocumentImpl::attrName): Ditto.
3048         (DocumentImpl::tagName): Ditto.
3049         (DocumentImpl::setFocusNode): Ditto.
3050
3051         * khtml/html/html_elementimpl.cpp: (HTMLElementImpl::cloneNode): Moved the actual cloning here
3052         from ElementImpl::cloneNode, because XMLElementImpl already had its own version, and in here
3053         we can use createHTMLElement, which will work properly even in an XML document, and is also slightly
3054         more efficient.
3055
3056         * khtml/xml/dom_nodeimpl.h: Added a namespaceURI method function to go along with localName.
3057         * khtml/xml/dom_nodeimpl.cpp: (NodeImpl::namespaceURI): Added. Returns null string to be consistent
3058         with localName (only works on certain types of elements as documented).
3059         * khtml/xml/dom_elementimpl.h: Removed ElementImpl::cloneNode (see above). Added an override of
3060         namespaceURI for XMLElementImpl.
3061         * khtml/xml/dom_elementimpl.cpp: (XMLElementImpl::namespaceURI): Added. Returns the namespace
3062         (consistent with localName).
3063
3064         * layout-tests/fast/dom/importNodeHTML.html: Added. Tests both importNode and cloneNode (for comparison).
3065         * layout-tests/fast/dom/importNodeHTML-expected.txt: Added.
3066         * layout-tests/fast/dom/importNodeXML.xhtml: Added. XML version of the same test as above. Tests a different
3067         code path, so useful to have.
3068         * layout-tests/fast/dom/importNodeXML-expected.txt: Added.
3069
3070 2005-04-28  Darin Adler  <darin@apple.com>
3071
3072         Reviewed by Dave Harrison.
3073
3074         - fixed problems preventing us from compiling with gcc 4.0
3075
3076         * WebCore.pbproj/project.pbxproj: Removed -fobjc-exceptions because I can't figure out an easy
3077         way to pass it only when compiling Objective-C/C++. Removed -Wmissing-prototypes from
3078         WARNING_CPLUSPLUSFLAGS since it's now a C-only warning.
3079
3080         * khtml/css/parser.y: Changed some rules that were using a float to pass around an enum to use an
3081         int instead to avoid a warning.
3082         * khtml/css/parser.cpp: Regenerated.
3083         * khtml/css/parser.h: Regenerated.
3084
3085         * khtml/ecma/kjs_dom.cpp: (DOMTextProtoFunc::tryCall): Rearranged a return statement to avoid an incorrect
3086         warning.
3087         * khtml/ecma/kjs_html.cpp: (KJS::Context2DFunction::tryCall): Initialized a couple of variables to avoid
3088         an incorrect warning.
3089         * khtml/ecma/kjs_proxy.cpp: (KJSProxyImpl::evaluate): Rearranged how we exit from the function to avoid
3090         an incorret warning.
3091         * khtml/editing/selection.cpp: (khtml::Selection::debugPosition): Changed some %d to %ld where the
3092         parameters where long ints.
3093         * khtml/editing/visible_position.cpp: (khtml::VisiblePosition::debugPosition): Ditto.
3094         * khtml/xml/dom_position.cpp: (DOM::Position::debugPosition): Ditto.
3095         * kwq/DOMEvents.mm: (-[DOMMouseEvent initMouseEvent:::::::::::::::]): Rearranged code to avoid a cast
3096         that was causing an incorrect warning.
3097         * kwq/DOMUtility.mm:
3098         (createObjCDOMNode): Broke out as a separate function.
3099         (KJS::ScriptInterpreter::createObjcInstanceForValue): Rearranged code to avoid a namespace collision with
3100         KJS::DOMNode and the Objective-C DOMNode class.
3101         * kwq/KWQFileButton.mm: Made fields of KWQFileButtonAdapter public to avoid an error, new to gcc 4.0,
3102         about accessing protected Objective-C fields.
3103         * kwq/KWQKHTMLPart.mm:
3104         (KWQKHTMLPart::matchLabelsAgainstElement): Rearranged a return statement to avoid an incorrect warning.
3105         (KWQKHTMLPart::imageFromRect): Rearranged how this function does its exception handling to avoid a
3106         "may be clobbered" warning.
3107         * kwq/KWQKJavaAppletWidget.mm: Fixed incorrect import that said "KHTMLView.h" instead of "khtmlview.h".
3108         * kwq/KWQObject.mm: Made fields of KWQObjectTimerTarget public to avoid an error, new to gcc 4.0,
3109         about accessing protected Objective-C fields.
3110         * kwq/WebCoreBridge.mm: (partHasSelection): Used [bridge part] instead of getting directly at instance
3111         variable to avoid an error, new to gcc 4.0, about accessing protected Objective-C fields.
3112
3113         * WebCore-combined.exp: Regenerated.
3114         * WebCore-tests.exp: Added some additional symbols needed by the tests under gcc 4.0.
3115
3116 2005-04-28  Darin Adler  <darin@apple.com>
3117
3118         * WebCore.pbproj/project.pbxproj: Add back the main_thread_malloc files, rolled out by accident.
3119
3120 2005-04-27 Adele Peterson  <adele@apple.com>
3121
3122         Rolling out fix for <rdar://problem/4097849> because the following layout tests were failing:
3123
3124         fast/css/namespaces/001
3125         fast/css/namespaces/002
3126         fast/css/namespaces/004
3127         fast/css/namespaces/005
3128         fast/css/namespaces/006
3129         fast/overflow/003
3130         
3131
3132         * khtml/html/html_documentimpl.cpp:
3133         * khtml/html/html_documentimpl.h:
3134         * khtml/html/html_elementimpl.cpp:
3135         (HTMLElementImpl::namespaceURI):
3136         * khtml/xml/dom_docimpl.cpp:
3137         (DocumentImpl::importNode):
3138         (DocumentImpl::createElementNS):
3139         (DocumentImpl::createHTMLElement):
3140         (DocumentImpl::attrId):
3141         (DocumentImpl::tagId):
3142         * khtml/xml/dom_docimpl.h:
3143
3144 2005-04-27  John Sullivan  <sullivan@apple.com>
3145
3146         Reviewed by Darin.
3147         
3148         Experimental prototype of user-resizable textareas. All the new code is guarded by
3149         #if ALLOW_RESIZING_TEXTAREAS, which is false unless you remove a comment and rebuild.
3150         
3151         This code allows you to press near the bottom-right corner of any textarea and drag
3152         to resize the textarea on the page. It works correctly with textareas in left-aligned
3153         or centered blocks, but is weird in right-aligned blocks. It also does something
3154         sensible if the width is specified as a % (in that case, you can resize vertically only).
3155         The user-created-size survives resizing the window and survives the back/forward cache.
3156         It does not survive reloading the page.
3157         
3158         This complete-lack-of-affordance UI is obviously not shippable, but this proof of concept
3159         code could lead to a real user feature.
3160
3161         * kwq/KWQTextArea.mm:
3162         (-[KWQTextArea getNumColumns:andNumRows:forSize:]):
3163         new method that determines cols and rows for a given textarea frame size
3164         (-[KWQTextAreaTextView _trackResizeFromMouseDown:]):
3165         new method that tracks a drag and does a live resize-and-relayout
3166         (-[KWQTextAreaTextView mouseDown:]):
3167         if the mouse down is in the bottom-right corner, call _trackResizeFromMouseDown:
3168
3169 2005-04-27  John Sullivan  <sullivan@apple.com>
3170
3171         Reviewed by Adele.
3172
3173         - fixed problem with mouse wheel patch where alt and shift keys were switched
3174
3175         * khtml/xml/dom2_eventsimpl.h:
3176         use the order cntl, alt, shift, meta in KeyboardEventImpl constructors to match
3177         superclass. This isn't necessary to fix the bug, but is better for clarity.
3178         
3179         * khtml/xml/dom2_eventsimpl.cpp:
3180         (KeyboardEventImpl::KeyboardEventImpl):
3181         switch parameter order to match superclass. Then pass the parameters to superclass's
3182         constructor in the right order.
3183         (KeyboardEventImpl::initKeyboardEvent):
3184         Pass parameters to superclass's constructor in the right order.
3185
3186 2005-04-26  Adele Peterson  <adele@apple.com>
3187
3188         Fixed by Darin, reviewed by me.
3189
3190         Fix for <rdar://problem/4084029> designMode doesn't allow editing when iframe src = "" or = about:blank
3191         
3192         This change will add an HTML element for empty documents.  Now that there will be an HTMLDocument in this case, 
3193         a body will also be created (see rdar://problem/3758785). This was preventing frames with empty documents from 
3194         being editable.
3195
3196         * khtml/html/htmlparser.cpp: (KHTMLParser::finished):
3197
3198         Updated these tests to expect the HTML and BODY elements
3199         * layout-tests/fast/flexbox/016-expected.txt:
3200         * layout-tests/fast/frames/001-expected.txt:
3201         * layout-tests/fast/frames/002-expected.txt:
3202         * layout-tests/fast/frames/contentWindow_Frame-expected.txt:
3203         * layout-tests/fast/frames/contentWindow_iFrame-expected.txt:
3204         * layout-tests/fast/frames/empty-frame-src-expected.txt:
3205
3206 2005-04-26  Maciej Stachowiak  <mjs@apple.com>
3207
3208         New test case for <rdar://problem/4092136> reproducible crash in KJS::kjs_fast_realloc loading maps.google.com
3209
3210         * layout-tests/fast/js/string-from-char-code-expected.txt: Added.
3211         * layout-tests/fast/js/string-from-char-code.html: Added.
3212
3213 2005-04-26  Darin Adler  <darin@apple.com>
3214
3215         Reviewed by John.
3216
3217         - fixed <rdar://problem/3655817> please add support for mouse wheel events and the onmousewheel handler
3218
3219         Loose ends:
3220
3221             - need to test behavior of Windows IE with horizontal scroll wheeling; we currently send a distinct event
3222               for that relatively obscure case, which means the event handlers won't fire at all; might be incorrect
3223             - overflow scrolling is done after all DOM event handling, but ideally should be done in the overflowing
3224               element's default event handler; not important in practice
3225             - frame scrolling is done after all DOM event handling, but probably should be done in a default event handler;
3226               not sure about this, but it's probably not important in practice and definitely not required
3227
3228         - JavaScript
3229
3230         * khtml/ecma/kjs_events.h: Added DOMWheelEvent.
3231         * khtml/ecma/kjs_events.cpp:
3232         (KJS::getDOMEvent): Added a case for wheel event. To be forward looking, I use the event's impl pointer
3233         instead of a C++ DOM wrapper. Eventually it will all work this way.
3234         (offsetFromTarget): Added. Factored out code to compute offsetX/Y for an event.
3235         (DOMMouseEvent::getValueProperty): Changed to call offsetFromTarget for offsetX/Y.
3236         (DOMWheelEvent::DOMWheelEvent): Added.
3237         (DOMWheelEvent::tryGet): Added.
3238         (DOMWheelEvent::getValueProperty): Added.
3239         (DOMWheelEventProtoFunc::tryCall): Added. Nothing at the moment, but might get contents later.
3240
3241         * khtml/ecma/kjs_dom.h: Added OnMouseWheel to the enum with the list of properties.
3242         * khtml/ecma/kjs_dom.cpp: Added onmousewheel as a property of DOM nodes.
3243         (DOMNode::getValueProperty): Return the mouse wheel event handler.
3244         (DOMNode::putValue): Set the mouse wheel event handler.
3245
3246         * khtml/ecma/kjs_window.cpp: Added onmousewheel as a property of the window.
3247         (Window::get): Return the mouse wheel event handler.
3248         (Window::put): Set the mouse wheel event handler.
3249
3250         * khtml/ecma/kjs_window.h: Added OnWindowMouseWheel to the enum with the list of properties.
3251         (Other properties distinguish the window handler by lower-casing the initial letter, way too subtle,
3252         so I did this one a good way.)
3253
3254         * khtml/dom/dom2_events.h: Made the constructors for Event and UIEvent public. There's no good reason
3255         for them to be private, and I had to use the UIEvent one in the JavaScript implementation.
3256
3257         - DOM
3258         
3259         * khtml/xml/dom2_eventsimpl.h: Added events for mouse wheel and horizontal mouse wheel.
3260         Added isWheelEvent function to EventImpl.
3261         (DOM::UIEventWithKeyStateImpl): Added. Base class shared by mouse, wheel, and keyboard events.
3262         (DOM::MouseRelatedEventImpl): Added. Base class shared by mouse and wheel events.
3263         (DOM::WheelEventImpl): Added.
3264
3265         * khtml/xml/dom2_eventsimpl.cpp: Added "mousewheel" to list of event names and a placeholder for
3266         the horizontal mouse wheel.
3267         (EventImpl::isWheelEvent): Added. Returns false.
3268         (MouseRelatedEventImpl::MouseRelatedEventImpl): Added. Factored out what's shared between mouse
3269         events and wheel events to avoid duplicated code.
3270         (MouseRelatedEventImpl::computeLayerPos): Moved to MouseRelatedWheelEventImpl.
3271         (MouseEventImpl::MouseEventImpl): Changed since MouseRelatedWheelEventImpl is now the base class
3272         so we can share more code with wheel events.
3273         (KeyboardEventImpl::KeyboardEventImpl): Changed since UIEventWithKeyStateImpl is now the base class
3274         so we can share more code with mouse and wheel events.
3275         (WheelEventImpl::WheelEventImpl): Added.
3276         (WheelEventImpl::isWheelEvent): Added. Returns true.
3277
3278         * khtml/misc/htmlattrs.in: Added "onmousewheel" attribute name.
3279         * khtml/html/html_elementimpl.cpp: (HTMLElementImpl::parseHTMLAttribute): Added parsing of the
3280         "onmousewheel" atribute, consistent with other event handler attributes.
3281
3282         - event handling
3283
3284         * kwq/WebCoreBridge.h: Renamed scrollOverflowWithScrollWheelEvent to sendScrollWheelEvent.
3285         * kwq/WebCoreBridge.mm: (-[WebCoreBridge sendScrollWheelEvent:]): Renamed.
3286
3287         * kwq/KWQEvent.h: Added Wheel as an event type value.
3288         (QWheelEvent::QWheelEvent): Added.
3289         * kwq/KWQEvent.mm:
3290         (positionForEvent): Updated to know that wheel events have valid positions in them.
3291         (orientationForEvent): Added.
3292         (deltaForEvent): Added.
3293         (QWheelEvent::QWheelEvent): Added.
3294
3295         * kwq/KWQKHTMLPart.h: Renamed scrollOverflowWithScrollWheelEvent to wheelEvent.
3296         * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::wheelEvent): Renamed and added code to construct a QWheelEvent
3297         and send it along to KHTMLView::viewportWheelEvent, consistent with how mouse events work.
3298
3299         * khtml/khtmlview.cpp: (KHTMLView::viewportWheelEvent): Do a hit test to figure out which node to
3300         send the event to, and then call dispatchWheelEvent.
3301
3302         * khtml/xml/dom_nodeimpl.h: Added dispatchWheelEvent.
3303         * khtml/xml/dom_nodeimpl.cpp: (NodeImpl::dispatchWheelEvent): Added.
3304
3305         - generated files
3306
3307         * khtml/ecma/kjs_dom.lut.h: Regenerated.
3308         * khtml/ecma/kjs_events.lut.h: Regenerated.
3309         * khtml/ecma/kjs_window.lut.h: Regenerated.
3310         * khtml/misc/htmlattrs.c: Regenerated.
3311         * khtml/misc/htmlattrs.h: Regenerated.
3312
3313 2005-04-26  David Harrison  <harrison@apple.com>
3314
3315         Reviewed by Darin, Maciej.
3316
3317         <rdar://problem/4075576> Deleting text in new message borks content
3318         
3319         Fixed by removing the methods that attempted to preserve the position.  The idea
3320         of preserving position is a very recent one, and turned out to not actually address
3321         the problem it was intended to fix (see below).  Further, is unclear how the position
3322         could be preserved in a form that could be properly used later on.   Therefore,
3323         removing the code to work like before is the preferred alternative for this software
3324         update.  I've written <rdar://problem/4099839> to cover the bug that position
3325         preservation was supposed to fix (but did not).  Added layout tests for
3326         both this bug and 4099839.  Also, updated existing tests with correct expected results
3327         (delete-at-paragraph-boundaries-003 and 004).
3328
3329         * khtml/editing/htmlediting.cpp:
3330         (khtml::CompositeEditCommand::removeFullySelectedNode):
3331         (khtml::CompositeEditCommand::removeChildrenInRange):
3332         (khtml::DeleteSelectionCommand::handleGeneralDelete):
3333         * khtml/editing/htmlediting.h:
3334         * layout-tests/editing/deleting/delete-at-paragraph-boundaries-003-expected.txt:
3335         * layout-tests/editing/deleting/delete-at-paragraph-boundaries-004-expected.txt:
3336         * layout-tests/editing/deleting/delete-at-paragraph-boundaries-007-expected.txt: Added.
3337         * layout-tests/editing/deleting/delete-at-paragraph-boundaries-007.html: Added.
3338         * layout-tests/editing/deleting/delete-at-paragraph-boundaries-008-expected.txt: Added.
3339         * layout-tests/editing/deleting/delete-at-paragraph-boundaries-008.html: Added.
3340         * layout-tests/editing/deleting/delete-at-paragraph-boundaries-009-expected.txt: Added.
3341         * layout-tests/editing/deleting/delete-at-paragraph-boundaries-009.html: Added.
3342         * layout-tests/editing/deleting/delete-at-paragraph-boundaries-010-expected.txt: Added.
3343         * layout-tests/editing/deleting/delete-at-paragraph-boundaries-010.html: Added.
3344
3345 2005-04-26  Darin Adler  <darin@apple.com>
3346
3347         - fixed development builds
3348
3349         * khtml/misc/main_thread_malloc.h: Use inlines instead of macros for allocation functions.
3350
3351 2005-04-25  David Hyatt  <hyatt@apple.com>
3352
3353         Fix for 4097842, changing 1st line of a url that wraps doesn't update the second line.  Make sure to
3354         update line break info for the last dirty line so that when a clean line tries to figure out where it
3355         started, it will get an accurate position taking into account the updated string.  By doing this, the code
3356         will be able to properly distinguish between the old and new positions and not accidentally assume they are
3357         the same.
3358         
3359         Reviewed by darin
3360
3361         * khtml/rendering/render_text.cpp:
3362         (RenderText::setTextWithOffset):
3363
3364 2005-04-26  Darin Adler  <darin@apple.com>
3365
3366         Reviewed by Maciej.
3367
3368         - fixed <rdar://problem/4098826> Bezier curves broken in new Safari canvas object (last two parameters parsed incorrectly)
3369
3370         * khtml/ecma/kjs_html.cpp: (KJS::Context2DFunction::tryCall): Fixed incorrect argument indices.
3371         Thanks to Brian Campbell who figured out what was wrong.
3372
3373 2005-04-17  Maciej Stachowiak  <mjs@apple.com>
3374
3375         Reviewed by Darin.
3376
3377         - use single-threaded malloc in places where malloc is hot for an
3378         8% speed improvement on cvs-base
3379
3380         * ForwardingHeaders/misc/fast_malloc.h: Added.
3381         * WebCore.pbproj/project.pbxproj:
3382         * khtml/css/css_base.h:
3383         * khtml/css/css_ruleimpl.h:
3384         * khtml/css/css_valueimpl.h:
3385         * khtml/css/cssstyleselector.h:
3386         * khtml/misc/arena.cpp:
3387         (Are