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