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