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