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