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