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