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