2005-07-22 John Sullivan Reviewed by Chris Blumenberg. Test cases added: none, this only affects Safari autocomplete; it doesn't affect any web pages. - some changes in the direction of weaning all the form-related SPI from NSView * kwq/DOMExtensions.h: added -[DOMHTMLInputElement isTextField] * kwq/DOMHTML.mm: (-[DOMHTMLInputElement isTextField]): new method that returns YES if this element is one of the types that's represented by a text field (as opposed to a button, slider, etc.). I could have put this method in Safari, but it seems useful for other WebKit clients. * kwq/WebCoreBridge.h: * kwq/WebCoreBridge.mm: (-[WebCoreBridge viewForElement:]): added viewForElement: as a stopgap measure. This allowed me to convert controlsInForm: to return DOMElements rather than NSViews, while keeping autocomplete working in Safari tip of tree. When I finish the SPI conversion I'll delete this method. Note that from this point on, autocomplete will not work in Tiger Safari with tip of tree WebKit (it will always fail to find anything to autocomplete) (-[WebCoreBridge controlsInForm:]): now returns an array of DOMElement* rather than an array of NSView* 2005-07-21 Geoffrey Garen * WebCore.pbproj/project.pbxproj: Removed. 2005-07-21 Geoffrey Garen * WebCore.xcodeproj/.cvsignore: Added. 2005-07-21 Geoffrey Garen * WebCore.xcodeproj/project.pbxproj: Added. 2005-07-21 Geoffrey Garen * Makefile.am: 2005-07-21 Beth Dakin Reviewed by Hyatt. -fix for Also fixes the behavior of generated content when it is specified within a list element. Test cases added: (NONE) * khtml/rendering/render_block.cpp: (khtml::RenderBlock::setStyle): Added loop to skip over list elements hen updating generatedcontent. (khtml::RenderBlock::updateFirstLetter): Added clause so that the function updates the first letter instead of just creating it. * khtml/rendering/render_inline.cpp: (RenderInline::setStyle): Added loop to skip over list elements when updating generated content. 2005-07-20 Maciej Stachowiak Reviewed by Geoff. - fix handling of special properties of the HTML document object. Now we completely match IE. Test cases added: * layout-tests/fast/dom/HTMLDocument/document-special-properties.html: Added; new exhaustive test case. * layout-tests/fast/dom/HTMLDocument/document-special-properties-expected.txt: Added. * khtml/ecma/kjs_html.cpp: (KJS::HTMLDocument::hasOwnProperty): Check for named and doc extra named items. (KJS::HTMLDocument::get): Return the appropriate element, window or collection by name; give such named items precedence over built-in and custom properties. * khtml/ecma/kjs_window.cpp: (KJS::Window::get): Replace quirky &* idiom with call to get(). * khtml/html/html_baseimpl.cpp: (HTMLIFrameElementImpl::parseMappedAttribute): Track by name as a doc extra named item. (HTMLIFrameElementImpl::insertedIntoDocument): ditto (HTMLIFrameElementImpl::removedFromDocument): ditto * khtml/html/html_baseimpl.h: * khtml/html/html_documentimpl.cpp: (DOM::addItemToMap): Factored out from addNamedItem (DOM::removeItemFromMap): Factored out from removeNamedItem (DOM::HTMLDocumentImpl::addNamedItem): refactored (DOM::HTMLDocumentImpl::removeNamedItem): refactored (DOM::HTMLDocumentImpl::addDocExtraNamedItem): new method - maintains a hashtable of the "extra" named items for a document, which are iframes by name and applets and embeds by id. (DOM::HTMLDocumentImpl::removeDocExtraNamedItem): ditto (DOM::HTMLDocumentImpl::hasDocExtraNamedItem): ditto * khtml/html/html_documentimpl.h: * khtml/html/html_miscimpl.cpp: (DOM::HTMLCollectionImpl::traverseNextItem): Remove support for DOC_NAMEABLE_ITEMS collection - no longer needed. (DOM::HTMLNameCollectionImpl::traverseNextItem): Add support for DOCUMENT_NAMED_ITEMS, implementing the correct document rule. * khtml/html/html_miscimpl.h: (DOM::HTMLCollectionImpl::): * khtml/html/html_objectimpl.cpp: (DOM::HTMLAppletElementImpl::parseMappedAttribute): Track by id as doc extra named item (DOM::HTMLAppletElementImpl::insertedIntoDocument): ditto (DOM::HTMLAppletElementImpl::removedFromDocument): ditto (DOM::HTMLObjectElementImpl::parseMappedAttribute): ditto (DOM::HTMLObjectElementImpl::insertedIntoDocument): ditto (DOM::HTMLObjectElementImpl::removedFromDocument): ditto * khtml/html/html_objectimpl.h: * khtml/xml/dom_docimpl.cpp: (DocumentImpl::nameableItems): removed - no longer used (DocumentImpl::documentNamedItems): added * khtml/xml/dom_docimpl.h: 2005-07-20 John Sullivan Reviewed by Vicki Murley. - removed some form-related methods that weren't being used anywhere, in preparation for weaning WebKit's WebFormDelegate protocol from NSView. Test cases added: none, no behavior change * kwq/KWQTextField.mm: * kwq/WebCoreBridge.h: removed these methods: -control:didFailToFormatString:errorDescription: -control:didFailToValidatePartialString:errorDescription: -control:isValidObject: 2005-07-20 Adele Peterson Rolling fix for back in. 2005-03-11 David Harrison Reviewed by Darin. WebCore invokes undefined behavior when the spell checker isn't running * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::advanceToNextMisspelling): (KWQKHTMLPart::markMisspellings): Nil check checker. 2005-07-20 Adele Peterson Reviewed by Darin. - fixed 8C45: Safari repro crash with document.write (DOM::NodeImpl::dispatchEvent) Test cases added: * manual-tests/textfield-onblur.html: Added. * kwq/KWQTextField.mm: (-[KWQTextFieldController setHasFocus:]): added nil check for widget, since it can get deleted during an event. 2005-07-20 Maciej Stachowiak Patch from Trey Matteson , reviewed by me. - fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=3956 some of WebKit builds with symbols, some doesn't * WebCore.pbproj/project.pbxproj: Generate symbols even for Deployment. 2005-07-19 Maciej Stachowiak Reviewed by Kevin. - fixed some mistakes in my previous checkin * khtml/html/html_objectimpl.cpp: (DOM::HTMLAppletElementImpl::parseMappedAttribute): Take name attribute out of the "do nothing" case (duh). * layout-tests/fast/dom/Window/window-special-properties-expected.txt: Update for change to the text at the top. 2005-07-18 Maciej Stachowiak Reviewed by Darin. - fix handling of special properties of the Window object. now we almost completely match Win IE. Test cases added: * layout-tests/fast/dom/Window/window-special-properties-expected.txt: Added. * layout-tests/fast/dom/Window/window-special-properties.html: Added. * khtml/ecma/kjs_html.cpp: (KJS::HTMLDocument::hasOwnProperty): (KJS::HTMLDocument::tryGet): * khtml/ecma/kjs_window.cpp: (KJS::Window::get): (KJS::Window::hasOwnProperty): * khtml/html/html_documentimpl.cpp: (DOM::HTMLDocumentImpl::addNamedItem): (DOM::HTMLDocumentImpl::removeNamedItem): (DOM::HTMLDocumentImpl::hasNamedItem): * khtml/html/html_documentimpl.h: * khtml/html/html_formimpl.cpp: (DOM::HTMLFormElementImpl::attach): (DOM::HTMLFormElementImpl::insertedIntoDocument): (DOM::HTMLFormElementImpl::removedFromDocument): (DOM::HTMLFormElementImpl::parseMappedAttribute): * khtml/html/html_formimpl.h: * khtml/html/html_imageimpl.cpp: (HTMLImageElementImpl::parseMappedAttribute): (HTMLImageElementImpl::attach): (HTMLImageElementImpl::insertedIntoDocument): (HTMLImageElementImpl::removedFromDocument): * khtml/html/html_imageimpl.h: * khtml/html/html_miscimpl.cpp: (DOM::HTMLCollectionImpl::HTMLCollectionImpl): (DOM::HTMLCollectionImpl::traverseNextItem): (DOM::HTMLCollectionImpl::namedItem): (DOM::HTMLNameCollectionImpl::HTMLNameCollectionImpl): (DOM::HTMLNameCollectionImpl::traverseNextItem): (DOM::HTMLFormCollectionImpl::getNamedFormItem): (DOM::HTMLFormCollectionImpl::nextNamedItem): * khtml/html/html_miscimpl.h: (DOM::HTMLCollectionImpl::): * khtml/html/html_objectimpl.cpp: (DOM::HTMLAppletElementImpl::parseMappedAttribute): (DOM::HTMLAppletElementImpl::insertedIntoDocument): (DOM::HTMLAppletElementImpl::removedFromDocument): (DOM::HTMLEmbedElementImpl::parseMappedAttribute): (DOM::HTMLEmbedElementImpl::attach): (DOM::HTMLEmbedElementImpl::insertedIntoDocument): (DOM::HTMLEmbedElementImpl::removedFromDocument): (DOM::HTMLObjectElementImpl::parseMappedAttribute): (DOM::HTMLObjectElementImpl::detach): (DOM::HTMLObjectElementImpl::insertedIntoDocument): (DOM::HTMLObjectElementImpl::removedFromDocument): * khtml/html/html_objectimpl.h: * khtml/xml/dom_docimpl.cpp: (DocumentImpl::windowNamedItems): * khtml/xml/dom_docimpl.h: 2005-07-19 Geoffrey Garen -rolled in patch by Anders Carlsson for http://bugzilla.opendarwin.org/show_bug.cgi?id=3751 REGRESSION: affects Blogger, GMail & Wikipedia: empty textarea's which should have content Reviewed by mjs. * khtml/html/html_formimpl.cpp: (DOM::HTMLTextAreaElementImpl::defaultValue): (DOM::HTMLTextAreaElementImpl::attach): * khtml/html/html_formimpl.h: Test cases added: * manual-tests/textarea-after-stylesheet-link.html: Added. Test is manual because the result doesn't show up in DumpRenderTree 2005-07-19 Justin Garcia Added a virtual deconstructor to fix gcc4 build warning * khtml/rendering/render_theme.h: (khtml::RenderTheme::~RenderTheme): 2005-07-19 David Hyatt Adding support for the "checkbox" appearance value. This is not yet implemented, but the methods are now stubbed out and will get called. Reviewed by mjs * WebCore.pbproj/project.pbxproj: * khtml/css/cssstyleselector.cpp: (khtml::CSSStyleSelector::adjustRenderStyle): (khtml::CSSStyleSelector::applyProperty): * khtml/css/html4.css: * khtml/html/html_formimpl.cpp: (DOM::HTMLInputElementImpl::createRenderer): * khtml/rendering/render_box.cpp: (RenderBox::paintBoxDecorations): * khtml/rendering/render_theme.cpp: Added. (khtml::RenderTheme::adjustStyle): (khtml::RenderTheme::paint): * khtml/rendering/render_theme.h: Added. * khtml/rendering/render_theme_mac.h: Added. * khtml/rendering/render_theme_mac.mm: Added. (khtml::theme): (khtml::RenderThemeMac::adjustCheckboxStyle): (khtml::RenderThemeMac::paintCheckbox): 2005-07-19 David Hyatt Fix performance regressions from attribute QName landing. Reviewed by mjs * khtml/html/htmltokenizer.cpp: (khtml::Token::addAttribute): (khtml::HTMLTokenizer::write): Make sure attributes have a faster constructor that can avoid the copy of QualifiedNames. Make sure to grab the part from the document outside the loop, so that it is not fetched over and over again for every character in the source. * khtml/rendering/render_block.cpp: (khtml::RenderBlock::paintObject): Only call paintCaret if the block is actually editable. * khtml/xml/dom_atomicstring.h: (DOM::operator!=): * khtml/xml/dom_elementimpl.h: (DOM::AttributeImpl::AttributeImpl): (DOM::AttributeImpl::~AttributeImpl): (DOM::MappedAttributeImpl::MappedAttributeImpl): Add != comparison operator with a char* to speed up the / check for attribute invalidity. 2005-07-19 Vicki Murley Reviewed by Maciej. Test cases added: * manual-tests/scrollIntoView-horizontal.html: Added. * manual-tests/scrollIntoView-vertical.html: Added. * khtml/xml/dom_elementimpl.h: * khtml/xml/dom_elementimpl.cpp: (ElementImpl::scrollIntoView): Added. * khtml/ecma/kjs_dom.h: (KJS::DOMNode::): (KJS::DOMElement::): * khtml/ecma/kjs_dom.cpp: (KJS::DOMElementProtoFunc::tryCall): glue for new scrollIntoView function 2005-07-19 Geoffrey Garen - rolled in patch by opendarwin.org@mitzpettel.com for http://bugzilla.opendarwin.org/show_bug.cgi?id=3838 Text runs unnecessarily split at EN L boundaries Reviewed by hyatt. * khtml/rendering/bidi.cpp: (khtml::RenderBlock::bidiReorderLine): Lots of new test case results because previous results had inappropriately split text runs. * layout-tests/css1/basic/containment-expected.txt: * layout-tests/css1/box_properties/border-expected.txt: * layout-tests/css1/box_properties/border_bottom-expected.txt: * layout-tests/css1/box_properties/border_bottom_inline-expected.txt: * layout-tests/css1/box_properties/border_bottom_width-expected.txt: * layout-tests/css1/box_properties/border_bottom_width_inline-expected.txt: * layout-tests/css1/box_properties/border_inline-expected.txt: * layout-tests/css1/box_properties/border_left-expected.txt: * layout-tests/css1/box_properties/border_left_inline-expected.txt: * layout-tests/css1/box_properties/border_left_width-expected.txt: * layout-tests/css1/box_properties/border_left_width_inline-expected.txt: * layout-tests/css1/box_properties/border_right-expected.txt: * layout-tests/css1/box_properties/border_right_inline-expected.txt: * layout-tests/css1/box_properties/border_right_width-expected.txt: * layout-tests/css1/box_properties/border_right_width_inline-expected.txt: * layout-tests/css1/box_properties/border_top-expected.txt: * layout-tests/css1/box_properties/border_top_inline-expected.txt: * layout-tests/css1/box_properties/border_top_width-expected.txt: * layout-tests/css1/box_properties/border_top_width_inline-expected.txt: * layout-tests/css1/box_properties/border_width-expected.txt: * layout-tests/css1/box_properties/border_width_inline-expected.txt: * layout-tests/css1/box_properties/clear_float-expected.txt: * layout-tests/css1/box_properties/float_elements_in_series-expected.txt: * layout-tests/css1/box_properties/float_margin-expected.txt: * layout-tests/css1/box_properties/float_on_text_elements-expected.txt: * layout-tests/css1/box_properties/height-expected.txt: * layout-tests/css1/box_properties/margin-expected.txt: * layout-tests/css1/box_properties/margin_bottom-expected.txt: * layout-tests/css1/box_properties/margin_bottom_inline-expected.txt: * layout-tests/css1/box_properties/margin_inline-expected.txt: * layout-tests/css1/box_properties/margin_left-expected.txt: * layout-tests/css1/box_properties/margin_left_inline-expected.txt: * layout-tests/css1/box_properties/margin_right-expected.txt: * layout-tests/css1/box_properties/margin_right_inline-expected.txt: * layout-tests/css1/box_properties/margin_top-expected.txt: * layout-tests/css1/box_properties/margin_top_inline-expected.txt: * layout-tests/css1/box_properties/padding-expected.txt: * layout-tests/css1/box_properties/padding_bottom-expected.txt: * layout-tests/css1/box_properties/padding_bottom_inline-expected.txt: * layout-tests/css1/box_properties/padding_inline-expected.txt: * layout-tests/css1/box_properties/padding_left-expected.txt: * layout-tests/css1/box_properties/padding_left_inline-expected.txt: * layout-tests/css1/box_properties/padding_right-expected.txt: * layout-tests/css1/box_properties/padding_right_inline-expected.txt: * layout-tests/css1/box_properties/padding_top-expected.txt: * layout-tests/css1/box_properties/padding_top_inline-expected.txt: * layout-tests/css1/box_properties/width-expected.txt: * layout-tests/css1/classification/display-expected.txt: * layout-tests/css1/color_and_background/background_position-expected.txt: * layout-tests/css1/conformance/forward_compatible_parsing-expected.txt: * layout-tests/css1/font_properties/font-expected.txt: * layout-tests/css1/font_properties/font_size-expected.txt: * layout-tests/css1/formatting_model/canvas-expected.txt: * layout-tests/css1/formatting_model/floating_elements-expected.txt: * layout-tests/css1/formatting_model/height_of_lines-expected.txt: * layout-tests/css1/formatting_model/inline_elements-expected.txt: * layout-tests/css1/formatting_model/replaced_elements-expected.txt: * layout-tests/css1/formatting_model/vertical_formatting-expected.txt: * layout-tests/css1/pseudo/anchor-expected.txt: * layout-tests/css1/text_properties/letter_spacing-expected.txt: * layout-tests/css1/text_properties/line_height-expected.txt: * layout-tests/css1/text_properties/text_indent-expected.txt: * layout-tests/css1/text_properties/vertical_align-expected.txt: * layout-tests/css1/text_properties/word_spacing-expected.txt: * layout-tests/css1/units/length_units-expected.txt: * layout-tests/editing/style/relative-font-size-change-001-expected.txt: * layout-tests/editing/style/relative-font-size-change-002-expected.txt: * layout-tests/editing/style/relative-font-size-change-003-expected.txt: * layout-tests/editing/style/relative-font-size-change-004-expected.txt: * layout-tests/editing/style/smoosh-styles-003-expected.txt: * layout-tests/fast/block/basic/018-expected.txt: * layout-tests/fast/block/float/002-expected.txt: * layout-tests/fast/block/float/021-expected.txt: * layout-tests/fast/block/float/023-expected.txt: * layout-tests/fast/block/float/024-expected.txt: * layout-tests/fast/block/float/029-expected.txt: * layout-tests/fast/block/float/030-expected.txt: * layout-tests/fast/block/margin-collapse/043-expected.txt: * layout-tests/fast/block/margin-collapse/101-expected.txt: * layout-tests/fast/block/positioning/060-expected.txt: * layout-tests/fast/block/positioning/auto/001-expected.txt: * layout-tests/fast/block/positioning/auto/002-expected.txt: * layout-tests/fast/block/positioning/auto/003-expected.txt: * layout-tests/fast/block/positioning/auto/004-expected.txt: * layout-tests/fast/block/positioning/auto/005-expected.txt: * layout-tests/fast/block/positioning/auto/006-expected.txt: * layout-tests/fast/clip/001-expected.txt: * layout-tests/fast/clip/002-expected.txt: * layout-tests/fast/clip/003-expected.txt: * layout-tests/fast/clip/004-expected.txt: * layout-tests/fast/clip/005-expected.txt: * layout-tests/fast/clip/006-expected.txt: * layout-tests/fast/clip/007-expected.txt: * layout-tests/fast/clip/008-expected.txt: * layout-tests/fast/clip/009-expected.txt: * layout-tests/fast/clip/010-expected.txt: * layout-tests/fast/clip/011-expected.txt: * layout-tests/fast/clip/012-expected.txt: * layout-tests/fast/clip/013-expected.txt: * layout-tests/fast/clip/014-expected.txt: * layout-tests/fast/clip/015-expected.txt: * layout-tests/fast/clip/016-expected.txt: * layout-tests/fast/css-generated-content/012-expected.txt: * layout-tests/fast/css/008-expected.txt: * layout-tests/fast/css/MarqueeLayoutTest-expected.txt: * layout-tests/fast/css/apple-prefix-expected.txt: * layout-tests/fast/dom/quadraticCurveTo-expected.txt: * layout-tests/fast/dynamic/noninlinebadness-expected.txt: * layout-tests/fast/encoding/utf-16-big-endian-expected.txt: * layout-tests/fast/encoding/utf-16-little-endian-expected.txt: * layout-tests/fast/flexbox/001-expected.txt: * layout-tests/fast/flexbox/004-expected.txt: * layout-tests/fast/flexbox/007-expected.txt: * layout-tests/fast/flexbox/008-expected.txt: * layout-tests/fast/flexbox/009-expected.txt: * layout-tests/fast/flexbox/010-expected.txt: * layout-tests/fast/flexbox/012-expected.txt: * layout-tests/fast/flexbox/013-expected.txt: * layout-tests/fast/flexbox/014-expected.txt: * layout-tests/fast/flexbox/015-expected.txt: * layout-tests/fast/flexbox/018-expected.txt: * layout-tests/fast/flexbox/019-expected.txt: * layout-tests/fast/flexbox/020-expected.txt: * layout-tests/fast/flexbox/021-expected.txt: * layout-tests/fast/flexbox/022-expected.txt: * layout-tests/fast/flexbox/023-expected.txt: * layout-tests/fast/flexbox/024-expected.txt: * layout-tests/fast/invalid/012-expected.txt: * layout-tests/fast/invalid/016-expected.txt: * layout-tests/fast/invalid/nestedh3s-expected.txt: * layout-tests/fast/lists/003-expected.txt: * layout-tests/fast/replaced/004-expected.txt: * layout-tests/fast/selectors/166-expected.txt: * layout-tests/fast/table/032-expected.txt: * layout-tests/fast/table/border-collapsing/004-expected.txt: * layout-tests/fast/text/basic/003-expected.txt: * layout-tests/fast/text/basic/004-expected.txt: * layout-tests/fast/text/basic/005-expected.txt: * layout-tests/fast/text/basic/009-expected.txt: 2005-07-19 Darin Adler Reviewed by Geoff Garen. Test cases added: None. Structural change only. - eliminated try wrappers for get/put/call since we don't use C++ exceptions any more * khtml/ecma/kjs_binding.cpp: Removed DOMObject::get, DOMObject::set, DOMFunction::get, and DOMFunction::call. * khtml/ecma/kjs_binding.h: Removed get, set, tryGet, trySet, call, tryCall from DOMObject and DOMFunction. Removed DOMObjectLookupGet, DOMObjectLookupGetValue, and DOMObjectLookupPut. We can just do things the normal way now. The rest of the changes are just renames and removal of a couple stray tryCall wrappers. tryGet -> get tryPut -> put tryCall -> call putValue -> putValueProperty DOMObjectLookupGet -> lookupGet DOMObjectLookupGetValue -> lookupGetValue DOMObjectLookupPut -> lookupPut * khtml/ecma/domparser.cpp: (KJS::DOMParserProtoFunc::call): * khtml/ecma/kjs_css.cpp: (KJS::DOMCSSStyleDeclaration::get): (KJS::DOMCSSStyleDeclaration::put): (KJS::DOMCSSStyleDeclarationProtoFunc::call): (KJS::DOMStyleSheet::get): (KJS::DOMStyleSheet::put): (KJS::DOMStyleSheetList::get): (KJS::DOMStyleSheetListFunc::call): (KJS::DOMMediaList::get): (KJS::DOMMediaList::put): (KJS::KJS::DOMMediaListProtoFunc::call): (KJS::DOMCSSStyleSheet::get): (KJS::DOMCSSStyleSheetProtoFunc::call): (KJS::DOMCSSRuleList::get): (KJS::DOMCSSRuleListFunc::call): (KJS::DOMCSSRule::get): (KJS::DOMCSSRule::put): (KJS::DOMCSSRule::putValueProperty): (KJS::DOMCSSRuleFunc::call): (KJS::CSSRuleConstructor::get): (KJS::DOMCSSValue::get): (KJS::DOMCSSValue::put): (KJS::CSSValueConstructor::get): (KJS::DOMCSSPrimitiveValue::get): (KJS::DOMCSSPrimitiveValueProtoFunc::call): (KJS::CSSPrimitiveValueConstructor::get): (KJS::DOMCSSValueList::get): (KJS::DOMCSSValueListFunc::call): (KJS::DOMRGBColor::get): (KJS::DOMRect::get): (KJS::DOMCounter::get): * khtml/ecma/kjs_css.h: * khtml/ecma/kjs_dom.cpp: (KJS::DOMNode::get): (KJS::DOMNode::put): (KJS::DOMNode::putValueProperty): (KJS::DOMNodeProtoFunc::call): (KJS::DOMNodeList::get): (KJS::DOMNodeList::call): (KJS::DOMNodeListFunc::call): (KJS::DOMAttr::get): (KJS::DOMAttr::put): (KJS::DOMAttr::putValueProperty): (KJS::DOMDocument::get): (KJS::DOMDocument::put): (KJS::DOMDocument::putValueProperty): (KJS::DOMDocumentProtoFunc::call): (KJS::DOMElement::get): (KJS::DOMElementProtoFunc::call): (KJS::DOMDOMImplementationProtoFunc::call): (KJS::DOMDocumentType::get): (KJS::DOMNamedNodeMap::get): (KJS::DOMNamedNodeMapProtoFunc::call): (KJS::DOMProcessingInstruction::get): (KJS::DOMProcessingInstruction::put): (KJS::DOMNotation::get): (KJS::DOMEntity::get): (KJS::NodeConstructor::get): (KJS::DOMExceptionConstructor::get): (KJS::DOMNamedNodesCollection::get): (KJS::DOMCharacterData::get): (KJS::DOMCharacterData::put): (KJS::DOMCharacterDataProtoFunc::call): (KJS::DOMText::get): (KJS::DOMTextProtoFunc::call): * khtml/ecma/kjs_dom.h: * khtml/ecma/kjs_events.cpp: (KJS::EventConstructor::get): (KJS::DOMEvent::get): (KJS::DOMEvent::put): (KJS::DOMEvent::putValueProperty): (KJS::DOMEventProtoFunc::call): (KJS::EventExceptionConstructor::get): (KJS::DOMUIEvent::get): (KJS::DOMUIEventProtoFunc::call): (KJS::DOMMouseEvent::get): (KJS::DOMMouseEventProtoFunc::call): (KJS::DOMKeyboardEvent::get): (KJS::DOMKeyboardEventProtoFunc::call): (KJS::MutationEventConstructor::get): (KJS::DOMMutationEvent::get): (KJS::DOMMutationEventProtoFunc::call): (KJS::DOMWheelEvent::get): (KJS::DOMWheelEventProtoFunc::call): (KJS::Clipboard::get): (KJS::Clipboard::put): (KJS::Clipboard::putValueProperty): (KJS::ClipboardProtoFunc::call): * khtml/ecma/kjs_events.h: * khtml/ecma/kjs_html.cpp: (KJS::KJS::HTMLDocFunction::call): (KJS::HTMLDocument::get): (KJS::KJS::HTMLDocument::put): (KJS::KJS::HTMLDocument::putValueProperty): (KJS::KJS::HTMLElement::get): (KJS::KJS::HTMLElementFunction::call): (KJS::KJS::HTMLElement::put): (KJS::HTMLElement::putValueProperty): (KJS::KJS::HTMLCollection::get): (KJS::KJS::HTMLCollection::call): (KJS::KJS::HTMLCollectionProtoFunc::call): (KJS::KJS::HTMLSelectCollection::get): (KJS::KJS::HTMLSelectCollection::put): (KJS::Image::get): (KJS::Image::put): (KJS::Image::putValueProperty): (KJS::KJS::Context2DFunction::call): (KJS::Context2D::get): (KJS::Context2D::put): (KJS::Context2D::putValueProperty): (KJS::GradientFunction::call): (KJS::Gradient::get): (KJS::Gradient::put): (KJS::Gradient::putValueProperty): (KJS::ImagePattern::get): (KJS::ImagePattern::put): (KJS::ImagePattern::putValueProperty): * khtml/ecma/kjs_html.h: * khtml/ecma/kjs_navigator.cpp: (KJS::PluginsFunc::call): (KJS::NavigatorFunc::call): * khtml/ecma/kjs_range.cpp: (KJS::DOMRange::get): (KJS::DOMRangeProtoFunc::call): (KJS::RangeConstructor::get): * khtml/ecma/kjs_range.h: * khtml/ecma/kjs_traversal.cpp: (KJS::DOMNodeIterator::get): (KJS::DOMNodeIteratorProtoFunc::call): (KJS::NodeFilterConstructor::get): (KJS::DOMNodeFilterProtoFunc::call): (KJS::DOMTreeWalker::get): (KJS::DOMTreeWalker::put): (KJS::DOMTreeWalkerProtoFunc::call): * khtml/ecma/kjs_traversal.h: * khtml/ecma/kjs_views.cpp: (KJS::DOMAbstractView::get): (KJS::DOMAbstractViewFunc::call): * khtml/ecma/kjs_views.h: * khtml/ecma/kjs_window.cpp: (KJS::WindowFunc::call): (KJS::LocationFunc::call): (KJS::SelectionFunc::call): (KJS::HistoryFunc::call): (KJS::KonquerorFunc::call): * khtml/ecma/xmlhttprequest.cpp: (KJS::XMLHttpRequest::get): (KJS::XMLHttpRequest::put): (KJS::XMLHttpRequest::putValueProperty): (KJS::XMLHttpRequestProtoFunc::call): * khtml/ecma/xmlhttprequest.h: * khtml/ecma/xmlserializer.cpp: (KJS::XMLSerializerProtoFunc::call): 2005-07-19 Darin Adler Reviewed by Dave Hyatt. - fixed broken bi-di layout tests: the "dir" attribute was broken * khtml/html/html_elementimpl.cpp: (HTMLElementImpl::parseMappedAttribute): Fix one case that said "direction" where it should say "dir". 2005-07-19 Darin Adler - updated results of two tests that reflect properly-preserved namespace prefixes for attributes * layout-tests/fast/dom/dom-parse-serialize-display-expected.txt: * layout-tests/fast/dom/dom-parse-serialize-expected.txt: 2005-07-18 David Hyatt Add support for -khtml-appearance in preparation for the addition of RenderTheme to the tree for form controls. Make clean is required after this check-in, since there is some sort of bizarre bug with XCode dependencies on the property generation script. Reviewed by darin * khtml/css/cssparser.cpp: (CSSParser::parseValue): * khtml/css/cssproperties.in: * khtml/css/cssstyleselector.cpp: (khtml::CSSStyleSelector::applyProperty): * khtml/css/cssvalues.in: * khtml/rendering/render_style.cpp: (m_appearance): (StyleCSS3NonInheritedData::operator==): (RenderStyle::diff): * khtml/rendering/render_style.h: (khtml::): (khtml::RenderStyle::appearance): (khtml::RenderStyle::setAppearance): (khtml::RenderStyle::initialAppearance): 2005-07-18 David Harrison Reviewed by Justin. Test cases added: None. Existing tests were failing. Fix crash caused by my changes in revision 1.6 of khtml/editing/delete_selection_command.cpp. * khtml/editing/delete_selection_command.cpp: (khtml::DeleteSelectionCommand::calculateTypingStyleAfterDelete): Remove workaround that was added for missing typing style. (khtml::DeleteSelectionCommand::doApply): Make sure to call saveTypingStyleState() before handleSpecialCaseBRDelete(). 2005-07-18 David Hyatt Rename HTMLNames -> HTMLTags. Purely mechanical (done in XCode) so no review needed. * khtml/css/cssstyleselector.cpp: (khtml::CSSStyleSelector::adjustRenderStyle): (khtml::CSSStyleSelector::checkOneSelector): * khtml/dom/css_stylesheet.cpp: (LinkStyle::operator = ): (LinkStyle::sheet): * khtml/dom/html_base.cpp: (HTMLBodyElement::operator = ): (HTMLFrameElement::operator = ): (HTMLIFrameElement::operator = ): (HTMLFrameSetElement::operator = ): (HTMLHeadElement::operator = ): (HTMLHtmlElement::operator = ): * khtml/dom/html_block.cpp: (HTMLBlockquoteElement::operator = ): (HTMLDivElement::operator = ): (HTMLHRElement::operator = ): (HTMLHeadingElement::operator = ): (HTMLParagraphElement::operator = ): (HTMLPreElement::operator = ): * khtml/dom/html_form.cpp: (HTMLButtonElement::operator = ): (HTMLFieldSetElement::operator = ): (HTMLFormElement::operator = ): (HTMLInputElement::operator = ): (HTMLLabelElement::operator = ): (HTMLLegendElement::operator = ): (HTMLOptGroupElement::operator = ): (HTMLSelectElement::operator = ): (HTMLTextAreaElement::operator = ): (HTMLOptionElement::operator = ): (HTMLIsIndexElement::operator = ): * khtml/dom/html_head.cpp: (HTMLBaseElement::operator = ): (HTMLLinkElement::operator = ): (HTMLMetaElement::operator = ): (HTMLScriptElement::operator = ): (HTMLStyleElement::operator = ): (HTMLTitleElement::operator = ): * khtml/dom/html_image.cpp: (HTMLAreaElement::operator = ): (HTMLImageElement::operator = ): (HTMLMapElement::operator = ): * khtml/dom/html_inline.cpp: (HTMLAnchorElement::operator = ): (HTMLBRElement::operator = ): (HTMLFontElement::operator = ): (HTMLModElement::HTMLModElement): (HTMLModElement::operator = ): (HTMLQuoteElement::operator = ): * khtml/dom/html_list.cpp: (HTMLDListElement::operator = ): (HTMLDirectoryElement::operator = ): (HTMLLIElement::operator = ): (HTMLMenuElement::operator = ): (HTMLOListElement::operator = ): (HTMLUListElement::operator = ): * khtml/dom/html_misc.cpp: (HTMLBaseFontElement::operator = ): * khtml/dom/html_object.cpp: (DOM::HTMLAppletElement::operator = ): (DOM::HTMLObjectElement::operator = ): (DOM::HTMLParamElement::operator = ): * khtml/dom/html_table.cpp: (HTMLTableCaptionElement::operator = ): (HTMLTableCellElement::operator = ): (HTMLTableColElement::operator = ): (HTMLTableElement::operator = ): (HTMLTableRowElement::operator = ): (HTMLTableSectionElement::operator = ): * khtml/ecma/kjs_css.cpp: (KJS::DOMStyleSheetList::tryGet): * khtml/ecma/kjs_dom.cpp: (KJS::getRuntimeObject): * khtml/ecma/kjs_html.cpp: (KJS::HTMLDocument::tryGet): (KJS::KJS::HTMLDocument::putValue): (KJS::KJS::HTMLElement::classInfo): (KJS::HTMLElement::getSetInfo): (KJS::KJS::HTMLElement::tryGet): (KJS::KJS::HTMLElement::implementsCall): (KJS::KJS::HTMLElement::call): (KJS::KJS::HTMLElement::hasOwnProperty): (KJS::KJS::HTMLElement::toString): (KJS::getForm): (KJS::KJS::HTMLElement::pushEventHandlerScope): (KJS::KJS::HTMLElementFunction::tryCall): (KJS::KJS::HTMLElement::tryPut): (KJS::toHTMLTableCaptionElement): (KJS::toHTMLTableSectionElement): (KJS::KJS::HTMLCollection::tryGet): (KJS::KJS::HTMLSelectCollection::tryPut): * khtml/editing/apply_style_command.cpp: (khtml::isEmptyStyleSpan): (khtml::isEmptyFontTag): (khtml::createFontElement): (khtml::createStyleSpanElement): (khtml::ApplyStyleCommand::applyInlineStyle): (khtml::ApplyStyleCommand::isHTMLStyleNode): (khtml::ApplyStyleCommand::removeHTMLFontStyle): (khtml::ApplyStyleCommand::mergeEndWithNextIfIdentical): (khtml::ApplyStyleCommand::addInlineStyleIfNeeded): * khtml/editing/break_blockquote_command.cpp: (khtml::BreakBlockquoteCommand::doApply): * khtml/editing/composite_edit_command.cpp: (khtml::CompositeEditCommand::insertNodeBefore): (khtml::CompositeEditCommand::insertNodeAfter): (khtml::CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessary): (khtml::createBlockPlaceholderElement): * khtml/editing/delete_selection_command.cpp: (khtml::isListStructureNode): (khtml::DeleteSelectionCommand::handleSpecialCaseBRDelete): (khtml::DeleteSelectionCommand::handleGeneralDelete): (khtml::DeleteSelectionCommand::moveNodesAfterNode): * khtml/editing/htmlediting.cpp: (khtml::isSpecialElement): (khtml::createDefaultParagraphElement): (khtml::createBreakElement): (khtml::isMailBlockquote): * khtml/editing/insert_line_break_command.cpp: (khtml::InsertLineBreakCommand::doApply): * khtml/editing/insert_paragraph_separator_command.cpp: (khtml::InsertParagraphSeparatorCommand::doApply): * khtml/editing/markup.cpp: (khtml::startMarkup): (khtml::createMarkup): (khtml::createFragmentFromText): * khtml/editing/replace_selection_command.cpp: (khtml::isProbablyBlock): (khtml::isProbablyTableStructureNode): (khtml::ReplacementFragment::isInterchangeNewlineNode): (khtml::ReplacementFragment::removeStyleNodes): (khtml::ReplaceSelectionCommand::doApply): * khtml/editing/visible_position.cpp: (khtml::VisiblePosition::init): (khtml::VisiblePosition::isCandidate): (khtml::VisiblePosition::isAtomicNode): * khtml/editing/visible_text.cpp: (khtml::TextIterator::handleNonTextNode): (khtml::TextIterator::exitNode): (khtml::SimplifiedBackwardsTextIterator::handleNonTextNode): * khtml/editing/visible_units.cpp: (khtml::endOfLine): * khtml/html/html_baseimpl.cpp: (HTMLBodyElementImpl::HTMLBodyElementImpl): (HTMLFrameElementImpl::HTMLFrameElementImpl): (HTMLFrameElementImpl::attach): (HTMLFrameSetElementImpl::HTMLFrameSetElementImpl): (HTMLFrameSetElementImpl::checkDTD): (HTMLFrameSetElementImpl::attach): (HTMLHeadElementImpl::HTMLHeadElementImpl): (HTMLHeadElementImpl::checkDTD): (HTMLHtmlElementImpl::HTMLHtmlElementImpl): (HTMLHtmlElementImpl::checkDTD): (HTMLIFrameElementImpl::HTMLIFrameElementImpl): * khtml/html/html_blockimpl.cpp: (HTMLBlockquoteElementImpl::HTMLBlockquoteElementImpl): (HTMLDivElementImpl::HTMLDivElementImpl): (HTMLHRElementImpl::HTMLHRElementImpl): (HTMLHeadingElementImpl::checkDTD): (HTMLParagraphElementImpl::HTMLParagraphElementImpl): (HTMLParagraphElementImpl::checkDTD): (HTMLMarqueeElementImpl::HTMLMarqueeElementImpl): * khtml/html/html_canvasimpl.cpp: (HTMLCanvasElementImpl::HTMLCanvasElementImpl): * khtml/html/html_documentimpl.cpp: (DOM::HTMLDocumentImpl::childAllowed): * khtml/html/html_elementimpl.cpp: (HTMLElementImpl::endTagRequirement): (HTMLElementImpl::tagPriority): (HTMLElementImpl::createContextualFragment): (HTMLElementImpl::setInnerText): (HTMLElementImpl::setOuterText): (HTMLElementImpl::isRecognizedTagName): (inlineTagList): (blockTagList): (HTMLElementImpl::checkDTD): * khtml/html/html_formimpl.cpp: (DOM::HTMLFormElementImpl::HTMLFormElementImpl): (DOM::HTMLFormElementImpl::submitClick): (DOM::HTMLFormElementImpl::formData): (DOM::HTMLFormElementImpl::submit): (DOM::HTMLFormElementImpl::radioClicked): (DOM::HTMLGenericFormElementImpl::getForm): (DOM::HTMLButtonElementImpl::HTMLButtonElementImpl): (DOM::HTMLFieldSetElementImpl::HTMLFieldSetElementImpl): (DOM::HTMLFieldSetElementImpl::checkDTD): (DOM::HTMLInputElementImpl::HTMLInputElementImpl): (DOM::HTMLLabelElementImpl::HTMLLabelElementImpl): (DOM::HTMLLabelElementImpl::form): (DOM::HTMLLegendElementImpl::HTMLLegendElementImpl): (DOM::HTMLLegendElementImpl::formElement): (DOM::HTMLSelectElementImpl::HTMLSelectElementImpl): (DOM::HTMLSelectElementImpl::checkDTD): (DOM::HTMLSelectElementImpl::selectedIndex): (DOM::HTMLSelectElementImpl::setSelectedIndex): (DOM::HTMLSelectElementImpl::length): (DOM::HTMLSelectElementImpl::add): (DOM::HTMLSelectElementImpl::value): (DOM::HTMLSelectElementImpl::setValue): (DOM::HTMLSelectElementImpl::state): (DOM::HTMLSelectElementImpl::restoreState): (DOM::HTMLSelectElementImpl::appendFormData): (DOM::HTMLSelectElementImpl::optionToListIndex): (DOM::HTMLSelectElementImpl::listToOptionIndex): (DOM::HTMLSelectElementImpl::recalcListItems): (DOM::HTMLSelectElementImpl::reset): (DOM::HTMLSelectElementImpl::notifyOptionSelected): (DOM::HTMLKeygenElementImpl::HTMLKeygenElementImpl): (DOM::HTMLOptGroupElementImpl::HTMLOptGroupElementImpl): (DOM::HTMLOptGroupElementImpl::recalcSelectOptions): (DOM::HTMLOptionElementImpl::HTMLOptionElementImpl): (DOM::HTMLOptionElementImpl::index): (DOM::HTMLOptionElementImpl::getSelect): (DOM::HTMLTextAreaElementImpl::HTMLTextAreaElementImpl): (DOM::HTMLIsIndexElementImpl::HTMLIsIndexElementImpl): * khtml/html/html_formimpl.h: (DOM::HTMLOptGroupElementImpl::checkDTD): * khtml/html/html_headimpl.cpp: (HTMLBaseElementImpl::HTMLBaseElementImpl): (HTMLLinkElementImpl::HTMLLinkElementImpl): (HTMLMetaElementImpl::HTMLMetaElementImpl): (HTMLScriptElementImpl::HTMLScriptElementImpl): (HTMLStyleElementImpl::HTMLStyleElementImpl): (HTMLTitleElementImpl::HTMLTitleElementImpl): * khtml/html/html_imageimpl.cpp: (HTMLImageLoader::updateFromElement): (HTMLImageElementImpl::HTMLImageElementImpl): (HTMLMapElementImpl::HTMLMapElementImpl): (HTMLMapElementImpl::checkDTD): (HTMLMapElementImpl::mapMouseEvent): (HTMLAreaElementImpl::HTMLAreaElementImpl): * khtml/html/html_inlineimpl.cpp: (DOM::HTMLAnchorElementImpl::HTMLAnchorElementImpl): (DOM::HTMLAnchorElementImpl::defaultEventHandler): (DOM::HTMLBRElementImpl::HTMLBRElementImpl): (DOM::HTMLFontElementImpl::HTMLFontElementImpl): (DOM::HTMLQuoteElementImpl::HTMLQuoteElementImpl): * khtml/html/html_listimpl.cpp: (DOM::HTMLLIElementImpl::attach): * khtml/html/html_listimpl.h: (DOM::HTMLUListElementImpl::HTMLUListElementImpl): (DOM::HTMLDirectoryElementImpl::HTMLDirectoryElementImpl): (DOM::HTMLMenuElementImpl::HTMLMenuElementImpl): (DOM::HTMLOListElementImpl::HTMLOListElementImpl): (DOM::HTMLLIElementImpl::HTMLLIElementImpl): (DOM::HTMLDListElementImpl::HTMLDListElementImpl): * khtml/html/html_miscimpl.cpp: (DOM::HTMLBaseFontElementImpl::HTMLBaseFontElementImpl): (DOM::HTMLCollectionImpl::traverseNextItem): (DOM::HTMLCollectionImpl::checkForNameMatch): (DOM::HTMLCollectionImpl::updateNameCache): (DOM::HTMLFormCollectionImpl::getNamedFormItem): (DOM::HTMLFormCollectionImpl::updateNameCache): * khtml/html/html_objectimpl.cpp: (DOM::HTMLAppletElementImpl::HTMLAppletElementImpl): (DOM::HTMLAppletElementImpl::checkDTD): (DOM::HTMLEmbedElementImpl::HTMLEmbedElementImpl): (DOM::HTMLEmbedElementImpl::checkDTD): (DOM::HTMLEmbedElementImpl::rendererIsNeeded): (DOM::HTMLObjectElementImpl::HTMLObjectElementImpl): (DOM::HTMLObjectElementImpl::checkDTD): (DOM::HTMLObjectElementImpl::form): (DOM::HTMLParamElementImpl::HTMLParamElementImpl): * khtml/html/html_tableimpl.cpp: (DOM::HTMLTableElementImpl::HTMLTableElementImpl): (DOM::HTMLTableElementImpl::checkDTD): (DOM::HTMLTableElementImpl::createTHead): (DOM::HTMLTableElementImpl::createTFoot): (DOM::HTMLTableElementImpl::insertRow): (DOM::HTMLTableElementImpl::deleteRow): (DOM::HTMLTableElementImpl::addChild): (DOM::HTMLTableSectionElementImpl::checkDTD): (DOM::HTMLTableSectionElementImpl::addChild): (DOM::HTMLTableSectionElementImpl::numRows): (DOM::HTMLTableRowElementImpl::checkDTD): (DOM::HTMLTableRowElementImpl::addChild): (DOM::HTMLTableRowElementImpl::rowIndex): (DOM::HTMLTableRowElementImpl::sectionRowIndex): (DOM::HTMLTableRowElementImpl::insertCell): (DOM::HTMLTableCellElementImpl::cellIndex): (DOM::HTMLTableCellElementImpl::additionalAttributeStyleDecl): (DOM::HTMLTableColElementImpl::HTMLTableColElementImpl): * khtml/html/html_tableimpl.h: (DOM::HTMLTableRowElementImpl::HTMLTableRowElementImpl): (DOM::HTMLTableColElementImpl::endTagRequirement): (DOM::HTMLTableColElementImpl::tagPriority): (DOM::HTMLTableColElementImpl::checkDTD): (DOM::HTMLTableCaptionElementImpl::HTMLTableCaptionElementImpl): * khtml/html/htmlfactory.cpp: (DOM::headingConstructor): (DOM::preConstructor): (DOM::modConstructor): (DOM::tableColConstructor): (DOM::tableCellConstructor): (DOM::tableSectionConstructor): (DOM::HTMLElementFactory::createHTMLElement): * khtml/html/htmlnames.cpp: (DOM::HTMLTags::init): * khtml/html/htmlnames.h: * khtml/html/htmlparser.cpp: (HTMLParser::parseToken): (isTableSection): (isTablePart): (isTableRelated): (HTMLParser::handleError): (HTMLParser::headCreateErrorCheck): (HTMLParser::bodyCreateErrorCheck): (HTMLParser::framesetCreateErrorCheck): (HTMLParser::iframeCreateErrorCheck): (HTMLParser::ddCreateErrorCheck): (HTMLParser::dtCreateErrorCheck): (HTMLParser::tableCellCreateErrorCheck): (HTMLParser::tableSectionCreateErrorCheck): (HTMLParser::noembedCreateErrorCheck): (HTMLParser::noframesCreateErrorCheck): (HTMLParser::noscriptCreateErrorCheck): (HTMLParser::getNode): (HTMLParser::processCloseTag): (HTMLParser::isHeaderTag): (HTMLParser::isInline): (HTMLParser::isResidualStyleTag): (HTMLParser::isAffectedByResidualStyle): (HTMLParser::popBlock): * khtml/html/htmltokenizer.cpp: (khtml::HTMLTokenizer::parseSpecial): (khtml::HTMLTokenizer::scriptHandler): (khtml::HTMLTokenizer::parseTag): * khtml/khtml_part.cpp: (KHTMLPart::init): (KHTMLPart::selectionComputedStyle): * khtml/khtmlview.cpp: (KHTMLView::layout): (isSubmitImage): * khtml/misc/decoder.cpp: (Decoder::decode): * khtml/rendering/render_applet.cpp: (RenderApplet::createWidgetIfNecessary): * khtml/rendering/render_block.cpp: (khtml::RenderBlock::layoutBlock): * khtml/rendering/render_box.cpp: (RenderBox::paintRootBoxDecorations): (RenderBox::paintBackgroundExtended): * khtml/rendering/render_canvasimage.cpp: (RenderCanvasImage::paint): * khtml/rendering/render_flow.cpp: (RenderFlow::addFocusRingRects): * khtml/rendering/render_form.cpp: (RenderFieldset::findLegend): (RenderSelect::updateFromElement): (RenderSelect::layout): (RenderSelect::slotSelected): (RenderSelect::slotSelectionChanged): (RenderSelect::updateSelection): * khtml/rendering/render_frames.cpp: (RenderPartObject::updateWidget): (RenderPartObject::slotViewCleared): * khtml/rendering/render_image.cpp: (RenderImage::paint): (RenderImage::imageMap): (RenderImage::updateAltText): * khtml/rendering/render_layer.cpp: (Marquee::marqueeSpeed): * khtml/rendering/render_list.cpp: (getParentOfFirstLineBox): * khtml/rendering/render_object.cpp: (RenderObject::isBody): (RenderObject::isHR): (RenderObject::isHTMLMarquee): (RenderObject::sizesToMaxWidth): (RenderObject::setStyle): (RenderObject::getTextDecorationColors): (RenderObject::setPixmap): * khtml/rendering/render_table.cpp: (RenderTable::addChild): (RenderTable::layout): (RenderTableSection::addChild): (RenderTableRow::addChild): (RenderTableCell::updateFromElement): (RenderTableCol::updateFromElement): * khtml/xml/dom_docimpl.cpp: (DocumentImpl::createElementNS): (DocumentImpl::body): (DocumentImpl::shouldScheduleLayout): (DocumentImpl::recalcStyleSelector): * khtml/xml/dom_nodeimpl.cpp: (DOM::NodeImpl::maxDeepOffset): (DOM::NodeImpl::enclosingBlockFlowOrTableElement): (DOM::NodeImpl::enclosingBlockFlowElement): (DOM::NodeImpl::enclosingInlineElement): (DOM::NodeImpl::rootEditableElement): (DOM::NodeImpl::showTreeAndMark): * khtml/xml/dom_position.cpp: (DOM::Position::downstream): (DOM::Position::rendersInDifferentPosition): (DOM::Position::leadingWhitespacePosition): (DOM::Position::trailingWhitespacePosition): * khtml/xml/xml_tokenizer.cpp: (khtml::XMLTokenizer::startElement): (khtml::XMLTokenizer::insertErrorMessageBlock): (khtml::XMLTokenizer::addScripts): * kwq/DOM.mm: (+[DOMNode _nodeWithImpl:]): * kwq/DOMHTML.mm: * kwq/KWQAccObject.mm: (-[KWQAccObject role]): (-[KWQAccObject title]): (-[KWQAccObject accessibilityIsIgnored]): * kwq/KWQKHTMLPart.cpp: (KWQKHTMLPart::isFrameSet): * kwq/KWQKHTMLPart.mm: (scanForForm): (KWQKHTMLPart::currentForm): (KWQKHTMLPart::searchForLabelsBeforeElement): (listParent): (isTextFirstInListItem): (KWQKHTMLPart::attributedString): (KWQKHTMLPart::styleForSelectionStart): (KWQKHTMLPart::setSelectionFromNone): * kwq/WebCoreBridge.mm: (inputElementFromDOMElement): (formElementFromDOMElement): (-[WebCoreBridge elementAtPoint:]): 2005-07-18 David Hyatt Fix for bugzilla bug 3927. Convert attributes to use QualifiedName. Reviewed by mjs * WebCore.pbproj/project.pbxproj: * khtml/css/css_base.cpp: (CSSSelector::print): (CSSSelector::selectorText): * khtml/css/css_base.h: (DOM::CSSSelector::CSSSelector): (DOM::CSSSelector::hasTag): (DOM::CSSSelector::hasAttribute): * khtml/css/css_stylesheetimpl.cpp: (CSSStyleSheetImpl::determineNamespace): * khtml/css/cssparser.cpp: (CSSParser::parseContent): * khtml/css/cssstyleselector.cpp: (khtml::checkPseudoState): (khtml::CSSStyleSelector::canShareStyleWithElement): (khtml::CSSStyleSelector::checkOneSelector): (khtml::CSSStyleSelector::applyProperty): * khtml/css/parser.y: * khtml/dom/css_stylesheet.cpp: * khtml/dom/html_base.cpp: * khtml/dom/html_block.cpp: * khtml/dom/html_document.cpp: * khtml/dom/html_element.cpp: * khtml/dom/html_form.cpp: * khtml/dom/html_head.cpp: * khtml/dom/html_image.cpp: * khtml/dom/html_inline.cpp: * khtml/dom/html_list.cpp: * khtml/dom/html_misc.cpp: * khtml/dom/html_object.cpp: * khtml/dom/html_table.cpp: * khtml/ecma/kjs_html.cpp: (KJS::HTMLElement::inputGetter): (KJS::HTMLElement::inputSetter): * khtml/editing/apply_style_command.cpp: (khtml::isStyleSpan): (khtml::isEmptyStyleSpan): (khtml::isEmptyFontTag): (khtml::createFontElement): (khtml::createStyleSpanElement): (khtml::ApplyStyleCommand::applyRelativeFontStyleChange): (khtml::ApplyStyleCommand::removeHTMLFontStyle): (khtml::ApplyStyleCommand::applyTextDecorationStyle): (khtml::areIdenticalElements): (khtml::ApplyStyleCommand::addBlockStyleIfNeeded): (khtml::ApplyStyleCommand::addInlineStyleIfNeeded): * khtml/editing/composite_edit_command.cpp: (khtml::CompositeEditCommand::removeNodeAttribute): (khtml::CompositeEditCommand::setNodeAttribute): (khtml::CompositeEditCommand::findBlockPlaceholder): (khtml::createBlockPlaceholderElement): * khtml/editing/composite_edit_command.h: * khtml/editing/markup.cpp: (khtml::startMarkup): (khtml::completeURLs): (khtml::createFragmentFromText): * khtml/editing/remove_node_attribute_command.cpp: (khtml::RemoveNodeAttributeCommand::RemoveNodeAttributeCommand): * khtml/editing/remove_node_attribute_command.h: (khtml::RemoveNodeAttributeCommand::attribute): * khtml/editing/replace_selection_command.cpp: (khtml::ReplacementFragment::isInterchangeNewlineNode): (khtml::ReplacementFragment::isInterchangeConvertedSpaceSpan): * khtml/editing/set_node_attribute_command.cpp: (khtml::SetNodeAttributeCommand::SetNodeAttributeCommand): * khtml/editing/set_node_attribute_command.h: (khtml::SetNodeAttributeCommand::attribute): * khtml/html/html_baseimpl.cpp: (HTMLBodyElementImpl::mapToEntry): (HTMLBodyElementImpl::parseMappedAttribute): (HTMLBodyElementImpl::insertedIntoDocument): (HTMLBodyElementImpl::isURLAttribute): (HTMLBodyElementImpl::aLink): (HTMLBodyElementImpl::setALink): (HTMLBodyElementImpl::background): (HTMLBodyElementImpl::setBackground): (HTMLBodyElementImpl::bgColor): (HTMLBodyElementImpl::setBgColor): (HTMLBodyElementImpl::link): (HTMLBodyElementImpl::setLink): (HTMLBodyElementImpl::text): (HTMLBodyElementImpl::setText): (HTMLBodyElementImpl::vLink): (HTMLBodyElementImpl::setVLink): (HTMLFrameElementImpl::parseMappedAttribute): (HTMLFrameElementImpl::attach): (HTMLFrameElementImpl::isURLAttribute): (HTMLFrameElementImpl::frameBorder): (HTMLFrameElementImpl::setFrameBorder): (HTMLFrameElementImpl::longDesc): (HTMLFrameElementImpl::setLongDesc): (HTMLFrameElementImpl::marginHeight): (HTMLFrameElementImpl::setMarginHeight): (HTMLFrameElementImpl::marginWidth): (HTMLFrameElementImpl::setMarginWidth): (HTMLFrameElementImpl::name): (HTMLFrameElementImpl::setName): (HTMLFrameElementImpl::setNoResize): (HTMLFrameElementImpl::scrolling): (HTMLFrameElementImpl::setScrolling): (HTMLFrameElementImpl::src): (HTMLFrameElementImpl::setSrc): (HTMLFrameSetElementImpl::parseMappedAttribute): (HTMLFrameSetElementImpl::cols): (HTMLFrameSetElementImpl::setCols): (HTMLFrameSetElementImpl::rows): (HTMLFrameSetElementImpl::setRows): (HTMLHeadElementImpl::profile): (HTMLHeadElementImpl::setProfile): (HTMLHtmlElementImpl::version): (HTMLHtmlElementImpl::setVersion): (HTMLIFrameElementImpl::mapToEntry): (HTMLIFrameElementImpl::parseMappedAttribute): (HTMLIFrameElementImpl::attach): (HTMLIFrameElementImpl::isURLAttribute): (HTMLIFrameElementImpl::align): (HTMLIFrameElementImpl::setAlign): (HTMLIFrameElementImpl::height): (HTMLIFrameElementImpl::setHeight): (HTMLIFrameElementImpl::src): (HTMLIFrameElementImpl::width): (HTMLIFrameElementImpl::setWidth): * khtml/html/html_baseimpl.h: * khtml/html/html_blockimpl.cpp: (HTMLBlockquoteElementImpl::cite): (HTMLBlockquoteElementImpl::setCite): (HTMLDivElementImpl::mapToEntry): (HTMLDivElementImpl::parseMappedAttribute): (HTMLDivElementImpl::align): (HTMLDivElementImpl::setAlign): (HTMLHRElementImpl::mapToEntry): (HTMLHRElementImpl::parseMappedAttribute): (HTMLHRElementImpl::align): (HTMLHRElementImpl::setAlign): (HTMLHRElementImpl::noShade): (HTMLHRElementImpl::setNoShade): (HTMLHRElementImpl::size): (HTMLHRElementImpl::setSize): (HTMLHRElementImpl::width): (HTMLHRElementImpl::setWidth): (HTMLHeadingElementImpl::align): (HTMLHeadingElementImpl::setAlign): (HTMLParagraphElementImpl::mapToEntry): (HTMLParagraphElementImpl::parseMappedAttribute): (HTMLParagraphElementImpl::align): (HTMLParagraphElementImpl::setAlign): (HTMLPreElementImpl::width): (HTMLPreElementImpl::setWidth): (HTMLMarqueeElementImpl::mapToEntry): (HTMLMarqueeElementImpl::parseMappedAttribute): * khtml/html/html_blockimpl.h: * khtml/html/html_canvasimpl.cpp: (HTMLCanvasElementImpl::mapToEntry): (HTMLCanvasElementImpl::parseMappedAttribute): (HTMLCanvasElementImpl::isURLAttribute): * khtml/html/html_canvasimpl.h: * khtml/html/html_documentimpl.cpp: * khtml/html/html_elementimpl.cpp: (HTMLElementImpl::mapToEntry): (HTMLElementImpl::parseMappedAttribute): (HTMLElementImpl::setContentEditable): (HTMLElementImpl::id): (HTMLElementImpl::setId): (HTMLElementImpl::title): (HTMLElementImpl::setTitle): (HTMLElementImpl::lang): (HTMLElementImpl::setLang): (HTMLElementImpl::dir): (HTMLElementImpl::setDir): (HTMLElementImpl::className): (HTMLElementImpl::setClassName): * khtml/html/html_elementimpl.h: * khtml/html/html_formimpl.cpp: (DOM::HTMLFormElementImpl::parseMappedAttribute): (DOM::HTMLFormElementImpl::isURLAttribute): (DOM::HTMLFormElementImpl::name): (DOM::HTMLFormElementImpl::setName): (DOM::HTMLFormElementImpl::acceptCharset): (DOM::HTMLFormElementImpl::setAcceptCharset): (DOM::HTMLFormElementImpl::action): (DOM::HTMLFormElementImpl::setAction): (DOM::HTMLFormElementImpl::setEnctype): (DOM::HTMLFormElementImpl::method): (DOM::HTMLFormElementImpl::setMethod): (DOM::HTMLFormElementImpl::target): (DOM::HTMLFormElementImpl::setTarget): (DOM::HTMLGenericFormElementImpl::parseMappedAttribute): (DOM::HTMLGenericFormElementImpl::name): (DOM::HTMLGenericFormElementImpl::setName): (DOM::HTMLGenericFormElementImpl::setDisabled): (DOM::HTMLGenericFormElementImpl::setReadOnly): (DOM::HTMLGenericFormElementImpl::tabIndex): (DOM::HTMLGenericFormElementImpl::setTabIndex): (DOM::HTMLButtonElementImpl::type): (DOM::HTMLButtonElementImpl::parseMappedAttribute): (DOM::HTMLButtonElementImpl::accessKey): (DOM::HTMLButtonElementImpl::setAccessKey): (DOM::HTMLButtonElementImpl::value): (DOM::HTMLButtonElementImpl::setValue): (DOM::HTMLInputElementImpl::setType): (DOM::HTMLInputElementImpl::mapToEntry): (DOM::HTMLInputElementImpl::parseMappedAttribute): (DOM::HTMLInputElementImpl::attach): (DOM::HTMLInputElementImpl::altText): (DOM::HTMLInputElementImpl::value): (DOM::HTMLInputElementImpl::setValue): (DOM::HTMLInputElementImpl::isURLAttribute): (DOM::HTMLInputElementImpl::defaultValue): (DOM::HTMLInputElementImpl::setDefaultValue): (DOM::HTMLInputElementImpl::defaultChecked): (DOM::HTMLInputElementImpl::setDefaultChecked): (DOM::HTMLInputElementImpl::accept): (DOM::HTMLInputElementImpl::setAccept): (DOM::HTMLInputElementImpl::accessKey): (DOM::HTMLInputElementImpl::setAccessKey): (DOM::HTMLInputElementImpl::align): (DOM::HTMLInputElementImpl::setAlign): (DOM::HTMLInputElementImpl::alt): (DOM::HTMLInputElementImpl::setAlt): (DOM::HTMLInputElementImpl::setMaxLength): (DOM::HTMLInputElementImpl::setSize): (DOM::HTMLInputElementImpl::src): (DOM::HTMLInputElementImpl::setSrc): (DOM::HTMLInputElementImpl::useMap): (DOM::HTMLInputElementImpl::setUseMap): (DOM::HTMLLabelElementImpl::parseMappedAttribute): (DOM::HTMLLabelElementImpl::formElement): (DOM::HTMLLabelElementImpl::accessKey): (DOM::HTMLLabelElementImpl::setAccessKey): (DOM::HTMLLabelElementImpl::htmlFor): (DOM::HTMLLabelElementImpl::setHtmlFor): (DOM::HTMLLegendElementImpl::accessKey): (DOM::HTMLLegendElementImpl::setAccessKey): (DOM::HTMLLegendElementImpl::align): (DOM::HTMLLegendElementImpl::setAlign): (DOM::HTMLSelectElementImpl::parseMappedAttribute): (DOM::HTMLSelectElementImpl::reset): (DOM::HTMLSelectElementImpl::setMultiple): (DOM::HTMLSelectElementImpl::setSize): (DOM::HTMLKeygenElementImpl::parseMappedAttribute): (DOM::HTMLOptGroupElementImpl::label): (DOM::HTMLOptGroupElementImpl::setLabel): (DOM::HTMLOptionElementImpl::text): (DOM::HTMLOptionElementImpl::parseMappedAttribute): (DOM::HTMLOptionElementImpl::setValue): (DOM::HTMLOptionElementImpl::defaultSelected): (DOM::HTMLOptionElementImpl::setDefaultSelected): (DOM::HTMLOptionElementImpl::label): (DOM::HTMLOptionElementImpl::setLabel): (DOM::HTMLTextAreaElementImpl::parseMappedAttribute): (DOM::HTMLTextAreaElementImpl::accessKey): (DOM::HTMLTextAreaElementImpl::setAccessKey): (DOM::HTMLTextAreaElementImpl::setCols): (DOM::HTMLTextAreaElementImpl::setRows): (DOM::HTMLIsIndexElementImpl::parseMappedAttribute): (DOM::HTMLIsIndexElementImpl::prompt): (DOM::HTMLIsIndexElementImpl::setPrompt): * khtml/html/html_formimpl.h: * khtml/html/html_headimpl.cpp: (HTMLBaseElementImpl::parseMappedAttribute): (HTMLBaseElementImpl::setHref): (HTMLBaseElementImpl::setTarget): (HTMLLinkElementImpl::parseMappedAttribute): (HTMLLinkElementImpl::process): (HTMLLinkElementImpl::isURLAttribute): (HTMLLinkElementImpl::disabled): (HTMLLinkElementImpl::setDisabled): (HTMLLinkElementImpl::charset): (HTMLLinkElementImpl::setCharset): (HTMLLinkElementImpl::href): (HTMLLinkElementImpl::setHref): (HTMLLinkElementImpl::hreflang): (HTMLLinkElementImpl::setHreflang): (HTMLLinkElementImpl::media): (HTMLLinkElementImpl::setMedia): (HTMLLinkElementImpl::rel): (HTMLLinkElementImpl::setRel): (HTMLLinkElementImpl::rev): (HTMLLinkElementImpl::setRev): (HTMLLinkElementImpl::target): (HTMLLinkElementImpl::setTarget): (HTMLLinkElementImpl::type): (HTMLLinkElementImpl::setType): (HTMLMetaElementImpl::parseMappedAttribute): (HTMLMetaElementImpl::content): (HTMLMetaElementImpl::setContent): (HTMLMetaElementImpl::httpEquiv): (HTMLMetaElementImpl::setHttpEquiv): (HTMLMetaElementImpl::name): (HTMLMetaElementImpl::setName): (HTMLMetaElementImpl::scheme): (HTMLMetaElementImpl::setScheme): (HTMLScriptElementImpl::isURLAttribute): (HTMLScriptElementImpl::insertedIntoDocument): (HTMLScriptElementImpl::charset): (HTMLScriptElementImpl::setCharset): (HTMLScriptElementImpl::defer): (HTMLScriptElementImpl::setDefer): (HTMLScriptElementImpl::src): (HTMLScriptElementImpl::setSrc): (HTMLScriptElementImpl::type): (HTMLScriptElementImpl::setType): (HTMLStyleElementImpl::parseMappedAttribute): (HTMLStyleElementImpl::disabled): (HTMLStyleElementImpl::setDisabled): (HTMLStyleElementImpl::media): (HTMLStyleElementImpl::setMedia): (HTMLStyleElementImpl::type): (HTMLStyleElementImpl::setType): * khtml/html/html_imageimpl.cpp: (HTMLImageLoader::updateFromElement): (HTMLImageElementImpl::mapToEntry): (HTMLImageElementImpl::parseMappedAttribute): (HTMLImageElementImpl::altText): (HTMLImageElementImpl::width): (HTMLImageElementImpl::height): (HTMLImageElementImpl::isURLAttribute): (HTMLImageElementImpl::name): (HTMLImageElementImpl::setName): (HTMLImageElementImpl::align): (HTMLImageElementImpl::setAlign): (HTMLImageElementImpl::alt): (HTMLImageElementImpl::setAlt): (HTMLImageElementImpl::border): (HTMLImageElementImpl::setBorder): (HTMLImageElementImpl::setHeight): (HTMLImageElementImpl::hspace): (HTMLImageElementImpl::setHspace): (HTMLImageElementImpl::isMap): (HTMLImageElementImpl::setIsMap): (HTMLImageElementImpl::longDesc): (HTMLImageElementImpl::setLongDesc): (HTMLImageElementImpl::src): (HTMLImageElementImpl::setSrc): (HTMLImageElementImpl::useMap): (HTMLImageElementImpl::setUseMap): (HTMLImageElementImpl::vspace): (HTMLImageElementImpl::setVspace): (HTMLImageElementImpl::setWidth): (HTMLMapElementImpl::parseMappedAttribute): (HTMLMapElementImpl::name): (HTMLMapElementImpl::setName): (HTMLAreaElementImpl::parseMappedAttribute): (HTMLAreaElementImpl::accessKey): (HTMLAreaElementImpl::setAccessKey): (HTMLAreaElementImpl::alt): (HTMLAreaElementImpl::setAlt): (HTMLAreaElementImpl::coords): (HTMLAreaElementImpl::setCoords): (HTMLAreaElementImpl::href): (HTMLAreaElementImpl::setHref): (HTMLAreaElementImpl::noHref): (HTMLAreaElementImpl::setNoHref): (HTMLAreaElementImpl::shape): (HTMLAreaElementImpl::setShape): (HTMLAreaElementImpl::tabIndex): (HTMLAreaElementImpl::setTabIndex): (HTMLAreaElementImpl::target): (HTMLAreaElementImpl::setTarget): * khtml/html/html_imageimpl.h: * khtml/html/html_inlineimpl.cpp: (DOM::HTMLAnchorElementImpl::defaultEventHandler): (DOM::HTMLAnchorElementImpl::parseMappedAttribute): (DOM::HTMLAnchorElementImpl::isURLAttribute): (DOM::HTMLAnchorElementImpl::accessKey): (DOM::HTMLAnchorElementImpl::setAccessKey): (DOM::HTMLAnchorElementImpl::charset): (DOM::HTMLAnchorElementImpl::setCharset): (DOM::HTMLAnchorElementImpl::coords): (DOM::HTMLAnchorElementImpl::setCoords): (DOM::HTMLAnchorElementImpl::href): (DOM::HTMLAnchorElementImpl::setHref): (DOM::HTMLAnchorElementImpl::hreflang): (DOM::HTMLAnchorElementImpl::setHreflang): (DOM::HTMLAnchorElementImpl::name): (DOM::HTMLAnchorElementImpl::setName): (DOM::HTMLAnchorElementImpl::rel): (DOM::HTMLAnchorElementImpl::setRel): (DOM::HTMLAnchorElementImpl::rev): (DOM::HTMLAnchorElementImpl::setRev): (DOM::HTMLAnchorElementImpl::shape): (DOM::HTMLAnchorElementImpl::setShape): (DOM::HTMLAnchorElementImpl::tabIndex): (DOM::HTMLAnchorElementImpl::setTabIndex): (DOM::HTMLAnchorElementImpl::target): (DOM::HTMLAnchorElementImpl::setTarget): (DOM::HTMLAnchorElementImpl::type): (DOM::HTMLAnchorElementImpl::setType): (DOM::HTMLBRElementImpl::mapToEntry): (DOM::HTMLBRElementImpl::parseMappedAttribute): (DOM::HTMLBRElementImpl::clear): (DOM::HTMLBRElementImpl::setClear): (DOM::HTMLFontElementImpl::mapToEntry): (DOM::HTMLFontElementImpl::parseMappedAttribute): (DOM::HTMLFontElementImpl::color): (DOM::HTMLFontElementImpl::setColor): (DOM::HTMLFontElementImpl::face): (DOM::HTMLFontElementImpl::setFace): (DOM::HTMLFontElementImpl::size): (DOM::HTMLFontElementImpl::setSize): (DOM::HTMLModElementImpl::cite): (DOM::HTMLModElementImpl::setCite): (DOM::HTMLModElementImpl::dateTime): (DOM::HTMLModElementImpl::setDateTime): (DOM::HTMLQuoteElementImpl::cite): (DOM::HTMLQuoteElementImpl::setCite): * khtml/html/html_inlineimpl.h: * khtml/html/html_listimpl.cpp: (DOM::HTMLUListElementImpl::mapToEntry): (DOM::HTMLUListElementImpl::parseMappedAttribute): (DOM::HTMLUListElementImpl::compact): (DOM::HTMLUListElementImpl::setCompact): (DOM::HTMLUListElementImpl::type): (DOM::HTMLUListElementImpl::setType): (DOM::HTMLDirectoryElementImpl::compact): (DOM::HTMLDirectoryElementImpl::setCompact): (DOM::HTMLMenuElementImpl::compact): (DOM::HTMLMenuElementImpl::setCompact): (DOM::HTMLOListElementImpl::mapToEntry): (DOM::HTMLOListElementImpl::parseMappedAttribute): (DOM::HTMLOListElementImpl::compact): (DOM::HTMLOListElementImpl::setCompact): (DOM::HTMLOListElementImpl::setStart): (DOM::HTMLOListElementImpl::type): (DOM::HTMLOListElementImpl::setType): (DOM::HTMLLIElementImpl::mapToEntry): (DOM::HTMLLIElementImpl::parseMappedAttribute): (DOM::HTMLLIElementImpl::type): (DOM::HTMLLIElementImpl::setType): (DOM::HTMLLIElementImpl::value): (DOM::HTMLLIElementImpl::setValue): (DOM::HTMLDListElementImpl::compact): (DOM::HTMLDListElementImpl::setCompact): * khtml/html/html_listimpl.h: * khtml/html/html_miscimpl.cpp: (DOM::HTMLBaseFontElementImpl::color): (DOM::HTMLBaseFontElementImpl::setColor): (DOM::HTMLBaseFontElementImpl::face): (DOM::HTMLBaseFontElementImpl::setFace): (DOM::HTMLBaseFontElementImpl::size): (DOM::HTMLBaseFontElementImpl::setSize): (DOM::HTMLCollectionImpl::traverseNextItem): (DOM::HTMLCollectionImpl::checkForNameMatch): (DOM::HTMLCollectionImpl::updateNameCache): (DOM::HTMLFormCollectionImpl::getNamedItem): (DOM::HTMLFormCollectionImpl::getNamedFormItem): (DOM::HTMLFormCollectionImpl::nextNamedItemInternal): (DOM::HTMLFormCollectionImpl::namedItem): (DOM::HTMLFormCollectionImpl::nextNamedItem): (DOM::HTMLFormCollectionImpl::updateNameCache): * khtml/html/html_miscimpl.h: * khtml/html/html_objectimpl.cpp: (DOM::HTMLAppletElementImpl::mapToEntry): (DOM::HTMLAppletElementImpl::parseMappedAttribute): (DOM::HTMLAppletElementImpl::rendererIsNeeded): (DOM::HTMLAppletElementImpl::createRenderer): (DOM::HTMLAppletElementImpl::align): (DOM::HTMLAppletElementImpl::setAlign): (DOM::HTMLAppletElementImpl::alt): (DOM::HTMLAppletElementImpl::setAlt): (DOM::HTMLAppletElementImpl::archive): (DOM::HTMLAppletElementImpl::setArchive): (DOM::HTMLAppletElementImpl::code): (DOM::HTMLAppletElementImpl::setCode): (DOM::HTMLAppletElementImpl::codeBase): (DOM::HTMLAppletElementImpl::setCodeBase): (DOM::HTMLAppletElementImpl::height): (DOM::HTMLAppletElementImpl::setHeight): (DOM::HTMLAppletElementImpl::hspace): (DOM::HTMLAppletElementImpl::setHspace): (DOM::HTMLAppletElementImpl::name): (DOM::HTMLAppletElementImpl::setName): (DOM::HTMLAppletElementImpl::object): (DOM::HTMLAppletElementImpl::setObject): (DOM::HTMLAppletElementImpl::vspace): (DOM::HTMLAppletElementImpl::setVspace): (DOM::HTMLAppletElementImpl::width): (DOM::HTMLAppletElementImpl::setWidth): (DOM::HTMLEmbedElementImpl::mapToEntry): (DOM::HTMLEmbedElementImpl::parseMappedAttribute): (DOM::HTMLEmbedElementImpl::isURLAttribute): (DOM::HTMLObjectElementImpl::mapToEntry): (DOM::HTMLObjectElementImpl::parseMappedAttribute): (DOM::HTMLObjectElementImpl::isURLAttribute): (DOM::HTMLObjectElementImpl::code): (DOM::HTMLObjectElementImpl::setCode): (DOM::HTMLObjectElementImpl::align): (DOM::HTMLObjectElementImpl::setAlign): (DOM::HTMLObjectElementImpl::archive): (DOM::HTMLObjectElementImpl::setArchive): (DOM::HTMLObjectElementImpl::border): (DOM::HTMLObjectElementImpl::setBorder): (DOM::HTMLObjectElementImpl::codeBase): (DOM::HTMLObjectElementImpl::setCodeBase): (DOM::HTMLObjectElementImpl::codeType): (DOM::HTMLObjectElementImpl::setCodeType): (DOM::HTMLObjectElementImpl::data): (DOM::HTMLObjectElementImpl::setData): (DOM::HTMLObjectElementImpl::declare): (DOM::HTMLObjectElementImpl::setDeclare): (DOM::HTMLObjectElementImpl::height): (DOM::HTMLObjectElementImpl::setHeight): (DOM::HTMLObjectElementImpl::hspace): (DOM::HTMLObjectElementImpl::setHspace): (DOM::HTMLObjectElementImpl::name): (DOM::HTMLObjectElementImpl::setName): (DOM::HTMLObjectElementImpl::standby): (DOM::HTMLObjectElementImpl::setStandby): (DOM::HTMLObjectElementImpl::tabIndex): (DOM::HTMLObjectElementImpl::setTabIndex): (DOM::HTMLObjectElementImpl::type): (DOM::HTMLObjectElementImpl::setType): (DOM::HTMLObjectElementImpl::useMap): (DOM::HTMLObjectElementImpl::setUseMap): (DOM::HTMLObjectElementImpl::vspace): (DOM::HTMLObjectElementImpl::setVspace): (DOM::HTMLObjectElementImpl::width): (DOM::HTMLObjectElementImpl::setWidth): (DOM::HTMLParamElementImpl::parseMappedAttribute): (DOM::HTMLParamElementImpl::isURLAttribute): (DOM::HTMLParamElementImpl::setName): (DOM::HTMLParamElementImpl::type): (DOM::HTMLParamElementImpl::setType): (DOM::HTMLParamElementImpl::setValue): (DOM::HTMLParamElementImpl::valueType): (DOM::HTMLParamElementImpl::setValueType): * khtml/html/html_objectimpl.h: * khtml/html/html_tableimpl.cpp: (DOM::HTMLTableElementImpl::mapToEntry): (DOM::HTMLTableElementImpl::parseMappedAttribute): (DOM::HTMLTableElementImpl::additionalAttributeStyleDecl): (DOM::HTMLTableElementImpl::getSharedCellDecl): (DOM::HTMLTableElementImpl::isURLAttribute): (DOM::HTMLTableElementImpl::align): (DOM::HTMLTableElementImpl::setAlign): (DOM::HTMLTableElementImpl::bgColor): (DOM::HTMLTableElementImpl::setBgColor): (DOM::HTMLTableElementImpl::border): (DOM::HTMLTableElementImpl::setBorder): (DOM::HTMLTableElementImpl::cellPadding): (DOM::HTMLTableElementImpl::setCellPadding): (DOM::HTMLTableElementImpl::cellSpacing): (DOM::HTMLTableElementImpl::setCellSpacing): (DOM::HTMLTableElementImpl::frame): (DOM::HTMLTableElementImpl::setFrame): (DOM::HTMLTableElementImpl::rules): (DOM::HTMLTableElementImpl::setRules): (DOM::HTMLTableElementImpl::summary): (DOM::HTMLTableElementImpl::setSummary): (DOM::HTMLTableElementImpl::width): (DOM::HTMLTableElementImpl::setWidth): (DOM::HTMLTablePartElementImpl::mapToEntry): (DOM::HTMLTablePartElementImpl::parseMappedAttribute): (DOM::HTMLTableSectionElementImpl::align): (DOM::HTMLTableSectionElementImpl::setAlign): (DOM::HTMLTableSectionElementImpl::ch): (DOM::HTMLTableSectionElementImpl::setCh): (DOM::HTMLTableSectionElementImpl::chOff): (DOM::HTMLTableSectionElementImpl::setChOff): (DOM::HTMLTableSectionElementImpl::vAlign): (DOM::HTMLTableSectionElementImpl::setVAlign): (DOM::HTMLTableRowElementImpl::align): (DOM::HTMLTableRowElementImpl::setAlign): (DOM::HTMLTableRowElementImpl::bgColor): (DOM::HTMLTableRowElementImpl::setBgColor): (DOM::HTMLTableRowElementImpl::ch): (DOM::HTMLTableRowElementImpl::setCh): (DOM::HTMLTableRowElementImpl::chOff): (DOM::HTMLTableRowElementImpl::setChOff): (DOM::HTMLTableRowElementImpl::vAlign): (DOM::HTMLTableRowElementImpl::setVAlign): (DOM::HTMLTableCellElementImpl::mapToEntry): (DOM::HTMLTableCellElementImpl::parseMappedAttribute): (DOM::HTMLTableCellElementImpl::isURLAttribute): (DOM::HTMLTableCellElementImpl::abbr): (DOM::HTMLTableCellElementImpl::setAbbr): (DOM::HTMLTableCellElementImpl::align): (DOM::HTMLTableCellElementImpl::setAlign): (DOM::HTMLTableCellElementImpl::axis): (DOM::HTMLTableCellElementImpl::setAxis): (DOM::HTMLTableCellElementImpl::bgColor): (DOM::HTMLTableCellElementImpl::setBgColor): (DOM::HTMLTableCellElementImpl::ch): (DOM::HTMLTableCellElementImpl::setCh): (DOM::HTMLTableCellElementImpl::chOff): (DOM::HTMLTableCellElementImpl::setChOff): (DOM::HTMLTableCellElementImpl::setColSpan): (DOM::HTMLTableCellElementImpl::headers): (DOM::HTMLTableCellElementImpl::setHeaders): (DOM::HTMLTableCellElementImpl::height): (DOM::HTMLTableCellElementImpl::setHeight): (DOM::HTMLTableCellElementImpl::noWrap): (DOM::HTMLTableCellElementImpl::setNoWrap): (DOM::HTMLTableCellElementImpl::setRowSpan): (DOM::HTMLTableCellElementImpl::scope): (DOM::HTMLTableCellElementImpl::setScope): (DOM::HTMLTableCellElementImpl::vAlign): (DOM::HTMLTableCellElementImpl::setVAlign): (DOM::HTMLTableCellElementImpl::width): (DOM::HTMLTableCellElementImpl::setWidth): (DOM::HTMLTableColElementImpl::mapToEntry): (DOM::HTMLTableColElementImpl::parseMappedAttribute): (DOM::HTMLTableColElementImpl::align): (DOM::HTMLTableColElementImpl::setAlign): (DOM::HTMLTableColElementImpl::ch): (DOM::HTMLTableColElementImpl::setCh): (DOM::HTMLTableColElementImpl::chOff): (DOM::HTMLTableColElementImpl::setChOff): (DOM::HTMLTableColElementImpl::setSpan): (DOM::HTMLTableColElementImpl::vAlign): (DOM::HTMLTableColElementImpl::setVAlign): (DOM::HTMLTableColElementImpl::width): (DOM::HTMLTableColElementImpl::setWidth): (DOM::HTMLTableCaptionElementImpl::mapToEntry): (DOM::HTMLTableCaptionElementImpl::parseMappedAttribute): (DOM::HTMLTableCaptionElementImpl::align): (DOM::HTMLTableCaptionElementImpl::setAlign): * khtml/html/html_tableimpl.h: * khtml/html/htmlnames.cpp: (DOM::HTMLNames::init): (DOM::HTMLAttributes::init): * khtml/html/htmlnames.h: * khtml/html/htmlparser.cpp: (HTMLParser::handleError): (HTMLParser::framesetCreateErrorCheck): (HTMLParser::handleIsindex): * khtml/html/htmltokenizer.cpp: (khtml::Token::addAttribute): (khtml::HTMLTokenizer::HTMLTokenizer): (khtml::HTMLTokenizer::parseTag): (khtml::HTMLTokenizer::processToken): * khtml/html/htmltokenizer.h: * khtml/khtml_part.cpp: (KHTMLPart::init): (KHTMLPart::backgroundURL): (KHTMLPart::updateActions): (KHTMLPart::handleMouseMoveEventDrag): (KHTMLPart::selectionComputedStyle): (KHTMLPart::applyEditingStyleToElement): (KHTMLPart::removeEditingStyleFromElement): * khtml/khtmlview.cpp: * khtml/misc/decoder.cpp: * khtml/misc/htmlattrs.in: Removed. * khtml/misc/htmlhashes.cpp: Removed. * khtml/misc/htmlhashes.h: Removed. * khtml/misc/htmltags.in: Removed. * khtml/misc/makeattrs: Removed. * khtml/misc/maketags: Removed. * khtml/rendering/render_box.cpp: * khtml/rendering/render_form.cpp: (RenderLineEdit::updateFromElement): (RenderSelect::updateFromElement): (RenderSlider::updateFromElement): (RenderSlider::slotSliderValueChanged): * khtml/rendering/render_frames.cpp: (RenderPartObject::updateWidget): * khtml/rendering/render_object.cpp: * khtml/rendering/render_table.cpp: (RenderTableCell::calcMinMaxWidth): * khtml/xml/dom_docimpl.cpp: (DocumentImpl::createElement): (DocumentImpl::importNode): (DocumentImpl::createElementNS): (DocumentImpl::getElementById): (DocumentImpl::getElementByAccessKey): (DocumentImpl::prepareMouseEvent): (DocumentImpl::recalcStyleSelector): (DocumentImpl::createAttributeNS): * khtml/xml/dom_docimpl.h: * khtml/xml/dom_elementimpl.cpp: (AttributeImpl::clone): (AttributeImpl::allocateImpl): (AttrImpl::AttrImpl): (AttrImpl::~AttrImpl): (AttrImpl::nodeName): (AttrImpl::name): (ElementImpl::removeAttribute): (ElementImpl::setAttribute): (ElementImpl::getAttribute): (ElementImpl::getAttributeNS): (ElementImpl::createAttribute): (ElementImpl::setAttributeMap): (ElementImpl::nodeName): (ElementImpl::insertedIntoDocument): (ElementImpl::removedFromDocument): (ElementImpl::openTagStartToString): (ElementImpl::dump): (ElementImpl::formatForDebugger): (ElementImpl::removeAttributeNode): (ElementImpl::setAttributeNS): (ElementImpl::removeAttributeNS): (ElementImpl::getAttributeNodeNS): (ElementImpl::hasAttributeNS): (NamedAttrMapImpl::getNamedItem): (NamedAttrMapImpl::setNamedItem): (NamedAttrMapImpl::removeNamedItem): (NamedAttrMapImpl::getAttributeItem): (NamedAttrMapImpl::clearAttributes): (NamedAttrMapImpl::operator=): (NamedAttrMapImpl::addAttribute): (NamedAttrMapImpl::removeAttribute): (StyledElementImpl::getMappedAttributeDecl): (StyledElementImpl::setMappedAttributeDecl): (StyledElementImpl::removeMappedAttributeDecl): (StyledElementImpl::updateStyleAttributeIfNeeded): (MappedAttributeImpl::clone): (NamedMappedAttrMapImpl::mapsEquivalent): (StyledElementImpl::createAttribute): (StyledElementImpl::attributeChanged): (StyledElementImpl::mapToEntry): (StyledElementImpl::parseMappedAttribute): * khtml/xml/dom_elementimpl.h: (DOM::AttributeImpl::AttributeImpl): (DOM::AttributeImpl::value): (DOM::AttributeImpl::prefix): (DOM::AttributeImpl::localName): (DOM::AttributeImpl::namespaceURI): (DOM::AttributeImpl::name): (DOM::AttributeImpl::attrImpl): (DOM::AttributeImpl::isNull): (DOM::AttributeImpl::isEmpty): (DOM::AttributeImpl::setValue): (DOM::AttributeImpl::setPrefix): (DOM::NamedAttrMapImpl::insertAttribute): (DOM::CSSMappedAttributeDeclarationImpl::CSSMappedAttributeDeclarationImpl): (DOM::CSSMappedAttributeDeclarationImpl::setMappedState): (DOM::MappedAttributeImpl::MappedAttributeImpl): (DOM::StyledElementImpl::isMappedAttribute): * khtml/xml/dom_nodeimpl.cpp: (DOM::NodeImpl::namespaceURI): (DOM::appendAttributeDesc): (DOM::NodeImpl::showNode): (DOM::NameNodeListImpl::nodeMatches): (DOM::NamedNodeMapImpl::getNamedItemNS): (DOM::NamedNodeMapImpl::removeNamedItemNS): * khtml/xml/dom_nodeimpl.h: * khtml/xml/dom_qname.cpp: (DOM::QualifiedName::toString): (DOM::QualifiedName::init): * khtml/xml/dom_qname.h: (DOM::anyQName): * khtml/xml/dom_textimpl.cpp: * khtml/xml/xml_tokenizer.cpp: (khtml::XMLTokenizer::startElement): (khtml::XMLTokenizer::insertErrorMessageBlock): (khtml::XMLTokenizer::executeScripts): * kwq/DOMHTML.h: * kwq/DOMHTML.mm: (-[DOMHTMLElement idName]): (-[DOMHTMLElement setIdName:]): (-[DOMHTMLElement title]): (-[DOMHTMLElement setTitle:]): (-[DOMHTMLElement lang]): (-[DOMHTMLElement setLang:]): (-[DOMHTMLElement dir]): (-[DOMHTMLElement setDir:]): (-[DOMHTMLElement className]): (-[DOMHTMLElement setClassName:]): (-[DOMHTMLHtmlElement version]): (-[DOMHTMLHtmlElement setVersion:]): (-[DOMHTMLHeadElement profile]): (-[DOMHTMLHeadElement setProfile:]): (-[DOMHTMLLinkElement disabled]): (-[DOMHTMLLinkElement setDisabled:]): (-[DOMHTMLLinkElement charset]): (-[DOMHTMLLinkElement setCharset:]): (-[DOMHTMLLinkElement setHref:]): (-[DOMHTMLLinkElement hreflang]): (-[DOMHTMLLinkElement setHreflang:]): (-[DOMHTMLLinkElement media]): (-[DOMHTMLLinkElement setMedia:]): (-[DOMHTMLLinkElement rel]): (-[DOMHTMLLinkElement setRel:]): (-[DOMHTMLLinkElement rev]): (-[DOMHTMLLinkElement setRev:]): (-[DOMHTMLLinkElement target]): (-[DOMHTMLLinkElement setTarget:]): (-[DOMHTMLLinkElement type]): (-[DOMHTMLLinkElement setType:]): (-[DOMHTMLTitleElement text]): (-[DOMHTMLTitleElement setText:]): (-[DOMHTMLMetaElement content]): (-[DOMHTMLMetaElement setContent:]): (-[DOMHTMLMetaElement httpEquiv]): (-[DOMHTMLMetaElement setHttpEquiv:]): (-[DOMHTMLMetaElement name]): (-[DOMHTMLMetaElement setName:]): (-[DOMHTMLMetaElement scheme]): (-[DOMHTMLMetaElement setScheme:]): (-[DOMHTMLBaseElement setHref:]): (-[DOMHTMLBaseElement target]): (-[DOMHTMLBaseElement setTarget:]): (-[DOMHTMLStyleElement disabled]): (-[DOMHTMLStyleElement setDisabled:]): (-[DOMHTMLStyleElement media]): (-[DOMHTMLStyleElement setMedia:]): (-[DOMHTMLStyleElement type]): (-[DOMHTMLStyleElement setType:]): (-[DOMHTMLBodyElement aLink]): (-[DOMHTMLBodyElement setALink:]): (-[DOMHTMLBodyElement background]): (-[DOMHTMLBodyElement setBackground:]): (-[DOMHTMLBodyElement bgColor]): (-[DOMHTMLBodyElement setBgColor:]): (-[DOMHTMLBodyElement link]): (-[DOMHTMLBodyElement setLink:]): (-[DOMHTMLBodyElement text]): (-[DOMHTMLBodyElement setText:]): (-[DOMHTMLBodyElement vLink]): (-[DOMHTMLBodyElement setVLink:]): (-[DOMHTMLFormElement name]): (-[DOMHTMLFormElement setName:]): (-[DOMHTMLFormElement acceptCharset]): (-[DOMHTMLFormElement setAcceptCharset:]): (-[DOMHTMLFormElement action]): (-[DOMHTMLFormElement setAction:]): (-[DOMHTMLFormElement enctype]): (-[DOMHTMLFormElement setEnctype:]): (-[DOMHTMLFormElement method]): (-[DOMHTMLFormElement setMethod:]): (-[DOMHTMLFormElement target]): (-[DOMHTMLFormElement setTarget:]): (-[DOMHTMLIsIndexElement prompt]): (-[DOMHTMLIsIndexElement setPrompt:]): (-[DOMHTMLSelectElement disabled]): (-[DOMHTMLSelectElement setDisabled:]): (-[DOMHTMLSelectElement multiple]): (-[DOMHTMLSelectElement setMultiple:]): (-[DOMHTMLSelectElement size]): (-[DOMHTMLSelectElement setSize:]): (-[DOMHTMLOptGroupElement disabled]): (-[DOMHTMLOptGroupElement setDisabled:]): (-[DOMHTMLOptGroupElement label]): (-[DOMHTMLOptGroupElement setLabel:]): (-[DOMHTMLOptionElement defaultSelected]): (-[DOMHTMLOptionElement setDefaultSelected:]): (-[DOMHTMLOptionElement disabled]): (-[DOMHTMLOptionElement setDisabled:]): (-[DOMHTMLOptionElement label]): (-[DOMHTMLOptionElement setLabel:]): (-[DOMHTMLInputElement defaultValue]): (-[DOMHTMLInputElement setDefaultValue:]): (-[DOMHTMLInputElement defaultChecked]): (-[DOMHTMLInputElement setDefaultChecked:]): (-[DOMHTMLInputElement accept]): (-[DOMHTMLInputElement setAccept:]): (-[DOMHTMLInputElement accessKey]): (-[DOMHTMLInputElement setAccessKey:]): (-[DOMHTMLInputElement align]): (-[DOMHTMLInputElement setAlign:]): (-[DOMHTMLInputElement alt]): (-[DOMHTMLInputElement setAlt:]): (-[DOMHTMLInputElement disabled]): (-[DOMHTMLInputElement setDisabled:]): (-[DOMHTMLInputElement maxLength]): (-[DOMHTMLInputElement setMaxLength:]): (-[DOMHTMLInputElement readOnly]): (-[DOMHTMLInputElement setReadOnly:]): (-[DOMHTMLInputElement size]): (-[DOMHTMLInputElement setSize:]): (-[DOMHTMLInputElement setSrc:]): (-[DOMHTMLInputElement useMap]): (-[DOMHTMLInputElement setUseMap:]): (-[DOMHTMLTextAreaElement accessKey]): (-[DOMHTMLTextAreaElement setAccessKey:]): (-[DOMHTMLTextAreaElement cols]): (-[DOMHTMLTextAreaElement setCols:]): (-[DOMHTMLTextAreaElement disabled]): (-[DOMHTMLTextAreaElement setDisabled:]): (-[DOMHTMLTextAreaElement readOnly]): (-[DOMHTMLTextAreaElement setReadOnly:]): (-[DOMHTMLTextAreaElement rows]): (-[DOMHTMLTextAreaElement setRows:]): (-[DOMHTMLButtonElement accessKey]): (-[DOMHTMLButtonElement setAccessKey:]): (-[DOMHTMLButtonElement disabled]): (-[DOMHTMLButtonElement setDisabled:]): (-[DOMHTMLButtonElement value]): (-[DOMHTMLButtonElement setValue:]): (-[DOMHTMLLabelElement accessKey]): (-[DOMHTMLLabelElement setAccessKey:]): (-[DOMHTMLLabelElement htmlFor]): (-[DOMHTMLLabelElement setHtmlFor:]): (-[DOMHTMLLegendElement accessKey]): (-[DOMHTMLLegendElement setAccessKey:]): (-[DOMHTMLLegendElement align]): (-[DOMHTMLLegendElement setAlign:]): (-[DOMHTMLUListElement compact]): (-[DOMHTMLUListElement setCompact:]): (-[DOMHTMLUListElement type]): (-[DOMHTMLUListElement setType:]): (-[DOMHTMLOListElement compact]): (-[DOMHTMLOListElement setCompact:]): (-[DOMHTMLOListElement start]): (-[DOMHTMLOListElement setStart:]): (-[DOMHTMLOListElement type]): (-[DOMHTMLOListElement setType:]): (-[DOMHTMLDListElement compact]): (-[DOMHTMLDListElement setCompact:]): (-[DOMHTMLDirectoryElement compact]): (-[DOMHTMLDirectoryElement setCompact:]): (-[DOMHTMLMenuElement compact]): (-[DOMHTMLMenuElement setCompact:]): (-[DOMHTMLLIElement type]): (-[DOMHTMLLIElement setType:]): (-[DOMHTMLLIElement value]): (-[DOMHTMLLIElement setValue:]): (-[DOMHTMLQuoteElement cite]): (-[DOMHTMLQuoteElement setCite:]): (-[DOMHTMLDivElement align]): (-[DOMHTMLDivElement setAlign:]): (-[DOMHTMLParagraphElement align]): (-[DOMHTMLParagraphElement setAlign:]): (-[DOMHTMLHeadingElement align]): (-[DOMHTMLHeadingElement setAlign:]): (-[DOMHTMLPreElement width]): (-[DOMHTMLPreElement setWidth:]): (-[DOMHTMLBRElement clear]): (-[DOMHTMLBRElement setClear:]): (-[DOMHTMLBaseFontElement color]): (-[DOMHTMLBaseFontElement setColor:]): (-[DOMHTMLBaseFontElement face]): (-[DOMHTMLBaseFontElement setFace:]): (-[DOMHTMLBaseFontElement size]): (-[DOMHTMLBaseFontElement setSize:]): (-[DOMHTMLFontElement color]): (-[DOMHTMLFontElement setColor:]): (-[DOMHTMLFontElement face]): (-[DOMHTMLFontElement setFace:]): (-[DOMHTMLFontElement size]): (-[DOMHTMLFontElement setSize:]): (-[DOMHTMLHRElement align]): (-[DOMHTMLHRElement setAlign:]): (-[DOMHTMLHRElement noShade]): (-[DOMHTMLHRElement setNoShade:]): (-[DOMHTMLHRElement size]): (-[DOMHTMLHRElement setSize:]): (-[DOMHTMLHRElement width]): (-[DOMHTMLHRElement setWidth:]): (-[DOMHTMLModElement cite]): (-[DOMHTMLModElement setCite:]): (-[DOMHTMLModElement dateTime]): (-[DOMHTMLModElement setDateTime:]): (-[DOMHTMLAnchorElement accessKey]): (-[DOMHTMLAnchorElement setAccessKey:]): (-[DOMHTMLAnchorElement charset]): (-[DOMHTMLAnchorElement setCharset:]): (-[DOMHTMLAnchorElement coords]): (-[DOMHTMLAnchorElement setCoords:]): (-[DOMHTMLAnchorElement setHref:]): (-[DOMHTMLAnchorElement hreflang]): (-[DOMHTMLAnchorElement setHreflang:]): (-[DOMHTMLAnchorElement name]): (-[DOMHTMLAnchorElement setName:]): (-[DOMHTMLAnchorElement rel]): (-[DOMHTMLAnchorElement setRel:]): (-[DOMHTMLAnchorElement rev]): (-[DOMHTMLAnchorElement setRev:]): (-[DOMHTMLAnchorElement shape]): (-[DOMHTMLAnchorElement setShape:]): (-[DOMHTMLAnchorElement tabIndex]): (-[DOMHTMLAnchorElement setTabIndex:]): (-[DOMHTMLAnchorElement target]): (-[DOMHTMLAnchorElement setTarget:]): (-[DOMHTMLAnchorElement type]): (-[DOMHTMLAnchorElement setType:]): (-[DOMHTMLImageElement name]): (-[DOMHTMLImageElement setName:]): (-[DOMHTMLImageElement align]): (-[DOMHTMLImageElement setAlign:]): (-[DOMHTMLImageElement alt]): (-[DOMHTMLImageElement setAlt:]): (-[DOMHTMLImageElement border]): (-[DOMHTMLImageElement setBorder:]): (-[DOMHTMLImageElement height]): (-[DOMHTMLImageElement setHeight:]): (-[DOMHTMLImageElement hspace]): (-[DOMHTMLImageElement setHspace:]): (-[DOMHTMLImageElement isMap]): (-[DOMHTMLImageElement setIsMap:]): (-[DOMHTMLImageElement longDesc]): (-[DOMHTMLImageElement setLongDesc:]): (-[DOMHTMLImageElement setSrc:]): (-[DOMHTMLImageElement useMap]): (-[DOMHTMLImageElement setUseMap:]): (-[DOMHTMLImageElement vspace]): (-[DOMHTMLImageElement setVspace:]): (-[DOMHTMLImageElement width]): (-[DOMHTMLImageElement setWidth:]): (-[DOMHTMLObjectElement code]): (-[DOMHTMLObjectElement setCode:]): (-[DOMHTMLObjectElement align]): (-[DOMHTMLObjectElement setAlign:]): (-[DOMHTMLObjectElement archive]): (-[DOMHTMLObjectElement setArchive:]): (-[DOMHTMLObjectElement border]): (-[DOMHTMLObjectElement setBorder:]): (-[DOMHTMLObjectElement codeBase]): (-[DOMHTMLObjectElement setCodeBase:]): (-[DOMHTMLObjectElement codeType]): (-[DOMHTMLObjectElement setCodeType:]): (-[DOMHTMLObjectElement data]): (-[DOMHTMLObjectElement setData:]): (-[DOMHTMLObjectElement declare]): (-[DOMHTMLObjectElement setDeclare:]): (-[DOMHTMLObjectElement height]): (-[DOMHTMLObjectElement setHeight:]): (-[DOMHTMLObjectElement hspace]): (-[DOMHTMLObjectElement setHspace:]): (-[DOMHTMLObjectElement name]): (-[DOMHTMLObjectElement setName:]): (-[DOMHTMLObjectElement standby]): (-[DOMHTMLObjectElement setStandby:]): (-[DOMHTMLObjectElement tabIndex]): (-[DOMHTMLObjectElement setTabIndex:]): (-[DOMHTMLObjectElement type]): (-[DOMHTMLObjectElement setType:]): (-[DOMHTMLObjectElement useMap]): (-[DOMHTMLObjectElement setUseMap:]): (-[DOMHTMLObjectElement vspace]): (-[DOMHTMLObjectElement setVspace:]): (-[DOMHTMLObjectElement width]): (-[DOMHTMLObjectElement setWidth:]): (-[DOMHTMLParamElement name]): (-[DOMHTMLParamElement setName:]): (-[DOMHTMLParamElement type]): (-[DOMHTMLParamElement setType:]): (-[DOMHTMLParamElement value]): (-[DOMHTMLParamElement setValue:]): (-[DOMHTMLParamElement valueType]): (-[DOMHTMLParamElement setValueType:]): (-[DOMHTMLAppletElement align]): (-[DOMHTMLAppletElement setAlign:]): (-[DOMHTMLAppletElement alt]): (-[DOMHTMLAppletElement setAlt:]): (-[DOMHTMLAppletElement archive]): (-[DOMHTMLAppletElement setArchive:]): (-[DOMHTMLAppletElement code]): (-[DOMHTMLAppletElement setCode:]): (-[DOMHTMLAppletElement codeBase]): (-[DOMHTMLAppletElement setCodeBase:]): (-[DOMHTMLAppletElement height]): (-[DOMHTMLAppletElement setHeight:]): (-[DOMHTMLAppletElement hspace]): (-[DOMHTMLAppletElement setHspace:]): (-[DOMHTMLAppletElement name]): (-[DOMHTMLAppletElement setName:]): (-[DOMHTMLAppletElement object]): (-[DOMHTMLAppletElement setObject:]): (-[DOMHTMLAppletElement vspace]): (-[DOMHTMLAppletElement setVspace:]): (-[DOMHTMLAppletElement width]): (-[DOMHTMLAppletElement setWidth:]): (-[DOMHTMLMapElement name]): (-[DOMHTMLMapElement setName:]): (-[DOMHTMLAreaElement accessKey]): (-[DOMHTMLAreaElement setAccessKey:]): (-[DOMHTMLAreaElement alt]): (-[DOMHTMLAreaElement setAlt:]): (-[DOMHTMLAreaElement coords]): (-[DOMHTMLAreaElement setCoords:]): (-[DOMHTMLAreaElement setHref:]): (-[DOMHTMLAreaElement noHref]): (-[DOMHTMLAreaElement setNoHref:]): (-[DOMHTMLAreaElement shape]): (-[DOMHTMLAreaElement setShape:]): (-[DOMHTMLAreaElement tabIndex]): (-[DOMHTMLAreaElement setTabIndex:]): (-[DOMHTMLAreaElement target]): (-[DOMHTMLAreaElement setTarget:]): (-[DOMHTMLScriptElement text]): (-[DOMHTMLScriptElement setText:]): (-[DOMHTMLScriptElement charset]): (-[DOMHTMLScriptElement setCharset:]): (-[DOMHTMLScriptElement defer]): (-[DOMHTMLScriptElement setDefer:]): (-[DOMHTMLScriptElement src]): (-[DOMHTMLScriptElement setSrc:]): (-[DOMHTMLScriptElement type]): (-[DOMHTMLScriptElement setType:]): (-[DOMHTMLTableCaptionElement align]): (-[DOMHTMLTableCaptionElement setAlign:]): (-[DOMHTMLTableSectionElement align]): (-[DOMHTMLTableSectionElement setAlign:]): (-[DOMHTMLTableSectionElement ch]): (-[DOMHTMLTableSectionElement setCh:]): (-[DOMHTMLTableSectionElement chOff]): (-[DOMHTMLTableSectionElement setChOff:]): (-[DOMHTMLTableSectionElement vAlign]): (-[DOMHTMLTableSectionElement setVAlign:]): (-[DOMHTMLTableElement align]): (-[DOMHTMLTableElement setAlign:]): (-[DOMHTMLTableElement bgColor]): (-[DOMHTMLTableElement setBgColor:]): (-[DOMHTMLTableElement border]): (-[DOMHTMLTableElement setBorder:]): (-[DOMHTMLTableElement cellPadding]): (-[DOMHTMLTableElement setCellPadding:]): (-[DOMHTMLTableElement cellSpacing]): (-[DOMHTMLTableElement setCellSpacing:]): (-[DOMHTMLTableElement frameBorders]): (-[DOMHTMLTableElement setFrameBorders:]): (-[DOMHTMLTableElement rules]): (-[DOMHTMLTableElement setRules:]): (-[DOMHTMLTableElement summary]): (-[DOMHTMLTableElement setSummary:]): (-[DOMHTMLTableElement width]): (-[DOMHTMLTableElement setWidth:]): (-[DOMHTMLTableColElement align]): (-[DOMHTMLTableColElement setAlign:]): (-[DOMHTMLTableColElement ch]): (-[DOMHTMLTableColElement setCh:]): (-[DOMHTMLTableColElement chOff]): (-[DOMHTMLTableColElement setChOff:]): (-[DOMHTMLTableColElement span]): (-[DOMHTMLTableColElement setSpan:]): (-[DOMHTMLTableColElement vAlign]): (-[DOMHTMLTableColElement setVAlign:]): (-[DOMHTMLTableColElement width]): (-[DOMHTMLTableColElement setWidth:]): (-[DOMHTMLTableRowElement align]): (-[DOMHTMLTableRowElement setAlign:]): (-[DOMHTMLTableRowElement bgColor]): (-[DOMHTMLTableRowElement setBgColor:]): (-[DOMHTMLTableRowElement ch]): (-[DOMHTMLTableRowElement setCh:]): (-[DOMHTMLTableRowElement chOff]): (-[DOMHTMLTableRowElement setChOff:]): (-[DOMHTMLTableRowElement vAlign]): (-[DOMHTMLTableRowElement setVAlign:]): (-[DOMHTMLTableCellElement abbr]): (-[DOMHTMLTableCellElement setAbbr:]): (-[DOMHTMLTableCellElement align]): (-[DOMHTMLTableCellElement setAlign:]): (-[DOMHTMLTableCellElement axis]): (-[DOMHTMLTableCellElement setAxis:]): (-[DOMHTMLTableCellElement bgColor]): (-[DOMHTMLTableCellElement setBgColor:]): (-[DOMHTMLTableCellElement ch]): (-[DOMHTMLTableCellElement setCh:]): (-[DOMHTMLTableCellElement chOff]): (-[DOMHTMLTableCellElement setChOff:]): (-[DOMHTMLTableCellElement colSpan]): (-[DOMHTMLTableCellElement setColSpan:]): (-[DOMHTMLTableCellElement headers]): (-[DOMHTMLTableCellElement setHeaders:]): (-[DOMHTMLTableCellElement height]): (-[DOMHTMLTableCellElement setHeight:]): (-[DOMHTMLTableCellElement noWrap]): (-[DOMHTMLTableCellElement setNoWrap:]): (-[DOMHTMLTableCellElement rowSpan]): (-[DOMHTMLTableCellElement setRowSpan:]): (-[DOMHTMLTableCellElement scope]): (-[DOMHTMLTableCellElement setScope:]): (-[DOMHTMLTableCellElement vAlign]): (-[DOMHTMLTableCellElement setVAlign:]): (-[DOMHTMLTableCellElement width]): (-[DOMHTMLTableCellElement setWidth:]): (-[DOMHTMLFrameSetElement rows]): (-[DOMHTMLFrameSetElement setRows:]): (-[DOMHTMLFrameSetElement cols]): (-[DOMHTMLFrameSetElement setCols:]): (-[DOMHTMLFrameElement frameBorder]): (-[DOMHTMLFrameElement setFrameBorder:]): (-[DOMHTMLFrameElement longDesc]): (-[DOMHTMLFrameElement setLongDesc:]): (-[DOMHTMLFrameElement marginHeight]): (-[DOMHTMLFrameElement setMarginHeight:]): (-[DOMHTMLFrameElement marginWidth]): (-[DOMHTMLFrameElement setMarginWidth:]): (-[DOMHTMLFrameElement name]): (-[DOMHTMLFrameElement setName:]): (-[DOMHTMLFrameElement noResize]): (-[DOMHTMLFrameElement setNoResize:]): (-[DOMHTMLFrameElement scrolling]): (-[DOMHTMLFrameElement setScrolling:]): (-[DOMHTMLFrameElement src]): (-[DOMHTMLFrameElement setSrc:]): (-[DOMHTMLIFrameElement align]): (-[DOMHTMLIFrameElement setAlign:]): (-[DOMHTMLIFrameElement frameBorder]): (-[DOMHTMLIFrameElement setFrameBorder:]): (-[DOMHTMLIFrameElement height]): (-[DOMHTMLIFrameElement setHeight:]): (-[DOMHTMLIFrameElement longDesc]): (-[DOMHTMLIFrameElement setLongDesc:]): (-[DOMHTMLIFrameElement marginHeight]): (-[DOMHTMLIFrameElement setMarginHeight:]): (-[DOMHTMLIFrameElement marginWidth]): (-[DOMHTMLIFrameElement setMarginWidth:]): (-[DOMHTMLIFrameElement name]): (-[DOMHTMLIFrameElement setName:]): (-[DOMHTMLIFrameElement noResize]): (-[DOMHTMLIFrameElement setNoResize:]): (-[DOMHTMLIFrameElement scrolling]): (-[DOMHTMLIFrameElement setScrolling:]): (-[DOMHTMLIFrameElement src]): (-[DOMHTMLIFrameElement setSrc:]): (-[DOMHTMLIFrameElement width]): (-[DOMHTMLIFrameElement setWidth:]): (-[DOMHTMLEmbedElement align]): (-[DOMHTMLEmbedElement setAlign:]): (-[DOMHTMLEmbedElement height]): (-[DOMHTMLEmbedElement setHeight:]): (-[DOMHTMLEmbedElement name]): (-[DOMHTMLEmbedElement setName:]): (-[DOMHTMLEmbedElement src]): (-[DOMHTMLEmbedElement setSrc:]): (-[DOMHTMLEmbedElement type]): (-[DOMHTMLEmbedElement setType:]): (-[DOMHTMLEmbedElement width]): (-[DOMHTMLEmbedElement setWidth:]): * kwq/KWQAccObject.mm: (-[KWQAccObject helpText]): (-[KWQAccObject accessibilityDescription]): (-[KWQAccObject accessibilityAttributeValue:]): * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::matchLabelsAgainstElement): (KWQKHTMLPart::fileWrapperForElement): (KWQKHTMLPart::attributedString): (KWQKHTMLPart::styleForSelectionStart): * kwq/WebCoreBridge.mm: (-[WebCoreBridge elementAtPoint:]): 2005-07-18 David Harrison Reviewed by Justin. Mail: Deleting a line sometimes makes the insertion point jump to the top of the message Test cases added: delete-br-011.html * khtml/editing/delete_selection_command.cpp: (khtml::DeleteSelectionCommand::handleSpecialCaseBRDelete): Make sure m_endingSelection is usable. (khtml::DeleteSelectionCommand::doApply): Skip general delete related code when just doing handleSpecialCaseBRDelete(). * layout-tests/editing/deleting/delete-br-011-expected.txt: Added. * layout-tests/editing/deleting/delete-br-011.html: Added. Mimics composing a Mail.app reply, clicking past the end of the content, and hitting delete key. 2005-07-15 Adele Peterson Written by Anders Carlsson Reviewed by Dave Hyatt. - Fixes Test cases added: layout-tests/fast/dom/createDocumentType.html: Added layout-tests/fast/dom/createDocumentType-expected.txt: Added * khtml/xml/dom_nodeimpl.cpp: (DocumentPtr::nullDocumentPtr): * khtml/xml/dom_nodeimpl.h: Add nullDocumentPtr() function which returns a shared DocumentPtr object whose document always is 0. * khtml/xml/dom_docimpl.cpp: (DOMImplementationImpl::createDocumentType): Pass nullDocumentPtr as the document type's document. 2005-07-15 Adele Peterson Written by Anders Carlsson Reviewed by Maciej Stachowiak. - Fixes Test cases added: * layout-tests/fast/js/location-assign.html: Added. * layout-tests/fast/js/location-assign-expected.txt: Added. * layout-tests/fast/js/resources/new-location.html: Added. * khtml/ecma/kjs_window.cpp: (KJS::Location::get): (KJS::LocationFunc::tryCall): * khtml/ecma/kjs_window.h: (KJS::Location::): Implement location.assign. 2005-07-15 Adele Peterson Updated layout tests for formatting changes from change for http://bugzilla.opendarwin.org/show_bug.cgi?id=3601 * layout-tests/fast/dom/outerText-no-element-expected.txt: * layout-tests/fast/dynamic/outerHTML-no-element-expected.txt: * layout-tests/fast/js/array-every-expected.txt: * layout-tests/fast/js/array-foreach-expected.txt: * layout-tests/fast/js/array-some-expected.txt: * layout-tests/fast/js/toString-stack-overflow-expected.txt: 2005-07-15 Kevin Decker Reviewed by Adele Fixed: http://bugzilla.opendarwin.org/show_bug.cgi?id=4009 Test cases added: none, doesn't affect layout * khtml/khtml_part.cpp: (KHTMLPart::scheduleLocationChange): Corrected an earlier mistake of testing an always non-zero constant. 2005-07-14 John Sullivan Reviewed by Ken Kocienda (setFocusNode) and Dave Hyatt (everything). - WebCore part of fix for: webpages incorrectly use standard instead of secondary highlighting in certain cases Test cases added: none, doesn't affect layout There were two different problems leading to the same symptom, both of which needed to be fixed. The first problem was that ancient and unneeded code in setFocusNode(0) was setting the focus to the enclosing WebHTMLView. The second problem was that the WebHTMLView didn't learn about form controls resigning first-responder-hood, and so didn't update the displayed focus state. * khtml/xml/dom_docimpl.cpp: (DocumentImpl::setFocusNode): Removed a line of code that was setting the focus on the WebHTMLView whenever a form control lost focus. This doesn't make sense in a world where the focus might be moving to something outside of the web page entirely. This line of code was added ages ago to fix Radar 3037974, which is not reproducible anymore with this line of code removed. * kwq/WebCoreBridge.h: New bridge method -formControlIsResigningFirstResponder:, used to inform WebKit that a form control is losing first-responder-hood. * kwq/KWQButton.mm: (-[KWQButton resignFirstResponder]): call formControlIsResigningFirstResponder: * kwq/KWQComboBox.mm: (-[KWQPopUpButton resignFirstResponder]): ditto * kwq/KWQListBox.mm: (-[KWQTableView resignFirstResponder]): ditto * kwq/KWQSlider.mm: (-[KWQSlider resignFirstResponder]): ditto * kwq/KWQTextArea.mm: (-[KWQTextAreaTextView resignFirstResponder]): ditto * kwq/KWQTextField.mm: (-[KWQTextFieldController setHasFocus:]): ditto 2005-07-14 John Sullivan Reviewed by Ken Kocienda. - fixed webpages incorrectly use standard instead of secondary highlighting in certain cases Test cases added: none, doesn't affect layout * khtml/xml/dom_docimpl.cpp: (DocumentImpl::setFocusNode): Removed a line of code that was setting the focus on the WebHTMLView whenever a form control lost focus. This doesn't make sense in a world where the focus might be moving to something outside of the web page entirely. This line of code was added ages ago to fix Radar 3037974, which is not reproducible anymore with this line of code removed. 2005-07-12 Justin Garcia Reviewed by mjs - Fixes [RTL] Lines in messages with Hebrew text and numbers are truncated by Tiger Mail Mail sends plaintext when a message doesn't have any formatting, plaintext depends on innertext, which depends on TextIterators. A TextIterator iterates over text boxes in render order, but assumes logical order, which was causing the problems. Test cases added: * layout-tests/fast/text/international/bidi-innertext-expected.txt: Added. * layout-tests/fast/text/international/bidi-innertext.html: Added. * khtml/editing/visible_text.cpp: (khtml::TextIterator::handleTextNode): If the text node contains reversed text, sort the text boxes (m_sortedTextBoxes). Not all reversed text will be out of logical order, but this simple check is less expensive than doing an exhaustive one. Most text is LTR and an exhaustive check might hurt performance. (khtml::TextIterator::handleTextBox): Iterates over sorted text boxes when necessary * khtml/editing/visible_text.h: * khtml/rendering/render_text.cpp: (RenderText::RenderText): (RenderText::position): If asked to position a text box with reversed text, modify m_containsReversedText * khtml/rendering/render_text.h: (khtml::InlineTextBox::operator ==): Added to facilitate sorting (khtml::InlineTextBox::operator <): Ditto (khtml::RenderText::containsReversedText): 2005-07-14 Justin Garcia Patch by Anders Carlsson and justin Reviewed by mjs Fixes the following related bugs: insertRow generates DOM Exception if TABLE does not possess a TBODY insertRow fails on a that has no but does have other children in the DOM insertRow() on table object containing any characters but no TR & TD elements fails (3476) Does a better job of maintaining the firstBody variable so that it's not invalidated on .innerHTML = "" Better check for when to add an implicit tbody to hold the inserted row. Test cases added: (NONE) * layout-tests/fast/dom/HTMLTableElement/insert-row-expected.txt: Added. * layout-tests/fast/dom/HTMLTableElement/insert-row.html: Added. * khtml/html/html_tableimpl.cpp: (DOM::HTMLTableElementImpl::~HTMLTableElementImpl): (DOM::HTMLTableElementImpl::setTBody): (DOM::HTMLTableElementImpl::insertRow): (DOM::HTMLTableElementImpl::addChild): (DOM::HTMLTableElementImpl::childrenChanged): * khtml/html/html_tableimpl.h: 2005-07-14 Vicki Murley Reviewed by hyatt, patch from Carsten Guenther. - fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=3855 Test cases added: * manual-tests/bugzilla-3855.html: Added. * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::searchForLabelsAboveCell): check for the existence of the cell renderer 2005-07-14 Vicki Murley - added manual tests for [GENENTECH] window.opener not available when child opened via target="_new" Test cases added: * manual-tests/target_new-1.html: Added. * manual-tests/target_new.html: Added. 2005-07-14 Geoffrey Garen - landed fix for Safari fail to access a second time an element whose content was dynamically modified. - patch by Anders Carlsson . Reviewed by mjs + darin. Test cases added: * layout-tests/fast/dom/ids/duplicate-ids-expected.txt: Added. * layout-tests/fast/dom/ids/duplicate-ids.html: Added. * khtml/xml/dom_docimpl.cpp: (DocumentImpl::getElementById): If no element in the id dict can be found and we know that there's at least one other element with the same id around, then traverse the document and insert the new element in the id table. (DocumentImpl::addElementById): (DocumentImpl::removeElementById): Increment and decrement the id count accordingly. * khtml/xml/dom_docimpl.h: Add QDict for id counts. Make element QDict mutable. 2005-07-14 Geoffrey Garen -landed layout test for http://bugzilla.opendarwin.org/show_bug.cgi?id=3412 Object.prototype is missing toLocaleString Reviewed by mjs. Test cases added: * layout-tests/fast/js/object-prototype-toLocaleString-expected.txt: Added. * layout-tests/fast/js/object-prototype-toLocaleString.html: Added. 2005-07-14 Vicki Murley Reviewed by Kocienda. - WebCore part of fix for [GENENTECH] window.opener not available when child opened via target="_new" Add a setOpener function to the WebCore bridge, and call this function when opening new windows through Web Kit. * kwq/WebCoreBridge.h: * kwq/WebCoreBridge.mm: 2005-07-12 Maciej Stachowiak Reviewed by Kevin. - convert some more things to use the new hashtable * khtml/ecma/kjs_binding.cpp: (KJS::domObjects): (KJS::domNodesPerDocument): (KJS::ScriptInterpreter::getDOMObject): (KJS::ScriptInterpreter::putDOMObject): (KJS::ScriptInterpreter::deleteDOMObject): (KJS::ScriptInterpreter::forgetDOMObject): (KJS::ScriptInterpreter::getDOMNodeForDocument): (KJS::ScriptInterpreter::forgetDOMNodeForDocument): (KJS::ScriptInterpreter::putDOMNodeForDocument): (KJS::ScriptInterpreter::forgetAllDOMNodesForDocument): (KJS::ScriptInterpreter::mark): (KJS::ScriptInterpreter::updateDOMNodeDocument): * khtml/ecma/kjs_binding.h: * khtml/ecma/kjs_window.h: Include QPtrDict header * khtml/ecma/xmlhttprequest.h: ditto - fix a bug with remove of a nonexistent key - it used to trash the table * khtml/misc/hashtable.h: (khtml::::remove): 2005-07-13 Justin Garcia Reviewed by mjs Rolled in workarounds necessary to build with a gcc 4.0 regression introduced in build 5208: Regression in gcc-5208 "comparison of distinct Objective-C types lacks a cast" warning Problems overloading methods that take Objective-C typed arguments * kwq/KWQCursor.h: * kwq/KWQCursor.mm: (QCursor::makeWithNSCursor): * kwq/KWQKCursor.mm: (KCursor::crossCursor): (KCursor::handCursor): (KCursor::sizeAllCursor): (KCursor::ibeamCursor): (KCursor::waitCursor): (KCursor::whatsThisCursor): (KCursor::eastResizeCursor): (KCursor::northResizeCursor): (KCursor::northEastResizeCursor): (KCursor::northWestResizeCursor): (KCursor::southResizeCursor): (KCursor::southEastResizeCursor): (KCursor::southWestResizeCursor): (KCursor::westResizeCursor): * kwq/KWQKJobClasses.mm: (KIO::TransferJob::emitResult): (KIO::TransferJob::emitReceivedResponse): * kwq/KWQSignal.h: * kwq/KWQSignal.mm: (KWQSignal::callWithData): (KWQSignal::callWithResponse): * kwq/KWQSlot.h: * kwq/KWQSlot.mm: (KWQSlot::callWithData): (KWQSlot::callWithResponse): * kwq/KWQWidget.mm: (QWidget::cursor): 2005-07-13 Justin Garcia Reviewed by mjs Rolling in changes necessary to build with newer versions of gcc 4.0 * kwq/DOM-CSS.mm: (+[DOMCSSPrimitiveValue _valueWithImpl:]): * kwq/DOMEvents.h: * kwq/DOMInternal.h: (addDOMWrapper): * kwq/KWQButton.mm: (QButton::setWritingDirection): * kwq/KWQClipboard.mm: (KWQClipboard::dragNSImage): * kwq/KWQComboBox.mm: (QComboBox::setWritingDirection): (QComboBox::populateMenu): * kwq/KWQKHTMLPart.mm: (regExpForLabels): (KWQKHTMLPart::passWidgetMouseDownEventToWidget): (KWQKHTMLPart::fileWrapperForElement): * kwq/KWQLineEdit.mm: (QLineEdit::QLineEdit): * kwq/KWQListBox.mm: (QListBox::~QListBox): (QListBox::setSelectionMode): (QListBox::doneAppendingItems): (QListBox::setSelected): (QListBox::isSelected): (QListBox::setEnabled): (QListBox::sizeForNumberOfLines): (QListBox::setWritingDirection): * kwq/KWQScrollView.mm: (QScrollView::contentsX): (QScrollView::contentsY): * kwq/KWQTextArea.mm: (-[KWQTextArea _trackResizeFromMouseDown:]): (-[KWQTextAreaTextView _enclosingTextArea]): (-[KWQTextAreaTextView _resizeCornerRect]): * kwq/KWQTextEdit.mm: (QTextEdit::setAlignment): (QTextEdit::setWritingDirection): (QTextEdit::sizeWithColumnsAndRows): (QTextEdit::setPalette): * kwq/KWQWidget.mm: (QWidget::hasFocus): * kwq/WebCoreBridge.mm: (-[WebCoreBridge elementAtPoint:]): 2005-07-13 John Sullivan Reviewed by Maciej Stachowiak. - cleaned up Find-related experimental code that I checked in a while back * kwq/KWQKHTMLPart.h: remove findInSelection flag from findString() * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::findString): remove findInSelection flag. Always search the selection first, but if the found range is the same as the selection range, then search again from beyond the selection. * kwq/WebCoreBridge.h: * kwq/WebCoreBridge.mm: (-[WebCoreBridge searchFor:direction:caseSensitive:wrap:]): remove findInSelection flag 2005-07-13 Adele Peterson Reviewed by John. Fixed Focusing a field unnecessarily horizontally scrolls Horizontal scrolling while tabbing through forms can be surprising, and distracting. This change will minimize that scrolling if we're not explicitly trying to center a rectangle in _KWQ_scrollRectToVisible. Test cases added: None. This test case involves tabbing to form controls and scrolling. * kwq/KWQNSViewExtras.m: (-[NSClipView _KWQ_scrollRectToVisible:inView:forceCentering:]): 2005-07-12 Kevin Decker Reviewed by cblu. Fixed: http://bugzilla.opendarwin.org/show_bug.cgi?id=3968 REGRESSION: top frame only loads at banking site - http://www.skandiabanken.no Test cases added: None; This fixes a race condition that is not reproducible locally. * khtml/khtml_part.cpp: (KHTMLPart::scheduleLocationChange): If a redirect was scheduled during a load, then stop the current load. Otherwise when the current load transitions from a provisional to a committed state, pending redirects may be cancelled. 2005-07-12 Beth Dakin Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=3942 and marquee problems in Radar bug 4172312. Vertical marquees default to 200px, and horizontal marquees do not allow text to be truncated by a too-small height attribute. Reviewed by Hyatt. Test cases added: (NONE) * khtml/html/html_blockimpl.cpp: deleted former changes to make marquee height work correctly. (HTMLMarqueeElementImpl::mapToEntry): (HTMLMarqueeElementImpl::parseMappedAttribute): * khtml/rendering/render_layer.cpp: this is where the height issues are now addressed (Marquee::updateMarqueeStyle): * khtml/rendering/render_layer.h: (khtml::): * khtml/rendering/render_style.h: added function fontSize() (khtml::RenderStyle::fontSize): * khtml/xml/dom_elementimpl.h: deleted addition of EMarquee hash key (DOM::): * layout-tests/fast/css/MarqueeLayoutTest-expected.txt: * layout-tests/fast/css/MarqueeLayoutTest.html: added vertical marquees to test. 2005-07-12 Geoffrey Garen Test cases modified: * layout-tests/fast/frames/iframe-name-and-id.html: now tests dynamically creating frames[x].name 2005-07-12 Geoffrey Garen Added layout test for http://bugzilla.opendarwin.org/show_bug.cgi?id=3435 Parentheses are backwards in Hebrew text (no bidi mirroring?) Test is manual because results only reflect visually - the layout is the same either way. Test cases added: * manual-tests/bidi-parens.html: Added. 2005-07-12 Ken Kocienda Reviewed by me Test cases added: (NONE) * kwq/KWQTextCodec.mm: Fix build breakage. /me is a real genius. 2005-07-12 Ken Kocienda Reviewed by Chris Blumenberg Test cases added: (NONE) Switched over from TEC to ICU for unicode text conversion. TEC support has now been removed from KWQTextCodec. I just added this dual support yesterday, and while Maciej and I agreed that it was good to land in the tree in case we run into problems in the near future, we also agreed that cutting over to using ICU full time right now is probably the best way to find bugs. * kwq/KWQTextCodec.mm: Removed TEC support. (QTextCodec::fromUnicode): Ditto. (KWQTextDecoder::KWQTextDecoder): Ditto. (KWQTextDecoder::~KWQTextDecoder): Ditto. (KWQTextDecoder::convert): Ditto. * kwq/WebCoreBridge.h: Removed some glue that allowed the converters to be changed at runtime. * kwq/WebCoreTextConversionMethod.h: Removed. This also was glue for the runtime switch. * WebCore.pbproj/project.pbxproj: Removed WebCoreTextConversionMethod.h file. 2005-07-12 Eric Seidel Reviewed by hyatt. * icu/unicode/ucnv.h: Added. * icu/unicode/ucnv_err.h: Added. Fixes build break for externals caused by KWQTextCodec.mm changes. http://bugzilla.opendarwin.org/show_bug.cgi?id=3961 2005-07-11 Eric Seidel Reviewed by Adele. * kdom/Namespace.h: Merged in XPath 2.0 namespace def from KDE. * kdom/Shared.h: Merged in comments from KDE. * kdom/kdom.h: Changed local // to use #ifndef APPLE_CHANGES (KDOM::operator<<): A tiny batch of changes I wished to commit before moving WebCore/kdom to SVGSupport/kdom. http://bugzilla.opendarwin.org/show_bug.cgi?id=3959 2005-07-11 Geoffrey Garen -fixed rdar://problem/4170960 http://bugzilla.opendarwin.org/show_bug.cgi?id=3952 iFrame name and id information incorrectly returned Reviewed by mjs. Test cases added: (NONE) * layout-tests/fast/frames/iframe-name-and-id-expected.txt: Added. * layout-tests/fast/frames/iframe-name-and-id.html: Added. * ChangeLog: * khtml/html/html_baseimpl.cpp: (HTMLFrameElementImpl::attach): removed misleading comment (HTMLIFrameElementImpl::attach): copied FrameElementImpl behavior for initializing m_name 2005-07-11 Geoffrey Garen Reviewed by NOBODY (OOPS!). Test cases added: (NONE) * khtml/html/html_baseimpl.cpp: (HTMLFrameElementImpl::attach): (HTMLIFrameElementImpl::attach): 2005-07-11 Ken Kocienda Reviewed by Richard Test cases added: (NONE) * WebCore.pbproj/project.pbxproj: * kwq/KWQLogging.h: Added constant for logging text conversions. * kwq/KWQLogging.m: Ditto. * kwq/KWQTextCodec.mm: Added support for using the ICU library for unicode text conversion. (KWQTextDecoder::KWQTextDecoder): Check for conversion method to use. (KWQTextDecoder::~KWQTextDecoder): Release ICU converter if needed. (KWQTextDecoder::convertUTF16): Use constant rather in place of hard-coded buffer size. (KWQTextDecoder::createTECConverter): Name change: qualify converter names with TEC suffix. (KWQTextDecoder::createICUConverter): New function to create an ICU converter. (KWQTextDecoder::convertOneChunkUsingTEC): Name change: qualify converter names with TEC suffix. (KWQTextDecoder::convertUsingTEC): Ditto. Also, use constant rather in place of hard-coded buffer size. (KWQTextDecoder::convertUsingICU): New function to convert text using ICU. (KWQTextDecoder::convert): Now switches on converters, picking either TEC or ICU. * kwq/WebCoreBridge.h: Add -textConversionMethod accessor so KWQTextDecoder can pick the right converter. * kwq/WebCoreTextConversionMethod.h: Added. 2005-07-11 Ken Kocienda Reviewed by me Test cases added: (NONE) * WebCore.pbproj/project.pbxproj: Fix project file. 2005-07-11 Ken Kocienda Reviewed by me Test cases added: (NONE) * ChangeLog: Fixed two typos I found while reading the ChangeLog. 2005-07-10 Maciej Stachowiak Reviewed by John. * khtml/html/htmltokenizer.cpp: (khtml::HTMLTokenizer::parseTag): Don't allow !doctype as a tag name, this screws up parsing and makes !doctype elements and extra text nodes get added to the DOM. * khtml/xml/dom_atomicstring.cpp: (DOM::AtomicString::equal): Add some nil checks, now that the equal this calls no longer checks for nil. 2005-07-10 Eric Seidel Reviewed by mjs. * ksvg2/core/KCanvasRenderingStyle.cc: Added. * ksvg2/core/KCanvasRenderingStyle.h: Added. * ksvg2/core/KSVGDocumentBuilder.cc: Added. * ksvg2/core/KSVGDocumentBuilder.h: Added. * ksvg2/core/KSVGTimeScheduler.cc: Added. * ksvg2/core/KSVGTimeScheduler.h: Added. * ksvg2/core/KSVGTimeScheduler.moc: Added. Added directory previously ignored by global cvsignore rules. http://bugzilla.opendarwin.org/show_bug.cgi?id=3939 2005-07-10 Eric Seidel Reviewed by mjs. * WebCore.pbproj/project.pbxproj: added htmlfactory.* to WebCore+SVG Also fixed /sw/bin/bison absolute path. http://bugzilla.opendarwin.org/show_bug.cgi?id=3938 2005-07-09 Timothy Hatcher Reviewed and landed by Maciej. Fixed a build error with GCC4 and the use of _M_type. * khtml/misc/hashtraits.h: Test for GCC4 and use the new __value enum from _M_type. 2005-07-09 David Hyatt Make sure to keep eLastEntry at the end of the list, since it is used for the dynamic portion of the hash. Reviewed by mjs 2005-07-09 Maciej Stachowiak Reviewed by Eric Seidel. - removed unused files * kdom/impl/NodeKeeper.cc: Removed. * kdom/impl/NodeKeeper.h: Removed. * WebCore.pbproj/project.pbxproj: Remove from +SVG build. 2005-07-09 David Hyatt Fix for bugzilla bug 3405, replace NodeImpl::Id with a new class, QualifiedName, to represent tag names (for DOM elements and CSS selectors). Reviewed by mjs * WebCore.pbproj/project.pbxproj: * khtml/css/css_base.cpp: (CSSSelector::anyTagName): (CSSSelector::print): (CSSSelector::specificity): (CSSSelector::selectorText): * khtml/css/css_base.h: (DOM::CSSNamespace::uri): (DOM::CSSNamespace::prefix): (DOM::CSSNamespace::namespaceForPrefix): (DOM::CSSSelector::CSSSelector): (DOM::CSSSelector::hasTag): * khtml/css/css_ruleimpl.cpp: * khtml/css/css_ruleimpl.h: * khtml/css/css_stylesheetimpl.cpp: (CSSStyleSheetImpl::addNamespace): (CSSStyleSheetImpl::determineNamespace): * khtml/css/css_stylesheetimpl.h: * khtml/css/cssparser.cpp: (CSSParser::CSSParser): (CSSParser::parseSheet): * khtml/css/cssparser.h: * khtml/css/cssstyleselector.cpp: (khtml::CSSStyleSelector::matchRules): (khtml::CSSStyleSelector::matchRulesForList): (khtml::CSSStyleSelector::canShareStyleWithElement): (khtml::CSSStyleSelector::adjustRenderStyle): (khtml::CSSStyleSelector::checkSelector): (khtml::CSSStyleSelector::checkOneSelector): (khtml::CSSRuleSet::addRule): * khtml/css/cssstyleselector.h: (khtml::CSSRuleSet::getTagRules): * khtml/css/parser.y: * khtml/dom/css_stylesheet.cpp: (LinkStyle::operator = ): (LinkStyle::sheet): * khtml/dom/dom_element.cpp: (Element::tagName): * khtml/dom/dom_node.cpp: (Node::namespaceURI): (Node::setPrefix): * khtml/dom/dom_node.h: * khtml/dom/html_base.cpp: (HTMLBodyElement::operator = ): (HTMLFrameElement::operator = ): (HTMLIFrameElement::operator = ): (HTMLFrameSetElement::operator = ): (HTMLHeadElement::operator = ): (HTMLHtmlElement::operator = ): * khtml/dom/html_block.cpp: (HTMLBlockquoteElement::operator = ): (HTMLDivElement::operator = ): (HTMLHRElement::operator = ): (HTMLHeadingElement::operator = ): (HTMLParagraphElement::operator = ): (HTMLPreElement::operator = ): * khtml/dom/html_element.cpp: (HTMLElement::assignOther): * khtml/dom/html_element.h: * khtml/dom/html_form.cpp: (HTMLButtonElement::operator = ): (HTMLFieldSetElement::operator = ): (HTMLFormElement::operator = ): (HTMLInputElement::operator = ): (HTMLLabelElement::operator = ): (HTMLLegendElement::operator = ): (HTMLOptGroupElement::operator = ): (HTMLSelectElement::operator = ): (HTMLTextAreaElement::operator = ): (HTMLOptionElement::operator = ): (HTMLIsIndexElement::operator = ): * khtml/dom/html_head.cpp: (HTMLBaseElement::operator = ): (HTMLLinkElement::operator = ): (HTMLMetaElement::operator = ): (HTMLScriptElement::operator = ): (HTMLStyleElement::operator = ): (HTMLTitleElement::operator = ): * khtml/dom/html_image.cpp: (HTMLAreaElement::operator = ): (HTMLImageElement::operator = ): (HTMLMapElement::operator = ): * khtml/dom/html_inline.cpp: (HTMLAnchorElement::operator = ): (HTMLBRElement::operator = ): (HTMLFontElement::operator = ): (HTMLModElement::HTMLModElement): (HTMLModElement::operator = ): (HTMLQuoteElement::HTMLQuoteElement): (HTMLQuoteElement::operator = ): * khtml/dom/html_inline.h: * khtml/dom/html_list.cpp: (HTMLDListElement::operator = ): (HTMLDirectoryElement::operator = ): (HTMLLIElement::operator = ): (HTMLMenuElement::operator = ): (HTMLOListElement::operator = ): (HTMLUListElement::operator = ): * khtml/dom/html_misc.cpp: (HTMLBaseFontElement::operator = ): * khtml/dom/html_object.cpp: (DOM::HTMLAppletElement::operator = ): (DOM::HTMLObjectElement::operator = ): (DOM::HTMLParamElement::operator = ): * khtml/dom/html_table.cpp: (HTMLTableCaptionElement::operator = ): (HTMLTableCellElement::operator = ): (HTMLTableColElement::operator = ): (HTMLTableElement::operator = ): (HTMLTableRowElement::operator = ): (HTMLTableSectionElement::operator = ): * khtml/ecma/kjs_css.cpp: (KJS::DOMStyleSheetList::tryGet): * khtml/ecma/kjs_dom.cpp: (KJS::DOMNode::putValue): (KJS::DOMElement::tryGet): (KJS::getRuntimeObject): * khtml/ecma/kjs_html.cpp: (KJS::HTMLDocument::tryGet): (KJS::KJS::HTMLDocument::putValue): (KJS::KJS::HTMLElement::classInfo): (KJS::): (KJS::HTMLElement::getSetInfo): (KJS::KJS::HTMLElement::tryGet): (KJS::KJS::HTMLElement::implementsCall): (KJS::KJS::HTMLElement::call): (KJS::HTMLElement::htmlGetter): (KJS::HTMLElement::headGetter): (KJS::HTMLElement::linkGetter): (KJS::HTMLElement::titleGetter): (KJS::HTMLElement::metaGetter): (KJS::HTMLElement::baseGetter): (KJS::HTMLElement::isIndexGetter): (KJS::HTMLElement::styleGetter): (KJS::HTMLElement::bodyGetter): (KJS::HTMLElement::formGetter): (KJS::HTMLElement::selectGetter): (KJS::HTMLElement::optGroupGetter): (KJS::HTMLElement::optionGetter): (KJS::getInputSelectionStart): (KJS::getInputSelectionEnd): (KJS::HTMLElement::inputGetter): (KJS::HTMLElement::textAreaGetter): (KJS::HTMLElement::buttonGetter): (KJS::HTMLElement::labelGetter): (KJS::HTMLElement::fieldSetGetter): (KJS::HTMLElement::legendGetter): (KJS::HTMLElement::uListGetter): (KJS::HTMLElement::oListGetter): (KJS::HTMLElement::dListGetter): (KJS::HTMLElement::dirGetter): (KJS::HTMLElement::menuGetter): (KJS::HTMLElement::liGetter): (KJS::HTMLElement::divGetter): (KJS::HTMLElement::paragraphGetter): (KJS::HTMLElement::headingGetter): (KJS::HTMLElement::blockQuoteGetter): (KJS::HTMLElement::quoteGetter): (KJS::HTMLElement::preGetter): (KJS::HTMLElement::brGetter): (KJS::HTMLElement::baseFontGetter): (KJS::HTMLElement::fontGetter): (KJS::HTMLElement::hrGetter): (KJS::HTMLElement::modGetter): (KJS::HTMLElement::anchorGetter): (KJS::HTMLElement::imageGetter): (KJS::HTMLElement::objectGetter): (KJS::HTMLElement::paramGetter): (KJS::HTMLElement::appletGetter): (KJS::HTMLElement::mapGetter): (KJS::HTMLElement::areaGetter): (KJS::HTMLElement::scriptGetter): (KJS::HTMLElement::tableGetter): (KJS::HTMLElement::tableCaptionGetter): (KJS::HTMLElement::tableColGetter): (KJS::HTMLElement::tableSectionGetter): (KJS::HTMLElement::tableRowGetter): (KJS::HTMLElement::tableCellGetter): (KJS::HTMLElement::frameSetGetter): (KJS::HTMLElement::frameGetter): (KJS::HTMLElement::iFrameGetter): (KJS::HTMLElement::marqueeGetter): (KJS::HTMLElement::getValueProperty): (KJS::KJS::HTMLElement::hasOwnProperty): (KJS::KJS::HTMLElement::toString): (KJS::getForm): (KJS::KJS::HTMLElement::pushEventHandlerScope): (KJS::KJS::HTMLElementFunction::tryCall): (KJS::KJS::HTMLElement::tryPut): (KJS::HTMLElement::htmlSetter): (KJS::HTMLElement::headSetter): (KJS::HTMLElement::linkSetter): (KJS::HTMLElement::titleSetter): (KJS::HTMLElement::metaSetter): (KJS::HTMLElement::baseSetter): (KJS::HTMLElement::isIndexSetter): (KJS::HTMLElement::styleSetter): (KJS::HTMLElement::bodySetter): (KJS::HTMLElement::formSetter): (KJS::HTMLElement::selectSetter): (KJS::HTMLElement::optGroupSetter): (KJS::HTMLElement::optionSetter): (KJS::HTMLElement::inputSetter): (KJS::HTMLElement::textAreaSetter): (KJS::HTMLElement::buttonSetter): (KJS::HTMLElement::labelSetter): (KJS::HTMLElement::fieldSetSetter): (KJS::HTMLElement::legendSetter): (KJS::HTMLElement::uListSetter): (KJS::HTMLElement::oListSetter): (KJS::HTMLElement::dListSetter): (KJS::HTMLElement::dirSetter): (KJS::HTMLElement::menuSetter): (KJS::HTMLElement::liSetter): (KJS::HTMLElement::divSetter): (KJS::HTMLElement::paragraphSetter): (KJS::HTMLElement::headingSetter): (KJS::HTMLElement::blockQuoteSetter): (KJS::HTMLElement::quoteSetter): (KJS::HTMLElement::preSetter): (KJS::HTMLElement::brSetter): (KJS::HTMLElement::baseFontSetter): (KJS::HTMLElement::fontSetter): (KJS::HTMLElement::hrSetter): (KJS::HTMLElement::modSetter): (KJS::HTMLElement::anchorSetter): (KJS::HTMLElement::imageSetter): (KJS::HTMLElement::objectSetter): (KJS::HTMLElement::paramSetter): (KJS::HTMLElement::appletSetter): (KJS::HTMLElement::mapSetter): (KJS::HTMLElement::areaSetter): (KJS::HTMLElement::scriptSetter): (KJS::HTMLElement::tableSetter): (KJS::HTMLElement::tableCaptionSetter): (KJS::HTMLElement::tableColSetter): (KJS::HTMLElement::tableSectionSetter): (KJS::HTMLElement::tableRowSetter): (KJS::HTMLElement::tableCellSetter): (KJS::HTMLElement::frameSetSetter): (KJS::HTMLElement::frameSetter): (KJS::HTMLElement::iFrameSetter): (KJS::HTMLElement::marqueeSetter): (KJS::HTMLElement::putValue): (KJS::toHTMLTableCaptionElement): (KJS::toHTMLTableSectionElement): (KJS::KJS::HTMLCollection::tryGet): (KJS::KJS::HTMLSelectCollection::tryPut): * khtml/ecma/kjs_html.h: * khtml/ecma/kjs_window.cpp: * khtml/editing/apply_style_command.cpp: (khtml::isStyleSpan): (khtml::isEmptyStyleSpan): (khtml::isEmptyFontTag): (khtml::createFontElement): (khtml::createStyleSpanElement): (khtml::ApplyStyleCommand::applyInlineStyle): (khtml::ApplyStyleCommand::isHTMLStyleNode): (khtml::ApplyStyleCommand::removeHTMLFontStyle): (khtml::areIdenticalElements): (khtml::ApplyStyleCommand::mergeEndWithNextIfIdentical): (khtml::ApplyStyleCommand::addInlineStyleIfNeeded): * khtml/editing/break_blockquote_command.cpp: (khtml::BreakBlockquoteCommand::doApply): * khtml/editing/composite_edit_command.cpp: (khtml::CompositeEditCommand::insertNodeBefore): (khtml::CompositeEditCommand::insertNodeAfter): (khtml::CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessary): (khtml::createBlockPlaceholderElement): * khtml/editing/delete_selection_command.cpp: (khtml::isListStructureNode): (khtml::DeleteSelectionCommand::handleSpecialCaseBRDelete): (khtml::DeleteSelectionCommand::handleGeneralDelete): (khtml::DeleteSelectionCommand::moveNodesAfterNode): * khtml/editing/htmlediting.cpp: (khtml::isSpecialElement): (khtml::createDefaultParagraphElement): (khtml::createBreakElement): (khtml::isMailBlockquote): * khtml/editing/insert_line_break_command.cpp: (khtml::InsertLineBreakCommand::doApply): * khtml/editing/insert_paragraph_separator_command.cpp: (khtml::InsertParagraphSeparatorCommand::doApply): * khtml/editing/markup.cpp: (khtml::startMarkup): (khtml::endMarkup): (khtml::markup): (khtml::createMarkup): (khtml::createFragmentFromText): * khtml/editing/replace_selection_command.cpp: (khtml::isProbablyBlock): (khtml::isProbablyTableStructureNode): (khtml::ReplacementFragment::isInterchangeNewlineNode): (khtml::ReplacementFragment::removeStyleNodes): (khtml::ReplaceSelectionCommand::doApply): (khtml::ReplaceSelectionCommand::updateNodesInserted): * khtml/editing/selection.cpp: (khtml::Selection::debugRenderer): * khtml/editing/visible_position.cpp: (khtml::VisiblePosition::init): (khtml::VisiblePosition::isCandidate): (khtml::VisiblePosition::isAtomicNode): * khtml/editing/visible_text.cpp: (khtml::TextIterator::handleNonTextNode): (khtml::TextIterator::exitNode): (khtml::SimplifiedBackwardsTextIterator::handleNonTextNode): * khtml/editing/visible_units.cpp: (khtml::endOfLine): * khtml/html/dtd.cpp: Removed. * khtml/html/dtd.h: Removed. * khtml/html/html_baseimpl.cpp: (HTMLBodyElementImpl::HTMLBodyElementImpl): (HTMLFrameElementImpl::HTMLFrameElementImpl): (HTMLFrameElementImpl::init): (HTMLFrameElementImpl::attach): (HTMLFrameSetElementImpl::HTMLFrameSetElementImpl): (HTMLFrameSetElementImpl::checkDTD): (HTMLFrameSetElementImpl::attach): (HTMLHeadElementImpl::HTMLHeadElementImpl): (HTMLHeadElementImpl::checkDTD): (HTMLHtmlElementImpl::HTMLHtmlElementImpl): (HTMLHtmlElementImpl::checkDTD): (HTMLIFrameElementImpl::HTMLIFrameElementImpl): * khtml/html/html_baseimpl.h: (DOM::HTMLBodyElementImpl::endTagRequirement): (DOM::HTMLBodyElementImpl::tagPriority): (DOM::HTMLFrameElementImpl::endTagRequirement): (DOM::HTMLFrameElementImpl::tagPriority): (DOM::HTMLFrameSetElementImpl::endTagRequirement): (DOM::HTMLFrameSetElementImpl::tagPriority): (DOM::HTMLHeadElementImpl::endTagRequirement): (DOM::HTMLHeadElementImpl::tagPriority): (DOM::HTMLHtmlElementImpl::endTagRequirement): (DOM::HTMLHtmlElementImpl::tagPriority): (DOM::HTMLIFrameElementImpl::endTagRequirement): (DOM::HTMLIFrameElementImpl::tagPriority): * khtml/html/html_blockimpl.cpp: (HTMLBlockquoteElementImpl::HTMLBlockquoteElementImpl): (HTMLDivElementImpl::HTMLDivElementImpl): (HTMLHRElementImpl::HTMLHRElementImpl): (HTMLHeadingElementImpl::HTMLHeadingElementImpl): (HTMLHeadingElementImpl::checkDTD): (HTMLParagraphElementImpl::HTMLParagraphElementImpl): (HTMLParagraphElementImpl::checkDTD): (HTMLPreElementImpl::HTMLPreElementImpl): (HTMLMarqueeElementImpl::HTMLMarqueeElementImpl): (HTMLMarqueeElementImpl::parseMappedAttribute): * khtml/html/html_blockimpl.h: (DOM::HTMLBlockquoteElementImpl::endTagRequirement): (DOM::HTMLBlockquoteElementImpl::tagPriority): (DOM::HTMLDivElementImpl::endTagRequirement): (DOM::HTMLDivElementImpl::tagPriority): (DOM::HTMLHRElementImpl::endTagRequirement): (DOM::HTMLHRElementImpl::tagPriority): (DOM::HTMLHeadingElementImpl::endTagRequirement): (DOM::HTMLHeadingElementImpl::tagPriority): (DOM::HTMLParagraphElementImpl::endTagRequirement): (DOM::HTMLParagraphElementImpl::tagPriority): (DOM::HTMLPreElementImpl::endTagRequirement): (DOM::HTMLPreElementImpl::tagPriority): (DOM::HTMLMarqueeElementImpl::endTagRequirement): (DOM::HTMLMarqueeElementImpl::tagPriority): * khtml/html/html_canvasimpl.cpp: (HTMLCanvasElementImpl::HTMLCanvasElementImpl): * khtml/html/html_canvasimpl.h: * khtml/html/html_documentimpl.cpp: (DOM::HTMLDocumentImpl::childAllowed): (DOM::HTMLDocumentImpl::createElement): * khtml/html/html_documentimpl.h: * khtml/html/html_elementimpl.cpp: (HTMLElementImpl::HTMLElementImpl): (HTMLElementImpl::nodeName): (HTMLElementImpl::endTagRequirement): (HTMLElementImpl::tagPriority): (HTMLElementImpl::cloneNode): (HTMLElementImpl::createContextualFragment): (HTMLElementImpl::setInnerHTML): (HTMLElementImpl::setOuterHTML): (HTMLElementImpl::setInnerText): (HTMLElementImpl::setOuterText): (HTMLElementImpl::toString): (HTMLElementImpl::id): (HTMLElementImpl::childAllowed): (HTMLElementImpl::isRecognizedTagName): (inlineTagList): (blockTagList): (HTMLElementImpl::inEitherTagList): (HTMLElementImpl::inInlineTagList): (HTMLElementImpl::inBlockTagList): (HTMLElementImpl::checkDTD): * khtml/html/html_elementimpl.h: (DOM::): * khtml/html/html_formimpl.cpp: (DOM::HTMLFormElementImpl::HTMLFormElementImpl): (DOM::HTMLFormElementImpl::submitClick): (DOM::HTMLFormElementImpl::formData): (DOM::HTMLFormElementImpl::submit): (DOM::HTMLFormElementImpl::radioClicked): (DOM::HTMLGenericFormElementImpl::HTMLGenericFormElementImpl): (DOM::HTMLGenericFormElementImpl::getForm): (DOM::HTMLButtonElementImpl::HTMLButtonElementImpl): (DOM::HTMLFieldSetElementImpl::HTMLFieldSetElementImpl): (DOM::HTMLFieldSetElementImpl::checkDTD): (DOM::HTMLFieldSetElementImpl::isFocusable): (DOM::HTMLInputElementImpl::HTMLInputElementImpl): (DOM::HTMLInputElementImpl::init): (DOM::HTMLLabelElementImpl::HTMLLabelElementImpl): (DOM::HTMLLabelElementImpl::form): (DOM::HTMLLegendElementImpl::HTMLLegendElementImpl): (DOM::HTMLLegendElementImpl::formElement): (DOM::HTMLSelectElementImpl::HTMLSelectElementImpl): (DOM::HTMLSelectElementImpl::init): (DOM::HTMLSelectElementImpl::checkDTD): (DOM::HTMLSelectElementImpl::selectedIndex): (DOM::HTMLSelectElementImpl::setSelectedIndex): (DOM::HTMLSelectElementImpl::length): (DOM::HTMLSelectElementImpl::add): (DOM::HTMLSelectElementImpl::value): (DOM::HTMLSelectElementImpl::setValue): (DOM::HTMLSelectElementImpl::state): (DOM::HTMLSelectElementImpl::restoreState): (DOM::HTMLSelectElementImpl::appendFormData): (DOM::HTMLSelectElementImpl::optionToListIndex): (DOM::HTMLSelectElementImpl::listToOptionIndex): (DOM::HTMLSelectElementImpl::recalcListItems): (DOM::HTMLSelectElementImpl::reset): (DOM::HTMLSelectElementImpl::notifyOptionSelected): (DOM::HTMLKeygenElementImpl::HTMLKeygenElementImpl): (DOM::HTMLOptGroupElementImpl::HTMLOptGroupElementImpl): (DOM::HTMLOptGroupElementImpl::recalcSelectOptions): (DOM::HTMLOptionElementImpl::HTMLOptionElementImpl): (DOM::HTMLOptionElementImpl::index): (DOM::HTMLOptionElementImpl::getSelect): (DOM::HTMLTextAreaElementImpl::HTMLTextAreaElementImpl): (DOM::HTMLIsIndexElementImpl::HTMLIsIndexElementImpl): * khtml/html/html_formimpl.h: (DOM::HTMLFormElementImpl::endTagRequirement): (DOM::HTMLFormElementImpl::tagPriority): (DOM::HTMLGenericFormElementImpl::endTagRequirement): (DOM::HTMLGenericFormElementImpl::tagPriority): (DOM::HTMLFieldSetElementImpl::tagPriority): (DOM::HTMLInputElementImpl::endTagRequirement): (DOM::HTMLInputElementImpl::tagPriority): (DOM::HTMLLabelElementImpl::tagPriority): (DOM::HTMLSelectElementImpl::tagPriority): (DOM::HTMLKeygenElementImpl::tagPriority): (DOM::HTMLOptGroupElementImpl::checkDTD): (DOM::HTMLOptionElementImpl::endTagRequirement): (DOM::HTMLOptionElementImpl::tagPriority): (DOM::HTMLOptionElementImpl::checkDTD): (DOM::HTMLTextAreaElementImpl::checkDTD): (DOM::HTMLTextAreaElementImpl::cols): (DOM::HTMLIsIndexElementImpl::endTagRequirement): (DOM::HTMLIsIndexElementImpl::tagPriority): * khtml/html/html_headimpl.cpp: (HTMLBaseElementImpl::HTMLBaseElementImpl): (HTMLLinkElementImpl::HTMLLinkElementImpl): (HTMLMetaElementImpl::HTMLMetaElementImpl): (HTMLScriptElementImpl::HTMLScriptElementImpl): (HTMLStyleElementImpl::HTMLStyleElementImpl): (HTMLTitleElementImpl::HTMLTitleElementImpl): * khtml/html/html_headimpl.h: (DOM::HTMLBaseElementImpl::endTagRequirement): (DOM::HTMLBaseElementImpl::tagPriority): (DOM::HTMLLinkElementImpl::endTagRequirement): (DOM::HTMLLinkElementImpl::tagPriority): (DOM::HTMLMetaElementImpl::endTagRequirement): (DOM::HTMLMetaElementImpl::tagPriority): (DOM::HTMLScriptElementImpl::endTagRequirement): (DOM::HTMLScriptElementImpl::tagPriority): (DOM::HTMLScriptElementImpl::checkDTD): (DOM::HTMLStyleElementImpl::endTagRequirement): (DOM::HTMLStyleElementImpl::tagPriority): (DOM::HTMLStyleElementImpl::checkDTD): (DOM::HTMLTitleElementImpl::checkDTD): * khtml/html/html_imageimpl.cpp: (HTMLImageLoader::updateFromElement): (HTMLImageElementImpl::HTMLImageElementImpl): (HTMLImageElementImpl::~HTMLImageElementImpl): (HTMLMapElementImpl::HTMLMapElementImpl): (HTMLMapElementImpl::checkDTD): (HTMLMapElementImpl::mapMouseEvent): (HTMLAreaElementImpl::HTMLAreaElementImpl): * khtml/html/html_imageimpl.h: (DOM::HTMLImageElementImpl::endTagRequirement): (DOM::HTMLImageElementImpl::tagPriority): (DOM::HTMLAreaElementImpl::endTagRequirement): (DOM::HTMLAreaElementImpl::tagPriority): (DOM::HTMLMapElementImpl::endTagRequirement): (DOM::HTMLMapElementImpl::tagPriority): * khtml/html/html_inlineimpl.cpp: (DOM::HTMLAnchorElementImpl::HTMLAnchorElementImpl): (DOM::HTMLAnchorElementImpl::defaultEventHandler): (DOM::HTMLBRElementImpl::HTMLBRElementImpl): (DOM::HTMLFontElementImpl::HTMLFontElementImpl): (DOM::HTMLModElementImpl::HTMLModElementImpl): (DOM::HTMLQuoteElementImpl::HTMLQuoteElementImpl): * khtml/html/html_inlineimpl.h: (DOM::HTMLAnchorElementImpl::endTagRequirement): (DOM::HTMLAnchorElementImpl::tagPriority): (DOM::HTMLBRElementImpl::endTagRequirement): (DOM::HTMLBRElementImpl::tagPriority): (DOM::HTMLFontElementImpl::endTagRequirement): (DOM::HTMLFontElementImpl::tagPriority): (DOM::HTMLModElementImpl::endTagRequirement): (DOM::HTMLModElementImpl::tagPriority): (DOM::HTMLQuoteElementImpl::endTagRequirement): (DOM::HTMLQuoteElementImpl::tagPriority): * khtml/html/html_listimpl.cpp: (DOM::HTMLOListElementImpl::parseMappedAttribute): (DOM::HTMLLIElementImpl::attach): (DOM::HTMLLIElementImpl::setValue): * khtml/html/html_listimpl.h: (DOM::HTMLUListElementImpl::HTMLUListElementImpl): (DOM::HTMLUListElementImpl::endTagRequirement): (DOM::HTMLUListElementImpl::tagPriority): (DOM::HTMLDirectoryElementImpl::HTMLDirectoryElementImpl): (DOM::HTMLDirectoryElementImpl::endTagRequirement): (DOM::HTMLDirectoryElementImpl::tagPriority): (DOM::HTMLMenuElementImpl::HTMLMenuElementImpl): (DOM::HTMLMenuElementImpl::endTagRequirement): (DOM::HTMLMenuElementImpl::tagPriority): (DOM::HTMLOListElementImpl::HTMLOListElementImpl): (DOM::HTMLOListElementImpl::endTagRequirement): (DOM::HTMLOListElementImpl::tagPriority): (DOM::HTMLLIElementImpl::HTMLLIElementImpl): (DOM::HTMLLIElementImpl::endTagRequirement): (DOM::HTMLLIElementImpl::tagPriority): (DOM::HTMLDListElementImpl::HTMLDListElementImpl): (DOM::HTMLDListElementImpl::endTagRequirement): (DOM::HTMLDListElementImpl::tagPriority): * khtml/html/html_miscimpl.cpp: (DOM::HTMLBaseFontElementImpl::HTMLBaseFontElementImpl): (DOM::HTMLCollectionImpl::traverseNextItem): (DOM::HTMLCollectionImpl::checkForNameMatch): (DOM::HTMLCollectionImpl::updateNameCache): (DOM::HTMLFormCollectionImpl::getNamedFormItem): (DOM::HTMLFormCollectionImpl::updateNameCache): * khtml/html/html_miscimpl.h: (DOM::HTMLBaseFontElementImpl::endTagRequirement): (DOM::HTMLBaseFontElementImpl::tagPriority): * khtml/html/html_objectimpl.cpp: (DOM::HTMLAppletElementImpl::HTMLAppletElementImpl): (DOM::HTMLAppletElementImpl::checkDTD): (DOM::HTMLEmbedElementImpl::HTMLEmbedElementImpl): (DOM::HTMLEmbedElementImpl::checkDTD): (DOM::HTMLEmbedElementImpl::rendererIsNeeded): (DOM::HTMLObjectElementImpl::HTMLObjectElementImpl): (DOM::HTMLObjectElementImpl::checkDTD): (DOM::HTMLObjectElementImpl::form): (DOM::HTMLParamElementImpl::HTMLParamElementImpl): * khtml/html/html_objectimpl.h: (DOM::HTMLAppletElementImpl::endTagRequirement): (DOM::HTMLAppletElementImpl::tagPriority): (DOM::HTMLEmbedElementImpl::endTagRequirement): (DOM::HTMLEmbedElementImpl::tagPriority): (DOM::HTMLObjectElementImpl::endTagRequirement): (DOM::HTMLObjectElementImpl::tagPriority): (DOM::HTMLParamElementImpl::endTagRequirement): (DOM::HTMLParamElementImpl::tagPriority): * khtml/html/html_tableimpl.cpp: (DOM::HTMLTableElementImpl::HTMLTableElementImpl): (DOM::HTMLTableElementImpl::checkDTD): (DOM::HTMLTableElementImpl::createTHead): (DOM::HTMLTableElementImpl::createTFoot): (DOM::HTMLTableElementImpl::insertRow): (DOM::HTMLTableElementImpl::deleteRow): (DOM::HTMLTableElementImpl::addChild): (DOM::HTMLTableSectionElementImpl::HTMLTableSectionElementImpl): (DOM::HTMLTableSectionElementImpl::checkDTD): (DOM::HTMLTableSectionElementImpl::addChild): (DOM::HTMLTableSectionElementImpl::numRows): (DOM::HTMLTableRowElementImpl::checkDTD): (DOM::HTMLTableRowElementImpl::addChild): (DOM::HTMLTableRowElementImpl::rowIndex): (DOM::HTMLTableRowElementImpl::sectionRowIndex): (DOM::HTMLTableRowElementImpl::insertCell): (DOM::HTMLTableCellElementImpl::HTMLTableCellElementImpl): (DOM::HTMLTableCellElementImpl::cellIndex): (DOM::HTMLTableCellElementImpl::additionalAttributeStyleDecl): (DOM::HTMLTableColElementImpl::HTMLTableColElementImpl): * khtml/html/html_tableimpl.h: (DOM::HTMLTableElementImpl::endTagRequirement): (DOM::HTMLTableElementImpl::tagPriority): (DOM::HTMLTablePartElementImpl::HTMLTablePartElementImpl): (DOM::HTMLTableSectionElementImpl::endTagRequirement): (DOM::HTMLTableSectionElementImpl::tagPriority): (DOM::HTMLTableRowElementImpl::HTMLTableRowElementImpl): (DOM::HTMLTableRowElementImpl::endTagRequirement): (DOM::HTMLTableRowElementImpl::tagPriority): (DOM::HTMLTableCellElementImpl::endTagRequirement): (DOM::HTMLTableCellElementImpl::tagPriority): (DOM::HTMLTableColElementImpl::endTagRequirement): (DOM::HTMLTableColElementImpl::tagPriority): (DOM::HTMLTableColElementImpl::checkDTD): (DOM::HTMLTableCaptionElementImpl::HTMLTableCaptionElementImpl): (DOM::HTMLTableCaptionElementImpl::endTagRequirement): (DOM::HTMLTableCaptionElementImpl::tagPriority): * khtml/html/htmlfactory.cpp: Added. (DOM::htmlConstructor): (DOM::headConstructor): (DOM::bodyConstructor): (DOM::baseConstructor): (DOM::linkConstructor): (DOM::metaConstructor): (DOM::styleConstructor): (DOM::titleConstructor): (DOM::frameConstructor): (DOM::framesetConstructor): (DOM::iframeConstructor): (DOM::formConstructor): (DOM::buttonConstructor): (DOM::inputConstructor): (DOM::isindexConstructor): (DOM::fieldsetConstructor): (DOM::labelConstructor): (DOM::legendConstructor): (DOM::optgroupConstructor): (DOM::optionConstructor): (DOM::selectConstructor): (DOM::textareaConstructor): (DOM::dlConstructor): (DOM::ulConstructor): (DOM::olConstructor): (DOM::dirConstructor): (DOM::menuConstructor): (DOM::liConstructor): (DOM::blockquoteConstructor): (DOM::divConstructor): (DOM::headingConstructor): (DOM::hrConstructor): (DOM::paragraphConstructor): (DOM::preConstructor): (DOM::basefontConstructor): (DOM::fontConstructor): (DOM::modConstructor): (DOM::anchorConstructor): (DOM::imageConstructor): (DOM::mapConstructor): (DOM::areaConstructor): (DOM::canvasConstructor): (DOM::appletConstructor): (DOM::embedConstructor): (DOM::objectConstructor): (DOM::paramConstructor): (DOM::scriptConstructor): (DOM::tableConstructor): (DOM::tableCaptionConstructor): (DOM::tableColConstructor): (DOM::tableRowConstructor): (DOM::tableCellConstructor): (DOM::tableSectionConstructor): (DOM::brConstructor): (DOM::quoteConstructor): (DOM::marqueeConstructor): (DOM::HTMLElementFactory::createHTMLElement): * khtml/html/htmlfactory.h: Added. * khtml/html/htmlnames.cpp: (DOM::HTMLNames::init): * khtml/html/htmlnames.h: (DOM::HTMLNames::xhtmlNamespaceURI): * khtml/html/htmlparser.cpp: (HTMLStackElem::HTMLStackElem): (HTMLParser::HTMLParser): (HTMLParser::~HTMLParser): (HTMLParser::reset): (HTMLParser::setCurrent): (HTMLParser::parseToken): (isTableSection): (isTablePart): (isTableRelated): (HTMLParser::insertNode): (HTMLParser::handleError): (HTMLParser::textCreateErrorCheck): (HTMLParser::commentCreateErrorCheck): (HTMLParser::headCreateErrorCheck): (HTMLParser::bodyCreateErrorCheck): (HTMLParser::framesetCreateErrorCheck): (HTMLParser::iframeCreateErrorCheck): (HTMLParser::formCreateErrorCheck): (HTMLParser::isindexCreateErrorCheck): (HTMLParser::selectCreateErrorCheck): (HTMLParser::ddCreateErrorCheck): (HTMLParser::dtCreateErrorCheck): (HTMLParser::nestedCreateErrorCheck): (HTMLParser::nestedStyleCreateErrorCheck): (HTMLParser::tableCellCreateErrorCheck): (HTMLParser::tableSectionCreateErrorCheck): (HTMLParser::noembedCreateErrorCheck): (HTMLParser::noframesCreateErrorCheck): (HTMLParser::noscriptCreateErrorCheck): (HTMLParser::nolayerCreateErrorCheck): (HTMLParser::getNode): (HTMLParser::allowNestedRedundantTag): (HTMLParser::processCloseTag): (HTMLParser::isHeaderTag): (HTMLParser::popNestedHeaderTag): (HTMLParser::isInline): (HTMLParser::isResidualStyleTag): (HTMLParser::isAffectedByResidualStyle): (HTMLParser::handleResidualStyleCloseTagAcrossBlocks): (HTMLParser::reopenResidualStyleTags): (HTMLParser::pushBlock): (HTMLParser::popBlock): (HTMLParser::popOneBlock): (HTMLParser::popInlineBlocks): (HTMLParser::freeBlock): (HTMLParser::createHead): (HTMLParser::handleIsindex): (HTMLParser::startBody): (HTMLParser::finished): * khtml/html/htmlparser.h: (HTMLParser::skipMode): (HTMLParser::setSkipMode): (HTMLParser::popBlock): * khtml/html/htmltokenizer.cpp: (khtml::HTMLTokenizer::HTMLTokenizer): (khtml::HTMLTokenizer::parseSpecial): (khtml::HTMLTokenizer::scriptHandler): (khtml::HTMLTokenizer::parseComment): (khtml::HTMLTokenizer::parseTag): (khtml::HTMLTokenizer::processToken): * khtml/html/htmltokenizer.h: (khtml::Token::Token): (khtml::Token::~Token): (khtml::Token::addAttribute): (khtml::Token::isOpenTag): (khtml::Token::isCloseTag): (khtml::Token::reset): * khtml/khtml_part.cpp: (KHTMLPart::init): (KHTMLPart::selectionComputedStyle): * khtml/khtmlview.cpp: (KHTMLView::layout): (isSubmitImage): * khtml/misc/decoder.cpp: (Decoder::decode): * khtml/misc/hashmap.h: (khtml::::size): (khtml::::isEmpty): (khtml::::begin): (khtml::::end): (khtml::::get): * khtml/misc/hashset.h: (khtml::::size): (khtml::::isEmpty): (khtml::::begin): (khtml::::end): (khtml::::contains): * khtml/misc/hashtable.h: (khtml::HashTableIterator::skipEmptyBuckets): (khtml::::lookup): (khtml::::find): (khtml::::contains): (khtml::::remove): * khtml/misc/htmlhashes.cpp: (khtml::getAttrID): * khtml/misc/htmlhashes.h: * khtml/rendering/bidi.cpp: (khtml::BidiIterator::direction): * khtml/rendering/break_lines.cpp: (khtml::isBreakable): * khtml/rendering/render_applet.cpp: (RenderApplet::createWidgetIfNecessary): * khtml/rendering/render_block.cpp: (khtml::RenderBlock::layoutBlock): * khtml/rendering/render_box.cpp: (RenderBox::paintRootBoxDecorations): (RenderBox::paintBackgroundExtended): * khtml/rendering/render_canvasimage.cpp: (RenderCanvasImage::paint): * khtml/rendering/render_canvasimage.h: * khtml/rendering/render_container.cpp: (RenderContainer::updatePseudoChild): * khtml/rendering/render_flow.cpp: (RenderFlow::addFocusRingRects): * khtml/rendering/render_form.cpp: (RenderFieldset::findLegend): (RenderSelect::updateFromElement): (RenderSelect::layout): (RenderSelect::slotSelected): (RenderSelect::slotSelectionChanged): (RenderSelect::updateSelection): * khtml/rendering/render_frames.cpp: (RenderPartObject::updateWidget): (RenderPartObject::slotViewCleared): * khtml/rendering/render_image.cpp: (RenderImage::paint): (RenderImage::imageMap): (RenderImage::updateAltText): * khtml/rendering/render_image.h: * khtml/rendering/render_layer.cpp: (Marquee::marqueeSpeed): * khtml/rendering/render_line.cpp: * khtml/rendering/render_list.cpp: (getParentOfFirstLineBox): * khtml/rendering/render_object.cpp: (RenderObject::isBody): (RenderObject::isHR): (RenderObject::isHTMLMarquee): (RenderObject::sizesToMaxWidth): (RenderObject::information): (RenderObject::setStyle): (RenderObject::getTextDecorationColors): (RenderObject::setPixmap): * khtml/rendering/render_style.cpp: (RenderStyle::getPseudoStyle): * khtml/rendering/render_style.h: * khtml/rendering/render_table.cpp: (RenderTable::addChild): (RenderTable::layout): (RenderTableSection::addChild): (RenderTableRow::addChild): (RenderTableCell::updateFromElement): (RenderTableCol::updateFromElement): * khtml/xml/dom2_rangeimpl.cpp: * khtml/xml/dom2_traversalimpl.cpp: * khtml/xml/dom_atomicstring.cpp: (DOM::equal): (DOM::AtomicString::init): * khtml/xml/dom_atomicstring.h: * khtml/xml/dom_docimpl.cpp: (DocumentImpl::createElement): (DocumentImpl::importNode): (DocumentImpl::createElementNS): (DocumentImpl::body): (DocumentImpl::shouldScheduleLayout): (DocumentImpl::attrId): (DocumentImpl::recalcStyleSelector): * khtml/xml/dom_docimpl.h: * khtml/xml/dom_elementimpl.cpp: (AttrImpl::prefix): (AttrImpl::setPrefix): (ElementImpl::ElementImpl): (ElementImpl::~ElementImpl): (ElementImpl::cloneNode): (ElementImpl::hasAttributes): (ElementImpl::nodeName): (ElementImpl::setPrefix): (ElementImpl::openTagStartToString): (ElementImpl::toString): (StyledElementImpl::StyledElementImpl): * khtml/xml/dom_elementimpl.h: (DOM::ElementImpl::tagName): (DOM::ElementImpl::hasTagName): (DOM::ElementImpl::hasLocalName): (DOM::ElementImpl::localName): (DOM::ElementImpl::prefix): (DOM::ElementImpl::namespaceURI): (DOM::ElementImpl::mouseEventHandler): * khtml/xml/dom_nodeimpl.cpp: (DOM::NodeImpl::lastDescendant): (DOM::NodeImpl::prefix): (DOM::NodeImpl::setPrefix): (DOM::NodeImpl::localName): (DOM::NodeImpl::namespaceURI): (DOM::NodeImpl::checkSetPrefix): (DOM::NodeImpl::isAtomicNode): (DOM::NodeImpl::maxDeepOffset): (DOM::NodeImpl::enclosingBlockFlowOrTableElement): (DOM::NodeImpl::enclosingBlockFlowElement): (DOM::NodeImpl::enclosingInlineElement): (DOM::NodeImpl::rootEditableElement): (DOM::NodeImpl::getElementsByTagNameNS): (DOM::NodeImpl::showTreeAndMark): (DOM::ContainerNodeImpl::addChild): (DOM::TagNodeListImpl::TagNodeListImpl): (DOM::TagNodeListImpl::item): (DOM::TagNodeListImpl::nodeMatches): * khtml/xml/dom_nodeimpl.h: (DOM::NodeImpl::hasTagName): (DOM::NodeImpl::isCommentNode): (DOM::NodeImpl::isDocumentNode): (DOM::NodeImpl::closeRenderer): (DOM::NodeImpl::getElementsByTagName): * khtml/xml/dom_position.cpp: (DOM::Position::downstream): (DOM::Position::rendersInDifferentPosition): (DOM::Position::leadingWhitespacePosition): (DOM::Position::trailingWhitespacePosition): * khtml/xml/dom_qname.cpp: (DOM::hashComponents): (DOM::QNameHash::hash): (DOM::QNameHash::equal): (DOM::equalComponents): (DOM::convertComponents): (DOM::QualifiedName::QualifiedName): (DOM::QualifiedName::deref): (DOM::QualifiedName::setPrefix): * khtml/xml/dom_qname.h: (DOM::QualifiedName::hasPrefix): (DOM::operator==): * khtml/xml/dom_textimpl.cpp: (CommentImpl::localName): (CommentImpl::nodeName): (TextImpl::localName): (TextImpl::nodeName): * khtml/xml/dom_textimpl.h: (DOM::CommentImpl::isCommentNode): (DOM::TextImpl::isTextNode): * khtml/xml/xml_tokenizer.cpp: (khtml::XMLTokenizer::startElement): (khtml::XMLTokenizer::insertErrorMessageBlock): (khtml::XMLTokenizer::addScripts): * kwq/DOM.mm: (-[DOMNode setPrefix:]): (+[DOMNode _nodeWithImpl:]): (-[DOMElement tagName]): * kwq/DOMHTML.mm: (-[DOMHTMLQuoteElement _quoteElementImpl]): * kwq/KWQAccObject.mm: (-[KWQAccObject role]): (-[KWQAccObject title]): (-[KWQAccObject accessibilityIsIgnored]): * kwq/KWQDOMNode.cpp: Removed. * kwq/KWQDOMNode.h: Removed. * kwq/KWQFont.h: (QFont::): (QFont::isFixedPitch): * kwq/KWQFont.mm: (QFont::QFont): (QFont::operator=): (QFont::determinePitch): (QFont::operator==): * kwq/KWQKHTMLPart.cpp: (KWQKHTMLPart::isFrameSet): * kwq/KWQKHTMLPart.mm: (scanForForm): (KWQKHTMLPart::currentForm): (KWQKHTMLPart::searchForLabelsAboveCell): (KWQKHTMLPart::searchForLabelsBeforeElement): (listParent): (isTextFirstInListItem): (KWQKHTMLPart::attributedString): (KWQKHTMLPart::styleForSelectionStart): (KWQKHTMLPart::setSelectionFromNone): * kwq/KWQRenderTreeDebug.cpp: (getTagName): * kwq/WebCoreBridge.mm: (inputElementFromDOMElement): (formElementFromDOMElement): (-[WebCoreBridge elementAtPoint:]): * layout-tests/fast/dom/css-dom-read-expected.txt: * layout-tests/fast/overflow/003-expected.txt: * layout-tests/fast/tokenizer/002-expected.txt: * layout-tests/fast/tokenizer/external-script-document-write-expected.txt: * layout-tests/fast/tokenizer/script_extra_close-expected.txt: * layout-tests/fast/tokenizer/script_quirk-expected.txt: Removed. * layout-tests/fast/tokenizer/script_quirk.html: Removed. 2005-07-08 Eric Seidel Reviewed by mjs/hyatt (just approved the changelog). * ForwardingHeaders/kdom/css/impl/cssproperties.h: Added. * ForwardingHeaders/kdom/css/impl/cssvalues.h: Added. * ForwardingHeaders/ksvg2/KSVGPart.h: Added. * ForwardingHeaders/ksvg2/KSVGView.h: Added. * ForwardingHeaders/ksvg2/css/impl/cssproperties.h: Added. * ForwardingHeaders/ksvg2/css/impl/cssvalues.h: Added. * ForwardingHeaders/ksvg2/data/Constructors.lut.h: Added. * ForwardingHeaders/ksvg2/data/GlobalObject.lut.h: Added. * WebCore.pbproj/project.pbxproj: Added WebCore+SVG Target. * kcanvas/DESIGN: Added. * kcanvas/KCanvas.cc: Added. * kcanvas/KCanvas.h: Added. * kcanvas/KCanvasContainer.cc: Added. * kcanvas/KCanvasContainer.h: Added. * kcanvas/KCanvasCreator.cc: Added. * kcanvas/KCanvasCreator.h: Added. * kcanvas/KCanvasFilters.cc: Added. * kcanvas/KCanvasFilters.h: Added. * kcanvas/KCanvasImage.cc: Added. * kcanvas/KCanvasImage.h: Added. * kcanvas/KCanvasItem.cc: Added. * kcanvas/KCanvasItem.h: Added. * kcanvas/KCanvasMatrix.cc: Added. * kcanvas/KCanvasMatrix.h: Added. * kcanvas/KCanvasPath.h: Added. * kcanvas/KCanvasRegistry.cc: Added. * kcanvas/KCanvasRegistry.h: Added. * kcanvas/KCanvasResourceListener.h: Added. * kcanvas/KCanvasResources.cc: Added. * kcanvas/KCanvasResources.h: Added. * kcanvas/KCanvasTypes.h: Added. * kcanvas/KCanvasView.cc: Added. * kcanvas/KCanvasView.h: Added. * kcanvas/KCanvasView.moc: Added. * kcanvas/device/KRenderingDevice.cc: Added. * kcanvas/device/KRenderingDevice.h: Added. * kcanvas/device/KRenderingDevice.moc: Added. * kcanvas/device/KRenderingDeviceFactory.cc: Added. * kcanvas/device/KRenderingDeviceFactory.h: Added. * kcanvas/device/KRenderingFillPainter.cc: Added. * kcanvas/device/KRenderingFillPainter.h: Added. * kcanvas/device/KRenderingPaintServer.h: Added. * kcanvas/device/KRenderingPaintServerGradient.cc: Added. * kcanvas/device/KRenderingPaintServerGradient.h: Added. * kcanvas/device/KRenderingPaintServerImage.cc: Added. * kcanvas/device/KRenderingPaintServerImage.h: Added. * kcanvas/device/KRenderingPaintServerPattern.cc: Added. * kcanvas/device/KRenderingPaintServerPattern.h: Added. * kcanvas/device/KRenderingPaintServerSolid.cc: Added. * kcanvas/device/KRenderingPaintServerSolid.h: Added. * kcanvas/device/KRenderingStrokePainter.cc: Added. * kcanvas/device/KRenderingStrokePainter.h: Added. * kcanvas/device/KRenderingStyle.cc: Added. * kcanvas/device/KRenderingStyle.h: Added. * kcanvas/device/quartz/KCanvasFilterQuartz.h: Added. * kcanvas/device/quartz/KCanvasFilterQuartz.mm: Added. * kcanvas/device/quartz/KCanvasItemQuartz.h: Added. * kcanvas/device/quartz/KCanvasItemQuartz.mm: Added. * kcanvas/device/quartz/KCanvasResourcesQuartz.h: Added. * kcanvas/device/quartz/KCanvasResourcesQuartz.mm: Added. * kcanvas/device/quartz/KCanvasViewQuartz.h: Added. * kcanvas/device/quartz/KCanvasViewQuartz.mm: Added. * kcanvas/device/quartz/KRenderingDeviceQuartz.h: Added. * kcanvas/device/quartz/KRenderingDeviceQuartz.mm: Added. * kcanvas/device/quartz/KRenderingPaintServerGradientQuartz.mm: Added. * kcanvas/device/quartz/KRenderingPaintServerQuartz.h: Added. * kcanvas/device/quartz/KRenderingPaintServerQuartz.mm: Added. * kcanvas/device/quartz/QuartzSupport.h: Added. * kcanvas/device/quartz/QuartzSupport.mm: Added. * kdom/AUTHORS: Added. * kdom/Attr.cc: Added. * kdom/Attr.h: Added. * kdom/CDATASection.cc: Added. * kdom/CDATASection.h: Added. * kdom/CharacterData.cc: Added. * kdom/CharacterData.h: Added. * kdom/Comment.cc: Added. * kdom/Comment.h: Added. * kdom/DOMConfiguration.cc: Added. * kdom/DOMConfiguration.h: Added. * kdom/DOMError.cc: Added. * kdom/DOMError.h: Added. * kdom/DOMErrorHandler.cc: Added. * kdom/DOMErrorHandler.h: Added. * kdom/DOMException.cc: Added. * kdom/DOMException.h: Added. * kdom/DOMImplementation.cc: Added. * kdom/DOMImplementation.h: Added. * kdom/DOMLocator.cc: Added. * kdom/DOMLocator.h: Added. * kdom/DOMObject.cc: Added. * kdom/DOMObject.h: Added. * kdom/DOMString.cc: Added. * kdom/DOMString.h: Added. * kdom/DOMStringList.cc: Added. * kdom/DOMStringList.h: Added. * kdom/DOMUserData.cc: Added. * kdom/DOMUserData.h: Added. * kdom/Document.cc: Added. * kdom/Document.h: Added. * kdom/DocumentFragment.cc: Added. * kdom/DocumentFragment.h: Added. * kdom/DocumentType.cc: Added. * kdom/DocumentType.h: Added. * kdom/Element.cc: Added. * kdom/Element.h: Added. * kdom/Entity.cc: Added. * kdom/Entity.h: Added. * kdom/EntityReference.cc: Added. * kdom/EntityReference.h: Added. * kdom/Helper.cc: Added. * kdom/Helper.h: Added. * kdom/KDOMPart.cc: Added. * kdom/KDOMPart.h: Added. * kdom/KDOMSettings.cc: Added. * kdom/KDOMSettings.h: Added. * kdom/KDOMView.cc: Added. * kdom/KDOMView.h: Added. * kdom/NOTES: Added. * kdom/NamedNodeMap.cc: Added. * kdom/NamedNodeMap.h: Added. * kdom/Namespace.h: Added. * kdom/Node.cc: Added. * kdom/Node.h: Added. * kdom/NodeList.cc: Added. * kdom/NodeList.h: Added. * kdom/Notation.cc: Added. * kdom/Notation.h: Added. * kdom/ProcessingInstruction.cc: Added. * kdom/ProcessingInstruction.h: Added. * kdom/Shared.cc: Added. * kdom/Shared.h: Added. * kdom/Text.cc: Added. * kdom/Text.h: Added. * kdom/TreeShared.h: Added. * kdom/TypeInfo.cc: Added. * kdom/TypeInfo.h: Added. * kdom/backends/libxml/LibXMLParser.cc: Added. * kdom/backends/libxml/LibXMLParser.h: Added. * kdom/backends/libxml/LibXMLParser.moc: Added. * kdom/cache/IconData.h: Added. * kdom/cache/ImageSource.cc: Added. * kdom/cache/ImageSource.h: Added. * kdom/cache/KDOMCache.cc: Added. * kdom/cache/KDOMCache.h: Added. * kdom/cache/KDOMCacheHelper.h: Added. * kdom/cache/KDOMCachedDocument.cc: Added. * kdom/cache/KDOMCachedDocument.h: Added. * kdom/cache/KDOMCachedImage.cc: Added. * kdom/cache/KDOMCachedImage.h: Added. * kdom/cache/KDOMCachedImage.moc: Added. * kdom/cache/KDOMCachedObject.cc: Added. * kdom/cache/KDOMCachedObject.h: Added. * kdom/cache/KDOMCachedObjectClient.h: Added. * kdom/cache/KDOMCachedScript.cc: Added. * kdom/cache/KDOMCachedScript.h: Added. * kdom/cache/KDOMCachedStyleSheet.cc: Added. * kdom/cache/KDOMCachedStyleSheet.h: Added. * kdom/cache/KDOMLoader.cc: Added. * kdom/cache/KDOMLoader.h: Added. * kdom/cache/KDOMLoader.moc: Added. * kdom/css/CSSCharsetRule.cc: Added. * kdom/css/CSSCharsetRule.h: Added. * kdom/css/CSSFontFaceRule.cc: Added. * kdom/css/CSSFontFaceRule.h: Added. * kdom/css/CSSHelper.h: Added. * kdom/css/CSSImportRule.cc: Added. * kdom/css/CSSImportRule.h: Added. * kdom/css/CSSMediaRule.cc: Added. * kdom/css/CSSMediaRule.h: Added. * kdom/css/CSSPageRule.cc: Added. * kdom/css/CSSPageRule.h: Added. * kdom/css/CSSPrimitiveValue.cc: Added. * kdom/css/CSSPrimitiveValue.h: Added. * kdom/css/CSSRule.cc: Added. * kdom/css/CSSRule.h: Added. * kdom/css/CSSRuleList.cc: Added. * kdom/css/CSSRuleList.h: Added. * kdom/css/CSSStyleDeclaration.cc: Added. * kdom/css/CSSStyleDeclaration.h: Added. * kdom/css/CSSStyleRule.cc: Added. * kdom/css/CSSStyleRule.h: Added. * kdom/css/CSSStyleSheet.cc: Added. * kdom/css/CSSStyleSheet.h: Added. * kdom/css/CSSUnknownRule.cc: Added. * kdom/css/CSSUnknownRule.h: Added. * kdom/css/CSSValue.cc: Added. * kdom/css/CSSValue.h: Added. * kdom/css/CSSValueList.cc: Added. * kdom/css/CSSValueList.h: Added. * kdom/css/Counter.cc: Added. * kdom/css/Counter.h: Added. * kdom/css/DOMImplementationCSS.cc: Added. * kdom/css/DOMImplementationCSS.h: Added. * kdom/css/DocumentCSS.cc: Added. * kdom/css/DocumentCSS.h: Added. * kdom/css/DocumentStyle.cc: Added. * kdom/css/DocumentStyle.h: Added. * kdom/css/LinkStyle.cc: Added. * kdom/css/LinkStyle.h: Added. * kdom/css/MediaList.cc: Added. * kdom/css/MediaList.h: Added. * kdom/css/RGBColor.cc: Added. * kdom/css/RGBColor.h: Added. * kdom/css/Rect.cc: Added. * kdom/css/Rect.h: Added. * kdom/css/StyleSheet.cc: Added. * kdom/css/StyleSheet.h: Added. * kdom/css/StyleSheetList.cc: Added. * kdom/css/StyleSheetList.h: Added. * kdom/css/ViewCSS.cc: Added. * kdom/css/ViewCSS.h: Added. * kdom/css/impl/CSSCharsetRuleImpl.cc: Added. * kdom/css/impl/CSSCharsetRuleImpl.h: Added. * kdom/css/impl/CSSFontFaceRuleImpl.cc: Added. * kdom/css/impl/CSSFontFaceRuleImpl.h: Added. * kdom/css/impl/CSSImageValueImpl.cc: Added. * kdom/css/impl/CSSImageValueImpl.h: Added. * kdom/css/impl/CSSImportRuleImpl.cc: Added. * kdom/css/impl/CSSImportRuleImpl.h: Added. * kdom/css/impl/CSSMediaRuleImpl.cc: Added. * kdom/css/impl/CSSMediaRuleImpl.h: Added. * kdom/css/impl/CSSPageRuleImpl.cc: Added. * kdom/css/impl/CSSPageRuleImpl.h: Added. * kdom/css/impl/CSSPrimitiveValueImpl.cc: Added. * kdom/css/impl/CSSPrimitiveValueImpl.h: Added. * kdom/css/impl/CSSRuleImpl.cc: Added. * kdom/css/impl/CSSRuleImpl.h: Added. * kdom/css/impl/CSSRuleListImpl.cc: Added. * kdom/css/impl/CSSRuleListImpl.h: Added. * kdom/css/impl/CSSStyleDeclarationImpl.cc: Added. * kdom/css/impl/CSSStyleDeclarationImpl.h: Added. * kdom/css/impl/CSSStyleRuleImpl.cc: Added. * kdom/css/impl/CSSStyleRuleImpl.h: Added. * kdom/css/impl/CSSStyleSelector.cc: Added. * kdom/css/impl/CSSStyleSelector.h: Added. * kdom/css/impl/CSSStyleSheetImpl.cc: Added. * kdom/css/impl/CSSStyleSheetImpl.h: Added. * kdom/css/impl/CSSUnknownRuleImpl.cc: Added. * kdom/css/impl/CSSUnknownRuleImpl.h: Added. * kdom/css/impl/CSSValueImpl.cc: Added. * kdom/css/impl/CSSValueImpl.h: Added. * kdom/css/impl/CSSValueListImpl.cc: Added. * kdom/css/impl/CSSValueListImpl.h: Added. * kdom/css/impl/CounterImpl.cc: Added. * kdom/css/impl/CounterImpl.h: Added. * kdom/css/impl/DocumentStyleImpl.cc: Added. * kdom/css/impl/DocumentStyleImpl.h: Added. * kdom/css/impl/Font.cc: Added. * kdom/css/impl/Font.h: Added. * kdom/css/impl/KDOMCSSParser.cc: Added. * kdom/css/impl/KDOMCSSParser.h: Added. * kdom/css/impl/MediaListImpl.cc: Added. * kdom/css/impl/MediaListImpl.h: Added. * kdom/css/impl/RGBColorImpl.cc: Added. * kdom/css/impl/RGBColorImpl.h: Added. * kdom/css/impl/RectImpl.cc: Added. * kdom/css/impl/RectImpl.h: Added. * kdom/css/impl/RenderStyle.cc: Added. * kdom/css/impl/RenderStyle.h: Added. * kdom/css/impl/RenderStyleDefs.cc: Added. * kdom/css/impl/RenderStyleDefs.h: Added. * kdom/css/impl/StyleBaseImpl.cc: Added. * kdom/css/impl/StyleBaseImpl.h: Added. * kdom/css/impl/StyleSheetImpl.cc: Added. * kdom/css/impl/StyleSheetImpl.h: Added. * kdom/css/impl/StyleSheetListImpl.cc: Added. * kdom/css/impl/StyleSheetListImpl.h: Added. * kdom/css/impl/cssproperties.in: Added. * kdom/css/impl/cssvalues.in: Added. * kdom/css/impl/kdomparsercss.y: Added. * kdom/css/impl/tokenizer.cpp: Added. * kdom/css/kdomcss.h: Added. * kdom/data/CSSConstants.h: Added. * kdom/data/DOMConstants.h: Added. * kdom/data/EcmaConstants.h: Added. * kdom/data/EventsConstants.h: Added. * kdom/data/LSConstants.h: Added. * kdom/data/RangeConstants.h: Added. * kdom/data/TraversalConstants.h: Added. * kdom/data/ViewConstants.h: Added. * kdom/data/XPathConstants.h: Added. * kdom/data/generateddata.cc: Added. * kdom/ecma/Constructors.cc: Added. * kdom/ecma/Constructors.h: Added. * kdom/ecma/DOMBridge.h: Added. * kdom/ecma/DOMLookup.h: Added. * kdom/ecma/Ecma.cc: Added. * kdom/ecma/Ecma.h: Added. * kdom/ecma/EcmaInterface.h: Added. * kdom/ecma/GlobalObject.cc: Added. * kdom/ecma/GlobalObject.h: Added. * kdom/ecma/GlobalObject.moc: Added. * kdom/ecma/Helper.cc: Added. * kdom/ecma/ScriptInterpreter.cc: Added. * kdom/ecma/ScriptInterpreter.h: Added. * kdom/events/DocumentEvent.cc: Added. * kdom/events/DocumentEvent.h: Added. * kdom/events/Event.cc: Added. * kdom/events/Event.h: Added. * kdom/events/EventException.cc: Added. * kdom/events/EventException.h: Added. * kdom/events/EventListener.cc: Added. * kdom/events/EventListener.h: Added. * kdom/events/EventTarget.cc: Added. * kdom/events/EventTarget.h: Added. * kdom/events/KeyboardEvent.cc: Added. * kdom/events/KeyboardEvent.h: Added. * kdom/events/MouseEvent.cc: Added. * kdom/events/MouseEvent.h: Added. * kdom/events/MutationEvent.cc: Added. * kdom/events/MutationEvent.h: Added. * kdom/events/UIEvent.cc: Added. * kdom/events/UIEvent.h: Added. * kdom/events/impl/DocumentEventImpl.cc: Added. * kdom/events/impl/DocumentEventImpl.h: Added. * kdom/events/impl/EventExceptionImpl.cc: Added. * kdom/events/impl/EventExceptionImpl.h: Added. * kdom/events/impl/EventImpl.cc: Added. * kdom/events/impl/EventImpl.h: Added. * kdom/events/impl/EventListenerImpl.cc: Added. * kdom/events/impl/EventListenerImpl.h: Added. * kdom/events/impl/EventTargetImpl.cc: Added. * kdom/events/impl/EventTargetImpl.h: Added. * kdom/events/impl/KeyboardEventImpl.cc: Added. * kdom/events/impl/KeyboardEventImpl.h: Added. * kdom/events/impl/MouseEventImpl.cc: Added. * kdom/events/impl/MouseEventImpl.h: Added. * kdom/events/impl/MutationEventImpl.cc: Added. * kdom/events/impl/MutationEventImpl.h: Added. * kdom/events/impl/RegisteredEventListener.cc: Added. * kdom/events/impl/RegisteredEventListener.h: Added. * kdom/events/impl/UIEventImpl.cc: Added. * kdom/events/impl/UIEventImpl.h: Added. * kdom/events/kdomevents.h: Added. * kdom/impl/AttrImpl.cc: Added. * kdom/impl/AttrImpl.h: Added. * kdom/impl/CDATASectionImpl.cc: Added. * kdom/impl/CDATASectionImpl.h: Added. * kdom/impl/CDFInterface.cc: Added. * kdom/impl/CDFInterface.h: Added. * kdom/impl/CharacterDataImpl.cc: Added. * kdom/impl/CharacterDataImpl.h: Added. * kdom/impl/CommentImpl.cc: Added. * kdom/impl/CommentImpl.h: Added. * kdom/impl/DOMConfigurationImpl.cc: Added. * kdom/impl/DOMConfigurationImpl.h: Added. * kdom/impl/DOMErrorHandlerImpl.cc: Added. * kdom/impl/DOMErrorHandlerImpl.h: Added. * kdom/impl/DOMErrorImpl.cc: Added. * kdom/impl/DOMErrorImpl.h: Added. * kdom/impl/DOMExceptionImpl.cc: Added. * kdom/impl/DOMExceptionImpl.h: Added. * kdom/impl/DOMImplementationImpl.cc: Added. * kdom/impl/DOMImplementationImpl.h: Added. * kdom/impl/DOMList.h: Added. * kdom/impl/DOMLocatorImpl.cc: Added. * kdom/impl/DOMLocatorImpl.h: Added. * kdom/impl/DOMStringImpl.cc: Added. * kdom/impl/DOMStringImpl.h: Added. * kdom/impl/DOMStringListImpl.cc: Added. * kdom/impl/DOMStringListImpl.h: Added. * kdom/impl/DOMUserDataImpl.cc: Added. * kdom/impl/DOMUserDataImpl.h: Added. * kdom/impl/DocumentFragmentImpl.cc: Added. * kdom/impl/DocumentFragmentImpl.h: Added. * kdom/impl/DocumentImpl.cc: Added. * kdom/impl/DocumentImpl.h: Added. * kdom/impl/DocumentTypeImpl.cc: Added. * kdom/impl/DocumentTypeImpl.h: Added. * kdom/impl/ElementImpl.cc: Added. * kdom/impl/ElementImpl.h: Added. * kdom/impl/EntityImpl.cc: Added. * kdom/impl/EntityImpl.h: Added. * kdom/impl/EntityReferenceImpl.cc: Added. * kdom/impl/EntityReferenceImpl.h: Added. * kdom/impl/NamedAttrMapImpl.cc: Added. * kdom/impl/NamedAttrMapImpl.h: Added. * kdom/impl/NamedNodeMapImpl.cc: Added. * kdom/impl/NamedNodeMapImpl.h: Added. * kdom/impl/NodeImpl.cc: Added. * kdom/impl/NodeImpl.h: Added. * kdom/impl/NodeKeeper.cc: Added. * kdom/impl/NodeKeeper.h: Added. * kdom/impl/NodeListImpl.cc: Added. * kdom/impl/NodeListImpl.h: Added. * kdom/impl/NotationImpl.cc: Added. * kdom/impl/NotationImpl.h: Added. * kdom/impl/ProcessingInstructionImpl.cc: Added. * kdom/impl/ProcessingInstructionImpl.h: Added. * kdom/impl/TagNodeListImpl.cc: Added. * kdom/impl/TagNodeListImpl.h: Added. * kdom/impl/TextImpl.cc: Added. * kdom/impl/TextImpl.h: Added. * kdom/impl/TypeInfoImpl.cc: Added. * kdom/impl/TypeInfoImpl.h: Added. * kdom/impl/XMLElementImpl.cc: Added. * kdom/impl/XMLElementImpl.h: Added. * kdom/impl/domattrs.c: Added. * kdom/impl/domattrs.h: Added. * kdom/impl/domattrs.in: Added. * kdom/kdom.h: Added. * kdom/ls/DOMImplementationLS.cc: Added. * kdom/ls/DOMImplementationLS.h: Added. * kdom/ls/LSException.cc: Added. * kdom/ls/LSException.h: Added. * kdom/ls/LSInput.cc: Added. * kdom/ls/LSInput.h: Added. * kdom/ls/LSOutput.cc: Added. * kdom/ls/LSOutput.h: Added. * kdom/ls/LSParser.cc: Added. * kdom/ls/LSParser.h: Added. * kdom/ls/LSParserFilter.cc: Added. * kdom/ls/LSParserFilter.h: Added. * kdom/ls/LSResourceResolver.cc: Added. * kdom/ls/LSResourceResolver.h: Added. * kdom/ls/LSSerializer.cc: Added. * kdom/ls/LSSerializer.h: Added. * kdom/ls/LSSerializerFilter.cc: Added. * kdom/ls/LSSerializerFilter.h: Added. * kdom/ls/impl/LSExceptionImpl.cc: Added. * kdom/ls/impl/LSExceptionImpl.h: Added. * kdom/ls/impl/LSInputImpl.cc: Added. * kdom/ls/impl/LSInputImpl.h: Added. * kdom/ls/impl/LSOutputImpl.cc: Added. * kdom/ls/impl/LSOutputImpl.h: Added. * kdom/ls/impl/LSParserFilterImpl.cc: Added. * kdom/ls/impl/LSParserFilterImpl.h: Added. * kdom/ls/impl/LSParserImpl.cc: Added. * kdom/ls/impl/LSParserImpl.h: Added. * kdom/ls/impl/LSResourceResolverImpl.cc: Added. * kdom/ls/impl/LSResourceResolverImpl.h: Added. * kdom/ls/impl/LSSerializerFilterImpl.cc: Added. * kdom/ls/impl/LSSerializerFilterImpl.h: Added. * kdom/ls/impl/LSSerializerImpl.cc: Added. * kdom/ls/impl/LSSerializerImpl.h: Added. * kdom/ls/kdomls.h: Added. * kdom/parser/KDOMDataSlave.moc: Added. * kdom/parser/KDOMDocumentBuilder.cc: Added. * kdom/parser/KDOMDocumentBuilder.h: Added. * kdom/parser/KDOMParser.cc: Added. * kdom/parser/KDOMParser.h: Added. * kdom/parser/KDOMParser.moc: Added. * kdom/range/DocumentRange.cc: Added. * kdom/range/DocumentRange.h: Added. * kdom/range/Range.cc: Added. * kdom/range/Range.h: Added. * kdom/range/RangeException.cc: Added. * kdom/range/RangeException.h: Added. * kdom/range/impl/DocumentRangeImpl.cc: Added. * kdom/range/impl/DocumentRangeImpl.h: Added. * kdom/range/impl/RangeExceptionImpl.cc: Added. * kdom/range/impl/RangeExceptionImpl.h: Added. * kdom/range/impl/RangeImpl.cc: Added. * kdom/range/impl/RangeImpl.h: Added. * kdom/range/kdomrange.h: Added. * kdom/scripts/OVERVIEW: Added. * kdom/scripts/constants.pl: Added. * kdom/scripts/css.idl: Added. * kdom/scripts/cssmakeprops: Added. * kdom/scripts/cssmakevalues: Added. * kdom/scripts/dom2-core.idl: Added. * kdom/scripts/dom2-events.idl: Added. * kdom/scripts/dom2-range.idl: Added. * kdom/scripts/dom2-traversal.idl: Added. * kdom/scripts/dom2-views.idl: Added. * kdom/scripts/dommakeattrs: Added. * kdom/scripts/generate.pl: Added. * kdom/scripts/kalyptusKDOMEcma.pm: Added. * kdom/scripts/stylesheets.idl: Added. * kdom/traversal/DocumentTraversal.cc: Added. * kdom/traversal/DocumentTraversal.h: Added. * kdom/traversal/NodeFilter.cc: Added. * kdom/traversal/NodeFilter.h: Added. * kdom/traversal/NodeIterator.cc: Added. * kdom/traversal/NodeIterator.h: Added. * kdom/traversal/TreeWalker.cc: Added. * kdom/traversal/TreeWalker.h: Added. * kdom/traversal/impl/DocumentTraversalImpl.cc: Added. * kdom/traversal/impl/DocumentTraversalImpl.h: Added. * kdom/traversal/impl/NodeFilterImpl.cc: Added. * kdom/traversal/impl/NodeFilterImpl.h: Added. * kdom/traversal/impl/NodeIteratorImpl.cc: Added. * kdom/traversal/impl/NodeIteratorImpl.h: Added. * kdom/traversal/impl/TraversalImpl.cc: Added. * kdom/traversal/impl/TraversalImpl.h: Added. * kdom/traversal/impl/TreeWalkerImpl.cc: Added. * kdom/traversal/impl/TreeWalkerImpl.h: Added. * kdom/traversal/kdomtraversal.h: Added. * kdom/views/AbstractView.cc: Added. * kdom/views/AbstractView.h: Added. * kdom/views/DocumentView.cc: Added. * kdom/views/DocumentView.h: Added. * kdom/views/impl/AbstractViewImpl.cc: Added. * kdom/views/impl/AbstractViewImpl.h: Added. * kdom/views/impl/DocumentViewImpl.cc: Added. * kdom/views/impl/DocumentViewImpl.h: Added. * kdom/xpath/XPathEvaluator.cc: Added. * kdom/xpath/XPathEvaluator.h: Added. * kdom/xpath/XPathException.cc: Added. * kdom/xpath/XPathException.h: Added. * kdom/xpath/XPathExpression.cc: Added. * kdom/xpath/XPathExpression.h: Added. * kdom/xpath/XPathNSResolver.cc: Added. * kdom/xpath/XPathNSResolver.h: Added. * kdom/xpath/XPathNamespace.cc: Added. * kdom/xpath/XPathNamespace.h: Added. * kdom/xpath/XPathResult.cc: Added. * kdom/xpath/XPathResult.h: Added. * kdom/xpath/impl/AxisImpl.cc: Added. * kdom/xpath/impl/AxisImpl.h: Added. * kdom/xpath/impl/ContextImpl.cc: Added. * kdom/xpath/impl/ContextImpl.h: Added. * kdom/xpath/impl/ExprNodeImpl.cc: Added. * kdom/xpath/impl/ExprNodeImpl.h: Added. * kdom/xpath/impl/FILES: Added. * kdom/xpath/impl/LiteralImpl.cc: Added. * kdom/xpath/impl/LiteralImpl.h: Added. * kdom/xpath/impl/OperatorImpl.cc: Added. * kdom/xpath/impl/OperatorImpl.h: Added. * kdom/xpath/impl/ScopeImpl.cc: Added. * kdom/xpath/impl/ScopeImpl.h: Added. * kdom/xpath/impl/StepImpl.cc: Added. * kdom/xpath/impl/StepImpl.h: Added. * kdom/xpath/impl/VariableRefImpl.cc: Added. * kdom/xpath/impl/VariableRefImpl.h: Added. * kdom/xpath/impl/XPathCustomExceptionImpl.cc: Added. * kdom/xpath/impl/XPathCustomExceptionImpl.h: Added. * kdom/xpath/impl/XPathEvaluatorImpl.cc: Added. * kdom/xpath/impl/XPathEvaluatorImpl.h: Added. * kdom/xpath/impl/XPathExceptionImpl.cc: Added. * kdom/xpath/impl/XPathExceptionImpl.h: Added. * kdom/xpath/impl/XPathExpressionFilterImpl.cc: Added. * kdom/xpath/impl/XPathExpressionFilterImpl.h: Added. * kdom/xpath/impl/XPathExpressionImpl.cc: Added. * kdom/xpath/impl/XPathExpressionImpl.h: Added. * kdom/xpath/impl/XPathFactory1Impl.cc: Added. * kdom/xpath/impl/XPathFactory1Impl.h: Added. * kdom/xpath/impl/XPathFactoryBaseImpl.cc: Added. * kdom/xpath/impl/XPathFactoryBaseImpl.h: Added. * kdom/xpath/impl/XPathHelper.cc: Added. * kdom/xpath/impl/XPathHelper.h: Added. * kdom/xpath/impl/XPathNSResolverImpl.cc: Added. * kdom/xpath/impl/XPathNSResolverImpl.h: Added. * kdom/xpath/impl/XPathNamespaceImpl.cc: Added. * kdom/xpath/impl/XPathNamespaceImpl.h: Added. * kdom/xpath/impl/XPathResultImpl.cc: Added. * kdom/xpath/impl/XPathResultImpl.h: Added. * kdom/xpath/impl/data/BooleanImpl.cc: Added. * kdom/xpath/impl/data/BooleanImpl.h: Added. * kdom/xpath/impl/data/NodeSetImpl.cc: Added. * kdom/xpath/impl/data/NodeSetImpl.h: Added. * kdom/xpath/impl/data/NumberImpl.cc: Added. * kdom/xpath/impl/data/NumberImpl.h: Added. * kdom/xpath/impl/data/StringImpl.cc: Added. * kdom/xpath/impl/data/StringImpl.h: Added. * kdom/xpath/impl/data/ValueImpl.cc: Added. * kdom/xpath/impl/data/ValueImpl.h: Added. * kdom/xpath/impl/functions1/FunctionCallImpl.cc: Added. * kdom/xpath/impl/functions1/FunctionCallImpl.h: Added. * kdom/xpath/impl/functions1/README: Added. * kdom/xpath/impl/functions1/boolean_fnxp1.cc: Added. * kdom/xpath/impl/functions1/boolean_fnxp1.h: Added. * kdom/xpath/impl/functions1/ceiling_fnxp1.cc: Added. * kdom/xpath/impl/functions1/ceiling_fnxp1.h: Added. * kdom/xpath/impl/functions1/concat_fnxp1.cc: Added. * kdom/xpath/impl/functions1/concat_fnxp1.h: Added. * kdom/xpath/impl/functions1/contains_fnxp1.cc: Added. * kdom/xpath/impl/functions1/contains_fnxp1.h: Added. * kdom/xpath/impl/functions1/false_fnxp1.cc: Added. * kdom/xpath/impl/functions1/false_fnxp1.h: Added. * kdom/xpath/impl/functions1/floor_fnxp1.cc: Added. * kdom/xpath/impl/functions1/floor_fnxp1.h: Added. * kdom/xpath/impl/functions1/normalize-space_fnxp1.cc: Added. * kdom/xpath/impl/functions1/normalize-space_fnxp1.h: Added. * kdom/xpath/impl/functions1/not_fnxp1.cc: Added. * kdom/xpath/impl/functions1/not_fnxp1.h: Added. * kdom/xpath/impl/functions1/number_fnxp1.cc: Added. * kdom/xpath/impl/functions1/number_fnxp1.h: Added. * kdom/xpath/impl/functions1/round_fnxp1.cc: Added. * kdom/xpath/impl/functions1/round_fnxp1.h: Added. * kdom/xpath/impl/functions1/starts-with_fnxp1.cc: Added. * kdom/xpath/impl/functions1/starts-with_fnxp1.h: Added. * kdom/xpath/impl/functions1/string-length_fnxp1.cc: Added. * kdom/xpath/impl/functions1/string-length_fnxp1.h: Added. * kdom/xpath/impl/functions1/string_fnxp1.cc: Added. * kdom/xpath/impl/functions1/string_fnxp1.h: Added. * kdom/xpath/impl/functions1/substring-after_fnxp1.cc: Added. * kdom/xpath/impl/functions1/substring-after_fnxp1.h: Added. * kdom/xpath/impl/functions1/substring-before_fnxp1.cc: Added. * kdom/xpath/impl/functions1/substring-before_fnxp1.h: Added. * kdom/xpath/impl/functions1/substring_fnxp1.cc: Added. * kdom/xpath/impl/functions1/substring_fnxp1.h: Added. * kdom/xpath/impl/functions1/true_fnxp1.cc: Added. * kdom/xpath/impl/functions1/true_fnxp1.h: Added. * kdom/xpath/impl/parser/Lexer.cc: Added. * kdom/xpath/impl/parser/Lexer.h: Added. * kdom/xpath/impl/parser/Lexer.l: Added. * kdom/xpath/impl/parser/ParserState.cc: Added. * kdom/xpath/impl/parser/ParserState.h: Added. * kdom/xpath/impl/parser/xpath.ypp: Added. * kdom/xpath/impl/utils/QNameImpl.cc: Added. * kdom/xpath/impl/utils/QNameImpl.h: Added. * kdom/xpath/kdomxpath.h: Added. * kdom/xpointer/XPointerEvaluator.cc: Added. * kdom/xpointer/XPointerEvaluator.h: Added. * kdom/xpointer/XPointerException.cc: Added. * kdom/xpointer/XPointerException.h: Added. * kdom/xpointer/XPointerExpression.cc: Added. * kdom/xpointer/XPointerExpression.h: Added. * kdom/xpointer/XPointerHelper.cc: Added. * kdom/xpointer/XPointerHelper.h: Added. * kdom/xpointer/XPointerResult.cc: Added. * kdom/xpointer/XPointerResult.h: Added. * kdom/xpointer/impl/ElementSchemeImpl.cc: Added. * kdom/xpointer/impl/ElementSchemeImpl.h: Added. * kdom/xpointer/impl/NBCImpl.cc: Added. * kdom/xpointer/impl/NBCImpl.h: Added. * kdom/xpointer/impl/PointerPartImpl.cc: Added. * kdom/xpointer/impl/PointerPartImpl.h: Added. * kdom/xpointer/impl/ShortHandImpl.cc: Added. * kdom/xpointer/impl/ShortHandImpl.h: Added. * kdom/xpointer/impl/XMLNSSchemeImpl.cc: Added. * kdom/xpointer/impl/XMLNSSchemeImpl.h: Added. * kdom/xpointer/impl/XPath1SchemeImpl.cc: Added. * kdom/xpointer/impl/XPath1SchemeImpl.h: Added. * kdom/xpointer/impl/XPointerEvaluatorImpl.cc: Added. * kdom/xpointer/impl/XPointerEvaluatorImpl.h: Added. * kdom/xpointer/impl/XPointerExceptionImpl.cc: Added. * kdom/xpointer/impl/XPointerExceptionImpl.h: Added. * kdom/xpointer/impl/XPointerExpressionImpl.cc: Added. * kdom/xpointer/impl/XPointerExpressionImpl.h: Added. * kdom/xpointer/impl/XPointerResultImpl.cc: Added. * kdom/xpointer/impl/XPointerResultImpl.h: Added. * kdom/xpointer/impl/XPointerSchemeImpl.cc: Added. * kdom/xpointer/impl/XPointerSchemeImpl.h: Added. * kdom/xpointer/kdomxpointer.h: Added. * ksvg2/KSVGFactory.cc: Added. * ksvg2/KSVGFactory.h: Added. * ksvg2/KSVGSettings.cc: Added. * ksvg2/KSVGSettings.h: Added. * ksvg2/KSVGSlotStubs.h: Added. * ksvg2/KWQKSVGPart.h: Added. * ksvg2/KWQKSVGPart.mm: Added. * ksvg2/KWQKSVGView.h: Added. * ksvg2/KWQKSVGView.mm: Added. * ksvg2/css/impl/KSVGCSSParser.cc: Added. * ksvg2/css/impl/KSVGCSSParser.h: Added. * ksvg2/css/impl/SVGCSSStyleDeclarationImpl.cc: Added. * ksvg2/css/impl/SVGCSSStyleDeclarationImpl.h: Added. * ksvg2/css/impl/SVGCSSStyleSelector.cc: Added. * ksvg2/css/impl/SVGCSSStyleSelector.h: Added. * ksvg2/css/impl/SVGCSSStyleSheetImpl.cc: Added. * ksvg2/css/impl/SVGCSSStyleSheetImpl.h: Added. * ksvg2/css/impl/SVGRenderStyle.cc: Added. * ksvg2/css/impl/SVGRenderStyle.h: Added. * ksvg2/css/impl/SVGRenderStyleDefs.cc: Added. * ksvg2/css/impl/SVGRenderStyleDefs.h: Added. * ksvg2/css/impl/cssproperties.in: Added. * ksvg2/css/impl/cssvalues.in: Added. * ksvg2/css/impl/svg.css: Added. * ksvg2/data/CSSConstants.h: Added. * ksvg2/data/EcmaConstants.h: Added. * ksvg2/data/EventsConstants.h: Added. * ksvg2/data/SVGConstants.h: Added. * ksvg2/data/generateddata.cc: Added. * ksvg2/dom/SVGAElement.cc: Added. * ksvg2/dom/SVGAElement.h: Added. * ksvg2/dom/SVGAngle.cc: Added. * ksvg2/dom/SVGAngle.h: Added. * ksvg2/dom/SVGAnimateColorElement.cc: Added. * ksvg2/dom/SVGAnimateColorElement.h: Added. * ksvg2/dom/SVGAnimateElement.cc: Added. * ksvg2/dom/SVGAnimateElement.h: Added. * ksvg2/dom/SVGAnimateTransformElement.cc: Added. * ksvg2/dom/SVGAnimateTransformElement.h: Added. * ksvg2/dom/SVGAnimatedAngle.cc: Added. * ksvg2/dom/SVGAnimatedAngle.h: Added. * ksvg2/dom/SVGAnimatedBoolean.cc: Added. * ksvg2/dom/SVGAnimatedBoolean.h: Added. * ksvg2/dom/SVGAnimatedEnumeration.cc: Added. * ksvg2/dom/SVGAnimatedEnumeration.h: Added. * ksvg2/dom/SVGAnimatedInteger.cc: Added. * ksvg2/dom/SVGAnimatedInteger.h: Added. * ksvg2/dom/SVGAnimatedLength.cc: Added. * ksvg2/dom/SVGAnimatedLength.h: Added. * ksvg2/dom/SVGAnimatedLengthList.cc: Added. * ksvg2/dom/SVGAnimatedLengthList.h: Added. * ksvg2/dom/SVGAnimatedNumber.cc: Added. * ksvg2/dom/SVGAnimatedNumber.h: Added. * ksvg2/dom/SVGAnimatedNumberList.cc: Added. * ksvg2/dom/SVGAnimatedNumberList.h: Added. * ksvg2/dom/SVGAnimatedPathData.cc: Added. * ksvg2/dom/SVGAnimatedPathData.h: Added. * ksvg2/dom/SVGAnimatedPoints.cc: Added. * ksvg2/dom/SVGAnimatedPoints.h: Added. * ksvg2/dom/SVGAnimatedPreserveAspectRatio.cc: Added. * ksvg2/dom/SVGAnimatedPreserveAspectRatio.h: Added. * ksvg2/dom/SVGAnimatedRect.cc: Added. * ksvg2/dom/SVGAnimatedRect.h: Added. * ksvg2/dom/SVGAnimatedString.cc: Added. * ksvg2/dom/SVGAnimatedString.h: Added. * ksvg2/dom/SVGAnimatedTransformList.cc: Added. * ksvg2/dom/SVGAnimatedTransformList.h: Added. * ksvg2/dom/SVGAnimationElement.cc: Added. * ksvg2/dom/SVGAnimationElement.h: Added. * ksvg2/dom/SVGCircleElement.cc: Added. * ksvg2/dom/SVGCircleElement.h: Added. * ksvg2/dom/SVGClipPathElement.cc: Added. * ksvg2/dom/SVGClipPathElement.h: Added. * ksvg2/dom/SVGColor.cc: Added. * ksvg2/dom/SVGColor.h: Added. * ksvg2/dom/SVGComponentTransferFunctionElement.cc: Added. * ksvg2/dom/SVGComponentTransferFunctionElement.h: Added. * ksvg2/dom/SVGDOMImplementation.cc: Added. * ksvg2/dom/SVGDOMImplementation.h: Added. * ksvg2/dom/SVGDefsElement.cc: Added. * ksvg2/dom/SVGDefsElement.h: Added. * ksvg2/dom/SVGDescElement.cc: Added. * ksvg2/dom/SVGDescElement.h: Added. * ksvg2/dom/SVGDocument.cc: Added. * ksvg2/dom/SVGDocument.h: Added. * ksvg2/dom/SVGElement.cc: Added. * ksvg2/dom/SVGElement.h: Added. * ksvg2/dom/SVGElementInstance.cc: Added. * ksvg2/dom/SVGElementInstance.h: Added. * ksvg2/dom/SVGElementInstanceList.cc: Added. * ksvg2/dom/SVGElementInstanceList.h: Added. * ksvg2/dom/SVGEllipseElement.cc: Added. * ksvg2/dom/SVGEllipseElement.h: Added. * ksvg2/dom/SVGException.cc: Added. * ksvg2/dom/SVGException.h: Added. * ksvg2/dom/SVGExternalResourcesRequired.cc: Added. * ksvg2/dom/SVGExternalResourcesRequired.h: Added. * ksvg2/dom/SVGFEBlendElement.cc: Added. * ksvg2/dom/SVGFEBlendElement.h: Added. * ksvg2/dom/SVGFEColorMatrixElement.cc: Added. * ksvg2/dom/SVGFEColorMatrixElement.h: Added. * ksvg2/dom/SVGFEComponentTransferElement.cc: Added. * ksvg2/dom/SVGFEComponentTransferElement.h: Added. * ksvg2/dom/SVGFECompositeElement.cc: Added. * ksvg2/dom/SVGFECompositeElement.h: Added. * ksvg2/dom/SVGFEFloodElement.cc: Added. * ksvg2/dom/SVGFEFloodElement.h: Added. * ksvg2/dom/SVGFEFuncAElement.cc: Added. * ksvg2/dom/SVGFEFuncAElement.h: Added. * ksvg2/dom/SVGFEFuncBElement.cc: Added. * ksvg2/dom/SVGFEFuncBElement.h: Added. * ksvg2/dom/SVGFEFuncGElement.cc: Added. * ksvg2/dom/SVGFEFuncGElement.h: Added. * ksvg2/dom/SVGFEFuncRElement.cc: Added. * ksvg2/dom/SVGFEFuncRElement.h: Added. * ksvg2/dom/SVGFEGaussianBlurElement.cc: Added. * ksvg2/dom/SVGFEGaussianBlurElement.h: Added. * ksvg2/dom/SVGFEImageElement.cc: Added. * ksvg2/dom/SVGFEImageElement.h: Added. * ksvg2/dom/SVGFEMergeElement.cc: Added. * ksvg2/dom/SVGFEMergeElement.h: Added. * ksvg2/dom/SVGFEMergeNodeElement.cc: Added. * ksvg2/dom/SVGFEMergeNodeElement.h: Added. * ksvg2/dom/SVGFEOffsetElement.cc: Added. * ksvg2/dom/SVGFEOffsetElement.h: Added. * ksvg2/dom/SVGFETileElement.cc: Added. * ksvg2/dom/SVGFETileElement.h: Added. * ksvg2/dom/SVGFETurbulenceElement.cc: Added. * ksvg2/dom/SVGFETurbulenceElement.h: Added. * ksvg2/dom/SVGFilterElement.cc: Added. * ksvg2/dom/SVGFilterElement.h: Added. * ksvg2/dom/SVGFilterPrimitiveStandardAttributes.cc: Added. * ksvg2/dom/SVGFilterPrimitiveStandardAttributes.h: Added. * ksvg2/dom/SVGFitToViewBox.cc: Added. * ksvg2/dom/SVGFitToViewBox.h: Added. * ksvg2/dom/SVGGElement.cc: Added. * ksvg2/dom/SVGGElement.h: Added. * ksvg2/dom/SVGGradientElement.cc: Added. * ksvg2/dom/SVGGradientElement.h: Added. * ksvg2/dom/SVGImageElement.cc: Added. * ksvg2/dom/SVGImageElement.h: Added. * ksvg2/dom/SVGLangSpace.cc: Added. * ksvg2/dom/SVGLangSpace.h: Added. * ksvg2/dom/SVGLength.cc: Added. * ksvg2/dom/SVGLength.h: Added. * ksvg2/dom/SVGLengthList.cc: Added. * ksvg2/dom/SVGLengthList.h: Added. * ksvg2/dom/SVGLineElement.cc: Added. * ksvg2/dom/SVGLineElement.h: Added. * ksvg2/dom/SVGLinearGradientElement.cc: Added. * ksvg2/dom/SVGLinearGradientElement.h: Added. * ksvg2/dom/SVGLocatable.cc: Added. * ksvg2/dom/SVGLocatable.h: Added. * ksvg2/dom/SVGMarkerElement.cc: Added. * ksvg2/dom/SVGMarkerElement.h: Added. * ksvg2/dom/SVGMatrix.cc: Added. * ksvg2/dom/SVGMatrix.h: Added. * ksvg2/dom/SVGNumber.cc: Added. * ksvg2/dom/SVGNumber.h: Added. * ksvg2/dom/SVGNumberList.cc: Added. * ksvg2/dom/SVGNumberList.h: Added. * ksvg2/dom/SVGPaint.cc: Added. * ksvg2/dom/SVGPaint.h: Added. * ksvg2/dom/SVGPathElement.cc: Added. * ksvg2/dom/SVGPathElement.h: Added. * ksvg2/dom/SVGPathSeg.cc: Added. * ksvg2/dom/SVGPathSeg.h: Added. * ksvg2/dom/SVGPathSegArc.cc: Added. * ksvg2/dom/SVGPathSegArc.h: Added. * ksvg2/dom/SVGPathSegClosePath.cc: Added. * ksvg2/dom/SVGPathSegClosePath.h: Added. * ksvg2/dom/SVGPathSegCurvetoCubic.cc: Added. * ksvg2/dom/SVGPathSegCurvetoCubic.h: Added. * ksvg2/dom/SVGPathSegCurvetoCubicSmooth.cc: Added. * ksvg2/dom/SVGPathSegCurvetoCubicSmooth.h: Added. * ksvg2/dom/SVGPathSegCurvetoQuadratic.cc: Added. * ksvg2/dom/SVGPathSegCurvetoQuadratic.h: Added. * ksvg2/dom/SVGPathSegCurvetoQuadraticSmooth.cc: Added. * ksvg2/dom/SVGPathSegCurvetoQuadraticSmooth.h: Added. * ksvg2/dom/SVGPathSegLineto.cc: Added. * ksvg2/dom/SVGPathSegLineto.h: Added. * ksvg2/dom/SVGPathSegLinetoHorizontal.cc: Added. * ksvg2/dom/SVGPathSegLinetoHorizontal.h: Added. * ksvg2/dom/SVGPathSegLinetoVertical.cc: Added. * ksvg2/dom/SVGPathSegLinetoVertical.h: Added. * ksvg2/dom/SVGPathSegList.cc: Added. * ksvg2/dom/SVGPathSegList.h: Added. * ksvg2/dom/SVGPathSegMoveto.cc: Added. * ksvg2/dom/SVGPathSegMoveto.h: Added. * ksvg2/dom/SVGPatternElement.cc: Added. * ksvg2/dom/SVGPatternElement.h: Added. * ksvg2/dom/SVGPoint.cc: Added. * ksvg2/dom/SVGPoint.h: Added. * ksvg2/dom/SVGPointList.cc: Added. * ksvg2/dom/SVGPointList.h: Added. * ksvg2/dom/SVGPolygonElement.cc: Added. * ksvg2/dom/SVGPolygonElement.h: Added. * ksvg2/dom/SVGPolylineElement.cc: Added. * ksvg2/dom/SVGPolylineElement.h: Added. * ksvg2/dom/SVGPreserveAspectRatio.cc: Added. * ksvg2/dom/SVGPreserveAspectRatio.h: Added. * ksvg2/dom/SVGRadialGradientElement.cc: Added. * ksvg2/dom/SVGRadialGradientElement.h: Added. * ksvg2/dom/SVGRect.cc: Added. * ksvg2/dom/SVGRect.h: Added. * ksvg2/dom/SVGRectElement.cc: Added. * ksvg2/dom/SVGRectElement.h: Added. * ksvg2/dom/SVGSVGElement.cc: Added. * ksvg2/dom/SVGSVGElement.h: Added. * ksvg2/dom/SVGScriptElement.cc: Added. * ksvg2/dom/SVGScriptElement.h: Added. * ksvg2/dom/SVGSetElement.cc: Added. * ksvg2/dom/SVGSetElement.h: Added. * ksvg2/dom/SVGStopElement.cc: Added. * ksvg2/dom/SVGStopElement.h: Added. * ksvg2/dom/SVGStringList.cc: Added. * ksvg2/dom/SVGStringList.h: Added. * ksvg2/dom/SVGStylable.cc: Added. * ksvg2/dom/SVGStylable.h: Added. * ksvg2/dom/SVGStyleElement.cc: Added. * ksvg2/dom/SVGStyleElement.h: Added. * ksvg2/dom/SVGSwitchElement.cc: Added. * ksvg2/dom/SVGSwitchElement.h: Added. * ksvg2/dom/SVGSymbolElement.cc: Added. * ksvg2/dom/SVGSymbolElement.h: Added. * ksvg2/dom/SVGTSpanElement.cc: Added. * ksvg2/dom/SVGTSpanElement.h: Added. * ksvg2/dom/SVGTests.cc: Added. * ksvg2/dom/SVGTests.h: Added. * ksvg2/dom/SVGTextContentElement.cc: Added. * ksvg2/dom/SVGTextContentElement.h: Added. * ksvg2/dom/SVGTextElement.cc: Added. * ksvg2/dom/SVGTextElement.h: Added. * ksvg2/dom/SVGTextPositioningElement.cc: Added. * ksvg2/dom/SVGTextPositioningElement.h: Added. * ksvg2/dom/SVGTitleElement.cc: Added. * ksvg2/dom/SVGTitleElement.h: Added. * ksvg2/dom/SVGTransform.cc: Added. * ksvg2/dom/SVGTransform.h: Added. * ksvg2/dom/SVGTransformList.cc: Added. * ksvg2/dom/SVGTransformList.h: Added. * ksvg2/dom/SVGTransformable.cc: Added. * ksvg2/dom/SVGTransformable.h: Added. * ksvg2/dom/SVGURIReference.cc: Added. * ksvg2/dom/SVGURIReference.h: Added. * ksvg2/dom/SVGUseElement.cc: Added. * ksvg2/dom/SVGUseElement.h: Added. * ksvg2/dom/SVGViewElement.cc: Added. * ksvg2/dom/SVGViewElement.h: Added. * ksvg2/dom/SVGZoomAndPan.cc: Added. * ksvg2/dom/SVGZoomAndPan.h: Added. * ksvg2/ecma/Constructors.cc: Added. * ksvg2/ecma/Constructors.h: Added. * ksvg2/ecma/Ecma.cc: Added. * ksvg2/ecma/Ecma.h: Added. * ksvg2/ecma/EcmaInterface.h: Added. * ksvg2/ecma/GlobalObject.cc: Added. * ksvg2/ecma/GlobalObject.h: Added. * ksvg2/ecma/SVGLookup.h: Added. * ksvg2/events/SVGEvent.cc: Added. * ksvg2/events/SVGEvent.h: Added. * ksvg2/events/SVGZoomEvent.cc: Added. * ksvg2/events/SVGZoomEvent.h: Added. * ksvg2/events/impl/SVGEventImpl.cc: Added. * ksvg2/events/impl/SVGEventImpl.h: Added. * ksvg2/events/impl/SVGZoomEventImpl.cc: Added. * ksvg2/events/impl/SVGZoomEventImpl.h: Added. * ksvg2/events/ksvgevents.h: Added. * ksvg2/impl/CDFInterface.cc: Added. * ksvg2/impl/CDFInterface.h: Added. * ksvg2/impl/SVGAElementImpl.cc: Added. * ksvg2/impl/SVGAElementImpl.h: Added. * ksvg2/impl/SVGAngleImpl.cc: Added. * ksvg2/impl/SVGAngleImpl.h: Added. * ksvg2/impl/SVGAnimateColorElementImpl.cc: Added. * ksvg2/impl/SVGAnimateColorElementImpl.h: Added. * ksvg2/impl/SVGAnimateElementImpl.cc: Added. * ksvg2/impl/SVGAnimateElementImpl.h: Added. * ksvg2/impl/SVGAnimateTransformElementImpl.cc: Added. * ksvg2/impl/SVGAnimateTransformElementImpl.h: Added. * ksvg2/impl/SVGAnimatedAngleImpl.cc: Added. * ksvg2/impl/SVGAnimatedAngleImpl.h: Added. * ksvg2/impl/SVGAnimatedBooleanImpl.cc: Added. * ksvg2/impl/SVGAnimatedBooleanImpl.h: Added. * ksvg2/impl/SVGAnimatedEnumerationImpl.cc: Added. * ksvg2/impl/SVGAnimatedEnumerationImpl.h: Added. * ksvg2/impl/SVGAnimatedIntegerImpl.cc: Added. * ksvg2/impl/SVGAnimatedIntegerImpl.h: Added. * ksvg2/impl/SVGAnimatedLengthImpl.cc: Added. * ksvg2/impl/SVGAnimatedLengthImpl.h: Added. * ksvg2/impl/SVGAnimatedLengthListImpl.cc: Added. * ksvg2/impl/SVGAnimatedLengthListImpl.h: Added. * ksvg2/impl/SVGAnimatedNumberImpl.cc: Added. * ksvg2/impl/SVGAnimatedNumberImpl.h: Added. * ksvg2/impl/SVGAnimatedNumberListImpl.cc: Added. * ksvg2/impl/SVGAnimatedNumberListImpl.h: Added. * ksvg2/impl/SVGAnimatedPathDataImpl.cc: Added. * ksvg2/impl/SVGAnimatedPathDataImpl.h: Added. * ksvg2/impl/SVGAnimatedPointsImpl.cc: Added. * ksvg2/impl/SVGAnimatedPointsImpl.h: Added. * ksvg2/impl/SVGAnimatedPreserveAspectRatioImpl.cc: Added. * ksvg2/impl/SVGAnimatedPreserveAspectRatioImpl.h: Added. * ksvg2/impl/SVGAnimatedRectImpl.cc: Added. * ksvg2/impl/SVGAnimatedRectImpl.h: Added. * ksvg2/impl/SVGAnimatedStringImpl.cc: Added. * ksvg2/impl/SVGAnimatedStringImpl.h: Added. * ksvg2/impl/SVGAnimatedTemplate.h: Added. * ksvg2/impl/SVGAnimatedTransformListImpl.cc: Added. * ksvg2/impl/SVGAnimatedTransformListImpl.h: Added. * ksvg2/impl/SVGAnimationElementImpl.cc: Added. * ksvg2/impl/SVGAnimationElementImpl.h: Added. * ksvg2/impl/SVGCircleElementImpl.cc: Added. * ksvg2/impl/SVGCircleElementImpl.h: Added. * ksvg2/impl/SVGClipPathElementImpl.cc: Added. * ksvg2/impl/SVGClipPathElementImpl.h: Added. * ksvg2/impl/SVGColorImpl.cc: Added. * ksvg2/impl/SVGColorImpl.h: Added. * ksvg2/impl/SVGComponentTransferFunctionElementImpl.cc: Added. * ksvg2/impl/SVGComponentTransferFunctionElementImpl.h: Added. * ksvg2/impl/SVGDOMImplementationImpl.cc: Added. * ksvg2/impl/SVGDOMImplementationImpl.h: Added. * ksvg2/impl/SVGDefsElementImpl.cc: Added. * ksvg2/impl/SVGDefsElementImpl.h: Added. * ksvg2/impl/SVGDescElementImpl.cc: Added. * ksvg2/impl/SVGDescElementImpl.h: Added. * ksvg2/impl/SVGDocumentImpl.cc: Added. * ksvg2/impl/SVGDocumentImpl.h: Added. * ksvg2/impl/SVGElementImpl.cc: Added. * ksvg2/impl/SVGElementImpl.h: Added. * ksvg2/impl/SVGElementInstanceImpl.cc: Added. * ksvg2/impl/SVGElementInstanceImpl.h: Added. * ksvg2/impl/SVGElementInstanceListImpl.cc: Added. * ksvg2/impl/SVGElementInstanceListImpl.h: Added. * ksvg2/impl/SVGEllipseElementImpl.cc: Added. * ksvg2/impl/SVGEllipseElementImpl.h: Added. * ksvg2/impl/SVGExceptionImpl.cc: Added. * ksvg2/impl/SVGExceptionImpl.h: Added. * ksvg2/impl/SVGExternalResourcesRequiredImpl.cc: Added. * ksvg2/impl/SVGExternalResourcesRequiredImpl.h: Added. * ksvg2/impl/SVGFEBlendElementImpl.cc: Added. * ksvg2/impl/SVGFEBlendElementImpl.h: Added. * ksvg2/impl/SVGFEColorMatrixElementImpl.cc: Added. * ksvg2/impl/SVGFEColorMatrixElementImpl.h: Added. * ksvg2/impl/SVGFEComponentTransferElementImpl.cc: Added. * ksvg2/impl/SVGFEComponentTransferElementImpl.h: Added. * ksvg2/impl/SVGFECompositeElementImpl.cc: Added. * ksvg2/impl/SVGFECompositeElementImpl.h: Added. * ksvg2/impl/SVGFEFloodElementImpl.cc: Added. * ksvg2/impl/SVGFEFloodElementImpl.h: Added. * ksvg2/impl/SVGFEFuncAElementImpl.cc: Added. * ksvg2/impl/SVGFEFuncAElementImpl.h: Added. * ksvg2/impl/SVGFEFuncBElementImpl.cc: Added. * ksvg2/impl/SVGFEFuncBElementImpl.h: Added. * ksvg2/impl/SVGFEFuncGElementImpl.cc: Added. * ksvg2/impl/SVGFEFuncGElementImpl.h: Added. * ksvg2/impl/SVGFEFuncRElementImpl.cc: Added. * ksvg2/impl/SVGFEFuncRElementImpl.h: Added. * ksvg2/impl/SVGFEGaussianBlurElementImpl.cc: Added. * ksvg2/impl/SVGFEGaussianBlurElementImpl.h: Added. * ksvg2/impl/SVGFEImageElementImpl.cc: Added. * ksvg2/impl/SVGFEImageElementImpl.h: Added. * ksvg2/impl/SVGFEMergeElementImpl.cc: Added. * ksvg2/impl/SVGFEMergeElementImpl.h: Added. * ksvg2/impl/SVGFEMergeNodeElementImpl.cc: Added. * ksvg2/impl/SVGFEMergeNodeElementImpl.h: Added. * ksvg2/impl/SVGFEOffsetElementImpl.cc: Added. * ksvg2/impl/SVGFEOffsetElementImpl.h: Added. * ksvg2/impl/SVGFETileElementImpl.cc: Added. * ksvg2/impl/SVGFETileElementImpl.h: Added. * ksvg2/impl/SVGFETurbulenceElementImpl.cc: Added. * ksvg2/impl/SVGFETurbulenceElementImpl.h: Added. * ksvg2/impl/SVGFilterElementImpl.cc: Added. * ksvg2/impl/SVGFilterElementImpl.h: Added. * ksvg2/impl/SVGFilterPrimitiveStandardAttributesImpl.cc: Added. * ksvg2/impl/SVGFilterPrimitiveStandardAttributesImpl.h: Added. * ksvg2/impl/SVGFitToViewBoxImpl.cc: Added. * ksvg2/impl/SVGFitToViewBoxImpl.h: Added. * ksvg2/impl/SVGGElementImpl.cc: Added. * ksvg2/impl/SVGGElementImpl.h: Added. * ksvg2/impl/SVGGradientElementImpl.cc: Added. * ksvg2/impl/SVGGradientElementImpl.h: Added. * ksvg2/impl/SVGHelper.cc: Added. * ksvg2/impl/SVGHelper.h: Added. * ksvg2/impl/SVGImageElementImpl.cc: Added. * ksvg2/impl/SVGImageElementImpl.h: Added. * ksvg2/impl/SVGLangSpaceImpl.cc: Added. * ksvg2/impl/SVGLangSpaceImpl.h: Added. * ksvg2/impl/SVGLengthImpl.cc: Added. * ksvg2/impl/SVGLengthImpl.h: Added. * ksvg2/impl/SVGLengthListImpl.cc: Added. * ksvg2/impl/SVGLengthListImpl.h: Added. * ksvg2/impl/SVGLineElementImpl.cc: Added. * ksvg2/impl/SVGLineElementImpl.h: Added. * ksvg2/impl/SVGLinearGradientElementImpl.cc: Added. * ksvg2/impl/SVGLinearGradientElementImpl.h: Added. * ksvg2/impl/SVGList.h: Added. * ksvg2/impl/SVGLocatableImpl.cc: Added. * ksvg2/impl/SVGLocatableImpl.h: Added. * ksvg2/impl/SVGMarkerElementImpl.cc: Added. * ksvg2/impl/SVGMarkerElementImpl.h: Added. * ksvg2/impl/SVGMatrixImpl.cc: Added. * ksvg2/impl/SVGMatrixImpl.h: Added. * ksvg2/impl/SVGNumberImpl.cc: Added. * ksvg2/impl/SVGNumberImpl.h: Added. * ksvg2/impl/SVGNumberListImpl.cc: Added. * ksvg2/impl/SVGNumberListImpl.h: Added. * ksvg2/impl/SVGPaintImpl.cc: Added. * ksvg2/impl/SVGPaintImpl.h: Added. * ksvg2/impl/SVGPathElementImpl.cc: Added. * ksvg2/impl/SVGPathElementImpl.h: Added. * ksvg2/impl/SVGPathSegArcImpl.cc: Added. * ksvg2/impl/SVGPathSegArcImpl.h: Added. * ksvg2/impl/SVGPathSegClosePathImpl.cc: Added. * ksvg2/impl/SVGPathSegClosePathImpl.h: Added. * ksvg2/impl/SVGPathSegCurvetoCubicImpl.cc: Added. * ksvg2/impl/SVGPathSegCurvetoCubicImpl.h: Added. * ksvg2/impl/SVGPathSegCurvetoCubicSmoothImpl.cc: Added. * ksvg2/impl/SVGPathSegCurvetoCubicSmoothImpl.h: Added. * ksvg2/impl/SVGPathSegCurvetoQuadraticImpl.cc: Added. * ksvg2/impl/SVGPathSegCurvetoQuadraticImpl.h: Added. * ksvg2/impl/SVGPathSegCurvetoQuadraticSmoothImpl.cc: Added. * ksvg2/impl/SVGPathSegCurvetoQuadraticSmoothImpl.h: Added. * ksvg2/impl/SVGPathSegImpl.cc: Added. * ksvg2/impl/SVGPathSegImpl.h: Added. * ksvg2/impl/SVGPathSegLinetoHorizontalImpl.cc: Added. * ksvg2/impl/SVGPathSegLinetoHorizontalImpl.h: Added. * ksvg2/impl/SVGPathSegLinetoImpl.cc: Added. * ksvg2/impl/SVGPathSegLinetoImpl.h: Added. * ksvg2/impl/SVGPathSegLinetoVerticalImpl.cc: Added. * ksvg2/impl/SVGPathSegLinetoVerticalImpl.h: Added. * ksvg2/impl/SVGPathSegListImpl.cc: Added. * ksvg2/impl/SVGPathSegListImpl.h: Added. * ksvg2/impl/SVGPathSegMovetoImpl.cc: Added. * ksvg2/impl/SVGPathSegMovetoImpl.h: Added. * ksvg2/impl/SVGPatternElementImpl.cc: Added. * ksvg2/impl/SVGPatternElementImpl.h: Added. * ksvg2/impl/SVGPointImpl.cc: Added. * ksvg2/impl/SVGPointImpl.h: Added. * ksvg2/impl/SVGPointListImpl.cc: Added. * ksvg2/impl/SVGPointListImpl.h: Added. * ksvg2/impl/SVGPolyElementImpl.cc: Added. * ksvg2/impl/SVGPolyElementImpl.h: Added. * ksvg2/impl/SVGPolygonElementImpl.cc: Added. * ksvg2/impl/SVGPolygonElementImpl.h: Added. * ksvg2/impl/SVGPolylineElementImpl.cc: Added. * ksvg2/impl/SVGPolylineElementImpl.h: Added. * ksvg2/impl/SVGPreserveAspectRatioImpl.cc: Added. * ksvg2/impl/SVGPreserveAspectRatioImpl.h: Added. * ksvg2/impl/SVGRadialGradientElementImpl.cc: Added. * ksvg2/impl/SVGRadialGradientElementImpl.h: Added. * ksvg2/impl/SVGRectElementImpl.cc: Added. * ksvg2/impl/SVGRectElementImpl.h: Added. * ksvg2/impl/SVGRectImpl.cc: Added. * ksvg2/impl/SVGRectImpl.h: Added. * ksvg2/impl/SVGSVGElementImpl.cc: Added. * ksvg2/impl/SVGSVGElementImpl.h: Added. * ksvg2/impl/SVGScriptElementImpl.cc: Added. * ksvg2/impl/SVGScriptElementImpl.h: Added. * ksvg2/impl/SVGSetElementImpl.cc: Added. * ksvg2/impl/SVGSetElementImpl.h: Added. * ksvg2/impl/SVGStopElementImpl.cc: Added. * ksvg2/impl/SVGStopElementImpl.h: Added. * ksvg2/impl/SVGStringListImpl.cc: Added. * ksvg2/impl/SVGStringListImpl.h: Added. * ksvg2/impl/SVGStylableImpl.cc: Added. * ksvg2/impl/SVGStylableImpl.h: Added. * ksvg2/impl/SVGStyleElementImpl.cc: Added. * ksvg2/impl/SVGStyleElementImpl.h: Added. * ksvg2/impl/SVGStyledElementImpl.cc: Added. * ksvg2/impl/SVGStyledElementImpl.h: Added. * ksvg2/impl/SVGSwitchElementImpl.cc: Added. * ksvg2/impl/SVGSwitchElementImpl.h: Added. * ksvg2/impl/SVGSymbolElementImpl.cc: Added. * ksvg2/impl/SVGSymbolElementImpl.h: Added. * ksvg2/impl/SVGTSpanElementImpl.cc: Added. * ksvg2/impl/SVGTSpanElementImpl.h: Added. * ksvg2/impl/SVGTestsImpl.cc: Added. * ksvg2/impl/SVGTestsImpl.h: Added. * ksvg2/impl/SVGTextContentElementImpl.cc: Added. * ksvg2/impl/SVGTextContentElementImpl.h: Added. * ksvg2/impl/SVGTextElementImpl.cc: Added. * ksvg2/impl/SVGTextElementImpl.h: Added. * ksvg2/impl/SVGTextPositioningElementImpl.cc: Added. * ksvg2/impl/SVGTextPositioningElementImpl.h: Added. * ksvg2/impl/SVGTitleElementImpl.cc: Added. * ksvg2/impl/SVGTitleElementImpl.h: Added. * ksvg2/impl/SVGTransformImpl.cc: Added. * ksvg2/impl/SVGTransformImpl.h: Added. * ksvg2/impl/SVGTransformListImpl.cc: Added. * ksvg2/impl/SVGTransformListImpl.h: Added. * ksvg2/impl/SVGTransformableImpl.cc: Added. * ksvg2/impl/SVGTransformableImpl.h: Added. * ksvg2/impl/SVGURIReferenceImpl.cc: Added. * ksvg2/impl/SVGURIReferenceImpl.h: Added. * ksvg2/impl/SVGUseElementImpl.cc: Added. * ksvg2/impl/SVGUseElementImpl.h: Added. * ksvg2/impl/SVGViewElementImpl.cc: Added. * ksvg2/impl/SVGViewElementImpl.h: Added. * ksvg2/impl/SVGZoomAndPanImpl.cc: Added. * ksvg2/impl/SVGZoomAndPanImpl.h: Added. * ksvg2/impl/svgattrs.c: Added. * ksvg2/impl/svgattrs.h: Added. * ksvg2/impl/svgattrs.in: Added. * ksvg2/impl/svgpathparser.cc: Added. * ksvg2/impl/svgpathparser.h: Added. * ksvg2/impl/svgtags.c: Added. * ksvg2/impl/svgtags.h: Added. * ksvg2/impl/svgtags.in: Added. * ksvg2/ksvg.h: Added. * ksvg2/scripts/generate.pl: Added. * ksvg2/scripts/kalyptusKDOMEcma.pm: Added. * ksvg2/scripts/ksvgstatus.xsl: Added. * ksvg2/scripts/regressiontest.sh: Added. * ksvg2/scripts/regressiontestsetup.sh: Added. * ksvg2/scripts/svg.idl: Added. Several things to mention here: 1. Function names were stripped out of the ChangeLog for brevity. 2. Several files (like the c++ DOM) are only in here temporarily. 3. Several files (like kdom/catalog) were left out of CVS as they do not currently work in our kdom port. Those may or may not be added in the future. 4. Notes re: the WebCore+SVG target - APPLE_COMPILE_HACK is a temporary addition for compiling - None of the SVG or KDOM files are compiled in "WebCore" by default. - Compiling WebCore+SVG requires compiling JavaScriptCore+SVG to enable RTTI support in JavaScriptCore. 2005-07-08 Eric Seidel Reviewed by mjs. * kwq/KWQRegExp.h: Added cap() support. * kwq/KWQRegExp.mm: Added cap() support. (QRegExp::match): Changes necessary for cap() (QRegExp::cap): based off of JSC's pcre support. http://bugzilla.opendarwin.org/show_bug.cgi?id=3847 2005-07-08 Geoffrey Garen Rolled in layout test for fix to http://bugzilla.opendarwin.org/show_bug.cgi?id=3818 Fallback font doesn't have requested weight in ATSUI-rendered text Reviewed by mjs. Test cases added: * layout-tests/fast/text/international/bidi-fallback-font-weight-expected.txt: Added. * layout-tests/fast/text/international/bidi-fallback-font-weight.html: Added. 2005-07-08 Beth Dakin Reviewed by John. This is a fix for half of Because marquee is a WinIE element, we are honoring their treatment of the height attribute by making sure it is overriden when its value is given to be smaller than the font height. Test cases added: fast/css/MarqueeLayoutTest.html * khtml/html/html_blockimpl.cpp: (HTMLMarqueeElementImpl::mapToEntry): set result to eMarquee instead of eUniversal for height attribute (HTMLMarqueeElementImpl::parseMappedAttribute): changed to minheight instead of just height * khtml/xml/dom_elementimpl.h: added eMarquee hash key (QScrollView::suppressScrollBars): * layout-tests/fast/css/MarqueeLayoutTest-expected.txt: Added. * layout-tests/fast/css/MarqueeLayoutTest.html: Added. 2005-07-08 Vicki Murley Fix from Carsten Guenther, reviewed by Maciej - update test cases for JavaScriptCore fix http://bugzilla.opendarwin.org/show_bug.cgi?id=3644 * layout-tests/fast/dom/outerText-no-element-expected.txt: * layout-tests/fast/dynamic/outerHTML-no-element-expected.txt: * layout-tests/fast/js/array-every-expected.txt: * layout-tests/fast/js/array-foreach-expected.txt: * layout-tests/fast/js/array-some-expected.txt: * layout-tests/fast/js/toString-stack-overflow-expected.txt: 2005-07-08 Vicki Murley - fixed by Trey Matteson , reviewed by Maciej. Test cases added: (NONE) REGRESSION: back/forward broken at wsj.com, worked in v185 Also written as http://bugzilla.opendarwin.org/show_bug.cgi?id=3901 Broken by security fix for 4005575: Arbitrary file disclosure vulnerability due to ability to load local html from remote content The root of this bug is that URLs for subframes of a page are sometimes added to the back/forward list. This happens a lot at wsj.com, and I believe it would happen for many or all sites that use JS to cons up a URL for an iframe and then load it. The security fix changed the code path to go through openURLRequest, but only openURL had the logic to guess if the current navigation was done in response to a user gesture. openURLRequest always assumed it was a user gesture, and thus all uses of this code path would place an item in the b/f list. * kwq/KWQKHTMLPart.h: * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::userGestureHint): Factored code from openURL. (KWQKHTMLPart::openURL): Call newly factored code. (KWQKHTMLPart::openURLRequest): Newly call newly factored code. 2005-07-07 Maciej Stachowiak - oops, accidentally committed stat dumping enabled * khtml/misc/hashtable.h: 2005-07-07 Maciej Stachowiak Reviewed by hyatt. - sped up DOMStringImpl * equality comparisons. * khtml/misc/hashfunctions.h: (khtml::): * khtml/misc/hashtable.h: * khtml/xml/dom_atomicstring.cpp: (DOM::equal): 2005-07-07 Adele Peterson change by Maciej, reviewed by me. fix for Cambridge 8C45: Safari crashes in Webcore (DOM::NodeImpl::removeAllEventListeners() + 32) No test cases added. There are some edge cases in which removeAllDisconnectedNodeEventListeners can get called twice for the same document, and this can cause some nodes to unnecessarily remain in the m_disconnectedNodesWithEventListeners list. This fix just clears the m_disconnectedNodesWithEventListeners list after removing all event listeners for the disconnected nodes. * khtml/xml/dom_docimpl.cpp: (DocumentImpl::removeAllDisconnectedNodeEventListeners): 2005-07-07 Geoffrey Garen Reviewed by sullivan. Test cases added: (NONE) * kwq/KWQDef.h: added #include to fix build failure introduced by last checkin 2005-07-07 Eric Seidel Reviewed by mjs. * kwq/DOM-CSS.mm: (-[DOMRGBColor _color]): changed to nsColor() * kwq/KWQAccObject.mm: (AXAttributeStringSetStyle): changed to nsColor() * kwq/KWQColor.h: Added defs for KDOM. * kwq/KWQColor.mm: (qRed): like qAlpha, kcanvas required. (qGreen): like qAlpha, kcanvas required. (qBlue): like qAlpha, kcanvas required. (parseHexColor): copied from khtml/css/cssparser.h (QColor::QColor): QColor(QString), will lookup by hex code. (nsColor): now plain function, instead of member function. (mjs) (CGColorFromNSColor): stolen from QPalette.mm (cgColor): added to support CGColor, like nsColor() (QColor::getRgbaF): new, for KCanvas, from Qt 4. * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::attributedString): changed to nsColor() (KWQKHTMLPart::fontAttributesForSelectionStart): nsColor() (KWQKHTMLPart::bodyBackgroundColor): changed to nsColor() * kwq/KWQLineEdit.mm: (QLineEdit::setPalette): changed to nsColor() * kwq/KWQPainter.mm: (QPainter::_setColorFromBrush): changed to nsColor() (QPainter::_setColorFromPen): changed to nsColor() (QPainter::drawText): changed to nsColor() (QPainter::drawHighlightForText): changed to nsColor() (QPainter::drawLineForText): changed to nsColor() (QPainter::_fillRect): changed to nsColor() (QPainter::setShadow): changed to cgColor() (QPainter::drawFocusRing): changed to nsColor() * kwq/KWQTextEdit.mm: (QTextEdit::setPalette): changed to nsColor() * kwq/WebCoreBridge.mm: (-[WebCoreBridge selectionColor]): changed to nsColor() This patch ended up larger than intended after discussing with mjs about adding getCGColor() and getCIColor() We decided that having separate nsColor(), cgColor() and ciColor() defined elsewhere, was cleanest. The rest of the patch is QColor additions for kdom/ksvg/kcanvas. http://bugzilla.opendarwin.org/show_bug.cgi?id=3829 2005-07-07 Eric Seidel Reviewed by mjs. * kwq/KWQPtrDict.h: Additions for KDOM (QPtrDictIterator::operator()): essentially post-increment. http://bugzilla.opendarwin.org/show_bug.cgi?id=3849 2005-07-07 Eric Seidel Reviewed by mjs. * khtml/css/parser.y: removed #define YYMAXDEPTH 0 Bison 2.x compatibility http://bugzilla.opendarwin.org/show_bug.cgi?id=3882 2005-07-07 Eric Seidel Reviewed by mjs. * khtml/rendering/render_canvasimage.cpp: * khtml/rendering/render_image.cpp: instead of * kwq/KWQDef.h: 64bit support for KDOM (qRound): inline mapping to lround. Newer patch, now gcc 3.3 compatible. Thanks to ggaren for the 3.3 fix. http://bugzilla.opendarwin.org/show_bug.cgi?id=3826 2005-07-06 Eric Seidel Reviewed by mjs. * ForwardingHeaders/qvaluevector.h: Added. * kwq/KWQValueVector.h: Added. Added QValueVector stub for KDOM. http://bugzilla.opendarwin.org/show_bug.cgi?id=3860 2005-07-06 Eric Seidel Reviewed by mjs. * kwq/KWQPoint.mm: (QPoint::operator CGPoint): Added. (operator*): Added. (operator<<): Added. * kwq/KWQPointArray.h: Added. (QPoint::setX): Added. (QPoint::setY): Added. (QPoint::isNull): Added. (QPoint::operator -=): Added. * kwq/KWQPointArray.mm: Added. (QPointArray::QPointArray): Added. (QPointArray::copy): Added. (QPointArray::boundingRect): Added. (QPointArray::point): Added. Necessary additions for KDOM/KSVG/KCanvas http://bugzilla.opendarwin.org/show_bug.cgi?id=3674 2005-07-06 Maciej Stachowiak Reviewed by hyatt. - fixed size() and contains() methods on HashSet (they would not compile before) * khtml/misc/hashset.h: (khtml::::size): * khtml/misc/hashtable.h: (khtml::::contains): 2005-07-06 Eric Seidel Reviewed by mjs. * ForwardingHeaders/kjs/ustring.h: Added. Used by kdom/Helper.cc http://bugzilla.opendarwin.org/show_bug.cgi?id=3859 2005-07-06 Geoffrey Garen Reviewed by adele. Modified layout tests to match rollout of changes for REGRESSION (Mail): Tabs do not work the way they did in Panther Tests modified: * layout-tests/editing/deleting/delete-tab-001-expected.txt: * layout-tests/editing/deleting/delete-tab-002-expected.txt: * layout-tests/editing/deleting/delete-tab-003-expected.txt: * layout-tests/editing/deleting/delete-tab-004-expected.txt: * layout-tests/editing/inserting/insert-tab-001-expected.txt: * layout-tests/editing/inserting/insert-tab-002-expected.txt: * layout-tests/editing/inserting/insert-tab-003-expected.txt: * layout-tests/editing/inserting/insert-tab-004-expected.txt: * layout-tests/fast/dom/quadraticCurveTo-expected.txt: * layout-tests/fast/js/string-replace-2-expected.txt: * layout-tests/fast/table/039-expected.txt: * layout-tests/fast/table/border-collapsing/004-expected.txt: * layout-tests/fast/tokenizer/script_extra_close-expected.txt: 2005-07-06 Maciej Stachowiak Even yet still more gcc4 build fixes. * khtml/misc/hashset.h: (khtml::convertAdapter): (khtml::::insert): 2005-07-06 Maciej Stachowiak More ggc-4-only build fixage. * khtml/misc/hashtraits.h: 2005-07-06 Maciej Stachowiak Fix additional gcc-4-only build breakage. * khtml/misc/pointerhash.h: (khtml::PointerHashConstIteratorAdapter::operator*): 2005-07-05 Maciej Stachowiak Forgot to commit a file. Fix for build breakage. * ForwardingHeaders/misc/pointerhash.h: Added. 2005-07-05 Maciej Stachowiak - remove stat dumping (accidentally left enabled in last patch) Unreviewed since this was a mistake in the last checkin. * khtml/misc/hashtable.h: 2005-07-04 Maciej Stachowiak Reviewed by hyatt. Numerous hash code improvements: - added HashMap and the required support for it in HashTable - convert to using deleted sentinels and double hashing instead of linear probing and reinsert on delete - add support for traits so that empty and deleted values can be customized per type - make insert return a pair of an iterator and a bool even at the API level - converted some code to use HashMap - added standard hash and equal functions for some types, plus case insensitive ones - lots of assorted code cleanup - pass hash functions as classes with two static functions instead of as functions * khtml/css/cssstyleselector.cpp: (khtml::CSSRuleSet::CSSRuleSet): Use HashMap instead of QPtrDict. (khtml::CSSRuleSet::~CSSRuleSet): ditto (khtml::CSSRuleSet::addToRuleSet): ditto (khtml::CSSRuleSet::addRule): ditto * khtml/css/cssstyleselector.h: (khtml::CSSRuleSet::getIDRules): ditto (khtml::CSSRuleSet::getClassRules): ditto (khtml::CSSRuleSet::getTagRules): ditto * khtml/editing/jsediting.cpp: (DOM::DocumentImpl::commandImp): ditto * khtml/misc/hashfunctions.h: Added. Standard hash functions. (khtml::defaultEqual): (khtml::pointerHash<4>): (khtml::pointerHash<8>): (khtml::defaultHash): (khtml::defaultHash): (khtml::caseInsensitiveHash): (khtml::caseInsensitiveEqual): * WebCore.pbproj/project.pbxproj: * khtml/misc/hashmap.h: Added. (khtml::HashMap::HashMap): (khtml::HashMap::size): (khtml::HashMap::capacity): (khtml::HashMap::isEmpty): (khtml::HashMap::begin): (khtml::HashMap::end): (khtml::HashMap::find): (khtml::HashMap::contains): (khtml::HashMap::insert): (khtml::HashMap::get): (khtml::HashMap::remove): (khtml::HashMap::clear): (khtml::HashMap::extractKey): * khtml/misc/hashset.h: (khtml::identityExtract): (khtml::::size): (khtml::::capacity): (khtml::::isEmpty): (khtml::::begin): (khtml::::end): (khtml::::find): (khtml::::contains): (khtml::::insert): (khtml::::remove): (khtml::::clear): (khtml::::convertAdapter): * khtml/misc/hashtable.cpp: (khtml::HashTableStats::~HashTableStats): * khtml/misc/hashtable.h: (khtml::HashTableIterator::HashTableIterator): (khtml::HashTableIterator::skipEmptyBuckets): (khtml::HashTableConstIterator::HashTableConstIterator): (khtml::HashTableConstIterator::skipEmptyBuckets): (khtml::HashTable::HashTable): (khtml::HashTable::insert): (khtml::HashTable::isEmptyBucket): (khtml::HashTable::isDeletedBucket): (khtml::HashTable::isEmptyOrDeletedBucket): (khtml::HashTable::identityConvert): (khtml::HashTable::extractKey): (khtml::HashTable::lookup): (khtml::HashTable::shouldExpand): (khtml::HashTable::mustRehashInPlace): (khtml::HashTable::clearBucket): (khtml::HashTable::deleteBucket): (khtml::HashTable::makeLookupResult): (khtml::HashTable::makeIterator): (khtml::HashTable::makeConstIterator): (khtml::::lookup): (khtml::::insert): (khtml::::reinsert): (khtml::::find): (khtml::::contains): (khtml::::remove): (khtml::::allocateTable): (khtml::::expand): (khtml::::rehash): (khtml::::clear): (khtml::::HashTable): (khtml::::swap): (khtml::::operator): (khtml::::checkConsistency): (khtml::::checkConsistencyExceptSize): * khtml/misc/hashtraits.h: Added. (khtml::HashTraits::emptyValue): (khtml::): (khtml::PairHashTraits::emptyValue): (khtml::PairHashTraits::deletedValue): * ForwardingHeaders/misc/hashmap.h: Added. * ForwardingHeaders/misc/hashset.h: Added. * WebCore.pbproj/project.pbxproj: Added new files. * khtml/misc/pointerhash.h: Added. (khtml::PointerHashIteratorAdapter::PointerHashIteratorAdapter): (khtml::PointerHashIteratorAdapter::operator*): (khtml::PointerHashIteratorAdapter::operator->): (khtml::PointerHashIteratorAdapter::operator++): (khtml::PointerHashIteratorAdapter::operator==): (khtml::PointerHashIteratorAdapter::operator!=): (khtml::PointerHashConstIteratorAdapter::PointerHashConstIteratorAdapter): (khtml::PointerHashConstIteratorAdapter::operator*): (khtml::PointerHashConstIteratorAdapter::operator->): (khtml::PointerHashConstIteratorAdapter::operator++): (khtml::PointerHashConstIteratorAdapter::operator==): (khtml::PointerHashConstIteratorAdapter::operator!=): (khtml::): 2005-07-05 Geoffrey Garen Rolled in patch by opendarwin.org@mitzpettel.com -fixes http://bugzilla.opendarwin.org/show_bug.cgi?id=3733 Incorrect bidi layout of ETs, ANs, and ENs in some contexts Reviewed by hyatt. * khtml/rendering/bidi.cpp: (khtml::appendRun): (khtml::RenderBlock::bidiReorderLine): (khtml::RenderBlock::layoutInlineChildren): Modified test results to account for run splitting. This is a known bug that we need to fix separately: http://bugzilla.opendarwin.org/show_bug.cgi?id=3838 * layout-tests/css1/basic/containment-expected.txt: * layout-tests/css1/box_properties/float_on_text_elements-expected.txt: * layout-tests/css1/font_properties/font-expected.txt: * layout-tests/css1/formatting_model/inline_elements-expected.txt: * layout-tests/css1/pseudo/anchor-expected.txt: * layout-tests/editing/deleting/delete-tab-001-expected.txt: * layout-tests/editing/deleting/delete-tab-002-expected.txt: * layout-tests/editing/deleting/delete-tab-003-expected.txt: * layout-tests/editing/deleting/delete-tab-004-expected.txt: * layout-tests/editing/inserting/insert-tab-001-expected.txt: * layout-tests/editing/inserting/insert-tab-002-expected.txt: * layout-tests/editing/inserting/insert-tab-003-expected.txt: * layout-tests/editing/inserting/insert-tab-004-expected.txt: * layout-tests/editing/style/relative-font-size-change-001-expected.txt: * layout-tests/editing/style/relative-font-size-change-004-expected.txt: * layout-tests/fast/block/basic/018-expected.txt: * layout-tests/fast/dom/quadraticCurveTo-expected.txt: * layout-tests/fast/invalid/nestedh3s-expected.txt: * layout-tests/fast/js/string-replace-2-expected.txt: * layout-tests/fast/lists/003-expected.txt: * layout-tests/fast/selectors/166-expected.txt: * layout-tests/fast/table/039-expected.txt: * layout-tests/fast/table/border-collapsing/004-expected.txt: * layout-tests/fast/text/basic/004-expected.txt: * layout-tests/fast/tokenizer/script_extra_close-expected.txt: 2005-07-05 Adele Peterson Rolling out changes for REGRESSION (Mail): Tabs do not work the way they did in Panther (especially useful in plain text mail) since it caused a 2% performance regression. * khtml/editing/apply_style_command.cpp: (khtml::createStyleSpanElement): (khtml::ApplyStyleCommand::removeCSSStyle): (khtml::ApplyStyleCommand::addInlineStyleIfNeeded): * khtml/editing/delete_selection_command.cpp: (khtml::DeleteSelectionCommand::saveTypingStyleState): * khtml/editing/edit_command.cpp: (khtml::EditCommand::styleAtPosition): * khtml/editing/html_interchange.h: * khtml/editing/htmlediting.cpp: (khtml::isSpecialElement): * khtml/editing/htmlediting.h: * khtml/editing/insert_text_command.cpp: (khtml::InsertTextCommand::prepareForTextInsertion): (khtml::InsertTextCommand::input): * khtml/editing/insert_text_command.h: * khtml/editing/markup.cpp: (khtml::createFragmentFromText): * khtml/editing/replace_selection_command.cpp: (khtml::ReplacementFragment::removeStyleNodes): * khtml/html/htmltokenizer.cpp: (khtml::HTMLTokenizer::begin): (khtml::HTMLTokenizer::processListing): (khtml::HTMLTokenizer::parseEntity): (khtml::HTMLTokenizer::parseTag): (khtml::HTMLTokenizer::addPending): (khtml::HTMLTokenizer::write): * khtml/html/htmltokenizer.h: (khtml::HTMLTokenizer::): * khtml/rendering/bidi.cpp: (khtml::addRun): (khtml::RenderBlock::computeHorizontalPositionsForLine): (khtml::RenderBlock::skipWhitespace): (khtml::RenderBlock::findNextLineBreak): (khtml::RenderBlock::checkLinesForTextOverflow): * khtml/rendering/break_lines.cpp: (khtml::isBreakable): * khtml/rendering/font.cpp: (Font::drawHighlightForText): (Font::drawText): (Font::floatWidth): (Font::floatCharacterWidths): (Font::checkSelectionPoint): (Font::width): * khtml/rendering/font.h: * khtml/rendering/render_block.cpp: (khtml::stripTrailingSpace): (khtml::RenderBlock::calcInlineMinMaxWidth): * khtml/rendering/render_block.h: * khtml/rendering/render_br.h: (khtml::RenderBR::width): * khtml/rendering/render_flexbox.cpp: (khtml::RenderFlexibleBox::layoutVerticalBox): * khtml/rendering/render_image.cpp: (RenderImage::setPixmap): (RenderImage::paint): * khtml/rendering/render_line.cpp: (khtml::EllipsisBox::paint): * khtml/rendering/render_line.h: (khtml::InlineBox::width): (khtml::InlineBox::xPos): (khtml::InlineBox::yPos): (khtml::InlineBox::height): (khtml::InlineBox::baseline): * khtml/rendering/render_list.cpp: (RenderListMarker::paint): (RenderListMarker::calcMinMaxWidth): * khtml/rendering/render_object.cpp: (RenderObject::recalcMinMaxWidths): * khtml/rendering/render_object.h: * khtml/rendering/render_replaced.cpp: * khtml/rendering/render_text.cpp: (InlineTextBox::selectionRect): (InlineTextBox::paint): (InlineTextBox::paintSelection): (InlineTextBox::paintMarkedTextBackground): (InlineTextBox::offsetForPosition): (InlineTextBox::positionForOffset): (RenderText::cacheWidths): (RenderText::widthFromCache): (RenderText::trimmedMinMaxWidth): (RenderText::calcMinMaxWidth): (RenderText::containsOnlyWhitespace): (RenderText::width): * khtml/rendering/render_text.h: * kwq/KWQFontMetrics.h: * kwq/KWQFontMetrics.mm: (QFontMetrics::width): (QFontMetrics::charWidth): (QFontMetrics::floatWidth): (QFontMetrics::floatCharacterWidths): (QFontMetrics::checkSelectionPoint): (QFontMetrics::boundingRect): (QFontMetrics::size): * kwq/KWQPainter.h: * kwq/KWQPainter.mm: (QPainter::drawText): (QPainter::drawHighlightForText): * kwq/WebCoreTextRenderer.h: * kwq/WebCoreTextRendererFactory.mm: (WebCoreInitializeEmptyTextStyle): * layout-tests/editing/deleting/delete-tab-001-expected.txt: * layout-tests/editing/deleting/delete-tab-001.html: * layout-tests/editing/deleting/delete-tab-002-expected.txt: * layout-tests/editing/deleting/delete-tab-002.html: * layout-tests/editing/deleting/delete-tab-003-expected.txt: * layout-tests/editing/deleting/delete-tab-003.html: * layout-tests/editing/deleting/delete-tab-004-expected.txt: * layout-tests/editing/deleting/delete-tab-004.html: * layout-tests/editing/inserting/insert-tab-001-expected.txt: * layout-tests/editing/inserting/insert-tab-002-expected.txt: * layout-tests/editing/inserting/insert-tab-003-expected.txt: * layout-tests/editing/inserting/insert-tab-004-expected.txt: * layout-tests/fast/dom/quadraticCurveTo-expected.txt: * layout-tests/fast/js/string-replace-2-expected.txt: * layout-tests/fast/table/039-expected.txt: * layout-tests/fast/table/border-collapsing/004-expected.txt: * layout-tests/fast/tokenizer/script_extra_close-expected.txt: 2005-07-05 Beth Dakin Adding colspan test for HTMLTableElement and bdo test for HTMLElement. Reviewed by NOBODY Adele. Test cases added: (NONE) * ChangeLog: * layout-tests/fast/dom/HTMLElement/bdo-expected.txt: Added. * layout-tests/fast/dom/HTMLElement/bdo.html: Added. * layout-tests/fast/dom/HTMLTableElement/colSpan-expected.txt: Added. * layout-tests/fast/dom/HTMLTableElement/colSpan.html: Added. 2005-07-05 Geoffrey Garen -rolled out patch for http://bugzilla.opendarwin.org/show_bug.cgi?id=3826 because it fails to build w/gcc3.3 (previous fix didn't completely work) * kwq/KWQDef.h: 2005-07-05 Geoffrey Garen -fixed failed build introduced by fix to http://bugzilla.opendarwin.org/show_bug.cgi?id=3826 Reviewed by sullivan. * kwq/KWQDef.h: changed 64 bit typedef to match def in sys/types.h 2005-07-05 Eric Seidel Reviewed by mjs. * kwq/KWQPalette.h: (QColorGroup::): Enum values added for KDOM. (QPalette::): Enum values added for KDOM. * kwq/KWQPalette.mm: Added. (QPalette::setColor): Added (only supports "active"). Many of these enum values (particularly ColorGroup) may be removed as KDOM gets better integrated with our tree. http://bugzilla.opendarwin.org/show_bug.cgi?id=3851 2005-07-05 Eric Seidel Reviewed by mjs. * ForwardingHeaders/kinstance.h: Added. * ForwardingHeaders/kio/netaccess.h: Added. * ForwardingHeaders/kjs/scope_chain.h: Added. * ForwardingHeaders/qdir.h: Added. * ForwardingHeaders/qglobal.h: Added. For KDOM. http://bugzilla.opendarwin.org/show_bug.cgi?id=3822 2005-07-05 Eric Seidel Reviewed by mjs. * kwq/KWQDef.h: 64bit types added (qRound): For kdom http://bugzilla.opendarwin.org/show_bug.cgi?id=3826 2005-07-05 Eric Seidel Reviewed by mjs. * kwq/KWQDateTime.h: Necessary KDOM additions. (QTime::currentTime): Added. * kwq/KWQDateTime.mm: (QTime::addMSecs): Added. http://bugzilla.opendarwin.org/show_bug.cgi?id=3828 2005-07-05 Eric Seidel Reviewed by mjs. * ForwardingHeaders/qwmatrix.h: Added. * WebCore.pbproj/project.pbxproj: Added KWQMatrix.* * khtml/rendering/render_image.cpp: Now includes qwmatrix.h * kwq/KWQPixmap.h: Removed QWMatrix stub. * kwq/KWQWMatrix.h: Added. (QWMatrix::m11): simple accessors. (QWMatrix::m12): (QWMatrix::m21): (QWMatrix::m22): (QWMatrix::dx): (QWMatrix::dy): * kwq/KWQWMatrix.mm: Added. (QWMatrix::QWMatrix): All are standard Qt functions. (QWMatrix::setMatrix): (QWMatrix::map): (QWMatrix::isIdentity): (QWMatrix::reset): (QWMatrix::scale): (QWMatrix::rotate): (QWMatrix::translate): (QWMatrix::shear): (QWMatrix::det): (QWMatrix::isInvertible): (QWMatrix::invert): (QWMatrix::operator CGAffineTransform): (QWMatrix::operator== ): (QWMatrix::operator*= ): Simple white-room QWMatrix implementation entirely based on CGAffineTransform. http://bugzilla.opendarwin.org/show_bug.cgi?id=3821 2005-07-05 Eric Seidel Reviewed by mjs. * kwq/KWQPtrList.h: additions necessary for kdom. (QPtrList::findRef): added. (QPtrList::begin): added. (QPtrList::end): added. (QPtrListIterator::operator*): added. http://bugzilla.opendarwin.org/show_bug.cgi?id=3850 2005-07-04 Maciej Stachowiak Original patch from Mark Rowe , reviewed by me. Fixes to patch by me, reviewed by John Sullivan. - fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=3293 Test cases added: * layout-tests/fast/js/has-own-property.html: Added - tests this change. * layout-tests/fast/js/eval-var-decl.html: Added - test depends on this change. * khtml/ecma/kjs_css.cpp: (KJS::DOMCSSStyleDeclaration::hasOwnProperty): * khtml/ecma/kjs_css.h: * khtml/ecma/kjs_dom.cpp: (KJS::DOMNodeList::hasOwnProperty): (KJS::DOMElement::tryGet): (KJS::DOMNamedNodeMap::hasOwnProperty): * khtml/ecma/kjs_dom.h: * khtml/ecma/kjs_html.cpp: (KJS::HTMLDocument::hasOwnProperty): (KJS::HTMLDocument::tryGet): (KJS::KJS::HTMLElement::hasOwnProperty): (KJS::KJS::HTMLCollection::hasOwnProperty): * khtml/ecma/kjs_html.h: * khtml/ecma/kjs_window.cpp: (KJS::Window::hasOwnProperty): (KJS::Konqueror::hasOwnProperty): * khtml/ecma/kjs_window.h: 2005-07-03 Eric Seidel Reviewed by mjs. * kwq/KWQTimer.h: * kwq/KWQTimer.mm: (QTimer::QTimer): added parent pointer (and warning) http://bugzilla.opendarwin.org/show_bug.cgi?id=3825 2005-07-03 Eric Seidel Reviewed by mjs. * khtml/xml/dom_docimpl.cpp: (DocumentImpl::setDocumentChanged): fixed to use new API * kwq/KWQKStaticDeleter.h: (KStaticDeleter::setObject): fixed to take 3rd argument http://bugzilla.opendarwin.org/show_bug.cgi?id=3823 2005-07-03 Eric Seidel Reviewed by mjs. * kwq/KWQValueList.h: (QValueList::find): KDOM support (QValueList::constBegin): KDE compatibility (QValueList::constEnd): KDE compatibility * kwq/KWQValueListImpl.h: * kwq/KWQValueListImpl.mm: (KWQValueListImpl::findEqualNode): KDOM support http://bugzilla.opendarwin.org/show_bug.cgi?id=3832 2005-07-03 Eric Seidel Reviewed by mjs. * kwq/KWQFontMetrics.h: * kwq/KWQFontMetrics.mm: (QFontMetrics::boundingRect): added boundingRect(QChar) http://bugzilla.opendarwin.org/show_bug.cgi?id=3827 2005-07-03 Eric Seidel Reviewed by mjs. * kwq/KWQListImpl.h: * kwq/KWQListImpl.mm: (KWQListImpl::findRef): Added to support KDOM::NodeImpl::compareDocumentPosition(NodeImpl *other) 2005-07-03 Eric Seidel Reviewed by mjs. * ForwardingHeaders/qintdict.h: maps to KWQIntDict.h * kwq/KWQIntDict.h: copy of KWQPtrDict.h replacing T * with int. 2005-07-03 Eric Seidel * kwq/KWQPair.h: added newline, per mjs's request. 2005-07-03 Eric Seidel Reviewed by mjs. * ForwardingHeaders/qpair.h: Added. * kwq/KWQPair.h: Added. Qt compatible QPair, built on std::pair http://bugzilla.opendarwin.org/show_bug.cgi?id=3824 2005-07-01 Beth Dakin Adding createCaption test for HTMLTableElement. Reviewed by Adele (sort of). Test cases added: * layout-tests/fast/dom/HTMLTableElement/createCaption-expected.txt: Added. * layout-tests/fast/dom/HTMLTableElement/createCaption.html: Added. 2005-07-01 Geoffrey Garen Moving dom tests around to conform to new directory structure specified in today's meeting. Reviewed by justing. Test cases added: * layout-tests/fast/dom/HTMLDocument/title-get-expected.txt: Added. * layout-tests/fast/dom/HTMLDocument/title-get.html: Added. * layout-tests/fast/dom/HTMLDocument/title-set-expected.txt: Added. * layout-tests/fast/dom/HTMLDocument/title-set.html: Added. * layout-tests/fast/dom/HTMLDocument/title/get-expected.txt: Removed. * layout-tests/fast/dom/HTMLDocument/title/get.html: Removed. * layout-tests/fast/dom/HTMLDocument/title/set-expected.txt: Removed. * layout-tests/fast/dom/HTMLDocument/title/set.html: Removed. * layout-tests/fast/dom/HTMLDocument/url-getset-expected.txt: Added. * layout-tests/fast/dom/HTMLDocument/url-getset.html: Added. * layout-tests/fast/dom/HTMLDocument/url/getset-expected.txt: Removed. * layout-tests/fast/dom/HTMLDocument/url/getset.html: Removed. * layout-tests/fast/dom/HTMLDocument/write-call-expected.txt: Added. * layout-tests/fast/dom/HTMLDocument/write-call.html: Added. * layout-tests/fast/dom/HTMLDocument/write-multiple-calls-expected.txt: Added. * layout-tests/fast/dom/HTMLDocument/write-multiple-calls.html: Added. * layout-tests/fast/dom/HTMLDocument/write/call-expected.txt: Removed. * layout-tests/fast/dom/HTMLDocument/write/call.html: Removed. * layout-tests/fast/dom/HTMLDocument/write/multiple-calls-expected.txt: Removed. * layout-tests/fast/dom/HTMLDocument/write/multiple-calls.html: Removed. * layout-tests/fast/dom/HTMLDocument/writeln-call-expected.txt: Added. * layout-tests/fast/dom/HTMLDocument/writeln-call.html: Added. * layout-tests/fast/dom/HTMLDocument/writeln-multiple-calls-expected.txt: Added. * layout-tests/fast/dom/HTMLDocument/writeln-multiple-calls.html: Added. * layout-tests/fast/dom/HTMLDocument/writeln/call-expected.txt: Removed. * layout-tests/fast/dom/HTMLDocument/writeln/call.html: Removed. * layout-tests/fast/dom/HTMLDocument/writeln/multiple-calls-expected.txt: Removed. * layout-tests/fast/dom/HTMLDocument/writeln/multiple-calls.html: Removed. 2005-07-01 Geoffrey Garen -landed patch by Eric Seidel -for http://bugzilla.opendarwin.org/show_bug.cgi?id=3657 GroundWork: Moving some functions from khtml->jsc following kjs TOT - no layout test necessary yet - only groundwork Reviewed by darin. * ForwardingHeaders/qintdict.h: * khtml/ecma/kjs_binding.h: 2005-07-01 Geoffrey Garen -landed patch by Carsten Guenther http://bugzilla.opendarwin.org/show_bug.cgi?id=3477 -corrects errors in date layout test Reviewed by darin. Test cases modified: * layout-tests/fast/js/date-parse-test.html: 2005-07-01 Eric Seidel Reviewed by darin. * kwq/KWQSize.h: * kwq/KWQSize.mm: (QSize::operator CGSize): adding CGSize conversion support http://bugzilla.opendarwin.org/show_bug.cgi?id=3669 2005-06-30 Bruce DiBello Reviewed by Geoff Garen. Test cases added: getting and setting div.align * layout-tests/fast/dom/HTMLDivElement/align/getset-expected.txt: Added. * layout-tests/fast/dom/HTMLDivElement/align/getset.html: Added. 2005-06-29 Anders Carlsson Reviewed and landed by Darin Adler. - Fix document() not supported Test cases added: * layout-tests/fast/xsl/document-function-expected.txt: Added. * layout-tests/fast/xsl/document-function.xml: Added. * layout-tests/fast/xsl/document-function.xsl: Added. * layout-tests/fast/xsl/resources/document-function-source.xml: Added. * khtml/xsl/xslt_processorimpl.cpp: (DOM::parseErrorFunc): Stub to prevent errors from getting written to the console. (DOM::stylesheetLoadFunc): Fetch and parse documents. (DOM::XSLTProcessorImpl::transformDocument): Use the processor as the global variable instead of the style sheet. * khtml/xsl/xslt_processorimpl.h: (DOM::XSLTProcessorImpl::stylesheet): (DOM::XSLTProcessorImpl::sourceDocument): Add accessors for source document and stylesheet. 2005-06-29 Maciej Stachowiak Unreviewed - fixing build breakage with gcc 4. * khtml/misc/hashtable.h: Don't use a typedef when declaring a class friend. 2005-06-29 David Harrison Temporarily enable tab coalescing ahead of white-space:pre-wrap change because of problems with keeping the tabs separate. Will revert when problems are fixed or remove if I do pre-wrap first. * khtml/editing/insert_text_command.cpp: (khtml::InsertTextCommand::prepareForTextInsertion): (khtml::InsertTextCommand::insertTab): * khtml/editing/markup.cpp: (khtml::createParagraphContentsFromString): 2005-06-29 David Harrison Reviewed by Dave Hyatt (rendering) and Maciej (editing). Test cases added: Coming soon. Will include with next round of changes for this bug. This is the first checkin for... REGRESSION (Mail): Tabs do not work the way they did in Panther (especially useful in plain text mail) Basic strategy is to put tabs into spans with white-space:pre style, and render them with tabs stops every 8th space, where the space width and the left margin are those of the enclosing block. What's left is to switch to implement white-space:pre-wrap so that we can coalesce consecutive tabs while maintaining proper line breaking. That will keep the markup smaller. * khtml/editing/apply_style_command.cpp: (khtml::createStyleSpanElement): (khtml::ApplyStyleCommand::removeCSSStyle): (khtml::ApplyStyleCommand::addInlineStyleIfNeeded): * khtml/editing/delete_selection_command.cpp: (khtml::DeleteSelectionCommand::saveTypingStyleState): * khtml/editing/edit_command.cpp: (khtml::EditCommand::styleAtPosition): * khtml/editing/html_interchange.h: * khtml/editing/htmlediting.cpp: (khtml::isSpecialElement): (khtml::isTabSpanNode): (khtml::isTabSpanTextNode): (khtml::positionBeforeTabSpan): (khtml::createTabSpanElement): * khtml/editing/htmlediting.h: * khtml/editing/insert_text_command.cpp: (khtml::InsertTextCommand::prepareForTextInsertion): (khtml::InsertTextCommand::input): (khtml::InsertTextCommand::insertTab): * khtml/editing/insert_text_command.h: * khtml/editing/markup.cpp: (khtml::createParagraphContentsFromString): (khtml::createFragmentFromText): * khtml/editing/replace_selection_command.cpp: (khtml::ReplacementFragment::removeStyleNodes): * khtml/html/htmltokenizer.cpp: (khtml::HTMLTokenizer::begin): (khtml::HTMLTokenizer::processListing): (khtml::HTMLTokenizer::parseEntity): (khtml::HTMLTokenizer::parseTag): (khtml::HTMLTokenizer::addPending): (khtml::HTMLTokenizer::write): * khtml/html/htmltokenizer.h: (khtml::HTMLTokenizer::): * khtml/rendering/bidi.cpp: (khtml::addRun): (khtml::RenderBlock::tabWidth): (khtml::RenderBlock::computeHorizontalPositionsForLine): (khtml::RenderBlock::skipWhitespace): (khtml::RenderBlock::findNextLineBreak): (khtml::RenderBlock::checkLinesForTextOverflow): * khtml/rendering/break_lines.cpp: (khtml::isBreakable): * khtml/rendering/font.cpp: (Font::drawHighlightForText): (Font::drawText): (Font::floatWidth): (Font::floatCharacterWidths): (Font::checkSelectionPoint): (Font::width): * khtml/rendering/font.h: * khtml/rendering/render_block.cpp: (khtml::stripTrailingSpace): (khtml::RenderBlock::calcInlineMinMaxWidth): * khtml/rendering/render_block.h: * khtml/rendering/render_br.h: (khtml::RenderBR::width): * khtml/rendering/render_flexbox.cpp: (khtml::RenderFlexibleBox::layoutVerticalBox): * khtml/rendering/render_image.cpp: (RenderImage::setPixmap): (RenderImage::paint): * khtml/rendering/render_line.cpp: (khtml::EllipsisBox::paint): * khtml/rendering/render_line.h: (khtml::InlineBox::width): (khtml::InlineBox::xPos): (khtml::InlineBox::yPos): (khtml::InlineBox::height): (khtml::InlineBox::baseline): * khtml/rendering/render_list.cpp: (RenderListMarker::paint): (RenderListMarker::calcMinMaxWidth): * khtml/rendering/render_object.cpp: (RenderObject::tabWidth): (RenderObject::recalcMinMaxWidths): * khtml/rendering/render_object.h: * khtml/rendering/render_replaced.cpp: * khtml/rendering/render_text.cpp: (InlineTextBox::selectionRect): (InlineTextBox::paint): (InlineTextBox::paintSelection): (InlineTextBox::paintMarkedTextBackground): (InlineTextBox::textPos): (InlineTextBox::offsetForPosition): (InlineTextBox::positionForOffset): (RenderText::cacheWidths): (RenderText::widthFromCache): (RenderText::trimmedMinMaxWidth): (RenderText::calcMinMaxWidth): (RenderText::containsOnlyWhitespace): (RenderText::width): * khtml/rendering/render_text.h: * kwq/KWQFontMetrics.h: * kwq/KWQFontMetrics.mm: (QFontMetrics::width): (QFontMetrics::charWidth): (QFontMetrics::floatWidth): (QFontMetrics::floatCharacterWidths): (QFontMetrics::checkSelectionPoint): (QFontMetrics::boundingRect): (QFontMetrics::size): * kwq/KWQPainter.h: * kwq/KWQPainter.mm: (QPainter::drawText): (QPainter::drawHighlightForText): * kwq/WebCoreTextRenderer.h: * kwq/WebCoreTextRendererFactory.mm: (WebCoreInitializeEmptyTextStyle): * layout-tests/editing/deleting/delete-tab-001-expected.txt: * layout-tests/editing/deleting/delete-tab-001.html: * layout-tests/editing/deleting/delete-tab-002-expected.txt: * layout-tests/editing/deleting/delete-tab-002.html: * layout-tests/editing/deleting/delete-tab-003-expected.txt: * layout-tests/editing/deleting/delete-tab-003.html: * layout-tests/editing/deleting/delete-tab-004-expected.txt: * layout-tests/editing/deleting/delete-tab-004.html: * layout-tests/editing/inserting/insert-tab-001-expected.txt: * layout-tests/editing/inserting/insert-tab-002-expected.txt: * layout-tests/editing/inserting/insert-tab-003-expected.txt: * layout-tests/editing/inserting/insert-tab-004-expected.txt: * layout-tests/fast/dom/quadraticCurveTo-expected.txt: * layout-tests/fast/js/string-replace-2-expected.txt: * layout-tests/fast/table/039-expected.txt: * layout-tests/fast/table/border-collapsing/004-expected.txt: * layout-tests/fast/tokenizer/script_extra_close-expected.txt: 2005-06-29 Geoffrey Garen Contributed by Francisco Tolmasky -test cases for fix to http://bugzilla.opendarwin.org/show_bug.cgi?id=3667 Core JavaScript 1.5 Reference:Objects:Array:forEach See JavaScriptCore Changelog for details on the patch. Reviewed by darin. Test cases added: * layout-tests/fast/js/array-every-expected.txt: Added. * layout-tests/fast/js/array-every.html: Added. * layout-tests/fast/js/array-foreach-expected.txt: Added. * layout-tests/fast/js/array-foreach.html: Added. * layout-tests/fast/js/array-some-expected.txt: Added. * layout-tests/fast/js/array-some.html: Added. 2005-06-29 Bruce DiBello Reviewed by Geoff Garen Test cases added: added expected results for previous check in * layout-tests/fast/dom/HTMLDocument/url/getset-expected.txt: Added. 2005-06-29 Geoffrey Garen DOM compatibility tests for HTMLDocument::writeln Reviewed by justing. Test cases added: * layout-tests/fast/dom/HTMLDocument/writeln/call-expected.txt: Added. * layout-tests/fast/dom/HTMLDocument/writeln/call.html: Added. * layout-tests/fast/dom/HTMLDocument/writeln/multiple-calls-expected.txt: Added. * layout-tests/fast/dom/HTMLDocument/writeln/multiple-calls.html: Added. 2005-06-29 Bruce DiBello Reviewed by Geoff Garen. Test cases added: added DOM test for document.URL * layout-tests/fast/dom/HTMLDocument/url/getset.html: Added. 2005-06-29 Geoffrey Garen DOM compatibility tests for HTMLDocument::write Reviewed by justing. Test cases added: * layout-tests/fast/dom/HTMLDocument/write/call-expected.txt: Added. * layout-tests/fast/dom/HTMLDocument/write/call.html: Added. * layout-tests/fast/dom/HTMLDocument/write/multiple-calls-expected.txt: Added. * layout-tests/fast/dom/HTMLDocument/write/multiple-calls.html: Added. 2005-06-29 Geoffrey Garen DOM compatibility tests for HTMLDocument::title Reviewed by justing. Test cases added: * layout-tests/fast/dom/HTMLDocument/title/get-expected.txt: Added. * layout-tests/fast/dom/HTMLDocument/title/get.html: Added. * layout-tests/fast/dom/HTMLDocument/title/set-expected.txt: Added. * layout-tests/fast/dom/HTMLDocument/title/set.html: Added. 2005-06-28 Maciej Stachowiak Reviewed by Darin. Added iterator support to new hashtable class, the HashSet API is now essentially complete. Added support for consistency check mode. * khtml/misc/hashset.h: (khtml::HashSet::capacity): Added (khtml::HashSet::begin): Added (both const and non-const) (khtml::HashSet::end): Added (both const and non-const) (khtml::HashSet::insert): Made both versions return an iterator (khtml::HashSet::find): Added (both const and on-const, returning appropriate iterator) (khtml::HashSet::contains): Added (khtml::HashSet::remove): Added version that takes an iterator argument (khtml::HashSet::clear): Added * khtml/misc/hashtable.h: (khtml::HashTableIterator): New class with all the obvious iterator stuff. (khtml::HashTableConstIterator::HashTableConstIterator): New class with all the obvious const iterator stuff. (khtml::HashTable::begin): Added (both const and non-consts) (khtml::HashTable::end): Added (both const and non-consts) (khtml::HashTable::capacity): Added (khtml::HashTable::insert): Implement non-template method in terms of template method. (khtml::HashTable::contains): Added (implemented in terms of find) (khtml::HashTable::remove): Implemented key remove in terms of find and iterator remove. (khtml::HashTable::hash): Made static (khtml::HashTable::equal): Made static (khtml::HashTable::identityConvert): Added - no-op convert method so template insert method can be implemented in terms of non-template (khtml::HashTable::insert): Changed to return iterator (khtml::HashTable::reinsert): Recoded to be more like the other functions (khtml::HashTable::find): Added (khtml::HashTable::remove): Added iterator version (khtml::HashTable::clear): Added * khtml/xml/dom_atomicstring.cpp: (DOM::AtomicString::add): Updated to deal with the fact that insert returns an iterator (khtml::HashTable::shouldExpand): New helper. (khtml::HashTable::shouldShrink): ditto (khtml::HashTable::makeIterator): ditto (khtml::HashTable::makeConstIterator): ditto (khtml::HashTable::checkConsistency): consistency check method (khtml::HashTable::checkConsistencyExceptSize): consistency check method 2005-06-29 Geoffrey Garen -added test case for fix to http://bugzilla.opendarwin.org/show_bug.cgi?id=3743 Incorrect error message given for certain calls See JavaScriptCore Changelog for details about the patch. Reviewed by me. Test cases added: * layout-tests/fast/js/toString-stack-overflow-expected.txt: Added. * layout-tests/fast/js/toString-stack-overflow.html: Added. 2005-06-29 Justin Garcia - Fixes HTMLLabelElement's form property isn't implemented Patch by Anders Carlsson Reviewed by Darin Test cases added: * layout-tests/fast/dom/HTMLLabelElement/properties/form-expected.txt: Added. * layout-tests/fast/dom/HTMLLabelElement/properties/form.html: Added. * khtml/html/html_formimpl.cpp: (DOM::HTMLLabelElementImpl::form): Traverse upwards looking for a form element. 2005-06-29 Geoffrey Garen Patch by Joost de Valk - http://bugzilla.opendarwin.org/show_bug.cgi?id=3732 Testcase for accesskeys that will run with run-webkit-tests. Reviewed by Darin. Test cases added: * layout-tests/fast/forms/access-key-expected.txt: Added. * layout-tests/fast/forms/access-key.html: Added. 2005-06-29 Justin Garcia Patch by Anders Carlsson - Fixes An HTMLObjectElement's form property was always null. Reviewed by Darin Test cases added: * layout-tests/fast/dom/htmlobject-form-expected.txt: Added. * layout-tests/fast/dom/htmlobject-form.html: Added. * khtml/html/html_objectimpl.cpp: (DOM::HTMLObjectElementImpl::form): Implement this function by traversing the parent nodes looking for a form element. 2005-06-29 Geoffrey Garen Patch by Antoine Quint -fixes http://bugzilla.opendarwin.org/show_bug.cgi?id=3648 quadraticCurveTo() method in APIs JS bindings does not exist Reviewed by Darin. Test cases added: * layout-tests/fast/dom/quadraticCurveTo-expected.txt: Added. * layout-tests/fast/dom/quadraticCurveTo.xml: Added. * khtml/ecma/kjs_html.cpp: 2005-06-29 Geoffrey Garen Patch by Hanspeter Schaub -fixes http://bugzilla.opendarwin.org/show_bug.cgi?id=3317 REGRESSION: CSS2: outline is applied to both
  • element and its enclosing text with context dependent selector Reviewed by Hyatt. Test cases added: * layout-tests/fast/css/list-outline-expected.txt: Added. * layout-tests/fast/css/list-outline.html: Added. * khtml/rendering/render_line.cpp: (khtml::InlineFlowBox::paint): 2005-06-28 Vicki Murley Reviewed by Maciej. - fix our part of extra HTTP GET when iframe requests file already fetched by parent that should have been cached. Setting location via javascript should not signal a full reload of the destination page and all its subresources. * khtml/khtml_part.cpp: (KHTMLPart::changeLocation): remove code that sets the reload flag 2005-06-28 Justin Garcia Patch by Kevin Ballard Reviewed by Darin - Fixes Updating the value of a textarea wasn't saving the cursor position in a line ending-agnostic fashion. Test cases added: * layout-tests/fast/forms/cursor-position-expected.txt: Added. * layout-tests/fast/forms/cursor-position.html: Added. * kwq/KWQTextArea.mm: (-[KWQTextArea getCursorPositionAsIndex:inParagraph:]): (RangeOfParagraph): (-[KWQTextArea setCursorPositionToIndex:inParagraph:]): 2005-06-28 Justin Garcia Patch by Alexey Proskuryakov - When a DECODE_DEBUG preprocessor symbol is defined in khtml/misc/decoder.cpp, compilation fails because a non-existent variable "force" is used. Reviewed by Darin Test cases added: None required * khtml/misc/decoder.cpp: (Decoder::setEncoding): 2005-06-28 David Harrison Reviewed by Chris Blumenberg. Test cases added: (NONE) (continued) assertion failure double-clicking text to select Fixed my checkin from yesterday. * khtml/rendering/render_text.cpp: (InlineTextBox::paintMarkedTextBackground): (InlineTextBox::positionForOffset): Changed tabs to spaces. (RenderText::positionForCoordinates): Make sure affinity is downstream when in mid-line. Changed tabs to spaces. (RenderText::caretRect): (RenderText::cacheWidths): (RenderText::trimmedMinMaxWidth): (RenderText::minXPos): (RenderText::width): (RenderText::caretMaxOffset): Changed tabs to spaces. * layout-tests/editing/style/create-block-for-style-004-expected.txt: Expected ending selection affinity is downstream. 2005-06-27 Maciej Stachowiak Remove accidentally committed code that breaks the build. Oops! * khtml/xml/dom_atomicstring.cpp: (DOM::AtomicString::expand): (DOM::AtomicString::shrink): 2005-06-26 Maciej Stachowiak Reviewed by Darin. - replaced all our hash functions with the state of the art in hashing - ~1% speedup on cvs-base No test cases added, perf effects only. * khtml/xml/dom_atomicstring.cpp: (DOM::AtomicStringStatisticsExitLogger::~AtomicStringStatisticsExitLogger): Improved stats gathering to track collisions in more detail and count reinserts on remove. (DOM::addToCollisionCount): ditto (DOM::AtomicString::add): ditto (DOM::AtomicString::insert): ditto (DOM::AtomicString::remove): ditto * khtml/xml/dom_stringimpl.cpp: (DOM::DOMStringImpl::computeHash): Replace with SuperFastHash algorithm. * kwq/KWQCharsets.mm: (encodingNameHash): Clean up mistaken shift in the wrong direction. * kwq/KWQString.h: Removed unused hashing code. * kwq/KWQString.mm: ditto * kwq/KWQTextCodec.mm: (QTextCodec::hash): Use a variant of the SuperFastHash algorithm. 2005-06-27 David Harrison Reviewed by Ken. Test cases added: None because this relies on mouse clicking. assertion failure double-clicking text to select * khtml/rendering/render_text.cpp: (RenderText::positionForCoordinates): Use setAffinityUsingLinePosition. 2005-06-25 Darin Adler - updated a layout test so that it doesn't depend on a remote resource via http * layout-tests/fast/backgrounds/001.html: Change image URL to be relative. * layout-tests/fast/backgrounds/resources/bg_position_larger.gif: Added. 2005-06-24 Darin Adler Changes by Mitz Pettel. Reviewed by me. Test cases added: * layout-tests/fast/text/international/bidi-explicit-embedding-expected.txt: Added. * layout-tests/fast/text/international/bidi-explicit-embedding.html: Added. - fixed Incorrect layout of explicit embedding levels * khtml/rendering/bidi.cpp: (khtml::embed): Set up the new run correctly following an embed/pop. (khtml::RenderBlock::bidiReorderLine): Close the "dangling" run when we see an explicit embedding character (or PDF). 2005-06-24 Darin Adler Changes by Mitz Pettel. Reviewed by me. Test cases added: * layout-tests/fast/text/international/bidi-CS-after-AN-expected.txt: Added. * layout-tests/fast/text/international/bidi-CS-after-AN.html: Added. - fixed Bug_72578 in KHTML: bidi algorithm misbehaves with CS after AN * khtml/rendering/bidi.cpp: (khtml::RenderBlock::bidiReorderLine): Rolled in the patch from the KDE tree. 2005-06-24 Justin Garcia - Adds QBuffer::setBuffer(QByteArray) support to KWQBuffer, and adds a QBuffer(QByteArray) constructor. Reviewed by Darin Test cases added: Non required * kwq/KWQBuffer.h: (QBuffer::QBuffer): * kwq/KWQBuffer.mm: (QBuffer::setBuffer): 2005-06-24 Justin Garcia - KWQRect -- CGRect and other small additions - Add remove and byteOrderMark support to KWQString for kdom Reviewed by Darin Test cases added: None required * kwq/KWQRect.h: (QRect::contains): * kwq/KWQRect.mm: (QRect::QRect): (QRect::topRight): (QRect::bottomLeft): (QRect::normalize): (QRect::operator CGRect): * kwq/KWQString.h: (QChar::): (QString::remove): 2005-06-24 Darin Adler Reviewed by Justin Garcia. - fixed Safari changes "\" characters to "/" in the query part of links that start with "?" Test cases added: * layout-tests/fast/dom/anchor-backslash-expected.txt: Added. * layout-tests/fast/dom/anchor-backslash.html: Added. * kwq/KWQKURL.mm: (substituteBackslashes): Fix error where we'd ignore "?" and "#" characters if they were the first character in the string. 2005-06-23 Darin Adler * khtml/html/html_formimpl.cpp: (DOM::HTMLTextAreaElementImpl::setValue): Took out an unneeded type cast (meant to do that before committing). 2005-06-23 Kevin Ballard Reviewed and landed by Darin Adler. Test cases added: * layout-tests/fast/forms/selection-functions-expected.txt: Added. * layout-tests/fast/forms/selection-functions.html: Added. * layout-tests/fast/forms/textarea-crlf-expected.txt: Added. * layout-tests/fast/forms/textarea-crlf.html: Added. - Fixes bug . Also fixes issue where setting text of a textarea in code and then retrieving it would leave the \r\n sequences in the text, despite the textarea translating to \n in all other cases. * khtml/ecma/kjs_html.h: * khtml/ecma/kjs_html.cpp: (KJS::getInputSelectionStart): (KJS::getInputSelectionEnd): (KJS::KJS::HTMLElement::getValueProperty): (KJS::KJS::HTMLElement::hasProperty): (KJS::KJS::HTMLElementFunction::tryCall): (KJS::HTMLElement::putValue): * khtml/html/html_formimpl.cpp: (DOM::HTMLInputElementImpl::canHaveSelection): (DOM::HTMLInputElementImpl::selectionStart): (DOM::HTMLInputElementImpl::selectionEnd): (DOM::HTMLInputElementImpl::setSelectionStart): (DOM::HTMLInputElementImpl::setSelectionEnd): (DOM::HTMLInputElementImpl::setSelectionRange): (DOM::HTMLInputElementImpl::setValue): (DOM::HTMLTextAreaElementImpl::selectionStart): (DOM::HTMLTextAreaElementImpl::selectionEnd): (DOM::HTMLTextAreaElementImpl::setSelectionStart): (DOM::HTMLTextAreaElementImpl::setSelectionEnd): (DOM::HTMLTextAreaElementImpl::setSelectionRange): (DOM::HTMLTextAreaElementImpl::setValue): * khtml/html/html_formimpl.h: * khtml/rendering/render_form.cpp: (RenderLineEdit::selectionStart): (RenderLineEdit::selectionEnd): (RenderLineEdit::setSelectionStart): (RenderLineEdit::setSelectionEnd): (RenderLineEdit::setSelectionRange): (RenderTextArea::selectionStart): (RenderTextArea::selectionEnd): (RenderTextArea::setSelectionStart): (RenderTextArea::setSelectionEnd): (RenderTextArea::select): (RenderTextArea::setSelectionRange): * khtml/rendering/render_form.h: * kwq/KWQLineEdit.h: * kwq/KWQLineEdit.mm: (QLineEdit::setCursorPosition): (QLineEdit::cursorPosition): (QLineEdit::selectAll): (QLineEdit::selectionStart): (QLineEdit::selectedText): (QLineEdit::setSelection): * kwq/KWQTextArea.h: * kwq/KWQTextArea.mm: (-[KWQTextArea setSelectedRange:]): (-[KWQTextArea selectedRange]): (-[KWQTextArea getCursorPositionAsIndex:inParagraph:]): (RangeOfParagraph): * kwq/KWQTextEdit.h: * kwq/KWQTextEdit.mm: (QTextEdit::getCursorPosition): (QTextEdit::selectionStart): (QTextEdit::selectionEnd): (QTextEdit::setSelectionStart): (QTextEdit::setSelectionEnd): (QTextEdit::selectAll): (QTextEdit::setSelectionRange): * kwq/KWQTextField.h: * kwq/KWQTextField.mm: (-[KWQTextFieldController selectedRange]): (-[KWQTextFieldController setSelectedRange:]): 2005-06-23 Justin Garcia Patch by Eric Seidel Adds QTextIStream, QTextOStream to KWQ Reviewed by Darin Test cases added: None required * kwq/KWQTextStream.h: (QTextIStream::QTextIStream): (QTextOStream::QTextOStream): 2005-06-23 Justin Garcia Patch by Eric Seidel This patch contains several small additions to KWQ Reviewed by Darin Test cases added: None required * kwq/KWQApplication.h: (QApplication::palette): * kwq/KWQDateTime.h: (QDateTime::time): * kwq/KWQDict.h: (QDict::operator[]): (QDictIterator::operator*): * kwq/KWQKDebug.h: (kdbgstream::operator<<): * kwq/KWQMemArray.h: (QMemArray::duplicate): 2005-06-23 David Harrison Test cases added: None needed for this debug-only utility code. - Make showTree() const. - Add showTree() for InlineBox. - Add showTree() for RenderObject. * khtml/editing/selection.cpp: (khtml::Selection::showTree): * khtml/editing/selection.h: * khtml/editing/visible_position.cpp: (khtml::VisiblePosition::showTree): * khtml/editing/visible_position.h: Make showTree() const. * khtml/rendering/render_line.cpp: (khtml::InlineBox::showTree): * khtml/rendering/render_line.h: Add showTree() for InlineBox. * khtml/rendering/render_object.cpp: (RenderObject::showTree): * khtml/rendering/render_object.h: Add showTree() for RenderObject. * khtml/xml/dom_nodeimpl.cpp: (appendAttributeDesc): (NodeImpl::showNode): (NodeImpl::showTree): (NodeImpl::showTreeAndMark): * khtml/xml/dom_nodeimpl.h: Make showTree() const. 2005-06-23 Vicki Murley - added template to be used when writing manual tests * manual-tests/template.html: Added. 2005-06-22 Darin Adler - added forwarding headers as needed for Eric Seidel's KDOM work see * ForwardingHeaders/kjs/value.h: Added. * ForwardingHeaders/qintdict.h: Added an include. * ForwardingHeaders/qptrcollection.h: Added. * ForwardingHeaders/qsize.h: Added. * kwq/KWQIntDict.h: Added. Empty file. 2005-06-22 Darin Adler Reviewed by Vicki. Test cases added: * layout-tests/fast/css/apple-prefix-expected.txt: Added. * layout-tests/fast/css/apple-prefix.html: Added. - fixed REGRESSION: Safari RSS slider broken with TOT WebCore * khtml/css/parser.y: (getPropertyID): Fix lifetime problem on the QString. Also construct the QString using length, since the passed-in char * is not necessarily null-terminated. Also do the mapping only if it's a "-apple-" prefix -- the old code would do it for, e.g., "-applex-" too. The old code would not successfully map the "apple" in "appleLineClamp" to "khtml", and Dave changed things so that the internal name of all CSS attributes is "khtml" back in his 2005-05-03 check-in, breaking the use of appleLineClamp in RSS. (getValueID): Ditto. 2005-06-22 Anders Carlsson Reviewed and landed by Darin Adler. Test cases added: * layout-tests/fast/dom/title-text-property-expected.txt: Added * layout-tests/fast/dom/title-text-property.html: Added * layout-tests/fast/dom/title-text-property-expected-2.txt: Added * layout-tests/fast/dom/title-text-property-2.html: Added - fixed getting or setting text for a element doesn't work - fixed <rdar://problem/4091225> REGRESSION (1.2.4-1.3): many titles with non-ASCII characters do not display properly (XHTML strict only) - fixed <http://bugzilla.opendarwin.org/show_bug.cgi?id=3586> Setting and getting title's text attribute does not work * khtml/dom/html_head.cpp: (HTMLTitleElement::text): (HTMLTitleElement::setText): Call HTMLTitleElementImpl::text() and ::setText(). * khtml/html/html_headimpl.cpp: (HTMLTitleElementImpl::HTMLTitleElementImpl): (HTMLTitleElementImpl::insertedIntoDocument): (HTMLTitleElementImpl::removedFromDocument): (HTMLTitleElementImpl::childrenChanged): Pass the current title node to DocumentImpl::setTitle and ::removeTitle. (HTMLTitleElementImpl::text): Return the title. (HTMLTitleElementImpl::setText): Set the new title. * khtml/xml/dom_docimpl.cpp: (DocumentImpl::DocumentImpl): (DocumentImpl::~DocumentImpl): (DocumentImpl::updateTitle): (DocumentImpl::setTitle): (DocumentImpl::removeTitle): * khtml/xml/dom_docimpl.h: Only update the title if it's done by setting document.title or by changing the child nodes of the title element. 2005-06-22 Darin Adler <darin@apple.com> Changes by Mitz Pettel. Reviewed by me. - fixed <http://bugzilla.opendarwin.org/show_bug.cgi?id=3633> Layout order of bidi level runs is incorrect Test cases added: * layout-tests/fast/text/international/bidi-L2-run-reordering-expected.txt: Added. * layout-tests/fast/text/international/bidi-L2-run-reordering.html: Added. * khtml/rendering/bidi.cpp: (khtml::RenderBlock::bidiReorderLine): Fixed mistake where we'd advance too far after reversing a run. 2005-06-22 Darin Adler <darin@apple.com> - added test case for JavaScriptCore fix * layout-tests/fast/js/string-replace-2-expected.txt: Added. * layout-tests/fast/js/string-replace-2.html: Added. 2005-06-22 Darin Adler <darin@apple.com> Reviewed by John Sullivan. Test cases added: * layout-tests/fast/dom/css-set-property-exception-expected.txt: Added. * layout-tests/fast/dom/css-set-property-exception.html: Added. - fixed <http://bugzilla.opendarwin.org/show_bug.cgi?id=3616> RSS search field, Dashboard widgets failing due to CSS exception * khtml/ecma/kjs_css.cpp: (KJS::DOMCSSStyleDeclaration::tryPut): Ignore exceptions when setting properties. * layout-tests/fast/js/exception-linenums.html: Changed test case that involved setting style to one that involved setting another property that raises an exception when you try to set it (setting prefix on a text node). 2005-06-22 Darin Adler <darin@apple.com> Change proposed by Eric Seidel. * WebCore.pbproj/project.pbxproj: Fix build rule to match the one in JavaScriptCore. The one here accidentally had hard-coded paths in it and also had the $() vs. ${} issue that broke building on Xcode 2.1 for no good reason (it didn't need $() or ${}). 2005-06-21 Maciej Stachowiak <mjs@apple.com> Patch from KevinBallard <kevin@sb.org>, reviewed by me. - fix build for Xcode 2.1, use ${} for INPUT_FILE_BASE to fix build with Xcode 2.1 * WebCore.pbproj/project.pbxproj: 2005-06-21 Justin Garcia <justin.garcia@apple.com> - Fixes <rdar://problem/4114192>. - Fixes a crash in TOT Mail/Blot if you Edit -> Add Hyperlink on a Selection that ends at the end of the document - Fixes a problem in TOT Mail/Blot where Edit -> Add Hyperlink creates a link one character beyond what is expected. In replacement, during insertion, some special case code was being called inappropriately. Reviewed by Harrison Test cases added: None, requires manual interaction * khtml/editing/replace_selection_command.cpp: (khtml::ReplaceSelectionCommand::doApply): In "step 2" of a replacement, we should only next() the insertion point if the special pre-insertion-merge actually occured. mergeStart used to be the correct check for the occurence of a pre-insertion-merge, but a bug fix made this not the case. A non-null m_lastNodeInserted correctly signals that some pre-insertion merging occured. 2005-06-21 Darin Adler <darin@apple.com> * WebCore.pbproj/project.pbxproj: Switched to a build rule rather than a build phase for the .y files -- this gets rid of the problem where modifying the .y file would not cause sufficient compilation. * khtml/css/parser_wrapper.cpp: Removed. 2005-06-21 Adele Peterson <adele@apple.com> Test cases for: <http://bugzilla.opendarwin.org/show_bug.cgi?id=3450> <rdar://problem/3881901> String.replace() method not working when regex pattern contains {n, m} * layout-tests/fast/js/string_replace-expected.txt: Added. * layout-tests/fast/js/string_replace.html: Added. 2005-06-21 Geoffrey Garen <ggaren@apple.com> Patch contributed by Niels Leenheer <niels.leenheer@gmail.com> - fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=3370 (Safari can't handle strange frame dimensions) Reviewed by Darin. * khtml/dom/dom_string.cpp: (DOM::DOMString::toCoordsArray): * khtml/dom/dom_string.h: * khtml/html/html_imageimpl.cpp: (HTMLAreaElementImpl::parseMappedAttribute): * khtml/xml/dom_atomicstring.h: (DOM::AtomicString::toCoordsArray): * khtml/xml/dom_stringimpl.cpp: (DOM::parseLength): (DOM::DOMStringImpl::toCoordsArray): (DOM::DOMStringImpl::toLengthArray): * khtml/xml/dom_stringimpl.h: Test cases added: * layout-tests/fast/frames/invalid-expected.txt: Added. * layout-tests/fast/frames/invalid.html: Added. * layout-tests/fast/frames/valid-expected.txt: Added. * layout-tests/fast/frames/valid.html: Added. 2005-06-21 Geoffrey Garen <ggaren@apple.com> - fixed <rdar://problem/4155049> javascript function named as "opener" doesn't get called because of window.opener property Test cases only, fix is in JavaScriptCore Reviewed by cblu. Test cases added: * layout-tests/fast/js/global-opener-function-expected.txt: Added. * layout-tests/fast/js/global-opener-function.html: Added. 2005-06-21 David Harrison <harrison@apple.com> Reviewed by Justin. - show class and style attributes for element nodes - nil check the node being showTree'd - add Position::showTree() Test cases added: None needed for this debug-only utility code. * khtml/editing/selection.cpp: (khtml::Selection::showTree): - nil check the node * khtml/editing/visible_position.cpp: (khtml::VisiblePosition::previousVisiblePosition): - comments (khtml::VisiblePosition::showTree): - nil check the node * khtml/xml/dom_nodeimpl.cpp: (appendAttributeDesc): (NodeImpl::showNode): - show class and style attributes for element nodes * khtml/xml/dom_position.cpp: (DOM::Position::showTree): * khtml/xml/dom_position.h: - add Position::showTree() 2005-06-20 Maciej Stachowiak <mjs@apple.com> Reviewed by Darin(first pass) and Hyatt. - fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=3576 (roll in support for "const" keyword from KDE tree) - make processVarDecls handle deletability of variables declared in an eval block the same as evaluate would - make eval() call processVarDecls - needed to match mozilla and to make the second change testable Test cases only, fix is in JavaScriptCore Test cases added: * layout-tests/fast/js/const-expected.txt: Added. * layout-tests/fast/js/const.html: Added. * layout-tests/fast/js/eval-var-decl-expected.txt: Added. * layout-tests/fast/js/eval-var-decl.html: Added. 2005-06-20 Maciej Stachowiak <mjs@apple.com> Patch from Mark Rowe <opendarwin.org@bdash.net.nz>, reviewed by me. - fixed http://bugzilla.opendarwin.org/attachment.cgi?id=2483 Test cases added: * layout-tests/fast/js/hasOwnProperty-expected.txt: Added. * layout-tests/fast/js/hasOwnProperty.html: Added. - also fixed two mozilla JS tests * khtml/ecma/kjs_binding.h: * khtml/ecma/kjs_css.cpp: (KJS::DOMCSSStyleDeclaration::hasOwnProperty): * khtml/ecma/kjs_css.h: * khtml/ecma/kjs_dom.cpp: (KJS::DOMNodeList::hasOwnProperty): (KJS::DOMNamedNodeMap::hasOwnProperty): * khtml/ecma/kjs_dom.h: * khtml/ecma/kjs_html.cpp: (KJS::HTMLDocument::hasOwnProperty): (KJS::KJS::HTMLElement::hasOwnProperty): (KJS::KJS::HTMLCollection::hasOwnProperty): * khtml/ecma/kjs_html.h: * khtml/ecma/kjs_window.cpp: (KJS::Window::hasOwnProperty): (KJS::Konqueror::hasOwnProperty): * khtml/ecma/kjs_window.h: 2005-06-20 Geoffrey Garen <ggaren@apple.com> Changes by Darin. Layout tests by me. Reviewed by me. Fixed <rdar://problem/4152454> crash in KJS::ExprStatementNode::execute(KJS::ExecState*) in World Clock widget with TOT. Test cases added: * layout-tests/fast/dom/gc-4-expected.txt: Added. * layout-tests/fast/dom/gc-4.html: Added. * khtml/ecma/kjs_html.cpp: (KJS::Context2D::mark): mark now (1) checks for NULL pointers and (2) calls mark on its parent class (DOMObject::mark). 2005-06-19 Darin Adler <darin@apple.com> Changes by both Anders Carlsson and me. Reviewed by Maciej and me. Test cases added: * layout-tests/fast/forms/element-order-expected.txt: Added. * layout-tests/fast/forms/element-order.html: Added. - fixed <http://bugzilla.opendarwin.org/show_bug.cgi?id=3503> form.elements[] not order-preserving when elements added via DOM * khtml/html/html_formimpl.h: Added formElementIndex. * khtml/html/html_formimpl.cpp: (DOM::insertIntoVector): Added. (DOM::HTMLFormElementImpl::formElementIndex): Added. Computes an appropriate index for a form element, given the document position relative to the other elements. (DOM::HTMLFormElementImpl::registerFormElement): Use formElementIndex to determine where to insert the element in the formElements array. 2005-06-19 Darin Adler <darin@apple.com> Changes by Anders Carlsson and me. Reviewed by Maciej and me. Test cases added: None. Could not figure out how to automate a test without making enhancements to DumpRenderTree. - fixed <rdar://problem/4141141> Onselect event is ignored with TEXTAREA and INPUT also <http://bugzilla.opendarwin.org/show_bug.cgi?id=3256> * khtml/html/html_formimpl.cpp: (DOM::HTMLTextAreaElementImpl::select): Remove unneeded explicit call to onSelect() here -- now handled by the renderer. * khtml/rendering/render_form.h: Added declarations as needed below. * khtml/rendering/render_form.cpp: (RenderFormElement::slotSelectionChanged): Add base class implementation that does nothing. (RenderLineEdit::RenderLineEdit): Connect the selection changed signal to our slot. (RenderLineEdit::slotSelectionChanged): Call onSelect when selection changes to something that's a selection (not a caret). (RenderTextArea::RenderTextArea): Connect as above. (RenderTextArea::slotSelectionChanged): Call as above. * kwq/KWQLineEdit.h: Added declarations as needed below. * kwq/KWQLineEdit.mm: (QLineEdit::QLineEdit): Added selectionChanged signal. (QLineEdit::hasSelectedText): Added. * kwq/KWQSlot.mm: (KWQSlot::KWQSlot): Make selectionChanged work on any form element. (KWQSlot::call): ditto. * kwq/KWQTextArea.h: Added hasSelection method. * kwq/KWQTextArea.mm: (-[KWQTextArea textViewDidChangeSelection:]): Added. Sends selectionChanged signal, except if we're in the middle of gaining or losing first responder. (-[KWQTextArea hasSelection]): Added. (-[KWQTextAreaTextView becomeFirstResponder]): Added. Sets flag to tell us we're in a responder change (using a count to avoid trouble if we reenter). (-[KWQTextAreaTextView resignFirstResponder]): Ditto. (-[KWQTextAreaTextView inResponderChange]): Added. * kwq/KWQTextEdit.h: Added declarations as needed below. * kwq/KWQTextEdit.mm: (QTextEdit::QTextEdit): Added selectionChanged signal. (QTextEdit::hasSelectedText): Added. * kwq/KWQTextField.h: Added declarations as needed below. * kwq/KWQTextField.mm: (-[KWQTextFieldController initWithTextField:QLineEdit:]): Fixed up to do the right thing with the result of the init function we call. (-[KWQTextFieldController controlTextDidEndEditing:]): Removed call to setHasFocus:NO since it's a little too late by the time the control is called; now handled by the text view delegate methods below. (-[KWQTextFieldController hasSelection]): Added. (-[KWQTextFieldController setHasFocus:]): Sets the new hasFocusAndSelectionSet after new focus and selection are both set up. (-[KWQTextFieldController textViewDidChangeSelection:]): Added. Sends the selection changed signal. (-[KWQTextField initWithQLineEdit:]): Fixed up to do the right thing with the result of the init function we call. (-[KWQTextField textViewDidChangeSelection:]): Added. Calls super and then calls the controller. (-[KWQTextField textDidEndEditing:]): Added. Calls setHasFocus:NO and then calls super. (-[KWQSecureTextField initWithQLineEdit:]): Same as above, but for secure text fields. (-[KWQSecureTextField textViewDidChangeSelection:]): Ditto. (-[KWQSecureTextField textDidEndEditing:]): Ditto. (-[KWQSearchField initWithQLineEdit:]): Same as above, but for search fields. (-[KWQSearchField textViewDidChangeSelection:]): Ditto. (-[KWQSearchField textDidEndEditing:]): Ditto. (-[KWQTextFieldFormatter init]): Fixed up to do the right thing with the result of the init function we call. 2005-06-18 Darin Adler <darin@apple.com> Changes by Anders Carlsson. Reviewed by me. Test cases added: * layout-tests/fast/dom/css-dom-read-expected.txt: Added. * layout-tests/fast/dom/css-dom-read.html: Added. - fixed <http://bugzilla.opendarwin.org/show_bug.cgi?id=3534> CSSMutableStyleDeclarationImpl::item is unimplemented * khtml/css/css_valueimpl.cpp: (DOM::CSSMutableStyleDeclarationImpl::item): Get the style from the m_values list. 2005-06-18 Darin Adler <darin@apple.com> - undid a last minute change I made that broke a patch I landed (layout tests caught the mistake, all should work again now) * khtml/html/html_formimpl.cpp: (DOM::HTMLLabelElementImpl::formElement): Don't include this when iterating. (DOM::HTMLLegendElementImpl::formElement): Ditto. 2005-06-18 Darin Adler <darin@apple.com> - removing the applet tests, since they are causing other tests to fail * layout-tests/fast/replaced/applet-hspace-expected.txt: Removed. * layout-tests/fast/replaced/applet-hspace.html: Removed. * layout-tests/fast/replaced/applet-vspace-expected.txt: Removed. * layout-tests/fast/replaced/applet-vspace.html: Removed. * layout-tests/fast/replaced/resources/applet.class: Removed. * layout-tests/fast/replaced/resources/applet.java: Removed. 2005-06-18 Darin Adler <darin@apple.com> Changes by Anders Carlsson. Reviewed by me. Test cases added: * layout-tests/fast/dom/resources/script3.js: Added. * layout-tests/fast/dom/resources/script4.js: Added. * layout-tests/fast/dom/resources/script5.js: Added. * layout-tests/fast/dom/script-add-expected.txt: Added. * layout-tests/fast/dom/script-add.html: Added. - fixed <http://bugzilla.opendarwin.org/show_bug.cgi?id=3526> improve support for dynamically added <script> elements * khtml/html/html_headimpl.h: Added override of childrenChanged, new evaluateScript function, and m_evaluated boolean. * khtml/html/html_headimpl.cpp: (HTMLScriptElementImpl::HTMLScriptElementImpl): Init m_evaluated to false. (HTMLScriptElementImpl::childrenChanged): Added code to evaluate the script the first time a child is added (except for nodes created by parsing). (HTMLScriptElementImpl::insertedIntoDocument): Refactored to use the new text and evaluateScript functions. Also changed to not try to evaluate the script if the element is entirely empty. This allows you to declare an empty <script> element and fill the content in later using DHTML. (HTMLScriptElementImpl::notifyFinished): Refactored to use the new evaluateScript function. (HTMLScriptElementImpl::evaluateScript): Added. Checks and sets a new m_evaluated boolean to implement the "evaluate each script only once" rule. (HTMLScriptElementImpl::text): Replaced bogus implementation with one that works. (HTMLScriptElementImpl::setText): Ditto. * khtml/dom/html_head.cpp: (HTMLScriptElement::text): Replaced bogus implementation with one that calls through to the implementation class. This change doesn't really matter since we don't compile this file. (HTMLScriptElement::setText): Ditto. 2005-06-18 Darin Adler <darin@apple.com> * khtml/html/html_formimpl.cpp: (DOM::HTMLLabelElementImpl::formElement): Oops, checked in a version that didn't even compile! Fixed now. 2005-06-18 Darin Adler <darin@apple.com> Changes by Anders Carlsson. Reviewed by me. Test cases added: * layout-tests/fast/forms/focus-expected.txt: Added. * layout-tests/fast/forms/focus.html: Added. * layout-tests/fast/forms/legend-access-key-expected.txt: Added. * layout-tests/fast/forms/legend-access-key.html: Added. - fixed <rdar://problem/3481846> HTML4: accesskey not supported by HTML legend elements also <http://bugzilla.opendarwin.org/show_bug.cgi?id=3407> - added focus methods for <label> and <legend> elements - fixed crash when using JavaScript-created events that prevented tests from running * khtml/ecma/kjs_html.h: Added focus methods. * khtml/ecma/kjs_html.cpp: (KJS::KJS::HTMLElementFunction::tryCall): Added bindings for focus for <label> and <legend>. (Sorry about the merging, Dave.) * khtml/html/html_formimpl.h: Added new functions. * khtml/html/html_formimpl.cpp: (DOM::HTMLLabelElementImpl::focus): Added. (DOM::HTMLLegendElementImpl::formElement): Added. (DOM::HTMLLegendElementImpl::focus): Added. (DOM::HTMLLegendElementImpl::accessKeyAction): Added. * khtml/xml/dom_docimpl.cpp: (DocumentImpl::defaultEventHandler): If there's no QKeyEvent, then get the key name from keyIdentifier() instead of the QKeyEvent's unmodifiedText(). The old code would just do a nil-deref. 2005-06-18 Darin Adler <darin@apple.com> Change by Niels Leenheer (also done by Dave Hyatt on stage at WWDC). Reviewed by me. Test cases added: * layout-tests/fast/replaced/object-align-hspace-vspace-expected.txt: Added. * layout-tests/fast/replaced/object-align-hspace-vspace.html: Added. * layout-tests/fast/replaced/resources/webkit-background.png: Added. * khtml/html/html_objectimpl.cpp: (DOM::HTMLObjectElementImpl::mapToEntry): Add cases for ATTR_ALIGN, ATTR_VSPACE and ATTR_HSPACE. (DOM::HTMLObjectElementImpl::parseMappedAttribute): Ditto. 2005-06-18 Darin Adler <darin@apple.com> Change by Niels Leenheer (also done by Dave Hyatt on stage at WWDC). Reviewed by me. Test cases added: * layout-tests/fast/replaced/applet-hspace-expected.txt: Added. * layout-tests/fast/replaced/applet-hspace.html: Added. * layout-tests/fast/replaced/applet-vspace-expected.txt: Added. * layout-tests/fast/replaced/applet-vspace.html: Added. * layout-tests/fast/replaced/resources/applet.class: Added. * layout-tests/fast/replaced/resources/applet.java: Added. - fixed <http://bugzilla.opendarwin.org/show_bug.cgi?id=3246> HSPACE and VSPACE attributes are ignored in APPLET element * khtml/html/html_objectimpl.cpp: (DOM::HTMLAppletElementImpl::mapToEntry): Add cases for ATTR_VSPACE and ATTR_HSPACE. (DOM::HTMLAppletElementImpl::parseMappedAttribute): Ditto. 2005-06-18 Darin Adler <darin@apple.com> - removed some unused code from one of the KWQ headers * kwq/KWQKHTMLPartBrowserExtension.h: - added a layout test for a bug that's already fixed * layout-tests/fast/forms/element-by-name-expected.txt: Added. * layout-tests/fast/forms/element-by-name.html: Added. 2005-06-17 Vicki Murley <vicki@apple.com> Reviewed by Maciej. Test cases added: None, since this test requires manual interaction. - fixed <rdar://problem/4086793> Selects wrapped by Span or Label elements do not resize when options are added via javascript * khtml/rendering/render_form.cpp: (RenderSelect::layout): Remove call setting setNeedsLayout to true. setNeedsLayout is already true at this point, and this additional call has the negative effect of marking m_normalChildNeedsLayout on the element's parent, which keeps layout from propagating all the way up to the root later on. 2005-06-17 Justin Garcia <justin.garcia@apple.com> Fix for rdar://3756860, (also listed as) http://bugzilla.opendarwin.org/show_bug.cgi?id=3295 The cellIndex property for HTMLTableCellElement was always zero because the method to support it was just a stub. KHTML fix was to simply call nodeIndex(), but this is incorrect because a table row can have as children <script>s and <form>s (and perhaps others). Reviewed by hyatt and john Test cases added: * layout-tests/fast/table/cellindex.html: Added. Illustrates the fix. * khtml/html/html_tableimpl.cpp: (DOM::HTMLTableCellElementImpl::cellIndex): Iterate through siblings only counting <th> and <td> elements * khtml/html/html_tableimpl.h: 2005-06-17 Adele Peterson <adele@apple.com> Reviewed by Maciej. - fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=3419 <rdar://problem/4111752> REGRESSION (125-312/412): Safari doesn't display edmunds.com pages first time through * khtml/html/htmltokenizer.cpp: (khtml::HTMLTokenizer::parseTag): set 'script' flag when parsing <script src="foo" /> case. In this case, parseTag calls the scriptHandler function which expects that flag to be set, and sets it back to false at the appropriate time. Test cases added: These still don't test the cached script cases, but they're good regression tests for the tokenizer. We'll have to come up with a good way to test the cached cases later. * layout-tests/fast/tokenizer/external-script-document-write_2-expected.txt: Added. * layout-tests/fast/tokenizer/external-script-document-write_2.html: Added. * layout-tests/fast/tokenizer/resources/empty_script.js: Added. * layout-tests/fast/tokenizer/script_extra_close-expected.txt: Added. * layout-tests/fast/tokenizer/script_extra_close.html: Added. * layout-tests/fast/tokenizer/script_quirk-expected.txt: Added. * layout-tests/fast/tokenizer/script_quirk.html: Added. 2005-06-17 Justin Garcia <justin.garcia@apple.com> Fixed fprintf problem in gcc4.0 Reviewed by Darin Test cases added: See previous ChangeLog entry * khtml/xml/dom_nodeimpl.cpp: (NodeImpl::showTreeAndMark): Fixed fprintf warning in gcc4 2005-06-17 Geoffrey Garen <ggaren@apple.com> Patch contributed by Anders Carlsson<andersca@mac.com>. Fixes: http://bugzilla.opendarwin.org/show_bug.cgi?id=3408 Reviewed by Darin. Test cases added: None. Test requires manual interaction. Manual test available at: http://bugzilla.opendarwin.org/attachment.cgi?id=2207 * khtml/html/html_formimpl.cpp: Eliminated HTMLButtonElementImpl::click. HTMLButtonElementImpl now inherits HTMLElementImpl::click. * khtml/html/html_formimpl.h: Ditto. 2005-06-17 Darin Adler <darin@apple.com> Reviewed by John. - fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=3556 black diamond question mark shown for invalid UTF-8 sequences Test cases added: * layout-tests/fast/encoding/invalid-UTF-8-expected.txt: Added. * layout-tests/fast/encoding/invalid-UTF-8.html: Added. * kwq/KWQTextCodec.mm: (unwanted): Added. Returns true for BOM, replacement, and null characters. (KWQTextDecoder::appendOmittingUnwanted): Renamed from appendOmittingNullsAndBOMs and changed to use the new "unwanted" function, which causes it to omit replacement characters. (KWQTextDecoder::convertUsingTEC): Call append function by its new name. 2005-06-16 Justin Garcia <justin.garcia@apple.com> Added a few debugging methods to highlight Selections, VisiblePositions and Nodes in the DOM tree. Reviewed by Dave Harrison Test cases added: None, changes are only to aid debugging * khtml/editing/selection.cpp: (khtml::Selection::showTree): * khtml/editing/selection.h: * khtml/editing/visible_position.cpp: (khtml::VisiblePosition::showTree): * khtml/editing/visible_position.h: * khtml/xml/dom_nodeimpl.cpp: (NodeImpl::showNode): (NodeImpl::showTree): (NodeImpl::showTreeAndMark): * khtml/xml/dom_nodeimpl.h: 2005-06-14 David Hyatt <hyatt@apple.com> Add an initial implementation of QualifiedName and HTMLNames. These classes are not used by anyone yet. Progress being recorded in bugzilla bug 3405. Reviewed by mjs Test cases added: (None, does not affect build yet) * WebCore.pbproj/project.pbxproj: * khtml/xml/dom_qname.h,.cpp * khtml/html/htmlnames.h,.cpp 2005-06-14 David Hyatt <hyatt@apple.com> The behavior of <pre> is broken so that the newline is not always properly being eaten after the open of the tag. In addition we were eating the first newline after all other tags. This patch stops eating newlines after other tags and refines the behavior for pre to catch all cases. Reviewed by sullivan Test cases added: fast/text/whitespace/030.html * khtml/html/htmltokenizer.cpp: (khtml::HTMLTokenizer::parseTag): (khtml::HTMLTokenizer::write): 2005-06-13 Vicki Murley <vicki@apple.com> Reviewed by Darin. No test cases added since the steps to reproduce require use of showModalDialog. - fix for <rdar://problem/4145910> parameters not working in showModalDialog test page (dialogWidth, dialogHeight, etc.) * khtml/ecma/kjs_window.cpp: (KJS::parseFeatures): add a check for colon character in the feature string 2005-06-13 Maciej Stachowiak <mjs@apple.com> Reviewed by Chris Blumenberg and Adele. - better fix for <rdar://problem/4142247> REGRESSION: List to browse widgets at Apple website failed. Closing tab afterwards caused Safari crash http://bugzilla.opendarwin.org/show_bug.cgi?id=3445 With this change and the matching WebKit change we'll still stop loading the moment you click a download link, but the unload event and detaching of event handlers will not happen early any more. * khtml/khtml_part.cpp: (KHTMLPart::stopLoading): Factored out from closeURL, make firing of unload and detaching of event handlers optional. (KHTMLPart::closeURL): call stopLoading(true) * khtml/khtml_part.h: * kwq/WebCoreBridge.h: * kwq/WebCoreBridge.mm: (-[WebCoreBridge stopLoading]): Call stopLoading(false). 2005-06-13 Maciej Stachowiak <mjs@apple.com> Patch from Andrew Wellington <proton@wiretapped.net> Reviewed by me. - fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=3302 (Safari crashes when going to acid2 test page once it's in cache) No test cases addded since the repro steps require use of tabbed browsing. * khtml/khtml_part.cpp: (KHTMLPart::handleFallbackContent): check for nil 2005-06-12 Darin Adler <darin@apple.com> - added expected test results for new tests * layout-tests/fast/selectors/159-expected.txt: Added. * layout-tests/fast/selectors/177a-expected.txt: Added. * layout-tests/fast/selectors/177b-expected.txt: Added. 2005-06-11 Maciej Stachowiak <mjs@apple.com> Patch from Nicholas Shanks <contact@nickshanks.com>, reviewed by me. - Distinguish between pseudo-elements and pseudo-classes in CSS parsing. http://bugzilla.opendarwin.org/show_bug.cgi?id=3375 Merge of svn log -v -r 399829 svn://anonsvn.kde.org/home/kde Test cases added: Added the following from CSS selector test suite, unfortunately 159 and 117a do not show any difference with and without the patch since layout tests do not dump selection style (yet). * layout-tests/fast/selectors/159.html: Added. * layout-tests/fast/selectors/177a.html: Added. * layout-tests/fast/selectors/177b.html: Added. * khtml/css/css_base.cpp: (CSSSelector::specificity): (CSSSelector::extractPseudoType): (CSSSelector::selectorText): * khtml/css/css_base.h: (DOM::CSSSelector::): (DOM::CSSSelector::pseudoType): * khtml/css/cssstyleselector.cpp: (khtml::CSSStyleSelector::checkSelector): (khtml::CSSStyleSelector::checkOneSelector): * khtml/css/parser.y: 2005-06-11 Maciej Stachowiak <mjs@apple.com> Patch from Timothy Hatcher <timothy@colloquy.info>, reviewed by me. Test cases added: * layout-tests/fast/dom/children-nodes-expected.txt: Added. * layout-tests/fast/dom/children-nodes.html: Added. * khtml/html/html_miscimpl.cpp: (DOM::HTMLCollectionImpl::traverseNextItem): For "children" collection, use nextSibling() instead of traverseNextNext() to avoid doing deep traversal. 2005-06-11 Maciej Stachowiak <mjs@apple.com> Added missing expected results from the background image patch. * layout-tests/fast/backgrounds/001-expected.txt: Added. 2005-06-10 David Hyatt <hyatt@apple.com> Fix for bugzilla bug 3335, add support for the CSS3 indirect adjacent sibling selector. Patch merge from KHTML tree by Nick Shanks. Reviewed by hyatt Test cases added: fast/selectors/046.html * khtml/css/css_base.cpp: (CSSSelector::selectorText): * khtml/css/css_base.h: (DOM::CSSSelector::): * khtml/css/cssstyleselector.cpp: (khtml::CSSStyleSelector::checkSelector): * khtml/css/parser.y: * layout-tests/fast/selectors/046-expected.txt: Added. * layout-tests/fast/selectors/046.html: Added. 2005-06-10 David Hyatt <hyatt@apple.com> Fix for 3237, background image repeats when it shouldn't. The Radar bug is 4005553. Patch from Nate Cook. Reviewed by darin and hyatt Test cases added: fast/backgrounds/001.html * khtml/rendering/render_box.cpp: (RenderBox::paintBackgroundExtended): * layout-tests/fast/backgrounds/001.html: Added. 2005-06-10 David Hyatt <hyatt@apple.com> Merge Allan Jensen's fix for 3236. Reviewed by hyatt Test cases added: None, test case already added for the bug. * khtml/css/cssstyleselector.cpp: (khtml::CSSStyleSelector::applyProperty): * khtml/rendering/render_style.cpp: (RenderStyle::setContent): 2005-06-10 Darin Adler <darin@apple.com> Change by Mark Rowe <opendarwin.org@bdash.net.nz>. Refined and reviewed by me. - test for exception file/line number fix http://bugzilla.opendarwin.org/show_bug.cgi?id=3327 * layout-tests/fast/js/exception-linenums-expected.txt: Added. * layout-tests/fast/js/exception-linenums.html: Added. 2005-06-09 David Hyatt <hyatt@apple.com> Fix from Carston Guenther for bugzilla bug 3236. attr(x) should work even if x is not present on the element. This is Radar bug #3584466 Reviewed by hyatt Test cases added: fast/css-generated-content/013.html * khtml/css/cssstyleselector.cpp: (khtml::CSSStyleSelector::applyProperty): * layout-tests/fast/css-generated-content/013-expected.txt: Added. * layout-tests/fast/css-generated-content/013.html: Added. 2005-06-09 Darin Adler <darin@apple.com> Tested by Mark Rowe. * layout-tests/fast/js/date-parse-test.html: Updated this test to use a time zone offset for one of the test cases that's time zone dependent; was working in CA, US, failing in NZ. 2005-06-08 Anders Carlsson <andersca@mac.com> Reviewed and committed by Maciej. - fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=3337 (Support the Mozilla DOMParser and XMLSerializer objects) <rdar://problem/3533735> implement Mozilla "DOMParser" extension for use with XMLHTTPRequest Test cases added: * layout-tests/fast/dom/dom-parse-serialize-display-expected.txt: Added. * layout-tests/fast/dom/dom-parse-serialize-display.html: Added. * layout-tests/fast/dom/dom-parse-serialize-expected.txt: Added. * layout-tests/fast/dom/dom-parse-serialize.html: Added. * khtml/ecma/domparser.h: * khtml/ecma/domparser.cpp: Add files implementing the DOMParser object. * khtml/ecma/kjs_window.h: * khtml/ecma/kjs_window.cpp: Expose DOMParser object. 2005-06-07 David Hyatt <hyatt@apple.com> Patch from Brian Campbell. Make sure the min and max values of slider properly update. Fixes bugilla bug 3323, internal Radar # is 4098892. Reviewed by hyatt Test cases added: (Not testable with a layout test) * kwq/KWQSlider.mm: (QSlider::setMinValue): (QSlider::setMaxValue): 2005-06-07 Adele Peterson <adele@apple.com> Change by Darin, reviewed by Maciej and me. - fixed <rdar://problem/4139800> REGRESSION: Safari crashes at bebe.com There were cases where the DOMNode mark function would end up not even marking the node that it was called on. The old code tried to skip any subtrees that were already marked, but that code was wrong. * khtml/ecma/kjs_dom.cpp: (KJS::DOMNode::mark): Changed three things: 1) Instead of a boolean, keep a set of trees that we are marking, that prevents problems if we mark things that have references between separate trees of DOM nodes. 2) Don't do the "outermost node with a wrapper" check, just start marking at the root of the entire tree, because there's no way to have an unreachable node pointing to a reachable node. 3) Handle the unusual case where the document's wrapper dictionary is gone by marking just this node explicitly. This passes the layout tests, still fixes the Dashboard memory leak from bug 4125222, and makes bebe.com work again. 2005-06-07 Darin Adler <darin@apple.com> Change by Toby Peterson <toby@opendarwin.org>. Reviewed by me. * WebCore.pbproj/project.pbxproj: Allow bison 2.0, which generates the file with a different name. 2005-06-07 Darin Adler <darin@apple.com> Change by Mark Rowe <opendarwin.org@bdash.net.nz>. Reviewed by me. - fixed the WebCore half of build failure with spaces in the path http://bugzilla.opendarwin.org/show_bug.cgi?id=3291 * WebCore.pbproj/project.pbxproj: Add quotes to make LIBRARY_SEARCH_PATHS work even when the path has a space in it. 2005-06-07 David Hyatt <hyatt@apple.com> Patch from Mark Rowe to fix a minor memory leak in WebCoreSettings. Reviewed by hyatt * kwq/WebCoreSettings.mm: (-[WebCoreSettings dealloc]): 2005-06-04 Darin Adler <darin@apple.com> Reviewed by Maciej. - import icu headers into project * WebCore.pbproj/project.pbxproj: Added icu directory to header search path. * icu/README: Added. * icu/unicode/parseerr.h: Added. * icu/unicode/platform.h: Added. * icu/unicode/putil.h: Added. * icu/unicode/ubrk.h: Added. * icu/unicode/uchar.h: Added. * icu/unicode/uconfig.h: Added. * icu/unicode/uenum.h: Added. * icu/unicode/uidna.h: Added. * icu/unicode/uiter.h: Added. * icu/unicode/uloc.h: Added. * icu/unicode/umachine.h: Added. * icu/unicode/urename.h: Added. * icu/unicode/ustring.h: Added. * icu/unicode/utf.h: Added. * icu/unicode/utf16.h: Added. * icu/unicode/utf8.h: Added. * icu/unicode/utf_old.h: Added. * icu/unicode/utypes.h: Added. * icu/unicode/uversion.h: Added. 2005-06-01 Darin Adler <darin@apple.com> Reviewed by John Sullivan. No layout tests added because showModalDialog won't work in DumpRenderTree at the moment. - WebKit part of fix for <rdar://problem/3166090> add IE JavaScript extension window.showModalDialog * khtml/ecma/kjs_window.cpp: (KJS::allowPopUp): Added. Used by showModalDialog now and should be used by window.open later. (KJS::parseFeatures): Ditto. (KJS::boolFeature): Ditto. (KJS::intFeature): Ditto. (KJS::createNewWindow): Ditto. (KJS::canShowModalDialog): Added. (KJS::canShowModalDialogNow): Added. (KJS::showModalDialog): Added. (KJS::Window::get): Return the showModalDialog function object if the extension can run modal. (KJS::Window::clear): Add code to store the return value for the case where the window is a modal dialog. (KJS::WindowFunc::tryCall): Add the call to the showModalDialog function. * khtml/ecma/kjs_window.h: Add setReturnValueSlot function so showModalDialog can get the return value from the dialog it creates. Also add a data member to keep track of the pointer and a constant for the ShowModalDialog method. * khtml/khtml_part.h: Added new changeLocation member function. Made setOpener, openedByJS, and setOpenedByJS public. * khtml/khtml_part.cpp: (KHTMLPart::changeLocation): Broke out the part of slotRedirect that actually does the location change into a separate function so it can be called when needed. The case using it now is to load the content of a new window in KJS::createNewWindow. (KHTMLPart::slotRedirect): Call changeLocation to do most of the work. (KHTMLPart::urlSelected): Fixed a broken case where the "lack of referrer" in a new window would cause the referrer passed in by JavaScript to be ignored when opening a new window -- match logic elsewhere that leaves the referrer in the args alone if one is not set in the window. * khtml/khtmlpart_p.h: Initialize m_bCleared to true to avoid an unnecessary clear before loading the first URL in a new window. This change is needed to avoid blowing away the "dialogArguments" value in a modal dialog window, but it also avoid unnecessary work for each new window. * kwq/KWQApplication.h: Add availableGeometry function for QDesktopWidget. Used by the showModalDialog function inside kjs_window.cpp (and should be used elsewhere eventually too). Matches a Qt function that we just didn't have implemented before. * kwq/KWQApplication.mm: (QDesktopWidget::availableGeometry): Added. * kwq/KWQKHTMLPartBrowserExtension.h: Added new canRunModal, canRunModalNow, and runModal functions. * kwq/KWQKHTMLPartBrowserExtension.mm: (KHTMLPartBrowserExtension::createNewWindow): Call createModalDialogWithURL on the bridge if the new window is a dialog. Also fixed the early return case for when the bridge returns nil. (KHTMLPartBrowserExtension::canRunModal): Added. Calls bridge. (KHTMLPartBrowserExtension::canRunModalNow): Ditto. (KHTMLPartBrowserExtension::runModal): Ditto. * kwq/KWQKPartsBrowserExtension.h: (KParts::URLArgs::URLArgs): Initialize m_lockHistory to false. (KParts::WindowArgs::WindowArgs): Add a dialog boolean. * kwq/WebCoreBridge.h: Declared canRunModal, canRunModalNow, createModalDialogWithURL, and runModal methods. 2005-06-01 Adele Peterson <adele@apple.com> fix for <rdar://problem/4135705> REGRESSION (412-TOT) crash in TV Tracker widget - KJS::XMLHttpRequest::removeFromRequestsByDocument() Reviewed by Darin. Synchronous loads don't get added to our requestsByDocument dictionary, so we should try to remove the request in this case. * khtml/ecma/xmlhttprequest.cpp: (KJS::XMLHttpRequest::removeFromRequestsByDocument): added checks to make sure request exists before trying to remove it. 2005-05-30 Darin Adler <darin@apple.com> Reviewed by John (fix for Radar bug) and Vicki (all the rest). - fixed <rdar://problem/4105097> REGRESSION (138-139): Hitting Enter on a checkbox toggles check mark instead of submitting form - fixed other problems discovered while trying to make a layout test to test this work: - added newer DOM 3 event type constants - fixed prototype setup bug preventing event initialization functions from being called - fixed bug where any function taking an event parameter would crash with a nil-deref - fixed incorrect ref/deref bug in MutationEventImpl that would cause a crash crash Test cases added: * layout-tests/fast/forms/check-box-enter-key-expected.txt: Added. * layout-tests/fast/forms/check-box-enter-key.html: Added. * layout-tests/fast/events/event-creation-expected.txt: Added. * layout-tests/fast/events/event-creation.html: Added. * khtml/html/html_formimpl.cpp: (DOM::HTMLInputElementImpl::defaultEventHandler): Separate the checks for the space bar and the Enter key and make Enter submit the form on a check box or radio button. * khtml/ecma/kjs_events.cpp: (KJS::toEvent): Fixed bug where this was checking for DOMNode rather than DOMEvent, so always returning 0. Without this, both test cases above will crash. (KJS::DOMUIEvent::DOMUIEvent): Set prototype; without this, the event-creation test case will fail. (KJS::DOMMouseEvent::DOMMouseEvent): Set prototype; without this, the event-creation test case will fail. (KJS::DOMKeyboardEvent::DOMKeyboardEvent): Set prototype; without this, both test cases above will fail. (KJS::DOMMutationEvent::DOMMutationEvent): Set prototype; without this, both test cases above will fail. * khtml/xml/dom2_eventsimpl.cpp: (MutationEventImpl::MutationEventImpl): Fix typo where the wrong object was ref'd. (MutationEventImpl::initMutationEvent): Ditto. This was causing the layout tests to crash with the new tests above. * khtml/xml/dom_docimpl.cpp: (DocumentImpl::createEvent): Added new event types to match the current DOM Level 3 specification. The test above tests both the new event types and the old ones. 2005-05-30 Darin Adler <darin@apple.com> Reviewed by John. No test case added because our layout test system doesn't allow us to do inline input. - fixed <rdar://problem/4094066> REGRESSION (1.2.5-1.3): unconfirmed inline input is ignored in <textarea>, lost when form is submitted * kwq/KWQTextArea.mm: (-[KWQTextArea _createTextView]): Call setWantsNotificationForMarkedText:YES. 2005-05-30 Maciej Stachowiak <mjs@apple.com> Reviewed by Darin. - fixed <rdar://problem/4125222> Dashboard heap size grows over time (leak caused by JavaScript DOM node wrappers?) - changed per-document DOMObject caching to work with DOMNodes, since that is all it was used for anyway. Test cases added: (these tests actually ensure that DOM wrappers are sufficiently protected from GC to match other browsers, they do not verify that the leak is fixed since there's no way to test that with layout tests). * layout-tests/fast/dom/gc-1-expected.txt: Added. * layout-tests/fast/dom/gc-1.html: Added. * layout-tests/fast/dom/gc-2-expected.txt: Added. * layout-tests/fast/dom/gc-2.html: Added. * layout-tests/fast/dom/gc-3-expected.txt: Added. * layout-tests/fast/dom/gc-3.html: Added. * khtml/ecma/kjs_binding.cpp: (KJS::ScriptInterpreter::forgetDOMObjectForDocument): New function - allows nodes that get removed from the document to go away from the cache if not referenced. (KJS::ScriptInterpreter::mark): Don't mark nodes that aren't in the document, they can stay in the cache but only if they have another source of life. (KJS::ScriptInterpreter::domNodesPerDocument): Renamed and changed parameter types. (KJS::ScriptInterpreter::getDOMNodeForDocument): Renamed and changed parameter types. (KJS::ScriptInterpreter::forgetDOMNodeForDocument): Renamed and changed parameter types. (KJS::ScriptInterpreter::putDOMNodeForDocument): Renamed and changed parameter types. (KJS::ScriptInterpreter::forgetAllDOMNodesForDocument): Renamed and changed parameter types. (KJS::ScriptInterpreter::updateDOMNodeDocument): Renamed and changed parameter types. * khtml/ecma/kjs_binding.h: * khtml/ecma/kjs_dom.cpp: (KJS::DOMNode::~DOMNode): call forgetDOMObjectForDocument. (KJS::DOMNode::mark): If the node is not in the document, make sure to mark all wrappers in its detached piece of the tree. (KJS::getDOMNode): Updated for renames * khtml/ecma/kjs_dom.h: * khtml/xml/dom_docimpl.cpp: (DocumentImpl::~DocumentImpl): Updated for renames. * khtml/xml/dom_nodeimpl.cpp: (NodeImpl::checkAddChild): Updated for renames. 2005-05-30 Darin Adler <darin@apple.com> Reviewed by John. Could not figure out how to make an <object> fallback, so for now, no layout test. - fixed <rdar://problem/4134124> REGRESSION (tip of tree): crash in QWidget::getView handling onunload event (yahoo.com) * khtml/html/html_objectimpl.cpp: (DOM::HTMLObjectElementImpl::getObjectInstance): Check type of RenderObject to be sure it is a RenderWidget before calling widget() on it. 2005-05-27 Adele Peterson <adele@apple.com> Change by Darin, reviewed by me. fix for <rdar://problem/4067761> 8A425: reload stock widget over and over and crash in XMLHttpRequest::changeState * khtml/khtml_part.cpp: (KHTMLPart::closeURL): now cancels XMLHttpRequests * khtml/ecma/xmlhttprequest.h: Added cancelRequests, addToRequestsByDocument, and RemoveFromRequestsByDocument methods. Added requestsByDocument dictionary. * khtml/ecma/xmlhttprequest.cpp: (KJS::XMLHttpRequest::send): calls addToRequestsByDocument (KJS::XMLHttpRequest::abort): calls removeFromRequestsByDocument (KJS::XMLHttpRequest::slotFinished): calls removeFromRequestsByDocument (KJS::XMLHttpRequest::requestsByDocument): creates dictionary to manage requests. (KJS::XMLHttpRequest::addToRequestsByDocument): adds this request to dict. (KJS::XMLHttpRequest::removeFromRequestsByDocument): removes this request from dict. (KJS::XMLHttpRequest::cancelRequests): goes and cancels requests in the doc 2005-05-27 Adele Peterson <adele@apple.com> Reviewed by me, done by Darin. - Darin fixed a regression I found from Darin's recent DOM change that broke GMail * khtml/ecma/kjs_window.cpp: (KJS::Window::get): Added nil check for document. (KJS::Window::hasProperty): Ditto. Test cases added: None (Darin should write one). 2005-05-27 Adele Peterson <adele@apple.com> Reviewed by Darin. fix for <rdar://problem/4121747> Cannot log into Cingular.com account page (load event delivered while still processing incoming data) * khtml/misc/loader.cpp: (DocLoader::DocLoader): Initialized m_loadInProgress to false. (DocLoader::setLoadInProgress): Added. (Loader::slotFinished): sets the m_loadInProgress flag to reflect the fact that we're not really done loading this request until we emit the signal with the request status. (Loader::numRequests): If there's a load in progress, we increment the number of requests so it doesn't seem like the load is done. * khtml/misc/loader.h: (khtml::DocLoader::loadInProgress): Added. Test cases added: * layout-tests/fast/loader/loadInProgress.html: Added * layout-tests/fast/loader/loadInProgress-expected.html: Added 2005-05-27 Darin Adler <darin@apple.com> Reviewed by Vicki. - fixed <rdar://problem/4125212> form submission delayed until you are on the next page on XML/XSL page (security hole) * khtml/xsl/xslt_processorimpl.cpp: (DOM::XSLTProcessorImpl::documentFromXMLDocPtr): Call setParsing(false) explicitly here. It's really annoying that setParsing(true) is done inside DOM::DocumentImpl and setParsing(false) is done by KHTMLPart, so that should be fixed some day, but for now this is the way to do it. Test cases added: * layout-tests/fast/events/xsl-onload-expected.txt: Added. * layout-tests/fast/events/xsl-onload.xhtml: Added. * layout-tests/fast/events/xsl-onload.xsl: Added. 2005-05-27 John Sullivan <sullivan@apple.com> Reviewed by Darin * WebCore-tests.exp: took out symbol __ZNK5QChar7isPunctEv; it was obsolete and causing build trouble 2005-05-27 Darin Adler <darin@apple.com> Reviewed by Adele. - remove HAVE_ICU_LIBRARY ifdefs * khtml/rendering/render_text.cpp: Just use ICU all the time; no ifdef. * kwq/KWQKURL.mm: Ditto. 2005-05-26 Darin Adler <darin@apple.com> Reviewed by me, patch by Mitz Pettel. - fixed <rdar://problem/4106907> bidi algorithm bug fixed for KHTML should be fixed in WebCore too * khtml/rendering/bidi.cpp: (khtml::RenderBlock::bidiReorderLine): Integrated the patch that Mitz did for the KDE bug, details at <http://www.mitzpettel.com/software/WebCorePatch2.html>. Test cases added: * layout-tests/fast/text/international/bidi-neutral-directionality-paragraph-start-expected.txt: Added. * layout-tests/fast/text/international/bidi-neutral-directionality-paragraph-start.html: Added. 2005-05-26 Darin Adler <darin@apple.com> Reviewed by Richard and Dave Harrison. No new test cases needed for this change. - eliminate WebCoreUnicode and use ICU directly instead - fixed compiling with gcc 4.0 (was broken for Development only) * WebCore.exp: Removed the WebCoreXXXFunction exports. * WebCore-tests.exp: Removed some QChar functions that are now inlines. Removed some typeinfo exports that are no longer appropriate since we use -fno-rtti. * kwq/KWQString.h: (QChar::isDigit): Changed to call u_isdigit when non-ASCII. We should probably phase this out since it's only used in places where we don't want to handle non-ASCII decimal digits. (QChar::isLetter): Changed to call u_isalpha when non-ASCII. (QChar::isNumber): Changed to call u_isdigit when non-ASCII. This probably should be removed, since we always want to call isDigit instead. (QChar::isLetterOrNumber): Changed to call u_isalnum when non-ASCII. (QChar::isPunct): Changed to call u_ispunct when non-ASCII. (QChar::digitValue): Changed to call u_charDigitValue when not '0'-'9'. We should probably phase this out since it's only used in places where we don't want to handle non-ASCII decimal digits. (QChar::lower): Changed to call u_tolower when non-ASCII. (QChar::upper): Changed to call u_toupper when non-ASCII. (QChar::direction): Made inline. Calls u_charDirection. (QChar::mirrored): Made inline. Calls u_isMirrored. (QChar::mirroredChar): Made inline. Calls u_charMirror. * kwq/KWQChar.mm: Removed. * kwq/WebCoreUnicode.cpp: Removed. * kwq/WebCoreUnicode.h: Removed. * WebCore.pbproj/project.pbxproj: Removed files. 2005-05-26 David Harrison <harrison@apple.com> Reviewed by John. <rdar://problem/4120518> Mail: control-T in an empty message crashes mail * kwq/WebCoreBridge.mm: (-[WebCoreBridge rangeOfCharactersAroundCaret]): Nil-check result of VisiblePosition previous() and next(). * khtml/editing/visible_position.cpp: (khtml::VisiblePosition::previous): (khtml::VisiblePosition::previousVisiblePosition): Make sure previous() does not return the original position. Also, simplified. Commented odd, but required, behavior in previousVisiblePosition(). * khtml/editing/visible_units.cpp: (khtml::startOfEditableContent): (khtml::endOfEditableContent): Removed redundant check for isEditableContent(). * khtml/editing/jsediting.cpp: * khtml/khtml_part.cpp: (KHTMLPart::transpose): * khtml/khtml_part.h: * kwq/KWQKHTMLPart.h: * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::issueTransposeCommand): * layout-tests/editing/editing.js: * kwq/WebCoreBridge.h: Add support for transpose command in JavaScript and therefore layout tests. * layout-tests/editing/deleting/transpose-empty-expected.txt: Added. * layout-tests/editing/deleting/transpose-empty.html: Added. New test for this bug. 2005-05-24 Richard Williamson <rjw@apple.com> Fixed <rdar://problem/4127061> <canvas> backing store should be zero filled Use calloc instead of malloc to ensure zero filled backing store. Reviewed by Darin. * khtml/rendering/render_canvasimage.cpp: (RenderCanvasImage::createDrawingContext): 2005-05-24 John Sullivan <sullivan@apple.com> Reviewed by Dave Hyatt. - fixed these bugs: <rdar://problem/4118510> Textareas with a vertical scroll bar should have their resize corner under the scroll bar <rdar://problem/4118523> Resize image in textareas is drawn repeatedly when scrolling vertically with scrollbar Test cases added: none; doesn't affect page layout * kwq/KWQTextArea.h: added inInitWithFrame ivar * kwq/KWQTextArea.mm: (+[KWQTextArea _resizeCornerImage]): moved here from KWQTextAreaTextView; now it's a class method so we only look up the image once. (-[KWQTextArea initWithFrame:]): set and clear inInitWithFrame ivar, used by -tile (-[KWQTextArea _isResizableByUser]): renamed with an underscore for consistency (-[KWQTextArea _textViewShouldHandleResizing]): new method, returns YES if the textarea is user-resizable and the enclosed textview is responsible for drawing and tracking the resize corner. (-[KWQTextArea tile]): shrink the vertical scroller if appropriate to account for the resize corner (-[KWQTextArea _resizeCornerRect]): new method, returns the bottom-right corner rect, where the resize image goes (-[KWQTextArea _trackResizeFromMouseDown:]): moved here from KWQTextAreaTextView. The only changes were to move the [NSCursor set] call inside here (was in the caller), and to use self where it was using [self _enclosingTextArea], and to move a comment in here that was in the caller (-[KWQTextArea mouseDown:]): track resizing if appropriate (-[KWQTextArea drawRect:]): draw the resize corner if appropriate (-[KWQTextAreaTextView _resizeCornerRect]): get the resize image from KWQTextArea (-[KWQTextAreaTextView resetCursorRects]): check _textViewShouldHandleResizing (-[KWQTextAreaTextView drawRect:]): ditto (-[KWQTextAreaTextView mouseDown:]): ditto; also, make the textarea handle the resize tracking now 2005-05-24 Darin Adler <darin@apple.com> - another gcc 4.0 fix No new test cases needed. * khtml/dom/dom2_events.cpp: Moved constants out of the KHTML_NO_CPLUSPLUS_DOM #if. 2005-05-24 Darin Adler <darin@apple.com> Reviewed by Vicki. - fixed <rdar://problem/4128727> many DOM classes not exported (can't add categories or do other things that require class name linking) No new test cases needed. * WebCore.exp: Added exports for many classes in the public DOM headers that were omitted before. Also removed one symbol that was listed twice. 2005-05-24 Maciej Stachowiak <mjs@apple.com> Reviewed by John. - fixed <rdar://problem/3598589> onunload handler doesn't fire when a window is closed Test cases added: * layout-tests/fast/events/onunload-expected.txt: Added. * layout-tests/fast/events/onunload.html: Added. * khtml/xml/dom_docimpl.cpp: (DocumentImpl::detach): Don't remove all event handlers from the document here... * khtml/khtml_part.cpp: (KHTMLPart::closeURL): ...instead do it here, after firing the unload event, but only if the document is not in the back/forward cache... * kwq/KWQPageState.mm: (-[KWQPageState finalize]): ...and take care of the back/forward cache case here. 2005-05-24 John Sullivan <sullivan@apple.com> Reviewed by Kevin. - WebCore part of <rdar://problem/4125783> WebKit needs a way to control whether textareas are resizable * kwq/KWQKHTMLSettings.h: (KHTMLSettings::textAreasAreResizable): new getter (KHTMLSettings::setTextAreasAreResizable): new setter * kwq/KWQTextArea.h: * kwq/KWQTextArea.mm: eliminated ALLOW_RESIZING_TEXT_AREAS #define in favor of using runtime setting (-[KWQTextArea isResizableByUser]): get value from settings, and cache it in KWQTextArea instance (-[KWQTextAreaTextView _enclosingTextArea]): new convenience method, extracted from _trackResizeFromMouseDown: (-[KWQTextAreaTextView _trackResizeFromMouseDown:]): now uses extracted method (-[KWQTextAreaTextView drawRect:]): now checks isResizableByUser (-[KWQTextAreaTextView mouseDown:]): ditto * kwq/WebCoreSettings.h: * kwq/WebCoreSettings.mm: (-[WebCoreSettings setTextAreasAreResizable:]): new setter (-[WebCoreSettings textAreasAreResizable]): new getter 2005-05-23 Maciej Stachowiak <mjs@apple.com> Reviewed by John. - split remaining editing command classes out of htmlediting.cpp - rename InsertParagraphSeparatorInQuotedContentCommand to BreakBlockquoteCommand No layout tests needed - this is a pure refactoring change. * WebCore.pbproj/project.pbxproj: * khtml/editing/apply_style_command.cpp: * khtml/editing/break_blockquote_command.cpp: Added. * khtml/editing/break_blockquote_command.h: Added. * khtml/editing/composite_edit_command.cpp: * khtml/editing/delete_selection_command.cpp: * khtml/editing/edit_command.cpp: * khtml/editing/htmlediting.cpp: * khtml/editing/htmlediting.h: * khtml/editing/insert_line_break_command.cpp: Added. * khtml/editing/insert_line_break_command.h: Added. * khtml/editing/insert_paragraph_separator_command.cpp: Added. * khtml/editing/insert_paragraph_separator_command.h: Added. * khtml/editing/insert_text_command.cpp: Added. * khtml/editing/insert_text_command.h: Added. * khtml/editing/join_text_nodes_command.cpp: Added. * khtml/editing/join_text_nodes_command.h: Added. * khtml/editing/merge_identical_elements_command.cpp: Added. * khtml/editing/merge_identical_elements_command.h: Added. * khtml/editing/move_selection_command.cpp: Added. * khtml/editing/move_selection_command.h: Added. * khtml/editing/rebalance_whitespace_command.cpp: Added. * khtml/editing/rebalance_whitespace_command.h: Added. * khtml/editing/remove_css_property_command.cpp: Added. * khtml/editing/remove_css_property_command.h: Added. * khtml/editing/remove_node_attribute_command.cpp: Added. * khtml/editing/remove_node_attribute_command.h: Added. * khtml/editing/remove_node_command.cpp: Added. * khtml/editing/remove_node_command.h: Added. * khtml/editing/remove_node_preserving_children_command.cpp: Added. * khtml/editing/remove_node_preserving_children_command.h: Added. * khtml/editing/replace_selection_command.cpp: Added. * khtml/editing/replace_selection_command.h: Added. * khtml/editing/set_node_attribute_command.cpp: Added. * khtml/editing/set_node_attribute_command.h: Added. * khtml/editing/split_element_command.cpp: Added. * khtml/editing/split_element_command.h: Added. * khtml/editing/split_text_node_command.cpp: Added. * khtml/editing/split_text_node_command.h: Added. * khtml/editing/split_text_node_containing_element_command.h: Added. * khtml/editing/typing_command.cpp: Added. * khtml/editing/typing_command.h: Added. * khtml/editing/wrap_contents_in_dummy_span_command.cpp: Added. * khtml/editing/wrap_contents_in_dummy_span_command.h: Added. 2005-05-23 Darin Adler <darin@apple.com> * WebCore.exp: Sorted file for more readable diffs. 2005-05-23 Adele Peterson <adele@apple.com> Reviewed by Darin. fix for <rdar://problem/4122661> Regression: 10.3.8-10.3.9: Next lesson doesn't work on Dale Carnegie Action Systems page * khtml/ecma/kjs_window.cpp: (KJS::WindowFunc::tryCall): added checks for NaN, in case it is passed into window.open for screenx, screeny, left, top, height, or width. 2005-05-23 David Harrison <harrison@apple.com> Reviewed by Darin. Prevent crash when going from no selection to selection with mispelling checks enabled. * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::markMisspellings): Repair check for null searchRange. Was inadvertently broken in recent checkin. 2005-05-23 John Sullivan <sullivan@apple.com> Reviewed by Dave Hyatt. - fixed <rdar://problem/4123592> Can't resize textareas that have a width specified by a style * kwq/KWQTextArea.mm: (-[KWQTextArea getNumColumns:andNumRows:forSize:]): removed this method, which I had added earlier to set cols and rows correctly (-[KWQTextAreaTextView _trackResizeFromMouseDown:]): set width and height instead of cols and rows; handle the intrinsic margin that sometimes appears on form elements 2005-05-22 Adele Peterson <adele@apple.com> Reviewed by Maciej. fix for <rdar://problem/4127101> REGRESSION(412-TOT) crash when creating Option element * khtml/ecma/kjs_html.cpp: (KJS::OptionConstructorImp::construct): Changed ElementImpl pointer to a SharedPtr because it was getting destroyed before we were done with it. 2005-05-20 John Sullivan <sullivan@apple.com> Reviewed by Chris. - fixed <rdar://problem/4126160> Crash sending mouse-exited event after reloading page with resizable textarea * kwq/KWQTextArea.mm: (-[KWQTextAreaTextView resetCursorRects]): This was some side effect of tracking rect code used for resizable textareas. I discovered that I didn't need the tracking rect code at all (at least to achieve the level of only-somewhat-working cursor behavior that I already had). Removing it caused the bug to vanish. 2005-05-19 Darin Adler <darin@apple.com> Reviewed by Maciej. - turned off exceptions and RTTI; seems to cut WebCore code size by about 35% * WebCore.pbproj/project.pbxproj: Turn off exceptions and RTTI for the framework. 2005-05-19 Darin Adler <darin@apple.com> Reviewed by Chris Petersen. - fixed a mistake I introduced in my previous check-in that caused a Deployment build failure * kwq/DOM.mm: (-[DOMDocument createTreeWalker::::]): Initialize cppFilter to 0, which fixes both the build failure and a potential bug! 2005-05-17 Darin Adler <darin@apple.com> Reviewed by Maciej. No new layout tests required. - remove all dependencies on exceptions and RTTI (but don't turn them off yet, that will be in a later patch) * WebCore.pbproj/project.pbxproj: Set a new KHTML_NO_CPLUSPLUS_DOM define. Removed all C++ DOM wrapper files that we don't need to compile any more. * khtml/dom/css_stylesheet.h: Added more KHTML_NO_CPLUSPLUS_DOM checks so we don't include any headers when including this file. * khtml/dom/dom2_events.h: Fixed up KHTML_NO_CPLUSPLUS_DOM checks so that everything but EventListener is turned off when that's on. Also moved the public so that the constants from KeyboardEvent are public. * khtml/dom/dom2_events.cpp: Put everything except for EventListener inside KHTML_NO_CPLUSPLUS_DOM. * khtml/dom/dom2_range.h: Added KHTML_NO_CPLUSPLUS_DOM checks so that only the constants are defined, no classes. * khtml/dom/dom2_traversal.cpp: Put everything except for NodeFilterCondition inside KHTML_NO_CPLUSPLUS_DOM. * khtml/dom/dom_node.h: Added more KHTML_NO_CPLUSPLUS_DOM checks so we don't include any headers when including this file. * khtml/ecma/kjs_binding.cpp: (KJS::DOMObject::get): Removed exception-handling code. Now we can eliminate tryGet altogether. (KJS::DOMObject::put): Ditto. (KJS::DOMFunction::get): Ditto. (KJS::DOMFunction::call): Ditto. * khtml/editing/visible_text.h: Added an include of <qstring.h>. * khtml/misc/loader.h: Added isKHTMLLoader. * khtml/misc/loader.cpp: (Loader::isKHTMLLoader): Added. Poor-man's replacement for dynamic_cast. * khtml/rendering/render_form.h: * khtml/rendering/render_form.cpp: (RenderFormElement::slotTextChanged): Added. Hack to make KWQSlot work for this function. * khtml/xml/dom2_rangeimpl.h: Added a forward declaration of class DOMString, needed now that the C++ DOM wrappers aren't defining it. * khtml/xml/dom_docimpl.cpp: (DocumentImpl::defaultEventHandler): Changed to call handleEventImpl so we don't have to make the C++ DOM wrapper for the event. * khtml/xml/dom_nodeimpl.cpp: (NodeImpl::handleLocalEvents): Ditto. (ContainerNodeImpl::insertBefore): Used SharedPtr<NodeImpl> rather than Node to protect the child node. (ContainerNodeImpl::replaceChild): Ditto. (ContainerNodeImpl::appendChild): Ditto. (ContainerNodeImpl::addChild): Ditto. * kwq/DOM.mm: (ObjCNodeFilterCondition::acceptNode): Update to add a KHTML_NO_CPLUSPLUS_DOM check since FilterCondition has a different API depending on the state. (-[DOMDocument createNodeIterator::::]): Rewrote to use NodeFilterImpl instead of NodeFilter. (-[DOMDocument createTreeWalker::::]): Ditto. * kwq/KWQAccObject.mm: (-[KWQAccObject role]): Use identifier instead of casting to Node and using elementId. (-[KWQAccObject title]): Ditto. (-[KWQAccObject accessibilityIsIgnored]): Ditto. (-[KWQAccObject rendererForView:]): Ditto. * kwq/KWQFrame.mm: (QFrame::setFrameStyle): Use isKHTMLView instead of dynamic_cast. * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::currentForm): Use focusNode instead of activeNode. (KWQKHTMLPart::nextKeyViewInFrame): Use isWidget instead of dynamic_cast. (KWQKHTMLPart::currentEventIsMouseDownInWidget): Use KHTMLView's nodeUnderMouse instead of our public one that uses a DOM C++ wrapper. (KWQKHTMLPart::partForWidget): Use isKHTMLView instead of dynamic_cast. (KWQKHTMLPart::passSubframeEventToSubframe): Use isWidget instead of dynamic_cast. * kwq/KWQObject.h: Made isXXX functions all public since we use them in a few more places now. Also added isKHTMLLoader. * kwq/KWQObject.mm: (QObject::isKHTMLLoader): Added. Returns false by default. * kwq/KWQSlot.mm: Removed all uses of dynamic_cast. * kwq/WebCoreBridge.mm: (-[WebCoreBridge stringForRange:]): Used plainText instead of text. (-[WebCoreBridge copyRenderNode:copier:]): Used isWidget instead of dynamic_cast. 2005-05-16 Darin Adler <darin@apple.com> - attempt to get things building under "Saffron" development tools * WebCore.pbproj/project.pbxproj: Use BUILT_PRODUCTS_DIR instead of SYMROOT. 2005-05-16 Adele Peterson <adele@apple.com> Changes by Darin. Reviewed by myself. Changed the Render Tree debug code to write out an indication that the affinity is upstream when writing out caret position. Updated the one layout test with output affected by the change. Also updated one test to use the new dumpAsText method in dumpRenderTree. * kwq/KWQRenderTreeDebug.cpp: (writeSelection): writes out affinity if it's upstream in the caret case * layout-tests/editing/style/create-block-for-style-004-expected.txt: new results that contain the affinity * layout-tests/fast/js/char-at.html: now calls layoutController.dumpAsText() * layout-tests/fast/js/char-at-expected.txt: plain text result (replaces old render tree result) 2005-05-16 Darin Adler <darin@apple.com> Reviewed by Adele. - fixed issues preventing us from compiling with newer versions of gcc 4.0 * khtml/dom/dom2_events.cpp: Add definitions of some static data member constants, as required by the C++ standard and the gcc 4.0 compiler. * khtml/editing/selection.h: Specified KHTMLPart friend class as ::KHTMLPart, since if it's not explicitly qualified, it means DOM::KHTMLPart. * khtml/dom/dom_string.cpp: (DOM::strcasecmp): Removed redundant and illegal DOM:: prefix. (DOM::operator==): Ditto. * khtml/ecma/kjs_binding.cpp: (KJS::getStringOrNull): Removed redundant and illegal KJS:: prefix. (KJS::ValueToVariant): Ditto. * khtml/ecma/kjs_css.cpp: (KJS::getCSSRuleConstructor): Ditto. (KJS::getCSSValueConstructor): Ditto. (KJS::getCSSPrimitiveValueConstructor): Ditto. * khtml/ecma/kjs_events.cpp: (KJS::getEventConstructor): Ditto. (KJS::getEventExceptionConstructor): Ditto. (KJS::getMutationEventConstructor): Ditto. * khtml/ecma/kjs_traversal.cpp: (KJS::getNodeFilterConstructor): Ditto. * khtml/misc/loader_client.h: Added an empty virtual destructor to CachedObjectClient to quiet the compiler. This doesn't really do any good, but also does no harm. * khtml/misc/loader.cpp: (CachedObjectClient::~CachedObjectClient): Added. * khtml/rendering/render_block.cpp: (khtml::RenderBlock::fillBlockSelectionGaps): Initialize a couple of variables that should have been initialized to 0. Not just about making the compiler happy -- warning found a real bug! * kwq/KWQTextArea.mm: (RangeOfParagraph): Change else structure to work around compiler warning bug. 2005-05-13 John Sullivan <sullivan@apple.com> * kwq/KWQTextArea.mm: (-[KWQTextAreaTextView _trackResizeFromMouseDown:]): added Radar numbers to FIXMEs about resizable textareas (-[KWQTextAreaTextView resetCursorRects]): ditto (-[KWQTextAreaTextView mouseDown:]): ditto 2005-05-12 Darin Adler <darin@apple.com> Reviewed by Chris Blumenberg. - more "getting off the C++ DOM wrappers" changes This pass involves replacing uses of DOM::Range with use of DOM::RangeImpl plus some more use of DOM::DocumentImpl instead of DOM::Document. * khtml/dom/dom2_range.cpp: * khtml/dom/dom2_range.h: * khtml/ecma/kjs_window.cpp: (KJS::Window::get): (KJS::WindowFunc::tryCall): (KJS::Window::updateLayout): (KJS::ScheduledAction::execute): (KJS::Selection::toString): * khtml/ecma/xmlhttprequest.cpp: (KJS::XMLHttpRequestProtoFunc::tryCall): * khtml/editing/htmlediting.cpp: (khtml::InsertLineBreakCommand::doApply): * khtml/editing/selection.cpp: (khtml::Selection::Selection): (khtml::Selection::moveTo): (khtml::Selection::toRange): * khtml/editing/selection.h: * khtml/editing/visible_position.cpp: (khtml::makeRange): (khtml::startVisiblePosition): (khtml::endVisiblePosition): (khtml::setStart): (khtml::setEnd): * khtml/editing/visible_position.h: * khtml/editing/visible_range.h: * khtml/editing/visible_text.cpp: (khtml::TextIterator::TextIterator): (khtml::TextIterator::range): (khtml::SimplifiedBackwardsTextIterator::SimplifiedBackwardsTextIterator): (khtml::SimplifiedBackwardsTextIterator::range): (khtml::CharacterIterator::CharacterIterator): (khtml::CharacterIterator::range): (khtml::WordAwareIterator::WordAwareIterator): (khtml::WordAwareIterator::advance): (khtml::TextIterator::rangeLength): (khtml::TextIterator::rangeFromLocationAndLength): (khtml::plainText): (khtml::findPlainText): * khtml/editing/visible_text.h: (khtml::WordAwareIterator::range): * khtml/editing/visible_units.cpp: (khtml::previousBoundary): (khtml::nextBoundary): * khtml/html/html_elementimpl.cpp: (HTMLElementImpl::innerText): * khtml/html/htmltokenizer.cpp: (khtml::HTMLTokenizer::scriptExecution): * khtml/khtml_part.cpp: (KHTMLPart::text): (KHTMLPart::selectedText): (KHTMLPart::shouldBeginEditing): (KHTMLPart::shouldEndEditing): (KHTMLPart::selectionComputedStyle): * khtml/khtml_part.h: * khtml/khtmlview.h: * khtml/rendering/render_text.cpp: (InlineTextBox::paint): * khtml/xml/dom2_rangeimpl.cpp: (DOM::operator==): (DOM::rangeOfContents): * khtml/xml/dom2_rangeimpl.h: (DOM::operator!=): * khtml/xml/dom_docimpl.cpp: (DocumentImpl::relinquishesEditingFocus): (DocumentImpl::acceptsEditingFocus): (DocumentImpl::addMarker): (DocumentImpl::removeMarker): * khtml/xml/dom_docimpl.h: * khtml/xml/dom_position.cpp: (DOM::startPosition): * khtml/xml/dom_position.h: * kwq/DOMHTML.mm: (-[DOMHTMLLinkElement href]): (-[DOMHTMLBaseElement href]): (-[DOMHTMLInputElement src]): (-[DOMHTMLAnchorElement href]): (-[DOMHTMLImageElement src]): (-[DOMHTMLAreaElement href]): * kwq/KWQAccObject.mm: (-[KWQAccObject textUnderElement]): (-[KWQAccObject value]): (-[KWQAccObject doAXStringForTextMarkerRange:]): (-[KWQAccObject doAXAttributedStringForTextMarkerRange:]): * kwq/KWQKHTMLPart.h: (KWQKHTMLPart::markedTextRange): * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::findString): (KWQKHTMLPart::advanceToNextMisspelling): (KWQKHTMLPart::fontForSelection): (KWQKHTMLPart::markMisspellings): (KWQKHTMLPart::respondToChangedSelection): (KWQKHTMLPart::shouldBeginEditing): (KWQKHTMLPart::shouldEndEditing): (convertAttributesToUnderlines): (KWQKHTMLPart::setMarkedTextRange): * kwq/WebCoreBridge.mm: (-[WebCoreBridge elementAtPoint:]): (-[WebCoreBridge rangeByExpandingSelectionWithGranularity:]): (-[WebCoreBridge rangeByAlteringCurrentSelection:direction:granularity:]): (-[WebCoreBridge rangeByAlteringCurrentSelection:verticalDistance:]): (-[WebCoreBridge selectedDOMRange]): (-[WebCoreBridge convertToNSRange:DOM::]): (-[WebCoreBridge convertToDOMRange:]): (-[WebCoreBridge convertToObjCDOMRange:]): (-[WebCoreBridge selectNSRange:]): (-[WebCoreBridge selectedNSRange]): (-[WebCoreBridge markDOMRange]): (-[WebCoreBridge markedTextDOMRange]): (-[WebCoreBridge markedTextNSRange]): (-[WebCoreBridge replaceMarkedTextWithText:]): (-[WebCoreBridge smartDeleteRangeForProposedRange:]): (-[WebCoreBridge dragCaretDOMRange]): (-[WebCoreBridge editableDOMRangeForPoint:]): (-[WebCoreBridge rangeOfCharactersAroundCaret]): 2005-05-13 Maciej Stachowiak <mjs@apple.com> Reviewed by Dave. - more splitting up of htmlediting.cpp * WebCore.pbproj/project.pbxproj: * khtml/editing/composite_edit_command.cpp: * khtml/editing/delete_from_text_node_command.cpp: Added. * khtml/editing/delete_from_text_node_command.h: Added. * khtml/editing/delete_selection_command.cpp: Added. * khtml/editing/delete_selection_command.h: Added. * khtml/editing/htmlediting.cpp: * khtml/editing/htmlediting.h: * khtml/editing/insert_into_text_node_command.cpp: Added. * khtml/editing/insert_into_text_node_command.h: Added. * khtml/editing/insert_node_before_command.cpp: Added. * khtml/editing/insert_node_before_command.h: Added. 2005-05-12 Adele Peterson <adele@apple.com> Reviewed by Maciej. fix for <rdar://problem/4117656> deleting an input element in its onBlur handler crashes Safari * khtml/rendering/render_form.cpp: (RenderLineEdit::handleFocusOut): added nil check for element 2005-05-12 John Sullivan <sullivan@apple.com> Reviewed by Kevin. - rolled in changes from experimental-ui-branch to support resizable textareas and find-as-you-type. The files/functions modified are listed just below. After that are the ChangeLog comments from the branch. * Resources/textAreaResizeCorner.tiff: Added. * WebCore.pbproj/project.pbxproj: * kwq/KWQKHTMLPart.h: * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::findString): * kwq/KWQTextArea.mm: (-[KWQTextArea textDidChange:]): (-[KWQTextAreaTextView _resizeCornerImage]): (-[KWQTextAreaTextView _resizeCornerRect]): (-[KWQTextAreaTextView resetCursorRects]): (-[KWQTextAreaTextView drawRect:]): (-[KWQTextAreaTextView mouseDown:]): * kwq/WebCoreBridge.h: * kwq/WebCoreBridge.mm: (-[WebCoreBridge searchFor:direction:caseSensitive:wrap:findInSelection:]): 2005-05-05 John Sullivan <sullivan@apple.com> Reviewed by Chris. * kwq/KWQTextArea.mm: (-[KWQTextAreaTextView _resizeCornerRect]): Get corner rect from enclosing clipView, rather than using visibleRect. VisibleRect would return the wrong result when the textarea was clipped by the bottom of the window, leading to redraw schmutz among other things. 2005-05-02 John Sullivan <sullivan@apple.com> Reviewed by Chris. Improvements to resizable textarea experiment: - resize image is now drawn in the resize corner - cursor sometimes tracks to arrow when over resize corner (but usually not) - cursor changes to arrow on mouse down in any case * Resources/textAreaResizeCorner.tiff: Added. * WebCore.pbproj/project.pbxproj: updated for added image file * kwq/KWQTextArea.mm: (-[KWQTextAreaTextView _resizeCornerImage]): new method, reads resize image once and caches it (-[KWQTextAreaTextView _resizeCornerRect]): new method, computes rect from image (-[KWQTextAreaTextView resetCursorRects]): overridden to attempt to make the cursor change to an arrow when over this corner. Only works sometimes, as explained in comments. (-[KWQTextAreaTextView drawRect:]): overridden to draw resize image (-[KWQTextAreaTextView mouseDown:]): now uses _resizeCornerRect, and sets cursor to arrow when pressed in resize corner 2005-04-18 John Sullivan <sullivan@apple.com> WebCore support for notifying a form delegate when a textarea's contents have changed (as opposed to a textfield, which was already handled). Reviewed by Maciej. * kwq/WebCoreBridge.h: add textDidChange: method * kwq/KWQTextArea.mm: (-[KWQTextArea textDidChange:]): call through to bridge 2005-04-07 John Sullivan <sullivan@apple.com> WebCore support for find-as-you-type; needed an additional parameter to findString and searchFor:... Reviewed by Dave Hyatt. * kwq/KWQKHTMLPart.h: * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::findString): new findInSelection parameter; if true, start from the beginning of the selection when searching forward, or the end of the selection when searching backward * kwq/WebCoreBridge.h: * kwq/WebCoreBridge.mm: (-[WebCoreBridge searchFor:direction:caseSensitive:wrap:findInSelection:]): new findInSelection parameter; passed through to findString 2005-05-12 Darin Adler <darin@apple.com> Reviewed by Maciej (except for some parts outside the ECMA directory). - switch KJS wrappers over to using the DOM impl. classes rather than using the DOM wrappers; will allow us to not even compile the DOM wrappers and make the code smaller * khtml/css/css_valueimpl.h: Added CSSStyleDeclarationImpl::isPropertyName, removed CSSStyleDeclarationImpl::propertyID. * khtml/css/css_valueimpl.cpp: (DOM::propertyID): Added. Gets property ID given a DOM string. Replaces the previous version that had hacks that we want to leave in the JS wrapper for now. (DOM::CSSStyleDeclarationImpl::isPropertyName): Added. * khtml/css/cssproperties.in: Fixed up comments. * khtml/css/makeprop: Added new maxCSSPropertyNameLength constant, used for buffer size in the propertyID function. * khtml/dom/dom2_events.h: Added handleEventImpl, making it easier to call handleEvent in a way that works either with or without the C++ DOM wrappers. * khtml/dom/dom2_events.cpp: (EventListener::handleEventImpl): Added. * khtml/dom/dom2_views.cpp: Added now-needed include. * khtml/dom/dom_doc.cpp: Added now-needed include. * khtml/dom/dom_element.cpp: Tweaked includes. * khtml/editing/htmlediting.cpp: Removed now-unneeded include. * khtml/html/html_baseimpl.cpp: Ditto. * khtml/html/html_formimpl.h: Ditto. * khtml/rendering/render_form.h: Ditto. * khtml/rendering/render_style.h: Ditto. * khtml/xml/dom2_eventsimpl.cpp: Ditto. * khtml/xml/dom2_viewsimpl.h: Ditto. * khtml/xml/dom_elementimpl.h: Ditto. * khtml/xml/dom_stringimpl.h: Ditto. * kwq/DOM.mm: Ditto. * kwq/DOMHTML.mm: Ditto. * khtml/khtml_part.cpp: Tweaked incluudes. * khtml/khtmlpart_p.h: Ditto. * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::canCachePage): Change to use DOM impl. rather than C++ DOM. * khtml/xml/dom_docimpl.cpp: (DOMImplementationImpl::createDocumentType): Disabled the calls to the not-implemented name checks in the C++ DOM wrappers. If we add name changes, we'll want them inside the impl, not in the wrappers. (DOMImplementationImpl::createDocument): Ditto. * khtml/xml/dom_nodeimpl.cpp: (NodeImpl::checkSetPrefix): Ditto. * khtml/ecma/kjs_binding.cpp: (KJS::ScriptInterpreter::wasRunByUserGesture): (KJS::KJS::ValueToVariant): (KJS::setDOMException): * khtml/ecma/kjs_binding.h: (KJS::ScriptInterpreter::setCurrentEvent): (KJS::ScriptInterpreter::getCurrentEvent): (KJS::cacheDOMObject): (KJS::DOMExceptionTranslator::DOMExceptionTranslator): (KJS::DOMExceptionTranslator::~DOMExceptionTranslator): (KJS::DOMExceptionTranslator::operator int &): (KJS::cacheGlobalObject): * khtml/ecma/kjs_css.cpp: (KJS::cssPropertyName): (KJS::isCSSPropertyName): (KJS::DOMCSSStyleDeclaration::DOMCSSStyleDeclaration): (KJS::DOMCSSStyleDeclaration::~DOMCSSStyleDeclaration): (KJS::DOMCSSStyleDeclaration::hasProperty): (KJS::DOMCSSStyleDeclaration::tryGet): (KJS::DOMCSSStyleDeclaration::tryPut): (KJS::DOMCSSStyleDeclarationProtoFunc::tryCall): (KJS::getDOMCSSStyleDeclaration): (KJS::DOMStyleSheet::~DOMStyleSheet): (KJS::DOMStyleSheet::getValueProperty): (KJS::DOMStyleSheet::tryPut): (KJS::getDOMStyleSheet): (KJS::DOMStyleSheetList::~DOMStyleSheetList): (KJS::DOMStyleSheetList::tryGet): (KJS::getDOMStyleSheetList): (KJS::DOMStyleSheetListFunc::tryCall): (KJS::DOMMediaList::DOMMediaList): (KJS::DOMMediaList::~DOMMediaList): (KJS::DOMMediaList::tryGet): (KJS::DOMMediaList::tryPut): (KJS::getDOMMediaList): (KJS::KJS::DOMMediaListProtoFunc::tryCall): (KJS::DOMCSSStyleSheet::DOMCSSStyleSheet): (KJS::DOMCSSStyleSheet::tryGet): (KJS::DOMCSSStyleSheetProtoFunc::tryCall): (KJS::DOMCSSRuleList::~DOMCSSRuleList): (KJS::DOMCSSRuleList::tryGet): (KJS::DOMCSSRuleListFunc::tryCall): (KJS::getDOMCSSRuleList): (KJS::DOMCSSRule::~DOMCSSRule): (KJS::DOMCSSRule::classInfo): (KJS::DOMCSSRule::tryGet): (KJS::DOMCSSRule::getValueProperty): (KJS::DOMCSSRule::putValue): (KJS::DOMCSSRuleFunc::tryCall): (KJS::getDOMCSSRule): (KJS::DOMCSSValue::~DOMCSSValue): (KJS::DOMCSSValue::tryGet): (KJS::DOMCSSValue::tryPut): (KJS::getDOMCSSValue): (KJS::DOMCSSPrimitiveValue::DOMCSSPrimitiveValue): (KJS::DOMCSSPrimitiveValue::tryGet): (KJS::DOMCSSPrimitiveValueProtoFunc::tryCall): (KJS::DOMCSSValueList::DOMCSSValueList): (KJS::DOMCSSValueList::tryGet): (KJS::DOMCSSValueListFunc::tryCall): (KJS::DOMRGBColor::getValueProperty): (KJS::getDOMRGBColor): (KJS::DOMRect::~DOMRect): (KJS::DOMRect::getValueProperty): (KJS::getDOMRect): (KJS::DOMCounter::~DOMCounter): (KJS::DOMCounter::getValueProperty): (KJS::getDOMCounter): * khtml/ecma/kjs_css.h: (KJS::DOMCSSStyleDeclaration::impl): (KJS::DOMStyleSheet::DOMStyleSheet): (KJS::DOMStyleSheet::impl): (KJS::DOMStyleSheetList::DOMStyleSheetList): (KJS::DOMStyleSheetList::impl): (KJS::DOMMediaList::impl): (KJS::DOMCSSStyleSheet::): (KJS::DOMCSSRuleList::DOMCSSRuleList): (KJS::DOMCSSRuleList::impl): (KJS::DOMCSSRule::DOMCSSRule): (KJS::DOMCSSRule::impl): (KJS::DOMCSSValue::DOMCSSValue): (KJS::DOMCSSValue::impl): (KJS::DOMCSSValueList::): (KJS::DOMRGBColor::DOMRGBColor): (KJS::DOMRect::DOMRect): (KJS::DOMCounter::DOMCounter): * khtml/ecma/kjs_dom.cpp: (KJS::DOMNodeListFunc::): (KJS::DOMNode::DOMNode): (KJS::DOMNode::toBoolean): (KJS::DOMNode::getValueProperty): (KJS::DOMNode::putValue): (KJS::DOMNode::toPrimitive): (KJS::DOMNode::toString): (KJS::DOMNode::setListener): (KJS::DOMNode::getListener): (KJS::DOMNodeProtoFunc::tryCall): (KJS::toNode): (KJS::DOMNodeList::~DOMNodeList): (KJS::DOMNodeList::toPrimitive): (KJS::DOMNodeList::tryGet): (KJS::DOMNodeList::tryCall): (KJS::DOMNodeListFunc::tryCall): (KJS::DOMAttr::DOMAttr): (KJS::DOMAttr::getValueProperty): (KJS::DOMAttr::putValue): (KJS::toAttr): (KJS::DOMDocument::DOMDocument): (KJS::DOMDocument::~DOMDocument): (KJS::DOMDocument::getValueProperty): (KJS::DOMDocument::putValue): (KJS::DOMDocumentProtoFunc::tryCall): (KJS::DOMElement::DOMElement): (KJS::DOMElement::tryGet): (KJS::DOMElementProtoFunc::tryCall): (KJS::toElement): (KJS::DOMDOMImplementation::DOMDOMImplementation): (KJS::DOMDOMImplementation::~DOMDOMImplementation): (KJS::DOMDOMImplementationProtoFunc::tryCall): (KJS::DOMDocumentType::DOMDocumentType): (KJS::DOMDocumentType::getValueProperty): (KJS::toDocumentType): (KJS::DOMNamedNodeMap::DOMNamedNodeMap): (KJS::DOMNamedNodeMap::~DOMNamedNodeMap): (KJS::DOMNamedNodeMap::tryGet): (KJS::DOMNamedNodeMapProtoFunc::tryCall): (KJS::DOMProcessingInstruction::DOMProcessingInstruction): (KJS::DOMProcessingInstruction::getValueProperty): (KJS::DOMProcessingInstruction::tryPut): (KJS::DOMNotation::DOMNotation): (KJS::DOMNotation::getValueProperty): (KJS::DOMEntity::DOMEntity): (KJS::DOMEntity::getValueProperty): (KJS::getDOMDocumentNode): (KJS::checkNodeSecurity): (KJS::getDOMNode): (KJS::getDOMNamedNodeMap): (KJS::getRuntimeObject): (KJS::getDOMNodeList): (KJS::getDOMDOMImplementation): (KJS::getNodeConstructor): (KJS::getDOMExceptionConstructor): (KJS::DOMNamedNodesCollection::DOMNamedNodesCollection): (KJS::DOMNamedNodesCollection::tryGet): (KJS::DOMCharacterData::DOMCharacterData): (KJS::DOMCharacterData::getValueProperty): (KJS::DOMCharacterData::tryPut): (KJS::DOMCharacterDataProtoFunc::tryCall): (KJS::DOMText::DOMText): (KJS::DOMTextProtoFunc::tryCall): * khtml/ecma/kjs_dom.h: (KJS::DOMNode::impl): (KJS::DOMNodeList::DOMNodeList): (KJS::DOMNodeList::impl): (KJS::DOMDOMImplementation::impl): (KJS::DOMNamedNodeMap::impl): * khtml/ecma/kjs_events.cpp: (KJS::JSAbstractEventListener::handleEvent): (KJS::JSLazyEventListener::handleEvent): (KJS::getNodeEventListener): (KJS::DOMEvent::DOMEvent): (KJS::DOMEvent::~DOMEvent): (KJS::DOMEvent::getValueProperty): (KJS::DOMEvent::putValue): (KJS::DOMEventProtoFunc::tryCall): (KJS::getDOMEvent): (KJS::toEvent): (KJS::DOMUIEvent::DOMUIEvent): (KJS::DOMUIEvent::getValueProperty): (KJS::DOMUIEventProtoFunc::tryCall): (KJS::DOMMouseEvent::DOMMouseEvent): (KJS::DOMMouseEvent::getValueProperty): (KJS::DOMMouseEventProtoFunc::tryCall): (KJS::DOMKeyboardEvent::DOMKeyboardEvent): (KJS::DOMKeyboardEvent::getValueProperty): (KJS::DOMKeyboardEventProtoFunc::tryCall): (KJS::DOMMutationEvent::DOMMutationEvent): (KJS::DOMMutationEvent::getValueProperty): (KJS::DOMMutationEventProtoFunc::tryCall): (KJS::DOMWheelEvent::DOMWheelEvent): (KJS::DOMWheelEvent::getValueProperty): (KJS::ClipboardProtoFunc::tryCall): * khtml/ecma/kjs_events.h: (KJS::DOMEvent::impl): (KJS::DOMUIEvent::): (KJS::DOMMouseEvent::): (KJS::DOMKeyboardEvent::): (KJS::DOMMutationEvent::): * khtml/ecma/kjs_html.cpp: (KJS::KJS::HTMLDocFunction::tryCall): (KJS::HTMLDocument::HTMLDocument): (KJS::HTMLDocument::hasProperty): (KJS::HTMLDocument::tryGet): (KJS::KJS::HTMLDocument::putValue): (KJS::KJS::HTMLElement::classInfo): (KJS::HTMLElement::HTMLElement): (KJS::KJS::HTMLElement::tryGet): (KJS::KJS::HTMLElement::implementsCall): (KJS::KJS::HTMLElement::call): (KJS::KJS::HTMLElement::getValueProperty): (KJS::KJS::HTMLElement::hasProperty): (KJS::KJS::HTMLElement::toString): (KJS::getForm): (KJS::KJS::HTMLElement::pushEventHandlerScope): (KJS::KJS::HTMLElementFunction::tryCall): (KJS::KJS::HTMLElement::tryPut): (KJS::HTMLElement::putValue): (KJS::toHTMLElement): (KJS::toHTMLTableCaptionElement): (KJS::toHTMLTableSectionElement): (KJS::HTMLCollection::HTMLCollection): (KJS::HTMLCollection::~HTMLCollection): (KJS::KJS::HTMLCollection::tryGet): (KJS::KJS::HTMLCollection::tryCall): (KJS::KJS::HTMLCollection::getNamedItems): (KJS::KJS::HTMLCollectionProtoFunc::tryCall): (KJS::HTMLSelectCollection::HTMLSelectCollection): (KJS::KJS::HTMLSelectCollection::tryGet): (KJS::KJS::HTMLSelectCollection::tryPut): (KJS::OptionConstructorImp::OptionConstructorImp): (KJS::OptionConstructorImp::construct): (KJS::ImageConstructorImp::ImageConstructorImp): (KJS::ImageConstructorImp::construct): (KJS::Image::notifyFinished): (KJS::Image::Image): (KJS::KJS::Context2DFunction::tryCall): (KJS::): (KJS::colorRefFromValue): (KJS::colorFromValue): (KJS::Context2D::putValue): (KJS::Context2D::Context2D): (KJS::Context2D::mark): (KJS::GradientFunction::tryCall): (KJS::ImagePattern::tryGet): (KJS::getHTMLCollection): (KJS::getSelectHTMLCollection): * khtml/ecma/kjs_html.h: (KJS::HTMLDocument::): (KJS::HTMLElement::): (KJS::HTMLCollection::impl): * khtml/ecma/kjs_navigator.cpp: * khtml/ecma/kjs_proxy.cpp: (KJSProxyImpl::evaluate): (KJSProxyImpl::finishedWithEvent): * khtml/ecma/kjs_proxy.h: * khtml/ecma/kjs_range.cpp: (KJS::DOMRange::DOMRange): (KJS::DOMRange::~DOMRange): (KJS::DOMRange::tryGet): (KJS::DOMRange::getValueProperty): (KJS::DOMRangeProtoFunc::tryCall): (KJS::getDOMRange): (KJS::RangeConstructor::tryGet): (KJS::getRangeConstructor): (KJS::toRange): * khtml/ecma/kjs_range.h: (KJS::DOMRange::impl): * khtml/ecma/kjs_traversal.cpp: (KJS::DOMNodeIterator::DOMNodeIterator): (KJS::DOMNodeIterator::~DOMNodeIterator): (KJS::DOMNodeIterator::getValueProperty): (KJS::DOMNodeIteratorProtoFunc::tryCall): (KJS::getDOMNodeIterator): (KJS::DOMNodeFilter::DOMNodeFilter): (KJS::DOMNodeFilter::~DOMNodeFilter): (KJS::DOMNodeFilterProtoFunc::tryCall): (KJS::getDOMNodeFilter): (KJS::toNodeFilter): (KJS::DOMTreeWalker::DOMTreeWalker): (KJS::DOMTreeWalker::~DOMTreeWalker): (KJS::DOMTreeWalker::getValueProperty): (KJS::DOMTreeWalker::tryPut): (KJS::DOMTreeWalkerProtoFunc::tryCall): (KJS::getDOMTreeWalker): (KJS::JSNodeFilterCondition::acceptNode): * khtml/ecma/kjs_traversal.h: (KJS::DOMNodeIterator::impl): (KJS::DOMNodeFilter::impl): (KJS::DOMTreeWalker::impl): * khtml/ecma/kjs_views.cpp: (KJS::DOMAbstractView::~DOMAbstractView): (KJS::DOMAbstractView::tryGet): (KJS::DOMAbstractViewFunc::tryCall): (KJS::getDOMAbstractView): (KJS::toAbstractView): * khtml/ecma/kjs_views.h: (KJS::DOMAbstractView::DOMAbstractView): (KJS::DOMAbstractView::impl): * khtml/ecma/kjs_window.cpp: (KJS::Window::get): (KJS::Window::hasProperty): (KJS::Window::put): (KJS::Window::setListener): (KJS::Window::getListener): (KJS::Window::setCurrentEvent): (KJS::WindowFunc::tryCall): (KJS::Location::put): (KJS::LocationFunc::tryCall): (KJS::Selection::get): (KJS::SelectionFunc::tryCall): * khtml/ecma/kjs_window.h: * khtml/ecma/xmlhttprequest.cpp: (KJS::XMLHttpRequestConstructorImp::XMLHttpRequestConstructorImp): (KJS::XMLHttpRequestConstructorImp::~XMLHttpRequestConstructorImp): (KJS::XMLHttpRequestConstructorImp::construct): (KJS::XMLHttpRequest::getValueProperty): (KJS::XMLHttpRequest::XMLHttpRequest): (KJS::XMLHttpRequest::changeState): (KJS::XMLHttpRequest::open): (KJS::XMLHttpRequestProtoFunc::tryCall): * khtml/ecma/xmlhttprequest.h: * khtml/ecma/xmlserializer.cpp: (KJS::XMLSerializerProtoFunc::tryCall): * khtml/ecma/xmlserializer.h: * kwq/DOMInternal.mm: (-[WebScriptObject _initializeScriptDOMNodeImp]): * kwq/DOMUtility.mm: (KJS::ScriptInterpreter::createObjcInstanceForValue): 2005-05-11 David Hyatt <hyatt@apple.com> Improve the display of apple.com. innerWidth and innerHeight refer to the size of the visible view and so they do not need to do a layout in order to yield correct values from JS. Removing this stops an early layout and paint before the apple.com images are typically loaded. This is an improvement of the fix for wired.com's FOUC. For that bug I eliminated the need to ignore pending stylesheets, but now I'm going further and just eliminating the layout all together. This means that the old updateLayout function can be reverted to how it was before the wired.com fix. Reviewed by john * khtml/ecma/kjs_window.cpp: (Window::get): (Window::updateLayout): * khtml/ecma/kjs_window.h: 2005-05-11 Maciej Stachowiak <mjs@apple.com> Reviewed by Kevin. - split some more individual classes out of htmlediting.cpp (CompositeEditcommand, AppendnodeCommand, ApplyStyleCommand) Also moves StyleChange directly into ApplyStyleCommand implementation file, it doesn't need to be in a header at all. * WebCore.pbproj/project.pbxproj: * khtml/editing/append_node_command.cpp: Added. * khtml/editing/append_node_command.h: Added. * khtml/editing/apply_style_command.cpp: Added. * khtml/editing/apply_style_command.h: Added. * khtml/editing/composite_edit_command.cpp: Added. * khtml/editing/composite_edit_command.h: Added. * khtml/editing/edit_command.cpp: Minor clean-ups. * khtml/editing/edit_command.h: * khtml/editing/htmlediting.cpp: * khtml/editing/htmlediting.h: 2005-05-11 Adele Peterson <adele@apple.com> Reviewed by Darin. fix for <rdar://problem/4061979> crash in DOM::ElementImpl::setAttribute at www.nitto-kohki.co.jp * khtml/html/html_imageimpl.cpp: (HTMLImageLoader::updateFromElement): added a nil check for the document * 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. * layout-tests/fast/events/onload-re-entry.html: removed alert. * layout-tests/fast/events/onload-re-entry-expected.txt: updated. * layout-tests/fast/dom/attr_dead_doc-expected.txt: Added. * layout-tests/fast/dom/attr_dead_doc.html: Added. * layout-tests/fast/dom/resources/apple.gif: Added. * layout-tests/fast/dom/resources/mozilla.gif: Added. * layout-tests/fast/dom/resources/top.html: Added. 2005-05-10 Maciej Stachowiak <mjs@apple.com> Reviewed by Kevin. - start on splitting htmlediting.cpp into smaller files - pull EditCommand and EditCommandPtr out. * WebCore.pbproj/project.pbxproj: * khtml/editing/edit_command.cpp: Added. * khtml/editing/edit_command.h: Added. * khtml/editing/htmlediting.cpp: Took EditCommand and EditCommandPtr out. * khtml/editing/htmlediting.h: Ditto. 2005-05-10 David Hyatt <hyatt@apple.com> Refactor the DOM so that the concept of class/style/id is no longer unique to HTML elements. This paves the way for SVG and MathML elements to also support these capabilities. In addition the concept of presentational attributes has also been factored out. Reviewed by mjs * khtml/css/css_ruleimpl.cpp: (CSSStyleRuleImpl::setDeclaration): * khtml/css/cssstyleselector.cpp: (khtml::parseUASheet): (khtml::CSSStyleSelector::loadDefaultStyle): (khtml::CSSStyleSelector::initElementAndPseudoState): (khtml::CSSStyleSelector::canShareStyleWithElement): (khtml::CSSStyleSelector::locateSharedStyle): (khtml::CSSStyleSelector::styleForElement): (khtml::CSSStyleSelector::checkOneSelector): * khtml/css/cssstyleselector.h: * khtml/html/html_baseimpl.cpp: (HTMLBodyElementImpl::parseMappedAttribute): (HTMLFrameElementImpl::parseMappedAttribute): (HTMLFrameSetElementImpl::parseMappedAttribute): (HTMLIFrameElementImpl::parseMappedAttribute): * khtml/html/html_baseimpl.h: * khtml/html/html_blockimpl.cpp: (HTMLDivElementImpl::parseMappedAttribute): (HTMLHRElementImpl::parseMappedAttribute): (HTMLParagraphElementImpl::parseMappedAttribute): (HTMLMarqueeElementImpl::parseMappedAttribute): * khtml/html/html_blockimpl.h: * khtml/html/html_canvasimpl.cpp: (HTMLCanvasElementImpl::parseMappedAttribute): * khtml/html/html_canvasimpl.h: * khtml/html/html_elementimpl.cpp: (HTMLElementImpl::HTMLElementImpl): (HTMLElementImpl::~HTMLElementImpl): (HTMLElementImpl::mapToEntry): (HTMLElementImpl::parseMappedAttribute): (HTMLElementImpl::addHTMLAlignment): (HTMLElementImpl::setContentEditable): (HTMLElementImpl::toString): * khtml/html/html_elementimpl.h: * khtml/html/html_formimpl.cpp: (DOM::HTMLFormElementImpl::parseMappedAttribute): (DOM::HTMLGenericFormElementImpl::parseMappedAttribute): (DOM::HTMLButtonElementImpl::parseMappedAttribute): (DOM::HTMLInputElementImpl::setType): (DOM::HTMLInputElementImpl::parseMappedAttribute): (DOM::HTMLLabelElementImpl::parseMappedAttribute): (DOM::HTMLSelectElementImpl::parseMappedAttribute): (DOM::HTMLKeygenElementImpl::parseMappedAttribute): (DOM::HTMLOptGroupElementImpl::parseMappedAttribute): (DOM::HTMLOptionElementImpl::parseMappedAttribute): (DOM::HTMLTextAreaElementImpl::parseMappedAttribute): (DOM::HTMLIsIndexElementImpl::parseMappedAttribute): * khtml/html/html_formimpl.h: * khtml/html/html_headimpl.cpp: (HTMLBaseElementImpl::parseMappedAttribute): (HTMLLinkElementImpl::parseMappedAttribute): (HTMLMetaElementImpl::parseMappedAttribute): (HTMLStyleElementImpl::parseMappedAttribute): * khtml/html/html_headimpl.h: * khtml/html/html_imageimpl.cpp: (HTMLImageElementImpl::parseMappedAttribute): (HTMLMapElementImpl::parseMappedAttribute): (HTMLAreaElementImpl::parseMappedAttribute): * khtml/html/html_imageimpl.h: * khtml/html/html_inlineimpl.cpp: (DOM::HTMLAnchorElementImpl::parseMappedAttribute): (DOM::HTMLBRElementImpl::parseMappedAttribute): (DOM::HTMLFontElementImpl::parseMappedAttribute): * khtml/html/html_inlineimpl.h: * khtml/html/html_listimpl.cpp: (DOM::HTMLUListElementImpl::parseMappedAttribute): (DOM::HTMLOListElementImpl::parseMappedAttribute): (DOM::HTMLLIElementImpl::parseMappedAttribute): * khtml/html/html_listimpl.h: * khtml/html/html_objectimpl.cpp: (DOM::HTMLAppletElementImpl::parseMappedAttribute): (DOM::HTMLEmbedElementImpl::parseMappedAttribute): (DOM::HTMLObjectElementImpl::parseMappedAttribute): (DOM::HTMLParamElementImpl::parseMappedAttribute): * khtml/html/html_objectimpl.h: * khtml/html/html_tableimpl.cpp: (DOM::HTMLTableElementImpl::parseMappedAttribute): (DOM::HTMLTableElementImpl::additionalAttributeStyleDecl): (DOM::HTMLTableElementImpl::getSharedCellDecl): (DOM::HTMLTablePartElementImpl::parseMappedAttribute): (DOM::HTMLTableCellElementImpl::parseMappedAttribute): (DOM::HTMLTableColElementImpl::parseMappedAttribute): (DOM::HTMLTableCaptionElementImpl::parseMappedAttribute): * khtml/html/html_tableimpl.h: * khtml/html/htmltokenizer.h: (khtml::Token::addAttribute): * khtml/misc/htmlattrs.in: * khtml/misc/htmltags.in: * khtml/xml/dom_docimpl.cpp: (DocumentImpl::createAttribute): (DocumentImpl::createElementNS): (DocumentImpl::createHTMLElement): * khtml/xml/dom_elementimpl.cpp: (XMLElementImpl::cloneNode): (NamedAttrMapImpl::isMappedAttributeMap): (CSSMappedAttributeDeclarationImpl::~CSSMappedAttributeDeclarationImpl): (StyledElementImpl::getMappedAttributeDecl): (StyledElementImpl::setMappedAttributeDecl): (StyledElementImpl::removeMappedAttributeDecl): (StyledElementImpl::invalidateStyleAttribute): (StyledElementImpl::updateStyleAttributeIfNeeded): (MappedAttributeImpl::~MappedAttributeImpl): (MappedAttributeImpl::clone): (m_mappedAttributeCount): (NamedMappedAttrMapImpl::clearAttributes): (NamedMappedAttrMapImpl::isMappedAttributeMap): (NamedMappedAttrMapImpl::declCount): (NamedMappedAttrMapImpl::mapsEquivalent): (NamedMappedAttrMapImpl::parseClassAttribute): (StyledElementImpl::StyledElementImpl): (StyledElementImpl::~StyledElementImpl): (StyledElementImpl::createAttribute): (StyledElementImpl::createInlineStyleDecl): (StyledElementImpl::destroyInlineStyleDecl): (StyledElementImpl::attributeChanged): (StyledElementImpl::mapToEntry): (StyledElementImpl::parseMappedAttribute): (StyledElementImpl::createAttributeMap): (StyledElementImpl::getInlineStyleDecl): (StyledElementImpl::style): (StyledElementImpl::additionalAttributeStyleDecl): (StyledElementImpl::getClassList): (isHexDigit): (toHex): (StyledElementImpl::addCSSProperty): (StyledElementImpl::addCSSStringProperty): (StyledElementImpl::addCSSImageProperty): (StyledElementImpl::addCSSLength): (StyledElementImpl::addCSSColor): (StyledElementImpl::createMappedDecl): * khtml/xml/dom_elementimpl.h: (DOM::): (DOM::CSSMappedAttributeDeclarationImpl::CSSMappedAttributeDeclarationImpl): (DOM::CSSMappedAttributeDeclarationImpl::setMappedState): (DOM::MappedAttributeImpl::MappedAttributeImpl): (DOM::MappedAttributeImpl::decl): (DOM::MappedAttributeImpl::setDecl): (DOM::NamedMappedAttrMapImpl::getClassList): (DOM::NamedMappedAttrMapImpl::hasMappedAttributes): (DOM::NamedMappedAttrMapImpl::declRemoved): (DOM::NamedMappedAttrMapImpl::declAdded): (DOM::NamedMappedAttrMapImpl::attributeItem): (DOM::StyledElementImpl::isStyledElement): (DOM::StyledElementImpl::hasMappedAttributes): (DOM::StyledElementImpl::mappedAttributes): (DOM::StyledElementImpl::isMappedAttribute): (DOM::StyledElementImpl::inlineStyleDecl): * khtml/xml/dom_nodeimpl.h: (DOM::NodeImpl::isStyledElement): 2005-05-10 Darin Adler <darin@apple.com> Reviewed by Dave Hyatt. No new layout tests needed. - remove all remaining uses of QMIN/QMAX and KMIN/KMAX. * kwq/KWQDef.h: Remove the macros. Remove all use of the macros (and fix a few compile errors by changing the types of some integer and floating point constants). * khtml/css/cssparser.cpp: (CSSParser::parseColorFromValue): * khtml/css/cssstyleselector.cpp: (khtml::CSSStyleSelector::getComputedSizeFromSpecifiedSize): * khtml/html/html_elementimpl.cpp: (HTMLElementImpl::addHTMLColor): * khtml/html/html_formimpl.cpp: (DOM::HTMLSelectElementImpl::parseHTMLAttribute): * khtml/html/htmltokenizer.cpp: (khtml::HTMLTokenizer::parseComment): * khtml/rendering/render_block.cpp: (khtml::RenderBlock::nearestFloatBottom): (khtml::RenderBlock::calcMinMaxWidth): * khtml/rendering/render_flow.cpp: (RenderFlow::paintOutlineForLine): * khtml/rendering/render_form.cpp: (RenderLineEdit::calcMinMaxWidth): (RenderFieldset::layoutLegend): (RenderFileButton::calcMinMaxWidth): (RenderSelect::layout): (RenderTextArea::calcMinMaxWidth): * khtml/rendering/render_object.cpp: (RenderObject::drawBorder): * khtml/rendering/render_replaced.cpp: (RenderWidget::resizeWidget): * khtml/rendering/render_table.cpp: (RenderTableSection::layoutRows): * khtml/rendering/table_layout.cpp: (AutoTableLayout::recalcColumn): (AutoTableLayout::calcEffectiveWidth): 2005-05-10 Darin Adler <darin@apple.com> Reviewed by Chris Blumenberg. - next pass of moving code from C++ DOM wrappers into the DOM impl. classes (this step adds still more member functions missing from the DOM impl. and changes some of the C++ and Objective-C DOM to call the new ones; also changes various places that use the C++ DOM to use the DOM impl. instead) * khtml/css/css_computedstyle.cpp: (DOM::CSSComputedStyleDeclarationImpl::getPropertyCSSValue): * khtml/css/css_computedstyle.h: * khtml/css/css_stylesheetimpl.cpp: (CSSStyleSheetImpl::cssRules): * khtml/css/css_stylesheetimpl.h: * khtml/css/css_valueimpl.cpp: (DOM::CSSStyleDeclarationImpl::getPropertyCSSValue): (DOM::CSSStyleDeclarationImpl::getPropertyValue): (DOM::CSSStyleDeclarationImpl::getPropertyPriority): (DOM::CSSStyleDeclarationImpl::setProperty): (DOM::CSSStyleDeclarationImpl::removeProperty): (DOM::CSSMutableStyleDeclarationImpl::getPropertyValue): (DOM::CSSPrimitiveValueImpl::CSSPrimitiveValueImpl): (DOM::operator==): (DOM::CSSStyleDeclarationImpl::propertyID): * khtml/css/css_valueimpl.h: (DOM::CSSValueImpl::setCssText): (DOM::CSSPrimitiveValueImpl::getDashboardRegionValue): * khtml/dom/css_rule.cpp: * khtml/dom/css_rule.h: * khtml/dom/css_stylesheet.h: (DOM::CSSException::): * khtml/dom/css_value.cpp: (DOM::CSSStyleDeclaration::getPropertyValue): (DOM::CSSStyleDeclaration::getPropertyCSSValue): (DOM::CSSStyleDeclaration::removeProperty): (DOM::CSSStyleDeclaration::getPropertyPriority): (DOM::CSSStyleDeclaration::setProperty): * khtml/dom/css_value.h: * khtml/dom/dom2_events.cpp: (EventListener::handleEvent): * khtml/dom/dom2_events.h: * khtml/dom/dom2_traversal.h: * khtml/dom/dom_doc.cpp: (DOM::DOMImplementation::createHTMLDocument): (DOM::DOMImplementation::createCSSStyleSheet): (DOM::Document::doctype): (DOM::Document::createAttribute): (DOM::Document::createAttributeNS): (DOM::Document::queryCommandValue): (DOM::Document::handle): * khtml/dom/dom_doc.h: * khtml/dom/dom_element.cpp: (Attr::name): (Attr::value): (Element::getAttribute): (Element::setAttribute): (Element::removeAttribute): (Element::getAttributeNode): (Element::setAttributeNode): (Element::removeAttributeNode): (Element::getElementsByTagName): (Element::getElementsByTagNameNS): (Element::getAttributeNS): (Element::setAttributeNS): (Element::removeAttributeNS): (Element::getAttributeNodeNS): (Element::setAttributeNodeNS): (Element::hasAttribute): (Element::hasAttributeNS): (Element::style): * khtml/dom/dom_exception.h: * khtml/dom/dom_misc.cpp: (DOM::DomShared::deleteMe): * khtml/dom/dom_misc.h: (DOM::DomShared::deleteMe): * khtml/dom/dom_node.cpp: (NamedNodeMap::getNamedItemNS): (NamedNodeMap::setNamedItemNS): (NamedNodeMap::removeNamedItemNS): (Node::ownerDocument): (Node::hasAttributes): (Node::isSupported): (Node::addEventListener): (Node::removeEventListener): * khtml/dom/dom_node.h: * khtml/dom/html_document.cpp: (HTMLDocument::setTitle): (HTMLDocument::completeURL): (HTMLDocument::getElementsByName): * khtml/dom/html_element.cpp: (HTMLElement::setInnerHTML): (HTMLElement::setInnerText): (HTMLElement::setOuterHTML): (HTMLElement::setOuterText): * khtml/dom/html_form.cpp: (HTMLLabelElement::form): (HTMLSelectElement::setValue): (HTMLSelectElement::options): (HTMLOptionElement::setValue): * khtml/dom/html_inline.cpp: (HTMLAnchorElement::accessKey): (HTMLAnchorElement::setAccessKey): (HTMLAnchorElement::charset): (HTMLAnchorElement::setCharset): (HTMLAnchorElement::coords): (HTMLAnchorElement::setCoords): (HTMLAnchorElement::href): (HTMLAnchorElement::setHref): (HTMLAnchorElement::hreflang): (HTMLAnchorElement::setHreflang): (HTMLAnchorElement::name): (HTMLAnchorElement::setName): (HTMLAnchorElement::rel): (HTMLAnchorElement::setRel): (HTMLAnchorElement::rev): (HTMLAnchorElement::setRev): (HTMLAnchorElement::shape): (HTMLAnchorElement::setShape): (HTMLAnchorElement::tabIndex): (HTMLAnchorElement::setTabIndex): (HTMLAnchorElement::target): (HTMLAnchorElement::setTarget): (HTMLAnchorElement::type): (HTMLAnchorElement::setType): (HTMLAnchorElement::blur): (HTMLAnchorElement::focus): (HTMLBRElement::clear): (HTMLBRElement::setClear): (HTMLFontElement::color): (HTMLFontElement::setColor): (HTMLFontElement::face): (HTMLFontElement::setFace): (HTMLFontElement::size): (HTMLFontElement::setSize): (HTMLModElement::cite): (HTMLModElement::setCite): (HTMLModElement::dateTime): (HTMLModElement::setDateTime): (HTMLQuoteElement::cite): (HTMLQuoteElement::setCite): * khtml/dom/html_misc.cpp: (HTMLCollection::HTMLCollection): (HTMLCollection::base): (HTMLCollection::namedItems): * khtml/dom/html_misc.h: * khtml/editing/htmlediting.cpp: * khtml/editing/selection.cpp: * khtml/html/html_documentimpl.cpp: (DOM::HTMLDocumentImpl::determineParseMode): (DOM::HTMLDocumentImpl::doctype): * khtml/html/html_documentimpl.h: * khtml/html/html_elementimpl.cpp: (HTMLElementImpl::setInnerHTML): (HTMLElementImpl::setOuterHTML): (HTMLElementImpl::setInnerText): (HTMLElementImpl::setOuterText): (HTMLElementImpl::style): (HTMLElementImpl::idDOM): (HTMLElementImpl::setId): (HTMLElementImpl::title): (HTMLElementImpl::setTitle): (HTMLElementImpl::lang): (HTMLElementImpl::setLang): (HTMLElementImpl::dir): (HTMLElementImpl::setDir): (HTMLElementImpl::className): (HTMLElementImpl::setClassName): (HTMLElementImpl::children): (HTMLGenericElementImpl::HTMLGenericElementImpl): (HTMLGenericElementImpl::id): * khtml/html/html_elementimpl.h: (DOM::HTMLElementImpl::isGenericFormElement): * khtml/html/html_formimpl.cpp: (DOM::HTMLFormElementImpl::parseEnctype): (DOM::HTMLFormElementImpl::parseHTMLAttribute): (DOM::HTMLFormElementImpl::elements): (DOM::HTMLFormElementImpl::name): (DOM::HTMLFormElementImpl::setName): (DOM::HTMLFormElementImpl::acceptCharset): (DOM::HTMLFormElementImpl::setAcceptCharset): (DOM::HTMLFormElementImpl::action): (DOM::HTMLFormElementImpl::setAction): (DOM::HTMLFormElementImpl::setEnctype): (DOM::HTMLFormElementImpl::method): (DOM::HTMLFormElementImpl::setMethod): (DOM::HTMLFormElementImpl::target): (DOM::HTMLFormElementImpl::setTarget): (DOM::HTMLGenericFormElementImpl::HTMLGenericFormElementImpl): (DOM::HTMLGenericFormElementImpl::~HTMLGenericFormElementImpl): (DOM::HTMLGenericFormElementImpl::parseHTMLAttribute): (DOM::HTMLGenericFormElementImpl::name): (DOM::HTMLGenericFormElementImpl::setName): (DOM::HTMLGenericFormElementImpl::setOverrideName): (DOM::HTMLGenericFormElementImpl::setDisabled): (DOM::HTMLGenericFormElementImpl::setReadOnly): (DOM::HTMLGenericFormElementImpl::tabIndex): (DOM::HTMLGenericFormElementImpl::setTabIndex): (DOM::HTMLButtonElementImpl::accessKey): (DOM::HTMLButtonElementImpl::setAccessKey): (DOM::HTMLButtonElementImpl::value): (DOM::HTMLButtonElementImpl::setValue): (DOM::HTMLInputElementImpl::HTMLInputElementImpl): (DOM::HTMLInputElementImpl::parseHTMLAttribute): (DOM::HTMLInputElementImpl::defaultValue): (DOM::HTMLInputElementImpl::setDefaultValue): (DOM::HTMLInputElementImpl::defaultChecked): (DOM::HTMLInputElementImpl::setDefaultChecked): (DOM::HTMLInputElementImpl::accept): (DOM::HTMLInputElementImpl::setAccept): (DOM::HTMLInputElementImpl::accessKey): (DOM::HTMLInputElementImpl::setAccessKey): (DOM::HTMLInputElementImpl::align): (DOM::HTMLInputElementImpl::setAlign): (DOM::HTMLInputElementImpl::alt): (DOM::HTMLInputElementImpl::setAlt): (DOM::HTMLInputElementImpl::setMaxLength): (DOM::HTMLInputElementImpl::sizeDOM): (DOM::HTMLInputElementImpl::setSize): (DOM::HTMLInputElementImpl::src): (DOM::HTMLInputElementImpl::setSrc): (DOM::HTMLInputElementImpl::useMap): (DOM::HTMLInputElementImpl::setUseMap): (DOM::HTMLLabelElementImpl::form): (DOM::HTMLLabelElementImpl::accessKey): (DOM::HTMLLabelElementImpl::setAccessKey): (DOM::HTMLLabelElementImpl::htmlFor): (DOM::HTMLLabelElementImpl::setHtmlFor): (DOM::HTMLLegendElementImpl::accessKey): (DOM::HTMLLegendElementImpl::setAccessKey): (DOM::HTMLLegendElementImpl::align): (DOM::HTMLLegendElementImpl::setAlign): (DOM::HTMLSelectElementImpl::setValue): (DOM::HTMLSelectElementImpl::optionsHTMLCollection): (DOM::HTMLSelectElementImpl::setMultiple): (DOM::HTMLSelectElementImpl::setSize): (DOM::HTMLOptGroupElementImpl::label): (DOM::HTMLOptGroupElementImpl::setLabel): (DOM::HTMLOptionElementImpl::setText): (DOM::HTMLOptionElementImpl::setIndex): (DOM::HTMLOptionElementImpl::setValue): (DOM::HTMLOptionElementImpl::defaultSelected): (DOM::HTMLOptionElementImpl::setDefaultSelected): (DOM::HTMLOptionElementImpl::label): (DOM::HTMLOptionElementImpl::setLabel): (DOM::HTMLTextAreaElementImpl::accessKey): (DOM::HTMLTextAreaElementImpl::setAccessKey): (DOM::HTMLTextAreaElementImpl::setCols): (DOM::HTMLTextAreaElementImpl::setRows): (DOM::HTMLIsIndexElementImpl::HTMLIsIndexElementImpl): (DOM::HTMLIsIndexElementImpl::parseHTMLAttribute): (DOM::HTMLIsIndexElementImpl::prompt): (DOM::HTMLIsIndexElementImpl::setPrompt): * khtml/html/html_formimpl.h: * khtml/html/html_headimpl.cpp: (HTMLBaseElementImpl::setHref): (HTMLBaseElementImpl::setTarget): (HTMLLinkElementImpl::disabled): (HTMLLinkElementImpl::setDisabled): (HTMLLinkElementImpl::charset): (HTMLLinkElementImpl::setCharset): (HTMLLinkElementImpl::href): (HTMLLinkElementImpl::setHref): (HTMLLinkElementImpl::hreflang): (HTMLLinkElementImpl::setHreflang): (HTMLLinkElementImpl::media): (HTMLLinkElementImpl::setMedia): (HTMLLinkElementImpl::rel): (HTMLLinkElementImpl::setRel): (HTMLLinkElementImpl::rev): (HTMLLinkElementImpl::setRev): (HTMLLinkElementImpl::target): (HTMLLinkElementImpl::setTarget): (HTMLLinkElementImpl::type): (HTMLLinkElementImpl::setType): (HTMLMetaElementImpl::content): (HTMLMetaElementImpl::setContent): (HTMLMetaElementImpl::httpEquiv): (HTMLMetaElementImpl::setHttpEquiv): (HTMLMetaElementImpl::name): (HTMLMetaElementImpl::setName): (HTMLMetaElementImpl::scheme): (HTMLMetaElementImpl::setScheme): (HTMLScriptElementImpl::id): (HTMLScriptElementImpl::isURLAttribute): (HTMLScriptElementImpl::insertedIntoDocument): (HTMLScriptElementImpl::notifyFinished): (HTMLScriptElementImpl::text): (HTMLScriptElementImpl::setText): (HTMLScriptElementImpl::htmlFor): (HTMLScriptElementImpl::setHtmlFor): (HTMLScriptElementImpl::event): (HTMLScriptElementImpl::setEvent): (HTMLScriptElementImpl::charset): (HTMLScriptElementImpl::setCharset): (HTMLScriptElementImpl::defer): (HTMLScriptElementImpl::setDefer): (HTMLScriptElementImpl::src): (HTMLScriptElementImpl::setSrc): (HTMLScriptElementImpl::type): (HTMLScriptElementImpl::setType): (HTMLStyleElementImpl::disabled): (HTMLStyleElementImpl::setDisabled): (HTMLStyleElementImpl::media): (HTMLStyleElementImpl::setMedia): (HTMLStyleElementImpl::type): (HTMLStyleElementImpl::setType): (HTMLTitleElementImpl::insertedIntoDocument): (HTMLTitleElementImpl::childrenChanged): (HTMLTitleElementImpl::text): (HTMLTitleElementImpl::setText): * khtml/html/html_headimpl.h: * khtml/html/html_miscimpl.cpp: (DOM::HTMLBaseFontElementImpl::id): (DOM::HTMLBaseFontElementImpl::color): (DOM::HTMLBaseFontElementImpl::setColor): (DOM::HTMLBaseFontElementImpl::face): (DOM::HTMLBaseFontElementImpl::setFace): (DOM::HTMLBaseFontElementImpl::size): (DOM::HTMLBaseFontElementImpl::setSize): (DOM::HTMLCollectionImpl::HTMLCollectionImpl): (DOM::HTMLCollectionImpl::~HTMLCollectionImpl): (DOM::HTMLCollectionImpl::resetCollectionInfo): (DOM::HTMLCollectionImpl::traverseNextItem): (DOM::HTMLCollectionImpl::calcLength): (DOM::HTMLCollectionImpl::item): (DOM::HTMLCollectionImpl::namedItem): (DOM::HTMLCollectionImpl::updateNameCache): (DOM::HTMLCollectionImpl::namedItems): (DOM::HTMLCollectionImpl::nextNamedItem): (DOM::HTMLFormCollectionImpl::HTMLFormCollectionImpl): (DOM::HTMLFormCollectionImpl::calcLength): (DOM::HTMLFormCollectionImpl::item): (DOM::HTMLFormCollectionImpl::getNamedFormItem): (DOM::HTMLFormCollectionImpl::nextNamedItemInternal): (DOM::HTMLFormCollectionImpl::namedItem): (DOM::HTMLFormCollectionImpl::updateNameCache): * khtml/html/html_miscimpl.h: (DOM::HTMLCollectionImpl::base): * khtml/html/htmlparser.cpp: (KHTMLParser::parseToken): (KHTMLParser::insertNode): * khtml/html/htmltokenizer.cpp: (khtml::HTMLTokenizer::scriptExecution): * khtml/khtml_events.cpp: (khtml::MouseEvent::MouseEvent): (khtml::MouseEvent::offset): * khtml/khtml_events.h: (khtml::MouseEvent::innerNode): (khtml::MousePressEvent::MousePressEvent): (khtml::MouseDoubleClickEvent::MouseDoubleClickEvent): (khtml::MouseMoveEvent::MouseMoveEvent): (khtml::MouseReleaseEvent::MouseReleaseEvent): * khtml/khtml_part.cpp: (KHTMLPart::closeURL): (KHTMLPart::executeScript): (KHTMLPart::scheduleScript): (KHTMLPart::executeScheduledScript): (KHTMLPart::clear): (KHTMLPart::selectClosestWordFromMouseEvent): (KHTMLPart::handleMousePressEventDoubleClick): (KHTMLPart::handleMousePressEventTripleClick): (KHTMLPart::handleMousePressEventSingleClick): (KHTMLPart::khtmlMousePressEvent): (KHTMLPart::handleMouseMoveEventDrag): (KHTMLPart::handleMouseMoveEventOver): (KHTMLPart::handleMouseMoveEventSelection): (KHTMLPart::khtmlMouseReleaseEvent): (KHTMLPart::selectionHasStyle): (KHTMLPart::selectionStartHasStyle): * khtml/khtml_part.h: * khtml/khtmlpart_p.h: * khtml/khtmlview.cpp: (KHTMLViewPrivate::reset): (KHTMLView::viewportMousePressEvent): (KHTMLView::viewportMouseDoubleClickEvent): (KHTMLView::contentsContextMenuEvent): (KHTMLView::updateDragAndDrop): (KHTMLView::cancelDragAndDrop): (KHTMLView::performDragAndDrop): (KHTMLView::focusNextPrevNode): * kwq/DOM-CSS.mm: (-[DOMCSSStyleSheet cssRules]): (-[DOMCSSStyleDeclaration getPropertyValue:]): (-[DOMCSSStyleDeclaration getPropertyCSSValue:]): (-[DOMCSSStyleDeclaration removeProperty:]): (-[DOMCSSStyleDeclaration getPropertyPriority:]): (-[DOMCSSStyleDeclaration setProperty:::]): (-[DOMCSSValue setCssText:]): * kwq/DOMCSS.h: * kwq/DOMHTML.mm: (-[DOMHTMLElement setInnerHTML:]): (-[DOMHTMLElement setOuterHTML:]): (-[DOMHTMLElement setInnerText:]): (-[DOMHTMLElement setOuterText:]): (-[DOMHTMLSelectElement setLength:]): (-[DOMHTMLTableSectionElement insertRow:]): * kwq/DOMInternal.h: * kwq/DOMInternal.mm: (raiseDOMException): (-[WebScriptObject _initializeScriptDOMNodeImp]): * kwq/DOMUtility.mm: (KJS::ScriptInterpreter::createObjcInstanceForValue): * kwq/KWQAccObject.mm: (-[KWQAccObject accessibilityAttributeValue:]): * kwq/KWQKHTMLPart.h: * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::KWQKHTMLPart): (KWQKHTMLPart::advanceToNextMisspelling): (KWQKHTMLPart::scrollOverflow): (KWQKHTMLPart::paint): (KWQKHTMLPart::openURLFromPageCache): (KWQKHTMLPart::khtmlMousePressEvent): (KWQKHTMLPart::passWidgetMouseDownEventToWidget): (KWQKHTMLPart::dispatchDragSrcEvent): (KWQKHTMLPart::eventMayStartDrag): (KWQKHTMLPart::khtmlMouseMoveEvent): (KWQKHTMLPart::dragSourceEndedAt): (KWQKHTMLPart::mouseDown): (KWQKHTMLPart::sendContextMenuEvent): (listParent): (isTextFirstInListItem): (KWQKHTMLPart::attributedString): (KWQKHTMLPart::snapshotDragImage): (KWQKHTMLPart::mousePressNode): * kwq/WebCoreBridge.mm: (updateRenderingForBindings): (-[WebCoreBridge _documentTypeString]): 2005-05-10 Maciej Stachowiak <mjs@apple.com> Reviewed by John. - rename hasAnchor method to isLink * khtml/css/cssstyleselector.cpp: (khtml::checkPseudoState): (khtml::CSSStyleSelector::canShareStyleWithElement): (khtml::CSSStyleSelector::styleForElement): (khtml::CSSStyleSelector::checkOneSelector): * khtml/editing/htmlediting.cpp: (khtml::isSpecialElement): * khtml/html/html_imageimpl.cpp: (HTMLImageElementImpl::parseHTMLAttribute): * khtml/html/html_inlineimpl.cpp: (DOM::HTMLAnchorElementImpl::isFocusable): (DOM::HTMLAnchorElementImpl::defaultEventHandler): (DOM::HTMLAnchorElementImpl::parseHTMLAttribute): * khtml/rendering/render_flexbox.cpp: (khtml::RenderFlexibleBox::layoutVerticalBox): * khtml/rendering/render_layer.cpp: (RenderLayer::hitTest): * khtml/rendering/render_object.cpp: (RenderObject::information): * khtml/xml/dom_nodeimpl.cpp: (NodeImpl::NodeImpl): * khtml/xml/dom_nodeimpl.h: (DOM::NodeImpl::isLink): * kwq/KWQAccObject.mm: (-[KWQAccObject anchorElement]): (-[KWQAccObject addChildrenToArray:]): (-[KWQAccObject role]): (-[KWQAccObject title]): (-[KWQAccObject accessibilityIsIgnored]): (-[KWQAccObject accessibilityAttributeNames]): (-[KWQAccObject accessibilityAttributeValue:]): * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::khtmlMouseMoveEvent): 2005-05-09 Maciej Stachowiak <mjs@apple.com> Reviewed by John. - remove init hint argument from VisiblePosition * khtml/editing/visible_position.cpp: (khtml::VisiblePosition::VisiblePosition): (khtml::VisiblePosition::init): * khtml/editing/visible_position.h: * khtml/editing/visible_units.cpp: (khtml::previousBoundary): (khtml::nextBoundary): * khtml/xml/dom_docimpl.cpp: (DocumentImpl::updateSelection): * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::styleForSelectionStart): * kwq/WebCoreBridge.mm: (-[WebCoreBridge setSelectedDOMRange:affinity:closeTyping:]): 2005-05-10 Darin Adler <darin@apple.com> Reviewed by David Harrison. - next pass of moving code from C++ DOM wrappers into the DOM impl. classes (this step adds more member functions missing from the DOM impl. and changes some of the Objective-C DOM to call the new ones; also changes some parameter types in the DOM impl.) * khtml/dom/dom2_events.cpp: (UIEvent::initUIEvent): (MouseEvent::initMouseEvent): (MutationEvent::initMutationEvent): (KeyboardEvent::initKeyboardEvent): * khtml/dom/dom_doc.cpp: (DOM::DOMImplementation::createDocument): (DOM::Document::getElementsByTagName): (DOM::Document::getElementsByTagNameNS): * khtml/dom/dom_element.cpp: (Element::removeAttributeNode): (Element::getElementsByTagName): (Element::getElementsByTagNameNS): (Element::setAttributeNodeNS): * khtml/dom/dom_node.cpp: (NamedNodeMap::setNamedItemNS): (NamedNodeMap::removeNamedItemNS): * khtml/ecma/kjs_binding.cpp: * khtml/ecma/kjs_events.cpp: (ClipboardProtoFunc::tryCall): * khtml/editing/jsediting.cpp: * khtml/khtml_part.cpp: (KHTMLPart::applyEditingStyleToBodyElement): (KHTMLPart::removeEditingStyleFromBodyElement): * khtml/khtmlview.cpp: (KHTMLView::viewportMousePressEvent): (KHTMLView::viewportMouseDoubleClickEvent): (KHTMLView::viewportMouseMoveEvent): (KHTMLView::viewportMouseReleaseEvent): (KHTMLView::updateDragAndDrop): (KHTMLView::dispatchMouseEvent): * khtml/misc/shared.h: (khtml::SharedPtr::reset): (khtml::::operator): (khtml::static_pointer_cast): (khtml::const_pointer_cast): * khtml/xml/dom2_eventsimpl.cpp: (UIEventImpl::initUIEvent): (UIEventImpl::keyCode): (UIEventImpl::charCode): (UIEventImpl::layerX): (UIEventImpl::layerY): (UIEventImpl::pageX): (UIEventImpl::pageY): (UIEventImpl::which): (MouseRelatedEventImpl::pageX): (MouseRelatedEventImpl::pageY): (MouseEventImpl::initMouseEvent): (MouseEventImpl::which): (KeyboardEventImpl::initKeyboardEvent): (KeyboardEventImpl::which): (MutationEventImpl::MutationEventImpl): (MutationEventImpl::initMutationEvent): * khtml/xml/dom2_eventsimpl.h: (DOM::MutationEventImpl::relatedNode): * khtml/xml/dom2_rangeimpl.h: * khtml/xml/dom2_traversalimpl.cpp: (DOM::NodeFilterImpl::acceptNode): * khtml/xml/dom2_traversalimpl.h: * khtml/xml/dom_docimpl.cpp: (DOMImplementationImpl::createDocument): (DOMImplementationImpl::createCSSStyleSheet): (DOMImplementationImpl::createHTMLDocument): (DocumentImpl::createAttribute): (DocumentImpl::createHTMLElement): (DocumentImpl::getOverrideStyle): (DocumentImpl::defaultEventHandler): (DocumentImpl::completeURL): (DocumentImpl::topDocument): (DocumentImpl::createAttributeNS): (DocumentImpl::images): (DocumentImpl::applets): (DocumentImpl::embeds): (DocumentImpl::objects): (DocumentImpl::links): (DocumentImpl::forms): (DocumentImpl::anchors): (DocumentImpl::all): (DocumentImpl::nameableItems): (DocumentImpl::getElementsByName): * khtml/xml/dom_docimpl.h: (DOM::DocumentImpl::realDocType): (DOM::DocumentImpl::createAttribute): * khtml/xml/dom_elementimpl.cpp: (AttrImpl::nodeName): (AttrImpl::nodeValue): (AttrImpl::name): (AttrImpl::value): (ElementImpl::attributes): (ElementImpl::isURLAttribute): (ElementImpl::setAttributeNode): (ElementImpl::removeAttributeNode): (ElementImpl::setAttributeNS): (ElementImpl::removeAttributeNS): (ElementImpl::getAttributeNodeNS): (ElementImpl::hasAttributeNS): (ElementImpl::style): (XMLElementImpl::cloneNode): (NamedAttrMapImpl::setNamedItem): (NamedAttrMapImpl::removeNamedItem): * khtml/xml/dom_elementimpl.h: (DOM::ElementImpl::hasAttribute): (DOM::ElementImpl::getAttribute): (DOM::ElementImpl::setAttribute): (DOM::ElementImpl::removeAttribute): (DOM::ElementImpl::getAttributeNode): (DOM::ElementImpl::setAttributeNodeNS): * khtml/xml/dom_nodeimpl.cpp: (NodeImpl::handleLocalEvents): (NodeImpl::isAncestor): (NodeImpl::addEventListener): (NodeImpl::removeEventListener): (NodeImpl::getElementsByTagNameNS): (NodeImpl::isSupported): (NodeImpl::ownerDocument): (NodeImpl::hasAttributes): (NodeImpl::attributes): (ContainerNodeImpl::removeChildren): (NamedNodeMapImpl::~NamedNodeMapImpl): (NamedNodeMapImpl::getNamedItemNS): (NamedNodeMapImpl::removeNamedItemNS): * khtml/xml/dom_nodeimpl.h: (DOM::NodeImpl::getElementsByTagName): (DOM::NamedNodeMapImpl::NamedNodeMapImpl): (DOM::NamedNodeMapImpl::getNamedItem): (DOM::NamedNodeMapImpl::removeNamedItem): (DOM::NamedNodeMapImpl::setNamedItemNS): (DOM::NamedNodeMapImpl::isReadOnly): * khtml/xml/dom_textimpl.h: * khtml/xml/dom_xmlimpl.h: * kwq/DOM.mm: (-[DOMNode isSupported::]): (-[DOMNode namespaceURI]): (-[DOMNode hasAttributes]): (-[DOMNamedNodeMap getNamedItem:]): (-[DOMNamedNodeMap setNamedItem:]): (-[DOMNamedNodeMap removeNamedItem:]): (-[DOMNamedNodeMap getNamedItemNS::]): (-[DOMNamedNodeMap setNamedItemNS:]): (-[DOMNamedNodeMap removeNamedItemNS::]): (-[DOMImplementation createDocument:::]): (-[DOMImplementation createCSSStyleSheet::]): (-[DOMDocument createAttribute:]): (-[DOMDocument getElementsByTagName:]): (-[DOMDocument createAttributeNS::]): (-[DOMDocument getElementsByTagNameNS::]): (-[DOMElement setAttribute::]): (-[DOMElement removeAttribute:]): (-[DOMElement getAttributeNode:]): (-[DOMElement setAttributeNode:]): (-[DOMElement removeAttributeNode:]): (-[DOMElement getElementsByTagName:]): (-[DOMElement getAttributeNS::]): (-[DOMElement setAttributeNS:::]): (-[DOMElement removeAttributeNS::]): (-[DOMElement getAttributeNodeNS::]): (-[DOMElement setAttributeNodeNS:]): (-[DOMElement getElementsByTagNameNS::]): (-[DOMElement hasAttribute:]): (-[DOMElement hasAttributeNS::]): (-[DOMElement style]): (-[DOMDocumentType _documentTypeImpl]): (ObjCNodeFilterCondition::acceptNode): * kwq/DOMEvents.mm: (-[DOMMutationEvent relatedNode]): * kwq/KWQClipboard.h: * kwq/KWQClipboard.mm: (KWQClipboard::KWQClipboard): (KWQClipboard::setDragImage): (KWQClipboard::dragImageElement): (KWQClipboard::setDragImageElement): (KWQClipboard::dragNSImage): * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::khtmlMouseMoveEvent): (KWQKHTMLPart::passSubframeEventToSubframe): (KWQKHTMLPart::sendContextMenuEvent): 2005-05-10 Darin Adler <darin@apple.com> Reviewed by David Harrison. - first pass of moving code from C++ DOM wrappers into the DOM impl. classes (this step mostly adds member functions missing from the DOM impl.; later steps will change the C++, JavaScript, and ObjC wrappers to call these functions) * khtml/css/parser.y: * khtml/css/css_ruleimpl.cpp: (CSSRuleListImpl::CSSRuleListImpl): * khtml/css/css_ruleimpl.h: (DOM::CSSRuleListImpl::CSSRuleListImpl): * khtml/html/html_baseimpl.cpp: (HTMLBodyElementImpl::aLink): (HTMLBodyElementImpl::setALink): (HTMLBodyElementImpl::background): (HTMLBodyElementImpl::setBackground): (HTMLBodyElementImpl::bgColor): (HTMLBodyElementImpl::setBgColor): (HTMLBodyElementImpl::link): (HTMLBodyElementImpl::setLink): (HTMLBodyElementImpl::text): (HTMLBodyElementImpl::setText): (HTMLBodyElementImpl::vLink): (HTMLBodyElementImpl::setVLink): (HTMLFrameElementImpl::HTMLFrameElementImpl): (HTMLFrameElementImpl::updateForNewURL): (HTMLFrameElementImpl::openURL): (HTMLFrameElementImpl::parseHTMLAttribute): (HTMLFrameElementImpl::rendererIsNeeded): (HTMLFrameElementImpl::attach): (HTMLFrameElementImpl::detach): (HTMLFrameElementImpl::setLocation): (HTMLFrameElementImpl::contentPart): (HTMLFrameElementImpl::frameBorder): (HTMLFrameElementImpl::setFrameBorder): (HTMLFrameElementImpl::longDesc): (HTMLFrameElementImpl::setLongDesc): (HTMLFrameElementImpl::marginHeight): (HTMLFrameElementImpl::setMarginHeight): (HTMLFrameElementImpl::marginWidth): (HTMLFrameElementImpl::setMarginWidth): (HTMLFrameElementImpl::name): (HTMLFrameElementImpl::setName): (HTMLFrameElementImpl::setNoResize): (HTMLFrameElementImpl::scrolling): (HTMLFrameElementImpl::setScrolling): (HTMLFrameElementImpl::src): (HTMLFrameElementImpl::setSrc): (HTMLFrameSetElementImpl::parseHTMLAttribute): (HTMLFrameSetElementImpl::cols): (HTMLFrameSetElementImpl::setCols): (HTMLFrameSetElementImpl::rows): (HTMLFrameSetElementImpl::setRows): (HTMLHeadElementImpl::profile): (HTMLHeadElementImpl::setProfile): (HTMLHtmlElementImpl::version): (HTMLHtmlElementImpl::setVersion): (HTMLIFrameElementImpl::HTMLIFrameElementImpl): (HTMLIFrameElementImpl::rendererIsNeeded): (HTMLIFrameElementImpl::attach): (HTMLIFrameElementImpl::isURLAttribute): (HTMLIFrameElementImpl::align): (HTMLIFrameElementImpl::setAlign): (HTMLIFrameElementImpl::height): (HTMLIFrameElementImpl::setHeight): (HTMLIFrameElementImpl::src): (HTMLIFrameElementImpl::width): (HTMLIFrameElementImpl::setWidth): * khtml/html/html_baseimpl.h: (DOM::HTMLFrameElementImpl::noResize): (DOM::HTMLFrameElementImpl::scrollingMode): (DOM::HTMLFrameElementImpl::getMarginWidth): (DOM::HTMLFrameElementImpl::getMarginHeight): * khtml/html/html_blockimpl.cpp: (HTMLBlockquoteElementImpl::cite): (HTMLBlockquoteElementImpl::setCite): (HTMLDivElementImpl::align): (HTMLDivElementImpl::setAlign): (HTMLHRElementImpl::align): (HTMLHRElementImpl::setAlign): (HTMLHRElementImpl::noShade): (HTMLHRElementImpl::setNoShade): (HTMLHRElementImpl::size): (HTMLHRElementImpl::setSize): (HTMLHRElementImpl::width): (HTMLHRElementImpl::setWidth): (HTMLHeadingElementImpl::align): (HTMLHeadingElementImpl::setAlign): (HTMLParagraphElementImpl::align): (HTMLParagraphElementImpl::setAlign): (HTMLPreElementImpl::width): (HTMLPreElementImpl::setWidth): * khtml/html/html_blockimpl.h: * khtml/html/html_imageimpl.cpp: (HTMLImageElementImpl::name): (HTMLImageElementImpl::setName): (HTMLImageElementImpl::align): (HTMLImageElementImpl::setAlign): (HTMLImageElementImpl::alt): (HTMLImageElementImpl::setAlt): (HTMLImageElementImpl::border): (HTMLImageElementImpl::setBorder): (HTMLImageElementImpl::setHeight): (HTMLImageElementImpl::hspace): (HTMLImageElementImpl::setHspace): (HTMLImageElementImpl::isMap): (HTMLImageElementImpl::setIsMap): (HTMLImageElementImpl::longDesc): (HTMLImageElementImpl::setLongDesc): (HTMLImageElementImpl::src): (HTMLImageElementImpl::setSrc): (HTMLImageElementImpl::useMap): (HTMLImageElementImpl::setUseMap): (HTMLImageElementImpl::vspace): (HTMLImageElementImpl::setVspace): (HTMLImageElementImpl::setWidth): (HTMLImageElementImpl::x): (HTMLImageElementImpl::y): (HTMLMapElementImpl::parseHTMLAttribute): (HTMLMapElementImpl::areas): (HTMLMapElementImpl::name): (HTMLMapElementImpl::setName): (HTMLAreaElementImpl::HTMLAreaElementImpl): (HTMLAreaElementImpl::parseHTMLAttribute): (HTMLAreaElementImpl::getRegion): (HTMLAreaElementImpl::accessKey): (HTMLAreaElementImpl::setAccessKey): (HTMLAreaElementImpl::alt): (HTMLAreaElementImpl::setAlt): (HTMLAreaElementImpl::coords): (HTMLAreaElementImpl::setCoords): (HTMLAreaElementImpl::href): (HTMLAreaElementImpl::setHref): (HTMLAreaElementImpl::noHref): (HTMLAreaElementImpl::setNoHref): (HTMLAreaElementImpl::shape): (HTMLAreaElementImpl::setShape): (HTMLAreaElementImpl::tabIndex): (HTMLAreaElementImpl::setTabIndex): (HTMLAreaElementImpl::target): (HTMLAreaElementImpl::setTarget): * khtml/html/html_imageimpl.h: (DOM::HTMLImageElementImpl::pixmap): (DOM::HTMLAreaElementImpl::isDefault): (DOM::HTMLMapElementImpl::getName): * khtml/html/html_inlineimpl.cpp: (DOM::HTMLAnchorElementImpl::accessKey): (DOM::HTMLAnchorElementImpl::setAccessKey): (DOM::HTMLAnchorElementImpl::charset): (DOM::HTMLAnchorElementImpl::setCharset): (DOM::HTMLAnchorElementImpl::coords): (DOM::HTMLAnchorElementImpl::setCoords): (DOM::HTMLAnchorElementImpl::href): (DOM::HTMLAnchorElementImpl::setHref): (DOM::HTMLAnchorElementImpl::hreflang): (DOM::HTMLAnchorElementImpl::setHreflang): (DOM::HTMLAnchorElementImpl::name): (DOM::HTMLAnchorElementImpl::setName): (DOM::HTMLAnchorElementImpl::rel): (DOM::HTMLAnchorElementImpl::setRel): (DOM::HTMLAnchorElementImpl::rev): (DOM::HTMLAnchorElementImpl::setRev): (DOM::HTMLAnchorElementImpl::shape): (DOM::HTMLAnchorElementImpl::setShape): (DOM::HTMLAnchorElementImpl::tabIndex): (DOM::HTMLAnchorElementImpl::setTabIndex): (DOM::HTMLAnchorElementImpl::target): (DOM::HTMLAnchorElementImpl::setTarget): (DOM::HTMLAnchorElementImpl::type): (DOM::HTMLAnchorElementImpl::setType): (DOM::HTMLAnchorElementImpl::blur): (DOM::HTMLAnchorElementImpl::focus): (DOM::HTMLBRElementImpl::clear): (DOM::HTMLBRElementImpl::setClear): (DOM::HTMLFontElementImpl::parseHTMLAttribute): (DOM::HTMLFontElementImpl::color): (DOM::HTMLFontElementImpl::setColor): (DOM::HTMLFontElementImpl::face): (DOM::HTMLFontElementImpl::setFace): (DOM::HTMLFontElementImpl::size): (DOM::HTMLFontElementImpl::setSize): (DOM::HTMLModElementImpl::HTMLModElementImpl): (DOM::HTMLModElementImpl::cite): (DOM::HTMLModElementImpl::setCite): (DOM::HTMLModElementImpl::dateTime): (DOM::HTMLModElementImpl::setDateTime): (DOM::HTMLQuoteElementImpl::HTMLQuoteElementImpl): (DOM::HTMLQuoteElementImpl::id): (DOM::HTMLQuoteElementImpl::cite): (DOM::HTMLQuoteElementImpl::setCite): * khtml/html/html_inlineimpl.h: * khtml/html/html_listimpl.cpp: (DOM::HTMLUListElementImpl::compact): (DOM::HTMLUListElementImpl::setCompact): (DOM::HTMLUListElementImpl::type): (DOM::HTMLUListElementImpl::setType): (DOM::HTMLDirectoryElementImpl::compact): (DOM::HTMLDirectoryElementImpl::setCompact): (DOM::HTMLMenuElementImpl::compact): (DOM::HTMLMenuElementImpl::setCompact): (DOM::HTMLOListElementImpl::compact): (DOM::HTMLOListElementImpl::setCompact): (DOM::HTMLOListElementImpl::setStart): (DOM::HTMLOListElementImpl::type): (DOM::HTMLOListElementImpl::setType): (DOM::HTMLLIElementImpl::type): (DOM::HTMLLIElementImpl::setType): (DOM::HTMLLIElementImpl::value): (DOM::HTMLLIElementImpl::setValue): (DOM::HTMLDListElementImpl::compact): (DOM::HTMLDListElementImpl::setCompact): * khtml/html/html_listimpl.h: (DOM::HTMLUListElementImpl::start): (DOM::HTMLDirectoryElementImpl::HTMLDirectoryElementImpl): (DOM::HTMLMenuElementImpl::HTMLMenuElementImpl): (DOM::HTMLOListElementImpl::HTMLOListElementImpl): (DOM::HTMLOListElementImpl::start): * khtml/html/html_objectimpl.cpp: (DOM::HTMLAppletElementImpl::align): (DOM::HTMLAppletElementImpl::setAlign): (DOM::HTMLAppletElementImpl::alt): (DOM::HTMLAppletElementImpl::setAlt): (DOM::HTMLAppletElementImpl::archive): (DOM::HTMLAppletElementImpl::setArchive): (DOM::HTMLAppletElementImpl::code): (DOM::HTMLAppletElementImpl::setCode): (DOM::HTMLAppletElementImpl::codeBase): (DOM::HTMLAppletElementImpl::setCodeBase): (DOM::HTMLAppletElementImpl::height): (DOM::HTMLAppletElementImpl::setHeight): (DOM::HTMLAppletElementImpl::hspace): (DOM::HTMLAppletElementImpl::setHspace): (DOM::HTMLAppletElementImpl::name): (DOM::HTMLAppletElementImpl::setName): (DOM::HTMLAppletElementImpl::object): (DOM::HTMLAppletElementImpl::setObject): (DOM::HTMLAppletElementImpl::vspace): (DOM::HTMLAppletElementImpl::setVspace): (DOM::HTMLAppletElementImpl::width): (DOM::HTMLAppletElementImpl::setWidth): (DOM::HTMLObjectElementImpl::code): (DOM::HTMLObjectElementImpl::setCode): (DOM::HTMLObjectElementImpl::align): (DOM::HTMLObjectElementImpl::setAlign): (DOM::HTMLObjectElementImpl::archive): (DOM::HTMLObjectElementImpl::setArchive): (DOM::HTMLObjectElementImpl::border): (DOM::HTMLObjectElementImpl::setBorder): (DOM::HTMLObjectElementImpl::codeBase): (DOM::HTMLObjectElementImpl::setCodeBase): (DOM::HTMLObjectElementImpl::codeType): (DOM::HTMLObjectElementImpl::setCodeType): (DOM::HTMLObjectElementImpl::data): (DOM::HTMLObjectElementImpl::setData): (DOM::HTMLObjectElementImpl::declare): (DOM::HTMLObjectElementImpl::setDeclare): (DOM::HTMLObjectElementImpl::height): (DOM::HTMLObjectElementImpl::setHeight): (DOM::HTMLObjectElementImpl::hspace): (DOM::HTMLObjectElementImpl::setHspace): (DOM::HTMLObjectElementImpl::name): (DOM::HTMLObjectElementImpl::setName): (DOM::HTMLObjectElementImpl::standby): (DOM::HTMLObjectElementImpl::setStandby): (DOM::HTMLObjectElementImpl::tabIndex): (DOM::HTMLObjectElementImpl::setTabIndex): (DOM::HTMLObjectElementImpl::type): (DOM::HTMLObjectElementImpl::setType): (DOM::HTMLObjectElementImpl::useMap): (DOM::HTMLObjectElementImpl::setUseMap): (DOM::HTMLObjectElementImpl::vspace): (DOM::HTMLObjectElementImpl::setVspace): (DOM::HTMLObjectElementImpl::width): (DOM::HTMLObjectElementImpl::setWidth): (DOM::HTMLParamElementImpl::isURLAttribute): (DOM::HTMLParamElementImpl::setName): (DOM::HTMLParamElementImpl::type): (DOM::HTMLParamElementImpl::setType): (DOM::HTMLParamElementImpl::setValue): (DOM::HTMLParamElementImpl::valueType): (DOM::HTMLParamElementImpl::setValueType): * khtml/html/html_objectimpl.h: (DOM::HTMLParamElementImpl::name): (DOM::HTMLParamElementImpl::value): * khtml/html/html_tableimpl.cpp: (DOM::HTMLTableElementImpl::rows): (DOM::HTMLTableElementImpl::tBodies): (DOM::HTMLTableElementImpl::align): (DOM::HTMLTableElementImpl::setAlign): (DOM::HTMLTableElementImpl::bgColor): (DOM::HTMLTableElementImpl::setBgColor): (DOM::HTMLTableElementImpl::border): (DOM::HTMLTableElementImpl::setBorder): (DOM::HTMLTableElementImpl::cellPadding): (DOM::HTMLTableElementImpl::setCellPadding): (DOM::HTMLTableElementImpl::cellSpacing): (DOM::HTMLTableElementImpl::setCellSpacing): (DOM::HTMLTableElementImpl::frame): (DOM::HTMLTableElementImpl::setFrame): (DOM::HTMLTableElementImpl::rules): (DOM::HTMLTableElementImpl::setRules): (DOM::HTMLTableElementImpl::summary): (DOM::HTMLTableElementImpl::setSummary): (DOM::HTMLTableElementImpl::width): (DOM::HTMLTableElementImpl::setWidth): (DOM::HTMLTableSectionElementImpl::align): (DOM::HTMLTableSectionElementImpl::setAlign): (DOM::HTMLTableSectionElementImpl::ch): (DOM::HTMLTableSectionElementImpl::setCh): (DOM::HTMLTableSectionElementImpl::chOff): (DOM::HTMLTableSectionElementImpl::setChOff): (DOM::HTMLTableSectionElementImpl::vAlign): (DOM::HTMLTableSectionElementImpl::setVAlign): (DOM::HTMLTableSectionElementImpl::rows): (DOM::HTMLTableRowElementImpl::cells): (DOM::HTMLTableRowElementImpl::setCells): (DOM::HTMLTableRowElementImpl::align): (DOM::HTMLTableRowElementImpl::setAlign): (DOM::HTMLTableRowElementImpl::bgColor): (DOM::HTMLTableRowElementImpl::setBgColor): (DOM::HTMLTableRowElementImpl::ch): (DOM::HTMLTableRowElementImpl::setCh): (DOM::HTMLTableRowElementImpl::chOff): (DOM::HTMLTableRowElementImpl::setChOff): (DOM::HTMLTableRowElementImpl::vAlign): (DOM::HTMLTableRowElementImpl::setVAlign): (DOM::HTMLTableCellElementImpl::abbr): (DOM::HTMLTableCellElementImpl::setAbbr): (DOM::HTMLTableCellElementImpl::align): (DOM::HTMLTableCellElementImpl::setAlign): (DOM::HTMLTableCellElementImpl::axis): (DOM::HTMLTableCellElementImpl::setAxis): (DOM::HTMLTableCellElementImpl::bgColor): (DOM::HTMLTableCellElementImpl::setBgColor): (DOM::HTMLTableCellElementImpl::ch): (DOM::HTMLTableCellElementImpl::setCh): (DOM::HTMLTableCellElementImpl::chOff): (DOM::HTMLTableCellElementImpl::setChOff): (DOM::HTMLTableCellElementImpl::setColSpan): (DOM::HTMLTableCellElementImpl::headers): (DOM::HTMLTableCellElementImpl::setHeaders): (DOM::HTMLTableCellElementImpl::height): (DOM::HTMLTableCellElementImpl::setHeight): (DOM::HTMLTableCellElementImpl::noWrap): (DOM::HTMLTableCellElementImpl::setNoWrap): (DOM::HTMLTableCellElementImpl::setRowSpan): (DOM::HTMLTableCellElementImpl::scope): (DOM::HTMLTableCellElementImpl::setScope): (DOM::HTMLTableCellElementImpl::vAlign): (DOM::HTMLTableCellElementImpl::setVAlign): (DOM::HTMLTableCellElementImpl::width): (DOM::HTMLTableCellElementImpl::setWidth): (DOM::HTMLTableColElementImpl::align): (DOM::HTMLTableColElementImpl::setAlign): (DOM::HTMLTableColElementImpl::ch): (DOM::HTMLTableColElementImpl::setCh): (DOM::HTMLTableColElementImpl::chOff): (DOM::HTMLTableColElementImpl::setChOff): (DOM::HTMLTableColElementImpl::setSpan): (DOM::HTMLTableColElementImpl::vAlign): (DOM::HTMLTableColElementImpl::setVAlign): (DOM::HTMLTableColElementImpl::width): (DOM::HTMLTableColElementImpl::setWidth): (DOM::HTMLTableCaptionElementImpl::parseHTMLAttribute): (DOM::HTMLTableCaptionElementImpl::align): (DOM::HTMLTableCaptionElementImpl::setAlign): * khtml/html/html_tableimpl.h: (DOM::HTMLTableColElementImpl::span): * khtml/rendering/render_applet.cpp: (RenderApplet::createWidgetIfNecessary): * khtml/rendering/render_frames.cpp: (RenderFrame::slotViewCleared): (RenderPartObject::updateWidget): (RenderPartObject::slotViewCleared): * khtml/xml/dom_docimpl.cpp: (DocumentImpl::completeURL): * khtml/xml/dom_docimpl.h: 2005-05-09 Maciej Stachowiak <mjs@apple.com> Reviewed by Kevin. - remove more isFirst/isLast functions and use isStart/isEnd verions instead * khtml/editing/htmlediting.cpp: (khtml::DeleteSelectionCommand::initializePositionData): (khtml::InsertParagraphSeparatorCommand::calculateStyleBeforeInsertion): (khtml::InsertTextCommand::input): (khtml::ReplaceSelectionCommand::doApply): (khtml::ReplaceSelectionCommand::removeLinePlaceholderIfNeeded): * khtml/editing/visible_position.cpp: (khtml::VisiblePosition::previous): (khtml::setAffinityUsingLinePosition): (khtml::isFirstVisiblePositionInNode): * khtml/editing/visible_position.h: * khtml/editing/visible_units.cpp: (khtml::endOfLine): (khtml::previousLinePosition): * khtml/xml/dom_position.cpp: (DOM::Position::previousCharacterPosition): (DOM::Position::nextCharacterPosition): * kwq/WebCoreBridge.mm: (-[WebCoreBridge smartInsertForString:replacingRange:beforeString:afterString:]): 2005-05-09 Maciej Stachowiak <mjs@apple.com> Reviewed by Kevin. - remove isFirstVisiblePositionInBlock and isLastVisiblePositionInBlock, in favor of isStartOfBlock and isEndOfBlock It turned out that both isEndOfBlock and isLastVisiblePositionInBlock had (different) bugs, and there was code relying on the bugs of each. So in addition I fixed isEndOfBlock and fixed the parts of the code relying on buggy behavior. I also removed the includeEndOfLine parameter to endOfBlock since no one used it and it's not clear if it would ever be useful. * khtml/editing/htmlediting.cpp: (khtml::InsertLineBreakCommand::doApply): Use new calls. (khtml::InsertParagraphSeparatorCommand::calculateStyleBeforeInsertion): Don't gratuitously make an UPSTREAM VisiblePosition, as this will cause trouble comparing it to end of block. (khtml::InsertParagraphSeparatorCommand::doApply): Use new calls. (khtml::ReplaceSelectionCommand::doApply): Use new calls. Also, don't make a position <BR,0> and test if it is the end of a block, that can never be true, although the buggy code in isLastVisiblePositionInBlock would say it is. Make <BR,1> instead. * khtml/editing/markup.cpp: (khtml::createMarkup): Instead of checking isEndOfBlock on the start position, check if the start's next is in a different block, to avoid relying on the buggy old isEndOfBlock behavior. * khtml/editing/visible_position.cpp: (khtml::isFirstVisiblePositionInParagraph): Use isStartOfBlock. (khtml::isLastVisiblePositionInParagraph): Use isEndOfBlock. * khtml/editing/visible_position.h: * khtml/editing/visible_units.cpp: (khtml::endOfBlock): Greatly simplify, and no longer consider the start of a descendant block to be the end of the block. That's inconsistent with how startOfBlock works. Also remove include end of line parameter. (khtml::isEndOfBlock): Don't pass unneeded parameter. * khtml/editing/visible_units.h: 2005-05-09 Adele Peterson <adele@apple.com> fix for <rdar://problem/4110775> Crash will occur when double-clicking outerHTML link on W3 DOM test Reviewed by Darin. * khtml/html/html_elementimpl.cpp: (HTMLElementImpl::setOuterHTML): added nil check. This was causing a crash when you tried to set the outerHTML on an element that was no longer in the DOM tree. * 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. * layout-tests/fast/dom/outerText-no-element-expected.txt: Added. * layout-tests/fast/dynamic/outerHTML-doc.html: Added. Tests case where someone tries to set outerHTML on the document. * layout-tests/fast/dynamic/outerHTML-doc-expected.txt: Added.. * 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. * layout-tests/fast/dynamic/outerHTML-no-element-expected.txt: Added. * layout-tests/fast/dynamic/outerHTML-img.html: moved images to resources directory * layout-tests/fast/dynamic/resources/apple.gif: Added. * layout-tests/fast/dynamic/resources/mozilla.gif: Added. 2005-05-09 Maciej Stachowiak <mjs@apple.com> Reviewed by Kevin. - remove code for DoNotStayInBlock variant of upstream/downstream and make the methods take no parameters * khtml/editing/htmlediting.cpp: (khtml::CompositeEditCommand::deleteInsignificantTextDownstream): (khtml::CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessary): (khtml::ApplyStyleCommand::applyRelativeFontStyleChange): (khtml::ApplyStyleCommand::applyInlineStyle): (khtml::ApplyStyleCommand::removeInlineStyle): (khtml::ApplyStyleCommand::nodeFullySelected): (khtml::ApplyStyleCommand::nodeFullyUnselected): (khtml::DeleteSelectionCommand::initializePositionData): (khtml::DeleteSelectionCommand::fixupWhitespace): (khtml::InsertLineBreakCommand::insertNodeAfterPosition): (khtml::InsertLineBreakCommand::insertNodeBeforePosition): (khtml::InsertLineBreakCommand::doApply): (khtml::InsertParagraphSeparatorCommand::doApply): (khtml::InsertParagraphSeparatorInQuotedContentCommand::doApply): (khtml::InsertTextCommand::prepareForTextInsertion): (khtml::InsertTextCommand::input): (khtml::InsertTextCommand::insertSpace): (khtml::ReplaceSelectionCommand::doApply): * khtml/editing/selection.cpp: (khtml::Selection::toRange): (khtml::Selection::validate): * khtml/editing/visible_position.cpp: (khtml::VisiblePosition::previousVisiblePosition): (khtml::VisiblePosition::nextVisiblePosition): (khtml::VisiblePosition::downstreamDeepEquivalent): (khtml::isFirstVisiblePositionInParagraph): (khtml::isFirstVisiblePositionInBlock): (khtml::isLastVisiblePositionInParagraph): * khtml/xml/dom2_rangeimpl.cpp: (DOM::RangeImpl::editingStartPosition): * khtml/xml/dom_position.cpp: (DOM::isStreamer): (DOM::Position::upstream): (DOM::Position::downstream): (DOM::Position::leadingWhitespacePosition): (DOM::Position::trailingWhitespacePosition): * khtml/xml/dom_position.h: * kwq/WebCoreBridge.mm: (-[WebCoreBridge smartDeleteRangeForProposedRange:]): 2005-05-08 Maciej Stachowiak <mjs@apple.com> Reviewed by Dave Harrison. - remove remaining uses of upstream/downstream DoNotStayInBlock * khtml/editing/htmlediting.cpp: (khtml::CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessary): (khtml::ApplyStyleCommand::nodeFullySelected): (khtml::ApplyStyleCommand::nodeFullyUnselected): (khtml::DeleteSelectionCommand::insertPlaceholderForAncestorBlockContent): (khtml::InsertParagraphSeparatorCommand::doApply): (khtml::InsertParagraphSeparatorInQuotedContentCommand::doApply): (khtml::InsertTextCommand::insertSpace): (khtml::ReplaceSelectionCommand::doApply): * khtml/editing/visible_position.cpp: (khtml::enclosingBlockFlowElement): New helper function. * khtml/editing/visible_position.h: * khtml/editing/visible_units.cpp: (khtml::inSameBlock): Check enclosing block flows instead of comparing visible block starts. Two nested blocks may have the same visible start but different visible ends, so the old check would give false positives. 2005-05-09 David Harrison <harrison@apple.com> Add layout test for <rdar://problem/4110366>. * layout-tests/editing/deleting/delete-at-paragraph-boundaries-011-expected.txt: Added. * layout-tests/editing/deleting/delete-at-paragraph-boundaries-011.html: Added. 2005-05-09 Darin Adler <darin@apple.com> - checked in a result for the Flash replacement test that Dave added * layout-tests/fast/dynamic/flash-replacement-test-expected.txt: Added. Hope it's right! If not, Dave can update it. 2005-05-09 Darin Adler <darin@apple.com> * Makefile.am: Don't set up PBXIntermediatesDirectory explicitly; Not needed to make builds work, spews undesirable error messages too. * WebCore.pbproj/project.pbxproj: Remove unneeded $(DSTROOT) in framework paths. 2005-05-07 Maciej Stachowiak <mjs@apple.com> Reviewed by Kevin. - remove some of the uses of upstream/downstream DoNotStayInBlock * khtml/editing/markup.cpp: (khtml::createMarkup): Instead of using upstream to decide if a line break should be added at the end, use inSameParagraph. * khtml/editing/selection.cpp: (khtml::Selection::debugPosition): Remove the code to print upstream and downstream, the selection endpoints themselves are adequate for debugging and are what we use for layout tests. * khtml/xml/dom2_rangeimpl.cpp: (DOM::RangeImpl::editingStartPosition): Skip a possible paragraph break at the start of the selection in a more explicit way to avoid DoNotStayInBlock. 2005-05-07 David Harrison <harrison@apple.com> Reviewed by John. <rdar://problem/4110366> Deleting text at the end of email moves insertion point to the top of the document * khtml/editing/htmlediting.cpp: (khtml::DeleteSelectionCommand::handleGeneralDelete): Update m_upstreamStart when deleting m_downstreamEnd.node() if the former is no longer in the document. Better to update here than trying to recover later in calculateEndingPosition(). 2005-05-07 David Harrison <harrison@apple.com> Remove workaround for <rdar://problem/4103339>. * khtml/editing/htmlediting.cpp: (khtml::DeleteSelectionCommand::initializePositionData): 2005-05-06 Maciej Stachowiak <mjs@apple.com> Reviewed by Dave Harrison. - make StayInBlock vs DoNotStayInBlock explicit in all calls to upstream/downstream, in preparation for phasing out the DoNotStayInBlock variant. * khtml/editing/htmlediting.cpp: (khtml::ApplyStyleCommand::nodeFullySelected): (khtml::ApplyStyleCommand::nodeFullyUnselected): (khtml::DeleteSelectionCommand::insertPlaceholderForAncestorBlockContent): (khtml::InsertParagraphSeparatorInQuotedContentCommand::doApply): (khtml::InsertTextCommand::insertSpace): (khtml::ReplaceSelectionCommand::doApply): * khtml/editing/markup.cpp: (khtml::createMarkup): * khtml/editing/selection.cpp: (khtml::Selection::debugPosition): * khtml/xml/dom_position.h: 2005-05-06 David Harrison <harrison@apple.com> Reviewed by Maciej, Darin. <rdar://problem/4103339> VisiblePosition and PositionIterator iterators do not return positions in order * WebCore.pbproj/project.pbxproj: Removed dom_positioniterator.h and dom_positioniterator.cpp. * khtml/editing/htmlediting.cpp: Removed unused include of dom_positioniterator.h and "using" of PositionIterator. * khtml/editing/selection.cpp: Removed unused include of dom_positioniterator.h. * khtml/editing/visible_position.h: * khtml/editing/visible_position.cpp: (khtml::VisiblePosition::previousVisiblePosition): (khtml::VisiblePosition::nextVisiblePosition): (khtml::VisiblePosition::downstreamDeepEquivalent): Use Position::next(), Position::previous(), Position::atStart(), Position::atEnd() instead of duplicated code. * khtml/xml/dom_nodeimpl.h: * khtml/xml/dom_nodeimpl.cpp: (NodeImpl::maxDeepOffset): Added to support Position::next(), Position::previous(), Position::atStart(), Position::atEnd() * khtml/xml/dom_position.h: * khtml/xml/dom_position.cpp: (DOM::Position::previous): (DOM::Position::next): (DOM::Position::atStart): (DOM::Position::atEnd): Moved here, replacing VisiblePosition's duplicate and PositionIterator. Fixed to return positions in order and not skip positions. (DOM::Position::previousCharacterPosition): (DOM::Position::nextCharacterPosition): Use Position::next(), Position::previous(), Position::atStart(), Position::atEnd() instead of PositionIterator. (DOM::isStreamer): (DOM::Position::upstream): (DOM::Position::downstream): Use Position::next(), Position::previous(), Position::atStart(), Position::atEnd() instead of PositionIterator. * khtml/xml/dom_positioniterator.cpp: Removed. * khtml/xml/dom_positioniterator.h: Removed. Removed in favor of Position::next(), Position::previous(), Position::atStart(), Position::atEnd() 2005-05-05 Maciej Stachowiak <mjs@apple.com> Reviewed by Darin. <rdar://problem/4058167> Unit Converter and Weather widgets crashed in KJS::Collector::markCurrentThreadConservatively Avoid possibly allocating new prototype objects as parameters to superclass constructors - there may be an allocated but uninitilized object so this is a bad time to allocate. Instead, set the prototype in the constructor body, since the object is happily allocated by then. * khtml/ecma/kjs_binding.h: * khtml/ecma/kjs_css.cpp: (DOMCSSStyleDeclaration::DOMCSSStyleDeclaration): (DOMMediaList::DOMMediaList): (DOMCSSStyleSheet::DOMCSSStyleSheet): (DOMCSSPrimitiveValue::DOMCSSPrimitiveValue): (DOMCSSValueList::DOMCSSValueList): * khtml/ecma/kjs_css.h: (KJS::DOMStyleSheet::DOMStyleSheet): (KJS::DOMCSSValue::DOMCSSValue): * khtml/ecma/kjs_dom.cpp: (DOMNode::DOMNode): (DOMDocument::DOMDocument): (DOMElement::DOMElement): (DOMDOMImplementation::DOMDOMImplementation): (DOMNamedNodeMap::DOMNamedNodeMap): (DOMNamedNodesCollection::DOMNamedNodesCollection): (DOMCharacterData::DOMCharacterData): (DOMText::DOMText): * khtml/ecma/kjs_dom.h: (KJS::NodeConstructor::NodeConstructor): (KJS::DOMExceptionConstructor::DOMExceptionConstructor): * khtml/ecma/kjs_events.cpp: (DOMEvent::DOMEvent): (Clipboard::Clipboard): * khtml/ecma/kjs_html.cpp: (HTMLCollection::HTMLCollection): * khtml/ecma/kjs_range.cpp: (DOMRange::DOMRange): * khtml/ecma/kjs_traversal.cpp: (DOMNodeIterator::DOMNodeIterator): (DOMNodeFilter::DOMNodeFilter): (DOMTreeWalker::DOMTreeWalker): * khtml/ecma/xmlhttprequest.cpp: (KJS::XMLHttpRequest::XMLHttpRequest): * khtml/ecma/xmlserializer.cpp: (KJS::XMLSerializer::XMLSerializer): 2005-05-06 Darin Adler <darin@apple.com> Reviewed by Maciej. - make building multiple trees with make work better * Makefile.am: Set up Xcode build directory before invoking xcodebuild. 2005-05-05 David Hyatt <hyatt@apple.com> Eliminate the FOUCS on wired.com. innerWidth and innerHeight on window should not do a layout that ignores pending stylesheets, since even if stylesheets are loading the correct window dimensions can be determined with a normal layout. The radar # is 4109888. Reviewed by rjw * khtml/ecma/kjs_window.cpp: (Window::get): (Window::updateLayout): * khtml/ecma/kjs_window.h: 2005-05-05 David Hyatt <hyatt@apple.com> Fix for 4109667, sIFR flash replacement technique often malfunctions. This bug occurs when the plugin widget update causes the onload for the document to fire. Because you can be in the middle of a style recalc when doing an attach (in response to a stylesheet load), the onload fires in the middle of the attach process when the tree is in a bogus state. The fix is to add a bit to the document that tells style recalc that the implicitClose() method was invoked during the style recalc process and the code has been patched so that when this situation occurs, the close is deferred until after the style recalc has finished. Reviewed by John Sullivan * khtml/xml/dom_docimpl.cpp: (DocumentImpl::DocumentImpl): (DocumentImpl::recalcStyle): (DocumentImpl::implicitClose): * khtml/xml/dom_docimpl.h: * layout-tests/fast/dynamic/flash-replacement-test.html: Added. 2005-05-05 Darin Adler <darin@apple.com> Reviewed by Dave Hyatt. - fixed <rdar://problem/4109564> REGRESSION (Atlanta): maps.google.com doesn't always center California correctly * khtml/ecma/kjs_events.cpp: (offsetFromTarget): Fix two places that said X where they should say Y. 2005-05-05 David Harrison <harrison@apple.com> Restore fixed setEndingSelection. Fixed method was ifdef'd out because change was at end of Tiger development, but method is unused. You just can never be _too_ safe. * khtml/editing/htmlediting.cpp: (khtml::EditCommandPtr::setEndingSelection): 2005-05-02 Maciej Stachowiak <mjs@apple.com> Reviewed by Vicki. - renamed NodeBaseImpl to ContainerNodeImpl * khtml/ecma/kjs_dom.cpp: (DOMNodeProtoFunc::tryCall): Avoid use of NodeBaseImpl and avoid use of obsolete checkNoOwner call, use isAncestor instead. * khtml/html/html_elementimpl.cpp: (HTMLElementImpl::setOuterText): Avoid gratuitous use of NodeBaseImpl. * khtml/xml/dom_nodeimpl.cpp: (NodeBaseImpl::checkNoOwner): Removed. Ther rest is all just simple renaming. * khtml/xml/dom_docimpl.cpp: (DocumentImpl::DocumentImpl): (DocumentImpl::attach): (DocumentImpl::detach): (DocumentFragmentImpl::DocumentFragmentImpl): * khtml/xml/dom_docimpl.h: * khtml/xml/dom_elementimpl.cpp: (AttrImpl::AttrImpl): (ElementImpl::ElementImpl): (ElementImpl::insertedIntoDocument): (ElementImpl::removedFromDocument): (ElementImpl::attach): (ElementImpl::dump): * khtml/xml/dom_elementimpl.h: * khtml/xml/dom_nodeimpl.cpp: (ContainerNodeImpl::ContainerNodeImpl): (ContainerNodeImpl::~ContainerNodeImpl): (ContainerNodeImpl::firstChild): (ContainerNodeImpl::lastChild): (ContainerNodeImpl::insertBefore): (ContainerNodeImpl::replaceChild): (ContainerNodeImpl::removeChild): (ContainerNodeImpl::removeChildren): (ContainerNodeImpl::appendChild): (ContainerNodeImpl::hasChildNodes): (ContainerNodeImpl::setFirstChild): (ContainerNodeImpl::setLastChild): (ContainerNodeImpl::checkSameDocument): (ContainerNodeImpl::checkIsChild): (ContainerNodeImpl::addChild): (ContainerNodeImpl::attach): (ContainerNodeImpl::detach): (ContainerNodeImpl::insertedIntoDocument): (ContainerNodeImpl::removedFromDocument): (ContainerNodeImpl::cloneChildNodes): (ContainerNodeImpl::getElementsByTagNameNS): (ContainerNodeImpl::getUpperLeftCorner): (ContainerNodeImpl::getLowerRightCorner): (ContainerNodeImpl::getRect): (ContainerNodeImpl::setFocus): (ContainerNodeImpl::setActive): (ContainerNodeImpl::childNodeCount): (ContainerNodeImpl::childNode): (ContainerNodeImpl::dispatchChildInsertedEvents): (ContainerNodeImpl::dispatchChildRemovalEvents): * khtml/xml/dom_nodeimpl.h: * khtml/xml/dom_xmlimpl.cpp: (DOM::EntityImpl::EntityImpl): (DOM::EntityReferenceImpl::EntityReferenceImpl): (DOM::NotationImpl::NotationImpl): (DOM::ProcessingInstructionImpl::ProcessingInstructionImpl): * khtml/xml/dom_xmlimpl.h: 2005-05-04 Vicki Murley <vicki@apple.com> Reviewed by Darin. - fix mismatched parentheses in one of the ifdefs * khtml/html/html_headimpl.cpp: (HTMLTitleElementImpl::childrenChanged): 2005-05-04 Darin Adler <darin@apple.com> Reviewed by Dave Hyatt. - fixed build rules to match other projects * WebCore.pbproj/project.pbxproj: Set deployment target to 10.3 in the build styles. When built without a build style (by Apple B&I) we want to get the target from the environment. But when built with a build style (by Safari engineers and others), we want to use 10.3. * Makefile.am: Took out extra parameters that make command-line building different from Xcode building. Now that this is fixed, you should not get a full rebuild if you switch from command line to Xcode or back. 2005-05-04 Vicki Murley <vicki@apple.com> Reviewed by darin. - fixed <rdar://problem/3986228> Not able to load additional script blocks dynamically Run scripts when they're inserted into the document. Use createdByParser bit to make sure that scripts aren't run twice, once while parsing and again when inserting. * khtml/html/html_headimpl.cpp: (HTMLScriptElementImpl::HTMLScriptElementImpl): (HTMLScriptElementImpl::~HTMLScriptElementImpl): (HTMLScriptElementImpl::insertedIntoDocument): (HTMLScriptElementImpl::removedFromDocument): (HTMLScriptElementImpl::notifyFinished): * khtml/html/html_headimpl.h: (DOM::HTMLScriptElementImpl::setCreatedByParser): * khtml/html/htmlparser.cpp: (KHTMLParser::getElement): * khtml/xml/xml_tokenizer.cpp: (khtml::XMLTokenizer::startElement): 2005-05-03 David Hyatt <hyatt@apple.com> Normalize all our custom properties in our implementation to be -khtml (remove all the -apple). Make sure that -apple, -khtml, and -moz are all able to be used. -apple and -moz just map to -khtml. Add support for automatically converting -khtml-opacity to opacity (for legacy Safari 1.1 compat). Reviewed by darin * khtml/css/css_computedstyle.cpp: (DOM::): (DOM::CSSComputedStyleDeclarationImpl::getPropertyCSSValue): * khtml/css/cssparser.cpp: (CSSParser::parseValue): * khtml/css/cssproperties.in: * khtml/css/cssstyleselector.cpp: (khtml::CSSStyleSelector::applyDeclarations): (khtml::CSSStyleSelector::applyProperty): * khtml/css/parser.y: * khtml/ecma/kjs_css.cpp: (cssPropertyName): 2005-05-03 Darin Adler <darin@apple.com> - fix the build * WebCore.pbproj/project.pbxproj: Fix some SYMROOTS that should have been SYMROOT. 2005-05-03 David Hyatt <hyatt@apple.com> Fix for 4098281, news.com missing a bunch of content. Make sure not to apply strict SGML parsing when stripping comments out of scripts. New test is comments-in-script.html * khtml/html/htmltokenizer.cpp: (khtml::HTMLTokenizer::parseComment): 2005-05-03 David Hyatt <hyatt@apple.com> Remove unused notification to avoid ERROR messages spewing on the acid2 test. Reviewed by darin * khtml/khtml_part.cpp: (KHTMLPart::processObjectRequest): * khtml/rendering/render_frames.cpp: (RenderPartObject::updateWidget): * khtml/rendering/render_frames.h: 2005-05-03 Darin Adler <darin@apple.com> Reviewed by Dave Hyatt. No new layout tests needed. - eliminated the bogus kMin/kMax macros that we had in addition to inline functions of the same name * kwq/KWQKGlobal.h: Remove the kMin/kMax macros. * khtml/css/cssstyleselector.cpp: (khtml::CSSStyleSelector::applyProperty): Change type of constant so both sides of kMin calls match. (khtml::CSSStyleSelector::fontSizeForKeyword): Ditto. * khtml/html/htmltokenizer.cpp: (khtml::HTMLTokenizer::parseEntity): Ditto. - remove unused parameter to dirtyLinesFromChangedChild for clarity * khtml/rendering/render_object.h: Don't take the parameter. * khtml/rendering/render_object.cpp: (RenderObject::dirtyLinesFromChangedChild): Ditto. * khtml/rendering/render_flow.h: Don't take the parameter. * khtml/rendering/render_flow.cpp: (RenderFlow::detach): Don't pass the parameter. (RenderFlow::dirtyLinesFromChangedChild): Don't take the parameter. * khtml/rendering/render_text.cpp: (RenderText::detach): Don't pass the parameter. - convert DOM::NodeImpl into an abstract base class by making a couple of functions pure virtual for clarity * khtml/xml/dom_nodeimpl.h: Made nodeName and nodeType pure virtual. * khtml/xml/dom_nodeimpl.cpp: Remove bodies of nodeName and nodeType. 2005-05-03 David Hyatt <hyatt@apple.com> Fix for object element to support fallback content. WIth this change Safari passes the Acid2 test. Reviewed by Maciej * khtml/css/html4.css: * khtml/html/html_objectimpl.cpp: (HTMLObjectElementImpl::HTMLObjectElementImpl): (HTMLObjectElementImpl::parseHTMLAttribute): (HTMLObjectElementImpl::rendererIsNeeded): (HTMLObjectElementImpl::createRenderer): (HTMLObjectElementImpl::attach): (HTMLObjectElementImpl::detach): (HTMLObjectElementImpl::recalcStyle): (HTMLObjectElementImpl::childrenChanged): (HTMLObjectElementImpl::isURLAttribute): (HTMLObjectElementImpl::isImageType): (HTMLObjectElementImpl::renderFallbackContent): * khtml/html/html_objectimpl.h: * khtml/khtml_part.cpp: (KHTMLPart::requestObject): (KHTMLPart::selectFrameElementInParentIfFullySelected): (KHTMLPart::handleFallbackContent): * khtml/khtml_part.h: * khtml/khtmlpart_p.h: (khtml::ChildFrame::ChildFrame): * khtml/rendering/render_frames.cpp: (RenderPartObject::RenderPartObject): (RenderPartObject::updateWidget): * khtml/rendering/render_frames.h: (khtml::RenderPart::hasFallbackContent): * khtml/rendering/render_replaced.cpp: (RenderReplaced::RenderReplaced): * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::createPart): * kwq/WebCoreBridge.h: * kwq/WebCoreBridge.mm: (-[WebCoreBridge mainResourceError]): 2005-05-01 Darin Adler <darin@apple.com> - move to Xcode native targets and stop checking in generated files * WebCore.pbproj/project.pbxproj: Updated to use native targets and generate all the generated files, so we don't have to check them in any more. * Info.plist: Added. Native targets use a separate file for this. * Makefile.am: Removed rule to generate WebCore-combined.exp since this is now handled by the Xcode project. Removed the code to remove the embedded copy of the framework since we don't do that any more. Removed timestamp cleaning rules since we don't use those any more. * WebCore-tests.exp: Removed symbols that aren't really needed. The native target gives an error when you mention a nonexistent symbol, so we can't have them any more. * khtml/css/parser_wrapper.cpp: Added. Shell used to compile parser.cpp since we can't add a generated file easily to the list of files to be compiled. * .cvsignore: Removed various timestamp files. * WebCore-combined.exp: Removed. * force-clean-timestamp: Removed. * force-js-clean-timestamp: Removed. * khtml/.cvsignore: Removed. * khtml/Makefile.am: Removed. * khtml/css/.cvsignore: Removed. * khtml/css/Makefile.am: Removed. * khtml/css/cssproperties.c: Removed. * khtml/css/cssproperties.h: Removed. * khtml/css/cssvalues.c: Removed. * khtml/css/cssvalues.h: Removed. * khtml/css/parser.cpp: Removed. * khtml/css/parser.h: Removed. * khtml/css/tokenizer.cpp: Removed. * khtml/ecma/.cvsignore: Removed. * khtml/ecma/Makefile.am: Removed. * khtml/ecma/kjs_css.lut.h: Removed. * khtml/ecma/kjs_dom.lut.h: Removed. * khtml/ecma/kjs_events.lut.h: Removed. * khtml/ecma/kjs_html.lut.h: Removed. * khtml/ecma/kjs_navigator.lut.h: Removed. * khtml/ecma/kjs_range.lut.h: Removed. * khtml/ecma/kjs_traversal.lut.h: Removed. * khtml/ecma/kjs_views.lut.h: Removed. * khtml/ecma/kjs_window.lut.h: Removed. * khtml/ecma/xmlhttprequest.lut.h: Removed. * khtml/ecma/xmlserializer.lut.h: Removed. * khtml/html/.cvsignore: Removed. * khtml/html/Makefile.am: Removed. * khtml/html/doctypes.cpp: Removed. * khtml/html/kentities.c: Removed. * khtml/misc/.cvsignore: Removed. * khtml/misc/Makefile.am: Removed. * khtml/misc/htmlattrs.c: Removed. * khtml/misc/htmlattrs.h: Removed. * khtml/misc/htmltags.c: Removed. * khtml/misc/htmltags.h: Removed. * kwq/.cvsignore: Removed. * kwq/KWQCharsetData.c: Removed. * kwq/KWQColorData.c: Removed. * kwq/Makefile.am: Removed. 2005-05-02 Darin Adler <darin@apple.com> Reviewed by Vicki. Added two layout tests for regression testing. - redid frameElement (fix for 4091082 below) The first version lacked a security check, and was also broken. * khtml/ecma/kjs_window.cpp: (frameElement): Refactored into separate function; added isSafeScript check. (Window::get): Call the new frameElement function. * layout-tests/fast/frames/frameElement-frame.html: Added. * layout-tests/fast/frames/frameElement-frame-expected.txt: Added. * layout-tests/fast/frames/frameElement-iframe.html: Added. * layout-tests/fast/frames/frameElement-iframe-expected.txt: Added. * layout-tests/fast/frames/resources/frameElement-contents.html: Added. 2005-05-02 David Harrison <harrison@apple.com> Reviewed by Vicki. Fix isStartOfEditableContent and isEndOfEditableContent to return actual, rather than inverted, answers. No Radar. Found this when trying to use isEndOfEditableContent() in some new code. * khtml/editing/visible_units.cpp: (khtml::isStartOfEditableContent): (khtml::isEndOfEditableContent): Flip expressions. 2005-04-29 Darin Adler <darin@apple.com> Reviewed by David Harrison. * khtml/xml/dom_nodeimpl.cpp: (NodeImpl::displayNode): Turn newlines into \n for better dumping. 2005-04-29 David Harrison <harrison@apple.com> Reviewed by Darin. <rdar://problem/4083333> When deleting link at end of sentence, entire sentence gets deleted * khtml/editing/htmlediting.cpp: (khtml::DeleteSelectionCommand::initializePositionData): Work around bug #4103339 (whose real fix is somewhat risky), so this fix can get into a software update. (khtml::DeleteSelectionCommand::handleGeneralDelete): Add isAncestor check when comparing m_downstreamEnd.node() and m_startNode. * layout-tests/editing/deleting/delete-4083333-fix-expected.txt: Added. * layout-tests/editing/deleting/delete-4083333-fix.html: Added. 2005-04-29 Darin Adler <darin@apple.com> Reviewed by Dave Harrison. - changed layout tests to dump more minimal information about caret and selection * kwq/KWQRenderTreeDebug.cpp: (nodePosition): Changed name; now does position relative to document. (writeSelection): Removed upstream/downstream code and changed format slightly. * layout-tests/editing/*-expected.txt: Regenerated in new format. 2005-04-29 Darin Adler <darin@apple.com> Reviewed by Chris Blumenberg. Added two layout tests for regression testing. - fixed <rdar://problem/4097849> REGRESSION (162-163): importNode creates non-HTML elements, thus style attributes (and some others) don't work * khtml/xml/dom_docimpl.cpp: (DocumentImpl::importNode): Reorganized and partly rewrote this. The change that fixes the bug at hand is to explicitly use XHTML_NAMESPACE for HTML elements, since the old way of getting the namespace will return the null string for HTML elements, and createElementNS will not create an HTML element if passed a null string for the namespace. (DocumentImpl::processHttpEquiv): Removed some bogus getDocument() calls -- no need to call getDocument() in a document object. (DocumentImpl::attrName): Ditto. (DocumentImpl::tagName): Ditto. (DocumentImpl::setFocusNode): Ditto. * khtml/html/html_elementimpl.cpp: (HTMLElementImpl::cloneNode): Moved the actual cloning here from ElementImpl::cloneNode, because XMLElementImpl already had its own version, and in here we can use createHTMLElement, which will work properly even in an XML document, and is also slightly more efficient. * khtml/xml/dom_nodeimpl.h: Added a namespaceURI method function to go along with localName. * khtml/xml/dom_nodeimpl.cpp: (NodeImpl::namespaceURI): Added. Returns null string to be consistent with localName (only works on certain types of elements as documented). * khtml/xml/dom_elementimpl.h: Removed ElementImpl::cloneNode (see above). Added an override of namespaceURI for XMLElementImpl. * khtml/xml/dom_elementimpl.cpp: (XMLElementImpl::namespaceURI): Added. Returns the namespace (consistent with localName). * layout-tests/fast/dom/importNodeHTML.html: Added. Tests both importNode and cloneNode (for comparison). * layout-tests/fast/dom/importNodeHTML-expected.txt: Added. * layout-tests/fast/dom/importNodeXML.xhtml: Added. XML version of the same test as above. Tests a different code path, so useful to have. * layout-tests/fast/dom/importNodeXML-expected.txt: Added. 2005-04-28 Darin Adler <darin@apple.com> Reviewed by Dave Harrison. - fixed problems preventing us from compiling with gcc 4.0 * WebCore.pbproj/project.pbxproj: Removed -fobjc-exceptions because I can't figure out an easy way to pass it only when compiling Objective-C/C++. Removed -Wmissing-prototypes from WARNING_CPLUSPLUSFLAGS since it's now a C-only warning. * khtml/css/parser.y: Changed some rules that were using a float to pass around an enum to use an int instead to avoid a warning. * khtml/css/parser.cpp: Regenerated. * khtml/css/parser.h: Regenerated. * khtml/ecma/kjs_dom.cpp: (DOMTextProtoFunc::tryCall): Rearranged a return statement to avoid an incorrect warning. * khtml/ecma/kjs_html.cpp: (KJS::Context2DFunction::tryCall): Initialized a couple of variables to avoid an incorrect warning. * khtml/ecma/kjs_proxy.cpp: (KJSProxyImpl::evaluate): Rearranged how we exit from the function to avoid an incorret warning. * khtml/editing/selection.cpp: (khtml::Selection::debugPosition): Changed some %d to %ld where the parameters where long ints. * khtml/editing/visible_position.cpp: (khtml::VisiblePosition::debugPosition): Ditto. * khtml/xml/dom_position.cpp: (DOM::Position::debugPosition): Ditto. * kwq/DOMEvents.mm: (-[DOMMouseEvent initMouseEvent:::::::::::::::]): Rearranged code to avoid a cast that was causing an incorrect warning. * kwq/DOMUtility.mm: (createObjCDOMNode): Broke out as a separate function. (KJS::ScriptInterpreter::createObjcInstanceForValue): Rearranged code to avoid a namespace collision with KJS::DOMNode and the Objective-C DOMNode class. * kwq/KWQFileButton.mm: Made fields of KWQFileButtonAdapter public to avoid an error, new to gcc 4.0, about accessing protected Objective-C fields. * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::matchLabelsAgainstElement): Rearranged a return statement to avoid an incorrect warning. (KWQKHTMLPart::imageFromRect): Rearranged how this function does its exception handling to avoid a "may be clobbered" warning. * kwq/KWQKJavaAppletWidget.mm: Fixed incorrect import that said "KHTMLView.h" instead of "khtmlview.h". * kwq/KWQObject.mm: Made fields of KWQObjectTimerTarget public to avoid an error, new to gcc 4.0, about accessing protected Objective-C fields. * kwq/WebCoreBridge.mm: (partHasSelection): Used [bridge part] instead of getting directly at instance variable to avoid an error, new to gcc 4.0, about accessing protected Objective-C fields. * WebCore-combined.exp: Regenerated. * WebCore-tests.exp: Added some additional symbols needed by the tests under gcc 4.0. 2005-04-28 Darin Adler <darin@apple.com> * WebCore.pbproj/project.pbxproj: Add back the main_thread_malloc files, rolled out by accident. 2005-04-27 Adele Peterson <adele@apple.com> Rolling out fix for <rdar://problem/4097849> because the following layout tests were failing: fast/css/namespaces/001 fast/css/namespaces/002 fast/css/namespaces/004 fast/css/namespaces/005 fast/css/namespaces/006 fast/overflow/003 * khtml/html/html_documentimpl.cpp: * khtml/html/html_documentimpl.h: * khtml/html/html_elementimpl.cpp: (HTMLElementImpl::namespaceURI): * khtml/xml/dom_docimpl.cpp: (DocumentImpl::importNode): (DocumentImpl::createElementNS): (DocumentImpl::createHTMLElement): (DocumentImpl::attrId): (DocumentImpl::tagId): * khtml/xml/dom_docimpl.h: 2005-04-27 John Sullivan <sullivan@apple.com> Reviewed by Darin. Experimental prototype of user-resizable textareas. All the new code is guarded by #if ALLOW_RESIZING_TEXTAREAS, which is false unless you remove a comment and rebuild. This code allows you to press near the bottom-right corner of any textarea and drag to resize the textarea on the page. It works correctly with textareas in left-aligned or centered blocks, but is weird in right-aligned blocks. It also does something sensible if the width is specified as a % (in that case, you can resize vertically only). The user-created-size survives resizing the window and survives the back/forward cache. It does not survive reloading the page. This complete-lack-of-affordance UI is obviously not shippable, but this proof of concept code could lead to a real user feature. * kwq/KWQTextArea.mm: (-[KWQTextArea getNumColumns:andNumRows:forSize:]): new method that determines cols and rows for a given textarea frame size (-[KWQTextAreaTextView _trackResizeFromMouseDown:]): new method that tracks a drag and does a live resize-and-relayout (-[KWQTextAreaTextView mouseDown:]): if the mouse down is in the bottom-right corner, call _trackResizeFromMouseDown: 2005-04-27 John Sullivan <sullivan@apple.com> Reviewed by Adele. - fixed problem with mouse wheel patch where alt and shift keys were switched * khtml/xml/dom2_eventsimpl.h: use the order cntl, alt, shift, meta in KeyboardEventImpl constructors to match superclass. This isn't necessary to fix the bug, but is better for clarity. * khtml/xml/dom2_eventsimpl.cpp: (KeyboardEventImpl::KeyboardEventImpl): switch parameter order to match superclass. Then pass the parameters to superclass's constructor in the right order. (KeyboardEventImpl::initKeyboardEvent): Pass parameters to superclass's constructor in the right order. 2005-04-26 Adele Peterson <adele@apple.com> Fixed by Darin, reviewed by me. Fix for <rdar://problem/4084029> designMode doesn't allow editing when iframe src = "" or = about:blank This change will add an HTML element for empty documents. Now that there will be an HTMLDocument in this case, a body will also be created (see rdar://problem/3758785). This was preventing frames with empty documents from being editable. * khtml/html/htmlparser.cpp: (KHTMLParser::finished): Updated these tests to expect the HTML and BODY elements * layout-tests/fast/flexbox/016-expected.txt: * layout-tests/fast/frames/001-expected.txt: * layout-tests/fast/frames/002-expected.txt: * layout-tests/fast/frames/contentWindow_Frame-expected.txt: * layout-tests/fast/frames/contentWindow_iFrame-expected.txt: * layout-tests/fast/frames/empty-frame-src-expected.txt: 2005-04-26 Maciej Stachowiak <mjs@apple.com> New test case for <rdar://problem/4092136> reproducible crash in KJS::kjs_fast_realloc loading maps.google.com * layout-tests/fast/js/string-from-char-code-expected.txt: Added. * layout-tests/fast/js/string-from-char-code.html: Added. 2005-04-26 Darin Adler <darin@apple.com> Reviewed by John. - fixed <rdar://problem/3655817> please add support for mouse wheel events and the onmousewheel handler Loose ends: - need to test behavior of Windows IE with horizontal scroll wheeling; we currently send a distinct event for that relatively obscure case, which means the event handlers won't fire at all; might be incorrect - overflow scrolling is done after all DOM event handling, but ideally should be done in the overflowing element's default event handler; not important in practice - frame scrolling is done after all DOM event handling, but probably should be done in a default event handler; not sure about this, but it's probably not important in practice and definitely not required - JavaScript * khtml/ecma/kjs_events.h: Added DOMWheelEvent. * khtml/ecma/kjs_events.cpp: (KJS::getDOMEvent): Added a case for wheel event. To be forward looking, I use the event's impl pointer instead of a C++ DOM wrapper. Eventually it will all work this way. (offsetFromTarget): Added. Factored out code to compute offsetX/Y for an event. (DOMMouseEvent::getValueProperty): Changed to call offsetFromTarget for offsetX/Y. (DOMWheelEvent::DOMWheelEvent): Added. (DOMWheelEvent::tryGet): Added. (DOMWheelEvent::getValueProperty): Added. (DOMWheelEventProtoFunc::tryCall): Added. Nothing at the moment, but might get contents later. * khtml/ecma/kjs_dom.h: Added OnMouseWheel to the enum with the list of properties. * khtml/ecma/kjs_dom.cpp: Added onmousewheel as a property of DOM nodes. (DOMNode::getValueProperty): Return the mouse wheel event handler. (DOMNode::putValue): Set the mouse wheel event handler. * khtml/ecma/kjs_window.cpp: Added onmousewheel as a property of the window. (Window::get): Return the mouse wheel event handler. (Window::put): Set the mouse wheel event handler. * khtml/ecma/kjs_window.h: Added OnWindowMouseWheel to the enum with the list of properties. (Other properties distinguish the window handler by lower-casing the initial letter, way too subtle, so I did this one a good way.) * khtml/dom/dom2_events.h: Made the constructors for Event and UIEvent public. There's no good reason for them to be private, and I had to use the UIEvent one in the JavaScript implementation. - DOM * khtml/xml/dom2_eventsimpl.h: Added events for mouse wheel and horizontal mouse wheel. Added isWheelEvent function to EventImpl. (DOM::UIEventWithKeyStateImpl): Added. Base class shared by mouse, wheel, and keyboard events. (DOM::MouseRelatedEventImpl): Added. Base class shared by mouse and wheel events. (DOM::WheelEventImpl): Added. * khtml/xml/dom2_eventsimpl.cpp: Added "mousewheel" to list of event names and a placeholder for the horizontal mouse wheel. (EventImpl::isWheelEvent): Added. Returns false. (MouseRelatedEventImpl::MouseRelatedEventImpl): Added. Factored out what's shared between mouse events and wheel events to avoid duplicated code. (MouseRelatedEventImpl::computeLayerPos): Moved to MouseRelatedWheelEventImpl. (MouseEventImpl::MouseEventImpl): Changed since MouseRelatedWheelEventImpl is now the base class so we can share more code with wheel events. (KeyboardEventImpl::KeyboardEventImpl): Changed since UIEventWithKeyStateImpl is now the base class so we can share more code with mouse and wheel events. (WheelEventImpl::WheelEventImpl): Added. (WheelEventImpl::isWheelEvent): Added. Returns true. * khtml/misc/htmlattrs.in: Added "onmousewheel" attribute name. * khtml/html/html_elementimpl.cpp: (HTMLElementImpl::parseHTMLAttribute): Added parsing of the "onmousewheel" atribute, consistent with other event handler attributes. - event handling * kwq/WebCoreBridge.h: Renamed scrollOverflowWithScrollWheelEvent to sendScrollWheelEvent. * kwq/WebCoreBridge.mm: (-[WebCoreBridge sendScrollWheelEvent:]): Renamed. * kwq/KWQEvent.h: Added Wheel as an event type value. (QWheelEvent::QWheelEvent): Added. * kwq/KWQEvent.mm: (positionForEvent): Updated to know that wheel events have valid positions in them. (orientationForEvent): Added. (deltaForEvent): Added. (QWheelEvent::QWheelEvent): Added. * kwq/KWQKHTMLPart.h: Renamed scrollOverflowWithScrollWheelEvent to wheelEvent. * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::wheelEvent): Renamed and added code to construct a QWheelEvent and send it along to KHTMLView::viewportWheelEvent, consistent with how mouse events work. * khtml/khtmlview.cpp: (KHTMLView::viewportWheelEvent): Do a hit test to figure out which node to send the event to, and then call dispatchWheelEvent. * khtml/xml/dom_nodeimpl.h: Added dispatchWheelEvent. * khtml/xml/dom_nodeimpl.cpp: (NodeImpl::dispatchWheelEvent): Added. - generated files * khtml/ecma/kjs_dom.lut.h: Regenerated. * khtml/ecma/kjs_events.lut.h: Regenerated. * khtml/ecma/kjs_window.lut.h: Regenerated. * khtml/misc/htmlattrs.c: Regenerated. * khtml/misc/htmlattrs.h: Regenerated. 2005-04-26 David Harrison <harrison@apple.com> Reviewed by Darin, Maciej. <rdar://problem/4075576> Deleting text in new message borks content Fixed by removing the methods that attempted to preserve the position. The idea of preserving position is a very recent one, and turned out to not actually address the problem it was intended to fix (see below). Further, is unclear how the position could be preserved in a form that could be properly used later on. Therefore, removing the code to work like before is the preferred alternative for this software update. I've written <rdar://problem/4099839> to cover the bug that position preservation was supposed to fix (but did not). Added layout tests for both this bug and 4099839. Also, updated existing tests with correct expected results (delete-at-paragraph-boundaries-003 and 004). * khtml/editing/htmlediting.cpp: (khtml::CompositeEditCommand::removeFullySelectedNode): (khtml::CompositeEditCommand::removeChildrenInRange): (khtml::DeleteSelectionCommand::handleGeneralDelete): * khtml/editing/htmlediting.h: * layout-tests/editing/deleting/delete-at-paragraph-boundaries-003-expected.txt: * layout-tests/editing/deleting/delete-at-paragraph-boundaries-004-expected.txt: * layout-tests/editing/deleting/delete-at-paragraph-boundaries-007-expected.txt: Added. * layout-tests/editing/deleting/delete-at-paragraph-boundaries-007.html: Added. * layout-tests/editing/deleting/delete-at-paragraph-boundaries-008-expected.txt: Added. * layout-tests/editing/deleting/delete-at-paragraph-boundaries-008.html: Added. * layout-tests/editing/deleting/delete-at-paragraph-boundaries-009-expected.txt: Added. * layout-tests/editing/deleting/delete-at-paragraph-boundaries-009.html: Added. * layout-tests/editing/deleting/delete-at-paragraph-boundaries-010-expected.txt: Added. * layout-tests/editing/deleting/delete-at-paragraph-boundaries-010.html: Added. 2005-04-26 Darin Adler <darin@apple.com> - fixed development builds * khtml/misc/main_thread_malloc.h: Use inlines instead of macros for allocation functions. 2005-04-25 David Hyatt <hyatt@apple.com> Fix for 4097842, changing 1st line of a url that wraps doesn't update the second line. Make sure to update line break info for the last dirty line so that when a clean line tries to figure out where it started, it will get an accurate position taking into account the updated string. By doing this, the code will be able to properly distinguish between the old and new positions and not accidentally assume they are the same. Reviewed by darin * khtml/rendering/render_text.cpp: (RenderText::setTextWithOffset): 2005-04-26 Darin Adler <darin@apple.com> Reviewed by Maciej. - fixed <rdar://problem/4098826> Bezier curves broken in new Safari canvas object (last two parameters parsed incorrectly) * khtml/ecma/kjs_html.cpp: (KJS::Context2DFunction::tryCall): Fixed incorrect argument indices. Thanks to Brian Campbell who figured out what was wrong. 2005-04-17 Maciej Stachowiak <mjs@apple.com> Reviewed by Darin. - use single-threaded malloc in places where malloc is hot for an 8% speed improvement on cvs-base * ForwardingHeaders/misc/fast_malloc.h: Added. * WebCore.pbproj/project.pbxproj: * khtml/css/css_base.h: * khtml/css/css_ruleimpl.h: * khtml/css/css_valueimpl.h: * khtml/css/cssstyleselector.h: * khtml/misc/arena.cpp: (ArenaAllocate): (FreeArenaList): (ArenaFinish): * khtml/misc/main_thread_malloc.cpp: Added. * khtml/misc/main_thread_malloc.h: Added. * khtml/rendering/render_style.h: * khtml/xml/dom2_eventsimpl.h: * khtml/xml/dom2_rangeimpl.h: * khtml/xml/dom2_traversalimpl.h: * khtml/xml/dom2_viewsimpl.h: * khtml/xml/dom_docimpl.h: * khtml/xml/dom_elementimpl.cpp: (NamedAttrMapImpl::NamedAttrMapImpl): (NamedAttrMapImpl::clearAttributes): (NamedAttrMapImpl::operator=): (NamedAttrMapImpl::addAttribute): (NamedAttrMapImpl::removeAttribute): * khtml/xml/dom_elementimpl.h: * khtml/xml/dom_nodeimpl.h: * khtml/xml/dom_stringimpl.h: * kwq/KWQFontFamily.h: * kwq/KWQListImpl.mm: * kwq/KWQString.h: * kwq/KWQString.mm: (ALLOC_CHAR): (ALLOC_QCHAR): (QString::setBufferFromCFString): (allocatePageNode): 2005-04-25 John Sullivan <sullivan@apple.com> Reviewed by Dave Harrison. - fixed <rdar://problem/4098731> [DOMHTMLTextAreaElement cols] returns wrong value (usually zero) * kwq/DOMHTML.mm: (-[DOMHTMLTextAreaElement cols]): use ATTR_COLS instead of ATTR_ACCESSKEY (D'oh!) (-[DOMHTMLTextAreaElement setCols:]): fixed whitespace 2005-04-25 Darin Adler <darin@apple.com> Reviewed by John. - fixed <rdar://problem/4097849> REGRESSION (162-163): importNode creates non-HTML elements, thus style attributes (and some others) don't work * khtml/xml/dom_docimpl.h: Add virtual functions HTMLElementNamespace and isHTMLNamespace. * khtml/xml/dom_docimpl.cpp: (DocumentImpl::importNode): Rearranged this function and fixed the following problems: 1) made sure to ref node while attributes are 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 the source document, not the destination document; 3) removed unneeded getDocument() call which just returns this; 4) fixed error handling for cases where an exception happens while processing the children. (DocumentImpl::HTMLElementNamespace): Added. Returns XHTML_NAMESPACE. (DocumentImpl::isHTMLNamespace): Added. Returns true for any namespace that matches XHTML_NAMESPACE (case insensitive). (DocumentImpl::createElementNS): Changed to call isHTMLNamespace, which will cause it to accept the null namespace in an HTML document. 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. (DocumentImpl::createHTMLElement): Pass in HTMLElementNamespace() rather than 0 to tagId. (DocumentImpl::attrId): Use isHTMLNamespace instead of allowing the null namespace explicitly. (DocumentImpl::tagId): Ditto. * khtml/html/html_documentimpl.h: Add overrides for HTMLElementNamespace and isHTMLNamespace. * khtml/html/html_documentimpl.cpp: (HTMLDocumentImpl::HTMLElementNamespace): Added. Returns 0 so we use the null string for HTML elements inside HTML documents (as before). (HTMLDocumentImpl::isHTMLNamespace): Added. Allows 0, and then calls base class to check for the actual XHTML namespace. Thus, we allow both no namespace at all and the XHTML namespace inside HTML documents. * khtml/html/html_elementimpl.cpp: (HTMLElementImpl::namespaceURI): Changed to call HTMLElementNamespace rather than checking isHTMLDocument. Same result as before, but better division of responsibilities. 2005-04-25 Darin Adler <darin@apple.com> Reviewed by John. - fixed <rdar://problem/4091956> JavaScript drop handlers don't receive more than one dropped item * kwq/KWQClipboard.mm: (cocoaTypeFromMIMEType): Remove some use of compare -- less efficient than a simpler "==" check. Fixed non-GC-safe code to use KWQCFAutorelease instead. (MIMETypeFromCocoaType): Use fromCFString instead of fromNSString to avoid a cast. (KWQClipboard::getData): Rearrange so that we'll use filenames if both filenames and a URL are present, since filenames can accomodate multiple items. Fix bug where we'd return multiple filenames when the type requested is "URL". Fixed loop that computed the count over and over again for the loop termination condition. Check that the data for NSFilenamesPboardType is an NSArray instead of assuming it is. (KWQClipboard::setData): Use isEqualToString: instead of == when comparing types. 2005-04-22 David Hyatt <hyatt@apple.com> Fix for 4096878, drop shadow effect not displayed correctly on tbray.org/ongoing/. Block minmaxwidth was broken when negative margins were used and did not properly decrease the max width. Reviewed by Maciej * khtml/rendering/render_block.cpp: (khtml::RenderBlock::calcBlockMinMaxWidth): * layout-tests/fast/block/float/034-expected.txt: Added. * layout-tests/fast/block/float/034.html: Added. * layout-tests/fast/block/float/035-expected.txt: Added. * layout-tests/fast/block/float/035.html: Added. 2005-04-22 David Hyatt <hyatt@apple.com> Remove some dead code from css_valueimpl. It wasn't used at all. * khtml/css/css_valueimpl.cpp: * khtml/css/css_valueimpl.h: 2005-04-22 Darin Adler <darin@apple.com> * khtml/ecma/kjs_html.h: Removed unnecessary bogus class name qualifiers. 2005-04-22 David Hyatt <hyatt@apple.com> Fix for 4096681, fix regression in how the list-style property is parsed. It no longer parses when it hits a url in the property value list now, because the list pointer did not get advanced. This fixes alistapart.com. Reviewed by john * khtml/css/cssparser.cpp: (CSSParser::parseValue): * layout-tests/fast/lists/009-expected.txt: Added. * layout-tests/fast/lists/009.html: Added. * layout-tests/fast/lists/resources/listmark.gif: Added. 2005-04-22 Darin Adler <darin@apple.com> Reviewed by John. - fixed <rdar://problem/4091082> Google Suggest no longer works due to lack of "frameElement" * khtml/ecma/kjs_window.h: Added FrameElement. * khtml/ecma/kjs_window.cpp: (Window::get): Added "frameElement". * khtml/ecma/kjs_window.lut.h: Regenerated. 2005-04-22 Darin Adler <darin@apple.com> Reviewed by John. - a small editing-related code cleanup * khtml/rendering/render_text.h: Added positionForOffset and made offsetForPosition const. * khtml/rendering/render_text.cpp: (InlineTextBox::offsetForPosition): Made const. (InlineTextBox::positionForOffset): Added. Moved code here from caretRect. (RenderText::caretRect): Call positionForOffset instead of doing the work here. 2005-04-21 David Hyatt <hyatt@apple.com> Fix for 4095839, wrong background image used on flechtwerk.de. Make sure that the global mapped attribute cache hashed background attributes into per-document buckets. * khtml/html/html_baseimpl.cpp: (HTMLBodyElementImpl::mapToEntry): * khtml/html/html_elementimpl.h: (DOM::): * khtml/html/html_tableimpl.cpp: (HTMLTableElementImpl::mapToEntry): (HTMLTablePartElementImpl::mapToEntry): * khtml/xml/dom_docimpl.cpp: (DocumentImpl::DocumentImpl): * khtml/xml/dom_docimpl.h: (DOM::DocumentImpl::docID): 2005-04-21 Vicki Murley <vicki@apple.com> - layout test for 4065447, outerHTML on images * layout-tests/fast/dynamic/outerHTML-img-expected.txt: Added. * layout-tests/fast/dynamic/outerHTML-img.html: Added. 2005-04-20 Vicki Murley <vicki@apple.com> Reviewed by hyatt. - fixed <rdar://problem/4065447> support outerHTML on IMG elements * khtml/html/html_elementimpl.cpp: (HTMLElementImpl::setOuterHTML): 2005-04-18 David Hyatt <hyatt@apple.com> Fix min-height so that when it resolves to auto it does not use the box's intrinsic height. * khtml/rendering/render_box.cpp: (RenderBox::calcHeight): (RenderBox::calcHeightUsing): 2005-04-18 David Hyatt <hyatt@apple.com> Back out fix for 4032346, since it is causing garbled image content on many sites. The bug tracking the fix is 4069093. (khtml::RenderBlock::matchedEndLine): 2005-04-18 David Hyatt <hyatt@apple.com> Fix the smile in the Acid2 test. Floats should not grow to contain other floats unless height is auto. Otherwise the float should use the specified height. Also fix row 14 of the Acid2 test. Although ambiguous, just modify the table cell baseline alignment code to align to the bottom of the cell's content height if no suitable baseline could be found. * khtml/rendering/render_block.cpp: (khtml::RenderBlock::layoutBlock): * khtml/rendering/render_block.h: (khtml::RenderBlock::firstRootBox): (khtml::RenderBlock::lastRootBox): * khtml/rendering/render_table.cpp: (RenderTableSection::calcRowHeight): (RenderTableCell::baselinePosition): 2005-04-15 David Hyatt <hyatt@apple.com> Make sure empty tables honor CSS-specified heights when they have no rows or sections. This is done only in strict mode, since it is not compatible with WinIE. * khtml/rendering/render_table.cpp: (RenderTable::layout): 2005-04-15 David Hyatt <hyatt@apple.com> Fix for row 13 of the Acid2 test. Change HTML comment parsing in strict mode to do proper SGML parsing, checking for pairs of -- and only being willing to close the comment if every -- is paired up. * khtml/html/htmltokenizer.cpp: (khtml::HTMLTokenizer::parseComment): 2005-04-12 Maciej Stachowiak <mjs@apple.com> Reviewed by Richard. - use custom single-threaded malloc for all non-GC JavaScriptCore allocations, for a 9.1% speedup on JavaScript iBench * khtml/ecma/kjs_binding.cpp: (UString::UString): * khtml/ecma/kjs_proxy.cpp: (KJSProxyImpl::evaluate): 2005-04-15 David Hyatt <hyatt@apple.com> Fix the six pixel gap between rows nine and ten of the Acid2 test. Make sure that percentage heights that resolve to auto are properly treated as though they have auto height by the self-collapsing block check (as per section 8.3.1, paragraph 7 of the CSS2.1 spec). * khtml/rendering/render_block.cpp: (khtml::RenderBlock::isSelfCollapsingBlock): 2005-04-15 David Hyatt <hyatt@apple.com> The Acid2 test and the reference rendering both make use of overflow:hidden on the <html> element. Turns out the CSS2.1 wording for this behavior has been revised (based off WinIE/Mozilla behavior). Change our behavior to match and make <html> overflow apply to the viewport. * khtml/khtmlview.cpp: (KHTMLView::applyOverflowToViewport): (KHTMLView::layout): * khtml/khtmlview.h: * khtml/rendering/render_box.cpp: (RenderBox::setStyle): 2005-04-14 David Hyatt <hyatt@apple.com> 3258403 and 3258402 can now be fixed. min/max-width/height support is now complete. This patch makes them work for positioned elements and enables us to pass row one of the Acid2 test. * khtml/rendering/render_box.cpp: (RenderBox::calcAbsoluteHorizontal): (RenderBox::calcAbsoluteHorizontalValues): (RenderBox::calcAbsoluteVertical): (RenderBox::calcAbsoluteVerticalValues): * khtml/rendering/render_box.h: 2005-04-12 David Hyatt <hyatt@apple.com> Working on the Acid2 test, Row 1. Improve checkChild for the DTD so that it knows what mode a document is in. This allows it to adhere more strictly to the actual DTD in strict mode and almost strict mode. Change the <table>-inside-<p> check so that <table> is disallowed inside <p> in strict mode and almost strict mode. This matches Firefox behavior, which allows <table> inside <p> only in quirks mode. * khtml/html/dtd.cpp: (DOM::checkChild): * khtml/html/dtd.h: * khtml/html/htmlparser.cpp: (KHTMLParser::insertNode): * khtml/html/htmltokenizer.cpp: (khtml::HTMLTokenizer::parseTag): * khtml/xml/dom_elementimpl.cpp: (ElementImpl::childAllowed): 2005-04-12 Vicki Murley <vicki@apple.com> Reviewed by Maciej. - fixed <rdar://problem/3760895> Request for including an implementation of the elementFromPoint function * khtml/dom/dom_doc.cpp: (DOM::Document::elementFromPoint): * khtml/dom/dom_doc.h: * khtml/ecma/kjs_dom.cpp: (DOMDocumentProtoFunc::tryCall): * khtml/ecma/kjs_dom.h: (KJS::DOMDocument::): * khtml/ecma/kjs_dom.lut.h: (KJS::): * khtml/xml/dom_docimpl.cpp: (DocumentImpl::elementFromPoint): * khtml/xml/dom_docimpl.h: 2005-04-12 David Hyatt <hyatt@apple.com> Beginning of work to support the Acid2 CSS test put forward by the Web Standards Project. Fix our handling of the rel attribute on <link> elements to do a proper tokenization so that stylesheets can be recognized even when other keywords are present in the rel attribute. * khtml/html/html_headimpl.cpp: (HTMLLinkElementImpl::HTMLLinkElementImpl): (HTMLLinkElementImpl::parseHTMLAttribute): (HTMLLinkElementImpl::tokenizeRelAttribute): (HTMLLinkElementImpl::process): * khtml/html/html_headimpl.h: 2005-04-12 John Sullivan <sullivan@apple.com> - fixed these two bugs (I also fixed these on the experimental-ui-branch) <rdar://problem/3154293> Find Next should not scroll page if the next target is already visible <rdar://problem/3121828> scrollToVisible on find cuts off the left part of the view due to needless horiz. scroll Reviewed by Chris. * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::jumpToSelection): Trey had written code to address these issues, but left it commented out due to other problems. The other problems no longer occur, so I uncommented Trey's code, and then discovered that I could make it behave more like TextEdit with many fewer lines of code. 2005-04-08 David Harrison <harrison@apple.com> Reviewed by Dave Hyatt. <rdar://problem/4084106> Remove NSAccessibilityForegroundColorTextAttributeWrapper * kwq/KWQAccObject.mm: (AXAttributeStringSetStyle): Use NSAccessibilityForegroundColorTextAttribute directly. 2005-04-05 David Hyatt <hyatt@apple.com> Fix for 4077106, make sure that mouse wheeling in overflow sections uses 40 rather than 10 as the base line step. Reviewed by darin * khtml/rendering/render_layer.cpp: (RenderLayer::positionScrollbars): * kwq/KWQScrollBar.mm: (QScrollBar::scroll): 2005-04-04 Vicki Murley <vicki@apple.com> Reviewed by Maciej. - fixed <rdar://problem/3871669> no focus or blur methods on HTML button elements * khtml/dom/html_form.cpp: (HTMLButtonElement::focus): (HTMLButtonElement::blur): * khtml/dom/html_form.h: * khtml/ecma/kjs_html.cpp: (KJS::HTMLElementFunction::tryCall): * khtml/ecma/kjs_html.h: (KJS::HTMLElement::): * khtml/ecma/kjs_html.lut.h: (KJS::): * khtml/html/html_formimpl.cpp: (DOM::HTMLButtonElementImpl::blur): (DOM::HTMLButtonElementImpl::focus): * khtml/html/html_formimpl.h: === WebCore-415 === 2005-03-28 David Harrison <harrison@apple.com> Reviewed by Darin. <rdar://problem/4069161> REGRESSION (8A416-8A419): Safari crash bringing up context menu for non-HTML content in a frame * kwq/KWQAccObject.mm: (-[KWQAccObject rendererForView:]): Nil-check node variable instead of rechecking document variable. === WebCore-413 === 2005-03-27 Darin Adler <darin@apple.com> Reviewed by me, fix by Kida-san. - fixed <rdar://problem/4067474> 8A424: Safari immediately quit by Cmd+Ctrll+'D' * kwq/WebCoreBridge.mm: (-[WebCoreBridge convertToNSRange:DOM::]): Added nil check. === Safari-412 === 2005-03-24 Richard Williamson <rjw@apple.com> Fixed <rdar://problem/4052683> After adding/removing stocks from Stocks Widget, stock areas went blank The request was being collected before firing it's load handler. We now gc protect the request while it's loading. Reviewed by Maciej. * khtml/ecma/xmlhttprequest.cpp: (KJS::XMLHttpRequest::send): (KJS::XMLHttpRequest::abort): (KJS::XMLHttpRequest::slotFinished): (KJS::XMLHttpRequestProtoFunc::tryCall): === Safari-411 === 2005-03-23 Darin Adler <darin@apple.com> Further fix for 4053515. Covered cases where text position doesn't lie inside a text node. Reviewed by Richard. * khtml/editing/visible_text.cpp: (khtml::TextIterator::setRangeFromLocationAndLength): 2005-03-23 Richard Williamson <rjw@apple.com> Fixed <rdar://problem/4053515> REGRESSION (Mail): Kotoeri input method reconversion does not work in WebViews We now use actual document NSRanges to represent both marked text ranges and selection ranges. Reviewed by Ken. * khtml/editing/visible_text.cpp: (khtml::TextIterator::rangeLength): (khtml::TextIterator::setRangeFromLocationAndLength): * khtml/editing/visible_text.h: * kwq/WebCoreBridge.h: * kwq/WebCoreBridge.mm: (-[WebCoreBridge convertToNSRange:DOM::]): (-[WebCoreBridge DOM::convertToDOMRange:]): (-[WebCoreBridge selectNSRange:]): (-[WebCoreBridge markedTextDOMRange]): (-[WebCoreBridge markedTextNSRange]): 2005-03-22 Kevin Decker <kdecker@apple.com> Reviewed by Vicki. Fixed <rdar://problem/4062336> REGRESSION (406-407): HTML submenus not working at hrweb.apple.com after going back Rolled out the fix for <rdar://problem/4041374> REGRESSION (185-186): unload handlers (at least those added with addEventListener) are broken 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. * khtml/khtml_part.cpp: (KHTMLPart::closeURL): * khtml/xml/dom_docimpl.cpp: (DocumentImpl::detach): === Safari-410 === 2005-03-22 Vicki Murley <vicki@apple.com> - roll the fix for <rdar://problem/4060266> back in, since its now approved by CCC * khtml/editing/visible_text.cpp: (khtml::TextIterator::handleTextBox): 2005-03-22 Vicki Murley <vicki@apple.com> - roll out the fix for <rdar://problem/4060266> since it was denied by CCC * khtml/editing/visible_text.cpp: (khtml::TextIterator::handleTextBox): 2005-03-22 David Harrison <harrison@apple.com> Reviewed by Darin. <rdar://problem/4060266> Double-clicking in Dictionary.app doesn't work for some words (coming just after style change) * khtml/editing/visible_text.cpp: (khtml::TextIterator::handleTextBox): Complete the check of whether to emit space for collapsed space. 2005-03-22 David Harrison <harrison@apple.com> Reviewed by John. <rdar://problem/4061443> REGRESSION (8A420-8A421): Pasting in the Stickies widget is broken again * khtml/editing/htmlediting.cpp: (khtml::positionBeforeContainingSpecialElement): (khtml::positionAfterContainingSpecialElement): Return unchanged Position rather than a null or non-editable one. === Safari-409 === 2005-03-20 Ken Kocienda <kocienda@apple.com> Reviewed by me I made an error in this test earlier. It was not testing what I intended. Fixed. * layout-tests/editing/unsupported-content/list-delete-001-expected.txt * layout-tests/editing/unsupported-content/list-delete-001.html New tests: * layout-tests/editing/unsupported-content/table-delete-001-expected.txt: Added. * layout-tests/editing/unsupported-content/table-delete-001.html: Added. * layout-tests/editing/unsupported-content/table-delete-002-expected.txt: Added. * layout-tests/editing/unsupported-content/table-delete-002.html: Added. * layout-tests/editing/unsupported-content/table-delete-003-expected.txt: Added. * layout-tests/editing/unsupported-content/table-delete-003.html: Added. * layout-tests/editing/unsupported-content/table-type-after-expected.txt: Added. * layout-tests/editing/unsupported-content/table-type-after.html: Added. * layout-tests/editing/unsupported-content/table-type-before-expected.txt: Added. * layout-tests/editing/unsupported-content/table-type-before.html: Added. 2005-03-20 Darin Adler <darin@apple.com> Reviewed by Maciej. - fixed <rdar://problem/3923903> REGRESSION (164-165): Repro Safari crash in khtml::RenderLayer::scrollToOffset * khtml/rendering/render_layer.cpp: (RenderLayer::scrollToOffset): Check canvas for nil. 2005-03-20 David Harrison <harrison@apple.com> Reviewed by Darin. <rdar://problem/4055127> Dictionary pop-up panel misplaced at beginning of text blocks (breaks double-clicking in Dictionary.app) SimplifiedBackwardsTextIterator::advance() needed to not limit to textnodes when checking whether moving back across block boundaries VisibleUnits previousBoundary() needed to INIT_DOWN when creating result VisiblePosition All editing tests pass. * khtml/editing/visible_text.cpp: (khtml::SimplifiedBackwardsTextIterator::advance): * khtml/editing/visible_units.cpp: (khtml::previousBoundary): 2005-03-20 Darin Adler <darin@apple.com> Reviewed by Harrison. - 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 * khtml/khtml_part.h: Added selectFrameElementInParentIfFullySelected. * khtml/khtml_part.cpp: (isFrame): Added. (KHTMLPart::setFocusNodeIfNeeded): Changed to not set focus to a frame; was not what this function was intended to do, and caused trouble when trying to select a frame element. (KHTMLPart::khtmlMouseReleaseEvent): Call selectFrameElementInParentIfFullySelected. (KHTMLPart::selectAll): Call selectFrameElementInParentIfFullySelected. (KHTMLPart::selectFrameElementInParentIfFullySelected): Added. Selects the frame element in the parent if a frame is entirely selected, which makes it easier to delete or replace the frame and is consistent with the changes Maciej made recently for other elements. * kwq/WebCoreBridge.mm: (-[WebCoreBridge alterCurrentSelection:direction:granularity:]): Call selectFrameElementInParentIfFullySelected. (-[WebCoreBridge alterCurrentSelection:verticalDistance:]): Call selectFrameElementInParentIfFullySelected. 2005-03-20 Darin Adler <darin@apple.com> Reviewed by me, code change by Ken. - fixed <rdar://problem/4059852> Deleting from first element of list makes content jump to wrong place * khtml/editing/htmlediting.cpp: (khtml::isListStructureNode): Added. (khtml::DeleteSelectionCommand::moveNodesAfterNode): Check for list nodes as well as table nodes. 2005-03-20 Ken Kocienda <kocienda@apple.com> Reviewed by me Added tests to cover new "unsupported content" editing code. * layout-tests/editing/unsupported-content/list-delete-001-expected.txt: Added. * layout-tests/editing/unsupported-content/list-delete-001.html: Added. * layout-tests/editing/unsupported-content/list-delete-002-expected.txt: Added. * layout-tests/editing/unsupported-content/list-delete-002.html: Added. * layout-tests/editing/unsupported-content/list-delete-003-expected.txt: Added. * layout-tests/editing/unsupported-content/list-delete-003.html: Added. * layout-tests/editing/unsupported-content/list-type-after-expected.txt: Added. * layout-tests/editing/unsupported-content/list-type-after.html: Added. * layout-tests/editing/unsupported-content/list-type-before-expected.txt: Added. * layout-tests/editing/unsupported-content/list-type-before.html: Added. 2005-03-20 Ken Kocienda <kocienda@apple.com> Reviewed by Maciej Fix for this bug: <rdar://problem/4059578> Entire list deleted, and caret disappears, when delete key hit at end of list The problem is that a new case in the delete code did not consider when the downstream end node of the selection might be an ancestor of the upstream start node. That is the case in this bug. The downstream end is the body element, and this line of code would delete all the children of the downstream end: removeChildrenInRangePreservingPosition(m_downstreamEnd.node(), 0, m_downstreamEnd.offset(), m_upstreamStart); The fix is to check for this "is ancestor" case, and do some tree logic to find the right offset of the downstream end node for the call to removeChildrenInRangePreservingPosition(). * khtml/editing/htmlediting.cpp: (khtml::DeleteSelectionCommand::handleGeneralDelete): Fixed as described. 2005-03-19 Ken Kocienda <kocienda@apple.com> Reviewed by Maciej Fix for this bug: <rdar://problem/4059384> Cannot place insertion point correctly in editable text that avoids floating elements Note: I strongly suspect this bug blocks a complete solution to this other Tiger/P2: <rdar://problem/4055748> AX: Dictionary pop-up panel shows at wrong place on specific parts of particular pages * khtml/rendering/render_text.cpp: (RenderText::caretRect): Change the y-coordinate used to calculate the available width for a line. Height is wrong. Top of the box containing the text where the click is done is correct. Also, add in the x-offset for the start of the text box when calculating the available width. If this text box is avoiding a float at the y-coordinate for the relevant box, failure to add in the amount of float-avoidance will make the text at the coordinates greater than end-of-line minus float-avoidance ineligible for caret placement. 2005-03-19 Darin Adler <darin@apple.com> Reviewed by Ken. - fixed <rdar://problem/4057594> REGRESSION (125-406): Unrepro crash in HTMLTokenizer::allDataProcessed after hitting Back button * khtml/html/htmltokenizer.cpp: (khtml::HTMLTokenizer::allDataProcessed): To get the part safely after calling end, save a guarded pointer to the view. The old way could end trying to call a virtual function a part that was destroyed. 2005-03-19 Maciej Stachowiak <mjs@apple.com> Reviewed by Darin. <rdar://problem/4053506> Pasting Tables and Cells in Mail does not allow editing before or after <rdar://problem/4005954> REGRESSION (Mail): After copy/paste of content containing list element cannot go back to entering text at left side of page * khtml/editing/htmlediting.cpp: (khtml::maxDeepOffset): (khtml::CompositeEditCommand::removeFullySelectedNodePreservingPosition): (khtml::CompositeEditCommand::removeChildrenInRangePreservingPosition): (khtml::CompositeEditCommand::removeNodePreservingPosition): (khtml::CompositeEditCommand::insertBlockPlaceholder): (khtml::CompositeEditCommand::appendBlockPlaceholder): (khtml::CompositeEditCommand::forceBlockPlaceholder): (khtml::CompositeEditCommand::addBlockPlaceholderIfNeeded): (khtml::isSpecialElement): (khtml::isFirstVisiblePositionInSpecialElementInFragment): (khtml::positionBeforePossibleContainingSpecialElement): (khtml::positionAfterPossibleContainingSpecialElement): (khtml::ApplyStyleCommand::applyInlineStyle): (khtml::DeleteSelectionCommand::initializePositionData): (khtml::DeleteSelectionCommand::insertPlaceholderForAncestorBlockContent): (khtml::DeleteSelectionCommand::handleGeneralDelete): (khtml::DeleteSelectionCommand::calculateTypingStyleAfterDelete): (khtml::DeleteSelectionCommand::doApply): (khtml::InsertParagraphSeparatorCommand::doApply): (khtml::ReplacementFragment::ReplacementFragment): (khtml::ReplaceSelectionCommand::doApply): * khtml/editing/htmlediting.h: * khtml/editing/visible_position.cpp: (khtml::isRenderedBR): (khtml::VisiblePosition::initDownstream): (khtml::isLastVisiblePositionInBlock): * khtml/rendering/render_line.cpp: (khtml::RootInlineBox::closestLeafChildForXPos): * khtml/xml/dom_nodeimpl.cpp: (NodeImpl::isBlockFlowOrTable): (NodeImpl::isEditableBlock): (NodeImpl::enclosingBlockFlowOrTableElement): * khtml/xml/dom_nodeimpl.h: * khtml/xml/dom_position.cpp: (DOM::Position::upstream): (DOM::Position::downstream): * layout-tests/editing/deleting/delete-at-paragraph-boundaries-003-expected.txt: * layout-tests/editing/deleting/delete-at-paragraph-boundaries-004-expected.txt: * layout-tests/editing/deleting/delete-select-all-001-expected.txt: * layout-tests/editing/deleting/delete-select-all-003-expected.txt: * layout-tests/editing/inserting/insert-3786362-fix-expected.txt: 2005-03-19 John Sullivan <sullivan@apple.com> Reviewed by Darin. - fixed <rdar://problem/4058740> Crash (nil-deref) editing Mail reply message in KWQKHTMLPart::fontForSelection (MailViewer-723) * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::fontForSelection): Add nil check to loop. It shouldn't be necessary, but this crash trace seems to be running into it. We're not completely certain, but the check is harmless at worst. === Safari-408 === 2005-03-18 David Harrison <harrison@apple.com> Reviewed by Darin. <rdar://problem/3584942> AX: Safari Accessibility parent-child mismatch Also changed WebKit. * kwq/KWQAccObject.mm: (-[KWQAccObject rendererForView:]): New to cover both the WebCore and WebKit NSViews. (-[KWQAccObject _accessibilityParentForSubview:]): Use rendererForView. * kwq/WebCoreFrameView.h: Add WebCoreBridgeHolder protocol to get access to WebKit NSViews. 2005-03-18 David Harrison <harrison@apple.com> Reviewed by Darin, Ken. <rdar://problem/3735625> AX: add AXPress action if an element has an onclick handler * khtml/dom/html_form.cpp: (HTMLInputElement::click): * khtml/html/html_elementimpl.cpp: (HTMLElementImpl::click): (HTMLElementImpl::accessKeyAction): * khtml/html/html_elementimpl.h: * khtml/html/html_formimpl.cpp: (DOM::HTMLFormElementImpl::submitClick): (DOM::HTMLButtonElementImpl::click): (DOM::HTMLButtonElementImpl::accessKeyAction): (DOM::HTMLInputElementImpl::click): (DOM::HTMLInputElementImpl::accessKeyAction): (DOM::HTMLInputElementImpl::defaultEventHandler): (DOM::HTMLLabelElementImpl::accessKeyAction): (DOM::HTMLSelectElementImpl::accessKeyAction): (DOM::HTMLTextAreaElementImpl::accessKeyAction): * khtml/html/html_formimpl.h: * khtml/html/html_inlineimpl.cpp: (HTMLAnchorElementImpl::defaultEventHandler): (HTMLAnchorElementImpl::accessKeyAction): * khtml/html/html_inlineimpl.h: * khtml/rendering/render_form.cpp: (RenderFileButton::click): * khtml/rendering/render_form.h: * khtml/xml/dom_docimpl.cpp: (DocumentImpl::defaultEventHandler): * khtml/xml/dom_elementimpl.h: (DOM::ElementImpl::accessKeyAction): * kwq/DOMHTML.mm: (-[DOMHTMLInputElement click]): * kwq/KWQButton.h: * kwq/KWQButton.mm: (QButton::click): * kwq/KWQFileButton.h: * kwq/KWQFileButton.mm: (KWQFileButton::click): Add accessKeyAction parameter about whether to limit to HTMLElementImpl subclasses that JavaScript wants, or to apply to others as well. Add click() parameter about whether to send the mousedown and mouseup events in addition to the click event. * kwq/KWQAccObject.mm: (-[KWQAccObject mouseButtonListener]): Locate a mousedown, mouseup, or click handler in the current element and its ancestors. (-[KWQAccObject actionElement]): (-[KWQAccObject accessibilityIsIgnored]): (-[KWQAccObject accessibilityPerformAction:]): Consider mouseButtonListener. 2005-03-18 John Sullivan <sullivan@apple.com> Reviewed by Darin. - fixed <rdar://problem/4002164> maps that include start and end location don't print right from maps.google.com I thought I checked this in yesterday but a ChangeLog conflict aborted my checkin without me noticing. * khtml/rendering/render_style.cpp: (RenderStyle::diff): flag name changed from _should_correct_text_color to _force_backgrounds_to_white * khtml/rendering/render_style.h: (khtml::RenderStyle::InheritedFlags::operator==): flag name changed from _should_correct_text_color to _force_backgrounds_to_white (khtml::RenderStyle::setBitDefaults): ditto (khtml::RenderStyle::forceBackgroundsToWhite): ditto, and method name changed too (khtml::RenderStyle::setForceBackgroundsToWhite): ditto * khtml/rendering/render_text.cpp: (InlineTextBox::paint): updated for name change; also, compare text against white instead of current bg color because we no longer actually modify the bg color (previously we would always set the bg color to white, so the result is the same) * khtml/xml/dom_docimpl.cpp: (DocumentImpl::recalcStyle): updated for name change * kwq/WebCoreBridge.mm: (-[WebCoreBridge styleSheetForPrinting]): removed this method (-[WebCoreBridge reapplyStylesForDeviceType:]): removed the code that called styleSheetForPrinting; we no longer use a stylesheet for this behavior. * khtml/rendering/render_box.cpp: (RenderBox::paintBackgroundExtended): If forceBackgroundsToWhite flag is set, convert background images and background colors to white background color with no background image. 2005-03-18 Ken Kocienda <kocienda@apple.com> Reviewed by John Fix for this bug: <rdar://problem/4056718> Pasting quotes the entire message * khtml/editing/htmlediting.cpp: (khtml::ReplaceSelectionCommand::doApply): After pasting, nodes are moved to the block containing the end of the pasted content in certain cases. This move logic used to stop once it moved all the siblings of the node following the last node of the pasted-in content. This means that block elements could get moved, and if the pasted-in content included a mail blockquote, this could result in one quote level getting added. The fix is to stop the move of nodes once a <br>, block element, or <table> is seen. This only affected one of the many test cases we have for such scenarios, and the change to that result makes sense given the code change. * layout-tests/editing/pasteboard/paste-text-003-expected.txt: This test result changed in a way that adequately tests the behavior change, so I did not add a new test. 2005-03-17 Ken Kocienda <kocienda@apple.com> Reviewed by Harrison Fix for this bug: <rdar://problem/4051809> 8A413: Cursor-up in a mail message sometimes gets stuck (with specific reproducible case) * khtml/rendering/render_text.cpp: (RenderText::positionForCoordinates): Consider two lines: line-above and line-below. If the caret position in line-below was at an x coordinate between half way through the x coordinate of the last character on the line-above and the end of that same character, this bug would happen since the positioning code would assume that it could create a VisiblePosition with a DOWNSTREAM affinity. Now, I check to see if the character position on the line-above is the last character on that line, and if it is, I use UPSTREAM as the affinity. === Safari-407 === 2005-03-17 David Harrison <harrison@apple.com> Reviewed by Darin, Ken. * khtml/editing/htmlediting.cpp: (khtml::EditCommandPtr::setEndingSelection): Fixed typo so that it calls setEndingSelection rather than setStartingSelection. Commented out this unused method, tho, since this is late in Tiger. Proved unused by successful build after temporarily removing method declaration or implemenation. 2005-03-16 Kevin Decker <kdecker@apple.com> Reviewed by mjs. Fixed <rdar://problem/4046665> REGRESSION (403-405): mypage.apple.com login does not work (hits assertion in Development build) * kwq/WebCoreBridge.mm: (-[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=""> 2005-03-16 Darin Adler <darin@apple.com> Reviewed by Maciej. - fixed <rdar://problem/4045203> REGRESSION (125-188): Redundant JS imports crash Safari * khtml/html/htmltokenizer.h: Take inWRite bool out of NDEBUG ifdef. * khtml/html/htmltokenizer.cpp: (khtml::HTMLTokenizer::HTMLTokenizer): Take inWrite bool management code out of NDEBUG ifdef. (khtml::HTMLTokenizer::write): Ditto. Don't call end if inWrite is true, since it will be called when you return to the body of the outer write() call. (khtml::HTMLTokenizer::allDataProcessed): Don't call end() if inWrite is true for the same reason. (khtml::HTMLTokenizer::finish): Ditto. * kwq/KWQWidget.mm: (QWidget::getOuterView): Removed bogus assertion that has been vexing us of late. 2005-03-16 David Harrison <harrison@apple.com> Reviewed by me (written by Patti Yeh). * kwq/KWQAccObject.mm: (-[KWQAccObject doAXNextWordEndTextMarkerForTextMarker:]): Use LeftWordIfOnBoundary instead of RightWordIfOnBoundary. (-[KWQAccObject doAXPreviousWordStartTextMarkerForTextMarker:]): Use RightWordIfOnBoundary instead of LeftWordIfOnBoundary. 2005-03-16 David Harrison <harrison@apple.com> Reviewed by Maciej. <rdar://problem/4054590> AX: Dictionary panel does not work when page is scrolled on Safari * kwq/KWQAccObject.mm: (-[KWQAccObject doAXTextMarkerForPosition:]): Add in the view's contentsX and contentsY to the point. 2005-03-16 David Harrison <harrison@apple.com> Reviewed by Maciej. <rdar://problem/4048506> Deleting from beginning of editable div deletes other document elements Also changed WebKit. * khtml/editing/visible_units.h: * khtml/editing/visible_units.cpp: (khtml::startOfEditableContent): (khtml::endOfEditableContent): (khtml::inSameEditableContent): (khtml::isStartOfEditableContent): (khtml::isEndOfEditableContent): New. * kwq/WebCoreBridge.h: * kwq/WebCoreBridge.mm: (-[WebCoreBridge canDeleteRange:]): New. 2005-03-16 Ken Kocienda <kocienda@apple.com> Reviewed by Darin Fix for this bug: <rdar://problem/4042935> undo doesn't work properly during inline input * kwq/WebCoreBridge.h: Declare new method below. * kwq/WebCoreBridge.mm: (-[WebCoreBridge replaceMarkedTextWithText:]): New method. Wraps calls to TypingCommand::deleteKeyPressed and TypingCommand::insertText to map the way that international text input works onto the typing undo system. 2005-03-16 David Harrison <harrison@apple.com> Reviewed by Darin. <rdar://problem/4044336> REGRESSION (8A398-8A409): Option-Delete also deletes space to left of deleted word * khtml/editing/htmlediting.cpp: (khtml::DeleteSelectionCommand::initializePositionData): - skip smart delete if the selection to delete already starts or ends with whitespace * khtml/khtml_part.cpp: (KHTMLPart::handleMousePressEventDoubleClick): - preserve selection on double-click when range is already selected * khtml/xml/dom_position.cpp: (DOM::Position::leadingWhitespacePosition): (DOM::Position::trailingWhitespacePosition): - fix considerNonCollapsibleWhitespace action (logic was reversed) - add non-breaking space to the non-collapsable ones * kwq/WebCoreBridge.mm: (-[WebCoreBridge rangeByExpandingSelectionWithGranularity:]): (-[WebCoreBridge rangeByAlteringCurrentSelection:direction:granularity:]): - these methods do not set the selection, so remove calls to setSelectionGranularity (-[WebCoreBridge alterCurrentSelection:direction:granularity:]): (-[WebCoreBridge alterCurrentSelection:verticalDistance:]): - set the granularity back to character - the one exception is that we need to keep word granularity to preserve smart delete behavior when extending by word 2005-03-15 Maciej Stachowiak <mjs@apple.com> Reviewed by John. <rdar://problem/4053266> Pressing return a few times right after a link makes the new blank lines part of the link * khtml/editing/htmlediting.cpp: (khtml::InsertLineBreakCommand::doApply): Use positionOutsideContainingSpecialElement in the right two places. (khtml::InsertParagraphSeparatorCommand::doApply): Ditto. - move all these helper functions higher in the file * khtml/editing/htmlediting.cpp: (khtml::isSpecialElement): (khtml::isFirstVisiblePositionInSpecialElement): (khtml::positionBeforeNode): (khtml::positionBeforeContainingSpecialElement): (khtml::maxRangeOffset): (khtml::isLastVisiblePositionInSpecialElement): (khtml::positionAfterNode): (khtml::positionAfterContainingSpecialElement): (khtml::positionOutsideContainingSpecialElement): 2005-03-14 Maciej Stachowiak <mjs@apple.com> Reviewed by Ken. <rdar://problem/4049925> Pasting right after a link makes pasted content part of the link (without visible style change) * khtml/editing/htmlediting.cpp: (khtml::positionOutsideContainingSpecialElement): made a helper function that computes a position outside the outermost containing special element if the passed in position is right at the start or end of it (khtml::InsertTextCommand::prepareForTextInsertion): use new helper here (khtml::ReplaceSelectionCommand::doApply): use it here too: this is the fix (khtml::positionBeforeNode): made static (khtml::positionBeforeContainingSpecialElement): made static (khtml::positionAfterNode): made static (khtml::positionAfterContainingSpecialElement): made static 2005-03-15 Richard Williamson <rjw@apple.com> Fixed <rdar://problem/4053658> Crash getting direction at maps.google.com Add non nil style() check. Reviewed by Dave Harrison. * khtml/rendering/render_table.cpp: (RenderTableCell::collapsedRightBorder): 2005-03-15 Kevin Decker <kdecker@apple.com> Reviewed by John Fixed: <rdar://problem/4041374> REGRESSION (185-186): unload handlers (at least those added with addEventListener) are broken The reason why UNLOAD_EVENT wouldn't dispatch was because the code would delete all event listeners at the detach() phase which is prior to closeURL(). This fixes a recent regression from: <rdar://problem/3977973> pages on ebay leak referenced JavaScript objects -- over time browsing becomes super-slow * khtml/khtml_part.cpp: (KHTMLPart::closeURL): After dispatching event handlers, go ahead and remove them from the DOM. * khtml/xml/dom_docimpl.cpp: (DocumentImpl::detach): Took out the call to removeAllEventListenersFromAllNodes(). If we remove all event listeners here then when KHTMLPart::closeURL() checks for even listeners, it will never have any because they'll already be gone. 2005-03-15 Ken Kocienda <kocienda@apple.com> Reviewed by Vicki Fox for this bug: <rdar://problem/4052642> Each delete keystroke is in its own undo group; not included in undo group with other typing Calling -[WebCore setSelectedDOMRange:range affinity:] had the result of "closing" any active set of typing keystrokes grouped together in a single undo operation. A change on 27 Jan in WebKit to change the way delete keystrokes are handled made this feature regress. Previous to that change, the backwards delete key went through separate code that is no longer in the tree that did not set the selection in the way it is done now. The solution is to add an extra argument to the set-selection call. The WebCoreBridge now offers this method: -[WebCore setSelectedDOMRange:range affinity:closeTyping:]. Now, callers must indicate whether setting the selection will act to close typing or not. * kwq/WebCoreBridge.h: Changed header accordingly to change method shown below. * kwq/WebCoreBridge.mm: (-[WebCoreBridge setSelectedDOMRange:affinity:closeTyping:]): Added closeTyping argument to this method. 2005-03-15 John Sullivan <sullivan@apple.com> Reviewed by Vicki. - fixed <rdar://problem/4052246> crash in KWQKHTMLPart::createPart() trying to display local file in frame * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::createPart): Check part for nil before trying to ref. This was probably a longstanding code flaw revealed by the recent security fix. 2005-03-15 Kevin Decker <kdecker@apple.com> Reviewed by Ken and Maciej. New fix for <rdar://problem/3667701> crash in KHTMLPart::jScriptEnabled() The tokenizer has buffers which mean parsing can continue even after loading is supposed to be stopped. If the loading process was aborted, the tokenizer should abort, too. * khtml/html/htmltokenizer.cpp: (khtml::HTMLTokenizer::HTMLTokenizer): Initialize loadStopped to false. (khtml::HTMLTokenizer::write): Go ahead and bail out if loadStopped is true. (khtml::HTMLTokenizer::processToken): * khtml/html/htmltokenizer.h: Added loadStopped flag. Changed the view pointer from a standard pointer to a QGuardedPtr. This fixes the crash. Now the tokenizer's handle to the view will now automatically nil-out and never dangle. * khtml/khtml_part.cpp: (KHTMLPart::closeURL): Notify the tokenizer to stop parsing. * khtml/xml/xml_tokenizer.cpp: (khtml::XMLTokenizer::XMLTokenizer): Initialize loadStopped to false. * khtml/xml/xml_tokenizer.h: (khtml::Tokenizer::stopParsing): Added. 2005-03-14 David Harrison <harrison@apple.com> Reviewed by Darin, Maciej. <rdar://problem/4046103> REGRESSION (Mail): clicking after style change sets insertion point incorrectly Also fixes crash by adding nil check. * khtml/editing/htmlediting.cpp: (khtml::MoveSelectionCommand::doApply): Check the node for nil. * khtml/khtml_part.cpp: (KHTMLPart::khtmlMouseReleaseEvent): Use the node from the event rather than from the selection. 2005-03-14 Darin Adler <darin@apple.com> Reviewed by Harrison. - fixed <rdar://problem/4049776> Seed: Mail: Disable spellcheck leaves red artifacts * khtml/xml/dom_docimpl.cpp: (DocumentImpl::DocumentImpl): Set markers list to be "auto-delete" so they don't all leak. (DocumentImpl::removeMarker): Remove markers list for a node when the last marker is removed for that node. Otherwise, we can have empty marker lists for each node forever until the document goes away. (DocumentImpl::removeAllMarkers): Added code to dirty the markers. (DocumentImpl::shiftMarkers): Remove unneeded empty check. * kwq/WebCoreBridge.h: Added unmarkAllMisspellings for WebKit. * kwq/WebCoreBridge.mm: (-[WebCoreBridge unmarkAllMisspellings]): Added. Calls removeAllMarkers. 2005-03-14 Richard Williamson <rjw@apple.com> Fixed <rdar://problem/4027928> Tiger_8A394:Acrobat crashes while tried to remove the subscription errors by clicking on "Would you like to remove the subscription" from Tracker details view pane A document may be deleted as a consequence of handling an event, as was the case with Acrobat.app. Ensure that the document is still valid before passing the event on for further handling. * khtml/xml/dom_nodeimpl.cpp: (NodeImpl::dispatchUIEvent): 2005-03-14 Ken Kocienda <kocienda@apple.com> Reviewed by me Added a couple of comments about setChanged() to this code based on my experiences with 4047028. * khtml/css/css_valueimpl.cpp: (DOM::CSSMutableStyleDeclarationImpl::addParsedProperties) (DOM::CSSMutableStyleDeclarationImpl::merge) 2005-03-14 Ken Kocienda <kocienda@apple.com> Reviewed by John Fix for this bug: <rdar://problem/4047028> Changing quote levels on stylized text causes it to be sent as colored (Blue). Tiger8A410 * khtml/css/css_valueimpl.cpp: (DOM::CSSMutableStyleDeclarationImpl::removePropertiesInSet): This function now calls setChanged() at the end of its loop if any properties were removed. This makes the style system update correctly in response to changes made by this function. The code to paste removes style from the pasted content in a preliminary step, and the fact that the style system did not update properly left unwanted color declarations in the document. 2005-03-14 Vicki Murley <vicki@apple.com> - roll out this change for now, since it was denied by CCC 2005-03-11 David Harrison <harrison@apple.com> Reviewed by Darin. <rdar://problem/4046602> WebCore invokes undefined behavior when the spell checker isn't running * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::advanceToNextMisspelling): (KWQKHTMLPart::markMisspellings): Nil check checker. 2005-03-14 Ken Kocienda <kocienda@apple.com> Reviewed by John Fix for this bug: <rdar://problem/4050403> Mail crashes after pasting and deleting the content of one Excel cell * khtml/editing/htmlediting.cpp: (khtml::DeleteSelectionCommand::handleGeneralDelete): Add some null checks to the code. This fixes the crash, although following the steps described in the bug by John Sullivan on 3/14/05 at 10:49 AM will leave us with a "blank line" in the document that cannot be removed (this is actually an empty table). This is undesirable, however, work Maciej is doing to fix the general-case problem of trying to edit constructs we do not handle well in editing should fix this particular case, making the deletion of this "blank line" possible. Maciej is doing this work as part of this bug: <rdar://problem/4036051> Hard to select (and thus delete) an IFRAME in an editable WebView 2005-03-14 Ken Kocienda <kocienda@apple.com> Reviewed by Darin Fix for this bug: <rdar://problem/4029632> Mail crashes in DOM::NodeImpl::isBlockFlow() after pasting text with alignment style and BR element from Safari The problem is that removeInlineStyle() can remove nodes, and if either the start or end node of the selection at the time of the call to removeInlineStyle() was in a node that got removed, bad things would happen. The fix is described below. * khtml/editing/htmlediting.cpp: (khtml::maxRangeOffset): Moved this static function to a different place in the file so the code below can use it. (khtml::ApplyStyleCommand::applyInlineStyle): Calling removeInlineStyle() now has the side effect of setting the command's ending selection. Now resets start and end using the ending selection after the call to removeInlineStyle() as it is done elsewhere in this function. (khtml::ApplyStyleCommand::removeInlineStyle): Track the removal of the start or end node based on the positions passed in. If either the start or the end node is removed as part of style removal, set an appropriate replacement start or end that is still in the document. === Safari-406 === 2005-03-14 Ken Kocienda <kocienda@apple.com> Reviewed by Darin I need to roll out Kevin's change to fix 3667701. It breaks contextual fragments, and hence breaks paste in editing (among other things). * khtml/html/htmltokenizer.cpp: Roll out recent change. (khtml::HTMLTokenizer::write) * khtml/html/htmltokenizer.h: Ditto. 2005-03-13 Darin Adler <darin@apple.com> Reviewed by Ken and Maciej. - fixed <rdar://problem/4049040> REGRESSION (403-405): security check prevents user stylesheet from loading (Dictionary.app doesn't work at all!) * kwq/WebCoreBridge.mm: (-[WebCoreBridge canLoadURL:fromReferrer:hideReferrer:]): Changed to give "applewebdata:" documents the same privileges to open local files that "file:" documents have. 2005-03-13 Kevin Decker <kdecker@apple.com> Reviewed by mjs. Fixed: <rdar://problem/3667701> crash in KHTMLPart::jScriptEnabled() The problem here was that the tokenizer would continue to receive chunks of data from the loader already after the view and part had been destroyed. Situations like this could arise when clicking on another link while still loading the current view, or during self test where we rapidly open, load, and close browser windows very fast. * khtml/html/htmltokenizer.cpp: (khtml::HTMLTokenizer::write): Simple nil check against the view. * khtml/html/htmltokenizer.h: Changed the view pointer from a standard pointer to a QGuardedPtr. The tokenizer's handle to the view will now automatically nil-out and never dangle. 2005-03-13 Darin Adler <darin@apple.com> Reviewed by John and Ken. - fixed <rdar://problem/4044347> REGRESSION (Mail): Control-K in particular message moves insertion point to previous line Tweaked the deleting code, and added three new deleting layout tests to confirm the new code works. * khtml/editing/htmlediting.cpp: (khtml::DeleteSelectionCommand::handleSpecialCaseBRDelete): Removed special case with comment that said it was for the case where a "selection contains only a BR right after a block ended". This code was being triggered in more cases than just that one, and in all the cases I tested, the general delete code works fine. (khtml::DeleteSelectionCommand::handleGeneralDelete): Changed the code that decides whether to delete an entire block to understand the case where the end block is outside the start block, but contains the start block. In that case, we want to delete the entire block. Not deleting the block was causing us to delete just the <br>, and not the enclosing <div> in the case in the bug. * layout-tests/editing/deleting/delete-line-015-expected.txt: Added. * layout-tests/editing/deleting/delete-line-015.html: Added. * layout-tests/editing/deleting/delete-line-016-expected.txt: Added. * layout-tests/editing/deleting/delete-line-016.html: Added. * layout-tests/editing/deleting/delete-line-017-expected.txt: Added. * layout-tests/editing/deleting/delete-line-017.html: Added. * layout-tests/editing/style/smoosh-styles-002-expected.txt: Updated to improved results. With the code change, the deletion now deletes more than it used to. The old results had an empty text node and <h1> element that were both 0-sized, and now we delete both of those. 2005-03-13 Darin Adler <darin@apple.com> - fixed <rdar://problem/4049172> REGRESSION (403-405): Gmail: text box in "Invite a friend" section overlaps other sections Rolled out fix for <rdar://problem/3952698> Function buttons do not display properly with Telia Webmail * khtml/rendering/render_replaced.cpp: (RenderReplaced::calcMinMaxWidth): Back to previous version of this file. 2005-03-12 Maciej Stachowiak <mjs@apple.com> Reviewed by Adele. <rdar://problem/4046144> RSS pages leave a hole in local file security policy (need to revert feed: exemption) * kwq/WebCoreBridge.mm: (-[WebCoreBridge canLoadURL:fromReferrer:hideReferrer:]): Revert emergency workaround for Safari RSS, now that a new Syndication has been submitted. 2005-03-11 Maciej Stachowiak <mjs@apple.com> Reviewed by Kevin. <rdar://problem/4026787> text typed after a link (pasted or Mail Link to this Page) is part of the link, underlined and colored blue The concept of this change is every time you type at the very start or very end of a link (even if nested in further inner elements), the typed text goes outside the link instead of inside. * khtml/editing/htmlediting.cpp: (khtml::InsertTextCommand::prepareForTextInsertion): Check whether we are at the first visible position or last visible position of a special element. For now this only includes HTML A elements that are links (i.e. they have an href). (khtml::isSpecialElement): Helper function that identifies special elements (for now only links). (khtml::isFirstVisiblePositionInSpecialElement): Checks if a given DOM position is equivalent to the first visible position in some containing editable special element. (khtml::positionBeforeNode): Returns the DOM position immediately before a node. (khtml::positionBeforeContainingSpecialElement): Gives a DOM position immediately before the outermost editable containing special element where the passed-in position is equivalent to the first visible position. (khtml::maxRangeOffset): Helper to get the maximum allowed range/position offset for a node, does the right thing based on whether the node would use a character offset or child offset. (khtml::isLastVisiblePositionInSpecialElement): Similar to above, but for end of node instead of start. (khtml::positionAfterNode): Ditto. (khtml::positionAfterContainingSpecialElement): Ditto. Some layout tests changed - I looked over all the diffs and found that the only changes were "junk nodes" like empty spans and text nodes moving from one spot in the tree to another. These changes are all harmless and do not affect layout or future editing. * layout-tests/editing/inserting/typing-003-expected.txt: * layout-tests/editing/style/remove-underline-across-paragraph-expected.txt: * layout-tests/editing/style/remove-underline-across-paragraph-in-bold-expected.txt: * layout-tests/editing/style/remove-underline-after-paragraph-expected.txt: * layout-tests/editing/style/remove-underline-after-paragraph-in-bold-expected.txt: * layout-tests/editing/style/remove-underline-expected.txt: * layout-tests/editing/style/remove-underline-from-stylesheet-expected.txt: * layout-tests/editing/style/remove-underline-in-bold-expected.txt: * layout-tests/editing/style/typing-style-003-expected.txt: * layout-tests/editing/style/unbold-in-bold-expected.txt: * layout-tests/editing/style/underline-expected.txt: 2005-03-11 Adele Amchan <adele@apple.com> backing out fix for <rdar://problem/4021711> REGRESSION (125-188): blank pages when browsing forum at cooperativeresearch.org - cached external script problem This caused the following regressions (that we know of): <rdar://problem/4047445> REGRESSION (Safari-400-403?): Some or all page contents sometimes don't appear (macworld.com) <rdar://problem/4046153> 8a409: Problem loading Citibank page in Safari 2 (403) <rdar://problem/4047801> REGRESSION (402-403): .Mac homepage links don't work * khtml/html/htmltokenizer.cpp: (khtml::HTMLTokenizer::scriptHandler): 2005-03-11 David Harrison <harrison@apple.com> Reviewed by Darin. <rdar://problem/4046602> WebCore invokes undefined behavior when the spell checker isn't running * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::advanceToNextMisspelling): (KWQKHTMLPart::markMisspellings): Nil check checker. 2005-03-11 Ken Kocienda <kocienda@apple.com> Reviewed by me * ForwardingHeaders/editing/visible_units.h: Added. 2005-03-11 Ken Kocienda <kocienda@apple.com> Reviewed by John Fix for this bug: <rdar://problem/4045521> Hitting return key with full line selected does not add blank line as it should * khtml/editing/htmlediting.cpp: (khtml::InsertParagraphSeparatorCommand::doApply): Removed some "special-case" code from this function that would look for a selection that started and ended in a different block, and would then bail right after the deletion of the selection without inserting a paragraph separator. This was just wrong. So, the code change is removal only. When the general-case code runs instead of the erroneous special-case code, the bug goes away. New tests: * layout-tests/editing/inserting/return-key-with-selection-001-expected.txt: Added. * layout-tests/editing/inserting/return-key-with-selection-001.html: Added. * layout-tests/editing/inserting/return-key-with-selection-002-expected.txt: Added. * layout-tests/editing/inserting/return-key-with-selection-002.html: Added. * layout-tests/editing/inserting/return-key-with-selection-003-expected.txt: Added. * layout-tests/editing/inserting/return-key-with-selection-003.html: Added. 2005-03-11 David Harrison <harrison@apple.com> Reviewed by Darin. <rdar://problem/4009446> AX: kAXTextMarkerForPositionParameterizedAttribute not working correctly (required for Dictionary pop-up) * kwq/KWQAccObject.mm: (-[KWQAccObject accessibilityAttributeValue:]): Comment changes. (-[KWQAccObject doAXTextMarkerForPosition:]): Dig into widgets. (-[KWQAccObject doAXBoundsForTextMarkerRange:]): Use the selection's document instead of the top document, to accommodate frames, etc. (-[KWQAccObject accessibilityAttributeValue:forParameter:]): Fixed parameter processing to look for NSValue instead of AXValue. 2005-03-11 Ken Kocienda <kocienda@apple.com> Reviewed by Harrison Fix for this bug: <rdar://problem/3972665> 8A360: HTML message partially truncated on left hand side, text-indent from Script Editor This was fixed, then regressed with Harrison's fix for this bug: <rdar://problem/3948453> Can't type accented chars as first character in Stickies widget * khtml/editing/htmlediting.cpp: (khtml::ReplaceSelectionCommand::doApply): My now addresses both problems in a way that they no longer clobber each other. 2005-03-10 Ken Kocienda <kocienda@apple.com> Reviewed by John Fix for these bugs: <rdar://problem/4045511> Copying and pasting end-of-paragraph selection puts insertion point in wrong place <rdar://problem/4045513> Copying and pasting selection starting at end of paragraph can incorrectly remove line break The copy/paste code before this patch had no notion of a "logical newline" at the start of the selection. We have had a similar notion for "logical newline" at the end of the selection for quite some time. To fix these bugs, we need to introduce the same idea for selection starts. * khtml/editing/htmlediting.cpp: (khtml::ReplacementFragment::ReplacementFragment): Process the "logical newline" at start as we write it out in markup. Set the bit we added to this object to signify we have such a newline. (khtml::ReplaceSelectionCommand::doApply): Many, many changes to introduce the new "logical newline" at start concept. I also tried to simply the code that sets the start position for inserting content to be pasted. I also improved a weakness in the smart-paste code. Now, we check before and after the paste for whether we need to add a leading or trailing space. The code previous to this patch only did a "before" check, with the result that we sometimes added a second space. In other words, the code did not realize that DOM changes done by pasting could cause formerly unrendered whitespace to become rendered. Also moved line placeholder clean up code to its own function. (khtml::ReplaceSelectionCommand::removeLinePlaceholderIfNeeded): New helper that further refines the notion of when we can remove a line placeholder. The definition is now, "If a line placeholder is at the visible start and visible end of its line, keep it; otherwise remove it". * khtml/editing/htmlediting.h: Declare new functions. Rework inlines in ReplacementFragment class to account for addition of new "logical newline" at start concept. (khtml::ReplacementFragment::hasInterchangeNewlineAtStart): New accessor. (khtml::ReplacementFragment::hasInterchangeNewlineAtEnd): Renamed from hasInterchangeNewline(), since before we only had a bit for the end, hence we did not need to distinguish it from the start. * khtml/editing/markup.cpp: (khtml::createMarkup): Added code to detect and write out markup for cases where we have a "logical newline" at start. * khtml/xml/dom2_rangeimpl.cpp: (DOM::RangeImpl::startPosition): New helper. (DOM::RangeImpl::endPosition): Ditto. * khtml/xml/dom2_rangeimpl.h: Declare new helpers. New tests: * layout-tests/editing/pasteboard/paste-line-endings-001-expected.txt: Added. * layout-tests/editing/pasteboard/paste-line-endings-001.html: Added. * layout-tests/editing/pasteboard/paste-line-endings-002-expected.txt: Added. * layout-tests/editing/pasteboard/paste-line-endings-002.html: Added. * layout-tests/editing/pasteboard/paste-line-endings-003-expected.txt: Added. * layout-tests/editing/pasteboard/paste-line-endings-003.html: Added. * layout-tests/editing/pasteboard/paste-line-endings-004-expected.txt: Added. * layout-tests/editing/pasteboard/paste-line-endings-004.html: Added. * layout-tests/editing/pasteboard/paste-line-endings-005-expected.txt: Added. * layout-tests/editing/pasteboard/paste-line-endings-005.html: Added. * layout-tests/editing/pasteboard/paste-line-endings-006-expected.txt: Added. * layout-tests/editing/pasteboard/paste-line-endings-006.html: Added. * layout-tests/editing/pasteboard/paste-line-endings-007-expected.txt: Added. * layout-tests/editing/pasteboard/paste-line-endings-007.html: Added. * layout-tests/editing/pasteboard/paste-line-endings-008-expected.txt: Added. * layout-tests/editing/pasteboard/paste-line-endings-008.html: Added. * layout-tests/editing/pasteboard/paste-line-endings-009-expected.txt: Added. * layout-tests/editing/pasteboard/paste-line-endings-009.html: Added. * layout-tests/editing/pasteboard/paste-line-endings-010-expected.txt: Added. * layout-tests/editing/pasteboard/paste-line-endings-010.html: Added. === Safari-405 === 2005-03-10 Darin Adler <darin@apple.com> Reviewed by Richard. - fixed <rdar://problem/4037700> Every character typed causes stat call for /usr/share/icu/icudt32b_char.brk * khtml/rendering/render_text.cpp: (getCharacterBreakIterator): Set boolean "got iterator" to true. 2005-03-10 Darin Adler <darin@apple.com> Reviewed by Ken. - fixed <rdar://problem/4042867> "Bigger" changes the font size of too much text when the selection is on a style-change boundary * khtml/editing/htmlediting.cpp: (khtml::ApplyStyleCommand::applyRelativeFontStyleChange): Advance out of the starting text node if we're at the end of it. 2005-03-10 Darin Adler <darin@apple.com> * khtml/html/htmltokenizer.cpp: (khtml::HTMLTokenizer::write): Fixed assertion for nested calls to write. 2005-03-10 David Harrison <harrison@apple.com> Reviewed by Darin. <rdar://problem/4032346> REGRESSION (Mail): changing 1st line of a URL that wraps to two lines doesn't always update 2nd line * khtml/rendering/bidi.cpp: (khtml::RenderBlock::matchedEndLine): Look at first clean line in case line wrap implicitly dirtied it. 2005-03-10 Maciej Stachowiak <mjs@apple.com> Reviewed by Vicki. <rdar://problem/4046018> REGRESSION (TOT): RSS pages don't display anything * kwq/WebCoreBridge.mm: (-[WebCoreBridge canLoadURL:fromReferrer:hideReferrer:]): Exempt feed: and feeds: pages from the local file security check. 2005-03-10 Darin Adler <darin@apple.com> Change written by Steve Peters, reviewed by me. - fixed <rdar://problem/4045924> improve compareBoundaryPoints to make style changes faster * khtml/xml/dom2_rangeimpl.cpp: (DOM::RangeImpl::compareBoundaryPoints): Do early outs in a couple of the loops to make things faster. 2005-03-10 Jens Alfke <jens@apple.com> Reviewed by rjw. Fixes <rdar://problem/4040848> "REGR: Sun security-check demo applet does not load". My earlier fix for 3603191 deferred loading the applet until the </applet> tag is reached, so all <param>s will be available. Unfortunately that meant that if the </applet> tag was missing, the applet would never load at all. So instead, the loading needs to happen when the ID_APPLET tag is popped from the parser stack for any reason. I've restored the old NodeImpl::closeRenderer() method. Except it's now virtual, with a no-op base implementation, and is overridden by HTMLAppletElementImpl, replacing its setAllParamsAvailable method that I added a few weeks ago when fixing 3603191. This ensures that the applet will get loaded even if there is no explicit </applet> tag. The changes to htmlparser.cpp back out my earlier change and restore the lines that were deleted on 8/3/04 when the old closeRenderer was removed. * khtml/html/html_objectimpl.cpp: (HTMLAppletElementImpl::closeRenderer): * khtml/html/html_objectimpl.h: * khtml/html/htmlparser.cpp: (KHTMLParser::insertNode): (KHTMLParser::processCloseTag): (KHTMLParser::popOneBlock): * khtml/xml/dom_nodeimpl.h: (DOM::NodeImpl::closeRenderer): 2005-03-10 Ken Kocienda <kocienda@apple.com> Reviewed by John Fix for this bug: <rdar://problem/4024929> REGRESSION (Mail): Pasting text with multiple reply levels removes one level instead of all The code to figure out which node to use to merge into an existing line did not drill into the first inline element as needed to make the feature work as user expect. Instead, it looked at the first node, and if it was a block, it skipped that node. This worked for some cases (including the important "paste-as-quotation" case) but obviously doesn't work for content quoted more than once. Now, mergeStartNode() will look for the first node in pasted content that is not a block. It will now also look for nodes specially marked by Mail as a node added to make "Paste As Quotation" work. It won't skip those. NOTE: This change will break Mail's "Paste As Quotation" feature for TOT WebKit users, but this is only a temporary problem that will exist until we sync up with Mail's pending change to mark nodes as needed in its pasteAsQuotation: method. * khtml/editing/html_interchange.h: Add ApplePasteAsQuotation constant used to check for "marked" blockquotes. * khtml/editing/htmlediting.cpp: (khtml::ReplacementFragment::mergeStartNode): Look for first node that is either not a block or is marked as an ApplePasteAsQuotation node. (khtml::isMailPasteAsQuotationNode): New helper that looks for nodes marked with ApplePasteAsQuotation. * khtml/editing/htmlediting.h: Updated header for new function. This test result changed is an acceptable way. * layout-tests/editing/pasteboard/paste-text-013-expected.txt * layout-tests/editing/pasteboard/paste-text-013.html NOTE: This change causes a regression in this layout test: * layout-tests/editing/pasteboard/paste-text-013.html This problem will need to be fixed separately, and this bug has been filed to track this problem: <rdar://problem/4045513> Copying and pasting selection starting at end of paragraph can incorrectly remove line break 2005-03-09 Maciej Stachowiak <mjs@apple.com> Reviewed by Richard. <rdar://problem/4040776> Dashboard (Weather widget) is a memory hog Change things around so the event listeners for XMLHttpRequest mark their JS listener objects instead of holding a hard reference, to avoid an unbreakable reference cycle. * khtml/ecma/kjs_events.cpp: (JSAbstractEventListener::JSAbstractEventListener): (JSAbstractEventListener::~JSAbstractEventListener): (JSAbstractEventListener::handleEvent): (JSAbstractEventListener::eventListenerType): (JSUnprotectedEventListener::JSUnprotectedEventListener): (JSUnprotectedEventListener::~JSUnprotectedEventListener): (JSUnprotectedEventListener::listenerObj): (JSUnprotectedEventListener::windowObj): (JSUnprotectedEventListener::mark): (JSEventListener::JSEventListener): (JSEventListener::~JSEventListener): (JSEventListener::listenerObj): (JSEventListener::windowObj): (JSLazyEventListener::JSLazyEventListener): * khtml/ecma/kjs_events.h: * khtml/ecma/kjs_html.h: * khtml/ecma/kjs_window.cpp: (Window::getJSEventListener): (Window::getJSUnprotectedEventListener): * khtml/ecma/kjs_window.h: * khtml/ecma/xmlhttprequest.cpp: (KJS::XMLHttpRequest::putValue): (KJS::XMLHttpRequest::mark): * khtml/ecma/xmlhttprequest.h: * khtml/khtml_part.h: 2005-03-06 Maciej Stachowiak <mjs@apple.com> Reviewed by Darin. <rdar://problem/4005575> Arbitrary file disclosure vulnerability due to ability to load local html from remote content * khtml/ecma/kjs_html.cpp: (KJS::HTMLDocument::putValue): * khtml/ecma/kjs_window.cpp: (Window::put): (WindowFunc::tryCall): (Location::put): (LocationFunc::tryCall): * khtml/khtml_part.cpp: (KHTMLPart::begin): (KHTMLPart::scheduleLocationChange): (KHTMLPart::slotRedirect): (KHTMLPart::processObjectRequest): * khtml/khtml_part.h: * khtml/khtmlpart_p.h: * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::openURLRequest): (KWQKHTMLPart::urlSelected): (KWQKHTMLPart::createPart): * kwq/KWQKHTMLPartBrowserExtension.mm: (KHTMLPartBrowserExtension::createNewWindow): * kwq/WebCoreBridge.h: * kwq/WebCoreBridge.mm: (hasCaseInsensitivePrefix): (-[WebCoreBridge didNotOpenURL:pageCache:]): (-[WebCoreBridge canLoadURL:fromReferrer:hideReferrer:]): 2005-03-09 Richard Williamson <rjw@apple.com> Fixed <rdar://problem/4032938> Safari: text layout for MS P Gothic font is corrupted Remove our hacked special case now we have our own cache of which fonts are fixed pitch. Reviewed by Maciej. * kwq/KWQFont.mm: (QFont::isFixedPitch): 2005-03-09 David Harrison <harrison@apple.com> Reviewed by Maciej. <rdar://problem/4037141> REGRESSION (Mail): Pasting deletes preceding blank lines with certain steps * khtml/editing/htmlediting.cpp: (khtml::DeleteSelectionCommand::insertPlaceholderForAncestorBlockContent): Add check for anonymous text after blocks. 2005-03-08 Ken Kocienda <kocienda@apple.com> Reviewed by John Fix for these bugs: <rdar://problem/4039661> crash in ApplyStyleCommand::applyBlockStyle pasting contents of webpage into Mail or Blot <rdar://problem/4039672> hang in moveParagraphContentsToNewBlockIfNecessary after pasting contents of webpage into Blot * khtml/editing/htmlediting.cpp: (khtml::CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessary): Fix for 4039672. Iteration needs to do a traverseNextSibling(), not a traverseNextNode(). The latter might iterate into a child that already got moved, and the code can infinite loop as a result. (khtml::ApplyStyleCommand::applyBlockStyle): Fix for 4039661. This function iterates over a set of nodes to apply block styles. Before, the iteration would go from the start to the end of the selection, and apply block styles as it went. However, the act of applying style could confuse the iteration. Now I iterate and store the relevant nodes in QPtrList before doing any style manipulation, and then iterate that set of nodes. 2005-03-08 Darin Adler <darin@apple.com> Change written by Hyatt, reviewed by me. - fixed <rdar://problem/3952698> Function buttons do not display properly with Telia Webmail * khtml/rendering/render_replaced.cpp: (RenderReplaced::calcMinMaxWidth): Only use a minWidth of 0 for images with a percentage value. Other replaced elements aren't scalable so their minWidth should be their calculated width. This has been wrong all along, but it's a relatively safe change because it only affects replaced elements' min-width. 2005-03-08 David Harrison <harrison@apple.com> Reviewed by Ken. <rdar://problem/4039006> REGRESSION (Mail): Command-left-arrow goes to the start of the wrong line in particular message * khtml/editing/visible_units.cpp: (khtml::startOfLine): Use firstLeafChild() instead of firstChild(). 2005-03-08 Richard Williamson <rjw@apple.com> Fixed by Tom Madden. Fixed <rdar://problem/4038586> 8A402: Osaka-Mono text overlaps when typing with input method We weren't clearing the "all ascii" flag when setting text on RenderText. Reviewed by Richard Williamson. * khtml/rendering/render_text.cpp: (RenderText::setText): 2005-03-08 Darin Adler <darin@apple.com> Reviewed by Ken and Maciej. - fixed <rdar://problem/3988809> REGRESSION (Mail): wide space characters are turned into plain old spaces when typed or pasted Changed the few places where it matters to use a "collapsible whitespace" concept instead of the general whitespace concept. This means treating only ' ' and '\n' specially instead of including other space characters, which matches what the space-collapsing logic does in RenderText, although it really needs to behave differently based on whitespace mode. * khtml/editing/visible_text.h: (khtml::isCollapsibleWhitespace): Added. This returns true only for ' ' and '\n' since they are the only characters collapsed once text is in the DOM. But really it can't do the job ignoring white-space mode, so some day it must go. * khtml/editing/html_interchange.cpp: (convertHTMLTextToInterchangeFormat): Changed to use isCollapsibleWhitespace and removed unnecessary calls to latin1(). * khtml/editing/htmlediting.cpp: (khtml::isNBSP): Removed unnecessary creation/destruction of QChar each time this is called. (khtml::nextCharacterIsCollapsibleWhitespace): Renamed from isWS and changed to use isCollapsibleWhitespace. (khtml::DeleteSelectionCommand::fixupWhitespace): Use isCollapsibleWhitespace instead of isWS, since we only want to do our NBSP tricks for collapsible whitespace. (khtml::InsertTextCommand::input): Changed use of isTab to instead say == "\t" since that does the same thing and is arguably just as clear. Changed use of isWS to == " " since the input text can't include any "\n" characters, and really a plain old space is the only collapsible thing that can be passed in. Use isCollapsibleWhitespace instead of isWS since we want to do NBSP tricks only for collapsible whitespace, not all whitespace. (khtml::InsertTextCommand::insertSpace): Use isCollapsibleWhitespace instead of isWS since we want to do NBSP tricks only for collapsible whitespace, not all whitespace. (khtml::RebalanceWhitespaceCommand::doApply): Ditto. * khtml/xml/dom_position.h: Changed treatNBSPAsWhiteSpace parameters to considerNonCollapsibleWhitespace parameters. The most common callers are only interested in collapsible whitespace, and the smart copy and paste callers want to include all whitespace, including non-breaking spaces and all the Unicode spaces. * khtml/xml/dom_position.cpp: (DOM::Position::leadingWhitespacePosition): Rename the parameter, and use either QChar::isSpace or isCollapsibleWhitespace depending on the boolean passed in. (DOM::Position::trailingWhitespacePosition): Ditto. 2005-03-07 John Sullivan <sullivan@apple.com> Reviewed by Darin. - <rdar://problem/4040868> REGRESSION (Mail, 403-403+): Drag and drop deletes text, many other bad editing problems * khtml/rendering/render_text.cpp: (RenderText::caretMaxOffset): A "-" should have been a "+" in this method that was tweaked an hour ago. Editing was completely horked. 2005-03-07 Richard Williamson <rjw@apple.com> Additional nil check from fix for 4040749. * khtml/rendering/render_box.cpp: (RenderBox::setStyle): 2005-03-07 Richard Williamson <rjw@apple.com> Additional nil check from fix for 4040749. * khtml/rendering/render_layer.cpp: (RenderLayer::updateLayerPosition): 2005-03-07 David Harrison <harrison@apple.com> Reviewed by Darin. <rdar://problem/4033202> REGRESSION (Mail): Can't arrow up at a particular spot in a particular Mail message Doublecheck that new position is really on a different line, because the VisiblePosition constructor does not. Filed <rdar://problem/4040763> for that problem. * khtml/editing/visible_units.cpp: (khtml::previousLinePosition): 2005-03-07 Richard Williamson <rjw@apple.com> Fixed <rdar://problem/4040749> REGRESSION (125-178): opacity style not working, breaks fading images on okcupid.com When layers are dynamically created/removed as a result of changing opacity they weren't being correctly sized and positioned. This happens whenever opacity goes from < 1 to 1. Reviewed by Darin. * khtml/rendering/render_box.cpp: (RenderBox::setStyle): * khtml/rendering/render_layer.cpp: (RenderLayer::updateLayerPosition): 2005-03-07 Christy Warren <kali@apple.com> Reviewed by Darin * khtml/rendering/render_text.cpp: (RenderText::caretMinOffset): modified to handle BIDI case by checking all text boxes for min offset (RenderText::caretMaxOffset): modified to handle BIDI case by checking all text boxes for max offset 2005-03-07 David Harrison <harrison@apple.com> Reviewed by Ken. <rdar://problem/4029225> REGRESSION (Mail): Crash if hit return after dragging in attachment - DeleteSelectionCommand::initializePositionData Work around the fact that the height() of a BR is 0 if there are no text elements on the line, even if there are replaced elements. Filed <rdar://problem/4040358> RenderBR height() is not accurate. * khtml/editing/htmlediting.cpp: (khtml::ReplaceSelectionCommand::doApply): When height is 0, double check that the placeholder is the first position on the line. === Safari-403 === 2005-03-07 Ken Kocienda <kocienda@apple.com> Reviewed by Vicki Fix for this bug: <rdar://problem/4040136> Expose SPI for WebCore's functions to create document fragments from plain text and markup strings * kwq/DOMHTML.mm: Add two new SPI functions. (-[DOMHTMLDocument _createDocumentFragmentWithMarkupString:baseURLString:]) (-[DOMHTMLDocument _createDocumentFragmentWithText:]) * kwq/DOMPrivate.h: Declare the new SPI here, a privately-exported header, so Mail can make use of it. 2005-03-07 Ken Kocienda <kocienda@apple.com> Reviewed by John Fix for this bug: <rdar://problem/4039676> REGRESSION (Mail): in reply, <cr> on pasted text (without trailing newline) is eaten when pasted above date * khtml/editing/htmlediting.cpp: (khtml::ReplaceSelectionCommand::doApply): Code to "eat" a <br> element, that was creating an otherwise empty line, was running when it should not. If the content being pasted in does not end in a "logical" newline itself, then the <br> already in the content needs to be preserved. A simple one-line change now sees to this. * layout-tests/editing/pasteboard/paste-text-010-expected.txt: This test now has an extra, but harmless, <br> at the end of a paragraph. This makes sense given the code change. New test: * layout-tests/editing/pasteboard/paste-text-018-expected.txt: Added. * layout-tests/editing/pasteboard/paste-text-018.html: Added. 2005-03-07 Ken Kocienda <kocienda@apple.com> Reviewed by John Fix for this bug: <rdar://problem/4035648> REGRESSION (Mail): line feed in source HTML file causes bad copy/paste behavior The createMarkup() function in markup.cpp iterates over the nodes in a range, and does some bookkeeping to figure out when to add close tags to the markup. Some code added at the start of the loop to prevent markup from being written for unrendered nodes short-circuited the rest of the loop, and so prevented the close-tag-writing code from running when it should. This is why the "plain" text wound up inside of the bold tag in the example above. The addition of the unrendered return character caused an incorrect delay in the close tag for the bold element from being written out, with the result being that it wound up including additional content. The fix is to add checks for node renderers throughout the loop at the points where markup is written out for each node. This allows the additional close tag logic to run as needed. All layout tests pass with this change. * khtml/editing/markup.cpp: (khtml::createMarkup) New test: * layout-tests/editing/pasteboard/paste-4035648-fix-expected.txt: Added. * layout-tests/editing/pasteboard/paste-4035648-fix.html: Added. 2005-03-06 Christy Warren <kali@appple.com> Reviewed by Ken * khtml/rendering/render_text.cpp: (lastRendererOnPrevLine): helper for RenderText::caretRect (RenderText::caretRect): added code to properly handle bidi ordered text boxes 2005-03-06 Christy Warren <kali@apple.com> Reviewed by Darin. * khtml/editing/visible_position.cpp: Eliminated code that cuts off searching through the text boxes based on an assumption that breaks under bidi (khtml::VisiblePosition::isCandidate): * kwq/KWQFontMetrics.mm: (QFontMetrics::checkSelectionPoint): Made the initialization of the WebCoreStyle honor the reversed flag 2005-03-05 John Sullivan <sullivan@apple.com> Reviewed by Maciej. - fixed <rdar://problem/4038417> Mail crashed in StyleChange::checkForLegacyHTMLStyleChange when composing a reply * khtml/editing/htmlediting.cpp: (khtml::StyleChange::checkForLegacyHTMLStyleChange): Added missing nil check. 2005-03-05 Darin Adler <darin@apple.com> Reviewed by Don. - fixed <rdar://problem/4038478> Crash in renderer viewing RSS feed at feed://wvs.topleftpixel.com/index.rdf * khtml/xml/dom_docimpl.cpp: (widgetForNode): Check for nil before going from node to renderer. 2005-03-05 Darin Adler <darin@apple.com> Reviewed by Richard. - fixed <rdar://problem/4037700> Every character typed causes stat call for /usr/share/icu/icudt32b_char.brk * khtml/rendering/render_text.cpp: (getCharacterBreakIterator): Added. Helper that sets up an iterator for the passed-in text. Shares a single global iterator (fast, albeit not thread-safe). (RenderText::previousOffset): Changed to call getCharacterBreakIterator. (RenderText::nextOffset): Ditto. 2005-03-05 Ken Kocienda <kocienda@apple.com> Reviewed by Darin Fix for this bug: <rdar://problem/4038267> REGRESSION (Mail): Crash copying and pasting end of paragraph Code to handle content that has a "logical" newline at the end of the pasted content, and the code to adjust the selection at the end of the paste operation made an assumption that at least one node had been inserted by the paste command. This is not necessarily true in the case where the sole content in the pasted content is one of these "logical" newlines. Adjust some code around so that we don't deref null, but still adjust the selection correctly for this case. In each of the two functions below, some null checks have been added, and some code has been rearranged a little bit to continue on through the end of completeHTMLReplacement, even if no nodes have been inserted. The patch looks bigger and more complicated than the conceptual change. * khtml/editing/htmlediting.cpp: (khtml::ReplaceSelectionCommand::doApply) (khtml::ReplaceSelectionCommand::completeHTMLReplacement) * layout-tests/editing/pasteboard/paste-4038267-fix-expected.txt: Added. * layout-tests/editing/pasteboard/paste-4038267-fix.html: Added. 2005-03-05 Darin Adler <darin@apple.com> Reviewed by John. - fixed <rdar://problem/4025918> images copied from Safari with relative src URLs aren't pasted into Mail messages (KURL resolves base URLs incorrectly) * kwq/KWQKURL.mm: (KURL::KURL): Add a slash at the start of the path if a relative part is adding a path onto a URL that has "pre-path" bits like host name, but no path yet. This doesn't come up for http because in that case we add a trailing "/" as part of canonicalization. 2005-03-04 John Sullivan <sullivan@apple.com> Reviewed by Kevin. - fixed <rdar://problem/4033705> REGRESSION (Mail): Copy/Paste from Excel crashes Mail in KWQKHTMLPart::fontForSelection(bool*) const + 232 * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::fontForSelection): Check for nil startNode, not just nil renderer. 2005-03-04 David Harrison <harrison@apple.com> Reviewed by Ken, Richard. <rdar://problem/3996383> REGRESSION (Mail): Deleting all of first line also deletes line ending Problem was the placeholder check was based on 0 height block, but the block in this case is the BODY, which has other content even though the paragraph is gone. * khtml/editing/htmlediting.cpp: (khtml::CompositeEditCommand::insertBlockPlaceholder): Now does insert instead of append! (khtml::CompositeEditCommand::appendBlockPlaceholder): New. Actually does append. (khtml::CompositeEditCommand::addBlockPlaceholderIfNeeded): Renamed from insertBlockPlaceholderIfNeeded because it can insert or append. Also accepts "force insert" flag. (khtml::CompositeEditCommand::removeBlockPlaceholder): Renamed for succinctness from removeBlockPlaceholderIfNeeded. (khtml::DeleteSelectionCommand::insertPlaceholderForAncestorBlockContent): (khtml::DeleteSelectionCommand::moveNodesAfterNode): Use renamed methods. (khtml::DeleteSelectionCommand::doApply): Use addBlockPlaceholderIfNeeded "force insert" flag if deleting whole paragraphs did not leave an empty one. (khtml::InsertParagraphSeparatorCommand::doApply): (khtml::InsertParagraphSeparatorInQuotedContentCommand::doApply): (khtml::InsertTextCommand::input): Use renamed methods. * khtml/editing/htmlediting.h: Renamed and new methods per above. 2005-03-04 Chris Blumenberg <cblu@apple.com> Fixed: <rdar://problem/4032840> REGRESSION (Mail): crash in RemoveNodeCommand after pasting attachment at end of message Reviewed by darin. * khtml/editing/visible_units.cpp: (khtml::endOfParagraph): don't consider text nodes that have no rendered characters 2005-03-04 Richard Williamson <rjw@apple.com> Fixed <rdar://problem/4034764> REGRESSION(125-188)Viewing text/plain page and going back/forward corrupts HTML pages (google.com) The parse mode wasn't be restored to the document when going back. Reviewed by Hyatt. * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::openURLFromPageCache): * kwq/KWQPageState.h: * kwq/KWQPageState.mm: (-[KWQPageState initWithDocument:URL:windowProperties:locationProperties:interpreterBuiltins:]): 2005-03-04 Ken Kocienda <kocienda@apple.com> Reviewed by me * layout-tests/editing/style/create-block-for-style-012-expected.txt: Shame on me! I landed my last fix without running layout tests. This one changes in a subtle, but acceptable way. 2005-03-04 Ken Kocienda <kocienda@apple.com> Reviewed by Harrison Fix for this bug: <rdar://problem/4032543> REGRESSION (Mail): Mail hangs when quoted text is pasted twice This code change fixes the bug in a non-obvious way. The root cause of the problem was that a VisiblePosition created using an affinity originating in Mail code caused two VisiblePosition objects that should have been equal to differ only in their affinities, which in turn caused us to run a code path that should not have run. * khtml/editing/visible_position.cpp: (khtml::VisiblePosition::VisiblePosition): Added copy constructor. (khtml::VisiblePosition::next): Factored out inline code that used to be here into new setAffinityUsingLinePosition() function. (khtml::isEqualIgnoringAffinity): New helper to handle cases when affinity in equality check does not matter. However, we want to know about such cases where a VisiblePosition differs only by affinity, and the code will assert in development when this happens. (khtml::isNotEqualIgnoringAffinity): Ditto, but not. :) (khtml::setAffinityUsingLinePosition): New helper function mentioned above. This will "correct" upstream affinity to downstream if the affinity does not make a difference for the position. * khtml/editing/visible_position.h: * khtml/editing/visible_range.h: Wacky bug. The operator== for this class took VisiblePosition classes! * khtml/editing/visible_units.cpp: (khtml::isStartOfParagraph): Now performs equality check without regard to affinity. (khtml::isEndOfParagraph): Ditto. (khtml::isStartOfBlock): Ditto. (khtml::isEndOfBlock): Ditto. * kwq/WebCoreBridge.mm: (-[WebCoreBridge setSelectedDOMRange:affinity:]): Adjusts the affinity using setAffinityUsingLinePosition() if necessary. 2005-03-04 Darin Adler <darin@apple.com> Reviewed by John. - fixed <rdar://problem/4036817> REGRESSION: ctrl-y broken when a line + carriage return cut * khtml/editing/htmlediting.h: Added insertTextRunWithoutNewlines. * khtml/editing/htmlediting.cpp: (khtml::InsertTextCommand::input): Added assertion to make sure strings with newlines don't get down to this level. (khtml::TypingCommand::insertText): Added. Takes the name of the old function, but is a new level that breaks runs into lines and inserts each one separately. (khtml::TypingCommand::insertTextRunWithoutNewlines): Renamed old insertText to this. * khtml/dom/dom_string.h: Made substring be a const member function. * khtml/dom/dom_string.cpp: (DOM::DOMString::substring): Made this const. 2005-03-04 Darin Adler <darin@apple.com> Reviewed by John. - fixed <rdar://problem/4020413> REGRESSION (Mail): can't use fonts with names that start with "#" in Mail (Korean fonts) * khtml/css/css_valueimpl.cpp: (DOM::isLegalIdentifier): Added. Commented out and not used. (DOM::quoteStringIfNeeded): Quotes the string if needed. For now only if it starts with "#". (DOM::CSSPrimitiveValueImpl::cssText): Call quoteStringIfNeeded when asked for cssText for an arbitrary string, since we need text you can re-parse. (DOM::FontFamilyValueImpl::cssText): Ditto. * khtml/editing/markup.cpp: (khtml::startMarkup): Added comments about lack of quoting for attributes. (khtml::createMarkup): Ditto. 2005-03-04 Adele Amchan <adele@apple.com> Reviewed by Maciej Fix for <rdar://problem/4021711> REGRESSION(125-188) blank pages when browsing forum at cooperativeresearch.org - cached external script problem * khtml/html/htmltokenizer.cpp: (khtml::HTMLTokenizer::scriptHandler): set flag needToRefCachedScript so we can make sure notifyFinished is called after pendingSrc is set up with the right data from the cached script 2005-03-04 Ken Kocienda <kocienda@apple.com> Reviewed by John Fix for this bug: <rdar://problem/4029632> Tiger 8A398:- Mail crashes in DOM::NodeImpl::isBlockFlow() after pasting text with alignment style and BR element from Safari * khtml/editing/htmlediting.cpp: (khtml::CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessary): VisiblePosition constructor was failing to yield a position for a node just pasted into the document since a layout was needed for the calculation to come out right. Layout added. Crash gone. === Safari-402 === 2005-03-03 Chris Blumenberg <cblu@apple.com> Fixed: <rdar://problem/3992803> Cannot navigate through list items with the keyboard, you're stuck in the same <li> block unless you click out Reviewed by harrison. * khtml/rendering/render_line.cpp: (khtml::RootInlineBox::closestLeafChildForXPos): avoid returning list markers when possible. Also improved heuristic for returning the best InlineBox given the passed X position. 2005-03-03 Ken Kocienda <kocienda@apple.com> Reviewed by John Fix for this bug: <rdar://problem/4035198> Pasting text with different styles does not get reproducible results I had a good idea yesterday to improve the way we "fixup" styles after pasting, but i chose a poor data structure to do it, a map of nodes-to-styles. In the fixup step, I iterated over the map elements and did the fixup. However, since the order in which the items would come out of the map is indeterminate, we got unpredictable results. So, the concept was good, but the implementation was flawed. I have fixed this mapping to be a list instead, so the order that nodes are evaluated in the fixup step is document order. This works nicely. * khtml/editing/htmlediting.cpp: (khtml::ReplacementFragment::~ReplacementFragment): No longer need to explicity deref nodes and styles saved away for later fixup. This is now handled by the new NodeDesiredStyle class. (khtml::ReplacementFragment::computeStylesUsingTestRendering): Now calls computeAndStoreNodeDesiredStyle, function renamed from mapDesiredStyleForNode. Now accepts a QValueList<NodeDesiredStyle> in place of the old map. (khtml::NodeDesiredStyle::NodeDesiredStyle): New class that represents a node-to-style mapping. (khtml::NodeDesiredStyle::~NodeDesiredStyle): Ditto. (khtml::NodeDesiredStyle::operator=): Ditto. (khtml::ReplaceSelectionCommand::doApply): Now calls computeAndStoreNodeDesiredStyle, function renamed from mapDesiredStyleForNode. (khtml::ReplaceSelectionCommand::fixupNodeStyles): Now operates on a QValueList<NodeDesiredStyle> in place of the old map. (khtml::computeAndStoreNodeDesiredStyle): Renamed from mapDesiredStyleForNode. Now operates on a QValueList<NodeDesiredStyle> in place of the old map. * khtml/editing/htmlediting.h: (khtml::NodeDesiredStyle): New class that represents a node-to-style mapping. (khtml::ReplacementFragment::desiredStyles): Now returns a QValueList<NodeDesiredStyle> in place of the old map. * layout-tests/editing/style/typing-style-003-expected.txt: Results changed in an acceptable way. 2005-03-02 Darin Adler <darin@apple.com> Reviewed by Maciej. - fixed <rdar://problem/4029741> REGRESSION (188-189): <input type=text> are cleared when you hide/show them * khtml/html/html_formimpl.h: Added detach functions for both input and text area elements, since both have m_valueMatchesRenderer flags. * khtml/html/html_formimpl.cpp: (DOM::HTMLInputElementImpl::detach): Set m_valueMatchesRenderer to false, since the renderer is going away. (DOM::HTMLTextAreaElementImpl::detach): Ditto. 2005-03-02 Ken Kocienda <kocienda@apple.com> Reviewed by Hyatt Fix for this bug: <rdar://problem/4006151> in reply, caret moves to next line after toggling bold style then typing * khtml/editing/htmlediting.cpp: (khtml::ApplyStyleCommand::applyInlineStyle): Defer cleaning up empty style until the end of the function. In some situations, the render tree can get confused when we do this removal up front. I wish I understood the reasons more deeply, but this bit of code shuffling seems harmless, and fixes the bug. 2005-03-02 Darin Adler <darin@apple.com> Reviewed by Maciej. - fixed <rdar://problem/4024966> crash happened twice in [KWQTextField setHasFocus:] + 0xe8 Added more nil checks to the widget implementations. Anywhere a widget pointer is used, do a nil check, rather than relying on high level assumptions about which calls can and can't destroy the HTML element (and hence the widget). The case in the bug seems to be a case where scrolling destroyed the element. We can't be sure this fixes the bug, but we can be relatively sure we didn't introduce any new problems, because this just avoids nil-dereferencing. * kwq/KWQButton.mm: (-[KWQButton becomeFirstResponder]): (-[KWQButton nextKeyView]): (-[KWQButton previousKeyView]): * kwq/KWQListBox.mm: (-[KWQTableView mouseDown:]): (-[KWQTableView becomeFirstResponder]): (-[KWQTableView numberOfRowsInTableView:]): (-[KWQTableView tableViewSelectionDidChange:]): (-[KWQTableView tableView:shouldSelectRow:]): (-[KWQTableView selectionShouldChangeInTableView:]): * kwq/KWQScrollBar.mm: (-[KWQScrollBar scroll:]): * kwq/KWQSlider.mm: (-[KWQSlider mouseDown:]): (-[KWQSlider slide:]): (-[KWQSlider becomeFirstResponder]): (-[KWQSlider nextKeyView]): (-[KWQSlider previousKeyView]): * kwq/KWQTextArea.mm: (-[KWQTextAreaTextView becomeFirstResponder]): (-[KWQTextAreaTextView resignFirstResponder]): (-[KWQTextAreaTextView mouseDown:]): * kwq/KWQTextField.mm: (-[KWQTextFieldController action:]): (-[KWQTextFieldController controlTextDidEndEditing:]): (-[KWQTextFieldController controlTextDidChange:]): (-[KWQTextFieldController textView:didHandleEvent:]): (-[KWQTextFieldController setHasFocus:]): 2005-03-02 Richard Williamson <rjw@apple.com> Fixed <rdar://problem/4031483> Leak (RenderObject::createInlineBox) reproducible with Stock widget We were leaking inline block line boxes. Argh! Reviewed by Hyatt. * khtml/rendering/render_flow.cpp: (RenderFlow::dirtyLineBoxes): * khtml/rendering/render_line.cpp: (khtml::InlineBox::deleteLine): 2005-03-02 Chris Blumenberg <cblu@apple.com> Fixed: <rdar://problem/3976872> REGRESSION (Mail): Pasted plain text doesn't get the proper style if pasted into newlines Reviewed by kocienda. * khtml/editing/htmlediting.cpp: (khtml::EditCommand::styleAtPosition): new, factored out from calculateStyleBeforeInsertion (khtml::InsertParagraphSeparatorCommand::calculateStyleBeforeInsertion): call styleAtPosition (khtml::ReplaceSelectionCommand::ReplaceSelectionCommand): clear new m_insertionStyle ivar (khtml::ReplaceSelectionCommand::~ReplaceSelectionCommand): deref new m_insertionStyle ivar (khtml::ReplaceSelectionCommand::doApply): store the style so it later be applied when matching style (khtml::ReplaceSelectionCommand::completeHTMLReplacement): apply style from m_insertionStyle when matching style * khtml/editing/htmlediting.h: 2005-03-02 Maciej Stachowiak <mjs@apple.com> Reviewed by Darin. <rdar://problem/4031718> REGRESSION (401-401+): Safari reproducible crash setting up scope in JSLazyEventListener::parseCode authenticating to bugweb * khtml/ecma/kjs_events.cpp: (JSLazyEventListener::parseCode): If originalNode is NULL, don't mess with the scope chain. * khtml/html/html_baseimpl.cpp: (HTMLBodyElementImpl::parseHTMLAttribute): For handlers that are delcared on body but set on the document, pass NULL to avoid swizzling the scope chain. It turns out that this is what browsers do, and it finesses the crash. 2005-03-02 David Harrison <harrison@apple.com> Reviewed by Ken. <rdar://problem/3948453> Can't type accented chars as first character in Stickies widget * khtml/editing/htmlediting.cpp: (khtml::ReplaceSelectionCommand::doApply): 2005-03-02 Ken Kocienda <kocienda@apple.com> Reviewed by John Fix for this bug: <rdar://problem/4020574> REGRESSION (Mail): copy/paste first part of reply-quoted text alters downstream style The problem was that the operation to move nodes following the newly-pasted nodes did not preserve the style of these moved nodes. I have generalized some of the functions that compute and preserve styles for nodes and then apply these styles after a DOM operation. * khtml/editing/htmlediting.cpp: (khtml::ReplacementFragment::~ReplacementFragment): Call new derefNodesAndStylesInMap() helper function in place of old code that had this deref'ing inline. (khtml::ReplacementFragment::computeStylesUsingTestRendering): Now calls new mapDesiredStyleForNode() helper function place of old code that had this style computation inline. (khtml::ReplacementFragment::removeStyleNodes): Updated comment for new helper name. (khtml::ReplaceSelectionCommand::doApply): Now calls new helpers in place of helpers whose names were changed, or in place of pre-refactored inline code. (khtml::ReplaceSelectionCommand::fixupNodeStyles): Renamed from applyStyleToInsertedNodes(). Now generalized to take the map of nodes to use for the fixup. This makes it possible to call this code with different maps, and that is needed to fix the bug. (khtml::mapDesiredStyleForNode): New helper function to compute the inheritable styles for a given node and map this style to the given node in the given map. This function now also includes the code that was in the removeBlockquoteColorsIfNeeded(). This latter helper has now been removed. (khtml::derefNodesAndStylesInMap): Simple helper to deref map members. * khtml/editing/htmlediting.h: (khtml::ReplacementFragment::desiredStyles): New helper to return map of nodes-to-desiredStyles. 2005-03-01 Ken Kocienda <kocienda@apple.com> Reviewed by Hyatt Fix for this bug: <rdar://problem/4011358> REGRESSION(Mail): after dragging text to mail message and deleting, typing or dragging new text doesn't work * khtml/editing/visible_position.cpp: (khtml::VisiblePosition::isCandidate): Insertion point disappearing was due to a failed check here after deleting all the content in the body element. The special "empty block" needs to add check for DOM children. A block may have straggling anonymous render children in some cases, and so the check needs to be (!DOM-kids || !render-kids). Also, I botched the last checkin trying to split these two patches in my tree. Wrong layout tests got checked in, I checked in a conflict marker in the Changelog, etc. I fixed everything with this checkin. 2005-03-01 Ken Kocienda <kocienda@apple.com> Reviewed by Maciej Improved fix for this bug: <rdar://problem/3996605> Insert paragraph command puts new block in wrong place, creating difficult-to-handle HTML Maciej and I discussed this situation at length, and we came up with a better fix than I did earlier. * khtml/editing/htmlediting.cpp: (khtml::InsertParagraphSeparatorCommand::doApply): Simplify one special case so that it only handles the "last in block" situation. Remove special case for "downstream node is in different block" and handle this case with a little bit of special code in the general insertion case. Results studied to make sure there were no problems. * layout-tests/editing/deleting/delete-3959464-fix-expected.txt * layout-tests/editing/inserting/insert-div-001-expected.txt * layout-tests/editing/inserting/insert-div-002-expected.txt * layout-tests/editing/inserting/insert-div-004-expected.txt * layout-tests/editing/inserting/insert-div-005-expected.txt * layout-tests/editing/inserting/insert-div-009-expected.txt * layout-tests/editing/inserting/insert-div-014-expected.txt * layout-tests/editing/inserting/insert-div-018-expected.txt * layout-tests/editing/inserting/insert-div-024-expected.txt * layout-tests/editing/pasteboard/paste-text-011-expected.txt * layout-tests/editing/pasteboard/paste-text-013-expected.txt * layout-tests/editing/pasteboard/paste-text-015-expected.txt * layout-tests/editing/style/block-style-004-expected.txt * layout-tests/editing/style/block-style-005-expected.txt * layout-tests/editing/style/block-style-006-expected.txt New test: * layout-tests/editing/inserting/insert-div-027.html * layout-tests/editing/inserting/insert-div-027-expected.txt 2005-03-01 David Hyatt <hyatt@apple.com> Fix for 4030890, regression with <sup> on Google. Fix some bogus != comparison checks in verticalPositionHint. Reviewed by John (RenderObject::getVerticalPosition): 2005-03-01 Chris Blumenberg <cblu@apple.com> Fixed: <rdar://problem/4030669> smart delete does not delete spaces from pasted content Reviewed by rjw. * khtml/editing/htmlediting.cpp: (khtml::DeleteSelectionCommand::initializePositionData): pass true for treatNBSPAsWhiteSpace to leadingWhitespacePosition and trailingWhitespacePosition when testing whether or not we have to delete those characters as well. * khtml/editing/jsediting.cpp: pass true for smartDelete when the selection granularity is WORD. This allows us to write smart delete layout tests. * layout-tests/editing/deleting/smart-delete-001-expected.txt: Added. * layout-tests/editing/deleting/smart-delete-001.html: Added. * layout-tests/editing/deleting/smart-delete-002-expected.txt: Added. * layout-tests/editing/deleting/smart-delete-002.html: Added. 2005-03-01 Richard Williamson <rjw@apple.com> Fixed <rdar://problem/4029772> Weather widgets use a lot of memory (more that other widgets) The string objects created by KWQHeaderStringFromDictionary() leaked. Reviewed by John Louch. * kwq/KWQLoader.mm: (KWQHeaderStringFromDictionary): 2005-03-01 Jens Alfke <jens@apple.com> Reviewed by Darin. <rdar://problem/4004531> Simple Sun Signed Applet throws exceptions; doesn't run Two fixes for the way we extract the parameter-y goodness from <object> tags. * khtml/rendering/render_frames.cpp: (RenderPartObject::updateWidget): 2005-03-01 Richard Williamson <rjw@apple.com> Fixed <rdar://problem/3990258> REGRESSION (125.12-181): top of picture that spans two pages is cut off on print from Safari The problem was due to incorrect "object truncation" in RenderFlow::paintLines. We attempt to push objects down if they don't fit on a page at paint time. If the attempt to push object down failed we just didn't paint at all. Reviewed by Hyatt. * khtml/rendering/render_flow.cpp: (RenderFlow::paintLines): 2005-03-01 Chris Blumenberg <cblu@apple.com> Fixed: <rdar://problem/4030669> smart delete does not delete spaces from pasted content Reviewed by rjw. * khtml/editing/htmlediting.cpp: (khtml::DeleteSelectionCommand::initializePositionData): pass true for treatNBSPAsWhiteSpace to leadingWhitespacePosition and trailingWhitespacePosition when testing whether or not we have to delete those characters as well. * khtml/editing/jsediting.cpp: pass true for smartDelete when the selection granularity is WORD. This allows us to write smart delete layout tests. * layout-tests/editing/deleting/smart-delete-001-expected.txt: Added. * layout-tests/editing/deleting/smart-delete-001.html: Added. * layout-tests/editing/deleting/smart-delete-002-expected.txt: Added. * layout-tests/editing/deleting/smart-delete-002.html: Added. 2005-03-01 Ken Kocienda <kocienda@apple.com> Reviewed by Vicki Fix for this bug: <rdar://problem/4030068> Trailing <return> gets eaten when pasted at the end of a document * khtml/editing/htmlediting.cpp: (khtml::ReplaceSelectionCommand::doApply): Add code to handle formerly-unhandled end-of-document case. 2005-03-01 Maciej Stachowiak <mjs@apple.com> Reviewed by Vicki. <rdar://problem/4003774> REGRESSION(125-181): JavaScript problems @ Yankee/Dixie quiz Reworked how scopes are set up for event handlers to match other browser. This includes the following changes: - Special scope entries are set up at the time the event handler is created, not at the time it fires. - Special scope is only set up for event handlers set in the html source through an html attribute, not for handlers set using addEventHandler or setting JS properties like onclick through JavaScript. - Special scope is based on the DOM node on which the handler is an attribute, not the event target. This fixes the regression while allowing the fix to <rdar://problem/3798453> (DIG: getting variable with same name as DOM element attribute gets attribute value instead) to keep working correctly. * khtml/ecma/kjs_events.cpp: (JSEventListener::handleEvent): (JSLazyEventListener::JSLazyEventListener): (JSLazyEventListener::parseCode): * khtml/ecma/kjs_events.h: * khtml/ecma/kjs_proxy.cpp: (KJSProxyImpl::createHTMLEventHandler): * khtml/ecma/kjs_proxy.h: * khtml/ecma/kjs_window.cpp: (Window::getJSLazyEventListener): * khtml/ecma/kjs_window.h: * khtml/html/html_baseimpl.cpp: (HTMLBodyElementImpl::parseHTMLAttribute): (HTMLFrameElementImpl::parseHTMLAttribute): (HTMLFrameSetElementImpl::parseHTMLAttribute): * khtml/html/html_elementimpl.cpp: (HTMLElementImpl::parseHTMLAttribute): * khtml/html/html_formimpl.cpp: (DOM::HTMLFormElementImpl::parseHTMLAttribute): (DOM::HTMLButtonElementImpl::parseHTMLAttribute): (DOM::HTMLInputElementImpl::parseHTMLAttribute): (DOM::HTMLLabelElementImpl::parseHTMLAttribute): (DOM::HTMLSelectElementImpl::parseHTMLAttribute): (DOM::HTMLTextAreaElementImpl::parseHTMLAttribute): * khtml/html/html_imageimpl.cpp: (HTMLImageElementImpl::parseHTMLAttribute): * khtml/html/html_objectimpl.cpp: (HTMLObjectElementImpl::parseHTMLAttribute): * khtml/khtml_part.cpp: (KHTMLPart::createHTMLEventListener): * khtml/khtml_part.h: * khtml/xml/dom_docimpl.cpp: (DocumentImpl::createHTMLEventListener): * khtml/xml/dom_docimpl.h: === Safari-401 === 2005-03-01 Chris Blumenberg <cblu@apple.com> Backed out my patch since the tree was closed. * khtml/editing/htmlediting.cpp: (khtml::DeleteSelectionCommand::initializePositionData): * khtml/editing/jsediting.cpp: 2005-03-01 Chris Blumenberg <cblu@apple.com> Fixed: <rdar://problem/4030669> smart delete does not delete spaces from pasted content Reviewed by rjw. * khtml/editing/htmlediting.cpp: (khtml::DeleteSelectionCommand::initializePositionData): pass true for treatNBSPAsWhiteSpace to leadingWhitespacePosition and trailingWhitespacePosition when testing whether or not we have to delete those characters as well. * khtml/editing/jsediting.cpp: pass true for smartDelete when the selection granularity is WORD. This allows us to write smart delete layout tests. * layout-tests/editing/deleting/smart-delete-001-expected.txt: Added. * layout-tests/editing/deleting/smart-delete-001.html: Added. * layout-tests/editing/deleting/smart-delete-002-expected.txt: Added. * layout-tests/editing/deleting/smart-delete-002.html: Added. 2005-03-01 Ken Kocienda <kocienda@apple.com> Reviewed by Vicki Fix for this bug: <rdar://problem/4030068> Trailing <return> gets eaten when pasted at the end of a document * khtml/editing/htmlediting.cpp: (khtml::ReplaceSelectionCommand::doApply): Add code to handle formerly-unhandled end-of-document case. 2005-03-01 David Harrison <harrison@apple.com> Reviewed by Chris. <rdar://problem/3915560> Mail would like an SPI to enable "smart" text paste/drop * kwq/WebCoreBridge.h: * kwq/WebCoreBridge.mm: (-[WebCoreBridge smartDeleteRangeForProposedRange:]): (-[WebCoreBridge smartInsertForString:replacingRange:beforeString:afterString:]): New. 2005-03-01 Chris Blumenberg <cblu@apple.com> Fixed: <rdar://problem/4030404> selection granularity should be set when extending selection via JS Reviewed by kocienda. * khtml/ecma/kjs_window.cpp: (SelectionFunc::tryCall): set the granularity on the part. This will allow us to write smart paste layout tests. * layout-tests/editing/pasteboard/smart-paste-001-expected.txt: Added. * layout-tests/editing/pasteboard/smart-paste-001.html: Added. * layout-tests/editing/pasteboard/smart-paste-002-expected.txt: Added. * layout-tests/editing/pasteboard/smart-paste-002.html: Added. * layout-tests/editing/pasteboard/smart-paste-003-expected.txt: Added. * layout-tests/editing/pasteboard/smart-paste-003.html: Added. * layout-tests/editing/pasteboard/smart-paste-004-expected.txt: Added. * layout-tests/editing/pasteboard/smart-paste-004.html: Added. * layout-tests/editing/pasteboard/smart-paste-005-expected.txt: Added. * layout-tests/editing/pasteboard/smart-paste-005.html: Added. * layout-tests/editing/pasteboard/smart-paste-006-expected.txt: Added. * layout-tests/editing/pasteboard/smart-paste-006.html: Added. * layout-tests/editing/pasteboard/smart-paste-007-expected.txt: Added. * layout-tests/editing/pasteboard/smart-paste-007.html: Added. 2005-03-01 Chris Blumenberg <cblu@apple.com> Fixed: <rdar://problem/4029934> smart paste with plain text can add too many spaces Reviewed by kocienda. * khtml/editing/htmlediting.cpp: (khtml::ReplaceSelectionCommand::doApply): pass true for treatNBSPAsWhitespace to leadingWhitespacePosition and trailingWhitespacePosition * khtml/xml/dom_position.cpp: (DOM::isWS): take treatNBSPAsWhitespace param (DOM::Position::leadingWhitespacePosition): ditto (DOM::Position::trailingWhitespacePosition): ditto * khtml/xml/dom_position.h: 2005-03-01 Ken Kocienda <kocienda@apple.com> Reviewed by John Fix for this bug: <rdar://problem/3996605> Insert paragraph command puts new block in wrong place, creating difficult-to-handle HTML * khtml/editing/htmlediting.cpp: (khtml::InsertParagraphSeparatorCommand::doApply): Look for the upstream-most block to insert after when at the visible end of a block. This helps to avoid some undesirable sequences of markup which Dave says will be vary hard to render. Changing the command in this way avoids the "limitations" of the render tree by not asking it to render markup we do not want to make anyway. All these tests change, but either in insignificant ways, or for the better. * layout-tests/editing/deleting/delete-3959464-fix-expected.txt: * layout-tests/editing/inserting/insert-div-001-expected.txt: * layout-tests/editing/inserting/insert-div-002-expected.txt: * layout-tests/editing/inserting/insert-div-004-expected.txt: * layout-tests/editing/inserting/insert-div-005-expected.txt: * layout-tests/editing/inserting/insert-div-009-expected.txt: * layout-tests/editing/inserting/insert-div-024-expected.txt: * layout-tests/editing/pasteboard/paste-text-011-expected.txt: * layout-tests/editing/pasteboard/paste-text-013-expected.txt: * layout-tests/editing/pasteboard/paste-text-015-expected.txt: * layout-tests/editing/style/block-style-004-expected.txt: * layout-tests/editing/style/block-style-005-expected.txt: * layout-tests/editing/style/block-style-006-expected.txt: * layout-tests/editing/style/remove-underline-across-paragraph-expected.txt: * layout-tests/editing/style/remove-underline-across-paragraph-in-bold-expected.txt: * layout-tests/editing/style/remove-underline-after-paragraph-expected.txt: * layout-tests/editing/style/remove-underline-after-paragraph-in-bold-expected.txt: New test to check specific problem mentioned in the bug. * layout-tests/editing/inserting/insert-div-026-expected.txt: Added. * layout-tests/editing/inserting/insert-div-026.html: Added. 2005-02-28 Maciej Stachowiak <mjs@apple.com> Reviewed by Darin. <rdar://problem/4002864> REGRESSION(125-146) getElementById in onload fails in a test case involving external resources Moved management of elementById hashtable from attach/detach to insertedIntoDocument/removedFromDocument, to avoid being thrown off by temporary detaches due to style recalcs. * khtml/xml/dom_elementimpl.cpp: (ElementImpl::insertedIntoDocument): (ElementImpl::removedFromDocument): (ElementImpl::attach): (ElementImpl::updateId): * khtml/xml/dom_elementimpl.h: Make sure that insertedIntoDocument is called before firing any DOM events. * khtml/xml/dom_nodeimpl.cpp: (NodeBaseImpl::dispatchChildInsertedEvents): 2005-02-28 David Hyatt <hyatt@apple.com> Fix for 4028999, safari crashes when resetting if mallocsribble is on. Clip rects were being cleared using dead render objects. Change the ordering. Reviewed by rjw * khtml/rendering/render_box.cpp: (RenderBox::detach): * khtml/rendering/render_layer.cpp: (RenderLayer::~RenderLayer): 2005-02-28 Chris Blumenberg <cblu@apple.com> Fixed: <rdar://problem/4024786> REGRESSION (Mail): "Smart paste" plain-text word into Blot leaves insertion point misplaced Reviewed by kocienda. * khtml/editing/htmlediting.cpp: (khtml::ReplaceSelectionCommand::completeHTMLReplacement): Call updateLayout so caretMinOffset and caretMaxOffset return correct values. 2005-02-28 John Sullivan <sullivan@apple.com> Reviewed by Ken. - WebCore part of fix for <rdar://problem/4023490> REGRESSION (125-185): Tabbing through links on frameset page gets stuck at end (tivofaq.com) * kwq/WebCoreBridge.h: add nextValidKeyViewOutsideWebFrameViews (code is in WebKit) 2005-02-28 Ken Kocienda <kocienda@apple.com> Reviewed by John Fix for this bug: <rdar://problem/3972665> 8A360: HTML message partially truncated on left hand side, text-indent from Script Editor * khtml/css/css_computedstyle.cpp: inheritableProperties array now defined in css_valueimpl.cpp. * khtml/css/css_valueimpl.cpp: Define inheritableProperties array here. (DOM::CSSMutableStyleDeclarationImpl::copyBlockProperties): Use new name for blockProperties, and use the new constant for the number of items in the array. (DOM::CSSMutableStyleDeclarationImpl::removeBlockProperties): Ditto. (DOM::CSSMutableStyleDeclarationImpl::removeInheritableProperties): New function. * khtml/css/css_valueimpl.h: Declare inheritableProperties array and numInheritableProperties extern so they can be defined in css_valueimpl.cpp and used in css_computedstyle.cpp. * khtml/editing/htmlediting.cpp: (khtml::ReplacementFragment::removeStyleNodes): This code was misguided, and removed too much style from HTML elements. Now, it removes from HTML elements only the styles that we replace later with a call to applyStyle(). Also, add ID_B to list of inline "style" nodes we are willing to remove. Leaving it off was an oversight. * layout-tests/editing/pasteboard/paste-text-011-expected.txt: ID_B fix made this result change, without any visible change in the test. New test: * layout-tests/editing/style/smoosh-styles-003.html * layout-tests/editing/style/smoosh-styles-003-expected.txt 2005-02-28 Richard Williamson <rjw@apple.com> Fixed <rdar://problem/4026985> CrashTracer: ...14 crashes at com.apple.WebCore: -[KWQPageState invalidate] + 32 Added more nil checking and ASSERTS. Without a reproducible case this is hard to definitively resolve. Reviewed by John Sullivan. * kwq/KWQPageState.mm: (-[KWQPageState invalidate]): 2005-02-28 Richard Williamson <rjw@apple.com> Fixed <rdar://problem/4027702> 3.5% performance regression btwn Safari-188 and Safari-400 I inadvertently checked in some debugging code that disabled style sharing. Backed out that change. * khtml/css/cssstyleselector.cpp: (khtml::CSSStyleSelector::styleForElement): 2005-02-28 Chris Blumenberg <cblu@apple.com> Fixed: <rdar://problem/4026639> www.bmw.ca configurator does not work with Safari Reviewed by john. * khtml/ecma/kjs_html.cpp: (KJS::HTMLElement::tryGet): when frameset.<name of frame child> is called, return the window object of the frame child 2005-02-28 Ken Kocienda <kocienda@apple.com> Reviewed by Chris Fix for this bug: <rdar://problem/4026906> Paste of HTML table content can break table structure * khtml/editing/htmlediting.cpp: (khtml::ReplacementFragment::pruneEmptyNodes): Call new isProbablyTableStructureNode() function to prevent removal of empty table structure nodes. (khtml::ReplacementFragment::removeUnrenderedNodesUsingTestRendering): Ditto. (khtml::isProbablyTableStructureNode): New helper function. * khtml/editing/htmlediting.h: Declare new helper. 2005-02-28 Chris Blumenberg <cblu@apple.com> Fixed: <rdar://problem/4023566> Stickies: Crash in ReplacementFragment::insertFragmentForTestRendering on paste Reviewed by kocienda. * khtml/editing/htmlediting.cpp: (khtml::ApplyStyleCommand::addInlineStyleIfNeeded): ref and deref the element while it is "floating" (khtml::ReplacementFragment::insertFragmentForTestRendering): ditto (khtml::floatRefdElement): new, keeps an element alive while its ref count is 0 (khtml::createDefaultParagraphElement): removed commented out code (khtml::createBlockPlaceholderElement): ref the element and return it as "floating" (khtml::createFontElement): ditto (khtml::createStyleSpanElement): ditto * khtml/editing/htmlediting.h: 2005-02-27 Maciej Stachowiak <mjs@apple.com> Reviewed by Vicki. <rdar://problem/3993557> REGRESSION (125-180-ish): getElementsByTagName no longer works with namespace designations * khtml/xml/dom_nodeimpl.cpp: (NodeBaseImpl::getElementsByTagNameNS): When no namespace is specified, find elements of the specified name in any namespace to match Mozilla and earlier Safari behavior. 2005-02-25 Darin Adler <darin@apple.com> Reviewed by Adele. - fixed <rdar://problem/4025618> Crash while searching at hollywoodvideo.com * khtml/html/html_formimpl.h: Added valueWithDefault. * khtml/html/html_formimpl.cpp: (DOM::HTMLInputElementImpl::appendFormData): Call valueWithDefault instead of going at the render object to try to get the default value; there may be no render object if this is display:none. (DOM::HTMLInputElementImpl::valueWithDefault): Added. Knows about the defaults for "submit" and "reset" buttons; otherwise just returns the value as-is. * khtml/rendering/render_form.h: Removed the defaultLabel member functions. * khtml/rendering/render_form.cpp: (RenderSubmitButton::rawText): Call valueWithDefault instead of using defaultLabel function here on the render side. The DOM needs to know how to deal with the default anyway for form submission. (RenderSubmitButton::defaultLabel): Removed. (RenderResetButton::defaultLabel): Removed. (RenderPushButton::defaultLabel): Removed. 2005-02-25 Darin Adler <darin@apple.com> Reviewed by John. - fixed <rdar://problem/4025088> window onblur and onfocus don't fire when text field has focus * kwq/KWQKHTMLPart.h: Added setWindowHasFocus function and m_windowHasFocus data member. * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::setDisplaysWithFocusAttributes): Took out the code that sends the focus and blur events. (KWQKHTMLPart::setWindowHasFocus): Put that code here instead. * kwq/WebCoreBridge.h: Added setWindowHasFocus: method to the bridge. * kwq/WebCoreBridge.mm: (-[WebCoreBridge setWindowHasFocus:]): Added. Calls method on the part. 2005-02-25 Darin Adler <darin@apple.com> Reviewed by John. - re-fixed <rdar://problem/3665430> horizontal scroll bar of text area does not show, even when text is wide in "no wrap" mode * kwq/KWQTextArea.mm: (-[KWQTextArea _updateTextViewWidth]): Don't change the text view width to match the text area's width in the "wrap" case. 2005-02-25 Ken Kocienda <kocienda@apple.com> Reviewed by Hyatt Fix for this bug: <rdar://problem/4021518> 8A394 Mail crashes during paste: khtml::RootInlineBox::closestLeafChildForXPos * khtml/editing/visible_units.cpp: (khtml::previousLinePosition): Adding an updateLayout call at the start of the function fixes the crash, since we caught line boxes in a not-completely-updated state. (khtml::nextLinePosition): Ditto. 2005-02-25 David Hyatt <hyatt@apple.com> Fix for 4010774, make sure to avoid an O(N^2) algorithm in nextRenderer() that is triggered when large DOM subtrees are inserted into documents via one insert/append call. Reviewed by kocienda * khtml/xml/dom_nodeimpl.cpp: (NodeImpl::nextRenderer): 2005-02-25 Richard Williamson <rjw@apple.com> Fixed <rdar://problem/3382926> Bidi neutrals at RTL/LTR boundaries not handled correctly. Second pass at fixing 3382926 w/o causing layout regressions. Same concept: if directionality of text's element is RTL and first character has neutral directionality then set the initial directionality to RTL. Reviewed by Hyatt. * khtml/rendering/bidi.cpp: (khtml::RenderBlock::bidiReorderLine): (khtml::RenderBlock::determineStartPosition): === Safari-400 === 2005-02-25 Ken Kocienda <kocienda@apple.com> Reviewed by me Roll out Chris' change to fix this bug: <rdar://problem/4023566> Stickies: Crash in ReplacementFragment::insertFragmentForTestRendering on paste That code change is responsible for all these new crashers: <rdar://problem/4025177> crash copying safari.apple.com into Blot document <rdar://problem/4025184> crash in DOM::NodeImpl::parentNode copying "New!" from google.com to Blot <rdar://problem/4025214> crash in DOM::NodeImpl::getRect loading paste-match-style-001.html Since we wish to close the tree for a build right now, I am rolling out rather than investigating. * khtml/editing/htmlediting.cpp: (khtml::ApplyStyleCommand::addInlineStyleIfNeeded) (khtml::ReplacementFragment::insertFragmentForTestRendering) (khtml::createDefaultParagraphElement) (khtml::createBlockPlaceholderElement) (khtml::createFontElement) (khtml::createStyleSpanElement) * khtml/editing/htmlediting.h 2005-02-25 Ken Kocienda <kocienda@apple.com> Reviewed by John Fix for this bug: <rdar://problem/4020108> Pasting text into message makes Mail crash reproducibly Note that, even with this fix, development build will crash until this bug is fixed: <rdar://problem/4024996> Applying block styles can cause assertion failure in inline style removal This will not crash deployment builds, so I am going to land. * khtml/editing/htmlediting.cpp: (khtml::ApplyStyleCommand::applyBlockStyle): Applying block styles can make the loop to reach beyondEnd fail since the structure of the document can change. Cache the next node first before operating on it, as we do elsewhere. 2005-02-25 Vicki Murley <vicki@apple.com> - recommit this change, since rolling it out did NOT fix the performance regression! 2005-02-23 Darin Adler <darin@apple.com> Reviewed by John. - fixed <rdar://problem/4011405> REGRESSION (180-181): Unconfirmed text disappears when text focus moves The key was to change things around so that we don't push text from the DOM to the widget unless the DOM has actually been changed. This prevents the code path that wipes out inline input during the blur process. * khtml/html/html_formimpl.cpp: (DOM::HTMLInputElementImpl::HTMLInputElementImpl): Start m_valueMatchesRenderer as false. (DOM::HTMLInputElementImpl::parseHTMLAttribute): Set m_valueMatchesRenderer to false when a new value is set here. (DOM::HTMLInputElementImpl::setValue): Set m_valueMatchesRenderer to false when a new value is set here. (DOM::HTMLInputElementImpl::setValueFromRenderer): Added. Sets m_value, sets m_valueMatchesRenderer to true, and also sends out the input event. It's better to have this here than in the renderer code. (DOM::HTMLTextAreaElementImpl::HTMLTextAreaElementImpl): Start m_valueIsValid as false (replaces m_dirtyvalue) and m_valueMatchesRenderer as false. (DOM::HTMLTextAreaElementImpl::updateValue): Added. Factored this out from the value function. Uses the new booleans and keeps them up to date, specifically setting m_valueMatchesRenderer based on where the value came from. (DOM::HTMLTextAreaElementImpl::value): Updated to call updateValue to do most of the work. (DOM::HTMLTextAreaElementImpl::setValue): Set both m_valueIsValid and m_valueMatchesRenderer. (DOM::HTMLTextAreaElementImpl::setDefaultValue): Take parameter by reference. * khtml/html/html_formimpl.h: Added setValueFromRenderer, valueMatchesRenderer, setValueMatchesRenderer, and m_valueMatchesRenderer to input element. For textarea element, made some parameters pass DOMString by reference, and added invalidateValue, updateValue, valueMatchesRenderer, and setValueMatchesRenderer. * khtml/rendering/render_form.cpp: (RenderLineEdit::updateFromElement): Don't re-get the value from the DOM if valueMatchesRenderer is true. (RenderLineEdit::slotTextChanged): Call setValueFromRenderer instead of manipulating the DOM directly. (RenderTextArea::detach): Call updateValue instead of calling value for its side effect. (RenderTextArea::handleFocusOut): Ditto. (RenderTextArea::updateFromElement): Call updateValue and then not re-get the value from the DOM if valueMatchesRenderer is true. (RenderTextArea::slotTextChanged): Call invalidateValue instead of directly setting m_dirtyvalue to true. 2005-02-25 Chris Blumenberg <cblu@apple.com> Fixed: <rdar://problem/4023566> Stickies: Crash in ReplacementFragment::insertFragmentForTestRendering on paste Reviewed by darin. * khtml/editing/htmlediting.cpp: (khtml::ApplyStyleCommand::addInlineStyleIfNeeded): (khtml::ReplacementFragment::insertFragmentForTestRendering): (khtml::floatRefdElement): (khtml::createDefaultParagraphElement): (khtml::createBlockPlaceholderElement): (khtml::createFontElement): (khtml::createStyleSpanElement): * khtml/editing/htmlediting.h: 2005-02-25 Darin Adler <darin@apple.com> * kwq/character-sets.txt: Checked in updated file. This new file has no effect, because none of the changes affect character sets that we support, but it's good to have the latest file in here, and completely safe because I checked that the generated files have not changed. 2005-02-25 Vicki Murley <vicki@apple.com> Reviewed by Darin. - back out this change, since it causes a 3.5% performance regression 2005-02-23 Darin Adler <darin@apple.com> Reviewed by John. - fixed <rdar://problem/4011405> REGRESSION (180-181): Unconfirmed text disappears when text focus moves The key was to change things around so that we don't push text from the DOM to the widget unless the DOM has actually been changed. This prevents the code path that wipes out inline input during the blur process. * khtml/html/html_formimpl.cpp: (DOM::HTMLInputElementImpl::HTMLInputElementImpl): Start m_valueMatchesRenderer as false. (DOM::HTMLInputElementImpl::parseHTMLAttribute): Set m_valueMatchesRenderer to false when a new value is set here. (DOM::HTMLInputElementImpl::setValue): Set m_valueMatchesRenderer to false when a new value is set here. (DOM::HTMLInputElementImpl::setValueFromRenderer): Added. Sets m_value, sets m_valueMatchesRenderer to true, and also sends out the input event. It's better to have this here than in the renderer code. (DOM::HTMLTextAreaElementImpl::HTMLTextAreaElementImpl): Start m_valueIsValid as false (replaces m_dirtyvalue) and m_valueMatchesRenderer as false. (DOM::HTMLTextAreaElementImpl::updateValue): Added. Factored this out from the value function. Uses the new booleans and keeps them up to date, specifically setting m_valueMatchesRenderer based on where the value came from. (DOM::HTMLTextAreaElementImpl::value): Updated to call updateValue to do most of the work. (DOM::HTMLTextAreaElementImpl::setValue): Set both m_valueIsValid and m_valueMatchesRenderer. (DOM::HTMLTextAreaElementImpl::setDefaultValue): Take parameter by reference. * khtml/html/html_formimpl.h: Added setValueFromRenderer, valueMatchesRenderer, setValueMatchesRenderer, and m_valueMatchesRenderer to input element. For textarea element, made some parameters pass DOMString by reference, and added invalidateValue, updateValue, valueMatchesRenderer, and setValueMatchesRenderer. * khtml/rendering/render_form.cpp: (RenderLineEdit::updateFromElement): Don't re-get the value from the DOM if valueMatchesRenderer is true. (RenderLineEdit::slotTextChanged): Call setValueFromRenderer instead of manipulating the DOM directly. (RenderTextArea::detach): Call updateValue instead of calling value for its side effect. (RenderTextArea::handleFocusOut): Ditto. (RenderTextArea::updateFromElement): Call updateValue and then not re-get the value from the DOM if valueMatchesRenderer is true. (RenderTextArea::slotTextChanged): Call invalidateValue instead of directly setting m_dirtyvalue to true. 2005-02-25 Darin Adler <darin@apple.com> Reviewed by Chris. - fixed <rdar://problem/4024786> REGRESSION (Mail): "Smart paste" plain-text word into Blot leaves insertion point misplaced * khtml/editing/htmlediting.cpp: (khtml::ReplaceSelectionCommand::doApply): Use the insertNodeAfterAndUpdateNodesInserted and insertNodeBeforeAndUpdateNodesInserted functions to add the leading and trailing spaces for smart paste. 2005-02-25 David Hyatt <hyatt@apple.com> Back out fix for 3382926, since it breaks LTR text inside RTL contexts. Reviewed by john * khtml/rendering/bidi.cpp: (khtml::BidiIterator::direction): 2005-02-25 David Hyatt <hyatt@apple.com> Fix for 3975039, scrolling is slow in huge RSS views. Optimize the calculation of clip rects for overflow:hidden layers. Also optimize layer movement when scrolling overflow sections. Reviewed by darin * khtml/rendering/render_layer.cpp: (throw): (ClipRects::operator delete): (ClipRects::detach): (RenderLayer::RenderLayer): (RenderLayer::~RenderLayer): (RenderLayer::updateLayerPosition): (RenderLayer::removeOnlyThisLayer): (RenderLayer::insertOnlyThisLayer): (RenderLayer::scrollToOffset): (RenderLayer::hitTest): (RenderLayer::calculateClipRects): (RenderLayer::calculateRects): (RenderLayer::containsPoint): (RenderLayer::clearClipRects): (RenderLayer::clearClipRect): * khtml/rendering/render_layer.h: (khtml::ClipRects::m_refCnt): (khtml::ClipRects::overflowClipRect): (khtml::ClipRects::fixedClipRect): (khtml::ClipRects::posClipRect): (khtml::ClipRects::ref): (khtml::ClipRects::deref): (khtml::RenderLayer::clipRects): * khtml/rendering/render_object.cpp: (RenderObject::setStyle): 2005-02-24 Maciej Stachowiak <mjs@apple.com> Reviewed by Darin and Dave a while ago. <rdar://problem/3996685> REGRESSION: Crash in KWQVectorImpl::at loading http://maps.google.com/mapfiles/homepanel.xsl * kwq/WebCoreBridge.mm: (formElementFromDOMElement): Check for isHTMLElement() as well as id() == ID_FORM. This seems like an impossible situation, but papering over it seems more expedient for the time being. 2005-02-24 Richard Williamson <rjw@apple.com> Fixed <rdar://problem/3382926> Bidi neutrals at RTL/LTR boundaries not handled correctly. Use mirror characters correctly when rendering with RTL directionality. Reviewed by Hyatt. * khtml/rendering/bidi.cpp: (khtml::BidiIterator::direction): 2005-02-24 Richard Williamson <rjw@apple.com> Fixed <rdar://problem/3985889> REGRESSION (125-180): setting <img> src to GIF that already animated does not animate; just shows final frame Reviewed by Hyatt. * WebCore.pbproj/project.pbxproj: * khtml/html/html_imageimpl.cpp: (HTMLImageLoader::updateFromElement): * khtml/rendering/render_image.cpp: (RenderImage::resetAnimation): * khtml/rendering/render_image.h: * khtml/rendering/render_list.cpp: (RenderListMarker::setStyle): (RenderListMarker::paint): * khtml/rendering/render_list.h: * kwq/KWQPixmap.h: * kwq/KWQPixmap.mm: (QPixmap::QPixmap): (QPixmap::resetAnimation): * kwq/WebCoreImageRenderer.h: 2005-02-24 Chris Blumenberg <cblu@apple.com> Fixed: <rdar://problem/4020110> Safari crashes in setAllData while taking a www.zoomerang.com survey Reviewed by rjw. * kwq/KWQResourceLoader.mm: (-[KWQResourceLoader finishJobAndHandle:]): clear the job after we've deleted to avoid reentrancy 2005-02-24 Darin Adler <darin@apple.com> Reviewed by Vicki. - fixed <rdar://problem/4023360> REGRESSION (186-187): image file upload is broken at pep.apple.com * khtml/html/html_formimpl.cpp: (DOM::HTMLInputElementImpl::appendFormData): Return true after setting up the form data for an uploaded file. The old code would fall through to the ISINDEX case and send double form data (the filename instead of the file contents the second time). 2005-02-24 David Harrison <harrison@apple.com> Reviewed by Ken. <rdar://problem/3990849> AX: textMarkerRange for an AXUIElement within an AXWebArea * kwq/KWQAccObject.mm: (-[KWQAccObject textMarkerRange]): (-[KWQAccObject accessibilityParameterizedAttributeNames]): (-[KWQAccObject doAXTextMarkerRangeForUIElement:]): (-[KWQAccObject accessibilityAttributeValue:forParameter:]): Added AXTextMarkerRangeForUIElement, or you can send textMarkerRange to the UIElement itself. 2005-02-24 David Harrison <harrison@apple.com> Reviewed by Vicki. <rdar://problem/4004279> 3 AXSelectedTextChanged notifications are firing each time I type a character * khtml/xml/dom_docimpl.cpp: (DocumentImpl::updateSelection): Send notification only if the selection is not null. This safely ignores transitory selections set during editing. 2005-02-24 Darin Adler <darin@apple.com> Reviewed by John. - fixed <rdar://problem/3987619> in some cases, text doesn't resize with Format->Style->Bigger/Smaller * khtml/editing/htmlediting.cpp: (khtml::ApplyStyleCommand::applyRelativeFontStyleChange): Only call nodeFullySelected for non-text nodes. Text nodes are already split so they're either in the range and full selected or out of the range. And nodeFullySelected doesn't work for text nodes. (khtml::ApplyStyleCommand::nodeFullySelected): Add an assertion, since this function only works for elements, not text nodes. (khtml::ApplyStyleCommand::nodeFullyUnselected): Ditto. - make big improvement in <rdar://problem/3953636> Mail hung for ~10sec changing font of 84328 characters: khtml::ApplyStyleCommand::nodeFullySelected * khtml/xml/dom2_rangeimpl.cpp: (DOM::RangeImpl::compareBoundaryPoints): Improve algorithm based on suggestion from Nate Begeman. - fixed <rdar://problem/4020305> REGRESSION (185-186): loading image in new window using document.write fails * khtml/xml/dom_docimpl.cpp: (DocumentImpl::open): If there is no parent document, don't blow away the base URL. - fixed <rdar://problem/4021701> REGRESSION (188-188+): form not submitted after pressing <return> at http://hrweb.apple.com * khtml/xml/dom_nodeimpl.cpp: (NodeImpl::dispatchMouseEvent): Send activate event in the case where the event sent is a KHTML_CLICK_EVENT, not CLICK_EVENT. 2005-02-23 Kevin Decker <kdecker@apple.com> Reviewed by mjs Fixed <rdar://problem/4020747> REGRESSION: stray </applet> tags crash Safari * khtml/html/htmlparser.cpp: (KHTMLParser::processCloseTag): Made a typesafe check that prevents crashes whenever there is a closing applet tag without an actual <applet> in the first place. Now verifies the current token is ID_APPLET before casting it to an HTMLAppletElementImpl. 2005-02-23 Ken Kocienda <kocienda@apple.com> Reviewed by John Fix for this bug: <rdar://problem/3977962> font loses bold style after pasting next to existing text and pressing return * khtml/editing/htmlediting.cpp: (khtml::InsertParagraphSeparatorCommand::calculateStyleBeforeInsertion): Problem here was that we were doing work in cases where we should not, and content whose style would have been correct if we had done nothing was getting clobbered. It turns out that extra work to apply style to the new paragraph added in this command only needs to be done if we're at the boundaries of a paragraph. Otherwise, content that is moved as part of the work of the command will lend their styles to the new paragraph without any extra work needed. So, make this position check and return unless at a paragraph boundary. New test: * layout-tests/editing/style/block-styles-007-expected.txt * layout-tests/editing/style/block-styles-007.html 2005-02-23 Ken Kocienda <kocienda@apple.com> Reviewed by Hyatt Fix for this bug: <rdar://problem/4017641> REGRESSION (Mail): you can only bold/unbold a selection starting from end of line once Problem is with the way we figure out whether to add or remove a style based on the current selection. In this case, the code is looking at the end of the previous line, which is not bold, and deduces incorrectly that the operation is a "make bold". Then the style code runs to make bold, but there is nothing on the end of the previous line to embolden, so we get into a cycle where the same thing happens each time cmd-b is hit. * khtml/khtml_part.cpp: (KHTMLPart::selectionComputedStyle): Call editingStartPosition() to get the right position for the font determination. * khtml/xml/dom2_rangeimpl.cpp: (DOM::RangeImpl::editingStartPosition): New helper function that "does the right thing" based on whether the selection is a caret or a range, moving upstream for the former, and downstream for the latter. * khtml/xml/dom2_rangeimpl.h: * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::fontForSelection): Call editingStartPosition() to get the right position for the font determination. New tests: * layout-tests/editing/style/style-boundary-001-expected.txt * layout-tests/editing/style/style-boundary-001.html * layout-tests/editing/style/style-boundary-002-expected.txt * layout-tests/editing/style/style-boundary-002.html * layout-tests/editing/style/style-boundary-003-expected.txt * layout-tests/editing/style/style-boundary-003.html * layout-tests/editing/style/style-boundary-004-expected.txt * layout-tests/editing/style/style-boundary-004.html 2005-02-23 Richard Williamson <rjw@apple.com> Fixed <rdar://problem/3985579> 8A367: Dashboard: Stock widget not visible when click remove to remove single char ticker symbol Explicitly remove scroll bar views when removing them from the overflow. Don't paint synchronously when the scroll position changes, this caused funky clip problems. Reviewed by Hyatt. * khtml/rendering/render_layer.cpp: (RenderLayer::scrollToOffset): (RenderLayer::setHasHorizontalScrollbar): (RenderLayer::setHasVerticalScrollbar): (RenderLayer::updateScrollInfoAfterLayout): 2005-02-23 Ken Kocienda <kocienda@apple.com> Reviewed by Hyatt Fix for this bug: <rdar://problem/3959996> REGRESSION (Mail): cursor moves to beginning of document when click is past end * khtml/rendering/render_block.cpp: (khtml::RenderBlock::positionForCoordinates): Skip blocks that are invisible or have no height when looking for a child to pass off to. And save away the last visible block with a height to pass off to if there is no child at the right y-coordinate. 2005-02-23 David Harrison <harrison@apple.com> Reviewed by Darin. <rdar://problem/4010059> BoundsForTextMarkerRange does not update with scrolled web area * kwq/KWQAccObject.mm: (-[KWQAccObject doAXBoundsForTextMarkerRange:]): Adjust for scrolling. 2005-02-22 Maciej Stachowiak <mjs@apple.com> Reviewed by Ken. <rdar://problem/3949790> hitting return after pasted styled line results in extra content getting the style * khtml/editing/htmlediting.cpp: (khtml::InsertParagraphSeparatorCommand::doApply): In the case where the start block is the root, insert the newly created DIV at the end of the root block instead of after the last sibling in the start node, since the start node could be inside other style-affecting nodes and we don't want to reparent its cousins into that. 2005-02-23 David Harrison <harrison@apple.com> Reviewed by Vicki. <rdar://problem/4014691> switch to correctly spelled NSAccessibilityForegroundColorTextAttribute constant Also removed two older, now unneeded, wrappers. * kwq/KWQAccObject.mm: (-[KWQAccObject visiblePositionForStartOfTextMarkerRange:]): (-[KWQAccObject visiblePositionForEndOfTextMarkerRange:]): Removed these older, now unneeded, wrappers. (NSAccessibilityForegroundColorTextAttributeWrapper): New wrapper for NSAccessibilityForegroundColorTextAttribute. (AXAttributeStringSetStyle): Use NSAccessibilityForegroundColorTextAttributeWrapper. (-[KWQAccObject doAXTextMarkerRangeForUnorderedTextMarkers:]): Remove uses of visiblePositionForStartOfTextMarkerRange and visiblePositionForEndOfTextMarkerRange. 2005-02-23 David Harrison <harrison@apple.com> Reviewed by Vicki. <rdar://problem/3524784> AX hit test doesn't return info when done in empty space of content area * kwq/KWQAccObject.mm: (-[KWQAccObject accessibilityHitTest:]): Return unignored object. 2005-02-23 Darin Adler <darin@apple.com> Reviewed by Ken. - fixed <rdar://problem/4006509> REGRESSION (171-172): Setting CSS -khtml-user-modify property triggers crash * khtml/css/cssstyleselector.cpp: (khtml::CSSStyleSelector::applyProperty): Removed the code that changes the style of the element. This was never needed, and caused the style to be modified while we were iterating it. 2005-02-23 Ken Kocienda <kocienda@apple.com> Reviewed by John Fix for this bug: <rdar://problem/3980209> Mail crashed when I pressed Cmd-Shift-[ (nil-deref in ApplyStyleCommand::addBlockStyleIfNeeded) * khtml/editing/htmlediting.cpp: (khtml::CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessary): Reordered the new block insertion so that it come before the move. The logic stays exactly the same, however, with the old ordering, the new block could want to become a child of itself come insertion time. I considered making a more complicated code change to fix this problem, but the simple reordering works just as well, and seems less risky. These all changed in an insignificant way. It seems that with the new code, some empty text nodes got reordered in the document. This has no effect on anything visible to the user. * layout-tests/editing/style/create-block-for-style-003-expected.txt * layout-tests/editing/style/create-block-for-style-004-expected.txt * layout-tests/editing/style/create-block-for-style-009-expected.txt * layout-tests/editing/style/create-block-for-style-011-expected.txt * layout-tests/editing/style/create-block-for-style-013-expected.txt 2005-02-23 Darin Adler <darin@apple.com> Reviewed by John. - fixed <rdar://problem/4013986> REGRESSION (173-174): onclick event not sent when mouse click on checkbox is double-click We need to send an onclick event *and* an ondblclick event when we process a double click. * khtml/khtmlview.cpp: (KHTMLView::dispatchMouseEvent): In the case where we're sending a CLICK_EVENT, follow it by a KHTML_CLICK_EVENT, a KHTML_DBLCLICK_EVENT when handling a double click, and a DOMACTIVATE_EVENT. We no longer do the DOMACTIVATE_EVENT in dispatchGenericEvent. * khtml/rendering/render_form.cpp: (RenderFormElement::slotClicked): send only CLICK_EVENT here, and lets dispatchMouseEvent deal with the other subsequent events. * khtml/xml/dom_nodeimpl.cpp: (NodeImpl::dispatchGenericEvent): Remove the code that sends a DOMACTIVATE_EVENT, since there's no longer a good way to figure out if this is the last event that should be sent before it is. (NodeImpl::dispatchMouseEvent): Set the meta key modifier here (as it already is set elsewhere), and follow up a CLICK_EVENT with KHTML_CLICK_EVENT, a KHTML_DBLCLICK_EVENT, and DOMACTIVATE_EVENT as above. 2005-02-23 Darin Adler <darin@apple.com> Reviewed by John. - fixed <rdar://problem/4011405> REGRESSION (180-181): Unconfirmed text disappears when text focus moves The key was to change things around so that we don't push text from the DOM to the widget unless the DOM has actually been changed. This prevents the code path that wipes out inline input during the blur process. * khtml/html/html_formimpl.cpp: (DOM::HTMLInputElementImpl::HTMLInputElementImpl): Start m_valueMatchesRenderer as false. (DOM::HTMLInputElementImpl::parseHTMLAttribute): Set m_valueMatchesRenderer to false when a new value is set here. (DOM::HTMLInputElementImpl::setValue): Set m_valueMatchesRenderer to false when a new value is set here. (DOM::HTMLInputElementImpl::setValueFromRenderer): Added. Sets m_value, sets m_valueMatchesRenderer to true, and also sends out the input event. It's better to have this here than in the renderer code. (DOM::HTMLTextAreaElementImpl::HTMLTextAreaElementImpl): Start m_valueIsValid as false (replaces m_dirtyvalue) and m_valueMatchesRenderer as false. (DOM::HTMLTextAreaElementImpl::updateValue): Added. Factored this out from the value function. Uses the new booleans and keeps them up to date, specifically setting m_valueMatchesRenderer based on where the value came from. (DOM::HTMLTextAreaElementImpl::value): Updated to call updateValue to do most of the work. (DOM::HTMLTextAreaElementImpl::setValue): Set both m_valueIsValid and m_valueMatchesRenderer. (DOM::HTMLTextAreaElementImpl::setDefaultValue): Take parameter by reference. * khtml/html/html_formimpl.h: Added setValueFromRenderer, valueMatchesRenderer, setValueMatchesRenderer, and m_valueMatchesRenderer to input element. For textarea element, made some parameters pass DOMString by reference, and added invalidateValue, updateValue, valueMatchesRenderer, and setValueMatchesRenderer. * khtml/rendering/render_form.cpp: (RenderLineEdit::updateFromElement): Don't re-get the value from the DOM if valueMatchesRenderer is true. (RenderLineEdit::slotTextChanged): Call setValueFromRenderer instead of manipulating the DOM directly. (RenderTextArea::detach): Call updateValue instead of calling value for its side effect. (RenderTextArea::handleFocusOut): Ditto. (RenderTextArea::updateFromElement): Call updateValue and then not re-get the value from the DOM if valueMatchesRenderer is true. (RenderTextArea::slotTextChanged): Call invalidateValue instead of directly setting m_dirtyvalue to true. 2005-02-22 Richard Williamson <rjw@apple.com> Fixed <rdar://problem/3937203> when a div adds a scrollbar (overflow:auto) we do not get regions Just set dashboard dirty bit when overflow scrolling changes. Don't do comparison of regions in before scroll regions are added, instead do it in WebKit after automatic scroll regions are added. Reviewed by Maciej. * khtml/css/cssparser.cpp: (CSSParser::parseDashboardRegions): Cleaned up comments * khtml/css/cssstyleselector.cpp: (khtml::CSSStyleSelector::styleForElement): Cleaned up comments * khtml/khtmlview.cpp: (KHTMLView::updateDashboardRegions): * khtml/rendering/render_layer.cpp: (RenderLayer::updateScrollInfoAfterLayout): * kwq/WebDashboardRegion.m: (-[WebDashboardRegion isEqual:]): 2005-02-22 Chris Blumenberg <cblu@apple.com> Fixed: <rdar://problem/3976872> Pasted plain text doesn't get the proper style if pasted into newlines Reviewed by mjs. * khtml/editing/htmlediting.cpp: (khtml::ReplaceSelectionCommand::doApply): don't clear the typing style when matching style (khtml::ReplaceSelectionCommand::completeHTMLReplacement): apply the typing style when matching style * khtml/editing/jsediting.cpp: * khtml/khtml_part.cpp: (KHTMLPart::pasteAndMatchStyle): new * khtml/khtml_part.h: * kwq/KWQKHTMLPart.h: * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::issuePasteAndMatchStyleCommand): new * kwq/WebCoreBridge.h: * layout-tests/editing/editing.js: 2005-02-22 Darin Adler <darin@apple.com> Reviewed by Adele. - fixed <rdar://problem/4006596> REGRESSION (183-184): crash in DOM::DocumentImpl::setFocusNode(DOM::NodeImpl*) * khtml/xml/dom_docimpl.cpp: (widgetForNode): Added helper. (DocumentImpl::setFocusNode): Re-get the widget for the node after calling updateLayout. The updateLayout can destroy the old widget, so we can't keep a stale widget pointer around. 2005-02-22 Ken Kocienda <kocienda@apple.com> Reviewed by Hyatt Fix for this bug: <rdar://problem/4003463> Mail.app HTML uses inline styling markup not understood by Entourage and Eudora * khtml/editing/htmlediting.cpp: (khtml::isEmptyFontTag): Helper for removing <font> tags. (khtml::StyleChange::styleModeForParseMode): Helper to map a document parse mode to a use/don't use legacy-html-styles value. (khtml::StyleChange::checkForLegacyHTMLStyleChange): Add support for colors, font faces, and font sizes. (khtml::ApplyStyleCommand::isHTMLStyleNode): (khtml::ApplyStyleCommand::removeHTMLFontStyle): (khtml::ApplyStyleCommand::applyTextDecorationStyle): Now call styleModeForParseMode to determine whether to use legacy html styles or not. (khtml::ApplyStyleCommand::removeInlineStyle): Now properly removes <font> styles. (khtml::ApplyStyleCommand::addBlockStyleIfNeeded): Ditto. (khtml::ApplyStyleCommand::addInlineStyleIfNeeded): Ditto. (khtml::createFontElement): Helper for applying <font> elements. * khtml/editing/htmlediting.h: All the following support the new bits of data we need to store. (khtml::StyleChange::applyFontColor) (khtml::StyleChange::applyFontFace) (khtml::StyleChange::applyFontSize) (khtml::StyleChange::fontColor) (khtml::StyleChange::fontFace) (khtml::StyleChange::fontSize) Test results updated now that we will write out <font> tags for quirks mode documents. * layout-tests/editing/execCommand/modifyForeColorByCharacter-expected.txt * layout-tests/editing/style/block-style-004-expected.txt * layout-tests/editing/editing/pasteboard/paste-text-011-expected.txt * layout-tests/editing/style/block-style-005-expected.txt * layout-tests/editing/style/block-style-006-expected.txt * layout-tests/editing/style/smoosh-styles-001-expected.txt * layout-tests/editing/style/smoosh-styles-002-expected.txt 2005-02-22 Maciej Stachowiak <mjs@apple.com> Reviewed by Kevin. <rdar://problem/4017066> crash in KJS::ValueImp::dispatchType() every time I load www.nytimes.com/pages/automobiles When creating option elements, use lowercase "option" instead of uppercase "OPTION" to create option elements, because only lowercase works for XHTML. * khtml/ecma/kjs_html.cpp: (KJS::HTMLSelectCollection::tryPut): (OptionConstructorImp::construct): 2005-02-22 Chris Blumenberg <cblu@apple.com> WebCore fix for: <rdar://problem/3918056> Mail not line breaking my <pre> formatted emails on replies Mail must 4018993 to fully address the problem. Reviewed by kocienda. * khtml/editing/markup.cpp: (khtml::startMarkup): don't compute style for text in PRE tags (khtml::createMarkup): include PRE if it is an ancestor of the nodes in the range 2005-02-21 Richard Williamson <rjw@apple.com> Fixed <rdar://problem/4008338> REGRESSION (125-178): opacity style not working, breaks fading images on okcupid.com There was a long standing bug in cssText(). Double value were always cast int! So, opacity values values were incorrectly converted to text, i.e. 0.75 became 0. The problem was newly triggered because we parse the css for opacity *TWICE*. This is a result of incorrectly "invalidating" the style attribute (from fix for 3790449). The second parse was from the cssText() of the style. Reviewed by Hyatt. * khtml/css/css_valueimpl.cpp: (DOM::CSSPrimitiveValueImpl::cssText): 2005-02-21 David Hyatt <hyatt@apple.com> Fix for 4017204, apply the same fix to the base class nodeAtPoint that was already applied to RenderBlock. Skip elements with layers and inline flows. Demoted <form>s can end up causing trouble otherwise. Reviewed by Richard Williamson * khtml/rendering/render_box.cpp: (RenderBox::nodeAtPoint): 2005-02-21 David Hyatt <hyatt@apple.com> Fix for 4017033, CSS is being parsed twice. Make sure to always validate the style attribute when it is initially parsed. Add code to clean up decls when the style attribute is completely removed. Add a new synchronizing boolean that avoids reparsing the style declaration when the attribute is simply being synced up to the declaration. Reviewed by John * khtml/css/css_valueimpl.cpp: (DOM::CSSMutableStyleDeclarationImpl::setChanged): * khtml/html/html_elementimpl.cpp: (HTMLElementImpl::invalidateStyleAttribute): (HTMLElementImpl::updateStyleAttributeIfNeeded): (HTMLElementImpl::HTMLElementImpl): (HTMLElementImpl::~HTMLElementImpl): (HTMLElementImpl::destroyInlineStyleDecl): (HTMLElementImpl::mapToEntry): (HTMLElementImpl::parseHTMLAttribute): * khtml/html/html_elementimpl.h: * khtml/xml/dom_elementimpl.cpp: (ElementImpl::ElementImpl): (ElementImpl::setAttribute): * khtml/xml/dom_elementimpl.h: (DOM::ElementImpl::updateStyleAttributeIfNeeded): === Safari-188 === 2005-02-21 Darin Adler <darin@apple.com> - fixed Panther deployment build * kwq/KWQTextEdit.mm: (QTextEdit::setScrollBarModes): Put more stuff inside #if. 2005-02-21 David Harrison <harrison@apple.com> Reviewed by Darin. <rdar://problem/3943090> REGRESSION (Mail): Spelling underline incompletely erased following certain steps * khtml/rendering/render_text.cpp: (InlineTextBox::paintMarker): Make sure underline is placed within the text bounds. * kwq/KWQPainter.h: * kwq/KWQPainter.mm: (QPainter::misspellingLineThickness): * kwq/WebCoreTextRenderer.h: Add misspellingLineThickness for use by InlineTextBox::paintMarker. 2005-02-21 Darin Adler <darin@apple.com> Reviewed by John. - fixed <rdar://problem/4012978> -[DOMRange markupString] crashes when range contains only a text node with a single space * khtml/editing/markup.cpp: (khtml::createMarkup): Added updateLayout calls, and added a missing nil check. 2005-02-21 Darin Adler <darin@apple.com> Reviewed by John. - fixed <rdar://problem/4005435> Safari hung while pasting text into a <textarea> (Panther-only) * kwq/KWQTextEdit.mm: (QTextEdit::setScrollBarModes): Don't setAutohidesScrollers:YES on Panther. 2005-02-21 Ken Kocienda <kocienda@apple.com> Reviewed by John Fix for this bug: <rdar://problem/4015499> REGRESSION (186-187): pasted quoted text starting with a blank line increases quote level of pasted text when pasted * khtml/editing/markup.cpp: (khtml::markup): Changed over to ASSERT instead of assert. (khtml::createMarkup): The issue was that the code to add parents all the way back to the common ancestor block did not check for blocks whose markup had already been added, and could result in adding markup for nodes twice (hence the additional and erroneous quote level). Now there is a new check that will only add markup for those nodes before the start of the selection range. This fixes the bug. (khtml::createFragmentFromMarkup): Changed over to ASSERT instead of assert. (khtml::createFragmentFromText): Ditto. 2005-02-21 Ken Kocienda <kocienda@apple.com> Reviewed by John Fix for this bug: <rdar://problem/4015494> REGRESSION (186-187) <cr> removed if quoted word is copy/pasted on line immediately above quoted text * khtml/editing/htmlediting.cpp: (khtml::ReplaceSelectionCommand::doApply): Relatively new check designed to remove a <br> element when that element was on a line by itself did not do an adequate check for this condition, causing the failure described in the bug. Fixed. 2005-02-19 Ken Kocienda <kocienda@apple.com> Reviewed by Maciej * khtml/editing/htmlediting.cpp: (khtml::matchNearestBlockquoteColorString): New function which abstracts away the CSS property we use for this pseudo-color. (khtml::ReplacementFragment::removeBlockquoteColorsIfNeeded): Set the new nearestBlockquoteColorString psuedo-color here, rather than removing colors as was done before. (khtml::ReplaceSelectionCommand::applyStyleToInsertedNodes): Check for the pseudo-color in the desired style, and determine the real color based on the nearest blockquote (or none) to the node. (khtml::nearestMailBlockquote): Name change from closestMailBlockquote to match new property better. All the rest of this change is the mechanical coding you need to do to add a new CSS property, in this case, -khtml-match-nearest-mail-blockquote-color. * khtml/css/css_computedstyle.cpp: (DOM::CSSComputedStyleDeclarationImpl::getPropertyCSSValue) * khtml/css/cssparser.cpp: (CSSParser::parseValue): * khtml/css/cssproperties.c: (hash_prop): (findProp): * khtml/css/cssproperties.h: * khtml/css/cssproperties.in: * khtml/css/cssstyleselector.cpp: (khtml::CSSStyleSelector::applyProperty) * khtml/css/cssvalues.c: (findValue) * khtml/css/cssvalues.h: * khtml/css/cssvalues.in: * khtml/rendering/render_style.h: (khtml::RenderStyle::matchNearestMailBlockquoteColor) (khtml::RenderStyle::setMatchNearestMailBlockquoteColor) (khtml::RenderStyle::initialMatchNearestMailBlockquoteColor) 2005-02-19 Ken Kocienda <kocienda@apple.com> Reviewed by Chris Fix for these bugs: <rdar://problem/4014228> REGRESSION (186-187) extra, uneditable lines inserted above and below a line of pasted quoted text <rdar://problem/4014393> REGRESSION (186-187) pasted quoted text gets extra <cr>s when pasted at top of document * khtml/editing/htmlediting.cpp: (khtml::ReplacementFragment::ReplacementFragment): Part of a general refactoring of how the fragment is inserted into the document, rendered, and then tested for certain important pieces of information that are required for pasting. (khtml::ReplacementFragment::insertFragmentForTestRendering): New helper. Handles inserting the fragment nodes into the document. (khtml::ReplacementFragment::restoreTestRenderingNodesToFragment): Removes nodes from the document, and restores them to the fragment. (khtml::ReplacementFragment::computeStylesUsingTestRendering): Factored out code that did this before into its own function. (khtml::ReplacementFragment::removeUnrenderedNodesUsingTestRendering): Ditto. (khtml::ReplacementFragment::countRenderedBlocks): This is a real improvement, as it eliminates a major use of the isProbablyBlock() function. Now, the blocks that are counted are real, rendered blocks. (khtml::ReplacementFragment::removeStyleNodes): Made this function retain margin-zeroing CSS properties on paragraphs. This does two things: 1) It helps us to maintain good behavior in the short term while there are still versions of Mail out there that use <p> elements instead of <div> elements for new paragraphs; and 2) It will help to maintain the compatibility with other mail clients that use <p> elements for their paragraphs but render them themselves with no margins as the result of quirks. (khtml::ReplaceSelectionCommand::doApply): Do some work to fix up and improve the handling of blank lines, be they <p> elements or <br> elements, that can be removed after pasting. This, coupled with the refactoring, fixes 4014393. * khtml/editing/htmlediting.h: Updated for new functions. * layout-tests/editing/pasteboard/paste-text-010-expected.txt: Updated results, actually improved with this change. * layout-tests/editing/pasteboard/paste-text-011-expected.txt: Ditto. 2005-02-19 Kevin Decker <kdecker@apple.com> Reviewed by Chris. Fixed <rdar://problem/4010765> Flash player can be used to arbitrarily open popup windows without user permission Our window.open() policy is to refuse the <script>window.open(...)</script> case and allow the inline the <a href="javascript:window.open('foo')> case. Clever advertisers at some point realized that by executing their Javascript through the Flash plugin, Safari would always treat their code as the inline case, and thus, they were able to work around our popup blocker. * kwq/WebCoreBridge.h: * kwq/WebCoreBridge.mm: (-[WebCoreBridge stringByEvaluatingJavaScriptFromString:]): Changed this to invoke the new stringByEvaluatingJavaScriptFromString:forceUserGesture method below. (-[WebCoreBridge stringByEvaluatingJavaScriptFromString:forceUserGesture:]): Let the WebKit make the determination if this was a user originated gesture or not; we must no longer assume this is always the case. 2005-02-18 Chris Blumenberg <cblu@apple.com> Fixed: <rdar://problem/3951196> REGRESSION (Mail): too many levels of reply quotes after certain steps Reviewed by kocienda. * khtml/editing/htmlediting.cpp: (khtml::InsertParagraphSeparatorInQuotedContentCommand::doApply): - If we find a new start node, update topBlockquote so we don't use too many block quotes for the contents following the new line. - Build up the list of ancestors after we've determined the actual topBlockquote. - Don't insert an extra new line if there is a new start node. 2005-02-19 Chris Blumenberg <cblu@apple.com> Fixed: <rdar://problem/3978461> smart paste is broken Reviewed by kevin. * khtml/editing/htmlediting.cpp: (khtml::ReplaceSelectionCommand::doApply): properly check for leading and trailing whitespace. These checks were incorrectly reversed. Also check if we're pasting at the beginning or end of a line. We should not insert spaces in either case. 2005-02-18 Adele Amchan <adele@apple.com> Reviewed by Darin. Fix for <rdar://problem/3975568> REGRESSION(125-180)Australian Open pages have drawing problem This patch fixes two problems caused by our added support for custom tags. First, the layout problem at the sites mentioned in the bug was caused by custom tags within tables. In checkChild, we needed to treat these tags as spans so they get placed correctly in the DOM tree. Also, we were indexing the tagPriority and endTag arrays with id values from the custom tags that were greater than the size of the array. So now we have functions to check for the custom tags, and again, treat them as spans. To avoid confusion, we changed the names of the arrays to endTagArray and tagPriorityArray. * khtml/html/dtd.h: changed all uses of the endTag array to endTagArray for our new wrapper functions (DOM::tagPriority): added function to check array bounds and to treat custom tags as spans (DOM::endTagRequirement): added function to check array bounds and to treat custom tags as spans * khtml/html/dtd.cpp: changed name of endTag and tagPriority arrays to endTagArray and tagPriorityArray (DOM::checkChild): treat custom tags as spans during this check * khtml/html/html_elementimpl.cpp: changed all uses of the endTag array to the endTagRequirement function (HTMLElementImpl::createContextualFragment): (HTMLElementImpl::setInnerText): (HTMLElementImpl::setOuterText): (HTMLElementImpl::toString): * khtml/html/htmlparser.cpp: changed all uses of the endTag array to the endTagRequirement function and all uses of the tagPriority array to the tagPriority function. (KHTMLParser::parseToken): (KHTMLParser::insertNode): * khtml/html/htmltokenizer.cpp: (khtml::HTMLTokenizer::parseTag): changed all uses of the endTag array to the endTagRequirement function * khtml/editing/markup.cpp: changed all uses of the endTag array to the endTagRequirement function (khtml::endMarkup): (khtml::markup): 2005-02-18 Jens Alfke <jens@apple.com> Reviewed by Hyatt. Fixed build: Whoops, setNeedsLayout's parameter is NOT optional. * khtml/html/html_objectimpl.cpp: (HTMLAppletElementImpl::setAllParamsAvailable): 2005-02-18 Jens Alfke <jens@apple.com> Reviewed by cblu, hyatt. Fixes <rdar://problem/3603191> "REGRESSION: Applets not receiving all of the Applet Parameters in Java 1.4.1/1.4.2" Defer instantiation of Java applet plugin until after all of the <applet> tag's nested <param> tags have been parsed, otherwise the list of parameters passed to the applet is incomplete. The regression was introduced (says Dave) when the parser's close-tag notifications were removed in the name of performance. * khtml/html/html_objectimpl.cpp: (HTMLAppletElementImpl::HTMLAppletElementImpl): (HTMLAppletElementImpl::getAppletInstance): (HTMLAppletElementImpl::setAllParamsAvailable): (HTMLAppletElementImpl::allParamsAvailable): * khtml/html/html_objectimpl.h: * khtml/html/htmlparser.cpp: (KHTMLParser::processCloseTag): * khtml/rendering/render_applet.cpp: (RenderApplet::createWidgetIfNecessary): 2005-02-18 Richard Williamson <rjw@apple.com> Fixed <rdar://problem/4006161> Tiger8A380: Widgets leak dashboard regions We were leaking the DashboardRegionImpls. Reviewed by Kevin. * khtml/css/css_valueimpl.cpp: (DOM::CSSPrimitiveValueImpl::cleanup): 2005-02-18 Chris Blumenberg <cblu@apple.com> Fixed: <rdar://problem/3945271> REGRESSION (Mail): pasted plain text should pick up typing style instead of being unstyled Reviewed by kocienda. * khtml/editing/htmlediting.cpp: (khtml::ApplyStyleCommand::addInlineStyleIfNeeded): don't set class on element returned by createStyleSpanElement since that's already done (khtml::ReplacementFragment::ReplacementFragment): take matchStyle param, don't call computeStylesAndRemoveUnrendered() if !matchStyle (khtml::ReplaceSelectionCommand::ReplaceSelectionCommand): take matchStyle param (khtml::ReplaceSelectionCommand::doApply): if m_matchStyle, use selection.start() as the insertion position and don't call applyStyleToInsertedNodes() * khtml/editing/htmlediting.h: * kwq/WebCoreBridge.h: * kwq/WebCoreBridge.mm: (-[WebCoreBridge replaceSelectionWithFragment:selectReplacement:smartReplace:matchStyle:]): take matchStyle param and pass it (-[WebCoreBridge replaceSelectionWithNode:selectReplacement:smartReplace:]): pass NO for matchStyle (-[WebCoreBridge replaceSelectionWithMarkupString:baseURLString:selectReplacement:smartReplace:]): pass NO for matchStyle (-[WebCoreBridge replaceSelectionWithText:selectReplacement:smartReplace:]): pass YES for matchStyle 2005-02-18 Ken Kocienda <kocienda@apple.com> Reviewed by Chris Fix for these bugs: <rdar://problem/4013025> Copy/Paste of quoted word results in removal of any following <cr> <rdar://problem/4013100> Copy/Paste quoted text and then decrease quote level does not change text color For the most part, these bugs were caused by errors and lack of foresight on my part when I added the better paste code. Chalk these fixes up to the result of bake time. * khtml/editing/htmlediting.cpp: (khtml::ReplacementFragment::ReplacementFragment): Need to move count of number of blocks in fragment after the call to remove unrendered nodes. Meant to do this before, but forgot to. (khtml::ReplacementFragment::removeStyleNodes): Need to remove inline styles from elements! Terrible omission now fixed. (khtml::ReplacementFragment::removeBlockquoteColorsIfNeeded): Remove blockquote colors for now. Code has a more extensive comment in it now to explain the difficulty, and the need for more study and changes. (khtml::ReplaceSelectionCommand::doApply): Need to call applyStyleToInsertedNodes() in the m_fragment.hasInterchangeNewline() case. This was just missed before. * layout-tests/editing/pasteboard/paste-text-011-expected.txt: Updated results, subtly different, but OK. * layout-tests/editing/pasteboard/paste-text-017-expected.txt: Updated for <p> to <div> change in test content. * layout-tests/editing/pasteboard/paste-text-017.html: Needed to change <p> to <div> to make this test go with the new design of using <div> tags for default paragraphs. 2005-02-18 David Hyatt <hyatt@apple.com> Fix for 3974263 (and possibly others). Don't let fixed tables use maxint as their maxwidth when some cells have percentage values. Reviewed by kocienda * khtml/misc/arena.cpp: (ArenaAllocate): * khtml/rendering/table_layout.cpp: (FixedTableLayout::calcWidthArray): (FixedTableLayout::calcMinMaxWidth): (AutoTableLayout::layout): 2005-02-17 Darin Adler <darin@apple.com> Reviewed by Kevin. - fixed <rdar://problem/3998627> WebKit crashes when deleting text in a modified div * khtml/khtml_part.cpp: (KHTMLPart::selectionComputedStyle): Add a ref and deref to keep the element alive until it's added to the DOM tree. * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::styleForSelectionStart): Ditto. 2005-02-17 Richard Williamson <rjw@apple.com> Fixed <rdar://problem/3999467> when Osaka-Mono is specified as fixed width font, Osaka used instead Fixed w/o introducing a performance regression. Add early check for Osaka-Mono to avoid expensive call into WebKit. Reviewed by Vicki. * kwq/KWQFont.mm: (QFont::isFixedPitch): 2005-02-17 Darin Adler <darin@apple.com> Reviewed by Kevin. - fixed <rdar://problem/4011210> REGRESSION (180-181): Maxlength property for INPUT object not working * kwq/KWQTextField.mm: (-[KWQTextField textView:shouldChangeTextInRange:replacementString:]): If controller returns YES, go on to call super, since super does the text formatter handling, which we need. (-[KWQSecureTextField textView:shouldChangeTextInRange:replacementString:]): Ditto. (-[KWQSearchField textView:shouldChangeTextInRange:replacementString:]): Ditto. === Safari-187 === 2005-02-17 Ken Kocienda <kocienda@apple.com> Reviewed by Hyatt Fix for this bug: <rdar://problem/4012058> Copy from quoted text and paste results in blue text The relatively-new paste code tries hard to retain style of the content from the source location. However, in the case of quoted material in mail messages, we do not want to carry the quoting color along. This fixes the problem by factoring out such colors. * khtml/editing/htmlediting.cpp: (khtml::ReplacementFragment::computeStylesAndRemoveUnrendered): Now calls removeBlockquoteColorsIfNeeded() to fix bug. (khtml::ReplacementFragment::removeBlockquoteColorsIfNeeded): New function. Factors out colors that are the result of text being quoted. (khtml::isNodeRendered): Function moved in file. No other change. (khtml::isProbablyBlock): Function moved in file. No other change. (khtml::closestMailBlockquote): New function. Helps fix bug. (khtml::isMailBlockquote): Function moved to be free-floating instead of being a member of CompositeEditCommand. No other change. * khtml/editing/htmlediting.h: Moved around some functions. Added removeBlockquoteColorsIfNeeded(). * khtml/editing/markup.cpp: Remove redundant static implementation of isMailBlockquote. 2005-02-17 Richard Williamson <rjw@apple.com> Fixed <rdar://problem/4008163> dynamic support for -apple-dashboard-region is flakey Style operator== wasn't including regions. Reviewed by Darin. * khtml/rendering/render_style.cpp: (StyleCSS3NonInheritedData::operator==): 2005-02-17 Adele Amchan <adele@apple.com> Reviewed by Chris. fix for <rdar://problem/4010028> 8A383: Safari v185 crash loading united.com multi city fare finder page. * khtml/dom/dom_string.cpp: (DOM::DOMString::operator += ): prevent nil dereference when DOMString being added is nil 2005-02-17 Jens Alfke <jens@apple.com> Reviewed by Hyatt. Fix for rdar://3963151 "Mail only pasted ~950 of 1407 text lines into my message!" Force tokenizer to run synchronously while parsing document fragments, so it doesn't stop halfway through and cause truncated content. * khtml/html/html_elementimpl.cpp: (HTMLElementImpl::createContextualFragment): * khtml/html/htmltokenizer.cpp: (khtml::HTMLTokenizer::reset): (khtml::HTMLTokenizer::begin): (khtml::HTMLTokenizer::setForceSynchronous): (khtml::HTMLTokenizer::continueProcessing): * khtml/html/htmltokenizer.h: 2005-02-17 Ken Kocienda <kocienda@apple.com> Reviewed by Hyatt Fix for this bug: <rdar://problem/3982183> Mail's HTML paragraphs appear with unintended margins in Entourage and Eudora * khtml/editing/htmlediting.cpp: (khtml::createDefaultParagraphElement): Change element we make from <p> to <div>. This fixes the problem, as these other mailers show <div> elements without margins. Some test files needed to change to preserve the ability to "eyeball" the results. Many others changed just because their <p> elements changed to <div> elements. * layout-tests/editing/deleting/delete-3928305-fix-expected.txt * layout-tests/editing/deleting/delete-at-paragraph-boundaries-002-expected.txt * layout-tests/editing/inserting/insert-div-013-expected.txt * layout-tests/editing/inserting/insert-div-013.html * layout-tests/editing/inserting/insert-div-014-expected.txt * layout-tests/editing/inserting/insert-div-014.html * layout-tests/editing/inserting/insert-div-018-expected.txt * layout-tests/editing/inserting/insert-div-018.html * layout-tests/editing/inserting/insert-div-019-expected.txt * layout-tests/editing/inserting/insert-div-019.html * layout-tests/editing/inserting/insert-div-020-expected.txt * layout-tests/editing/inserting/insert-div-020.html * layout-tests/editing/inserting/insert-div-021-expected.txt * layout-tests/editing/inserting/insert-div-021.html * layout-tests/editing/style/remove-underline-across-paragraph-expected.txt * layout-tests/editing/style/remove-underline-across-paragraph-in-bold-expected.txt * layout-tests/editing/style/remove-underline-after-paragraph-expected.txt * layout-tests/editing/style/remove-underline-after-paragraph-in-bold-expected.txt 2005-02-17 Ken Kocienda <kocienda@apple.com> Reviewed by Hyatt Fix for this bug: <rdar://problem/3996737> REGRESSION (Mail): Copy/paste in Mail inserts returns The root cause of the problem is that a couple of pieces of code in AppKit and Mail insert newlines into markup as it is generated, and the paste code in WebCore was not smart about nodes that do not render (as is the case with these added newlines). So, the solution is to remove these unrendered nodes in the paste code in a pre-pass. Fortunately, my recent addition of such a pass to the paste code to handle styles gave me a convenient place to put this new logic. * khtml/editing/htmlediting.cpp: (khtml::ReplacementFragment::ReplacementFragment): Use new name for function below. (khtml::ReplacementFragment::computeStylesAndRemoveUnrendered): Name change from computeStylesForNodes(). Now does the additional work of removing unrendered nodes, as mentioned above. (khtml::isNodeRendered): New helper function. * khtml/editing/htmlediting.h: Updated as necessary. 2005-02-17 Ken Kocienda <kocienda@apple.com> Reviewed by Hyatt Fix for this bug: <rdar://problem/3998892> REGRESSION (Mail): bolding a selection from end of line changes unselected text on starting line. The styling code did not move to the next node when the starting position was at the last offset of a node. Instead, it styled it. Clearly wrong. Solution is to borrow a check from the delete algorithm. Though I call caretMaxOffset(), which I consider deprecated, it is still the simplest and most strightforward way to ask the right question for this kind of problem. * khtml/editing/htmlediting.cpp: (khtml::ApplyStyleCommand::applyInlineStyle): Fixed, as described above. * layout-tests/editing/style/style-3998892-fix-expected.txt: Added. * layout-tests/editing/style/style-3998892-fix.html: Added. 2005-02-16 Chris Blumenberg <cblu@apple.com> Fixed: <rdar://problem/3954842> Forward/reply to an HTML email can result in nothing (in cases with <link> tags for CSS) Reviewed by john. * khtml/xml/dom_nodeimpl.cpp: (NodeBaseImpl::addChild): don't call insertedIntoDocument on the added child if "this" itself is not in the document. 2005-02-16 John Sullivan <sullivan@apple.com> Written by Darin, reviewed by Maciej and me - change required to make previous checkin work with English language RSS pages * kwq/KWQKURL.h: new private method isHierarchical * kwq/KWQKURL.mm: (KURL::KURL): add hierarchical base URL check when determining whether the URL is absolute (KURL::isHierarchical): new method, returns true if this is a valid URL with a slash just past the scheme's trailing colon 2005-02-16 John Sullivan <sullivan@apple.com> Written by Darin, reviewed by me. - WebCore part of fix for <rdar://problem/4007384> FILTER: Bookmark of RSS with Japanese search word & multiple RSS pages loses filter * kwq/DOM.mm: (-[DOMElement _getURLAttribute:]): new SPI method, uses parseURL and completeURL to get valid URL from attribute value * kwq/DOMPrivate.h: declare new SPI method 2005-02-15 Maciej Stachowiak <mjs@apple.com> Reviewed by Darin. <rdar://problem/3942428> reproducible crash loading cbs.sportsline.com This change reverts the fix for <rdar://problem/3805311>, and re-fixes it in a different (better) way. Instead of preventing programmatic open from setting the parsing flag, instead make sure that programmatic close resets it. * khtml/khtml_part.cpp: (KHTMLPart::openURL): (KHTMLPart::didExplicitOpen): (KHTMLPart::closeURL): (KHTMLPart::begin): (KHTMLPart::end): (KHTMLPart::endIfNotLoading): (KHTMLPart::slotFinishedParsing): (KHTMLPart::checkEmitLoadEvent): * khtml/khtml_part.h: * khtml/khtmlpart_p.h: (KHTMLPartPrivate::KHTMLPartPrivate): * khtml/xml/dom_docimpl.cpp: (DocumentImpl::open): (DocumentImpl::implicitOpen): (DocumentImpl::close): (DocumentImpl::implicitClose): * khtml/xml/dom_docimpl.h: 2005-02-15 David Harrison <harrison@apple.com> Reviewed by Maciej. <rdar://problem/3933665> smart delete seems to delete too much after expanding selection with arrow keys Fixed by updating the selection granularity. Only byWord granularity enables smart delete, but in this case the granularity changed from byWord to byCharacter. * khtml/khtml_part.cpp: (KHTMLPart::setSelectionGranularity): * khtml/khtml_part.h: * kwq/WebCoreBridge.mm: (-[WebCoreBridge rangeByExpandingSelectionWithGranularity:]): (-[WebCoreBridge rangeByAlteringCurrentSelection:direction:granularity:]): (-[WebCoreBridge alterCurrentSelection:direction:granularity:]): 2005-02-15 David Harrison <harrison@apple.com> Reviewed by Darin. (continued) <rdar://problem/4004305> REGRESSION (Mail): Command-right-arrow on wrapped text goes to end of previous line This was supposed have been committed yesterday with the other part of the fix, but was not. * khtml/editing/visible_units.cpp: (khtml::endOfWord): 2005-02-15 Ken Kocienda <kocienda@apple.com> Reviewed by John Fix for this bug: <rdar://problem/3951178> REGRESSION (Mail): blank line lost after pasting as quotation Problem was that the blank line after the selection was getting deleted incorrectly since the paste code thought this was an unneeded placeholder rather than a placeholder outside of the selection. * khtml/editing/htmlediting.cpp: (khtml::CompositeEditCommand::removeBlockPlaceholderIfNeeded): Now calls findBlockPlaceholder. (khtml::CompositeEditCommand::findBlockPlaceholder): Moved finding code formerly in removeBlockPlaceholderIfNeeded to this new helper. (khtml::ReplaceSelectionCommand::doApply): Do not delete placeholder up front. Call findBlockPlaceholder, and delete it later if needed in the already-existing cleanup step. * khtml/editing/htmlediting.h: Add new function. New layout test. * layout-tests/editing/pasteboard/paste-text-017-expected.txt: Added. * layout-tests/editing/pasteboard/paste-text-017.html: Added. Result changed for the better. * layout-tests/editing/pasteboard/paste-text-011-expected.txt 2005-02-14 David Harrison <harrison@apple.com> Reviewed by Darin. <rdar://problem/4004305> REGRESSION (Mail): Command-right-arrow on wrapped text goes to end of previous line Reviewed by Darin. <rdar://problem/4004305> REGRESSION (Mail): Command-right-arrow on wrapped text goes to end of previous line * khtml/editing/visible_text.cpp: (khtml::SimplifiedBackwardsTextIterator::advance): Add BR in for <rdar://problem/3917929> fix only if leaving a visible text node. * khtml/editing/visible_units.cpp: (khtml::endOfWord): Do not move left over a paragraph boundary. 2005-02-14 Darin Adler <darin@apple.com> Reviewed by John. - fixed <rdar://problem/3686434> Safari uses too much RAM on file upload, leading to malloc errors and crashes (HP printers) * khtml/html/html_formimpl.cpp: (DOM::FormDataList::begin): Updated to use a list of FormDataListItem instead of QCString. (DOM::FormDataList::end): Ditto. (DOM::HTMLFormElementImpl::formData): Same here, and also use appendFile rather than appendData when we encounter a path name rather than data. (DOM::HTMLInputElementImpl::appendFormData): Use appendFile here rather than reading the file in; the reading now happens inside WebKit. (DOM::FormDataList::appendString): Updated for FormDataListItem. (DOM::FormDataList::appendFile): Added. * ForwardingHeaders/kfileitem.h: Emptied out the file; no longer includes KWQKFileItem.h. * ForwardingHeaders/netaccess.h: Emptied out the file; no longer includes KWQKIONetAccess.h. * kwq/KWQKFileItem.h: Removed. * kwq/KWQKFileItem.mm: Removed. * kwq/KWQKIONetAccess.h: Removed. * kwq/KWQKIONetAccess.mm: Removed. * WebCore.pbproj/project.pbxproj: Removed the 4 files above. - small unrelated fix (not reviewed by John) * khtml/ecma/kjs_window.cpp: (Window::isSafeScript): Put some logging code outside if statements so it works all the time. 2005-02-14 David Harrison <harrison@apple.com> Reviewed by Darin. <rdar://problem/4004305> REGRESSION (Mail): Command-right-arrow on wrapped text goes to end of previous line Fixed nextLinePosition to calculate affinity rather than take it as a parameter. Propagated the parameter change out to related methods. * khtml/editing/htmlediting.cpp: (khtml::DeleteSelectionCommand::initializePositionData): (khtml::InsertLineBreakCommand::doApply): (khtml::InsertParagraphSeparatorCommand::doApply): (khtml::InsertTextCommand::input): (khtml::ReplaceSelectionCommand::doApply): (khtml::ReplaceSelectionCommand::applyStyleToInsertedNodes): * khtml/editing/selection.cpp: (khtml::Selection::modifyExtendingRightForward): (khtml::Selection::modifyMovingRightForward): (khtml::Selection::modifyExtendingLeftBackward): (khtml::Selection::modifyMovingLeftBackward): (khtml::Selection::modify): (khtml::Selection::validate): * khtml/editing/visible_position.cpp: (khtml::visiblePositionsOnDifferentLines): * khtml/editing/visible_units.cpp: (khtml::rootBoxForLine): (khtml::startOfLine): (khtml::endOfLine): (khtml::inSameLine): (khtml::isStartOfLine): (khtml::isEndOfLine): (khtml::previousLinePosition): (khtml::nextLinePosition): (khtml::previousSentencePosition): (khtml::nextSentencePosition): (khtml::previousParagraphPosition): (khtml::nextParagraphPosition): * khtml/editing/visible_units.h: * khtml/khtml_events.cpp: (khtml::MouseEvent::offset): * khtml/khtml_part.cpp: (KHTMLPart::isPointInsideSelection): (KHTMLPart::selectClosestWordFromMouseEvent): (KHTMLPart::handleMousePressEventTripleClick): (KHTMLPart::handleMousePressEventSingleClick): (KHTMLPart::handleMouseMoveEventSelection): (KHTMLPart::khtmlMouseReleaseEvent): * khtml/rendering/render_block.cpp: (khtml::RenderBlock::positionForCoordinates): * khtml/rendering/render_block.h: * khtml/rendering/render_br.cpp: (RenderBR::positionForCoordinates): * khtml/rendering/render_br.h: * khtml/rendering/render_container.cpp: (RenderContainer::positionForCoordinates): * khtml/rendering/render_container.h: * khtml/rendering/render_inline.cpp: (RenderInline::positionForCoordinates): * khtml/rendering/render_inline.h: * khtml/rendering/render_object.cpp: (RenderObject::caretRect): (RenderObject::positionForCoordinates): * khtml/rendering/render_object.h: * khtml/rendering/render_replaced.cpp: (RenderReplaced::positionForCoordinates): * khtml/rendering/render_replaced.h: * khtml/rendering/render_text.cpp: (RenderText::positionForCoordinates): * khtml/rendering/render_text.h: * khtml/xml/dom_position.cpp: (DOM::Position::previousCharacterPosition): (DOM::Position::nextCharacterPosition): (DOM::Position::leadingWhitespacePosition): (DOM::Position::trailingWhitespacePosition): * khtml/xml/dom_position.h: * kwq/KWQAccObject.mm: (-[KWQAccObject value]): (-[KWQAccObject accessibilityAttributeValue:]): (-[KWQAccObject doAXLineForTextMarker:]): (-[KWQAccObject doAXTextMarkerRangeForLine:]): (-[KWQAccObject doAXTextMarkerForPosition:]): (-[KWQAccObject doAXLeftLineTextMarkerRangeForTextMarker:]): (-[KWQAccObject doAXRightLineTextMarkerRangeForTextMarker:]): (-[KWQAccObject doAXNextLineEndTextMarkerForTextMarker:]): (-[KWQAccObject doAXPreviousLineStartTextMarkerForTextMarker:]): * kwq/KWQKHTMLPart.mm: * kwq/WebCoreBridge.mm: (-[WebCoreBridge _visiblePositionForPoint:]): 05-02-07 Maciej Stachowiak <mjs@apple.com> Reviewed by Ken and John. Re-fixed a specific case of the following: <rdar://problem/3790449> REGRESSION (Mail): underline behavior is flaky because of how CSS handles text-decoration Oddly, Cmd-B, Cmd-U, type some text, return, Cmd-U, Cmd-B, type some text, worked fine. But hitting the second Cmd-B before the second Cmd-U still failed to remove underlining. The reason for this is that our code to compute the style of the current position did not work when you had a typing style and were positioned right at a <br> element. For various reasons, this did not show up for bold and italic, since those are handled through the font manager. The following change fixes this - for elements that can't have children, we add the dummy span after the element of interest, rather than as a child of it. * khtml/khtml_part.cpp: (KHTMLPart::selectionComputedStyle): 2005-02-11 David Harrison <harrison@apple.com> Reviewed by Darin. <rdar://problem/3978980> Double Clicking on a line in Mail selected the entire body * khtml/editing/visible_units.cpp: (khtml::startOfWord): (khtml::endOfWord): Pay attention to being at the end of a paragraph. (khtml::previousLinePosition): (khtml::nextLinePosition): (khtml::endOfParagraph): Use DOWNSTREAM per recent affinity changes. 2005-02-11 Richard Williamson <rjw@apple.com> Fixed <rdar://problem/3985118> DOM objects not being marshaled on JS->native calls Re-factored how 'native' wrappers for JS objects are created. The interpreter now creates these wrappers. The WebCore subclass of the interpreter now overrides createLanguageInstanceForValue() and creates a DOM ObjC wrapper for DOM objects. * WebCore.pbproj/project.pbxproj: * khtml/ecma/kjs_binding.cpp: (ScriptInterpreter::createLanguageInstanceForValue): * khtml/ecma/kjs_binding.h: * kwq/DOMUtility.mm: Added. (KJS::ScriptInterpreter::createObjcInstanceForValue): * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::getAppletInstanceForView): (getInstanceForView): (KWQKHTMLPart::getEmbedInstanceForView): (KWQKHTMLPart::getObjectInstanceForView): 2005-02-11 Chris Blumenberg <cblu@apple.com> Fixed: <rdar://problem/3937352> Quote level not maintained when copied and pasted within a Mail message Reviewed by harrison. * khtml/editing/markup.cpp: (khtml::isMailBlockquote): new (khtml::createMarkup): retain the Mail quote level by including all ancestor mail block quotes * khtml/rendering/render_block.cpp: (khtml::RenderBlock::positionForCoordinates): default to downstream for the affinity since the affinity is only upstream when the cursor is clicked to the right of a wrapped line * khtml/rendering/render_text.cpp: (RenderText::positionForCoordinates): ditto 2005-02-11 Adele Amchan <adele@apple.com> Reviewed by Darin. fix for <rdar://problem/4004004> no need to add body element for xml documents In the fix for <rdar://problem/3758785> we decided to add a body element when closing a document to ensure that the onload handler would fire. This is unnecessary for xml documents, so now we also check to see if we're dealing with an html document before adding the body element. * khtml/xml/dom_docimpl.cpp: (DocumentImpl::close): 2005-02-11 Adele Amchan <adele@apple.com> Reviewed by Darin. * layout-tests/apple-only/base/www.excite.com/index-expected.txt: updates tests because of custom tag change. * layout-tests/apple-only/base/www.msnbc.com/index-expected.txt: * layout-tests/apple-only/base/www.time.com/index-expected.txt: * layout-tests/apple-only/base/www.travelocity.com/index-expected.txt: * layout-tests/apple-only/base/www.zdnet.com/index-expected.txt: * layout-tests/fast/overflow/003-expected.txt: * layout-tests/fast/js/window-object-cross-frame-calls-expected.txt: updated test because of added Body (see rdar://problem/3758785) === Safari-186 === 2005-02-11 Darin Adler <darin@apple.com> Reviewed by John. - fixed <rdar://problem/3915449> paths are relative to the old src URL after document.open, which is supposed to clear the document, including the URL * khtml/xml/dom_docimpl.h: Added a new openInternal function for use by KHTMLPart. * khtml/xml/dom_docimpl.cpp: (DocumentImpl::open): Changed to do everything we did before, but also clear the URL and set the base URL based on the enclosing document. This is the basic JavaScript/DOM operation of opening a document, which is supposed to clear the document, including the URL. In the long run we might want to do even more document "resetting and clearing" in here, but this URL clearing is what's needed now to fix the most important problem. (DocumentImpl::openInternal): Moved the old open code in here, except for the "parsing" check, which is unnecessary and inappropriate in the one place we call this. * khtml/khtml_part.cpp: (KHTMLPart::begin): Call openInternal instead of open. 2005-02-10 Ken Kocienda <kocienda@apple.com> Reviewed by Hyatt Fix for this bug: <rdar://problem/3992092> 8A374: Mail crash while pasting - RemoveNodeCommand * khtml/editing/htmlediting.cpp: (khtml::ReplaceSelectionCommand::doApply): Code tried to remove a node that was no longer in the document. We try to do a good job of detecting all these cases, and generally do. This one was missed. Fixed. 2005-02-10 Darin Adler <darin@apple.com> Reviewed by Harrison. - added support needed to fix <rdar://problem/3991225> Format->Style->Underline menu item does not get checked when selected text is underlined * kwq/WebCoreBridge.h: Added selectionHasStyle: method. * kwq/WebCoreBridge.mm: (-[WebCoreBridge selectionHasStyle:]): Added. Calls selectionHasStyle on the part. 2005-02-10 Darin Adler <darin@apple.com> Reviewed by Harrison. - fixed <rdar://problem/3990484> cursor changes to I-beam when moving over text in widgets, even when selection off via CSS * khtml/khtmlview.cpp: (KHTMLView::viewportMouseMoveEvent): Changed code to check canSelect when deciding whether to show an I-beam cursor. * khtml/rendering/render_object.h: Added canSelect. * khtml/rendering/render_object.cpp: (selectStartNode): Added. Helper function with the guts of shouldSelect. (RenderObject::canSelect): Added. Like shouldSelect, but does not call the "start selecting" event handler. (RenderObject::shouldSelect): Refactored to use selectStartNode. * khtml/css/cssvalues.c: Regnerated with newer gperf. 2005-02-10 David Hyatt <hyatt@apple.com> Fix for 3867759, .mac regression where scrollers don't show up. Make sure you can set the .width and .height properties on the Image object. Reviewed by John Sullivan * khtml/ecma/kjs_html.cpp: (ImageConstructorImp::construct): (Image::getValueProperty): (Image::putValue): (Image::Image): * khtml/ecma/kjs_html.h: 2005-02-10 Ken Kocienda <kocienda@apple.com> Reviewed by Chris Fix for this bug: <rdar://problem/3965158> Drag-n-drop within a rich text message sometimes changes the color of the dragged text This change fixes the bug....and much more. Now, for the first time, the paste code can do "smart merging" or "smooshing" of styles during its operation. Since this new code is actively, rather than passively working with styles, it fixes the bug, and lays the groundwork for similar work we need to do to preserve quote levels in Mail. * khtml/css/css_valueimpl.cpp: (DOM::CSSMutableStyleDeclarationImpl::clear): New method. (DOM::CSSMutableStyleDeclarationImpl::removeBlockProperties): Ditto. (DOM::CSSMutableStyleDeclarationImpl::removePropertiesInSet): Ditto. (DOM::operator==): Add operator for CSSProperty. * khtml/css/css_valueimpl.h: Declare new functions. * khtml/editing/htmlediting.cpp: (khtml::isEmptyStyleSpan): Improved the test in this function, rolling together the old implementation with some code that did this work inline elsewhere. Sum of the parts is better than either test was by itself. (khtml::isStyleSpan): Check for ID_SPAN. (khtml::ApplyStyleCommand::removeCSSStyle): Call isEmptyStyleSpan. This was the place with an inline implementation before. (khtml::ReplacementFragment::ReplacementFragment): Now takes a DocumentImpl argument. No longer does a "default style" check, but rather calls functions which do a similar check to that, and much more. (khtml::ReplacementFragment::~ReplacementFragment): Deref document, and computed styles. (khtml::ReplacementFragment::styleForNode): New helper. Looks up and returns computed style for a node. (khtml::ReplacementFragment::removeNodePreservingChildren): New helper. (khtml::ReplacementFragment::computeStylesForNodes): New function which computes the "desired" style for every node in the fragment. This information is used later after paste is done as a reference for testing what styles need to be added, and which can be removed as redundant, from all the nodes inserted by the replacement code. (khtml::ReplacementFragment::removeStyleNodes): Clears out all style nodes from the fragment. They are no longer needed after the call to computeStylesForNodes(), (khtml::ReplaceSelectionCommand::ReplaceSelectionCommand): Add a document to the call to initialize the command's ReplacementFragment. (khtml::ReplaceSelectionCommand::doApply): Call applyStyleToInsertedNodes() after inserting nodes to make styles come out right. (khtml::ReplaceSelectionCommand::applyStyleToInsertedNodes): This is the "style smooshing" function. It computes the styles that need to be added to each node inserted, comparing the style it gets from just being inserted into its correct destination with the computed "desired style" done in the ReplacementFragment constructor. It then adds in all the necessary styles, and will also remove redundant styles. * khtml/editing/htmlediting.h: Update declarations and member variables as needed. * khtml/editing/markup.cpp: (khtml::startMarkup): Add additional style annotations to the markup we generate, so that paste code can preserve it. (khtml::markup): Ditto. (khtml::createMarkup): Ditto. These test results are subtly better with this change. They no longer have an unneeded empty span. Visually the same as before. * layout-tests/editing/style/remove-underline-across-paragraph-expected.txt * layout-tests/editing/style/remove-underline-across-paragraph-in-bold-expected.txt * layout-tests/editing/style/remove-underline-expected.txt * layout-tests/editing/style/remove-underline-from-stylesheet-expected.txt New tests: * layout-tests/editing/style/smoosh-styles-001-expected.txt * layout-tests/editing/style/smoosh-styles-002-expected.txt * layout-tests/editing/style/smoosh-styles-001.html * layout-tests/editing/style/smoosh-styles-002.html 2005-02-10 Darin Adler <darin@apple.com> Reviewed by Adele. - fixed <rdar://problem/3974988> WebHTMLView drops scroll wheel events when deltas are 0 * kwq/WebCoreScrollView.m: (-[WebCoreScrollView autoforwardsScrollWheelEvents]): Added, for Tiger only. For Tiger, removed the override of scrollWheel:, which doesn't work quite right because of how the delta attributes return all 0 for newfangled scrolling events from the new trackpads. 2005-02-10 David Harrison <harrison@apple.com> Reviewed by Darin. <rdar://problem/3991532> REGRESSION (Mail): Triple-click on trailing blank line should select previous line but doesn't * khtml/css/cssvalues.c: (hash_val): (findValue): * khtml/editing/selection.cpp: (khtml::Selection::validate): Do moral equiavalent of LeftWordIfOnBoundary for PARAGRAPH. 2005-02-10 David Harrison <harrison@apple.com> Reviewed by Darin. <rdar://problem/3991848> Double-click on first character selects wrong item * khtml/editing/selection.cpp: (khtml::Selection::validate): Honor the fact that clicking on a character positions the cursor on the left side of the character. 2005-02-10 David Hyatt <hyatt@apple.com> Fix for 3980778, repro crash in RootInlineBox::paint. Make sure that when merging blocks we dirty them for layout up front. That way as we do the merge, we dont attempt to examine the lines in dirtyLinesForChangedChild. Reviewed by mjs * khtml/rendering/render_block.cpp: (khtml::RenderBlock::removeChild): 2005-02-10 David Hyatt <hyatt@apple.com> Fix for 3987010, fix a bug that caused the self-collapsing-block-cleared-float bit to never get set correctly. Reviewed by mjs * khtml/rendering/render_block.h: (khtml::RenderBlock::MarginInfo::setSelfCollapsingBlockClearedFloat): 2005-02-10 David Hyatt <hyatt@apple.com> Fix for 3992440, text not wrapping correctly on half moon bay web site. Refine an incorrect optimization I added to be less restrictive. Reviewed by mjs * khtml/rendering/render_block.cpp: (khtml::RenderBlock::layoutBlockChildren): 2005-02-08 Maciej Stachowiak <mjs@apple.com> Reviewed by Darin. <rdar://problem/3977973> pages on ebay leak referenced JavaScript objects -- over time browsing becomes super-slow I fixed this by removing all event listeners for a document, it's children, and any disconnected nodes that used to be in the document at document detach time. Mozilla temporarily disables event listeners on such nodes, but re-enables them if you re-parant a node into a new document. However, in WebCore, you can't re-parent a node into another document, so there is no observable change in behavior. We have to do this to break the possible reference cycles between event listeners and the dom nodes they are attached to (e.g. via scope chain, as in this case). * khtml/xml/dom_docimpl.cpp: (DocumentImpl::detach): (DocumentImpl::removeAllEventListenersFromAllNodesx): (DocumentImpl::registerDisconnectedNodeWithEventListeners): (DocumentImpl::unregisterDisconnectedNodeWithEventListeners): (DocumentImpl::removeAllDisconnectedNodeEventListeners): * khtml/xml/dom_docimpl.h: * khtml/xml/dom_nodeimpl.cpp: (NodeImpl::~NodeImpl): (NodeImpl::addEventListener): (NodeImpl::removeEventListener): (NodeImpl::removeAllEventListeners): (NodeImpl::removeHTMLEventListener): (NodeImpl::insertedIntoDocument): (NodeImpl::removedFromDocument): * khtml/xml/dom_nodeimpl.h: 2005-02-09 Chris Blumenberg <cblu@apple.com> Fixed: <rdar://problem/3999213> Sometimes 2 Windows Media Player plugin instances are loaded Reviewed by hyatt. * khtml/html/html_objectimpl.cpp: (HTMLObjectElementImpl::attach): Set needWidgetUpdate to false before calling updateWidget because updateWidget may cause this method or another method (which also calls updateWidget) to be called. (HTMLObjectElementImpl::recalcStyle): ditto 2005-02-09 David Harrison <harrison@apple.com> Reviewed by Darin. <rdar://problem/3937447> Mail-689: Arrow key navigation in new message body stops working when a line ends with a bold word Added affinity to VisiblePosition. Changed Selection code to use affinity more. (Partial) <rdar://problem/3982096> editing/pasteboard/paste-text-007 is failing Changed ReplaceSelectionCommand to also pay attention to the top children of the incoming fragment, not just the very last node inserted, when deciding whether to insert a paragraph for the Apple interchange newline. * khtml/ecma/kjs_window.cpp: (SelectionFunc::tryCall): * khtml/editing/htmlediting.cpp: (khtml::EditCommandPtr::setStartingSelection): (khtml::EditCommandPtr::setEndingSelection): (khtml::EditCommand::setStartingSelection): (khtml::EditCommand::setEndingSelection): (khtml::CompositeEditCommand::deleteInsignificantTextDownstream): (khtml::CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessary): (khtml::ApplyStyleCommand::splitTextAtStartIfNeeded): (khtml::ApplyStyleCommand::splitTextAtEndIfNeeded): (khtml::ApplyStyleCommand::splitTextElementAtStartIfNeeded): (khtml::ApplyStyleCommand::splitTextElementAtEndIfNeeded): (khtml::ApplyStyleCommand::mergeStartWithPreviousIfIdentical): (khtml::ApplyStyleCommand::mergeEndWithNextIfIdentical): (khtml::ApplyStyleCommand::joinChildTextNodes): (khtml::DeleteSelectionCommand::initializePositionData): (khtml::DeleteSelectionCommand::handleGeneralDelete): (khtml::DeleteSelectionCommand::calculateTypingStyleAfterDelete): (khtml::DeleteSelectionCommand::doApply): (khtml::InsertLineBreakCommand::doApply): (khtml::InsertParagraphSeparatorCommand::doApply): (khtml::InsertParagraphSeparatorInQuotedContentCommand::doApply): (khtml::InsertTextCommand::input): (khtml::MoveSelectionCommand::doApply): (khtml::ReplaceSelectionCommand::ReplaceSelectionCommand): (khtml::ReplaceSelectionCommand::~ReplaceSelectionCommand): (khtml::ReplaceSelectionCommand::doApply): (khtml::ReplaceSelectionCommand::completeHTMLReplacement): (khtml::ReplaceSelectionCommand::updateNodesInserted): (khtml::TypingCommand::deleteKeyPressed): (khtml::TypingCommand::forwardDeleteKeyPressed): (khtml::TypingCommand::markMisspellingsAfterTyping): * khtml/editing/htmlediting.h: * khtml/editing/selection.cpp: (khtml::Selection::Selection): (khtml::Selection::init): (khtml::Selection::moveTo): (khtml::Selection::modifyExtendingRightForward): (khtml::Selection::modifyMovingRightForward): (khtml::Selection::modifyExtendingLeftBackward): (khtml::Selection::modifyMovingLeftBackward): (khtml::Selection::modify): (khtml::Selection::xPosForVerticalArrowNavigation): (khtml::Selection::clear): (khtml::Selection::setBase): (khtml::Selection::setExtent): (khtml::Selection::setBaseAndExtent): (khtml::Selection::layout): (khtml::Selection::validate): * khtml/editing/selection.h: (khtml::Selection::startAffinity): (khtml::Selection::endAffinity): (khtml::Selection::baseAffinity): (khtml::Selection::extentAffinity): (khtml::operator==): * khtml/editing/text_affinity.h: (khtml::): * khtml/editing/visible_position.cpp: (khtml::VisiblePosition::VisiblePosition): (khtml::VisiblePosition::init): (khtml::VisiblePosition::initUpstream): (khtml::VisiblePosition::initDownstream): (khtml::VisiblePosition::next): (khtml::VisiblePosition::previous): (khtml::startVisiblePosition): (khtml::endVisiblePosition): * khtml/editing/visible_position.h: (khtml::VisiblePosition::): (khtml::VisiblePosition::VisiblePosition): (khtml::VisiblePosition::affinity): (khtml::VisiblePosition::setAffinity): (khtml::operator==): * khtml/editing/visible_units.cpp: (khtml::previousBoundary): (khtml::nextBoundary): (khtml::startOfLine): (khtml::endOfLine): (khtml::previousLinePosition): (khtml::nextLinePosition): (khtml::startOfParagraph): (khtml::endOfParagraph): (khtml::previousParagraphPosition): (khtml::nextParagraphPosition): (khtml::startOfBlock): (khtml::endOfBlock): (khtml::startOfDocument): (khtml::endOfDocument): * khtml/editing/visible_units.h: * khtml/khtml_part.cpp: (KHTMLPart::findTextNext): (KHTMLPart::selectClosestWordFromMouseEvent): (KHTMLPart::handleMousePressEventTripleClick): (KHTMLPart::handleMousePressEventSingleClick): (KHTMLPart::handleMouseMoveEventSelection): (KHTMLPart::khtmlMouseReleaseEvent): (KHTMLPart::selectAll): (KHTMLPart::computeAndSetTypingStyle): (KHTMLPart::selectionComputedStyle): * khtml/rendering/render_br.cpp: (RenderBR::positionForCoordinates): * khtml/xml/dom_docimpl.cpp: (DocumentImpl::updateSelection): * khtml/xml/dom_nodeimpl.cpp: (NodeBaseImpl::setFocus): * khtml/xml/dom_position.cpp: (DOM::Position::previousCharacterPosition): (DOM::Position::nextCharacterPosition): * khtml/xml/dom_position.h: * kwq/KWQAccObject.mm: (-[KWQAccObject value]): (-[KWQAccObject visiblePositionForStartOfTextMarkerRange:]): (-[KWQAccObject visiblePositionForEndOfTextMarkerRange:]): (-[KWQAccObject accessibilityAttributeValue:]): (-[KWQAccObject doAXLineForTextMarker:]): (-[KWQAccObject doAXTextMarkerRangeForLine:]): (-[KWQAccObject doAXTextMarkerForPosition:]): (-[KWQAccObject doAXLeftLineTextMarkerRangeForTextMarker:]): (-[KWQAccObject doAXRightLineTextMarkerRangeForTextMarker:]): (-[KWQAccObject doAXNextWordEndTextMarkerForTextMarker:]): (-[KWQAccObject doAXPreviousWordStartTextMarkerForTextMarker:]): (-[KWQAccObject doAXNextLineEndTextMarkerForTextMarker:]): (-[KWQAccObject doAXPreviousLineStartTextMarkerForTextMarker:]): (-[KWQAccObject doSetAXSelectedTextMarkerRange:]): * kwq/KWQAccObjectCache.mm: (KWQAccObjectCache::textMarkerForVisiblePosition): (KWQAccObjectCache::visiblePositionForTextMarker): * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::findString): (KWQKHTMLPart::advanceToNextMisspelling): (KWQKHTMLPart::styleForSelectionStart): (KWQKHTMLPart::baseWritingDirectionForSelectionStart): (KWQKHTMLPart::setSelectionFromNone): (KWQKHTMLPart::respondToChangedSelection): * kwq/WebCoreBridge.mm: (-[WebCoreBridge setSelectedDOMRange:affinity:]): (-[WebCoreBridge selectionAffinity]): (-[WebCoreBridge setMarkDOMRange:]): (-[WebCoreBridge _visiblePositionForPoint:]): (-[WebCoreBridge moveDragCaretToPoint:]): (-[WebCoreBridge editableDOMRangeForPoint:]): (-[WebCoreBridge ensureSelectionVisible]): (-[WebCoreBridge rangeOfCharactersAroundCaret]): 2005-02-09 Chris Blumenberg <cblu@apple.com> Fixed: <rdar://problem/3985211> Seed: Mail: Drag-and-drop destination indicator / insertion point disappears Reviewed by kocienda. * khtml/rendering/render_block.cpp: (khtml::RenderBlock::paintCaret): new (khtml::RenderBlock::paintObject): call paintCaret for the cursor caret and the drag caret * khtml/rendering/render_block.h: === Safari-185 === 2005-02-08 Ken Kocienda <kocienda@apple.com> Reviewed by John Fix for this bug: <rdar://problem/3996344> Entire document content is deleted when only the first paragraph was supposed to be Problem stems from my attempt to fix this bug: <rdar://problem/3986155> Insertion point goes to beginning of doc after deleting. I added an "optimization" that proved to do more harm than good. So, basically, the fix is to remove code. * khtml/editing/htmlediting.cpp: (khtml::DeleteSelectionCommand::handleGeneralDelete) 2005-02-07 Darin Adler <darin@apple.com> Reviewed by Kevin. - fixed <rdar://problem/3890352> REGRESSION (125-170, Panther-only): pasted textarea contents disappear (exception in NSText) * kwq/KWQTextArea.mm: (-[KWQTextArea tile]): Don't resize the text view immediately here. Use performWithDelay to defer it to avoid the re-entrancy that bothers the Panther version of NSTextView. On Tiger, leave the code alone. 2005-02-07 Adele Amchan <adele@apple.com> Reviewed by Darin. Fix for <rdar://problem/3993628> REGRESSION (180-181): Logitelnet bank's website doesn't work This fixes an oversight in the fix for <rdar://problem/3964286>. We're now making sure there is a document before calling checkCompleted in slotLoaderRequestDone. That function is called even when other parts finish loads of their subresources, so we could end up calling checkCompleted before we had a document. We also looked over all the other calls to checkCompleted to convince ourselves no other call sites had a similar issue. * khtml/khtml_part.cpp: (KHTMLPart::slotLoaderRequestDone): Check if doc is nil before calling checkCompleted. 2005-02-07 Ken Kocienda <kocienda@apple.com> Reviewed by Darin Fix for this bug: <rdar://problem/3953302> Replacing quoted text ends up with blue-colored text that is not quoted * khtml/editing/htmlediting.cpp: (khtml::DeleteSelectionCommand::doApply): Removed special case delete code for select all. It was causing as many bugs as it fixed. What's more, the design concept is a bit shaky. By removing this special case, the bug goes away. * khtml/editing/htmlediting.h: Remove declaration. Test results using selectAll() updated to reflect changed behavior. * layout-tests/editing/deleting/delete-3775172-fix-expected.txt: * layout-tests/editing/deleting/delete-select-all-001-expected.txt: * layout-tests/editing/deleting/delete-select-all-003-expected.txt: * layout-tests/editing/inserting/insert-3654864-fix-expected.txt: * layout-tests/editing/inserting/insert-3775316-fix-expected.txt: * layout-tests/editing/inserting/insert-3851164-fix-expected.txt: * layout-tests/editing/inserting/insert-3907422-fix-expected.txt: * layout-tests/editing/pasteboard/paste-text-015-expected.txt: 2005-02-06 Darin Adler <darin@apple.com> Reviewed by Ken. - fixed <rdar://problem/3994164> setting a new style attribute with setAttribute("style") doesn't blow away the old style * khtml/css/css_valueimpl.h: Renamed parseProperty to parseDeclaration, since it's used to parse an entire style declaration, not a single property. * khtml/css/css_valueimpl.cpp: (DOM::CSSMutableStyleDeclarationImpl::parseDeclaration): Renamed, and added code to clear m_values. * khtml/html/html_elementimpl.cpp: (HTMLElementImpl::parseHTMLAttribute): Call function by its new name, and remove some unnecessary comments. 2005-02-06 Darin Adler <darin@apple.com> Reviewed by Maciej. - fixed <rdar://problem/3993722> need oncut and onpaste handlers implemented for <textarea> (needed for widgets) * kwq/KWQTextArea.mm: (-[KWQTextAreaTextView dispatchHTMLEvent:]): Added. (-[KWQTextAreaTextView cut:]): Dispatch "before cut" and "cut" events. (-[KWQTextAreaTextView copy:]): Dispatch "before copy" and "copy" events. (-[KWQTextAreaTextView paste:]): Dispatch "before paste" and "paste" events. (-[KWQTextAreaTextView pasteAsPlainText:]): Ditto. (-[KWQTextAreaTextView pasteAsRichText:]): Ditto. 2005-02-06 Darin Adler <darin@apple.com> Reviewed by Maciej. - fixed <rdar://problem/3943038> <input type=search> that is focused in onload handler doesn't have a visible editor * khtml/xml/dom_docimpl.cpp: (DocumentImpl::setFocusNode): Always update layout before giving focus to a widget. This prevents the bad case where we give a widget focus before it has been positioned or sized, causing us to exercise edge cases AppKit doesn't handle well. * kwq/KWQTextField.mm: (-[KWQTextFieldController initWithTextField:QLineEdit:]): Remove workaround code I added to fix bug 3943049. Updating the layout fixes the same problem in a cleaner, safer way, and solves another problem, with the way the clip view is set up. 2005-02-06 Darin Adler <darin@apple.com> Reviewed by Maciej. - fixed <rdar://problem/3425232> textarea won't trigger onchange action when clicking to new field * khtml/rendering/render_form.h: Added new m_dirty data member. * khtml/rendering/render_form.cpp: (RenderTextArea::RenderTextArea): Initialize m_dirty to false. (RenderTextArea::detach): Call value() on the DOM element to cause it to fetch the value from this object. (RenderTextArea::handleFocusOut): Ditto. Also send the onchange event based only on the m_dirty flag. (RenderTextArea::updateFromElement): Clear the m_dirty flag if the edited value is blown away by a value that comes from the DOM element. Remove code to clear the element's m_dirtyvalue flag; that's an unnecessary optimization, and ideally we'll stop having code in the render object that knows about that flag later. (RenderTextArea::slotTextChanged): Set the m_dirty flag. 2005-02-06 Darin Adler <darin@apple.com> Reviewed by Maciej. - re-fixed <rdar://problem/3760910> please add support for custom tag names in HTML * khtml/xml/dom_docimpl.cpp: (DocumentImpl::tagId): Use ID_LAST_TAG + 1 for the ID of the first assigned tag ID. Before we'd use ID_LAST_TAG, which resulted in the same number being used for ID_COMMENT and the first custom tag. (DocumentImpl::tagName): Use ID_LAST_TAG + 1, as above. (DocumentImpl::namespaceURI): Change a < ID_LAST_TAG to <= ID_LAST_TAG in the same spirit as above. 2005-02-06 Darin Adler <darin@apple.com> Reviewed by Maciej. - fixed <rdar://problem/3986639> Crash occurs after choosing Undo Typing from the Edit menu * kwq/KWQTextArea.mm: (-[KWQTextArea viewWillMoveToWindow:]): Remove actions from undo manager when the view is removed from the window. Unfortunately, to do this the code has to know that the target of NSTextView actions will be the text storage object, but given the NSText architecture, that's pretty clear. 2005-02-05 Chris Blumenberg <cblu@apple.com> Fixed: <rdar://problem/3991974> REGRESSION: www.jabra.com world location screen does not work Reviewed by hyatt. * kwq/KWQKJavaAppletWidget.mm: (KJavaAppletWidget::KJavaAppletWidget): fallback to the document's base URL if there is no baseURL attribute * kwq/WebCoreBridge.h: * kwq/WebCoreBridge.mm: (-[WebCoreBridge baseURL]): new 2005-02-04 David Harrison <harrison@apple.com> Reviewed by Darin. Rolled out Ken's accidental checkin when committing <rdar://problem/3986155> fix yesterday. * khtml/editing/selection.cpp: (khtml::Selection::validate): 2005-02-04 Adele Amchan <adele@apple.com> Reviewed by Darin. Fix for <rdar://problem/3758785> Safari no longer works at BankOfAmerica online banking for military users When closing the document, if a body doesn't exist we now create one. This bug was preventing the onload handler from firing in cases where there wasn't a body. In the BankOfAmerica case, the page was just a bit of script where the onload handler redirected to the correct page. * khtml/xml/dom_docimpl.cpp: (DocumentImpl::close): 2005-02-03 Ken Kocienda <kocienda@apple.com> Reviewed by Chris Fix for this bug: <rdar://problem/3986155> Insertion point goes to beginning of doc after deleting * khtml/editing/htmlediting.cpp: (khtml::DeleteSelectionCommand::setStartNode): New convenience to handle reference counting when setting. (khtml::DeleteSelectionCommand::handleGeneralDelete): This contains the crux of the bug fix. Improve tests that detect when a selected node needs to be retained, rather than deleted, to preserve the intent of the user. This has the side effect of causing the insertion point placement code to succeed rather than fail. Before this fix, the failure of the insertion point placement code caused the insertion point to jump to the start of the document, which is the symptom that can be perceived by users when editing. * khtml/editing/htmlediting.h: Add setStartNode declaration. * khtml/editing/visible_units.cpp: (khtml::startOfBlock): This function had a stubbed-in non-tested implementation. Implement and * layout-tests/editing/deleting/delete-at-paragraph-boundaries-001-expected.txt: Added. * layout-tests/editing/deleting/delete-at-paragraph-boundaries-001.html: Added. * layout-tests/editing/deleting/delete-at-paragraph-boundaries-002-expected.txt: Added. * layout-tests/editing/deleting/delete-at-paragraph-boundaries-002.html: Added. * layout-tests/editing/deleting/delete-at-paragraph-boundaries-003-expected.txt: Added. * layout-tests/editing/deleting/delete-at-paragraph-boundaries-003.html: Added. * layout-tests/editing/deleting/delete-at-paragraph-boundaries-004-expected.txt: Added. * layout-tests/editing/deleting/delete-at-paragraph-boundaries-004.html: Added. * layout-tests/editing/deleting/delete-at-paragraph-boundaries-005-expected.txt: Added. * layout-tests/editing/deleting/delete-at-paragraph-boundaries-005.html: Added. * layout-tests/editing/deleting/delete-at-paragraph-boundaries-006-expected.txt: Added. * layout-tests/editing/deleting/delete-at-paragraph-boundaries-006.html: Added. === Safari-183 === 2005-02-03 Richard Williamson <rjw@apple.com> Fixed <rdar://problem/3987419> Stocks and Weather leak what appears to XMLHTTPRequest results XMLHTTPRequests were causing massive leaks. _webcore_initWithHeaderString: did funky things with self replacement. Re-wrote to use more traditional factory constructor avoiding self replacement. Reviewed by David Harrison. * kwq/KWQLoader.mm: (+[NSDictionary _webcore_dictionaryWithHeaderString:]): (KWQServeRequest): (KWQServeSynchronousRequest): 2005-02-03 Chris Blumenberg <cblu@apple.com> Fixed: <rdar://problem/3938763> Cannot view Windows Media Player videos (soundtrack is played twice with delay) Reviewed by hyatt. * khtml/html/html_objectimpl.cpp: (HTMLObjectElementImpl::attach): set needWidgetUpdate to false right after calling updateWidget because dispatchHTMLEvent can end up calling this method again (HTMLObjectElementImpl::recalcStyle): ditto 2005-02-02 John Sullivan <sullivan@apple.com> Reviewed by Chris. - WebCore part of fix for <rdar://problem/3980651> REGRESSION (125-180): Huge number of pages printed from certain page, iFrame involved This also fixes the problems with printing from GMail, yay! * khtml/rendering/render_flow.cpp: (RenderFlow::paintLines): If the current line is taller than the entire page height (e.g. tall iFrame), don't try to avoid splitting it across pages. * kwq/WebCoreBridge.mm: (-[WebCoreBridge computePageRectsWithPrintWidthScaleFactor:printHeight:]): Handle error cases in a more obvious manner; this will cause future problems like this to print a blank page and complain to the console on debug builds, rather than print a zillionty mostly-blank pages. 2005-02-02 Chris Blumenberg <cblu@apple.com> Fixed: <rdar://problem/3960304> can't load a particular applet (at www.escape.de) unless it's the first applet to be loaded Reviewed by hyatt. * khtml/rendering/render_frames.cpp: (RenderPartObject::updateWidget): when getting the MIME type from the PARAM tag, make sure the MIME type is the text from the left of the semi-colon if there is one. We do this elsewhere as well. 2005-02-02 Chris Blumenberg <cblu@apple.com> Fixed: <rdar://problem/3983628> control-click on WebView is not selecting the word under the cursor (Mail, non-editable WebView) Reviewed by rjw. * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::sendContextMenuEvent): check if SPI to always enable selecting closest word is enabled * kwq/WebCoreBridge.h: 2005-02-02 Ken Kocienda <kocienda@apple.com> Reviewed by me * khtml/editing/markup.cpp: (khtml::createMarkup): Removed debug spam I committed earlier in error. 2005-02-02 Ken Kocienda <kocienda@apple.com> Reviewed by Darin Fix for this bug: <rdar://problem/3823109> WebKit should support -toggleBaseWritingDirection: (bidi editing support) Since base writing direction is a paragraph-level property in AppKit, and we use the CSS direction property in WebCore, which can be applied to inline elements as well as blocks, a new notion has been added to the WebCore apply style logic. It is now possible to force all properties in a style declaration to be applied as though they were block properties. * khtml/editing/htmlediting.cpp: (khtml::ApplyStyleCommand::ApplyStyleCommand): Add an enum and a flag to this command that controls whether to force all properties in the style to be applied as block styles. Default is "no", retaining previous behavior. (khtml::ApplyStyleCommand::doApply): Switch on new flag to apply styles as before, or force all preoperties to be applied as block styles. * khtml/editing/htmlediting.h: (khtml::ApplyStyleCommand::): Add an enum and a flag, as above. * khtml/khtml_part.cpp: (KHTMLPart::applyParagraphStyle): New method to force application of all style properties as block styles. * khtml/khtml_part.h: Update header declarations. * kwq/KWQKHTMLPart.h: Update header declarations. * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::baseWritingDirectionForSelectionStart): Accessor to help WebKit do a toggle operation on writing direction. * kwq/WebCoreBridge.h: Update header declarations. * kwq/WebCoreBridge.mm: (-[WebCoreBridge applyParagraphStyle:withUndoAction:]): New method to force application of all style properties as block styles. (-[WebCoreBridge baseWritingDirectionForSelectionStart]): Accessor to help WebKit do a toggle operation on writing direction. Fix for this bug: <rdar://problem/3985035> REGRESSION (Mail): Text copied from wrapped line contains extra character when pasted * khtml/editing/markup.cpp: (khtml::renderedText): Add an enum and a flag to this command that controls whether to force all This is the result of an error in the code that computes the rendered text that is selected when copying. Since spaces collapse at the end of lines, and these spaces need to be copied when the selection spans line endings, code runs to compute this text. However, this code was also running incorrectly in cases where lines wrapped. I have now added the missing test to check that the selection does indeed extend to the end of the line. 2005-02-02 Ken Kocienda <kocienda@apple.com> Reviewed by Darin Fix for these bugs: <rdar://problem/3984894> REGRESSION (Mail): Command-right-arrow in reply does the wrong thing (two ways) <rdar://problem/3985130> REGRESSION (Mail): command-right-arrow in pasted RTF selects only up to tab * khtml/editing/visible_units.cpp: (khtml::endOfLine): Two separate problems in this new function recently added to take the place of selectionForLine. In the first, endOfLine did not stop at BR elements, and returned the position beyond them. In the second, the VisiblePosition constructor gives the wrong answer in certain cases. Darin is going to work on a solution for that problem. In the meantime, I can fix the symptom of this bug by going down to the last leaf child of the root line box; a one line change we will roll out when Darin's fix is in. 2005-02-01 Richard Williamson <rjw@apple.com> Fixed <rdar://problem/3985535> QT Plug-in JavaScript support now fails in <embed> tag only case Reviewed by Maciej. * khtml/ecma/kjs_html.cpp: (KJS::HTMLDocument::tryGet): 2005-02-01 John Sullivan <sullivan@apple.com> Written by Darin, reviewed and tested by me - fixed <rdar://problem/3969684> Panther-only: extra blank lines between pasted content from Blot * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::attributedString): don't emit paragraph breaks if the margins are tiny; matches what we do for plain-text conversion === Safari-182 === 2005-02-01 Ken Kocienda <kocienda@apple.com> Reviewed by John Fix for this bug: <rdar://problem/3985160> Deficiencies in pasting architecture blocking progress on other bugs * khtml/editing/html_interchange.h: Move style span text used to mark element added to add style to this header. * khtml/editing/htmlediting.cpp: (khtml::styleSpanClassString): Change to use constant moved to html_interchange.h. (khtml::isStyleSpan): New helper function. Checks if this is a span we added to apply style. (khtml::CompositeEditCommand::insertNodeBefore): Added an assert to check that the node we are inserting before is not the body. (khtml::CompositeEditCommand::insertNodeAfter): Ditto, but check is for after. (khtml::ReplacementFragment::ReplacementFragment): Added code to process the "default style" that is added by the copy code. (khtml::ReplaceSelectionCommand::ReplaceSelectionCommand): first and last nodes inserted are now member variables instead of function locals. Initialize them here. (khtml::ReplaceSelectionCommand::~ReplaceSelectionCommand): Deref first and last nodes inserted if necessary. (khtml::ReplaceSelectionCommand::doApply): Change design to fix the bug. Major change is to separate out the code that inserts nodes into the tree so additional styling checks can be done in a centralized way. Also got rid of the notion of "merging into the end block." That concept was just wrong. (khtml::ReplaceSelectionCommand::completeHTMLReplacement): Tweak interface now that first and last nodes inserted are member variables. (khtml::ReplaceSelectionCommand::insertNodeAfterAndUpdateNodesInserted): New helper used by replace code to do the stated DOM operation and update state internal to the command. This will also be a catch point to handle the kinds of additional style checks needed to make paste work right. (khtml::ReplaceSelectionCommand::insertNodeAtAndUpdateNodesInserted): Ditto. (khtml::ReplaceSelectionCommand::insertNodeBeforeAndUpdateNodesInserted): Ditto. (khtml::ReplaceSelectionCommand::updateNodesInserted): Ditto. * khtml/editing/htmlediting.h: Update declarations as needed. * khtml/editing/markup.cpp: (khtml::createMarkup): Adds a "default style" span to the content written to the pasteboard. This will help us to fix some of the bugs blocked by the bug above. * khtml/xml/dom_nodeimpl.cpp: (NodeImpl::lastDescendent): New helper. * khtml/xml/dom_nodeimpl.h: Ditto. * khtml/xml/dom_position.cpp: (DOM::Position::upstream): Fixed a bug which would allow the upstream position returned to be in unrendered content. (DOM::Position::downstream): Ditto. * layout-tests/editing/deleting/delete-3775172-fix-expected.txt: Ending positions tweaked due to changes in upstream() and downstream() functions. * layout-tests/editing/inserting/insert-3851164-fix-expected.txt: Ditto * layout-tests/editing/inserting/insert-3907422-fix-expected.txt: Ditto * layout-tests/editing/selection/extend-by-character-006-expected.txt: Ditto * layout-tests/editing/pasteboard/paste-text-003-expected.txt: Changed what we expect, given new behavior of paste code. 2005-01-31 John Sullivan <sullivan@apple.com> Reviewed by Dave Hyatt. - fixed <rdar://problem/3983097> Tabbing on RSS pages gets stuck in search field with "full keyboard navigation" off * kwq/KWQSlider.h: * kwq/KWQSlider.mm: (QSlider::focusPolicy): Implemented this method for KWQSlider. It is needed for our widget subclasses that can become focused in some situations. I missed this when fixing 3949203 because it only comes into play when tab-to-controls is on, and because the other relevant methods are objective-C methods. 2005-01-31 David Harrison <harrison@apple.com> Reviewed by Darin. <rdar://problem/3964164> AXWebArea needs to unregister on going invisible * khtml/xml/dom_docimpl.cpp: (DocumentImpl::detach): Detach the AX UIElement for the AXWebArea. 2005-01-31 David Harrison <harrison@apple.com> Reviewed by Darin <rdar://problem/3850876> AX: button exposed as only an AXImage at http://appleseed.apple.com/ site (<input type=image>) * khtml/rendering/render_form.h: (khtml::RenderImageButton::isImageButton): New. * khtml/rendering/render_image.h: (khtml::RenderImage::isImageButton): New. * kwq/KWQAccObject.mm: (-[KWQAccObject isImageButton]): (-[KWQAccObject actionElement]): (-[KWQAccObject role]): (-[KWQAccObject accessibilityActionNames]): (-[KWQAccObject accessibilityPerformAction:]): Represent RenderImageButton elements as buttons instead of images. 2005-01-31 David Harrison <harrison@apple.com> Prevent nil dereference in debug code. * khtml/xml/dom_nodeimpl.cpp: (NodeImpl::displayTree): Stop when parent is 0, too. 2005-01-31 John Sullivan <sullivan@apple.com> Reviewed by Dave Hyatt. - fixed <rdar://problem/3949203> cannot tab to, within, or out of the RSS sidebar * kwq/KWQSlider.mm: (-[KWQSlider becomeFirstResponder]): (-[KWQSlider resignFirstResponder]): (-[KWQSlider nextKeyView]): (-[KWQSlider previousKeyView]): (-[KWQSlider canBecomeKeyView]): (-[KWQSlider nextValidKeyView]): (-[KWQSlider previousValidKeyView]): Copied these methods from KWQButton. The lack of special handling for first-responder-ness here was causing the focus to get "stuck" on the RSS page's slider widget. Added FIXME about how it would be nice to share more of this code rather than replicating it in each KWQ widget subclass. 2005-01-31 Darin Adler <darin@apple.com> Reviewed by Harrison. - fixed <rdar://problem/3980066> Double-click on single character moves insertion point to previous line * khtml/khtml_part.cpp: (KHTMLPart::selectClosestWordFromMouseEvent): Set affinity too. (KHTMLPart::handleMousePressEventTripleClick): Ditto. (KHTMLPart::handleMouseMoveEventSelection): Ditto. (KHTMLPart::khtmlMouseReleaseEvent): Ditto. * khtml/editing/selection.cpp: (khtml::Selection::modifyExtendingRightForward): Use endOfLine and endOfDocument. (khtml::Selection::modifyMovingRightForward): Ditto. (khtml::Selection::modifyExtendingLeftBackward): Use startOfLine and startOfDocument. (khtml::Selection::modifyMovingLeftBackward): Ditto. (khtml::Selection::validate): Rewrote the section that handles double-click. Two main fixes: 1) use isStartOfLine to check for another case where we want to select the word to the right, and 2) use isEndOfParagraph, which seems to work correctly in cases where isLastVisiblePositionInParagraph is giving the wrong answer. Also changed the line code to use startOfLine/endOfLine and the document code to use startOfDocument/endOfDocument. 2005-01-31 Darin Adler <darin@apple.com> Reviewed by Harrison. - fixed <rdar://problem/3935275> unexpected quit scrolling over link; last.fm (works in IE and Firefox) * kwq/WebCoreBridge.mm: (-[WebCoreBridge elementAtPoint:]): By using the correct document, fix the crash reported here. The page still crashes when you close the browser window, but it's not trivial to fix so I'll file a new bug after that. 2005-01-31 Darin Adler <darin@apple.com> Reviewed by Ken and Harrison. - fixed <rdar://problem/3947901> REGRESSION (Mail): Pasting paragraph of rich text leaves insertion point before pasted text - fixed <rdar://problem/3949790> hitting return after underlined line results in too much or too little underlined - fixed <rdar://problem/3981759> nil-deref and crash when pasting just a paragraph break - fixed a couple problems I discovered while working with bug 3949790 * khtml/editing/htmlediting.cpp: (khtml::ApplyStyleCommand::applyInlineStyle): Pass StayInBlock to upstream. Without this, we end up going too far upstream in the test case in bug 3949790. (khtml::ApplyStyleCommand::removeInlineStyle): Pass StayInBlock to upstream and downstream. Same reason as above. (khtml::ReplaceSelectionCommand::doApply): Update endPos if inserting a new node and endPos is using that node's parent and an offset past the node being inserted. That change fixes a problem with the position of the insertion point after pasting into the top level of a document (from test cases in 3947901 and 3949790). When setting insertionPos, use code that works when lastNodeInserted is a block rather than a text node. That change fixes a problem where a newline is not added when pasting an entire paragraph into the end of a document (from test case in 3949790). Added nil check before checking if lastNodeInserted is a <br> element, which fixes the crash when pasting just a paragraph break. * khtml/editing/visible_units.h: Filled out the set of calls to add some boolean checks for lines (needed for the bug fix), and calls for blocks (not yet implemented), and documents. The document checks may need refinement to properly handle documents with a mix of editable and non-editable content, but for now they just refactor code and make things a little clearer. Also removed the "include line break" parameter from endOfSentence. * khtml/editing/visible_units.cpp: (khtml::rootBoxForLine): Added. (khtml::startOfLine): Added. Algorithm taken from selectionForLine in selection.cpp. (khtml::endOfLine): Ditto. (khtml::inSameLine): Added. (khtml::isStartOfLine): Added. (khtml::isEndOfLine): Added. (khtml::endOfSentence): Removed "include line break" parameter. (khtml::inSameParagraph): Added a null check. (khtml::isStartOfParagraph): Ditto. (khtml::isEndOfParagraph): Ditto. (khtml::startOfBlock): Added. (khtml::endOfBlock): Added. (khtml::inSameBlock): Added. (khtml::isStartOfBlock): Added. (khtml::isEndOfBlock): Added. (khtml::startOfDocument): Added. (khtml::endOfDocument): Added. (khtml::inSameDocument): Added. (khtml::isStartOfDocument): Added. (khtml::isEndOfDocument): Added. 2005-01-30 Darin Adler <darin@apple.com> Reviewed by John. - fixed <rdar://problem/3977000> form data set posted for <input type="image" ...> omits name/value pair * khtml/html/html_formimpl.cpp: (DOM::HTMLInputElementImpl::appendFormData): Append a name/value pair for type IMAGE in addition to the X/Y coordinates. 2005-01-30 Darin Adler <darin@apple.com> Reviewed by John. - fixed <rdar://problem/3974246> REGRESSION (125-180): popup menus are missing item text on Harmony Remote web site * khtml/html/html_formimpl.cpp: (DOM::HTMLOptionElementImpl::text): Change this function to traverse the entire tree and gather all the text rather than just looking at immediate children. * khtml/xml/dom_nodeimpl.h: Added const. * khtml/xml/dom_nodeimpl.cpp: (NodeImpl::traverseNextNode): Added const. (NodeImpl::traverseNextSibling): Ditto. (NodeImpl::traversePreviousNodePostOrder): Ditto. (NodeImpl::detach): Add a missing nil check. 2005-01-30 Darin Adler <darin@apple.com> Reviewed by John. - fixed <rdar://problem/3864536> crash copying text from other apps and pasting in a sticky in dashboard * khtml/editing/markup.cpp: (khtml::createFragmentFromText): Added missing ref/deref of newly created element. 2005-01-28 Darin Adler <darin@apple.com> * khtml/css/cssproperties.c: Regenerated with newer gperf. 2005-01-28 David Harrison <harrison@apple.com> Reviewed by John Sullivan. <rdar://problem/3968144> AX need to be able to focus an AXLink by setting AXFocused to true * kwq/KWQAccObject.mm: (-[KWQAccObject accessibilityPerformAction:]): (-[KWQAccObject accessibilityIsAttributeSettable:]): Add AXFocused for AXLinks. 2005-01-28 David Harrison <harrison@apple.com> Reviewed by Darin. <rdar://problem/3584942> AX: Safari Accessibility parent-child mismatch Use AppKit SPI _accessibilityParentForSubview to return KWQAccObject parent of AppKit AX object. * kwq/KWQAccObject.mm: (-[KWQAccObject _accessibilityParentForSubview:]): New. 2005-01-27 Adele Amchan <adele@apple.com> fixed by Darin, reviewed by me. <rdar://problem/3976314> REGRESSION (180-TOT): submitting password fields fail on Panther * kwq/KWQTextField.mm: (-[KWQTextFieldController string]): on panther, the secure text field's editor does not contain the real string, so now we just call stringValue on the field in that case. 2005-01-26 Maciej Stachowiak <mjs@apple.com> Reviewed by Darin, Hyatt and Ken. <rdar://problem/3790449> REGRESSION (Mail): underline behavior is flaky because of how CSS handles text-decoration * khtml/css/css_computedstyle.cpp: (DOM::CSSComputedStyleDeclarationImpl::getPropertyCSSValue): Add support for -khtml-text-decorations-in-effect property. This works like text-docration but follows proper inline semantics, that is, if a parent is causing text decoration then -khtml-text-decorations-in-effect on this element will reflect that. * khtml/css/cssproperties.in: Add -khtml-text-decorations-in-effect property. * khtml/css/cssproperties.h: regenerated * khtml/css/cssvalues.c: regenerated * khtml/css/cssparser.cpp: regenerated * khtml/css/cssproperties.c: regenerated * khtml/css/css_valueimpl.h: Made copyPropertiesInSet public. * khtml/editing/htmlediting.cpp: (khtml::StyleChange::init): Handle -khtml-text-decorations-in-effect specially, translate to text-decoration (khtml::ApplyStyleCommand::applyInlineStyle): Fix a comment. (khtml::ApplyStyleCommand::removeInlineStyle): Add new way of pushing down text-decoration styles around the edges of the selected range. (khtml::ApplyStyleCommand::pushDownTextDecorationStyleAroundNode): Helper for this. (khtml::ApplyStyleCommand::pushDownTextDecorationStyleAtBoundaries): ditto (khtml::ApplyStyleCommand::nodeFullyUnselected): ditto (khtml::hasTextDecorationProperty): ditto (khtml::highestAncestorWithTextDecoration): ditto (khtml::ApplyStyleCommand::extractTextDecorationStyle): ditto (khtml::ApplyStyleCommand::extractAndNegateTextDecorationStyle): ditto (khtml::ApplyStyleCommand::applyTextDecorationStyle): ditto * khtml/editing/htmlediting.h: Prototype new methods. * khtml/editing/jsediting.cpp: Make underline execCommand use the new CSS property. - as a necessary part of the fix, fixed the longstanding problem that mutating an element's inlineStyleDecl would not property update its style attribute. now it does. * khtml/css/css_valueimpl.cpp: (DOM::CSSMutableStyleDeclarationImpl::setChanged): If this is an inline style declaration, tell the element it's style attribute needs updating. * khtml/html/html_elementimpl.cpp: (HTMLElementImpl::invalidateStyleAttribute): New method, just calls down to the dom element. (HTMLElementImpl::updateStyleAttribute): Regenerate style attribute from inline style declaration. * khtml/html/html_elementimpl.h: Prototype new stuff. * khtml/xml/dom_elementimpl.cpp: (ElementImpl::ElementImpl): Initialize new attribute. (ElementImpl::updateStyleAttributeIfNeeded): New method to check if the style is dirty and this is an html element, and if so call the html element to regenerate the style attribute. (ElementImpl::attributes): update style if needed (ElementImpl::getAttribute): ditto (ElementImpl::hasAttributes): ditto (ElementImpl::dump): ditto (XMLElementImpl::cloneNode): ditto * khtml/xml/dom_elementimpl.h: (DOM::ElementImpl::isStyleAttributeValid): new method to manage style attr dirty bit (DOM::ElementImpl::setStyleAttributeValid): ditto - added new layout tests for underlining: * layout-tests/editing/editing.js: * layout-tests/editing/style/remove-underline-across-paragraph-expected.txt: Added. * layout-tests/editing/style/remove-underline-across-paragraph-in-bold-expected.txt: Added. * layout-tests/editing/style/remove-underline-across-paragraph-in-bold.html: Added. * layout-tests/editing/style/remove-underline-across-paragraph.html: Added. * layout-tests/editing/style/remove-underline-after-paragraph-expected.txt: Added. * layout-tests/editing/style/remove-underline-after-paragraph-in-bold-expected.txt: Added. * layout-tests/editing/style/remove-underline-after-paragraph-in-bold.html: Added. * layout-tests/editing/style/remove-underline-after-paragraph.html: Added. * layout-tests/editing/style/remove-underline-expected.txt: Added. * layout-tests/editing/style/remove-underline-from-stylesheet-expected.txt: Added. * layout-tests/editing/style/remove-underline-from-stylesheet.html: Added. * layout-tests/editing/style/remove-underline-in-bold-expected.txt: Added. * layout-tests/editing/style/remove-underline-in-bold.html: Added. * layout-tests/editing/style/remove-underline.html: Added. * layout-tests/editing/style/underline-expected.txt: Added. * layout-tests/editing/style/underline.html: Added. 2005-01-27 David Hyatt <hyatt@apple.com> Fix for 3875199, search field needs to be able to show a magnifying glass without a dropdown menu. Reviewed by kocienda * khtml/html/html_formimpl.cpp: (DOM::HTMLInputElementImpl::HTMLInputElementImpl): (DOM::HTMLInputElementImpl::parseHTMLAttribute): * kwq/KWQLineEdit.mm: (QLineEdit::setMaxResults): 2005-01-27 Ken Kocienda <kocienda@apple.com> Reviewed by Maciej Fix for this bug: <rdar://problem/3973254> Deletions of ranges does not coalesce correctly with subsequent typing * khtml/editing/htmlediting.cpp: (khtml::InsertTextCommand::deleteCharacter): Remove this dead code. (khtml::ReplaceSelectionCommand::editingAction): Moved this code to a better place in the file. It was in with unrelated functions. (khtml::TypingCommand::TypingCommand): Reorganize initialization list so it is easier to read. (khtml::TypingCommand::issueCommandForDeleteKey): Remove dead code. Roll in remaining code into deleteKeyPressed. (khtml::TypingCommand::deleteKeyPressed): Add in support for carrying along smart delete flag. (khtml::TypingCommand::forwardDeleteKeyPressed): New function. Makes forward delete work like "regular" delete in terms of coalescing typing. (khtml::TypingCommand::doApply): Add case for ForwardDeleteKey. (khtml::TypingCommand::preservesTypingStyle): Ditto. * khtml/editing/htmlediting.h: (khtml::TypingCommand::): Add ForwardDeleteKey constant. Remove a couple declarations for now-dead code. (khtml::TypingCommand::smartDelete): New accessor. (khtml::TypingCommand::setSmartDelete): Ditto. * kwq/WebCoreBridge.h: * kwq/WebCoreBridge.mm: (-[WebCoreBridge deleteKeyPressedWithSmartDelete:]): Add smart delete flag. (-[WebCoreBridge forwardDeleteKeyPressedWithSmartDelete:]): New method. * khtml/editing/jsediting.cpp: Add supprt for ForwardDelete command * layout-tests/editing/editing.js: Ditto. * layout-tests/editing/deleting/delete-and-undo-expected.txt: Added. * layout-tests/editing/deleting/delete-and-undo.html: Added. * layout-tests/editing/deleting/forward-delete-expected.txt: Added. * layout-tests/editing/deleting/forward-delete.html: Added. === Safari-181 === 2005-01-27 David Harrison <harrison@apple.com> Reviewed by Ken. <rdar://problem/3962214> AX: AXLeftLineTextMarkerRangeForTextMarker returns incorrect range * kwq/KWQAccObject.mm: (-[KWQAccObject doAXRightLineTextMarkerRangeForTextMarker:]): Allowed for selection to end of line including the linebreak. 2005-01-27 David Harrison <harrison@apple.com> Reviewed by Darin, Ken. <rdar://problem/3964470> AX: Include attachments in AXAttributedStringForTextMarkerRange * kwq/KWQAccObject.mm: (-[KWQAccObject isAttachment]): (-[KWQAccObject attachmentView]): (-[KWQAccObject role]): (-[KWQAccObject subrole]): (-[KWQAccObject roleDescription]): (-[KWQAccObject value]): (-[KWQAccObject title]): (-[KWQAccObject accessibilityDescription]): (-[KWQAccObject accessibilityIsIgnored]): (-[KWQAccObject accessibilityAttributeNames]): (-[KWQAccObject accessibilityAttributeValue:]): Make attachments accessible. (CreateCGColorIfDifferent): (AXAttributeStringSetColor): (AXAttributeStringSetNumber): (AXAttributeStringSetFont): (AXAttributeStringSetStyle): (AXAttributeStringSetElement): (AXLinkElementForNode): (AXAttributedStringAppendText): (AXAttributedStringAppendReplaced): (-[KWQAccObject doAXAttributedStringForTextMarkerRange:]): Add attachments and more text attributes to AXAttributedStringForTextMarkerRange. 2005-01-27 Darin Adler <darin@apple.com> Reviewed by John. - fixed <rdar://problem/3807935> DOM CSS computed style line-height is wrong in two ways * khtml/css/css_computedstyle.cpp: (DOM::CSSComputedStyleDeclarationImpl::getPropertyCSSValue): Use specified size rather than computed size when dealing with a percentage for line height. 2005-01-27 Darin Adler <darin@apple.com> Reviewed by John. - fixed <rdar://problem/3971372> SWB: template function DOM_cast() won't compile with gcc 4.0 - fixed other gcc 4.0 compiling problems Patrick Beard pointed out on the phone * kwq/DOMInternal.h: (DOM_cast): Change the "failToCompile()" trick to use a dependent name. Nowadays, if a name is not dependent, it is checked at template definition time. But we want a failure only at template instantiation time. * ForwardingHeaders/editing/text_granularity.h: Added. Needed but a bug in the 3.3 compiler made it compile anyway without this. - other changes * khtml/html/html_miscimpl.h: For clarity, mark these functions virtual too. They are automatically virtual because the base class ones are virtual, but it's ugly to leave it this way. 2005-01-26 Ken Kocienda <kocienda@apple.com> Reviewed by Hyatt Fix for this bug: <rdar://problem/3971609> REGRESSION (Mail): up/down arrow navigation broken after rewrapping text by resizing window <rdar://problem/3975661> REGRESSION (Mail): left/right arrow navigation can place insertion point after last character on line * khtml/editing/selection.cpp: (khtml::Selection::modifyAffinity): PARAGRAPH and LINE movements should not alter affinity. This was just a mistake before when it reset to upstream in some cases. * khtml/rendering/render_line.cpp: (khtml::RootInlineBox::closestLeafChildForXPos): Move this function down from InlineBox, and rework the implementation. This fixes 3971609. * khtml/rendering/render_line.h: * khtml/rendering/render_text.cpp: (RenderText::caretRect): Rework the algorithm to fix 3975661. This regressed when we began placing the spaces on the end of lines in text boxes when lines wrap. 2005-01-26 Richard Williamson <rjw@apple.com> Fixed <rdar://problem/3972522> (179-180) 40% slowdown on iBench JavaScript test I added a member variable to ObjectImp. This changed it's size and consequently hampered the optimizations built into the garbage collector. Objects no longer fit within the allocators cell size, and thus allocation fell back to a slower allocator. As a result of this fix I also dramatically cleaned up how runtime objects are accessed. The path mostly *removes* code. Reviewed by Chris. * khtml/ecma/kjs_dom.cpp: (DOMDocumentProtoFunc::tryCall): (DOMElementProtoFunc::tryCall): (KJS::getRuntimeObject): * khtml/ecma/kjs_dom.h: * khtml/ecma/kjs_html.cpp: (KJS::HTMLDocument::tryGet): (KJS::HTMLElement::tryGet): (KJS::HTMLElement::implementsCall): (KJS::HTMLElement::call): (KJS::HTMLElement::tryPut): (KJS::HTMLCollection::tryGet): (KJS::HTMLCollection::getNamedItems): * khtml/ecma/kjs_html.h: * khtml/ecma/kjs_window.cpp: (Window::get): 2005-01-26 Richard Williamson <rjw@apple.com> Fixed <rdar://problem/3757712> REGRESSION (Mail): WebCore does not allow Devanagari ligature input For now we are using ICU UBreakIterator to determine grapheme boundaries for cursor and deletion. This does not match what Cocoa does exactly, but does match what Carbon does. The areas are difference are obscure, but, according to Deborah Goldsmith, using the UBreakIterator is the reasonable approach. Reviewed by Ken. * khtml/rendering/render_text.cpp: (RenderText::previousOffset): (RenderText::nextOffset): 2005-01-25 David Harrison <harrison@apple.com> Reviewed by Maciej and Richard. <rdar://problem/3963731> AX VO: Changing window sizes causes a crash using with Voice Over - KWQPtrDictImpl::clear * khtml/html/html_miscimpl.cpp: (HTMLCollectionImpl::HTMLCollectionImpl): Ensure that isHTMLDocument before calling HTMLDocument-only method. 2005-01-25 Richard Williamson <rjw@apple.com> Part one of fix for <rdar://problem/3757712> REGRESSION (Mail): WebCore does not allow Devanagari ligature input This patch changes the semantics of next() and previous() on VisiblePosition to move a grapheme (character cluster) at a time. This means that cursor navigation with correctly move over an entire cluster. However, the expected behavior for deleting a grapheme is to delete individual code points, thus decomposing the grapheme into it constituent parts. That will be addressed in the next part of the fix. Reviewed by Ken. * khtml/editing/visible_position.cpp: (khtml::VisiblePosition::previousPosition): (khtml::VisiblePosition::nextPosition): * khtml/editing/visible_position.h: * khtml/rendering/render_object.cpp: (RenderObject::previousOffset): (RenderObject::nextOffset): * khtml/rendering/render_object.h: * khtml/rendering/render_text.cpp: (RenderText::previousOffset): (RenderText::nextOffset): (RenderText::findNextInlineTextBox): * khtml/rendering/render_text.h: * khtml/xml/dom_nodeimpl.cpp: (NodeImpl::previousOffset): (NodeImpl::nextOffset): * khtml/xml/dom_nodeimpl.h: 2005-01-25 David Harrison <harrison@apple.com> Reviewed by Maciej. <rdar://problem/3973067> AXWebArea for http://apple.netscape.com/ has an empty AXLinkUIElements * kwq/KWQAccObject.mm: (-[KWQAccObject accessibilityAttributeValue:]): Omit ignored AXLinks from AXLinkUIElements result 2005-01-25 Ken Kocienda <kocienda@apple.com> Reviewed by John Fix for this bug: <rdar://problem/3972851> REGRESSION (179-180+): Repro crash in ApplyStyleCommand::cleanUpEmptyStyleSpans * khtml/editing/htmlediting.cpp: (khtml::ApplyStyleCommand::cleanUpEmptyStyleSpans): Added two null checks. 2005-01-25 Ken Kocienda <kocienda@apple.com> Reviewed by John Fix for this bug: <rdar://problem/3954710> Mail crashed while editing signatures - NodeImpl::isBlockFlow The fix is more general than for this one bug, and may work to fix many crashers. The problem is that the ReplaceSelectionCommand never checked whether its starting selection is empty. If it is, then we need to bail before doing the work of the command, which we need to deref the start and end points of the selection in order to do its work. I think you can see the crash potential. * khtml/editing/htmlediting.cpp: (khtml::ReplaceSelectionCommand::doApply): Assert selection is not empty. * kwq/WebCoreBridge.mm: (partHasSelection): New helper function to test that bridge has a part with a selection. Use new helper function to test part and selection; return from these function if this test fails. (-[WebCoreBridge rangeByExpandingSelectionWithGranularity:]) (-[WebCoreBridge rangeByAlteringCurrentSelection:direction:granularity:]) (-[WebCoreBridge alterCurrentSelection:direction:granularity:]) (-[WebCoreBridge rangeByAlteringCurrentSelection:verticalDistance:]) (-[WebCoreBridge alterCurrentSelection:verticalDistance:]) (-[WebCoreBridge documentFragmentWithText:]) (-[WebCoreBridge replaceSelectionWithFragment:selectReplacement:smartReplace:]) (-[WebCoreBridge insertLineBreak]) (-[WebCoreBridge insertParagraphSeparator]) (-[WebCoreBridge insertParagraphSeparatorInQuotedContent]) (-[WebCoreBridge insertText:selectInsertedText:]) (-[WebCoreBridge deleteSelectionWithSmartDelete:]) (-[WebCoreBridge ensureSelectionVisible]) 2005-01-24 Kevin Decker <kdecker@apple.com> Reviewed by Darin. Fixed <rdar://problem/3932374> REGRESSION: 'ReferenceError - Can't find variable' JavaScript error at webxpress.fidelity.com * khtml/html/html_miscimpl.h: Missing virtual identifiers for namedItem() and nextNamedItem() exposed a flaw that prevented finding variables in form [HTMLFormCollectionImpl] scopes. 2005-01-24 Vicki Murley <vicki@apple.com> Reviewed by kocienda. - fix <rdar://problem/3810661> computed style not handled for Apple extensions * khtml/css/css_computedstyle.cpp: (DOM::): (DOM::CSSComputedStyleDeclarationImpl::getPropertyCSSValue): add -apple-line-clamp and -apple-text-size-adjust 2005-01-24 Darin Adler <darin@apple.com> Reviewed by Kevin. - fixed <rdar://problem/3969884> REGRESSION (179-180): Typing password not echoed as "bullets" at paypal.com when field is first focused * kwq/KWQTextField.mm: (-[KWQTextFieldController initWithTextField:QLineEdit:]): Sizing up the form editor, which fixes things for normal fields and search fields, screws things up for password fields. Eventually, I'll need to figure out why this is and file a bug so that the AppKit team fixes it. In the mean time, just check for the case of the secure text field, and don't size up in that case. 2005-01-24 Ken Kocienda <kocienda@apple.com> Reviewed by Hyatt Fix for this bug: <rdar://problem/3963560> 8A354: Inserting Japanese text to the line head causes line break * khtml/editing/htmlediting.cpp: (khtml::ReplaceSelectionCommand::doApply): Add one more case where we merge content into the existing line. This covers the situation see using the steps to reproduce this bug. 2005-01-21 Maciej Stachowiak <mjs@apple.com> Reviewed by Darin. <rdar://problem/3967572> Editing should split elements before removing style * khtml/editing/htmlediting.cpp: (khtml::CompositeEditCommand::splitElement): (khtml::CompositeEditCommand::mergeIdenticalElements): (khtml::CompositeEditCommand::wrapContentsInDummySpan): (khtml::CompositeEditCommand::splitTextNodeContainingElement): (khtml::ApplyStyleCommand::applyInlineStyle): (khtml::ApplyStyleCommand::splitTextAtStartIfNeeded): (khtml::ApplyStyleCommand::splitTextAtEndIfNeeded): (khtml::ApplyStyleCommand::splitTextElementAtStartIfNeeded): (khtml::ApplyStyleCommand::splitTextElementAtEndIfNeeded): (khtml::areIdenticalElements): (khtml::ApplyStyleCommand::mergeStartWithPreviousIfIdentical): (khtml::ApplyStyleCommand::mergeEndWithNextIfIdentical): (khtml::ApplyStyleCommand::cleanUpEmptyStyleSpans): (khtml::ApplyStyleCommand::addInlineStyleIfNeeded): (khtml::InsertParagraphSeparatorCommand::doApply): (khtml::InsertParagraphSeparatorInQuotedContentCommand::doApply): (khtml::InsertTextCommand::prepareForTextInsertion): (khtml::SplitTextNodeCommand::doUnapply): (khtml::SplitElementCommand::SplitElementCommand): (khtml::SplitElementCommand::~SplitElementCommand): (khtml::SplitElementCommand::doApply): (khtml::SplitElementCommand::doUnapply): (khtml::MergeIdenticalElementsCommand::MergeIdenticalElementsCommand): (khtml::MergeIdenticalElementsCommand::~MergeIdenticalElementsCommand): (khtml::MergeIdenticalElementsCommand::doApply): (khtml::MergeIdenticalElementsCommand::doUnapply): (khtml::WrapContentsInDummySpanCommand::WrapContentsInDummySpanCommand): (khtml::WrapContentsInDummySpanCommand::~WrapContentsInDummySpanCommand): (khtml::WrapContentsInDummySpanCommand::doApply): (khtml::WrapContentsInDummySpanCommand::doUnapply): (khtml::SplitTextNodeContainingElementCommand::SplitTextNodeContainingElementCommand): (khtml::SplitTextNodeContainingElementCommand::~SplitTextNodeContainingElementCommand): (khtml::SplitTextNodeContainingElementCommand::doApply): * khtml/editing/htmlediting.h: New layout test that shows the side benefit of this. * layout-tests/editing/style/unbold-in-bold-expected.txt: Added. * layout-tests/editing/style/unbold-in-bold.html: Added. 2005-01-24 Darin Adler <darin@apple.com> Reviewed by John. - fixed <rdar://problem/3933435> -[DOMRange cloneContents] sometimes alters the original DOMRange * khtml/xml/dom2_rangeimpl.cpp: (DOM::RangeImpl::processContents): Fixed code that was collapsing the range after processing the contents. That's right for extract and delete, but not clone. - fixed <rdar://problem/3714184> inline input works incorrectly when I type Korean slowly in textfield in form on www.google.co.kr - fixed <rdar://problem/3193848> Can't enter SSN to sign up for Chase visa online account (changing focus inside key press handler) - fixed <rdar://problem/3874683> REGRESSION (161-162): Crash after typing command-Z to undo after pasting text with newline in it into a text field <input type=text> * kwq/KWQLineEdit.mm: (QLineEdit::text): Changed to call a new string method on the controller instead of calling stringValue, since stringValue has a bad side effect of ending inline input. (QLineEdit::selectAll): Changed to only call selectText: when the field is already selected. When you are giving the field focus, it automatically gets all selected, and this change is required in the case where we defer the focus change. * kwq/KWQTextField.h: Added a new string method to the controller. * kwq/KWQTextField.mm: (-[KWQTextFieldController setMaximumLength:]): Call the new string method instead of using stringValue. (-[KWQTextFieldController controlTextDidChange:]): Removed the code to truncate at the first CR or LF. That's now handled in the shouldChangeTextInRange method instead. (-[KWQTextFieldController textView:shouldHandleEvent:]): Add new logic to defer responder changes until after the event is handled. This makes sure the key gets into the field that's already handling it at rather than ending up in the newly-focused field if the key press handler focuses a different element. (-[KWQTextFieldController textView:didHandleEvent:]): Turn off deferral here, now that the key press has been handled. (-[KWQTextFieldController string]): Added. Calls stringValue only if there's no editor. If there is an editor, calls string on that instead. (-[KWQTextFieldController textView:shouldChangeTextInRange:replacementString:]): Added. Called by the three field subclasses. Truncates incoming strings at the first CR or LF character. This works properly with Undo, and the old technique did not. (-[KWQTextFieldController preprocessString:]): Added. Helper used for all the setStringValue methods so they all truncate at the first CR or LF as well as truncating to the appropriate length. (-[KWQTextField setStringValue:]): Changed to call the controller. (-[KWQTextField textView:shouldChangeTextInRange:replacementString:]): Added. Calls the controller. (-[KWQSecureTextField setStringValue:]): More of the same. (-[KWQSecureTextField textView:shouldChangeTextInRange:replacementString:]): Ditto. (-[KWQSearchField setStringValue:]): Ditto. (-[KWQSearchField textView:shouldChangeTextInRange:replacementString:]): Ditto. * kwq/KWQWidget.h: Added the new setDeferFirstResponderChanges function. * kwq/KWQWidget.mm: (QWidget::~QWidget): Clear out the deferredFirstResponder global just in case we are destroyed while we "have the ball". (QWidget::hasFocus): If we are in the deferred mode, use the global to decide who to say is focused. (QWidget::setFocus): If we are in the deferred mode, set the global instead of making something be the first responder. (QWidget::setDeferFirstResponderChanges): Set the boolean. If the boolean is being cleared, then get the deferred first responder and call setFocus on it again, which will do the work we didn't want to do earlier. 2005-01-24 Ken Kocienda <kocienda@apple.com> Reviewed by John Fix for this bug: <rdar://problem/3964350> Deleting all content and typing in a message gets one letter, then beeps This is a problem with the way we turn key events, when a user starts typing, into editing commands. Right now, that initial delete key in an empty window is turned into an editing command, and much editing code runs that need not run. What's more, this is confusing the selection machinery. The solution is to detect the "delete in an empty window" case and don't turn this into an editing command at all. * khtml/editing/htmlediting.cpp: (khtml::TypingCommand::deleteKeyPressed) 2005-01-23 Adele Amchan <adele@apple.com> Fixed <rdar://problem/3964286> REGRESSION (178-179): menus and "go to old site" link at Ameritrade's new site don't work Removed check for document from checkCompleted. In this case, WebCore never knew that a WebImageView was complete because it fell into this document check case in checkCompleted. Added check for document to tokenizerProcessedData (see <rdar://problem/3807144>) Reviewed by Darin. * khtml/khtml_part.cpp: (KHTMLPart::stop): (KHTMLPart::checkCompleted): * khtml/khtml_part.h: * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::tokenizerProcessedData): 2005-01-21 Richard Williamson <rjw@apple.com> Fixed <rdar://problem/3759399> Javascript / Liveconnect problems ((event handler):Undefined value) Java applets specified with <object> or <embed> weren't scriptable. Now they are. Reviewed by Chris. * khtml/html/html_objectimpl.cpp: (HTMLEmbedElementImpl::getEmbedInstance): (HTMLObjectElementImpl::getObjectInstance): 2005-01-21 Ken Kocienda <kocienda@apple.com> Reviewed by John Fix for this bug: <rdar://problem/3959464> REGRESSION (Mail): Insertion point goes back to beginning of document after deleting * khtml/editing/htmlediting.cpp: (khtml::DeleteSelectionCommand::handleGeneralDelete): Add special case to handle retaining a fully-selected block. This fixes the bug. * layout-tests/editing/deleting/delete-3959464-fix-expected.txt: Added. * layout-tests/editing/deleting/delete-3959464-fix.html: Added. 2005-01-21 Richard Williamson <rjw@apple.com> Fixed <rdar://problem/3966998> REGRESSION(179-TOT) clicking on gmail message brings me to blank screen getElementById() sometimes returns Undefined() instead of Null(). Reviewed by Hyatt. * khtml/ecma/kjs_dom.cpp: (DOMDocumentProtoFunc::tryCall): 2005-01-21 David Hyatt <hyatt@apple.com> Fix for 3773809, make sure that overflow regions never end up at an invalid scroll offset because of a layout change. Reviewed by kocienda * khtml/rendering/render_layer.cpp: (RenderLayer::updateScrollInfoAfterLayout): 2005-01-21 David Hyatt <hyatt@apple.com> Fix for 3966349, hang loading page. Make sure that loops using popOneBlock properly check for a null blockStack to avoid an infinite loop. Reviewed by kocienda * khtml/html/htmlparser.cpp: (KHTMLParser::parseToken): (KHTMLParser::insertNode): (KHTMLParser::popInlineBlocks): 2005-01-21 Ken Kocienda <kocienda@apple.com> Reviewed by John Fix for this bug: <rdar://problem/3957204> Mail crashed when sending a message in ~InsertParagraphSeparatorInQuotedContentCommand * khtml/editing/htmlediting.cpp: (khtml::InsertParagraphSeparatorInQuotedContentCommand::InsertParagraphSeparatorInQuotedContentCommand): InsertParagraphSeparatorInQuotedContentCommand has this member variable: DOM::ElementImpl *m_breakNode; I failed to initialize this variable to null in the constructor, and there is an uncommonly-traveled code path which does not set this variable to something good. In the destructor, we check for null, and deref if non-null. Obvious "BOOM" potential. Fixed. 2005-01-21 Ken Kocienda <kocienda@apple.com> Reviewed by John Fix for this bug: <rdar://problem/3966311> REGRESSION (Mail): Hitting return makes space character disappear * khtml/editing/htmlediting.cpp: (khtml::InsertParagraphSeparatorCommand::doApply): When writing the code to insert a block in response to the return key, I did not write code to cover the case described in the bug. Now I have. * layout-tests/editing/inserting/insert-div-025-expected.txt: Added. * layout-tests/editing/inserting/insert-div-025.html: Added. 2005-01-20 Maciej Stachowiak <mjs@apple.com> Reviewed by Ken. <rdar://problem/3965196> security fix for javascript: exploit missed one case (already fixed in updates) * khtml/ecma/kjs_window.cpp: (WindowFunc::tryCall): correct mistake in earlier fix for the following bug, caught by Adele: 2005-01-20 Maciej Stachowiak <mjs@apple.com> Reviewed by Ken. <rdar://problem/3965466> editing needs to insert text before applying typing style * khtml/editing/htmlediting.cpp: (khtml::ApplyStyleCommand::addInlineStyleIfNeeded): Remove a FIXME comment. (khtml::InsertLineBreakCommand::doApply): Apply style to the BR node after inserting it. (khtml::InsertTextCommand::prepareForTextInsertion): Don't try to apply style to any new nodes created before inserting. (khtml::InsertTextCommand::input): Apply style to the inserted range after doing the text insert. * khtml/editing/htmlediting.h: This change leads to improved results on one of the layout tests: * layout-tests/editing/inserting/insert-div-024-expected.txt: === Safari-180 === 2005-01-20 Ken Kocienda <kocienda@apple.com> Reviewed by John Fix for this bug: <rdar://problem/3964646> REGRESSION (179-180): Typing space at end of line makes following paragraph disappear * khtml/editing/htmlediting.cpp: (khtml::CompositeEditCommand::removeBlockPlaceholderIfNeeded): Recent change to block placeholder removal code caused this regression. The code became too aggressive in removing block placeholders, and would remove them from blocks other than the block containing the selection. * layout-tests/editing/inserting/insert-div-023-expected.txt: This file had a spurious BR element in it that I did not notice earlier. * layout-tests/editing/inserting/insert-div-024-expected.txt: Ditto. 2005-01-20 David Hyatt <hyatt@apple.com> Fix for oddness on albertsons.com. Make sure not to crash when setting/removing style properties on a node with no document. The bug # is 3813900. Reviewed by john 2005-01-20 David Harrison <harrison@apple.com> Reviewed by Darin. PARTIAL fix for following bug. Create attributed string with fonts and links. Still need to add attachments. <rdar://problem/3942606> AX: Support kAXAttributedStringForTextMarkerRangeParameterizedAttribute * kwq/KWQAccObject.mm: (-[KWQAccObject textUnderElement]): Touched up previous checkin to match code review comments. (-[KWQAccObject value]): Use plainText for this one instead of obsolete attributedString. (-[KWQAccObject accessibilityParameterizedAttributeNames]): Advertise AXAttributedStringForTextMarkerRange. (AXAttributeStringAddFont): (AXAttributeStringAddElement): (-[KWQAccObject linkUIElementForNode:]): (-[KWQAccObject _addAttachmentForElement:URL:needsParagraph:usePlaceholder:]): (-[KWQAccObject accessibilityAttributedStringForRange:]): New routines to support AXAttributedStringForTextMarkerRange. (-[KWQAccObject doAXAttributedStringForTextMarkerRange:]): Use new routines instead of obsolete attributedString. 2005-01-20 David Harrison <harrison@apple.com> Reviewed by Darin. <rdar://problem/3960196> AX Crash in DOM::Range::setStartBefore * khtml/xml/dom_docimpl.cpp: (DocumentImpl::getAccObjectCache): Adjust when detecting cache in non-top level WebArea. * kwq/KWQAccObject.mm: (-[KWQAccObject textUnderElement]): (-[KWQAccObject accessibilityAttributeValue:]): Make sure the elements document is the current one for the part. 2005-01-20 Darin Adler <darin@apple.com> Reviewed by John. - fixed <rdar://problem/3922980> Mail not crashing, just quitting itself suddenly in -[WebHTMLView(MailExtras) findString:options:] * khtml/dom/dom2_range.cpp: (DOM::operator==): Handle null and detached ranges without raising exceptions. The uncaught exception would make the entire program terminate. - fixed <rdar://problem/3885729> attempting to modify a computed style does nothing, but should raise a DOM exception * kwq/DOM-CSS.mm: (-[DOMCSSStyleDeclaration setProperty:::]): Uncommented this code which I had to disable back in November because Mail was stumbling over it. - fixed <rdar://problem/3943049> focus() called during onload handler results in square text field on <input type=search> * kwq/KWQLineEdit.mm: (QLineEdit::baselinePosition): Change computation so it will work even for fields that position their text in a way that depends on vertical size. In the case of a search field, the text is centered, so the old logic was broken. * kwq/KWQTextField.mm: (-[KWQTextFieldController initWithTextField:QLineEdit:]): Set the frame size to something large enough to accomodate the field editor. If we start the frame at size 0,0 we run into AppKit trouble when it insets the frame to figure out the frame for the field editor. In the case of this bug this happens because we become first responder before being sized and positioned by the HTML layout code. - improved debugging output when using "po" from gdb with Objective-C DOM * kwq/DOM.mm: (-[DOMNode description]): Added. Includes node name ("<tr>") and node value (e.g., string for text node). (-[DOMRange description]): Tweaked format. 2005-01-19 Richard Williamson <rjw@apple.com> After further discussion with Real we have decided to NOT include the additional CLSID for the real plugin. See 3958601. Reviewed by Darin. * khtml/rendering/render_frames.cpp: (RenderPartObject::updateWidget): 2005-01-19 David Harrison <harrison@apple.com> Reviewed by Maciej. <rdar://problem/3949429> AX: word marker routines returns incorrect data for empty line Previous checkin for this bug was missing some of the patch. Editing snafu with multiple changes in tree. * kwq/KWQAccObject.mm: (-[KWQAccObject doAXRightLineTextMarkerRangeForTextMarker:]): (-[KWQAccObject doAXNextWordEndTextMarkerForTextMarker:]): (-[KWQAccObject doAXPreviousWordStartTextMarkerForTextMarker:]): (-[KWQAccObject doAXNextLineEndTextMarkerForTextMarker:]): (-[KWQAccObject doAXPreviousLineStartTextMarkerForTextMarker:]): (-[KWQAccObject doAXPreviousSentenceStartTextMarkerForTextMarker:]): (-[KWQAccObject doAXPreviousParagraphStartTextMarkerForTextMarker:]): 2005-01-19 Ken Kocienda <kocienda@apple.com> Reviewed by John * khtml/editing/htmlediting.cpp: (khtml::InsertParagraphSeparatorCommand::applyStyleAfterInsertion): Small, cosmetic change John and I decided to do on my last checkin, but I forgot to do before landing. 2005-01-19 Ken Kocienda <kocienda@apple.com> Reviewed by John Fix for this bug: <rdar://problem/3959727> REGRESSION (Mail): Style not preserved on blank lines * khtml/editing/htmlediting.cpp: (khtml::CompositeEditCommand::applyStyle): (khtml::CompositeEditCommand::insertBlockPlaceholder): New function that unconditionally adds a block placeholder. (khtml::CompositeEditCommand::insertBlockPlaceholderIfNeeded): Now returns bool based on whether placeholder was added or not. (khtml::CompositeEditCommand::removeBlockPlaceholderIfNeeded): Now searches all the descendents of a block looking for a placeholder. The old code, which just looked at the last child of a node, started missing once block placeholders became styled (which started happening with this patch). (khtml::DeleteSelectionCommand::calculateTypingStyleAfterDelete): Now handles applying typing style to a block placeholder at call time, rather than setting the typing style as a latent style that might be applied later. This is an important part of the bug fix. (khtml::DeleteSelectionCommand::doApply): Now uses bool return value from insertBlockPlaceholderIfNeeded() and passes it along to calculateStyleBeforeInsertion, so the case where a block placeholder needs to be styled can be detected. (khtml::InsertParagraphSeparatorCommand::InsertParagraphSeparatorCommand): Changed the way this class managed style. Before it would calculate and set typing style for the block added. This is not sufficient. Added blocks need to styled immediately. Some name changes to instance variables in this class due to the change to accommodate this change. (khtml::InsertParagraphSeparatorCommand::~InsertParagraphSeparatorCommand): Name changes, as above. (khtml::InsertParagraphSeparatorCommand::calculateStyleBeforeInsertion): Ditto. (khtml::InsertParagraphSeparatorCommand::applyStyleAfterInsertion): Ditto. (khtml::InsertParagraphSeparatorCommand::doApply): Ditto. (khtml::ReplaceSelectionCommand::doApply): Improve check for testing when a placeholder block can be removed in its entirety after the insertion. * khtml/editing/htmlediting.h: Update header accordingly. * khtml/khtml_part.cpp: (KHTMLPart::selectionComputedStyle): Move position for computed style check downstream before doing check when the position is in an empty block (this makes sure any style on any block placeholder is accounted for). New layout tests to check bug fix. * layout-tests/editing/style/block-style-004-expected.txt: Added. * layout-tests/editing/style/block-style-004.html: Added. * layout-tests/editing/style/block-style-005-expected.txt: Added. * layout-tests/editing/style/block-style-005.html: Added. * layout-tests/editing/style/block-style-006-expected.txt: Added. * layout-tests/editing/style/block-style-006.html: Added. Results updated to reflect new block placeholder code. * layout-tests/editing/inserting/insert-div-004-expected.txt * layout-tests/editing/inserting/insert-div-005-expected.txt * layout-tests/editing/inserting/insert-div-006-expected.txt * layout-tests/editing/inserting/insert-div-008-expected.txt * layout-tests/editing/inserting/insert-div-011-expected.txt * layout-tests/editing/inserting/insert-div-012-expected.txt * layout-tests/editing/inserting/insert-div-013-expected.txt * layout-tests/editing/inserting/insert-div-014-expected.txt * layout-tests/editing/inserting/insert-div-015-expected.txt * layout-tests/editing/inserting/insert-div-016-expected.txt * layout-tests/editing/inserting/insert-div-017-expected.txt * layout-tests/editing/inserting/insert-div-018-expected.txt * layout-tests/editing/inserting/insert-div-019-expected.txt * layout-tests/editing/inserting/insert-div-021-expected.txt * layout-tests/editing/inserting/insert-div-022-expected.txt * layout-tests/editing/inserting/insert-div-023-expected.txt * layout-tests/editing/inserting/insert-div-024-expected.txt 2005-01-19 David Hyatt <hyatt@apple.com> Dont null-check the renderer before submitting, since a script can set it to display:none and still expect the submission to occur. Fixes bug #3477282. Reviewed by kdecker (DOM::HTMLInputElementImpl::defaultEventHandler): 2005-01-18 Richard Williamson <rjw@apple.com> Fixed several issues all arising from analysis of plugin detection code at ifilm.com: Fixed <rdar://problem/3958592> can't script plug-ins if plug-in is invoked with <object> element instead of <embed> Fixed <rdar://problem/3958597> <object> elements with IDs do not show up as named properties of the document Fixed <rdar://problem/3960973> DOM objects for plugin elements are not accessible Fixed <rdar://problem/3958601> need an additional class ID in WebCore for the Real plug-in We now support accessing scriptable plugin objects that are specified with <applet>, <embed>, or <object> tags. Also, if any of these elements are named they can be accessed from the document or window objects. Finally, DOM methods are properties will be forwarded appropriately for the plugin's root scriptable object. Reviewed by Chris. * khtml/dom/html_document.cpp: (HTMLDocument::objects): * khtml/dom/html_document.h: * khtml/ecma/kjs_dom.cpp: (DOMDocumentProtoFunc::tryCall): (DOMElementProtoFunc::tryCall): (KJS::getRuntimeObject): * khtml/ecma/kjs_dom.h: * khtml/ecma/kjs_html.cpp: (KJS::HTMLDocument::tryGet): (KJS::HTMLElement::tryGet): (KJS::HTMLCollection::tryGet): (KJS::HTMLCollection::getNamedItems): * khtml/ecma/kjs_window.cpp: (Window::get): * khtml/html/html_miscimpl.cpp: (HTMLCollectionImpl::traverseNextItem): * khtml/html/html_miscimpl.h: (DOM::HTMLCollectionImpl::): * khtml/html/html_objectimpl.cpp: (HTMLAppletElementImpl::getAppletInstance): (HTMLObjectElementImpl::HTMLObjectElementImpl): (HTMLObjectElementImpl::getObjectInstance): * khtml/html/html_objectimpl.h: * khtml/rendering/render_frames.cpp: (RenderPartObject::updateWidget): * kwq/KWQKHTMLPart.h: * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::getObjectInstanceForView): 2005-01-18 David Hyatt <hyatt@apple.com> Fix for 3948123, rolling over link erases nearby text. The repaint rect check for lines was wrong whenever two lines overlapped. Reviewed by kocienda * khtml/rendering/render_flow.cpp: (RenderFlow::paintLines): 2005-01-18 Ken Kocienda <kocienda@apple.com> Reviewed by Hyatt Fix for this bug: <rdar://problem/3960116> Focus rings paint incorrectly for contenteditable blocks in web pages * khtml/rendering/render_flow.cpp: (RenderFlow::addFocusRingRects): Fix painting of focus rings so that ring only paints around outermost contenteditable elements. 2005-01-18 David Harrison <harrison@apple.com> Reviewed by Darin. <rdar://problem/3959668> accessibilityFocusedUIElement sometimes returns an ignored element; it must not * kwq/KWQAccObject.mm: (-[KWQAccObject accessibilityFocusedUIElement]): Return parentObjectUnignored if focused object is ignored. 2005-01-18 Ken Kocienda <kocienda@apple.com> Reviewed by John Fix for this bug: <rdar://problem/3952877> REGRESSION (Mail): Command-left/right-arrows don't work with file attachment * khtml/editing/selection.cpp: (khtml::nodeForInlineBox): New helper function used in reimplementation of function below. (khtml::selectionForLine): Reimplemented using line box smarts. I originally wrote this code when I had a less than full understanding of line layout. I can do better now, and my new version no longer fails to notice attachments when doing the kind of navigation mentioned in the bug. 2005-01-17 David Harrison <harrison@apple.com> Reviewed by John Sullivan. <rdar://problem/3949429> AX: word marker routines returns incorrect data for empty line <rdar://problem/3949848> AX: paragraph marker routines do not work when given a paragraph end marker Also fixed sentence support in the same way. * kwq/KWQAccObject.mm: (-[KWQAccObject doAXNextLineEndTextMarkerForTextMarker:]): (-[KWQAccObject doAXNextSentenceEndTextMarkerForTextMarker:]): (-[KWQAccObject doAXPreviousSentenceStartTextMarkerForTextMarker:]): (-[KWQAccObject doAXNextParagraphEndTextMarkerForTextMarker:]): (-[KWQAccObject doAXPreviousParagraphStartTextMarkerForTextMarker:]): Move one position in desired direction before calling visible_units.cpp code. 2005-01-17 David Harrison <harrison@apple.com> Updated expected test results. <rdar://problem/3945880> line-ending space seems not to be present * layout-tests/editing/deleting/delete-ws-fixup-001-expected.txt: * layout-tests/editing/deleting/delete-ws-fixup-002-expected.txt: * layout-tests/editing/inserting/insert-div-020-expected.txt: * layout-tests/editing/inserting/insert-div-021-expected.txt: * layout-tests/editing/inserting/insert-div-022-expected.txt: * layout-tests/editing/inserting/insert-div-023-expected.txt: * layout-tests/editing/inserting/insert-div-024-expected.txt: 2005-01-17 David Harrison <harrison@apple.com> Reviewed by Dave Hyatt (bidi.cpp) and Darin Adler (selection.cpp). <rdar://problem/3945880> line-ending space seems not to be present * khtml/editing/selection.cpp: (khtml::Selection::validate): Extend AFTER_WHITE_SPACE code to support white spac in the middle of paragraphs, not just the end. * khtml/rendering/bidi.cpp: (khtml::RenderBlock::findNextLineBreak): Pick left/rightness of word selection based on being at the end of paragraph (i.e. after a hard line break). 2005-01-17 Darin Adler <darin@apple.com> Reviewed by John Louch. - fixed <rdar://problem/3958503> need screenX and screenY to use WebKit windowFrame delegate * khtml/ecma/kjs_window.cpp: (Window::get): Change screenX and screenY to use frameGeometry instead of using mapToGlobal and screen in a complicated way. * kwq/KWQKHTMLView.mm: Removed unused mapToGlobal function. * kwq/KWQWindowWidget.h: Ditto. * kwq/KWQWindowWidget.mm: Ditto. 2005-01-17 David Hyatt <hyatt@apple.com> Fix a screwup in rightmost/lowets position computation. 3955207. Make sure floats with layers are still checked. Reviewed by kocienda * khtml/rendering/render_block.cpp 2005-01-17 Ken Kocienda <kocienda@apple.com> Reviewed by John <rdar://problem/3953366> Problems with typing attributes in HTML compose * khtml/editing/htmlediting.cpp: (khtml::DeleteSelectionCommand::calculateTypingStyleAfterDelete): Remove misguided "optimization" that tried to sense when typing style could be cleared without actually doing a style diff between before-delete and after-delete positions. Removing this extra check and running the general-purpose code fixes the bug. 2005-01-17 Richard Williamson <rjw@apple.com> Fixed <rdar://problem/3753030> Need to ensure same origin for plugin binding invocations (origin security rules) Keep track of originating execution context and target execution context for native JS object wrappers, and perform appropriate security checks. Reviewed by David Harrison. * khtml/ecma/kjs_binding.cpp: (ScriptInterpreter::isGlobalObject): (ScriptInterpreter::isSafeScript): (ScriptInterpreter::interpreterForGlobalObject): * khtml/ecma/kjs_binding.h: * khtml/ecma/kjs_window.cpp: (Window::interpreter): (Window::isSafeScript): * khtml/ecma/kjs_window.h: * kwq/DOMInternal.mm: (-[WebScriptObject _initializeScriptDOMNodeImp]): * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::windowScriptObject): (KWQKHTMLPart::windowScriptNPObject): * kwq/WebCoreBridge.mm: (rootForView): (-[WebCoreBridge init]): 2005-01-17 Ken Kocienda <kocienda@apple.com> Reviewed by John Fix for this bug: <rdar://problem/3786659> REGRESSION (Mail): editable WebViews don't work with "size up" and "size down" NSFontManager changes * khtml/css/cssparser.cpp: (CSSParser::parseValue): Add support for parsing new font size delta property. * khtml/css/cssproperties.c: Generated file. * khtml/css/cssproperties.h: Ditto. * khtml/css/cssproperties.in: Add support for parsing new font size delta property. * khtml/editing/htmlediting.cpp: (khtml::isEmptyStyleSpan): New helper function. Code existed before, but now factored out for convenient use. (khtml::CompositeEditCommand::removeNodeAttribute): Does check on value to see it exists before creating and running command to do the removal. (khtml::ApplyStyleCommand::doApply): Now calls new applyRelativeFontStyleChange() function as part of its work. (khtml::ApplyStyleCommand::applyRelativeFontStyleChange): New function that does the "heavy lifting" to handle relative font size changes. (khtml::ApplyStyleCommand::applyInlineStyle): Range check the start and end positions to make sure the start is before or equal to the end. Swap them if not true. I ran into this problem in some similar code in applyRelativeFontStyleChange(). Moving that goodness here too. (khtml::ApplyStyleCommand::splitTextAtEndIfNeeded): Uses a local variable to save a value used often. Code is the same, but reads better now. Function now returns bool as well, just like splitTextAtStartIfNeeded. I use the bool return value now (I obviously did not need it before). (khtml::ApplyStyleCommand::computedFontSize): New helper function. (khtml::ApplyStyleCommand::joinChildTextNodes): Ditto. (khtml::createStyleSpanElement): Ditto. * khtml/editing/htmlediting.h: Update header accordingly. * khtml/editing/jsediting.cpp: Add new command string to enable relative font size changes. * kwq/DOM-CSS.mm: (-[DOMCSSStyleDeclaration _fontSizeDelta]): New convenience. (-[DOMCSSStyleDeclaration _setFontSizeDelta:]): Ditto. * kwq/DOMPrivate.h: Declare new conveniences. * layout-tests/editing/editing.js: Add new JS to enable relative font size changes, as well as explicit font size setting. * layout-tests/editing/style/relative-font-size-change-001-expected.txt: Added. * layout-tests/editing/style/relative-font-size-change-001.html: Added. * layout-tests/editing/style/relative-font-size-change-002-expected.txt: Added. * layout-tests/editing/style/relative-font-size-change-002.html: Added. * layout-tests/editing/style/relative-font-size-change-003-expected.txt: Added. * layout-tests/editing/style/relative-font-size-change-003.html: Added. * layout-tests/editing/style/relative-font-size-change-004-expected.txt: Added. * layout-tests/editing/style/relative-font-size-change-004.html: Added. 2005-01-14 Darin Adler <darin@apple.com> * khtml/css/cssproperties.c: Regenerated with gperf 3.0.1. * khtml/css/cssvalues.c: Regenerated with gperf 3.0.1. * khtml/misc/htmlattrs.c: Regenerated with gperf 3.0.1. * khtml/misc/htmltags.c: Regenerated with gperf 3.0.1. 2005-01-14 Chris Blumenberg <cblu@apple.com> Fixed: <rdar://problem/3886415> arrow keys don't work when the user hits Back to return to RSS page Reviewed by hyatt. (KWQKHTMLPart::openURLFromPageCache): restore mousePressNode (KWQKHTMLPart::mousePressNode): new * kwq/KWQPageState.h: * kwq/KWQPageState.mm: (-[KWQPageState initWithDocument:URL:windowProperties:locationProperties:interpreterBuiltins:]): save the mousePressNode (-[KWQPageState clear]): clear the mousePressNode (-[KWQPageState dealloc]): deref the mousePressNode (-[KWQPageState mousePressNode]): new === Safari-179 === 2005-01-13 Vicki Murley <vicki@apple.com> Reviewed by Adele. - fix <rdar://problem/3946836> Safari about box lists 2004 instead of 2005 * WebCore.pbproj/project.pbxproj: bump "2004" to "2005" 2005-01-13 David Harrison <harrison@apple.com> Reviewed by Ken Kocienda. Better fix for 3905066. * khtml/editing/htmlediting.cpp: (khtml::InsertParagraphSeparatorCommand::doApply): 2005-01-10 Maciej Stachowiak <mjs@apple.com> Reviewed by Darin. <rdar://problem/3758033> REGRESSION (Mail): Support attributes in marked text (International input) * khtml/rendering/render_text.cpp: (InlineTextBox::paint): Support painting custom underline markers for marked text in place of generic yellow. (InlineTextBox::paintMarkedTextUnderline): New method that handles this. * khtml/rendering/render_text.h: * kwq/KWQKHTMLPart.h: Declare new methods and structs. * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::clear): Clear marked test underlines. (KWQKHTMLPart::setMarkedTextRange): Takes attributes and ranges now. (convertAttributesToUnderlines): Converts NSAttributedString attributes to simplified and C++-friendly form. (KWQKHTMLPart::markedTextUsesUnderlines): New method. (KWQKHTMLPart::markedTextUnderlines): New method. * kwq/KWQPainter.mm: (QPainter::drawLineForText): Handle pen width. * kwq/WebCoreBridge.h: * kwq/WebCoreBridge.mm: (-[WebCoreBridge setMarkedTextDOMRange:customAttributes:ranges:]): Take attributes and ranges. * kwq/WebCoreTextRenderer.h: 2005-01-12 David Harrison <harrison@apple.com> Reviewed by Dave Hyatt. <rdar://problem/3888973> AX: Parent AXWebArea of nested AXWebAreas is messed up * kwq/KWQAccObject.mm: (-[KWQAccObject addChildrenToArray:]): Use the widget's outer view. 2005-01-12 David Harrison <harrison@apple.com> Reviewed by Darin Adler. <rdar://problem/3949908> Crash when asking for the kAXLengthForTextMarkerRangeParameterizedAttribute * khtml/xml/dom_nodeimpl.cpp: (NodeImpl::displayNode): Add quotes around text node content. (NodeBaseImpl::childNode): Add nil check to return nil rather than crash when child node not found. * kwq/KWQAccObject.mm: (-[KWQAccObject doAXStringForTextMarkerRange:]): Pass range compliant positions to TextIterator. 2005-01-12 David Hyatt <hyatt@apple.com> Fix for 3951203, CSS border style incorrectly clipped on inline elements. Make sure the repaint rect set during line layout is smarter about including the overflow for both old states and new states. Reviewed by john * khtml/rendering/bidi.cpp: (khtml::RenderBlock::layoutInlineChildren): 2005-01-12 David Hyatt <hyatt@apple.com> Fix for bug 3937608, versiontracker.com flashes and displays the right column below content. Make sure to move tables/overflows that dont fit within a block only in strict mode. Fix for bug 3931049, characters dont show up when typing. Make sure to dirty the right lines when this specific case in editing is hit. Reviewed by darin (first one), kocienda (second one) * khtml/rendering/render_block.cpp: (khtml::RenderBlock::getClearDelta): * khtml/rendering/render_flow.cpp: (RenderFlow::dirtyLinesFromChangedChild): * khtml/rendering/render_line.cpp: (khtml::InlineFlowBox::verticallyAlignBoxes): 2005-01-12 Ken Kocienda <kocienda@apple.com> Reviewed by John Fix for this bug: <rdar://problem/3926142> REGRESSION (Mail): Deleting text decreases quote level * khtml/editing/htmlediting.cpp: (khtml::DeleteSelectionCommand::initializePositionData): Change test that will prevent block merging. End-of-line test was just wrong. Call new start-of and end-of paragraph functions added to visible_position files. (khtml::DeleteSelectionCommand::moveNodesAfterNode): Add tests for BR elements, which makes tests to determine when to stop moving nodes more complete and correct. Also improved comments. * khtml/editing/visible_position.cpp: (khtml::isFirstVisiblePositionInParagraph): New function. (khtml::isLastVisiblePositionInParagraph): New function. * khtml/editing/visible_position.h: Update header accordingly. * layout-tests/editing/deleting/delete-block-merge-contents-002-expected.txt: New results, slightly different from former results but still correct. * layout-tests/editing/deleting/delete-block-merge-contents-007-expected.txt: Ditto. * layout-tests/editing/deleting/delete-block-merge-contents-018-expected.txt: Added. * layout-tests/editing/deleting/delete-block-merge-contents-018.html: Added. * layout-tests/editing/deleting/delete-block-merge-contents-019-expected.txt: Added. * layout-tests/editing/deleting/delete-block-merge-contents-019.html: Added. * layout-tests/editing/deleting/delete-block-merge-contents-020-expected.txt: Added. * layout-tests/editing/deleting/delete-block-merge-contents-020.html: Added. * layout-tests/editing/deleting/delete-block-merge-contents-021-expected.txt: Added. * layout-tests/editing/deleting/delete-block-merge-contents-021.html: Added. * layout-tests/editing/deleting/delete-line-014-expected.txt: These new results are actually better, and fix a bug. 2005-01-11 Richard Williamson <rjw@apple.com> Fixed 3922875. Fall back to DOM object is EMBED element has no associated runtime object. Reviewed by Chris. * khtml/ecma/kjs_dom.cpp: (KJS::getRuntimeObject): * khtml/ecma/kjs_html.cpp: (KJS::HTMLDocument::tryGet): (KJS::HTMLElement::tryGet): (KJS::HTMLCollection::tryGet): (KJS::HTMLCollection::getNamedItems): 2005-01-11 David Hyatt <hyatt@apple.com> Fix for 3882299, missing content on gibson.com. Change our handling of " and ' in certain states of the parser to match other browsers. Reviewed by Maciej * khtml/html/htmltokenizer.cpp: (khtml::HTMLTokenizer::parseTag): 2005-01-11 Chris Blumenberg <cblu@apple.com> Fixed: <rdar://problem/3930733> Mail prints second page of email blank Reviewed by dave. * khtml/rendering/render_canvas.cpp: (RenderCanvas::paint): cache the print rect since the dirty rect can get changed during printing * khtml/rendering/render_flow.cpp: (RenderFlow::paintLines): removed null check since the print rect should never be null * khtml/rendering/render_list.cpp: (RenderListMarker::paint): ditto * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::adjustPageHeight): don't set the print rect here since this method is not called for the last page 2005-01-10 Ken Kocienda <kocienda@apple.com> Reviewed by Hyatt Fix for this bug: <rdar://problem/3943648> extra line is inserted after pressing return within quoted text of reply * khtml/editing/htmlediting.cpp: (khtml::InsertParagraphSeparatorInQuotedContentCommand::doApply): This bug was the result of a simple coding mistake. A local variable was erroneously redefined in a deeper scope, and so the result calculated in that deeper scope was not available when tested. 2005-01-10 Ken Kocienda <kocienda@apple.com> Reviewed by John Fix for this bug: <rdar://problem/3946852> Option-e goes to next line * khtml/editing/htmlediting.cpp: (khtml::ReplaceSelectionCommand::doApply): Tweak case used to determine when merging content into the start line is done. We plan to change pretty substantially soon to better handle the problem described in <rdar://problem/3937352> Quote level not maintained when copied and pasted within a Mail message. In the meantime, this change does no harm, and fixes the bug. 2005-01-10 Ken Kocienda <kocienda@apple.com> Reviewed by Darin Fix for this bug: <rdar://problem/3907005> Applying block styles to a line of text can unexpectedly affect other lines * khtml/editing/htmlediting.cpp: (khtml::CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessary): New function which moves "paragraphs" to their own blocks if needed so that a block style can be applied. (khtml::CompositeEditCommand::isMailBlockquote): Moved this function to base class so it can be used more generally. (khtml::ApplyStyleCommand::applyBlockStyle): Pass a node instead of a block to addBlockStyleIfNeeded(). (khtml::ApplyStyleCommand::addBlockStyleIfNeeded): Now accepts a node instead of a block for styling. This function also now calls moveParagraphContentsToNewBlockIfNecessary() to make sure that only the current paragraph is styled. (khtml::SetNodeAttributeCommand::doUnapply): Should not assert on undo if old value of attribute was null. Should remove attributue instead. * khtml/editing/htmlediting.h: Touch function declarations accordingly. * layout-tests/editing/style/create-block-for-style-001-expected.txt: Added. * layout-tests/editing/style/create-block-for-style-001.html: Added. * layout-tests/editing/style/create-block-for-style-002-expected.txt: Added. * layout-tests/editing/style/create-block-for-style-002.html: Added. * layout-tests/editing/style/create-block-for-style-003-expected.txt: Added. * layout-tests/editing/style/create-block-for-style-003.html: Added. * layout-tests/editing/style/create-block-for-style-004-expected.txt: Added. * layout-tests/editing/style/create-block-for-style-004.html: Added. * layout-tests/editing/style/create-block-for-style-005-expected.txt: Added. * layout-tests/editing/style/create-block-for-style-005.html: Added. * layout-tests/editing/style/create-block-for-style-006-expected.txt: Added. * layout-tests/editing/style/create-block-for-style-006.html: Added. * layout-tests/editing/style/create-block-for-style-007-expected.txt: Added. * layout-tests/editing/style/create-block-for-style-007.html: Added. * layout-tests/editing/style/create-block-for-style-008-expected.txt: Added. * layout-tests/editing/style/create-block-for-style-008.html: Added. * layout-tests/editing/style/create-block-for-style-009-expected.txt: Added. * layout-tests/editing/style/create-block-for-style-009.html: Added. * layout-tests/editing/style/create-block-for-style-010-expected.txt: Added. * layout-tests/editing/style/create-block-for-style-010.html: Added. * layout-tests/editing/style/create-block-for-style-011-expected.txt: Added. * layout-tests/editing/style/create-block-for-style-011.html: Added. * layout-tests/editing/style/create-block-for-style-012-expected.txt: Added. * layout-tests/editing/style/create-block-for-style-012.html: Added. * layout-tests/editing/style/create-block-for-style-013-expected.txt: Added. * layout-tests/editing/style/create-block-for-style-013.html: Added. Unrelated updates to these expected results. * layout-tests/editing/inserting/insert-div-007-expected.txt * layout-tests/editing/pasteboard/paste-text-013-expected.txt 2005-01-10 Chris Blumenberg <cblu@apple.com> Fixed: <rdar://problem/3936844> Mail: Messages with rich text do not print Reviewed by john. * khtml/rendering/render_flow.cpp: (RenderFlow::paintLines): don't do pagination work if printRect is not set * khtml/rendering/render_list.cpp: (RenderListMarker::paint): ditto 2005-01-10 David Harrison <harrison@apple.com> Reviewed by Darin. * kwq/KWQTextUtilities.mm: (currentTextBreakLocaleID): Return empty string (AKA root locale) if locale pref can not be canonicalized. 2005-01-10 John Sullivan <sullivan@apple.com> Fixed broken Panther build. * kwq/KWQTextUtilities.mm: (currentTextBreakLocaleID): This recently-added function was using code copy/pasted from CarbonCore UnicodeUtilities. That code used a Tiger-only function, CFLocaleCreateCanonicalLanguageIdentifierFromString. To fix the build, I added a BUILDING_ON_PANTHER #ifdef that avoids the call to the Tiger function. However, the Tiger-only code was wrong; the string generated using CFLocaleCreateCanonicalLanguageIdentifierFromString was not used at all, so I fixed that as well. 2005-01-09 David Harrison <harrison@apple.com> Reviewed by Ken Kocienda. <rdar://problem/3786362> REGRESSION (Mail): pasted text loses one newline * khtml/editing/htmlediting.cpp: (khtml::ReplaceSelectionCommand::doApply): Tune check for need for insertParagraphSeparator when hasInterchangeNewline. 2005-01-09 Darin Adler <darin@apple.com> Reviewed by Harrison. - fixed <rdar://problem/3939176> select() method does not work on <input type=search> * khtml/html/html_formimpl.cpp: (DOM::HTMLInputElementImpl::select): Changed if statement to a switch statement. Added SEARCH to the set of types that treat the renderer as a RenderLineEdit. 2005-01-09 David Harrison <harrison@apple.com> Reviewed by Ken Kocienda. <rdar://problem/3905066> REGRESSION (Mail): Hitting return key with caret in front of space causes space to become lost (resize fixes) Problem was that InsertParagraphSeparatorCommand::doApply() was not collapsing whitespace to a single non-breaking space when splitting a text node. * khtml/editing/htmlediting.cpp: (khtml::InsertParagraphSeparatorCommand::doApply): 2005-01-08 Kevin Decker <kdecker@apple.com> Reviewed by Ken. Fixed: <rdar://problem/3924219> Calling setOuterHTML: on a DOMHTMLHtmlElement can crash a program * khtml/html/html_elementimpl.cpp: (HTMLElementImpl::setOuterHTML): Added a nil check for fragments who don't have parents. 2005-01-07 Maciej Stachowiak <mjs@apple.com> Reviewed by Darin. <rdar://problem/3807144> REGRESSION (125-TOT): my bank's website doesn't work (Societe Generale, socgen.com) * Khtml/khtml_part.cpp: (KHTMLPart::checkCompleted): If the document is NULL, assume this frame has not started loading yet so it could not possibly be finishing here... (KHTMLPart::stop): ...unless the part is explicitly stopped and there is still no document, in this case we must have hit an error or been loading a non-HTML frame. * khtml/khtml_part.h: 2005-01-08 David Harrison <harrison@apple.com> Reviewed by Maciej. <rdar://problem/3943415> REGRESSION (Mail): double-clicking past word selects previous word instead of only blank space * khtml/editing/selection.cpp: (khtml::Selection::validate): Tune word selections left/right choice to use right if on empty last line. 2005-01-07 David Harrison <harrison@apple.com> Reviewed by Darin. <rdar://problem/3942619> AX: Support sentence ax attributes Needed to use the unicode utilities properly. Twas lame before. * khtml/editing/visible_units.cpp: (khtml::previousBoundary): (khtml::nextBoundary): (khtml::startOfWord): (khtml::endOfWord): (khtml::previousWordPosition): (khtml::nextWordPosition): (khtml::startOfSentence): (khtml::endOfSentence): (khtml::previousSentencePosition): (khtml::nextSentencePosition): * kwq/KWQAccObject.mm: (-[KWQAccObject accessibilityAttributeNames]): (-[KWQAccObject accessibilityAttributeValue:]): (-[KWQAccObject accessibilityParameterizedAttributeNames]): (-[KWQAccObject doAXAttributedStringForTextMarkerRange:]): * kwq/KWQTextUtilities.mm: (currentTextBreakLocaleID): (KWQFindSentenceBoundary): (KWQFindNextSentenceFromIndex): 2005-01-07 Ken Kocienda <kocienda@apple.com> Reviewed by Kevin Fix for these bugs: <rdar://problem/3939523> in some cases, text does not retain style info after pressing return twice <rdar://problem/3944492> after pressing return twice, text is bold when it shouldn't be * khtml/editing/htmlediting.cpp: (khtml::InsertParagraphSeparatorCommand::setFullTypingStyleBeforeInsertion): Merge the typing style with the computed style for the current position. Fixes both bugs. * khtml/editing/htmlediting.h: * layout-tests/editing/inserting/insert-div-023-expected.txt: Added. * layout-tests/editing/inserting/insert-div-023.html: Added. * layout-tests/editing/inserting/insert-div-024-expected.txt: Added. * layout-tests/editing/inserting/insert-div-024.html: Added. 2005-01-07 David Hyatt <hyatt@apple.com> Fix for 3941364, make sure tables reset overflowWidth/Height when they lay out again. Fixes the odd scrolling behavior on worldofwarcraft.com. Reviewed by kevin * khtml/rendering/render_table.cpp: (RenderTable::layout): 2005-01-06 David Hyatt <hyatt@apple.com> Fix for 3932418 and 3920998, assertion failures caused by stray inline content inside tables. Bulletproof the hit testing to ignore inline flows in this case. Reviewed by kevin * khtml/rendering/render_block.cpp: (khtml::RenderBlock::nodeAtPoint): 2005-01-07 Ken Kocienda <kocienda@apple.com> Reviewed by Hyatt Fix for this bug: <rdar://problem/3848412> for forwarded message, tabbing to message view scrolls to bottom of view * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::nextKeyViewInFrame): Don't scroll the focus node to visible if it is not in the document, or if it is not a descendent of the document element. In the case of the bug, since the selection has not yet been set up, the focus node passed here is the HTML element, and that does not yield a rect that is useful to us here. So now, in the case the bug mentions, we do nothing. 2005-01-06 Kevin Decker <kdecker@apple.com> Reviewed by mjs. Fixed: <rdar://problem/3932215> REGRESSION (125-177): iFrame example at developer.apple.com fails in Safari * khtml/khtml_part.cpp: (KHTMLPart::processObjectRequest): m_bComplete was never true for frames generated by Javascript due to our synchronous loading and as a result, scheduled redirects wouldn't fire in KHTMLPart::scheduleLocationChange(). By virtue of being an empty document, a document is complete. In this special case it's safe at this point to call checkCompleted() which sets m_bComplete true. === Safari-178 === 2005-01-06 David Harrison <harrison@apple.com> Reviewed by Chris. (addendum to previous checkin for this bug) <rdar://problem/3776056> AX: Editable HTML should not be viewed as AXStaticText Fix line navigation. Add AXUIElementForTextMarker. * kwq/KWQAccObject.mm: (-[KWQAccObject accessibilityParameterizedAttributeNames]): (-[KWQAccObject doAXUIElementForTextMarker:]): (-[KWQAccObject doAXLineForTextMarker:]): (-[KWQAccObject doAXTextMarkerRangeForLine:]): (-[KWQAccObject doAXRightLineTextMarkerRangeForTextMarker:]): (-[KWQAccObject doAXNextLineEndTextMarkerForTextMarker:]): (-[KWQAccObject doAXPreviousLineStartTextMarkerForTextMarker:]): (-[KWQAccObject accessibilityAttributeValue:forParameter:]): 2005-01-06 Darin Adler <darin@apple.com> Reviewed by Ken. - re-fixed <rdar://problem/3760910> Request to include support for custom tag names in HTML (they already work in XML) (turns out the PLT regression was a false alarm) * khtml/html/htmlparser.h: Change forbidden tag array to be allocated in the object rather than on the heap. Also use ID_LAST_TAG for the array size; the old code used ID_CLOSE_TAG which is now a much larger number. * khtml/html/htmlparser.cpp: (KHTMLParser::KHTMLParser): Remove code that creates the forbidden tag array on the heap; makes more sense to just have the array be a member so we don't have to use new and delete on it. Also needed to eliminate code that used ID_CLOSE_TAG for an array size. (KHTMLParser::~KHTMLParser): Remove code that deletes the forbidden tag array. Also changed the code that manages isindex to use deref instead of delete. (KHTMLParser::reset): Use safer sizeof for clearing the forbidden tag array. Old code had the mistake of using ID_CLOSE_TAG for the array size too. (KHTMLParser::parseToken): Removed code that checks for bogus tags; it's not clear why it was ever there and it would prevent custom tags from working. Added range check before using the forbidden tag array with the token ID since custom tags will use index values past the end of the array. (KHTMLParser::getElement): Removed most of the code that makes an element by ID; now the work is done inside the DocumentImpl createHTMLElement. Any code that needs to be different than a dynamic createElement call is still here. Last time I left out a few form element types from this switch; fixed now. * khtml/html/htmltokenizer.cpp: (khtml::HTMLTokenizer::parseTag): Call the tagId function in the document if getTagID fails; this creates a unique per-document ID. * khtml/misc/htmltags.c: Regenerated. * khtml/misc/htmltags.h: Regenerated. * khtml/misc/maketags: Changed the generated constants to use "const unsigned short" instead of "#define". Changed ID_CLOSE_TAG to be a fixed value of 32000 rather than being just past the IDs of the HTML tags. Also rewrote getTagName to work with the new scheme. 2005-01-06 David Harrison <harrison@apple.com> Fixed Panther build. Also, do not advertize sentence support since it is incomplete. * kwq/KWQAccObject.mm: (-[KWQAccObject visiblePositionForEndOfTextMarkerRange:]): (-[KWQAccObject accessibilityParameterizedAttributeNames]): (-[KWQAccObject accessibilityIsAttributeSettable:]): 2005-01-06 David Harrison <harrison@apple.com> Reviewed by Dave Hyatt. <rdar://problem/3776056> AX: Editable HTML should not be viewed as AXStaticText <rdar://problem/3588548> AX: tabbing does not work correctly with the screen reader and a focused link; need AXFocusedUIElement to work Many more AX attributes supported. Numerous fixes to previous AX work. * khtml/editing/visible_units.cpp: (khtml::startSentenceBoundary): (khtml::startOfSentence): (khtml::endSentenceBoundary): (khtml::endOfSentence): (khtml::previousSentencePositionBoundary): (khtml::previousSentencePosition): (khtml::nextSentencePositionBoundary): (khtml::nextSentencePosition): * khtml/editing/visible_units.h: * khtml/khtmlview.cpp: (KHTMLView::layout): * khtml/misc/helper.cpp: (khtml::findSentenceBoundary): (khtml::nextSentenceFromIndex): * khtml/misc/helper.h: * khtml/misc/htmltags.c: (hash_tag): (findTag): * khtml/rendering/render_container.cpp: (RenderContainer::removeChildNode): (RenderContainer::appendChildNode): (RenderContainer::insertChildNode): * khtml/rendering/render_object.cpp: (RenderObject::remove): * khtml/xml/dom_docimpl.cpp: (DocumentImpl::getAccObjectCache): (DocumentImpl::updateSelection): (DocumentImpl::close): (DocumentImpl::setFocusNode): (DocumentImpl::parentDocument): (DocumentImpl::topDocument): * khtml/xml/dom_docimpl.h: * kwq/KWQAccObject.mm: (-[KWQAccObject accessibilityShouldUseUniqueId]): (-[KWQAccObject detach]): (-[KWQAccObject anchorElement]): (-[KWQAccObject firstChild]): (-[KWQAccObject lastChild]): (-[KWQAccObject previousSibling]): (-[KWQAccObject nextSibling]): (-[KWQAccObject parentObject]): (-[KWQAccObject value]): (-[KWQAccObject accessibilityAttributeNames]): (-[KWQAccObject accessibilityPerformAction:]): (-[KWQAccObject textMarkerForVisiblePosition:]): (-[KWQAccObject visiblePositionForTextMarker:]): (-[KWQAccObject textMarkerRangeFromVisiblePositions:andEndPos:]): (-[KWQAccObject topDocument]): (-[KWQAccObject topRenderer]): (-[KWQAccObject topView]): (-[KWQAccObject accessibilityAttributeValue:]): (-[KWQAccObject accessibilityParameterizedAttributeNames]): (-[KWQAccObject doAXLineForTextMarker:]): (-[KWQAccObject doAXTextMarkerRangeForLine:]): (-[KWQAccObject doAXStringForTextMarkerRange:]): (-[KWQAccObject doAXTextMarkerForPosition:]): (-[KWQAccObject doAXBoundsForTextMarkerRange:]): (-[KWQAccObject doAXAttributedStringForTextMarkerRange:]): (-[KWQAccObject doAXTextMarkerRangeForUnorderedTextMarkers:]): (-[KWQAccObject doAXNextTextMarkerForTextMarker:]): (-[KWQAccObject doAXPreviousTextMarkerForTextMarker:]): (-[KWQAccObject doAXLeftWordTextMarkerRangeForTextMarker:]): (-[KWQAccObject doAXRightWordTextMarkerRangeForTextMarker:]): (-[KWQAccObject doAXLeftLineTextMarkerRangeForTextMarker:]): (-[KWQAccObject doAXRightLineTextMarkerRangeForTextMarker:]): (-[KWQAccObject doAXSentenceTextMarkerRangeForTextMarker:]): (-[KWQAccObject doAXParagraphTextMarkerRangeForTextMarker:]): (-[KWQAccObject doAXNextWordEndTextMarkerForTextMarker:]): (-[KWQAccObject doAXPreviousWordStartTextMarkerForTextMarker:]): (-[KWQAccObject doAXNextLineEndTextMarkerForTextMarker:]): (-[KWQAccObject doAXPreviousLineStartTextMarkerForTextMarker:]): (-[KWQAccObject doAXNextSentenceEndTextMarkerForTextMarker:]): (-[KWQAccObject doAXPreviousSentenceStartTextMarkerForTextMarker:]): (-[KWQAccObject doAXNextParagraphEndTextMarkerForTextMarker:]): (-[KWQAccObject doAXPreviousParagraphStartTextMarkerForTextMarker:]): (-[KWQAccObject doAXLengthForTextMarkerRange:]): (-[KWQAccObject accessibilityAttributeValue:forParameter:]): (-[KWQAccObject accessibilityHitTest:]): (-[KWQAccObject accessibilityFocusedUIElement]): (-[KWQAccObject accessibilityIsAttributeSettable:]): (-[KWQAccObject doSetAXSelectedTextMarkerRange:]): (-[KWQAccObject setAccObjectID:]): (-[KWQAccObject removeAccObjectID]): * kwq/KWQAccObjectCache.h: * kwq/KWQAccObjectCache.mm: (KWQAccObjectCache::setAccObject): (KWQAccObjectCache::removeAccObject): (KWQAccObjectCache::visiblePositionForTextMarker): (KWQAccObjectCache::postNotificationToTopWebArea): (KWQAccObjectCache::postNotification): (KWQAccObjectCache::handleFocusedUIElementChanged): * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::respondToChangedContents): * kwq/KWQTextUtilities.h: * kwq/KWQTextUtilities.mm: (KWQFindNextWordFromIndex): (KWQFindSentenceBoundary): (KWQFindNextSentenceFromIndex): * kwq/WebCoreBridge.mm: (-[WebCoreBridge accessibilityTree]): 2005-01-05 Darin Adler <darin@apple.com> Reviewed by Ken. - re-landing a subset of my custom tag change that does not fix the bug, but also does not introduce a performance regression * khtml/css/cssstyleselector.cpp: (khtml::CSSStyleSelector::checkOneSelector): Changed some code that used ID_LAST_TAG in a slightly wrong, but harmless, way. * khtml/editing/htmlediting.cpp: (khtml::debugPosition): Use nodeName rather than getTagName, since the latter works for per-document tags and is just better all around for things like the document. (khtml::debugNode): Ditto. * khtml/editing/selection.cpp: (khtml::Selection::debugPosition): Ditto. * khtml/editing/visible_position.cpp: (khtml::VisiblePosition::debugPosition): Ditto. * khtml/xml/dom_nodeimpl.cpp: (NodeImpl::displayNode): Ditto. * khtml/xml/dom_position.cpp: (DOM::Position::debugPosition): Ditto. * khtml/html/dtd.cpp: (DOM::checkChild): Use ID_LAST_TAG rather than 1000 for the check that allows non-HTML elements to be nested as desired. * khtml/misc/htmlhashes.h: Changed return types to unsigned short. * khtml/misc/htmlhashes.cpp: (khtml::getTagID): Changed return type to unsigned short. (khtml::getAttrID): Ditto. * khtml/xml/dom_docimpl.h: Added overload of createHTMLElement, made it non-virtual since it's not overriden. * khtml/xml/dom_docimpl.cpp: (DocumentImpl::createHTMLElement): Refactored into two separate functions, one that takes the tag ID. Also updated for a few tags that the parser handled but this did not. * kwq/KWQRenderTreeDebug.cpp: (getTagName): Added. Works for custom nodes, because it calls nodeName rather than using getTagName on the tag ID directly, which only works for standard nodes. (operator<<): Update to call getTagName. (nodePositionRelativeToRoot): Ditto. (writeSelection): Ditto. 2005-01-05 Ken Kocienda <kocienda@apple.com> Reviewed by Hyatt Fix for this bug: <rdar://problem/3941203> REGRESSION (Mail): Paste inserts content in wrong place * khtml/editing/htmlediting.cpp: (khtml::ReplaceSelectionCommand::doApply): Some cleanup and refinement of the concepts used to make this operation work correctly, particularly in the logic to figure out whether to merge content, and also performing merges. * khtml/editing/visible_position.cpp: (khtml::isFirstVisiblePositionInBlock): Simplification of test used to make this determination. * khtml/editing/visible_units.cpp: (khtml::isStartOfParagraph): New helper, used in khtml::ReplaceSelectionCommand::doApply(). (khtml::isEndOfParagraph): Ditto. * khtml/editing/visible_units.h: Declare new functions. 2005-01-04 Ken Kocienda <kocienda@apple.com> Reviewed by John Fix for this bug: <rdar://problem/3926522> Pressing return in a quoted block inserts too many newlines * khtml/editing/htmlediting.cpp: (khtml::InsertParagraphSeparatorInQuotedContentCommand::doApply): Call to insertBlockPlaceholderIfNeeded() for the block we are adding was being done at the wrong time, which led to the placeholder remaining in the document when it was not needed. This resulted in the extra space reported in the bug. 2005-01-04 Kevin Decker <kdecker@apple.com> Reviewed by Hyatt. Fixed: <rdar://problem/3936879> nil-deref, crash in InlineFlowBox::nodeAtPoint closing DHTML menus at hrweb.apple.com * khtml/rendering/render_block.cpp: (khtml::RenderBlock::fillInlineSelectionGaps): Added a nil check. If there is no selection, don't try to get the selection's containing block. If we do, we'll crash. 2005-01-04 David Hyatt <hyatt@apple.com> Fix for 3937203, force an update of the dashboard regions when scrollbars are added/removed. Reviewed by kevin * khtml/rendering/render_layer.cpp: (RenderLayer::updateScrollInfoAfterLayout): 2005-01-04 Ken Kocienda <kocienda@apple.com> Reviewed by John Fix for these two bugs: <rdar://problem/3938935> REGRESSION (Mail): Pasting into an empty document mangles content <rdar://problem/3939148> REGRESSION (Mail): Pasting mistakenly reverses lines * khtml/editing/htmlediting.cpp: (khtml::ReplaceSelectionCommand::doApply): For 3938935, add one more case to handle an empty document; merge neither start nor end. For 3939148, improve the code which adjusts the insertion point during the process of pasting. It formerly handled only one of the possible cases. * layout-tests/editing/pasteboard/paste-text-015-expected.txt: Added. * layout-tests/editing/pasteboard/paste-text-015.html: Added. 2005-01-04 David Hyatt <hyatt@apple.com> Fix for 3936571, placeholder attribute should work for normal inputs for Dashboard. Reviewed by john * khtml/rendering/render_form.cpp: (RenderLineEdit::updateFromElement): * kwq/KWQLineEdit.mm: (QLineEdit::setPlaceholderString): 2005-01-04 David Hyatt <hyatt@apple.com> Fix for 3830936, hang on changeforamerica.com. Make sure to ignore the style not yet available option when returning pseudo-styles. Reviewed by john * khtml/css/cssstyleselector.cpp: (khtml::CSSStyleSelector::matchRulesForList): (khtml::CSSStyleSelector::pseudoStyleForElement): * khtml/rendering/render_style.cpp: (RenderStyle::addPseudoStyle): 2005-01-04 Darin Adler <darin@apple.com> - rolled out my custom tag name change again -- it caused a 1 ms PLT regression * khtml/css/cssstyleselector.cpp: * khtml/editing/htmlediting.cpp: * khtml/editing/selection.cpp: * khtml/editing/visible_position.cpp: * khtml/html/dtd.cpp: * khtml/html/htmlparser.cpp: * khtml/html/htmlparser.h: * khtml/html/htmltokenizer.cpp: * khtml/misc/htmlhashes.cpp: * khtml/misc/htmlhashes.h: * khtml/misc/htmltags.c: * khtml/misc/htmltags.h: * khtml/misc/maketags: * khtml/xml/dom_docimpl.cpp: * khtml/xml/dom_docimpl.h: * khtml/xml/dom_nodeimpl.cpp: * khtml/xml/dom_position.cpp: * kwq/KWQRenderTreeDebug.cpp: 2005-01-04 Ken Kocienda <kocienda@apple.com> Reviewed by John Fix for this bug: <rdar://problem/3927554> Style info applied to remainder of document after a newline is entered * khtml/editing/htmlediting.cpp: (khtml::InsertParagraphSeparatorCommand::doApply): Clean up and simplification in code that inserts a paragraph separator. The bug was all about applying styles to the new paragraph that did not need to be applied. Now the code will detect when at the end of a style run and will not move and apply that ending style to the new paragraph, though it will place that style into the typing style. This seems to match NSText behavior. * layout-tests/editing/inserting/insert-div-021-expected.txt: This test result exhibited the bug fixed here. The only reason it was not noticed is that the erroneously copied inline was a span, and so did not have any visible effect on the document. * layout-tests/editing/inserting/insert-div-022-expected.txt: Added. * layout-tests/editing/inserting/insert-div-022.html: Added. 2005-01-04 David Hyatt <hyatt@apple.com> Fix for 3904562, make sure to clear the outline dictionary when drawing so that random focus rings dont get drawn all over the place. Reviewed by john * khtml/rendering/render_flow.cpp: (RenderFlow::paintLines): 2005-01-03 David Hyatt <hyatt@apple.com> Fix for float painting regressions 3932524, 3931664, and 3933068. Make the noPaint flag setting more robust and make it work regardless of which objects get a layout or not. Reviewed by mjs * khtml/rendering/render_block.cpp: (khtml::RenderBlock::insertFloatingObject): (khtml::RenderBlock::addOverhangingFloats): (khtml::RenderBlock::addIntrudingFloats): * khtml/rendering/render_block.h: (khtml::RenderBlock::FloatingObject::FloatingObject): 2005-01-03 Maciej Stachowiak <mjs@apple.com> Reviewed by Kevin. <rdar://problem/3935390> Tiger 8A341: nil deref crash in DOM::NodeImpl::traverseNextNode * khtml/html/html_miscimpl.cpp: (HTMLCollectionImpl::traverseNextItem): Assert that the starting point is not nil, it should not ever be (now). (HTMLCollectionImpl::item): When traversing items stop when we hit nil, meaning the end to avoid triggering above assert (formerly crash). 2005-01-03 Maciej Stachowiak <mjs@apple.com> Reviewed by John and Kevin. <rdar://problem/3870317> REGRESSION(125.9-125.11) broken behavior at test.profoundlearning.com - used to * khtml/ecma/kjs_window.cpp: (Window::get): Look up frame names before buitin window properties to match other browsers. This regressed because we added a builtin "toolbar" property but this site had a frame with that name. 2004-12-21 Maciej Stachowiak <mjs@apple.com> Reviewed by Darin. <rdar://problem/3888931> frame naming allows malicious site to bring up a window when you click on a link in another Added opener bridge method to help WebKit implement security check for named frame visibility. * khtml/khtml_part.h: * kwq/WebCoreBridge.h: * kwq/WebCoreBridge.mm: (-[WebCoreBridge opener]): 2005-01-03 Ken Kocienda <kocienda@apple.com> Reviewed by John Fix for this bug: <rdar://problem/3933926> Tiger8A341: Mail crashes while forwarding embedded HTML message in -[WebCoreBridge ensureSelectionVisible] * kwq/WebCoreBridge.mm: (-[WebCoreBridge ensureSelectionVisible]): Put in some null checks to prevent crash experienced in bug. 2005-01-03 David Hyatt <hyatt@apple.com> Fix for 3936881, make sure positioned objects prooperly update y-position. Reviewed by john * khtml/rendering/render_block.cpp: (khtml::RenderBlock::layoutPositionedObjects): 2005-01-03 Ken Kocienda <kocienda@apple.com> Reviewed by Harrison Fix for this bug: <rdar://problem/3928250> REGRESSION (Mail): Typing style lost after hitting return key * khtml/editing/htmlediting.cpp: (khtml::InsertLineBreakCommand::preservesTypingStyle): Now implemented, returning yes for this command. (khtml::InsertParagraphSeparatorCommand::InsertParagraphSeparatorCommand): Initialize new typing style member variable. (khtml::InsertParagraphSeparatorCommand::~InsertParagraphSeparatorCommand): Deref new typing style member variable. (khtml::InsertParagraphSeparatorCommand::preservesTypingStyle): Now implemented, returning yes for this command. (khtml::InsertParagraphSeparatorCommand::setFullTypingStyleBeforeInsertion): New function to set the typing style (khtml::InsertParagraphSeparatorCommand::calculateAndSetTypingStyleAfterInsertion): Function called after the <p> insertion is done. This function diffs the style created in setFullTypingStyleBeforeInsertion() with the style of the new <p> and only sets those styles needed to preserve the style in effect before the insertion. (khtml::InsertParagraphSeparatorCommand::doApply): Call new functions. (khtml::TypingCommand::preservesTypingStyle): Now yes for inserting line breaks and paragraphs. * khtml/editing/htmlediting.h: Declare new functions. 2004-12-25 Kevin Decker <kdecker@apple.com> Reviewed by Hyatt. Fixed: <rdar://problem/3505072> hang in KHTMLParser::parseToken (consulting.soroos.net) * khtml/html/dtd.cpp: <label> needed a much higher priority such that it will close block elements. Malformed HTML (ugh) is the only reason why we need to do this. 2004-12-23 Darin Adler <darin@apple.com> Reviewed by Ken. - re-fixed <rdar://problem/3760910> Request to include support for custom tag names in HTML (they already work in XML) * khtml/css/cssstyleselector.cpp: (khtml::CSSStyleSelector::checkOneSelector): Changed some code that used ID_LAST_TAG in a slightly wrong, but harmless, way. * khtml/editing/htmlediting.cpp: (khtml::debugPosition): Use nodeName rather than getTagName, since the latter works for per-document tags and is just better all around for things like the document. (khtml::debugNode): Ditto. * khtml/editing/selection.cpp: (khtml::Selection::debugPosition): Ditto. * khtml/editing/visible_position.cpp: (khtml::VisiblePosition::debugPosition): Ditto. * khtml/xml/dom_nodeimpl.cpp: (NodeImpl::displayNode): Ditto. * khtml/xml/dom_position.cpp: (DOM::Position::debugPosition): Ditto. * khtml/html/dtd.cpp: (DOM::checkChild): Use ID_LAST_TAG rather than 1000 for the check that allows non-HTML elements to be nested as desired. * khtml/html/htmlparser.h: Change forbidden tag array to be allocated in the object rather than on the heap. Also use ID_LAST_TAG for the array size; the old code used ID_CLOSE_TAG which is now a much larger number. * khtml/html/htmlparser.cpp: (KHTMLParser::KHTMLParser): Remove code that creates the forbidden tag array on the heap; makes more sense to just have the array be a member so we don't have to use new and delete on it. Also needed to eliminate code that used ID_CLOSE_TAG for an array size. (KHTMLParser::~KHTMLParser): Remove code that deletes the forbidden tag array. Also changed the code that manages isindex to use deref instead of delete. (KHTMLParser::reset): Use safer sizeof for clearing the forbidden tag array. Old code had the mistake of using ID_CLOSE_TAG for the array size too. (KHTMLParser::parseToken): Removed code that checks for bogus tags; it's not clear why it was ever there and it would prevent custom tags from working. Added range check before using the forbidden tag array with the token ID since custom tags will use index values past the end of the array. (KHTMLParser::getElement): Removed most of the code that makes an element by ID; now the work is done inside the DocumentImpl createHTMLElement. Any code that needs to be different than a dynamic createElement call is still here. Last time I left out a few form element types from this switch; fixed now. * khtml/html/htmltokenizer.cpp: (khtml::HTMLTokenizer::parseTag): Call the tagId function in the document if getTagID fails; this creates a unique per-document ID. * khtml/misc/htmlhashes.h: Changed return types to unsigned short. * khtml/misc/htmlhashes.cpp: (khtml::getTagID): Changed return type to unsigned short. (khtml::getAttrID): Ditto. * khtml/misc/htmltags.c: Regenerated. * khtml/misc/htmltags.h: Regenerated. * khtml/misc/maketags: Changed the generated constants to use "const unsigned short" instead of "#define". Changed ID_CLOSE_TAG to be a fixed value of 32000 rather than being just past the IDs of the HTML tags. Also rewrote getTagName to work with the new scheme. * khtml/xml/dom_docimpl.h: Added overload of createHTMLElement, made it non-virtual since it's not overriden. * khtml/xml/dom_docimpl.cpp: (DocumentImpl::createHTMLElement): Refactored into two separate functions, one that takes the tag ID. Also updated for a few tags that the parser handled but this did not. * kwq/KWQRenderTreeDebug.cpp: (getTagName): Added. Works for custom nodes, because it calls nodeName rather than using getTagName on the tag ID directly, which only works for standard nodes. (operator<<): Update to call getTagName. (nodePositionRelativeToRoot): Ditto. (writeSelection): Ditto. === Safari-177 === 2004-12-22 Darin Adler <darin@apple.com> - rolled out my custom tag name change -- it broke amazon.com * khtml/css/cssstyleselector.cpp: * khtml/editing/htmlediting.cpp: * khtml/editing/selection.cpp: * khtml/editing/visible_position.cpp: * khtml/html/dtd.cpp: * khtml/html/htmlparser.cpp: * khtml/html/htmlparser.h: * khtml/html/htmltokenizer.cpp: * khtml/misc/htmlhashes.cpp: * khtml/misc/htmlhashes.h: * khtml/misc/htmltags.c: * khtml/misc/htmltags.h: * khtml/misc/maketags: * khtml/xml/dom_docimpl.cpp: * khtml/xml/dom_docimpl.h: * khtml/xml/dom_nodeimpl.cpp: * khtml/xml/dom_position.cpp: * kwq/KWQRenderTreeDebug.cpp: 2004-12-22 David Harrison <harrison@apple.com> Reviewed by Darin Adler. * khtml/editing/selection.cpp: (khtml::Selection::validate): The selecting/deselecting bad behavior is because the Selection code that expands by words had an inaccurate test for being at the end of the document (where double-clicking needs to select the last word). Fixed that check. 2004-12-22 Adele Amchan <adele@apple.com> Reviewed by Chris. Fix for <rdar://problem/3911650> tabs at safeway.com stop working after a while * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::scrollToAnchor): removed call to cancelRedirection so that we match Firefox and WinIE behavior. 2004-12-22 Darin Adler <darin@apple.com> Reviewed by Ken. - fixed <rdar://problem/3760910> Request to include support for custom tag names in HTML (they already work in XML) * khtml/css/cssstyleselector.cpp: (khtml::CSSStyleSelector::checkOneSelector): Changed some code that used ID_LAST_TAG in a slightly wrong, but harmless, way. * khtml/editing/htmlediting.cpp: (khtml::debugPosition): Use nodeName rather than getTagName, since the latter works for per-document tags and is just better all around for things like the document. (khtml::debugNode): Ditto. * khtml/editing/selection.cpp: (khtml::Selection::debugPosition): Ditto. * khtml/editing/visible_position.cpp: (khtml::VisiblePosition::debugPosition): Ditto. * khtml/xml/dom_nodeimpl.cpp: (NodeImpl::displayNode): Ditto. * khtml/xml/dom_position.cpp: (DOM::Position::debugPosition): Ditto. * khtml/html/dtd.cpp: (DOM::checkChild): Use ID_LAST_TAG rather than 1000 for the check that allows non-HTML elements to be nested as desired. * khtml/html/htmlparser.h: Change forbidden tag array to be allocated in the object rather than on the heap. Also use ID_LAST_TAG for the array size; the old code used ID_CLOSE_TAG which is now a much larger number. * khtml/html/htmlparser.cpp: (KHTMLParser::KHTMLParser): Remove code that creates the forbidden tag array on the heap; makes more sense to just have the array be a member so we don't have to use new and delete on it. Also needed to eliminate code that used ID_CLOSE_TAG for an array size. (KHTMLParser::~KHTMLParser): Remove code that deletes the forbidden tag array. Also changed the code that manages isindex to use deref instead of delete. (KHTMLParser::reset): Use safer sizeof for clearing the forbidden tag array. Old code had the mistake of using ID_CLOSE_TAG for the array size too. (KHTMLParser::parseToken): Removed code that checks for bogus tags; it's not clear why it was ever there and it would prevent custom tags from working. Added range check before using the forbidden tag array with the token ID since custom tags will use index values past the end of the array. (KHTMLParser::getElement): Removed most of the code that makes an element by ID; now the work is done inside the DocumentImpl createHTMLElement. Any code that needs to be different than a dynamic createElement call is still here. * khtml/html/htmltokenizer.cpp: (khtml::HTMLTokenizer::parseTag): Call the tagId function in the document if getTagID fails; this creates a unique per-document ID. * khtml/misc/htmlhashes.h: Changed return types to unsigned short. * khtml/misc/htmlhashes.cpp: (khtml::getTagID): Changed return type to unsigned short. (khtml::getAttrID): Ditto. * khtml/misc/htmltags.c: Regenerated. * khtml/misc/htmltags.h: Regenerated. * khtml/misc/maketags: Changed the generated constants to use "const unsigned short" instead of "#define". Changed ID_CLOSE_TAG to be a fixed value of 32000 rather than being just past the IDs of the HTML tags. Also rewrote getTagName to work with the new scheme. * khtml/xml/dom_docimpl.h: Added overload of createHTMLElement, made it non-virtual since it's not overriden. * khtml/xml/dom_docimpl.cpp: (DocumentImpl::createHTMLElement): Refactored into two separate functions, one that takes the tag ID. Also updated for a few tags that the parser handled but this did not. * kwq/KWQRenderTreeDebug.cpp: (getTagName): Added. Works for custom nodes, because it calls nodeName rather than using getTagName on the tag ID directly, which only works for standard nodes. (operator<<): Update to call getTagName. (nodePositionRelativeToRoot): Ditto. (writeSelection): Ditto. 2004-12-21 David Harrison <harrison@apple.com> Reviewed by Ken Kocienda. <rdar://problem/3924934> REGRESSION: double click at end of line selects start of next line Problem was the TextIterator was not handling exitNode() from a P block properly. * khtml/editing/visible_text.cpp: (khtml::TextIterator::TextIterator): Add new param that specifies whether the iterator is for content or for searching. Search iterators do not prevent newlines at the beginning. (khtml::TextIterator::advance): Added some comments. (khtml::TextIterator::handleTextNode): Added some comments. (khtml::TextIterator::exitNode): Emit newline for P (and other) blocks with position following the block, instead of the m_lastTextNode. (khtml::TextIterator::emitCharacter): Added some comments. (khtml::TextIterator::range): Added some comments. (khtml::CharacterIterator::CharacterIterator): Specify search type TextIterator. (khtml::CharacterIterator::advance): * khtml/editing/visible_text.h: (khtml::): Add new TextIterator::TextIterator param that specifies whether the iterator is for content or for searching. * khtml/editing/visible_units.cpp: (khtml::nextWordBoundary): Specify search type TextIterator. 2004-12-21 David Harrison <harrison@apple.com> Reviewed by Ken Kocienda. <rdar://problem/3924695> REGRESSION (Mail): double-clicking past end of line shows no selection, should select to EOL Problem was that RenderText::setSelectionState did not handle the SelectionStart case where start and end are the end of the line. Fixed by pretending the start == end-1 in that situation, as long as end > 0. * khtml/rendering/render_text.cpp: (RenderText::setSelectionState) 2004-12-21 Maciej Stachowiak <mjs@apple.com> Reviewed by John. <rdar://problem/3929187> WebKit needs to restrict access to certain window operations by domain * khtml/ecma/kjs_window.cpp: (Window::get): Change most window functions to be restricted by XSS domain check. 2004-12-21 Ken Kocienda <kocienda@apple.com> Reviewed by John Fix for this bug: <rdar://problem/3928305> selecting an entire line and typing over causes new inserted text at top of document * khtml/editing/htmlediting.cpp: (khtml::DeleteSelectionCommand::insertPlaceholderForAncestorBlockContent): New function to detect case formerly undetected and unhandled. This is the crux of the bug fix. (khtml::DeleteSelectionCommand::doApply): Call insertPlaceholderForAncestorBlockContent() during execution of command. * khtml/editing/htmlediting.h: Declare new function. * layout-tests/editing/deleting/delete-3928305-fix-expected.txt: Added. * layout-tests/editing/deleting/delete-3928305-fix.html: Added. 2004-12-21 Ken Kocienda <kocienda@apple.com> Reviewed by me * khtml/editing/htmlediting.cpp: (khtml::CompositeEditCommand::removeBlockPlaceholderIfNeeded): Note to self: Must compile code before checking in (aka must return false from function returning bool). 2004-12-21 Ken Kocienda <kocienda@apple.com> Reviewed by John Fix for this bug: <rdar://problem/3927752> Crash in khtml::CompositeEditCommand::removeBlockPlaceholderIfNeeded(DOM::NodeImpl*) * khtml/editing/htmlediting.cpp: (khtml::CompositeEditCommand::insertBlockPlaceholderIfNeeded): Added some null checks. (khtml::CompositeEditCommand::removeBlockPlaceholderIfNeeded): Ditto. 2004-12-21 Ken Kocienda <kocienda@apple.com> Reviewed by Darin * khtml/editing/htmlediting.cpp: (khtml::ReplacementFragment::mergeStartNode): Refine concept of how this node is found based on further experiements. (khtml::ReplaceSelectionCommand::doApply): Add a special case for determining merges that need to be done if the insertion point is in an empty block. * layout-tests/editing/pasteboard/paste-text-012-expected.txt: Added. * layout-tests/editing/pasteboard/paste-text-012.html: Added. * layout-tests/editing/pasteboard/paste-text-013-expected.txt: Added. * layout-tests/editing/pasteboard/paste-text-013.html: Added. * layout-tests/editing/pasteboard/paste-text-014-expected.txt: Added. * layout-tests/editing/pasteboard/paste-text-014.html: Added. 2004-12-21 Darin Adler <darin@apple.com> Reviewed by Ken. - fixed <rdar://problem/3899133> text search in a Safari window takes a very long time on Tiger updates page (and some other pages) * khtml/editing/visible_text.h: Add an "offset base node" parameter to emitCharacter, and also add a field to track it. Must make a few things mutable so we can update them in the range accessor. * khtml/editing/visible_text.cpp: (khtml::TextIterator::advance): Pass in base node and offsets rather than computing actual offsets using the node's index. We only compute the node index if actually asked for the range. (khtml::TextIterator::handleTextNode): Pass 0 for base node and set base node to 0 when setting up the offsets. (khtml::TextIterator::handleTextBox): Ditto. (khtml::TextIterator::handleReplacedElement): Pass base node and set base node instead of calling nodeIndex. (khtml::TextIterator::handleNonTextNode): Pass 0 for offset. (khtml::TextIterator::exitNode): More of the same. (khtml::TextIterator::emitCharacter): Ditto. (khtml::TextIterator::range): If an offset base node is stored, then get its node index, and then add that in to the offsets. Doing the work here guarantees it's done only once when doing a text search. - another small fix * khtml/khtml_part.cpp: Removed SPEED_DEBUG define. Not sure why it was on. === Safari-176 === 2004-12-20 Ken Kocienda <kocienda@apple.com> Reviewed by Darin * khtml/editing/htmlediting.cpp: (khtml::DeleteSelectionCommand::moveNodesAfterNode): My one-liner for this bug introduced layout test regressions: <rdar://problem/3926142> REGRESSION (Mail): Deleting text decreases quote level Rolling out until I can develop a real fix. 2004-12-20 David Harrison <harrison@apple.com> Reviewed by Dave Hyatt. Initial checkin of AXTextMarkerRef support. * khtml/xml/dom_docimpl.cpp: (DocumentImpl::updateSelection): (DocumentImpl::setFocusNode): * kwq/KWQAccObject.h: * kwq/KWQAccObject.mm: (-[KWQAccObject detach]): (-[KWQAccObject anchorElement]): (-[KWQAccObject addChildrenToArray:]): (-[KWQAccObject accessibilityAttributeNames]): (-[KWQAccObject accessibilityActionDescription:]): (-[KWQAccObject accessibilityPerformAction:]): (-[KWQAccObject textMarkerRangeFromMarkers:andEndMarker:]): (-[KWQAccObject textMarkerForVisiblePosition:]): (-[KWQAccObject visiblePositionForTextMarker:]): (-[KWQAccObject AXTextMarkerRangeCopyStartMarkerWrapper:]): (-[KWQAccObject AXTextMarkerRangeCopyEndMarkerWrapper:]): (-[KWQAccObject visiblePositionForStartOfTextMarkerRange:]): (-[KWQAccObject visiblePositionForEndOfTextMarkerRange:]): (-[KWQAccObject accessibilityAttributeValue:]): (-[KWQAccObject accessibilityParameterizedAttributeNames]): (-[KWQAccObject textMarkerRangeFromVisiblePositions:andEndPos:]): (-[KWQAccObject getSelectedTextMarkerRange]): (-[KWQAccObject doAXLineForTextMarker:]): (-[KWQAccObject doAXTextMarkerRangeForLine:]): (-[KWQAccObject doAXStringForTextMarkerRange:]): (-[KWQAccObject doAXNextTextMarkerForTextMarker:]): (-[KWQAccObject doAXPreviousTextMarkerForTextMarker:]): (-[KWQAccObject doAXLeftWordTextMarkerRangeForTextMarker:]): (-[KWQAccObject doAXRightWordTextMarkerRangeForTextMarker:]): (-[KWQAccObject doAXLeftLineTextMarkerRangeForTextMarker:]): (-[KWQAccObject doAXRightLineTextMarkerRangeForTextMarker:]): (-[KWQAccObject accessibilityAttributeValue:forParameter:]): (-[KWQAccObject accessibilityFocusedUIElement]): (-[KWQAccObject clearChildren]): (-[KWQAccObject accObjectID]): (-[KWQAccObject setAccObjectID:]): (-[KWQAccObject removeAccObjectID]): * kwq/KWQAccObjectCache.h: * kwq/KWQAccObjectCache.mm: (KWQAccObjectCache::KWQAccObjectCache): (KWQAccObjectCache::~KWQAccObjectCache): (KWQAccObjectCache::getAccObjectID): (KWQAccObjectCache::removeAccObjectID): (KWQAccObjectCache::textMarkerForVisiblePosition): (KWQAccObjectCache::visiblePositionForTextMarker): 2004-12-19 Darin Adler <darin@apple.com> * kwq/KWQFoundationExtras.h: (KWQCFAutorelease): Added nil check. 2004-12-19 Darin Adler <darin@apple.com> Reviewed by Kevin. - a garbage collection fix * kwq/KWQFoundationExtras.h: (KWQCFAutorelease): Added a more-extensive comment and fixed the BUILDING_ON_PANTHER #ifndef to use #if (in practice, either is OK). * kwq/KWQKURL.mm: (KURL::getNSURL): Use KWQCFAutorelease instead of autorelease. 2004-12-17 David Hyatt <hyatt@apple.com> Fix for 3923255, specified percentage heights of divs with overflow auto inside tables not honored. Reviewed by kocienda * khtml/rendering/render_box.cpp: (RenderBox::calcPercentageHeight): * khtml/rendering/render_table.cpp: (RenderTableSection::layoutRows): 2004-12-17 David Harrison <harrison@apple.com> Reviewed by Ken Kocienda. <rdar://problem/3924930> REGRESSION: triple click does not select to end of line * khtml/editing/visible_units.cpp: (khtml::endOfParagraph): When includeLineBreak is true, allow traversal to next node after enclosingBlockFlowElement. 2004-12-17 Ken Kocienda <kocienda@apple.com> Reviewed by Vicki * khtml/editing/htmlediting.cpp: (khtml::InsertParagraphSeparatorInQuotedContentCommand::doApply): Missed deleting some now-obsolete expcetion codes when I added the createBreakElement() function. 2004-12-17 Richard Williamson <rjw@apple.com> Set the floor of max cacheable object size to 40K. This restores the long standing floor. Lower floor deleteriously impacts the PLT. Reviewed by Hyatt. * khtml/khtml_part.cpp: (KHTMLPart::checkCompleted): * khtml/misc/loader.cpp: (Cache::setSize): 2004-12-17 Ken Kocienda <kocienda@apple.com> Reviewed by Hyatt Fix for this bug: <rdar://problem/3926142> REGRESSION (Mail): Deleting text decreases quote level * khtml/editing/htmlediting.cpp: (khtml::DeleteSelectionCommand::moveNodesAfterNode): Stop merging nodes when a <br> is hit. Formerly checked only for block boundary. 2004-12-17 David Harrison <harrison@apple.com> Reviewed by Darin. Add KWQCFAutorelease for autoreleasing CF objects. * kwq/KWQFoundationExtras.h: (KWQCFAutorelease): New. 2004-12-17 David Harrison <harrison@apple.com> Reviewed by Darin. Fix GC compatibility in getNSString. * kwq/KWQString.mm: (QString::getNSString): Use NSString allocator instead of CFString, so that autorelease works under GC. 2004-12-17 Ken Kocienda <kocienda@apple.com> Reviewed by Hyatt Fix for this bug: <rdar://problem/3890973> REGRESSION (Mail): Deleting reorders remaining text * khtml/editing/htmlediting.cpp: (khtml::DeleteSelectionCommand::moveNodesAfterNode): Added check to ensure that moving content will not move it after the <body> element. 2004-12-17 Ken Kocienda <kocienda@apple.com> Reviewed by me Added new layout tests covering cases from recent bug fixes. * layout-tests/editing/inserting/insert-div-018-expected.txt: Added. * layout-tests/editing/inserting/insert-div-018.html: Added. * layout-tests/editing/inserting/insert-div-019-expected.txt: Added. * layout-tests/editing/inserting/insert-div-019.html: Added. * layout-tests/editing/inserting/insert-div-020-expected.txt: Added. * layout-tests/editing/inserting/insert-div-020.html: Added. * layout-tests/editing/inserting/insert-div-021-expected.txt: Added. * layout-tests/editing/inserting/insert-div-021.html: Added. 2004-12-17 Ken Kocienda <kocienda@apple.com> Reviewed by me Changes in layout resulting from giving <p> elements no margin rather than 0.1em margin. * layout-tests/editing/inserting/insert-div-013-expected.txt * layout-tests/editing/inserting/insert-div-014-expected.txt 2004-12-17 Ken Kocienda <kocienda@apple.com> Reviewed by John Fix for this bug: <rdar://problem/3925317> Increase quote in email and with cursor below the quote the new line appears above the quote * khtml/editing/htmlediting.cpp: (khtml::InsertParagraphSeparatorCommand::doApply): * khtml/editing/visible_position.cpp: Refine rules for whether to use the starting node or the starting block as the reference node for the insertion of the new block. (khtml::isLastVisiblePositionInBlock): Tweak rules again. Descendants of following blocks should answer true. I worked this all out on the whiteboard this time. This should be the last tweak. 2004-12-17 Kevin Decker <kdecker@apple.com> Reviewed by Ken. Fixed <rdar://problem/3824438> Need a clean way for Dashboard to detect when an XML parsing error occurs * khtml/xml/xml_tokenizer.cpp: (khtml::XMLTokenizer::insertErrorMessageBlock): In the xml error report, instead of a generic <div>, use <parsererror> to match Mozilla. 2004-12-16 Ken Kocienda <kocienda@apple.com> Reviewed by Chris Fix for this bug: <rdar://problem/3924888> REGRESSION (Mail): Hitting return key at end of line does not insert visible newline * khtml/editing/htmlediting.cpp: (khtml::InsertParagraphSeparatorCommand::doApply): Tweaked code I added just before to fix 3924486, so that it checks the downstream node for the starting position. 2004-12-16 Ken Kocienda <kocienda@apple.com> Reviewed by Chris Added new createBreakElement() function that makes creating a <br> element a one-liner. Converted all the code that used to call the DocumentImpl, and dealt with the exceptionCode, over to this new helper. * khtml/editing/htmlediting.cpp: (khtml::DeleteSelectionCommand::moveNodesAfterNode): Now uses new helper function. (khtml::InsertLineBreakCommand::doApply): Ditto. (khtml::InsertParagraphSeparatorCommand::doApply): Ditto. (khtml::InsertParagraphSeparatorInQuotedContentCommand::doApply): Ditto. (khtml::ReplaceSelectionCommand::doApply): Ditto. (khtml::createBreakElement): New helper. * khtml/editing/htmlediting.h: Ditto. 2004-12-16 David Hyatt <hyatt@apple.com> Fix a bug where vertical-align values that depended on their parent's value went crazy if the parent was vertical-align top or bottom. The bug is 3771007, bankofamerica's ebills page. Reviewed by kocienda * khtml/rendering/render_object.cpp: (RenderObject::getVerticalPosition): 2004-12-16 Ken Kocienda <kocienda@apple.com> Reviewed by John Fix for these bugs: <rdar://problem/3924486> REGRESSION (Mail): Hitting return key does not insert visible newline <rdar://problem/3924579> REGRESSION (Mail): After deleting, hitting return key does not insert visible newline * khtml/editing/htmlediting.cpp: (khtml::InsertParagraphSeparatorCommand::doApply): For the first bug, detect when inserting a <p> will make a visible <br> collapse. For the second bug, move the code that inserts the new <p> after a check which may move the node used as the reference node for the insertion. Also change this code to insert the <p> after the last sibling of the starting position, to move it past the nodes we're going to want to shift into the new <p>. 2004-12-16 Darin Adler <darin@apple.com> Reviewed by Ken. - use <p> elements rather than <br> when pasting plain text; also use margin of 0 rather than 0.1 em after talking this over with Dave and Ken * khtml/editing/htmlediting.h: Added createDefaultParagraphElement and createBlockPlaceholderElement. * khtml/editing/htmlediting.cpp: (khtml::CompositeEditCommand::insertBlockPlaceholderIfNeeded): Use new createBlockPlaceholderElement helper so this can share code with the plain-text conversion code. (khtml::InsertParagraphSeparatorCommand::createParagraphElement): Use new createDefaultParagraphElement helper so this can share code with the plain-text conversion code. (khtml::createDefaultParagraphElement): Added. (khtml::createBlockPlaceholderElement): Added. * khtml/editing/markup.cpp: (khtml::createFragmentFromText): Use paragraphs rather than <br> elements for pasting plain text. - regenerated these files with the newer gperf * khtml/css/cssproperties.c: Regenerated. * khtml/css/cssvalues.c: Regenerated. * khtml/misc/htmlattrs.c: Regenerated. * khtml/misc/htmltags.c: Regenerated. 2004-12-16 Ken Kocienda <kocienda@apple.com> Reviewed by Hyatt Fix for this bug: <rdar://problem/3924291> REGRESSION (Mail): Crash deleting content following a <p> element * khtml/xml/dom_nodeimpl.cpp: (NodeImpl::enclosingInlineElement): Fixed problem in this function where recursive search for parent that is not an inline would skip past previous siblings of nodes which were blocks. Now it stops looking in this situation. This problem eventually caused the delete code to try to merge a node under a descendent. 2004-12-16 Adele Amchan <adele@apple.com> Change by Richard, reviewed by me. Fix for: <rdar://problem/3923983> background image decoding prevents page with 0Kb image from finishing to load * khtml/misc/loader.cpp: (CachedImage::data): Added call to notifyFinished so the 0Kb image case finishes loading. 2004-12-16 Adele Amchan <adele@apple.com> Reviewed by Chris. Fix for: <rdar://problem/3534824> VIP: some navigation links on safeway.com don't work due to a JavaScript quirk Added a call to ObjectImp::get before Window::get just returns Undefined. This was preventing us from getting the toString function from a Window object. * khtml/ecma/kjs_window.cpp: (Window::get): 2004-12-16 Ken Kocienda <kocienda@apple.com> Reviewed by John Fix for this bug: <rdar://problem/3918351> REGRESSION (Mail, 173-175+): Return before first char of line leaves insertion point in wrong place * khtml/editing/htmlediting.cpp: (khtml::InsertParagraphSeparatorCommand::doApply): Basically, did a rewrite of this function to do a better job than it was doing before. Added several test cases to prove I am on a better track. * khtml/editing/visible_position.cpp: (khtml::isFirstVisiblePositionInBlock): Tweaked the rules a bit to fix an issue very similar to the leaving-the-bar-node case problem I just fixed in a recent checkin (relevant markup: <p>foo</p>bar). This function was returning true for the first position in "bar". Wrong. Also tightened up other rule: Should not report true when relationship between blocks cannot be determined. (khtml::isLastVisiblePositionInBlock): Tightened up rule as above: Should not report true when relationship between blocks cannot be determined. * layout-tests/editing/inserting/insert-div-010-expected.txt: Added. * layout-tests/editing/inserting/insert-div-010.html: Added. * layout-tests/editing/inserting/insert-div-011-expected.txt: Added. * layout-tests/editing/inserting/insert-div-011.html: Added. * layout-tests/editing/inserting/insert-div-012-expected.txt: Added. * layout-tests/editing/inserting/insert-div-012.html: Added. * layout-tests/editing/inserting/insert-div-013-expected.txt: Added. * layout-tests/editing/inserting/insert-div-013.html: Added. * layout-tests/editing/inserting/insert-div-014-expected.txt: Added. * layout-tests/editing/inserting/insert-div-014.html: Added. * layout-tests/editing/inserting/insert-div-015-expected.txt: Added. * layout-tests/editing/inserting/insert-div-015.html: Added. * layout-tests/editing/inserting/insert-div-016-expected.txt: Added. * layout-tests/editing/inserting/insert-div-016.html: Added. * layout-tests/editing/inserting/insert-div-017-expected.txt: Added. * layout-tests/editing/inserting/insert-div-017.html: Added. 2004-12-16 Ken Kocienda <kocienda@apple.com> Reviewed by me Added a layout test based on my last checkin. * layout-tests/editing/selection/move-by-word-001-expected.txt: Added. * layout-tests/editing/selection/move-by-word-001.html: Added. 2004-12-16 Ken Kocienda <kocienda@apple.com> Reviewed by John Fix for this bug: <rdar://problem/3917929> REGRESSION (Mail): Command-left-arrow leaves insertion point too high after specific steps * khtml/editing/visible_text.cpp: (khtml::SimplifiedBackwardsTextIterator::advance): Add new check for leaving a text node and iterating backwards into a different block that is an descendent of the block containing the text node (as in leaving the "bar" node in this example: <p>foo</p>bar). (khtml::SimplifiedBackwardsTextIterator::handleNonTextNode): Call new emitNewlineForBROrText helper. (khtml::SimplifiedBackwardsTextIterator::emitNewlineForBROrText): Factor out code from handleNonTextNode, since it is called from there, and now also from advance(). 2004-12-15 Darin Adler <darin@apple.com> Reviewed by Ken. - fixed problem where plain-text would put a blank line between each <p> even when they have no margins * khtml/editing/visible_text.cpp: (khtml::TextIterator::exitNode): Add more checks and only set the "add one more newline" flag if the margin is sufficient. A more complete fix would ignore the node type altogether and use the render tree instead. 2004-12-14 John Sullivan <sullivan@apple.com> Reviewed by Ken. - rest of WebCore fix for <rdar://problem/3790011> undoable operations all say "Undo" in the menu, no specific action names * khtml/editing/edit_actions.h: new header, contains EditAction enum (renamed from HTMLEditAction, formerly in htmlediting.h) * ForwardingHeaders/editing/edit_actions.h: new forwarding header * khtml/editing/htmlediting.h: removed HTMLEditAction enum in favor of including edit_actions.h; added khtml:: namespace to EditAction usages; added m_editingAction ivar to ApplyStyleCommand * khtml/editing/htmlediting.cpp: (khtml::EditCommandPtr::editingAction): update for enum name change (khtml::EditCommand::editingAction): ditto (khtml::ApplyStyleCommand::ApplyStyleCommand): added editingAction parameter to this constructor (khtml::ApplyStyleCommand::editingAction): return new ivar (khtml::DeleteSelectionCommand::editingAction): update for enum name change (khtml::MoveSelectionCommand::editingAction): ditto (khtml::TypingCommand::editingAction): ditto (khtml::ReplaceSelectionCommand::editingAction): ditto * khtml/khtml_part.h: added EditAction parameter to applyStyle and computeAndSetTypingStyle * khtml/khtml_part.cpp: (KHTMLPart::computeAndSetTypingStyle): added EditAction parameter (KHTMLPart::applyStyle): ditto * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::registerCommandForUndoOrRedo): do the cast from EditAction to WebUndoAction a different way to match other code * kwq/WebCoreBridge.h: * kwq/WebCoreBridge.mm: (-[WebCoreBridge setTypingStyle:withUndoAction:]): added WebUndoAction parameter, passed into ApplyStyleCommand constructor (-[WebCoreBridge applyStyle:withUndoAction:]): ditto * WebCore.pbproj/project.pbxproj: updated for new files 2004-12-14 David Hyatt <hyatt@apple.com> Fix for 3562458, rowspan and colspan converted to ints so that large values will work for them. Remove the ridiculous 1024 limit on the span values. * khtml/html/html_tableimpl.cpp: (HTMLTableCellElementImpl::parseHTMLAttribute): * khtml/rendering/render_table.cpp: (RenderTableCell::collapsedBottomBorder): * khtml/rendering/render_table.h: (khtml::RenderTableCell::colSpan): (khtml::RenderTableCell::setColSpan): (khtml::RenderTableCell::rowSpan): (khtml::RenderTableCell::setRowSpan): (khtml::RenderTableCol::span): (khtml::RenderTableCol::setSpan): 2004-12-14 David Hyatt <hyatt@apple.com> Make sure <col> and <colgroup> can have spans updated dynamically as well. Reviewed by rjw * khtml/html/html_tableimpl.cpp: (HTMLTableColElementImpl::parseHTMLAttribute): * khtml/rendering/render_table.cpp: (RenderTableCell::updateFromElement): (RenderTableCol::updateFromElement): 2004-12-14 David Hyatt <hyatt@apple.com> Fix for 3833123, setting a cell's colspan does not update rendering like it should. Reviewed by rjw * khtml/html/html_tableimpl.cpp: (HTMLTableCellElementImpl::parseHTMLAttribute): * khtml/rendering/render_table.cpp: (RenderTableCell::RenderTableCell): (RenderTableCell::updateFromElement): 2004-12-14 Chris Blumenberg <cblu@apple.com> Fixed: <rdar://problem/3864536> crash copying text from other apps and pasting in a sticky in dashboard Reviewed by hyatt. * khtml/editing/markup.cpp: (khtml::createFragmentFromText): ref and deref the fragment since calling appendChild can completely deref it 2004-12-14 David Hyatt <hyatt@apple.com> Fix for 3785211. Make sure to do a layout with the old position before doing a layout after changing to the new position. This is actually a regression from my positioned object DHTML optimization. Reviewed by kocienda * khtml/rendering/render_object.cpp: (RenderObject::setStyle): 2004-12-14 David Hyatt <hyatt@apple.com> Make sure the class attribute works when newlines are present in the attribute. Reviewed by kocienda * khtml/html/html_elementimpl.cpp: (HTMLNamedAttrMapImpl::parseClassAttribute): 2004-12-14 David Hyatt <hyatt@apple.com> Fix for 3724938, float element is duplicated and paints twice. The logic for when to paint floats was actually fairly screwed up. This patch simplifies the logic and makes addOverhangingFloats easier to read by splitting it into two separate functions. Reviewed by kocienda * khtml/rendering/render_block.cpp: (khtml::RenderBlock::layoutBlockChildren): (khtml::RenderBlock::clearFloats): (khtml::RenderBlock::addOverhangingFloats): (khtml::RenderBlock::addIntrudingFloats): * khtml/rendering/render_block.h: 2004-12-14 John Sullivan <sullivan@apple.com> Reviewed by Ken. - added Undo action names for Cut, Paste, and Drag * khtml/editing/htmlediting.h: * khtml/editing/htmlediting.cpp: (khtml::DeleteSelectionCommand::editingAction): overridden to return HTMLEditActionCut (khtml::MoveSelectionCommand::editingAction): overridden to return HTMLEditActionDrag (khtml::ReplaceSelectionCommand::editingAction): overridden to return HTMLEditActionPaste 2004-12-14 John Sullivan <sullivan@apple.com> Reviewed by Ken. - architecture for WebCore part of fix for <rdar://problem/3790011> undoable operations all say "Undo" in the menu, no specific action names The remaining step is to make each EditCommand subclass override editingAction() to return an appropriate value. (Unfortunately the mapping between subclass and user-distinguishable action is not completely straightforward, so this next step isn't trivial.) * khtml/editing/htmlediting.h: new enum for HTMLEditAction * khtml/editing/htmlediting.cpp: (khtml::EditCommandPtr::editingAction): new method, calls through to EditCommand (khtml::EditCommand::editingAction): new method for subclasses to override, returns HTMLEditActionUnspecified at this level (khtml::TypingCommand::editingAction): proof of concept override, returns HTMLEditActionTyping * kwq/KWQKHTMLPart.h: declare new private bottleneck method registerCommandForUndoOrRedo * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::registerCommandForUndoOrRedo): new bottleneck method to reduce code duplication; now calls over the bridge to get the localized string to use for the Undo action name (KWQKHTMLPart::registerCommandForUndo): now calls new bottleneck method (KWQKHTMLPart::registerCommandForRedo): now calls new bottleneck method * kwq/WebCoreBridge.h: new enum for WebUndoAction, maps directly to HTMLEditAction. Declaration of nameForUndoAction: 2004-12-14 Darin Adler <darin@apple.com> Reviewed by John. - added a bunch of missing nil checks; our old version of inherits used to work for nil (by accident) * khtml/rendering/render_frames.cpp: (RenderPart::~RenderPart): Check widget for nil. (RenderPart::setWidget): Ditto. (RenderFrame::slotViewCleared): Ditto. (RenderPartObject::slotViewCleared): Ditto. 2004-12-13 Darin Adler <darin@apple.com> Reviewed by Ken. - moved markup-related functions into new sources files in the editing directory - removed all of the uses of dynamic_cast, preparing to turn off RTTI to make our code smaller and slightly faster * ForwardingHeaders/editing/markup.h: Added. * khtml/editing/markup.h: Added. * khtml/editing/markup.cpp: Added. * WebCore.pbproj/project.pbxproj: Added markup.h/cpp. * khtml/dom/dom_node.cpp: (Node::toHTML): Call createMarkup since there's no toHTML in NodeImpl any more. * khtml/html/html_elementimpl.cpp: (HTMLElementImpl::innerHTML): Changed to call createMarkup. (HTMLElementImpl::outerHTML): Ditto. * khtml/ecma/kjs_window.cpp: (Window::retrieveWindow): Comment out assert that uses dynamic_cast. (Window::retrieveActive): Ditto. * khtml/editing/htmlediting.h: Added forward class declaration needed now that I removed one elsewhere. * khtml/xml/dom_docimpl.h: Ditto. * khtml/khtml_part.cpp: (KHTMLPart::slotDebugDOMTree): Use createMarkup instead of toHTML. (KHTMLPart::processObjectRequest): Use inherits instead of dynamic_cast. * khtml/rendering/render_image.cpp: (RenderImage::paint): Add an explicit QChar conversion so this code still works even with the additional replace overloads added to QString. * kwq/KWQTextCodec.mm: (QTextCodec::fromUnicode): Ditto. * khtml/rendering/render_object.h: Removed the version of arenaDelete that does not take an object base pointer, because it used dynamic_cast in its implementation. Made the other version public. * khtml/rendering/render_object.cpp: Ditto. * khtml/rendering/render_replaced.cpp: (RenderWidget::deref): Pass object base pointer to arenaDelete. * khtml/xml/dom2_rangeimpl.h: Removed extra parameters from toHTML, and unneeded includes and declarations. * khtml/xml/dom2_rangeimpl.cpp: (DOM::RangeImpl::toHTML): Changed to call createMarkup, and moved all the support code into markup.cpp. * khtml/xml/dom_nodeimpl.h: Moved toHTML and related functions into markup.cpp. * khtml/xml/dom_nodeimpl.cpp: Ditto. * khtml/xml/dom_position.cpp: (DOM::startPosition): Implemented the version of this that takes a RangeImpl. Also added null checks so these return null positions rather than raising exceptions. (DOM::endPosition): Ditto. * khtml/khtmlview.h: Added an APPLE_CHANGES function so inherits can detect this class without dynamic_cast. * kwq/KWQFrame.h: Ditto. * kwq/KWQFrame.mm: (QFrame::isQFrame): Ditto. * kwq/KWQKPartsPart.h: Ditto. * kwq/KWQKPartsPart.mm: (KParts::ReadOnlyPart::isKPartsReadOnlyPart): Ditto. * kwq/KWQScrollView.h: Ditto. * kwq/KWQScrollView.mm: (QScrollView::isQScrollView): Ditto. * kwq/KWQKHTMLPart.h: Ditto. * kwq/KWQKHTMLPart.mm: (KHTMLView::isKHTMLView): Ditto. (KWQKHTMLPart::setTitle): Added an explicit QChar conversion so this code still works even with the additional replace overloads added to QString. (KWQKHTMLPart::setStatusBarText): Ditto. (KWQKHTMLPart::runJavaScriptAlert): Ditto. (KWQKHTMLPart::runJavaScriptConfirm): Ditto. (KWQKHTMLPart::runJavaScriptPrompt): Ditto. (KWQKHTMLPart::attributedString): Ditto. (KWQKHTMLPart::isCharacterSmartReplaceExempt): Ditto. (KWQKHTMLPart::isKHTMLPart): That dynamic_cast thing (see above). * kwq/KWQObject.h: Added virtual methods for the few cases where we need dynamic_cast-like behavior. * kwq/KWQObject.mm: (QObject::inherits): Changed to not use dynamic cast. (QObject::isKHTMLPart): Added. Returns false. (QObject::isKHTMLView): Ditto. (QObject::isKPartsReadOnlyPart): Ditto. (QObject::isQFrame): Ditto. (QObject::isQScrollView): Ditto. * kwq/KWQRenderTreeDebug.cpp: (write): Changed to use inherits rather than dynamic_cast. (writeSelection): Ditto. * kwq/KWQSlot.mm: (KWQSlot::call): Call through to the version with just a job pointer parameter rather than going straight on to the "no parameters at all" version. * kwq/KWQString.h: * kwq/KWQString.mm: (QString::replace): Added overloads. * kwq/WebCoreBridge.mm: (-[WebCoreBridge markupStringFromNode:nodes:]): Changed to call functions in markup.h. (-[WebCoreBridge markupStringFromRange:nodes:]): Ditto. (-[WebCoreBridge selectedString]): Added an explicit QChar conversion so this code still works even with the additional replace overloads added to QString. (-[WebCoreBridge stringForRange:]): Ditto. (-[WebCoreBridge copyDOMNode:copier:]): Changed to call functions in markup.h. (-[WebCoreBridge elementAtPoint:]): QChar conversion. (-[WebCoreBridge documentFragmentWithMarkupString:baseURLString:]): Changed to call functions in markup.h. (-[WebCoreBridge documentFragmentWithText:]): Changed to call functions in markup.h. 2004-12-13 Ken Kocienda <kocienda@apple.com> Reviewed by John Fix for this bug: <rdar://problem/3917956> REGRESSION (Mail): pasting can leave insertion point inside pasted text * khtml/editing/htmlediting.cpp: (khtml::ReplaceSelectionCommand::doApply): Fix coding mistake. Calculations of bool flag based on leading and trailing whitespace positions was reversed! I must have introduced this error recently when changing around this code. 2004-12-13 David Hyatt <hyatt@apple.com> Fix for 3915787, macobserver doesn't paint. floatRect() needed to be const in the base class. Also hit-testing and painting was using the wrong rect when setting up the x/y of the rect. Reviewed by mjs * khtml/rendering/render_block.cpp: (khtml::RenderBlock::paint): (khtml::RenderBlock::nodeAtPoint): * khtml/rendering/render_object.h: (khtml::RenderObject::floatRect): 2004-12-13 Ken Kocienda <kocienda@apple.com> Reviewed by John Fix for this bug: <rdar://problem/3917863> REGRESSION (Mail): pasting two lines of plain text copied from an RTF document results in two styles Code to figuire out the end node to merge was missing the font tag in the second paragraph written out by AppKit convert-to-HTML function. I refined the algorithm to be smarter. * khtml/editing/htmlediting.cpp: (khtml::ReplacementFragment::mergeEndNode): Refine algorithm used to walk through the fragment being pasted looking for the node that is the last inline in the last block of the fragment. The old algorithm was insufficiently powerful. (khtml::ReplacementFragment::enclosingBlock): New helper function. * khtml/editing/htmlediting.h: Add declaration for new helper function. * layout-tests/editing/pasteboard/paste-text-011-expected.txt: Added. * layout-tests/editing/pasteboard/paste-text-011.html: Added. 2004-12-13 Ken Kocienda <kocienda@apple.com> Reviewed by John WebCore side of fix for this bug: <rdar://problem/3768372> REGRESSION (Mail): paste of text ending in whitespace loses whitespace Note that we are coordinating with Doug Davidson on the AppKit team to make a complete fix for this bug. This change involves our half of the needed changes. Note that a lot of this change has to do with changing code to use a <br> element instead of a comment node as the mechanism to annotate HTML with information used to fix the bug. In some other places, code to handle comments in markup can be removed since we do not use comments for such annotations after this change. * khtml/editing/htmlediting.cpp: Remove isComment() helper; no longer needed. (khtml::ReplacementFragment::ReplacementFragment): Change m_hasInterchangeNewlineComment name to m_hasInterchangeNewline. (khtml::ReplacementFragment::isInterchangeNewlineNode): Name changed from isInterchangeNewlineComment. (khtml::ReplacementFragment::isInterchangeConvertedSpaceSpan): Local variable name convertedSpaceSpanClass changed to convertedSpaceSpanClassString to match other uses of the idiom used here. (khtml::ReplaceSelectionCommand::doApply): Change hasInterchangeNewlineComment() name to hasInterchangeNewline(). * khtml/editing/htmlediting.h: Change names as noted in .cpp file. Remove isComment() helper; no longer needed. (khtml::ReplacementFragment::hasInterchangeNewline): Change hasInterchangeNewlineComment() name to hasInterchangeNewline(). * khtml/html/html_elementimpl.cpp: (HTMLElementImpl::createContextualFragment): No longer has includeCommentsInDOM flag; no longer needed as we do not annotate fragments with comments any longer. * khtml/html/html_elementimpl.h: Ditto. * khtml/xml/dom2_rangeimpl.cpp: Remove addCommentToHTMLMarkup() helper. No longer needed. (DOM::interchangeNewlineMarkupString): New helper to return <br> element markup we use to annotate content for interchange. (DOM::RangeImpl::toHTML): No longer uses addCommentToHTMLMarkup; now calls interchangeNewlineMarkupString(). Remove spurious semi-colon. * khtml/xml/dom2_rangeimpl.h: Remove obsolete addCommentToHTMLMarkup() function and EAddToMarkup enum. * kwq/WebCoreBridge.mm: (-[WebCoreBridge documentFragmentWithMarkupString:baseURLString:]): No longer pass bool to ask for including comments in DOM when calling createContextualFragment(). 2004-12-10 John Sullivan <sullivan@apple.com> fixed deployment build bustage that John Louch ran into * kwq/KWQTextEdit.mm: (QTextEdit::setScrollBarModes): move bool declaration inside exception-handling block to avoid obscure compiler error 2004-12-10 Maciej Stachowiak <mjs@apple.com> Reviewed by Richard. <rdar://problem/3907484> REGRESSION (125-173): crash when KWQTextField is dealloc'ed while setting focus (profoundlearning.com) * kwq/KWQWidget.mm: (QWidget::setFocus): Handle the case where setting focus removed us from the superview - this can happen due to style changes on focus change. 2004-12-10 Ken Kocienda <kocienda@apple.com> Reviewed by Hyatt Fix for this bug: <rdar://problem/3915008> REGRESSION (Mail): Too much white space between lines separated by carriage returns There are a number of interesting things we could do to fix this bug, including SPI and involving the WebKit delegate, etc., however it seems reasonable to start with a hard-coded default that will fix the bug in the general case until such time as we can come up with more specific solutions. So, I added a helper method to create <p> elements with an inline style that sets top and bottom margins to 0.1em. * khtml/editing/htmlediting.cpp: (khtml::InsertParagraphSeparatorCommand::createParagraphElement): New factory method to create paragraph elements to insert. Also adds style information to keep the <p> from having "too-big" margins. (khtml::InsertParagraphSeparatorCommand::doApply): Call new factory method. * khtml/editing/htmlediting.h: Add createParagraphElement() declaration. 2004-12-10 Darin Adler <darin@apple.com> Reviewed by Hyatt. - fixed <rdar://problem/3910419> setting style={overflow:hidden} for <textarea> does not prevent appearance of scrollbars * khtml/rendering/render_form.h: Remove now-unneeded wrap parameter. * khtml/rendering/render_form.cpp: (RenderSubmitButton::rawText): Convert to QChar explicitly. (RenderLineEdit::updateFromElement): Ditto. (RenderLineEdit::slotTextChanged): Ditto. (RenderSelect::updateFromElement): Ditto. (TextAreaWidget::TextAreaWidget): Moved out most of the initialization since it's not something that requires a derived class. Now we don't use this class at all for WebCore, but they still have it for KDE. (TextAreaWidget::event): Moved out the ifdefs. (RenderTextArea::RenderTextArea): Moved setting code from TextAreaWidget here. Put a bunch that we don't need at all inside !APPLE_CHANGES, and removed the setting for scroll bars, since that's now done in setStyle. (RenderTextArea::handleFocusOut): Use type QTextEdit instead of TextAreaWidget since that's all that's needed and WebCore no longer has TextAreaWidget. (RenderTextArea::calcMinMaxWidth): Ditto. (RenderTextArea::setStyle): Add code to set scroll bar modes based on wrap setting combined with overflow style. (RenderTextArea::updateFromElement): Use type QTextEdit. (RenderTextArea::text): Ditto. (RenderTextArea::select): Ditto. * kwq/KWQTextArea.mm: (-[KWQTextArea _configureTextViewForWordWrapMode]): Don't set horizontal scroller visibility here, since it's now handled by QTextEdit. (-[KWQTextArea initWithFrame:]): Don't set vertical scroller visibility or scroller auto-hiding. * kwq/KWQTextEdit.h: Add setScrollBarModes function to be used instead of separate setter for the horizontal and vertical mode; needed because AppKit switches "autohide" for both at once. * kwq/KWQTextEdit.mm: (QTextEdit::setScrollBarModes): Added. 2004-12-10 Ken Kocienda <kocienda@apple.com> Reviewed by Darin Fix for this bug: <rdar://problem/3915047> HItting return in empty document inserts <p> but insertion point does not move * khtml/editing/htmlediting.cpp: (khtml::InsertParagraphSeparatorCommand::doApply): The issue is that the code to insert the <p> element for the return is not detecting the fact that the document is empty. Inserting a <p> into an empty body will not "add a new line" as the user expects. With this change, we'll add a second <p> when the root editable element has no rendered kids. 2004-12-10 Maciej Stachowiak <mjs@apple.com> Reviewed by John. <rdar://problem/3912979> REGRESSION (125-173): repro crash in HTMLCollectionImpl code (www.clubtravel.ie) * khtml/html/html_miscimpl.cpp: (HTMLCollectionImpl::traverseNextItem): Pass base when traversing the initial one step, otherwise we might inadvertantly step outside the collection base, thereby causing assertion failures or other badness later. 2004-12-10 Ken Kocienda <kocienda@apple.com> Reviewed by Chris * khtml/editing/htmlediting.cpp: (khtml::InsertParagraphSeparatorCommand::doApply): There is a starting block which is supposed to act as the root node for this operation. However, a loop was incorrectly coded, and a parent node search could escape this node. Also, one other piece to code to move nodes to the new <p> element should do nothing if the starting point for the selection is itself the starting block. (khtml::InsertParagraphSeparatorInQuotedContentCommand::doApply): Similar changes, in spirit, to the above function, though the names and concepts are slightly different. 2004-12-10 Maciej Stachowiak <mjs@apple.com> Reviewed by Ken. <rdar://problem/3907705> REGRESSION (172-173): DHTML menus are broken at hrweb.apple.com * khtml/dom/html_document.cpp: (HTMLDocument::nameableItems): New method, wrapper for HTMLCollection creation. * khtml/dom/html_document.h: * khtml/ecma/kjs_html.cpp: (KJS::HTMLDocument::tryGet): use doc.nameableItems(), not doc.all()! * khtml/html/html_miscimpl.cpp: (HTMLCollectionImpl::traverseNextItem): Added new DOC_NAMEABLE_ITEMS type, this represents the items that can be accessed directly as a document propery, in particular forms, images, objects, applets and embeds. (HTMLCollectionImpl::updateNameCache): Fix some nameCache/idCache confusion. (HTMLFormCollectionImpl::updateNameCache): Ditto. * khtml/html/html_miscimpl.h: (DOM::HTMLCollectionImpl::): Added new type. 2004-12-10 Ken Kocienda <kocienda@apple.com> Reviewed by John Fix for this bug: <rdar://problem/3914779> REGRESSION (Mail): Cannot arrow navigate to position before last character on text-wrapped line * khtml/rendering/render_text.cpp: (RenderText::caretRect): Code was not detecting space at the end of a line correctly. Now it does. 2004-12-10 Ken Kocienda <kocienda@apple.com> Reviewed by John Fix for this bug: <rdar://problem/3914755> REGRESSION (Mail): Insertion point disappears after pasting paragraph * khtml/editing/htmlediting.cpp: (khtml::ReplaceSelectionCommand::doApply): Selection could end up in a "placeholder" node that was removed from the document when pasting. This caused the disappearance. Now this is detected, and the selection is shifted to a node that is in the document. 2004-12-09 Richard Williamson <rjw@apple.com> Check to disable threaded decoding during layout tests wasn't invoking function, just checking address of function, which would always return true. * kwq/WebCoreImageRendererFactory.m: (+[WebCoreImageRendererFactory shouldUseThreadedDecoding]): 2004-12-09 David Hyatt <hyatt@apple.com> Fix for 3892686, left/top overflow was not being propagated properly up to containing blocks because of a math error. Also fix a bug I noticed on the same page where relative position offsets were not being added in properly for all inlines when repainting. Reviewed by rjw * khtml/rendering/render_block.cpp: (khtml::RenderBlock::layoutBlockChildren): * khtml/rendering/render_flow.cpp: (RenderFlow::getAbsoluteRepaintRect): 2004-12-09 David Hyatt <hyatt@apple.com> Fix for 3867545, finance.yahoo.com lays out incorrectly. Add a quirk that will prevent tables from moving down below floats when there is insufficient space. Instead we will match Gecko and just spill out of the containing block to the right. This appears to be the more common desired behavior, despite being wrong. WinIE sometimes wraps and sometimes doesn't, but it's really hard for us to match its inconsistency. Reviewed by john * khtml/rendering/render_block.cpp: (khtml::RenderBlock::getClearDelta): * layout-tests/apple-only/base/www.cnn.com/index-expected.txt: * layout-tests/apple-only/base/www.ebay.com/index-expected.txt: * layout-tests/apple-only/base/www.excite.com/index-expected.txt: * layout-tests/fast/block/margin-collapse/102-expected.txt: * layout-tests/fast/block/margin-collapse/102.html: 2004-12-09 Richard Williamson <rjw@apple.com> Fixed <rdar://problem/3914078> worldclock crashing gc related Use ProtectedValue for Context2D instance members. Reviewed by Maciej. * khtml/ecma/kjs_html.h: 2004-12-09 John Sullivan <sullivan@apple.com> Reviewed by Dave. - fixed <rdar://problem/3731099> Move AXTitle string for image elements to AXDescription * kwq/KWQAccObject.mm: (-[KWQAccObject title]): moved image alt tag code out of here (-[KWQAccObject accessibilityDescription]): moved image alt tag code into this new method (-[KWQAccObject accessibilityAttributeNames]): include AXDescription in the set of attributes that ordinary elements return; this means that ordinary elements that aren't images will return a nil description, which isn't ideal, but is in keeping with the way the rest of these attributes work here. (-[KWQAccObject accessibilityAttributeValue:]): call accessibilityDescription when asked for AXDescription 2004-12-09 Ken Kocienda <kocienda@apple.com> Reviewed by Harrison Fix for this bug: <rdar://problem/3910425> REGRESSION (Mail): Crash in ReplaceSelectionCommand; selection is empty, leading to null deref * khtml/editing/htmlediting.cpp: (khtml::MoveSelectionCommand::doApply): The node representing the destination for the move may have been deleted. If this is the case, set the destination to the node the delete command provides in its ending selection. === Safari-175 === 2004-12-09 Ken Kocienda <kocienda@apple.com> Reviewed by John Fix for this bug: <rdar://problem/3912841> REGRESSION (173-TOT): Some images report 0x0 dimensions on layout tests, causes spurious test failures The new threaded image decoding capability can throw off layout tests. The issue is that the decoding callback may not be delivered before the program asks for the dimensions of an image in order to wrote the layout dimensions. More generally, I think we need to ensure that there are no races in layout tests, so I have added a flag to the render tree debug code that we can set when debugging. * kwq/KWQRenderTreeDebug.cpp: (debuggingRenderTree): New function. Returns flag which tells whether the program is debugging the render tree. (externalRepresentation): Sets debuggingRenderTree flag to true; * kwq/KWQRenderTreeDebug.h: * kwq/WebCoreImageRendererFactory.m: (+[WebCoreImageRendererFactory shouldUseThreadedDecoding]): Checks debuggingRenderTree flag and will not do threaded decoding in any case if the flag is set. 2004-12-09 Chris Blumenberg <cblu@apple.com> Fix for busting XMLHTTPRequest. Reviewed by kocienda. * khtml/misc/loader.cpp: (Loader::servePendingRequests): pass true for deliverAllData * kwq/KWQKJob.h: (KIO::get): take deliverAllData param (KIO::http_post): ditto * kwq/KWQKJobClasses.h: * kwq/KWQKJobClasses.mm: (KIO::TransferJob::TransferJob): if deliverAllData, create signal with data param (KIO::TransferJob::emitResult): if deliverAllData, call signal with data param 2004-12-09 Ken Kocienda <kocienda@apple.com> Reviewed by John <rdar://problem/3911011> REGRESSION (Mail): Spaces at end of line causing word wrap lost when copied/pasted * khtml/xml/dom_nodeimpl.cpp: (NodeImpl::renderedText): Fixed the code so that spaces at the end of lines are not skipped. 2004-12-07 Richard Williamson <rjw@apple.com> Support threaded image decoding on machines w/ > 2 CPUs. Reviewed by Maciej and Chris. * khtml/misc/loader.cpp: (CachedImageCallback::notifyUpdate): (CachedImageCallback::notifyFinished): (CachedImageCallback::notifyDecodingError): (CachedImageCallback::handleError): (CachedImageCallback::clear): (CachedImage::CachedImage): (CachedImage::clear): (CachedImage::data): (CachedImage::checkNotify): (Loader::servePendingRequests): (Loader::slotFinished): (Loader::numRequests): (Loader::cancelRequests): (Loader::removeBackgroundDecodingRequest): * khtml/misc/loader.h: (khtml::CachedImageCallback::CachedImageCallback): (khtml::CachedImageCallback::ref): (khtml::CachedImageCallback::deref): (khtml::CachedImage::decoderCallback): * khtml/rendering/render_object.cpp: (RenderObject::setPixmap): * kwq/KWQPixmap.h: * kwq/KWQPixmap.mm: (-[WebImageCallback initWithCallback:khtml::]): (-[WebImageCallback _commonTermination]): (-[WebImageCallback dealloc]): (-[WebImageCallback finalize]): (-[WebImageCallback notify]): (-[WebImageCallback setImageSourceStatus:]): (-[WebImageCallback status]): (QPixmap::shouldUseThreadedDecoding): (QPixmap::receivedData): * kwq/WebCoreImageRenderer.h: * kwq/WebCoreImageRendererFactory.h: * kwq/WebCoreImageRendererFactory.m: (+[WebCoreImageRendererFactory shouldUseThreadedDecoding]): (+[WebCoreImageRendererFactory setShouldUseThreadedDecoding:]): 2004-12-07 Ken Kocienda <kocienda@apple.com> Reviewed by John * khtml/editing/htmlediting.cpp: (khtml::InsertParagraphSeparatorInQuotedContentCommand::doApply): Fix a problem with my change in thei code yesterday. Call to insertBlockPlaceholderIfNeeded() must be done after new block has been inserted, otherwise a crash can result. Shuffle down call to insertBlockPlaceholderIfNeeded() a couple of lines (where the node is inserted), and all is good. 2004-12-07 Ken Kocienda <kocienda@apple.com> Reviewed by John Fix for this bug: <rdar://problem/3907422> REGRESSION (Mail): Pasting quoted content can place content after body element * khtml/editing/htmlediting.cpp: (khtml::ReplaceSelectionCommand::doApply): Detect when the body element is the "reference block" used for determining the location for inserting content. Do not allow an insert before or after if the reference block is the body. Perform insertNodeAt(0) and appendNode, respectively, in the block-is-body case. * layout-tests/editing/inserting/insert-3907422-fix-expected.txt: Added. * layout-tests/editing/inserting/insert-3907422-fix.html: Added. 2004-12-07 Darin Adler <darin@apple.com> Reviewed by Don. - fixed <rdar://problem/3908701> REGRESSION: Cursor does not change to "hand" over active links * kwq/KWQEvent.mm: (positionForEvent): Add NSMouseMoved to list of events that have mouse location. 2004-12-07 Ken Kocienda <kocienda@apple.com> Reviewed by John Changed name of constant from KHTMLInterchangeNewline to AppleInterchangeNewline. I discussed this with Hyatt and he agreed that going with "Apple" names was OK. * khtml/editing/html_interchange.h: Name change, as described above. * khtml/editing/htmlediting.cpp: (khtml::ReplacementFragment::isInterchangeNewlineComment): Ditto. * khtml/xml/dom2_rangeimpl.cpp: (DOM::RangeImpl::toHTML): Ditto. 2004-12-07 Ken Kocienda <kocienda@apple.com> Reviewed by me Added a couple more layout tests. * layout-tests/editing/deleting/delete-line-013-expected.txt: Added. * layout-tests/editing/deleting/delete-line-013.html: Added. * layout-tests/editing/deleting/delete-line-014-expected.txt: Added. * layout-tests/editing/deleting/delete-line-014.html: Added. 2004-12-06 Maciej Stachowiak <mjs@apple.com> Reviewed by Hyatt. - fixed <rdar://problem/3906974> assertion failure in QWidget::beforeMouseDown clicking on <select multiple> * kwq/KWQListBox.mm: (QListBox::QListBox): Initialize KWQListBoxScrollView with this. (-[KWQListBoxScrollView initWithListBox:]): Make this class a KWQWidgetHolder. (-[KWQListBoxScrollView widget]): See above. (-[KWQTableView mouseDown:]): Pass outerView rather than self to beforeMouseDown and afterMouseDown, to avoid triggering an assertion failure. 2004-12-06 David Hyatt <hyatt@apple.com> Fix for 3615411, the linesAppended optimization was old and broken, and it's easier with the new code fixes made by me, kocienda and harrison to just remove it. Reviewed by mjs * khtml/rendering/bidi.cpp: (khtml::RenderBlock::layoutInlineChildren): * khtml/rendering/render_block.cpp: (khtml:::RenderFlow): * khtml/rendering/render_block.h: * khtml/rendering/render_flow.cpp: (RenderFlow::dirtyLinesFromChangedChild): 2004-12-06 David Hyatt <hyatt@apple.com> Fix for 3787133, some web pages print with many blank pages. Make sure to use the real page print rect and not a damage rect that can be changed when intersected with the clip regions of the web page. Reviewed by john * khtml/rendering/render_canvas.h: (khtml::RenderCanvas::printRect): (khtml::RenderCanvas::setPrintRect): * khtml/rendering/render_flow.cpp: (RenderFlow::paintLines): * khtml/rendering/render_list.cpp: (RenderListMarker::paint): * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::adjustPageHeight): 2004-12-06 David Harrison <harrison@apple.com> Reviewed by Ken Kocienda and Dave Hyatt (OOPS!). <rdar://problem/3849947> Typing after pasting line does not appear until after window resize. * khtml/rendering/render_flow.cpp: (RenderFlow::dirtyLinesFromChangedChild): Dirty the line above because new child can inval the cached line break position of previous line. 2004-12-06 David Hyatt <hyatt@apple.com> Fix for 3254464, radio buttons do not work for quiz on netscape.com. Left/top overflow needed to be implemented. This also fixes 3106907, link hover color only partially set on rollover and the more general architecture bug 3126929, handle top/left overflow. This patch also fixes 3902891, scroll bar of position:fixed content moves when a page is scrolled. Finally, the Emerson regression 3869718 (error involving computing the rightmost/lowest position of overflow:auto regions and web pages) has been fixed. Reviewed by mjs * khtml/rendering/bidi.cpp: (khtml::RenderBlock::computeHorizontalPositionsForLine): (khtml::RenderBlock::checkLinesForOverflow): * khtml/rendering/render_block.cpp: (khtml:::RenderFlow): (khtml::RenderBlock::overflowHeight): (khtml::RenderBlock::overflowWidth): (khtml::RenderBlock::overflowLeft): (khtml::RenderBlock::overflowTop): (khtml::RenderBlock::overflowRect): (khtml::RenderBlock::layoutBlock): (khtml::RenderBlock::layoutBlockChildren): (khtml::RenderBlock::paint): (khtml::RenderBlock::floatRect): (khtml::RenderBlock::lowestPosition): (khtml::RenderBlock::rightmostPosition): (khtml::RenderBlock::leftmostPosition): (khtml::RenderBlock::nodeAtPoint): * khtml/rendering/render_block.h: * khtml/rendering/render_box.h: (khtml::RenderBox::borderBox): (khtml::RenderBox::borderTopExtra): (khtml::RenderBox::borderBottomExtra): * khtml/rendering/render_layer.cpp: (RenderLayer::paintScrollbars): (mustExamineRenderer): (RenderLayer::intersectsDamageRect): (RenderLayer::containsPoint): * khtml/rendering/render_line.cpp: (khtml::InlineFlowBox::placeBoxesHorizontally): (khtml::InlineFlowBox::verticallyAlignBoxes): * khtml/rendering/render_line.h: (khtml::InlineBox::leftOverflow): (khtml::InlineBox::rightOverflow): (khtml::InlineFlowBox::setVerticalOverflowPositions): (khtml::RootInlineBox::RootInlineBox): (khtml::RootInlineBox::leftOverflow): (khtml::RootInlineBox::rightOverflow): (khtml::RootInlineBox::setVerticalOverflowPositions): (khtml::RootInlineBox::setHorizontalOverflowPositions): * khtml/rendering/render_object.h: (khtml::RenderObject::borderBox): (khtml::RenderObject::overflowLeft): (khtml::RenderObject::overflowTop): (khtml::RenderObject::overflowRect): (khtml::RenderObject::floatRect): * khtml/rendering/render_table.cpp: (RenderTable::layout): (RenderTable::paint): (RenderTable::paintBoxDecorations): (RenderTable::calcMinMaxWidth): * khtml/rendering/render_table.h: (khtml::RenderTableCell::borderTopExtra): (khtml::RenderTableCell::borderBottomExtra): * kwq/KWQRect.h: * kwq/KWQRect.mm: (QRect::inflate): 2004-12-06 Maciej Stachowiak <mjs@apple.com> Reviewed by John. - fixed <rdar://problem/3903797> scripts can cause other frames/windows to execute arbitrary script using javascript: URLs I changed all unprotected places that can navigate a different window or frame from script to check for a javascript: URL, and if found, to check for safety using cross-site-script rules. I considered a few other possible exploits and made no change: - document.location is already protected because the document object itself is protected - frame.src, frame.location, iframe.src and targetted links are all safe because setting the URL of a frame to a javascript: URL executes the script in the context of the parent * khtml/ecma/kjs_window.cpp: (WindowFunc::tryCall): (Location::put): (LocationFunc::tryCall): 2004-12-06 Ken Kocienda <kocienda@apple.com> Reviewed by Maciej Fix for this bug: <rdar://problem/3890955> 8A314: Forward delete sometimes fails to delete the selected quoted text * khtml/editing/htmlediting.cpp: (khtml::DeleteSelectionCommand::handleSpecialCaseBRDelete): Fixed bonehead coding mistake in the check for one of the special cases being checked for in this function. The specific case intends to check for a selection that is only a <br> after a block ends (as in </div><br>). If it sees such markup, it deletes only the <br> and bails. However, this code would run in *any* case where a selection ended in a <br> after a block and would not delete any part of the selection preceding the <br>. Bad. I have tightened the check to see that only a <br> is selected. Fixing the bug above was accomplished with an additional call to DOM::Position::downstream. This new use of the function exposed this bug: <rdar://problem/3907666> Incorrectly coded loop in Position::downstream can lead to infinite loop * khtml/xml/dom_position.cpp: (DOM::Position::downstream): I am ashamed of my first cut at this. Rewrote the loop so it does not have this fatal flaw. It is a much better design as well. * layout-tests/editing/deleting/delete-3800834-fix-expected.txt: Changes made this test have what I consider to be a better result. Going with it. 2004-12-06 Chris Blumenberg <cblu@apple.com> Fixed: <rdar://problem/3871718> REGRESSION (125-168): text marked bold with font that does not have bold variant copies as non-bold Reviewed by hyatt. * kwq/DOM.mm: (-[DOMElement _font]): new SPI for AppKit * kwq/DOMPrivate.h: 2004-12-06 Darin Adler <darin@apple.com> Reviewed by Maciej. - fixed <rdar://problem/3906327> Select All of a large document is slow (>15 secs on my machine for attached specimen) * kwq/KWQScrollView.mm: (QScrollView::updateContents): Intersect with visibleRect before calling through to NSView to dirty; NSView could also be more efficient in this case (I filed 3906343). 2004-12-06 John Sullivan <sullivan@apple.com> Darin found what appears to be the real leak that we were falsely blaming on the 'leaks' tool (3880245). I made the change, and ran layout tests and PLT to make sure nothing barfed. * khtml/css/cssparser.cpp: (CSSParser::parseValue): call clearProperties() instead of just setting numParsedProperties to 0 (CSSParser::parseDeclaration): ditto (CSSParser::createStyleDeclaration): ditto 2004-12-06 Ken Kocienda <kocienda@apple.com> Reviewed by me New layout tests. * layout-tests/editing/inserting/insert-div-001-expected.txt: Added. * layout-tests/editing/inserting/insert-div-001.html: Added. * layout-tests/editing/inserting/insert-div-002-expected.txt: Added. * layout-tests/editing/inserting/insert-div-002.html: Added. * layout-tests/editing/inserting/insert-div-003-expected.txt: Added. * layout-tests/editing/inserting/insert-div-003.html: Added. * layout-tests/editing/inserting/insert-div-004-expected.txt: Added. * layout-tests/editing/inserting/insert-div-004.html: Added. * layout-tests/editing/inserting/insert-div-005-expected.txt: Added. * layout-tests/editing/inserting/insert-div-005.html: Added. * layout-tests/editing/inserting/insert-div-006-expected.txt: Added. * layout-tests/editing/inserting/insert-div-006.html: Added. * layout-tests/editing/inserting/insert-div-007-expected.txt: Added. * layout-tests/editing/inserting/insert-div-007.html: Added. * layout-tests/editing/inserting/insert-div-008-expected.txt: Added. * layout-tests/editing/inserting/insert-div-008.html: Added. * layout-tests/editing/inserting/insert-div-009-expected.txt: Added. * layout-tests/editing/inserting/insert-div-009.html: Added. 2004-12-06 Ken Kocienda <kocienda@apple.com> Reviewed by Harrison Fix for this bug: <rdar://problem/3906948> REGRESSION (Mail): Insert paragraph code can make the insertion point "stick" in place. * khtml/editing/htmlediting.cpp: (khtml::InsertParagraphSeparatorCommand::doApply): Call insertBlockPlaceholderIfNeeded(), passing block being added to this function. This ensures that the added block has a height. (khtml::InsertParagraphSeparatorInQuotedContentCommand::doApply): Ditto. 2004-12-06 Ken Kocienda <kocienda@apple.com> Reviewed by John * khtml/dom/dom_string.cpp: (DOM::DOMString::substring): Expose method already on DOMStrimgImpl. * khtml/dom/dom_string.h: Ditto. * khtml/editing/htmlediting.cpp: (khtml::CompositeEditCommand::rebalanceWhitespace): New helper to create and execute a RebalanceWhitespaceCommand instance. (khtml::DeleteSelectionCommand::doApply): Call rebalanceWhitespace() after running command. (khtml::InsertLineBreakCommand::doApply): Ditto. (khtml::InsertParagraphSeparatorCommand::doApply): Ditto. (khtml::InsertParagraphSeparatorInQuotedContentCommand::doApply): Ditto. (khtml::InsertTextCommand::input): Ditto. (khtml::RebalanceWhitespaceCommand::RebalanceWhitespaceCommand): New command. (khtml::RebalanceWhitespaceCommand::~RebalanceWhitespaceCommand): Ditto. (khtml::RebalanceWhitespaceCommand::doApply): Ditto. (khtml::RebalanceWhitespaceCommand::doUnapply): Ditto. (khtml::RebalanceWhitespaceCommand::preservesTypingStyle): Ditto. (khtml::ReplaceSelectionCommand::completeHTMLReplacement): Ditto. * khtml/editing/htmlediting.h: Ditto. (khtml::RebalanceWhitespaceCommand::): Ditto. 2004-12-05 Darin Adler <darin@apple.com> - fixed small problem in my check-in from yesterday * kwq/KWQEvent.mm: (positionForEvent): Get location from event without raising exception if it's the wrong type. (clickCountForEvent): Same, for clickCount. (QMouseEvent::QMouseEvent): Use the new helper functions so this can be constructed even with the wrong type of NSEvent. Required for cases where a keyboard event causes a "click" and we need to synthesize a QMouseEvent for KHTML internal use, using the key down NSEvent. 2004-12-04 Darin Adler <darin@apple.com> Reviewed by John. - fixed <rdar://problem/3878329> REGRESSION (169-170): colors are wrong for my.yahoo.com due to CSS background parsing changes * khtml/css/cssparser.cpp: (CSSParser::parseBackgroundShorthand): Changed function so it doesn't rely on the position attribute being at the end of the array and then moved position attribute before color attribute so it takes precedence. Since "0" can be both the X coordinate of a position and a legal color (meaning black), we need to do position first. - fixed <rdar://problem/3760869> click events for input type=button or type=checkbox don't have flags like shiftKey set * khtml/rendering/render_form.h: Remove unused RenderFormElement fields. * khtml/rendering/render_form.cpp: (RenderFormElement::RenderFormElement): Take out code to set a bunch of unused fields. (RenderFormElement::slotClicked): Change to create the QMouseEvent from the actual mouse event rather than creating it with all the flags set to 0, using the new QMouseEvent constructor that does so. * kwq/KWQEvent.h: Added constructor that takes no parameters which uses the current event from AppKit. Made the click count getter const and added an isDoubleClick that matches the logic used elsewhere. Added a fixState helper method so the constructors can save code. * kwq/KWQEvent.mm: (QMouseEvent::QMouseEvent): Factored out the state-fixing code that was in the two existing constructors and added a third constructor that uses the "current event" from AppKit (used above). (QMouseEvent::fixState): Compute state and click count based on event type. - fixed first symptom of <rdar://problem/3830936> REGRESSION (125-165): crash due to null font family, hang at changeforamerica.com * kwq/KWQFontFamily.mm: (KWQFontFamily::getNSFamily): Handle empty strings specially so we don't run into trouble when the family name is a null string. This prevents the crash, but there are still other problems that may have the same underlying cause in CSS. - fixed <rdar://problem/3829808> Safari crashes when adding a DOM node that was removed from an XMLHTTP request result * khtml/html/html_baseimpl.cpp: (HTMLBodyElementImpl::insertedIntoDocument): Added nil check before calling scheduleRelayout. This is new code so the nil-dereference is a recent regression. 2004-12-03 Chris Blumenberg <cblu@apple.com> New fixes for: <rdar://problem/3685766> WebDataSource is missing subresources when they use cached WebCore data <rdar://problem/3722434> REGRESSION?: Assertion failure trying to drag image in iframe (itapema.sc.gov.br) <rdar://problem/3903173> REGRESSION (172-TOT): assertion failure and crash in slotAllData logging into hotmail account <rdar://problem/3902749> REGRESSION (Tiger): missing image symbol does not appear Reviewed by darin, rjw, kocienda. * khtml/misc/loader.cpp: (CachedObject::~CachedObject): (CachedCSSStyleSheet::checkNotify): (Loader::servePendingRequests): (Loader::slotFinished): (Loader::slotReceivedResponse): (Cache::requestImage): (Cache::requestScript): * khtml/misc/loader.h: (khtml::CachedObject::CachedObject): (khtml::CachedObject::response): (khtml::CachedObject::allData): * kwq/KWQKJobClasses.h: * kwq/KWQKJobClasses.mm: (KIO::TransferJobPrivate::TransferJobPrivate): (KIO::TransferJobPrivate::~TransferJobPrivate): (KIO::TransferJob::TransferJob): (KIO::TransferJob::assembleResponseHeaders): (KIO::TransferJob::retrieveCharset): (KIO::TransferJob::emitResult): (KIO::TransferJob::emitReceivedResponse): * kwq/KWQLoader.h: * kwq/KWQLoader.mm: (KWQHeaderStringFromDictionary): (KWQCheckCacheObjectStatus): (KWQIsResponseURLEqualToURL): (KWQResponseURL): (KWQResponseMIMEType): (KWQCacheObjectExpiresTime): (khtml::CachedObject::setResponse): (khtml::CachedObject::setAllData): * kwq/KWQPixmap.h: * kwq/KWQPixmap.mm: (QPixmap::QPixmap): * kwq/KWQResourceLoader.mm: (-[KWQResourceLoader finishJobAndHandle:]): (-[KWQResourceLoader cancel]): (-[KWQResourceLoader reportError]): (-[KWQResourceLoader finishWithData:]): * kwq/KWQSignal.h: * kwq/KWQSignal.mm: (KWQSignal::call): * kwq/KWQSlot.h: * kwq/KWQSlot.mm: (KWQSlot::KWQSlot): (KWQSlot::call): * kwq/WebCoreBridge.h: * kwq/WebCoreResourceLoader.h: 2004-12-04 Darin Adler <darin@apple.com> Reviewed by John. - fixed <rdar://problem/3876093> REGRESSION (166-167): Setting slider control's value from JavaScript has no effect (breaks RSS) * khtml/rendering/render_form.cpp: (RenderSlider::updateFromElement): Call setValue to update the value of the DOM element rather than modifying the m_value data member directly. We don't use m_value at all for sliders now, and in fact the code relies on the fact that m_value is null. Setting m_value to a non-null value was causing the bug. (RenderSlider::slotSliderValueChanged): Ditto. 2004-12-03 John Sullivan <sullivan@apple.com> Reviewed by Ken. - fixed <rdar://problem/3889411> REGRESSION (125-172): repro crash in khtml::BackgroundLayer::cullEmptyLayers * khtml/rendering/render_style.cpp: (BackgroundLayer::cullEmptyLayers): added missing nil check === Safari-173 === 2004-12-03 Ken Kocienda <kocienda@apple.com> Reviewed by me Roll out some recent changes by Chris that caused a performance regression. Fix is in hand, but it is a little risky this close to a submission. So, we have decided to roll back the change with the regression and roll in the new code after we submit. * khtml/css/cssproperties.c: (hash_prop): (findProp): * khtml/css/cssvalues.c: (hash_val): (findValue): * khtml/misc/htmlattrs.c: (hash_attr): (findAttr): * khtml/misc/htmltags.c: (hash_tag): (findTag): * khtml/misc/loader.cpp: (CachedObject::~CachedObject): (CachedObject::setResponse): (CachedCSSStyleSheet::checkNotify): (Loader::servePendingRequests): (Loader::slotFinished): (Loader::slotReceivedResponse): (Cache::requestImage): (Cache::requestScript): * khtml/misc/loader.h: (khtml::CachedObject::CachedObject): (khtml::CachedObject::response): * kwq/KWQKJobClasses.h: * kwq/KWQKJobClasses.mm: (KIO::TransferJobPrivate::TransferJobPrivate): (KIO::TransferJobPrivate::~TransferJobPrivate): (KIO::TransferJob::TransferJob): (KIO::TransferJob::assembleResponseHeaders): (KIO::TransferJob::retrieveCharset): (KIO::TransferJob::emitResult): (KIO::TransferJob::emitReceivedResponse): * kwq/KWQLoader.h: * kwq/KWQLoader.mm: (KWQHeaderStringFromDictionary): (KWQCheckCacheObjectStatus): (KWQRetainResponse): (KWQReleaseResponse): (KWQIsResponseURLEqualToURL): (KWQResponseURL): (KWQResponseMIMEType): (KWQResponseTextEncodingName): (KWQResponseHeaderString): (KWQCacheObjectExpiresTime): (KWQLoader::KWQLoader): * kwq/KWQPixmap.h: * kwq/KWQPixmap.mm: (QPixmap::QPixmap): * kwq/KWQResourceLoader.mm: (-[KWQResourceLoader finishJobAndHandle]): (-[KWQResourceLoader cancel]): (-[KWQResourceLoader reportError]): (-[KWQResourceLoader finish]): * kwq/KWQSignal.h: * kwq/KWQSignal.mm: (KWQSignal::call): * kwq/KWQSlot.h: * kwq/KWQSlot.mm: (KWQSlot::KWQSlot): (KWQSlot::call): * kwq/WebCoreBridge.h: * kwq/WebCoreResourceLoader.h: 2004-12-03 John Sullivan <sullivan@apple.com> Reviewed by Chris. - fixed <rdar://problem/3903990> can't tab to all items on www.google.com any more (other pages too?) * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::nextKeyViewInFrameHierarchy): when checking whether we moved the focus to another view, make sure we didn't "move" it to our documentView, because that's no move at all. 2004-12-03 Darin Adler <darin@apple.com> Reviewed by Vicki. - fixed <rdar://problem/3901109> REGRESSION (171-172): repro crash in DOM::NodeImpl::setChanged at chick-fil-a.com * khtml/css/css_valueimpl.cpp: (DOM::CSSMutableStyleDeclarationImpl::CSSMutableStyleDeclarationImpl): Added missing initialization for base class and node pointer. - fixed a few places that could leave dangling node pointers * khtml/html/html_baseimpl.cpp: (HTMLBodyElementImpl::~HTMLBodyElementImpl): Clear out the node pointer when the node is destroyed. * khtml/html/html_elementimpl.cpp: (HTMLElementImpl::~HTMLElementImpl): Ditto. 2004-12-03 Chris Blumenberg <cblu@apple.com> Fix for performance regression. My original patch added a signal for passing the data of a resource to its WebCore cache object. This patch passes the data with the preexisting "finished" symbol so we make less calls. Fixed: <rdar://problem/3903173> REGRESSION (172-TOT): assertion failure and crash in slotAllData logging into hotmail account Reviewed by rjw. * khtml/misc/loader.cpp: (Loader::servePendingRequests): pass data param to slotFinished, removed allData signal (Loader::slotFinished): take data param * khtml/misc/loader.h: * kwq/KWQKJobClasses.h: * kwq/KWQKJobClasses.mm: (KIO::TransferJob::TransferJob): have m_result take a data param, removed m_allData (KIO::TransferJob::emitResult): take data param and pass it * kwq/KWQResourceLoader.mm: (-[KWQResourceLoader finishJobAndHandle:]): take data param and pass it (-[KWQResourceLoader cancel]): pass nil for data (-[KWQResourceLoader reportError]): ditto (-[KWQResourceLoader finishWithData:]): pass data * kwq/KWQSlot.mm: (KWQSlot::KWQSlot): pass data param to slotFinished (KWQSlot::call): added support for slotFinished_Loader, removed slotAllData 2004-12-03 Ken Kocienda <kocienda@apple.com> Reviewed by John Did some clean up in the Position class as a result of trying to write some new layout tests and discovering a bug along the way. I removed these three functions from the Position class: 1. bool isFirstRenderedPositionOnLine() const; 2. bool isLastRenderedPositionOnLine() const; 3. static bool renderersOnDifferentLine(RenderObject *r1, long o1, RenderObject *r2, long o2); 4. bool inFirstEditableInRootEditableElement() const; The first two have replacements in the VisiblePosition class, and some code has been moved to use these new variants. The third function was a helper used only by these first two function, and can be removed as well. The fourth function was not used by anyone. * khtml/editing/htmlediting.cpp: (khtml::InsertTextCommand::input): Change over to use VisiblePosition isFirstVisiblePositionOnLine(). * khtml/editing/visible_position.cpp: (khtml::visiblePositionsOnDifferentLines): Added an additional check for blocks to this function. Incorrect results were being returned when asking about positions at the starts of blocks. * khtml/xml/dom_position.cpp: (DOM::Position::previousCharacterPosition): Change over to use VisiblePosition isFirstVisiblePositionOnLine(). (DOM::Position::nextCharacterPosition): Change over to use VisiblePosition isLastVisiblePositionOnLine(). (DOM::Position::rendersInDifferentPosition): Removed use of #3 helper in a log message. We can live without it. * khtml/xml/dom_position.h: Update header for deletions. 2004-12-03 Ken Kocienda <kocienda@apple.com> Reviewed by John Terminology change in execCommand command identifiers. Specifically, the name of "InsertNewline" command has been changed to "InsertLineBreak". This matches the terminology used by AppKit. It is also more accurate, since the insertion of a "br" element is what the command does. The inspiration for this change is so the -insertNewline AppKit method can be mapped to insert a new "div" element in a document and avoid ambiguity with what the javascript editing command does. * khtml/editing/jsediting.cpp * layout-tests/editing/deleting/delete-tab-004.html * layout-tests/editing/editing.js * layout-tests/editing/inserting/insert-3654864-fix.html * layout-tests/editing/inserting/insert-3659587-fix.html * layout-tests/editing/inserting/insert-3775316-fix.html * layout-tests/editing/inserting/insert-3800346-fix.html * layout-tests/editing/inserting/insert-br-001.html * layout-tests/editing/inserting/insert-br-002.html * layout-tests/editing/inserting/insert-br-003.html * layout-tests/editing/inserting/insert-br-004.html * layout-tests/editing/inserting/insert-br-005.html * layout-tests/editing/inserting/insert-br-006.html * layout-tests/editing/inserting/insert-br-007.html * layout-tests/editing/inserting/insert-br-008.html * layout-tests/editing/inserting/insert-tab-004.html * layout-tests/editing/inserting/insert-text-with-newlines.html * layout-tests/editing/pasteboard/paste-text-010.html 2004-12-02 Ken Kocienda <kocienda@apple.com> Reviewed by John Fix for this bug: <rdar://problem/3786362> REGRESSION (Mail): pasted text loses one newline * khtml/editing/htmlediting.cpp: (khtml::InsertLineBreakCommand::doApply): Added check for strict mode before adding an extra br element at the end of a block. This is only necessary in quirks mode. Also, lower-case "br" used to make element. (khtml::ReplaceSelectionCommand::doApply): If the replacement adds a br element as the last element in a block and the document is in quirks mode, add an additional br to make the one in the replacement content show up. This turns out to be much the same logic as is done in InsertLineBreakCommand. * layout-tests/editing/inserting/insert-3786362-fix-expected.txt: Added. * layout-tests/editing/inserting/insert-3786362-fix.html: Added. 2004-12-02 Richard Williamson <rjw@apple.com> Fixed <rdar://problem/3841332> REGRESSION (125.9-167u): repro crash in -[KWQPageState invalidate] involving .Mac images Ensure that the document is cleared when leaving a non-HTML page. This ensures that the b/f cache won't incorrectly trash the previous state when restoring. Reviewed by John. * kwq/WebCoreBridge.h: * kwq/WebCoreBridge.mm: (-[WebCoreBridge openURL:reload:contentType:refresh:lastModified:pageCache:]): (-[WebCoreBridge canCachePage]): (-[WebCoreBridge clear]): 2004-12-02 Ken Kocienda <kocienda@apple.com> Reviewed by Richard Fix for this bug: <rdar://problem/3857775> 8A293: Mail.app crashes converting copy-pasted text into plain text * khtml/xml/dom2_rangeimpl.cpp: (DOM::RangeImpl::commonAncestorContainer): Return the document element if no common ancestor container was found. This can happen in cases where the DOM was built from malformed markup (as in the case of this bug where there is content after the body tag). Did a little code clean up as well. (DOM::RangeImpl::compareBoundaryPoints): Made code more robust by adding some null checks. 2004-12-02 Ken Kocienda <kocienda@apple.com> Reviewed by Chris Fix for this bug: <rdar://problem/3668157> REGRESSION (Mail): shift-click deselects when selection was created right-to-left * khtml/khtml_part.cpp: (KHTMLPart::handleMousePressEventSingleClick): Use RangeImpl::compareBoundaryPoints to figure out which end of the selection to extend. 2004-12-02 David Harrison <harrison@apple.com> Reviewed by Ken Kocienda. <rdar://problem/3834917> REGRESSION (Mail): double-clicking blank line selects end of previous line Fixed originally reported bug plus the case of double-clicking whitespace at the beginning of a line, which has a similar result. * khtml/editing/visible_text.cpp: (khtml::SimplifiedBackwardsTextIterator::SimplifiedBackwardsTextIterator): (khtml::SimplifiedBackwardsTextIterator::handleTextNode): (khtml::SimplifiedBackwardsTextIterator::handleReplacedElement): (khtml::SimplifiedBackwardsTextIterator::handleNonTextNode): (khtml::SimplifiedBackwardsTextIterator::emitCharacter): Distinguish BR from whitespace. * khtml/editing/visible_text.h: Distinguish BR from whitespace. * khtml/editing/visible_units.cpp: (khtml::previousWordBoundary): Use UPSTREAM visible position now that SimplifiedBackwardsTextIterator distinguishes BR from whitespace. Otherwise, double-clicking at end of line would result in caret selection at start of next line. 2004-12-02 Ken Kocienda <kocienda@apple.com> Reviewed by John Fix for this bug: <rdar://problem/3900996> Crash dragging past end of contentEditable DIV, at DOM::RangeImpl::pastEndNode() const + 24 * khtml/xml/dom_position.cpp: (DOM::Position::equivalentRangeCompliantPosition): Fixed this function so that it constrains the offset of the position to be >= 0 and <= number of kids of its node. Not doing this constraining led to a DOM exception trying to use a Position returned from this function to set the boundary point of a Range (which eventually led to the crash). Since this crash happened, it seems like this function was failing in its contract to return a range-compliant position, hence the need for this fix. 2004-12-01 Ken Kocienda <kocienda@apple.com> Reviewed by me Moving code only. * khtml/editing/htmlediting.cpp: Move ReplaceSelectionCommand into alphabetical order with regard to other editing commands. The class had a name change ages ago, and it was never moved. * khtml/editing/htmlediting.h: Ditto. 2004-12-01 Ken Kocienda <kocienda@apple.com> Reviewed by Hyatt Some improvements for paste, including some new code to annotate whitespace when writing to the pasteboard to ensure that the meaning of the markup on the pasteboard is unambiguous. There is also new code for reading this annotated markup from the pasteboard, removing the nodes that were added only to prevent ambiguity. * WebCore.pbproj/project.pbxproj: Added html_interchange.h and html_interchange.cpp files. The header should have been added earlier, but I did not do so. * khtml/editing/html_interchange.cpp: Added. (convertHTMLTextToInterchangeFormat): * khtml/editing/html_interchange.h: Added some new constants for use with whitespace annotations. * khtml/editing/htmlediting.cpp: (khtml::ReplacementFragment::ReplacementFragment): Now looks for and removes annotations added for whitespace. Also fixed a bug in the code that counts blocks in a fragment. (khtml::ReplacementFragment::isInterchangeConvertedSpaceSpan): New helper. Recognizes annotation spans. (khtml::ReplacementFragment::insertNodeBefore): New helper. (khtml::ReplaceSelectionCommand::doApply): Fixed a bug in the code that sets the start position for the replacement after deleting. This was causing a bug when pasting at the end of a block. * khtml/editing/htmlediting.h: Add some new declarations. * khtml/xml/dom2_rangeimpl.cpp: (DOM::RangeImpl::toHTML): Calls to startMarkup now pass true for the new annotate flag. * khtml/xml/dom_nodeimpl.cpp: (NodeImpl::stringValueForRange): New helper. (NodeImpl::renderedText): New helper to return only the rendered text in a node. (NodeImpl::startMarkup): Now takes an additional flag to control whether interchange annotations should be added. Called by the paste code. * khtml/xml/dom_nodeimpl.h: Added and modified function declarations. New test to check the khtml::ReplaceSelectionCommand::doApply fix. * layout-tests/editing/pasteboard/paste-text-010-expected.txt: Added. * layout-tests/editing/pasteboard/paste-text-010.html: Added. 2004-11-30 Chris Blumenberg <cblu@apple.com> * ChangeLog: removed conflict marker 2004-11-30 Chris Blumenberg <cblu@apple.com> Fixed: <rdar://problem/3685766> WebDataSource is missing subresources when they use cached WebCore data <rdar://problem/3722434> REGRESSION?: Assertion failure trying to drag image in iframe (itapema.sc.gov.br) Reviewed by darin. * khtml/misc/loader.cpp: (CachedObject::~CachedObject): release m_allData (CachedObject::setAllData): new (Loader::servePendingRequests): connect slotAllData (Loader::slotAllData): new (Cache::requestImage): tweak * khtml/misc/loader.h: (khtml::CachedObject::CachedObject): set allData to 0 (khtml::CachedObject::allData): new * kwq/KWQKJobClasses.h: * kwq/KWQKJobClasses.mm: (KIO::TransferJob::TransferJob): set m_allData (KIO::TransferJob::emitAllData): new * kwq/KWQLoader.mm: (KWQCheckCacheObjectStatus): pass WebKit the data instead of the length of the resource * kwq/KWQResourceLoader.mm: (-[KWQResourceLoader finishWithData:]): renamed to pass all data for the resource * kwq/KWQSlot.mm: (KWQSlot::KWQSlot): support for slotAllData (KWQSlot::call): * kwq/WebCoreBridge.h: * kwq/WebCoreResourceLoader.h: 2004-11-30 Maciej Stachowiak <mjs@apple.com> Reviewed by John. 2004-11-30 Maciej Stachowiak <mjs@apple.com> Reviewed by John. <rdar://problem/3805311> REGRESSION (159-163): onload in dynamically written document not called (causes blank search page at Japanese EPP site, many others) * khtml/khtml_part.cpp: (KHTMLPart::begin): call setParsing on document here after opening - from now on we'll only set parsing to true for a document open caused by page loading, not a programmatic one. * khtml/xml/dom_docimpl.cpp: (DocumentImpl::open): don't setParsing to true here any more. 2004-11-30 Maciej Stachowiak <mjs@apple.com> Reviewed by John. - fix recent regression from collection perf fixes. * khtml/html/html_miscimpl.cpp: (HTMLFormCollectionImpl::updateNameCache): Look up the name attribute in the name cache, not the id cache (d'oh!) 2004-11-30 Darin Adler <darin@apple.com> Reviewed by Ken. - rolled in a KDE fix for a problem that may underlie a number of crashes * khtml/xml/dom2_rangeimpl.cpp: (RangeImpl::compareBoundaryPoints): Rolled in a change from the KDE guys to fix a subtle problem. Code said "n = n =". - rolled in a KDE fix for a containingBlock crash * khtml/rendering/render_object.cpp: Roll in a change from KDE that adds frameset to the list of elements that can not be a containingBlock. They said this fixes a crash, although I did not look into that further. - fixed <rdar://problem/3884660> 8A305: Repro crash in QScrollBar::setValue (affects Safari RSS) * kwq/KWQButton.mm: (-[KWQButton initWithQButton:]): Set up target and action here instead of in caller. (-[KWQButton detachQButton]): Added. (-[KWQButton sendConsumedMouseUpIfNeeded]): Check button for nil instead of checking target. (-[KWQButton mouseDown:]): Add calls to QWidget::beforeMouseDown/afterMouseDown. (-[KWQButton widget]): Added. (-[KWQButton becomeFirstResponder]): Added check to handle when button is 0. (-[KWQButton resignFirstResponder]): Ditto. (-[KWQButton canBecomeKeyView]): Ditto. (QButton::QButton): Remove target and action setup; handled in KWQButton now. (QButton::~QButton): Call detachQButton instead of setTarget:nil. * kwq/KWQComboBox.mm: (QComboBox::~QComboBox): Call detachQComboBox. (-[KWQPopUpButtonCell detachQComboBox]): Added. (-[KWQPopUpButtonCell trackMouse:inRect:ofView:untilMouseUp:]): Handle case where box is 0. (-[KWQPopUpButtonCell setHighlighted:]): Ditto. (-[KWQPopUpButton action:]): Ditto. (-[KWQPopUpButton widget]): Tweaked. (-[KWQPopUpButton mouseDown:]): Added. Calls QWidget::beforeMouseDown/afterMouseDown. (-[KWQPopUpButton becomeFirstResponder]): Handle case where widget is 0. (-[KWQPopUpButton resignFirstResponder]): Ditto. (-[KWQPopUpButton canBecomeKeyView]): Ditto. * kwq/KWQLineEdit.mm: (QLineEdit::~QLineEdit): Updated to use new detachQLineEdit name. * kwq/KWQListBox.mm: (-[KWQTableView mouseDown:]): Added. Calls QWidget::beforeMouseDown/afterMouseDown. * kwq/KWQScrollBar.h: Removed m_scroller field. * kwq/KWQScrollBar.mm: (-[KWQScrollBar initWithQScrollBar:]): Rearranged a little bit. (-[KWQScrollBar detachQScrollBar]): Added. (-[KWQScrollBar widget]): Added. (-[KWQScrollBar mouseDown:]): Added. Calls QWidget::beforeMouseDown and afterMouseDown. (QScrollBar::QScrollBar): Changed to no longer set m_scroller. (QScrollBar::~QScrollBar): Changed to call detachQScrollBar. No longer calls removeFromSuperview. (QScrollBar::setValue): Chagned to use getView instad of m_scrollBar. (QScrollBar::setKnobProportion): Ditto. (QScrollBar::scrollbarHit): Ditto. * kwq/KWQScrollView.mm: (QScrollView::addChild): Changed to call QWidget to add to superview to accomodate the hack where we don't remove right away when doing mouse tracking. (QScrollView::removeChild): Changed to call QWidget to remove from superview to accomodate the hack where we don't add right away when doing mouse tracking. * kwq/KWQSlider.h: Added destructor. * kwq/KWQSlider.mm: (-[KWQSlider initWithQSlider:]): Tweaked a little. (-[KWQSlider detachQSlider]): Added. (-[KWQSlider mouseDown:]): Added call to QWidget::beforeMouseDown/afterMouseDown. (-[KWQSlider widget]): Added. (QSlider::~QSlider): Added. Calls detachQSlider. * kwq/KWQTextArea.h: Added detachQTextEdit method. * kwq/KWQTextArea.mm: (-[KWQTextArea detachQTextEdit]): Added. (-[KWQTextArea textDidChange:]): Added check for widget of 0. (-[KWQTextArea becomeFirstResponder]): Ditto. (-[KWQTextArea nextKeyView]): Ditto. (-[KWQTextArea previousKeyView]): Ditto. (-[KWQTextArea drawRect:]): Ditto. (-[KWQTextAreaTextView insertTab:]): Ditto. (-[KWQTextAreaTextView insertBacktab:]): Ditto. (-[KWQTextAreaTextView shouldDrawInsertionPoint]): Ditto. (-[KWQTextAreaTextView selectedTextAttributes]): Ditto. (-[KWQTextAreaTextView mouseDown:]): Ditto. (-[KWQTextAreaTextView keyDown:]): Ditto. (-[KWQTextAreaTextView keyUp:]): Ditto. * kwq/KWQTextEdit.h: Added ~QTextEdit. * kwq/KWQTextEdit.mm: (QTextEdit::~QTextEdit): Added. Calls detachQTextEdit. * kwq/KWQTextField.h: Changed invalidate to detachQLineEdit. * kwq/KWQTextField.mm: (-[KWQTextFieldController detachQLineEdit]): Changed. * kwq/KWQWidget.h: Added addToSuperview/removeFromSuperview for use from QScrollView. Added beforeMouseDown and afterMouseDown for use in widget implementations. Removed unused hasMouseTracking function. * kwq/KWQWidget.mm: (QWidget::QWidget): Initialize two new fields. (QWidget::~QWidget): Added code to remove view when widget is destroyed. (QWidget::getOuterView): Remove unneeded exception blocking since we're just caling superview. (QWidget::addToSuperview): Added. (QWidget::removeFromSuperview): Added. (QWidget::beforeMouseDown): Added. (QWidget::afterMouseDown): Added. * khtml/rendering/render_layer.cpp: (RenderLayer::setHasHorizontalScrollbar): Remove parent parameter; let addChild call addSubview:. (RenderLayer::setHasVerticalScrollbar): Ditto. 2004-11-30 Ken Kocienda <kocienda@apple.com> Reviewed by John Fix for this bug: <rdar://problem/3863031> REGRESSION (Mail): caret continues flashing while mouse is down * khtml/khtml_part.cpp: (KHTMLPart::timerEvent): Add a check for whether the mouse is down. Keep the caret drawn with no blink if it is. 2004-11-30 Ken Kocienda <kocienda@apple.com> Reviewed by John Fix for this bug: <rdar://problem/3861602> cursor gets lost trying to backspace to delete a form control * khtml/khtml_part.cpp: (KHTMLPart::setFocusNodeIfNeeded): This function would clear the selection if a <button> or <input type=image> was checked for focus since these elements are keyboard-focusable, but not mouse focusable. Also, this function did not work hard enough to set the focused node, and was content to clear it if the first element checked failed the test, rather than looking more at parents. This would have the effect of clearing, then resetting the focus on a DIV containing a button or image with content on either side of it in the process of arrowing over such content. 2004-11-30 Ken Kocienda <kocienda@apple.com> Reviewed by John * khtml/editing/htmlediting.cpp: (khtml::ReplaceSelectionCommand::doApply): Fix smart replace, which I (knowingly) broke with yesterday's checkin. Also, call updateLayout() in one more place to prevent stale information being returned from caretMaxOffset(). * khtml/khtml_part.cpp: (KHTMLPart::isCharacterSmartReplaceExempt): Make this virtual and always return true. This gets rid of an ugly APPLE_CHANGES block and use of KWQ(part) in ReplaceSelectionCommand. * khtml/khtml_part.h: To help out with the isCharacterSmartReplaceExempt cleanup, add declaration. * kwq/KWQKHTMLPart.h: To help out with the isCharacterSmartReplaceExempt cleanup, make isCharacterSmartReplaceExempt virtual. 2004-11-30 Ken Kocienda <kocienda@apple.com> Reviewed by me * khtml/editing/htmlediting.cpp: (khtml::ReplacementFragment::mergeEndNode): Fixed one-line coding mistake that created an endless loop. Seemed simple enough to land without review. 2004-11-29 Ken Kocienda <kocienda@apple.com> Reviewed by Chris Rewrite of paste code (specifically the ReplaceSelectionCommand class). Many more cases are handled correctly now, including selections that span multiple blocks, and cases where content on the pasteboard ends in newlines (or what appear to be newlines to a user, really block ends or BRs). I also made one small, but important change in the copy code to annotate the markup written to the pasteboard to support these selections ending in newlines. New header that defines a couple of constants used in copying and pasting. * ForwardingHeaders/editing/html_interchange.h: Added. * khtml/editing/html_interchange.h: Added. Rewrite of the ReplaceSelectionCommand. There are several new helper functions, as well as a new helper class, ReplacementFragment, which encapsulates information and functions pertaining to a document fragment that is being inserted into a document. * khtml/editing/htmlediting.cpp: (khtml::ReplacementFragment::ReplacementFragment): (khtml::ReplacementFragment::~ReplacementFragment): (khtml::ReplacementFragment::firstChild): Simple accessor. (khtml::ReplacementFragment::lastChild): Ditto. (khtml::ReplacementFragment::mergeStartNode): Looks at the nodes in a fragment and determines the starting node to use for merging into the block containing the start of the selection. (khtml::ReplacementFragment::mergeEndNode): Same as above, but for the end of the selection. (khtml::ReplacementFragment::pruneEmptyNodes): Simple helper. (khtml::ReplacementFragment::isInterchangeNewlineComment): Determines if a node is the special annotation comment added in by the copy code. (khtml::ReplacementFragment::removeNode): Simple helper. (khtml::isComment): Simple helper. (khtml::isProbablyBlock): Determines if a node is of a type that is usually rendered as a block. I would like to do better than this some day, but this check will hold us until I can do better. (khtml::ReplaceSelectionCommand::ReplaceSelectionCommand): (khtml::ReplaceSelectionCommand::~ReplaceSelectionCommand): (khtml::ReplaceSelectionCommand::doApply): (khtml::ReplaceSelectionCommand::completeHTMLReplacement): Figures out the right ending selection. * khtml/editing/htmlediting.h: Declarations for the new ReplacementFragment class. (khtml::ReplacementFragment::root): (khtml::ReplacementFragment::type): (khtml::ReplacementFragment::isEmpty): (khtml::ReplacementFragment::isSingleTextNode): (khtml::ReplacementFragment::isTreeFragment): (khtml::ReplacementFragment::hasMoreThanOneBlock): (khtml::ReplacementFragment::hasLogicalNewlineAtEnd): This smaller set of changes markup generation to add the newline annotation described in the comment at the start of this entry. * khtml/xml/dom2_rangeimpl.cpp: (DOM::RangeImpl::addCommentToHTMLMarkup): Simple helper. (DOM::RangeImpl::toHTML): Added new EAnnotateForInterchange default argument to control whether comment annotations are added to the markup generated. * khtml/xml/dom2_rangeimpl.h: Add some new declarations. * kwq/WebCoreBridge.mm: (-[WebCoreBridge markupStringFromRange:nodes:]): Request that markup resulting from call to DOM::RangeImpl::toHTML uses annotations when generating. New tests. * layout-tests/editing/pasteboard/paste-text-001-expected.txt: Added. * layout-tests/editing/pasteboard/paste-text-001.html: Added. * layout-tests/editing/pasteboard/paste-text-002-expected.txt: Added. * layout-tests/editing/pasteboard/paste-text-002.html: Added. * layout-tests/editing/pasteboard/paste-text-003-expected.txt: Added. * layout-tests/editing/pasteboard/paste-text-003.html: Added. * layout-tests/editing/pasteboard/paste-text-004-expected.txt: Added. * layout-tests/editing/pasteboard/paste-text-004.html: Added. * layout-tests/editing/pasteboard/paste-text-005-expected.txt: Added. * layout-tests/editing/pasteboard/paste-text-005.html: Added. * layout-tests/editing/pasteboard/paste-text-006-expected.txt: Added. * layout-tests/editing/pasteboard/paste-text-006.html: Added. * layout-tests/editing/pasteboard/paste-text-007-expected.txt: Added. * layout-tests/editing/pasteboard/paste-text-007.html: Added. * layout-tests/editing/pasteboard/paste-text-008-expected.txt: Added. * layout-tests/editing/pasteboard/paste-text-008.html: Added. * layout-tests/editing/pasteboard/paste-text-009-expected.txt: Added. * layout-tests/editing/pasteboard/paste-text-009.html: Added. 2004-11-29 Ken Kocienda <kocienda@apple.com> Reviewed by Harrison Made two small changes that make it possible for comments to have DOM nodes made for them when pasting. This relies on some earlier work I did some days ago. * khtml/xml/dom_nodeimpl.cpp: (NodeImpl::startMarkup): Get the string from the comment. * kwq/WebCoreBridge.mm: (-[WebCoreBridge documentFragmentWithMarkupString:baseURLString:]): Did some very minor rearranging. Now passes a flag when creating a contextual fragment, requesting that comments be included in the DOM. 2004-11-29 Ken Kocienda <kocienda@apple.com> Reviewed by Harrison Added some new helpers to the VisiblePosition class. I will begin to use these when I check in my improved paste code. * khtml/editing/visible_position.cpp: (khtml::blockRelationship) (khtml::visiblePositionsInDifferentBlocks) (khtml::isFirstVisiblePositionInBlock) (khtml::isFirstVisiblePositionInNode) (khtml::isLastVisiblePositionInBlock) * khtml/editing/visible_position.h 2004-11-29 Ken Kocienda <kocienda@apple.com> Reviewed by Harrison * khtml/xml/dom_position.cpp: (DOM::Position::downstream): Fix a bug in downstream that prevented a call with DoNotStayInBlock specified from obeying that directive. The old code would stop at an outer block boundary in the case where that block had a block as its first child. The correct behavior is to drill into that inner block (and continue on drilling down, if possible), to find the correct position. 2004-11-29 Ken Kocienda <kocienda@apple.com> Reviewed by Harrison Small improvements to the node-display debugging helpers. * khtml/xml/dom_nodeimpl.cpp: (NodeImpl::displayTree): Make the rootNode be this if there is no rootEditableElement. * khtml/xml/dom_nodeimpl.h: Make displayNode take a default argument of "" for its string. 2004-11-29 Ken Kocienda <kocienda@apple.com> Reviewed by Harrison * khtml/editing/htmlediting.cpp: (khtml::DeleteSelectionCommand::handleGeneralDelete): The downstream position in this function may need to be adjusted when deleting text off the front part of a text node. This fixes a problem I discovered while improving the paste command, where the insertion poitn wound up in the wrong place after the delete. 2004-11-29 Ken Kocienda <kocienda@apple.com> Reviewed by Harrison Add a new helper function to insert a paragraph separator. Will be used in my upcoming paste improvments. * khtml/editing/htmlediting.cpp: Added function (khtml::CompositeEditCommand::insertParagraphSeparator) * khtml/editing/htmlediting.h: Ditto. 2004-11-23 David Harrison <harrison@apple.com> Added various comments. * khtml/editing/htmlediting.cpp: (khtml::StyleChange::init): (khtml::ApplyStyleCommand::doApply): (khtml::ApplyStyleCommand::applyBlockStyle): (khtml::ApplyStyleCommand::applyInlineStyle): 2004-11-23 David Hyatt <hyatt@apple.com> Hit testing in table cells with top/bottom space from vertical alignment didn't work. I forgot about the super-secret yPos() lie that table cells do. Use m_y instead of yPos(). * khtml/rendering/render_block.cpp: (khtml::RenderBlock::nodeAtPoint): 2004-11-22 David Hyatt <hyatt@apple.com> Make sure you can use document.createElement to make a <canvas> element. * khtml/xml/dom_docimpl.cpp: (DocumentImpl::createHTMLElement): 2004-11-22 Maciej Stachowiak <mjs@apple.com> Reviewed by Dave. <rdar://problem/3492044> performing JavaScript operations on form elements is slower than WinIE (HTMLFormCollection) <rdar://problem/3489679> selecting an item on the Apache bugzilla query page is very slow (HTMLFormCollection) <rdar://problem/3477810> checking 80 check boxes with JavaScript is 10x slower than in IE (HTMLFormCollection) <rdar://problem/3760962> JavaScript that toggles checkboxes is slow (HTMLCollection,HTMLFormCollection) * khtml/ecma/kjs_html.cpp: (KJS::HTMLDocument::tryGet): * khtml/html/html_formimpl.cpp: (DOM::HTMLFormElementImpl::HTMLFormElementImpl): (DOM::HTMLFormElementImpl::~HTMLFormElementImpl): * khtml/html/html_formimpl.h: * khtml/html/html_miscimpl.cpp: (HTMLCollectionImpl::HTMLCollectionImpl): (HTMLCollectionImpl::~HTMLCollectionImpl): (HTMLCollectionImpl::CollectionInfo::CollectionInfo): (HTMLCollectionImpl::CollectionInfo::reset): (HTMLCollectionImpl::resetCollectionInfo): (HTMLCollectionImpl::checkForNameMatch): (appendToVector): (HTMLCollectionImpl::updateNameCache): (HTMLCollectionImpl::namedItems): (HTMLFormCollectionImpl::HTMLFormCollectionImpl): (HTMLFormCollectionImpl::~HTMLFormCollectionImpl): (HTMLFormCollectionImpl::item): (HTMLFormCollectionImpl::updateNameCache): * khtml/html/html_miscimpl.h: 2004-11-22 David Hyatt <hyatt@apple.com> Improve the WebCore cache so that the maximum cacheable object size is scaled based off the total cache size. Reviewed by mjs * khtml/misc/loader.cpp: (CachedObject::finish): (Cache::flush): (Cache::setSize): * khtml/misc/loader.h: (khtml::Cache::maxCacheableObjectSize): 2004-11-22 David Hyatt <hyatt@apple.com> Fix for 3673381, huge directory listing so slow it seems like a hang. Rework painting and hit testing so that it crawls the line box tree instead of the render tree. This allows more precise intersection/containment testing that lets us short circuit earlier when painting and hit testing. Reviewed by mjs * khtml/khtml_part.cpp: (KHTMLPart::isPointInsideSelection): * khtml/rendering/render_block.cpp: (khtml::RenderBlock::paint): (khtml::RenderBlock::paintChildren): (khtml::RenderBlock::paintObject): (khtml::RenderBlock::paintFloats): (khtml::RenderBlock::nodeAtPoint): * khtml/rendering/render_block.h: * khtml/rendering/render_box.cpp: (RenderBox::nodeAtPoint): * khtml/rendering/render_box.h: * khtml/rendering/render_br.h: * khtml/rendering/render_canvas.cpp: (RenderCanvas::paint): * khtml/rendering/render_flow.cpp: (RenderFlow::paintLines): (RenderFlow::hitTestLines): (RenderFlow::caretRect): (RenderFlow::addFocusRingRects): (RenderFlow::paintFocusRing): (RenderFlow::paintOutlines): (RenderFlow::paintOutlineForLine): * khtml/rendering/render_flow.h: * khtml/rendering/render_frames.cpp: (RenderFrameSet::nodeAtPoint): * khtml/rendering/render_frames.h: * khtml/rendering/render_image.cpp: (RenderImage::nodeAtPoint): * khtml/rendering/render_image.h: * khtml/rendering/render_inline.cpp: (RenderInline::paint): (RenderInline::nodeAtPoint): * khtml/rendering/render_inline.h: * khtml/rendering/render_layer.cpp: (RenderLayer::paintLayer): (RenderLayer::hitTest): (RenderLayer::hitTestLayer): * khtml/rendering/render_layer.h: * khtml/rendering/render_line.cpp: (khtml::InlineBox::paint): (khtml::InlineBox::nodeAtPoint): (khtml::InlineFlowBox::flowObject): (khtml::InlineFlowBox::nodeAtPoint): (khtml::InlineFlowBox::paint): (khtml::InlineFlowBox::paintBackgrounds): (khtml::InlineFlowBox::paintBackground): (khtml::InlineFlowBox::paintBackgroundAndBorder): (khtml::InlineFlowBox::paintDecorations): (khtml::EllipsisBox::paint): (khtml::EllipsisBox::nodeAtPoint): (khtml::RootInlineBox::paintEllipsisBox): (khtml::RootInlineBox::paint): (khtml::RootInlineBox::nodeAtPoint): * khtml/rendering/render_line.h: (khtml::InlineRunBox::paintBackgroundAndBorder): * khtml/rendering/render_object.cpp: (RenderObject::hitTest): (RenderObject::setInnerNode): (RenderObject::nodeAtPoint): * khtml/rendering/render_object.h: (khtml::RenderObject::PaintInfo::PaintInfo): (khtml::RenderObject::PaintInfo::~PaintInfo): (khtml::RenderObject::paintingRootForChildren): (khtml::RenderObject::shouldPaintWithinRoot): * khtml/rendering/render_table.cpp: (RenderTable::layout): (RenderTable::paint): * khtml/rendering/render_text.cpp: (simpleDifferenceBetweenColors): (correctedTextColor): (InlineTextBox::nodeAtPoint): (InlineTextBox::paint): (InlineTextBox::selectionStartEnd): (InlineTextBox::paintSelection): (InlineTextBox::paintMarkedTextBackground): (InlineTextBox::paintDecoration): (RenderText::posOfChar): * khtml/rendering/render_text.h: (khtml::RenderText::paint): (khtml::RenderText::layout): (khtml::RenderText::nodeAtPoint): * khtml/xml/dom2_eventsimpl.cpp: (MouseEventImpl::computeLayerPos): * khtml/xml/dom_docimpl.cpp: (DocumentImpl::prepareMouseEvent): * kwq/KWQAccObject.mm: (-[KWQAccObject accessibilityHitTest:]): * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::scrollOverflowWithScrollWheelEvent): (KWQKHTMLPart::eventMayStartDrag): (KWQKHTMLPart::khtmlMouseMoveEvent): * kwq/WebCoreBridge.mm: (-[WebCoreBridge elementAtPoint:]): (-[WebCoreBridge _positionForPoint:]): 2004-11-22 Maciej Stachowiak <mjs@apple.com> Reviewed by Dave. <rdar://problem/3890961> selecting an item on the Apache bugzilla query page can be sped up 10% (HTMLFormCollection) <rdar://problem/3890958> JavaScript that toggles checkboxes can be improved 73% (HTMLCollection,HTMLFormCollection) This avoids the O(N^2) penalty for named item traversal for form collections. It also combines the item traversal logic for all non-form collection operations into a single traverseNextItem function. This avoids having 5 copies of the big switch statement for this. Also fixed a bug that prevented the last form element from being removed properly. * khtml/html/html_formimpl.cpp: (DOM::removeFromVector): * khtml/dom/html_misc.cpp: (HTMLCollection::namedItems): * khtml/dom/html_misc.h: * khtml/ecma/kjs_html.cpp: (KJS::HTMLCollection::getNamedItems): * khtml/html/html_miscimpl.cpp: (HTMLCollectionImpl::traverseNextItem): (HTMLCollectionImpl::calcLength): (HTMLCollectionImpl::length): (HTMLCollectionImpl::item): (HTMLCollectionImpl::nextItem): (HTMLCollectionImpl::checkForNameMatch): (HTMLCollectionImpl::namedItem): (HTMLCollectionImpl::namedItems): (HTMLCollectionImpl::nextNamedItem): (HTMLFormCollectionImpl::calcLength): (HTMLFormCollectionImpl::namedItem): (HTMLFormCollectionImpl::nextNamedItem): (HTMLFormCollectionImpl::namedItems): * khtml/html/html_miscimpl.h: 2004-11-22 Ken Kocienda <kocienda@apple.com> Reviewed by Harrison Change around the way we block the Javascript "Paste" command identifier from being available. Formerly, this was done with an ifdef we never compiled in. Now, this is done with a couple of cheap runtime checks. The advantage is that we can now compile this command into development builds, and still yet switch on the command in deployment builds through the use of WebCore SPI so we can write and run layout tests with all of our builds. * khtml/editing/jsediting.cpp: (DOM::JSEditor::queryCommandSupported): Checks state of paste command in case command being queried is the paste command. (DOM::JSEditor::setSupportsPasteCommand): New SPI to turn on paste command. * khtml/editing/jsediting.h: Ditto. * khtml/khtml_part.cpp: (KHTMLPart::pasteFromPasteboard): Added. (KHTMLPart::canPaste): Added. * kwq/KWQKHTMLPart.mm: (KHTMLPart::canPaste): Added. * kwq/KWQRenderTreeDebug.cpp: (externalRepresentation): Turn on paste command. * kwq/WebCoreBridge.h: Add canPaste call so WebKit can fill in the answer. 2004-11-21 Maciej Stachowiak <mjs@apple.com> Reviewed by Richard. <rdar://problem/3889655> HTMLCollectionImpl should use traverseNextNode to improve speed and save recursion * khtml/html/html_miscimpl.cpp: (HTMLCollectionImpl::calcLength): (HTMLCollectionImpl::getItem): (HTMLCollectionImpl::item): (HTMLCollectionImpl::nextItem): (HTMLCollectionImpl::getNamedItem): (HTMLCollectionImpl::namedItem): (HTMLCollectionImpl::nextNamedItemInternal): (HTMLFormCollectionImpl::nextNamedItemInternal): 2004-11-19 Maciej Stachowiak <mjs@apple.com> Reviewed by Darin. <rdar://problem/3482935> JavaScript so slow it seems like a hang (hrweb.apple.com) (HTMLCollection?) <rdar://problem/3759149> PeopleSoft page in Safari twice as slow as Mozilla engine (HTMLFormCollection) <rdar://problem/3888368> selecting an item on the Apache bugzilla query page can be improved 95% (HTMLFormCollection) Many optimizations to HTMLFormCollection. Iterating it should not be N^2 any more, though finding items by name could still be. * khtml/html/html_formimpl.cpp: (DOM::HTMLFormElementImpl::~HTMLFormElementImpl): (DOM::HTMLFormElementImpl::length): (DOM::HTMLFormElementImpl::submitClick): (DOM::HTMLFormElementImpl::formData): (DOM::HTMLFormElementImpl::submit): (DOM::HTMLFormElementImpl::reset): (DOM::HTMLFormElementImpl::radioClicked): (DOM::appendToVector): (DOM::removeFromVector): (DOM::HTMLFormElementImpl::registerFormElement): (DOM::HTMLFormElementImpl::removeFormElement): (DOM::HTMLFormElementImpl::makeFormElementDormant): (DOM::HTMLFormElementImpl::registerImgElement): (DOM::HTMLFormElementImpl::removeImgElement): * khtml/html/html_formimpl.h: * khtml/html/html_miscimpl.cpp: (HTMLFormCollectionImpl::FormCollectionInfo::FormCollectionInfo): (void::HTMLFormCollectionImpl::FormCollectionInfo::reset): (HTMLFormCollectionImpl::resetCollectionInfo): (HTMLFormCollectionImpl::calcLength): (HTMLFormCollectionImpl::item): (HTMLFormCollectionImpl::getNamedItem): (HTMLFormCollectionImpl::getNamedFormItem): (HTMLFormCollectionImpl::firstItem): (HTMLFormCollectionImpl::nextItem): * khtml/html/html_miscimpl.h: (DOM::HTMLFormCollectionImpl::~HTMLFormCollectionImpl): * khtml/xml/dom_elementimpl.cpp: (ElementImpl::setAttribute): (ElementImpl::setAttributeMap): * kwq/KWQPtrVector.h: (QPtrVector::findRef): * kwq/KWQVectorImpl.h: * kwq/KWQVectorImpl.mm: (KWQVectorImpl::findRef): * kwq/WebCoreBridge.mm: (-[WebCoreBridge elementWithName:inForm:]): (-[WebCoreBridge controlsInForm:]): 2004-11-19 David Harrison <harrison@apple.com> Reviewed by Ken and Darin. <rdar://problem/3856215> Cannot remove bold from the beginning of a message Problem is that KHTMLPart::computeAndSetTypingStyle always looked upstream for the existing style, but in this case (hitting cmd-B with caret at top of file) there is nothing upstream. Changed this to use the VisiblePosition deepEquivalent instead. * khtml/khtml_part.cpp: (KHTMLPart::computeAndSetTypingStyle): === Safari-172 === 2004-11-19 Maciej Stachowiak <mjs@apple.com> Reviewed by Darin. <rdar://problem/3864151> REGRESSION (125-167): Chrysler.com never stops loading * khtml/xml/dom_docimpl.cpp: (DocumentImpl::close): Don't fire the onload handler if there is a redirect pending. This is a very long-standing bug that was masked by our previously incorrect redirect logic. It used to be that an older redirect would always win. Recently we changed things so that a newer redirect would win, but a script that causes a redirect would stop parsing once complete (so if there are two redirects in the same script, the latter wins). However, we should have also prevented onload in this case. Testing with other browsers shows that onload handlers do not run at all when there is a pending redirect. 2004-11-19 Ken Kocienda <kocienda@apple.com> Reviewed by Harrison Fix some object lifetime issues in these two commands. This fixes some crashes I am seeing in some new code I am working on, but have not yet reproduced otherwise. * khtml/editing/htmlediting.cpp: (khtml::InsertParagraphSeparatorCommand::~InsertParagraphSeparatorCommand): No longer deref nodes in the ancestor list. They are not ref'ed when put on list. D'uh. (khtml::InsertParagraphSeparatorCommand::doApply): Ref all cloned nodes that are created by the command before putting them on the cloned nodes list. This are still deref'ed in the destructor. (khtml::InsertParagraphSeparatorInQuotedContentCommand::~InsertParagraphSeparatorInQuotedContentCommand): Ditto destructor comment. (khtml::InsertParagraphSeparatorInQuotedContentCommand::doApply): Ditto doApply comment. 2004-11-19 Ken Kocienda <kocienda@apple.com> Reviewed by Harrison Fix for this bug: <rdar://problem/3655241> setTypingStyle: does not set the real typing style, and typingStyle does not return it * khtml/khtml_part.cpp: (KHTMLPart::computeAndSetTypingStyle): New helper that does the work of reducing a passed-in style declaration given the current selection, and then sets the minimum necessary style as the typing style on the part. (KHTMLPart::applyStyle): Call new computeAndSetTypingStyle. The guts of computeAndSetTypingStyle used to be here in the selection-as-caret case. But now [WebCoreBridge setTypingStyle:] needs this code as well. * khtml/khtml_part.h: Declare new computeAndSetTypingStyle() function. * kwq/WebCoreBridge.h: Declare new typingStyle and setTypingStyle: methods. * kwq/WebCoreBridge.mm: (-[WebCoreBridge typingStyle]): Calls through to the part to retrieve the typing style. (-[WebCoreBridge setTypingStyle:]): Calls through to the part to set the typing style. 2004-11-18 David Harrison <harrison@apple.com> Reviewed by Darin. Back out part of Darin's fix for <rdar://problem/3885729>, because the new exception gets triggered by Mail.app. Filed <rdar://problem/3886832> against Mail.app. * kwq/DOM-CSS.mm: (-[DOMCSSStyleDeclaration setProperty:::]): 2004-11-18 Chris Blumenberg <cblu@apple.com> Fixed: <rdar://problem/3587481> Bug Reporter Login Page: Password AutoFill does not work reliably Reviewed by john. * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::currentForm): just return the current form, don't scan the entire document looking for a form if there is no current form 2004-11-18 Maciej Stachowiak <mjs@apple.com> Reviewed by Chris. - fix recursive item traversal, use traverseNextNode() instead of the buggy hand-rolled traversal. * khtml/xml/dom_nodeimpl.cpp: (NodeListImpl::recursiveItem): 2004-11-17 Darin Adler <darin@apple.com> Reviewed by Ken. - fixed <rdar://problem/3885744> crash with XMLHttpRequest test page (reported by KDE folks) * khtml/ecma/xmlhttprequest.cpp: (KJS::XMLHttpRequest::slotFinished): Rolled in fix from KDE; make sure to set job to 0 before calling changeState. - fixed <rdar://problem/3885729> attempting to modify a computed style does nothing, but should raise a DOM exception - fixed <rdar://problem/3885731> style declarations use too many malloc blocks; switch to QValueList - fixed <rdar://problem/3885739> DOM::NodeImpl accessor in DOM::Node class is hot; should be inlined - changed NodeImpl calls like replaceChild to always ref/deref the parameter; this is a better way to fix an entire category of leaks we have been fixing one by one recently - changed computed styles so they hold a reference to the DOM node; the old code could end up with a stale RenderObject pointer, although I never saw it do that in practice - implemented the length and item methods for computed styles - implemented querying additional properties in computed styles (29 more) * khtml/khtml_part.h: Update forward declaration of CSSMutableStyleDeclarationImpl since it's now a separate class rather than a typedef. Changed the parameter type of setTypingStyle to take a mutable style. * khtml/khtml_part.cpp: (KHTMLPart::setTypingStyle): Change parameter to take a mutable style. (KHTMLPart::applyStyle): Add code to make a mutable style in case we are passed a computed style; also change some types to mutable style. (updateState): Update iteration of CSSProperty objects in a style declaration to use the new valuesIterator interface. (KHTMLPart::selectionHasStyle): Add a call to makeMutable. (KHTMLPart::selectionStartHasStyle): Add call to makeMutable and update iteration. (editingStyle): Change type to mutable style, and simplify the style-creation calls, including accomodating the exception code that setCssText has now. (KHTMLPart::applyEditingStyleToElement): Change types to mutable style. (KHTMLPart::removeEditingStyleFromElement): Change code to call setChanged only if removing the style attributes really was a change, although it's not an important optimization it's good to do it right. * khtml/css/css_base.h: Remove unneeded setParsedValue method. * khtml/css/css_base.cpp: Remove unneeded setParsedValue method. All the places that were calling it were already removing the old property explicitly, so the code in here to remove the property again was redundant. * khtml/css/css_computedstyle.h: Updated virtual functions for changes to parameters in base class. Moved all the "set"-type functions so they are private. Store a node pointer instead of a renderer. * khtml/css/css_computedstyle.cpp: (DOM::CSSComputedStyleDeclarationImpl::CSSComputedStyleDeclarationImpl): Hold a reference to the node we compute style for, so we don't end up with a pointer to a deallocated RenderObject. Before we had no guarantee the object would outlast us. (DOM::CSSComputedStyleDeclarationImpl::setCssText): Add exception parameter, and set the exception to NO_MODIFICATION_ALLOWED_ERR. (DOM::CSSComputedStyleDeclarationImpl::getPropertyCSSValue): Update to use node pointer rather than renderer pointer. Added implementation for box-align, box-direction, box-flex, box-flex-group, box-lines, box-ordinal-group, box-orient, box-pack, caption-side, clear, cursor, direction, list-style-image, list-style-position, list-style-type, marquee-direction, marquee-repetition, marquee-style, user-modify, opacity, orphans, outline-style, page-break-after, page-break-before, page-break-inside, position, unicode-bidi, widows, z-index. (DOM::CSSComputedStyleDeclarationImpl::removeProperty): Add exception parameter, and set the exception to NO_MODIFICATION_ALLOWED_ERR. (DOM::CSSComputedStyleDeclarationImpl::setProperty): Ditto. (DOM::CSSComputedStyleDeclarationImpl::length): Implemented. (DOM::CSSComputedStyleDeclarationImpl::item): Implemented, calls getPropertyValue. (DOM::CSSComputedStyleDeclarationImpl::copyInheritableProperties): Changed return type to CSSMutableStyleDeclarationImpl. (DOM::CSSComputedStyleDeclarationImpl::copy): Added. (DOM::CSSComputedStyleDeclarationImpl::makeMutable): Added. * khtml/css/css_ruleimpl.h: Update forward declaration of CSSMutableStyleDeclarationImpl since it's now a separate class rather than a typedef. * khtml/css/cssparser.h: Ditto. * khtml/css/css_valueimpl.h: Refactor CSSStyleDeclarationImpl into two classes. New derived class CSSMutableStyleDeclarationImpl has the guts, and the base class has only some virtual functions. Removed a bunch of redundant stuff from other classes in this file too. (DOM::DashboardRegionImpl::setNext): Ref new before deref'ing old to handle the set-to-same case. (DOM::CSSProperty::CSSProperty): Added new overload so you can create a CSSProperty with initial values. (DOM::CSSProperty::operator=): Added. (DOM::CSSProperty::setValue): Use ref-before-deref pattern to simplify slightly. * khtml/css/css_valueimpl.cpp: (DOM::CSSStyleDeclarationImpl::CSSStyleDeclarationImpl): Remove uneeded things. (DOM::CSSStyleDeclarationImpl::isStyleDeclaration): Put here now that it's no longer inline. (DOM::CSSMutableStyleDeclarationImpl::CSSMutableStyleDeclarationImpl): Added. (DOM::CSSMutableStyleDeclarationImpl::operator=): Added. (DOM::CSSMutableStyleDeclarationImpl::~CSSMutableStyleDeclarationImpl): Updated. (DOM::CSSMutableStyleDeclarationImpl::getPropertyValue): Removed now-uneeded check. (DOM::CSSMutableStyleDeclarationImpl::get4Values): Moved here from base class. (DOM::CSSMutableStyleDeclarationImpl::getShortHandValue): Ditto. (DOM::CSSMutableStyleDeclarationImpl::getPropertyCSSValue): Update to use QValueList instead of QPtrList. (DOM::CSSMutableStyleDeclarationImpl::removeProperty): Added exception parameter, updated for QValueList. (DOM::CSSMutableStyleDeclarationImpl::setChanged): Moved here from base class. (DOM::CSSMutableStyleDeclarationImpl::getPropertyPriority): Update to use QValueList. (DOM::CSSMutableStyleDeclarationImpl::setProperty): Added more overloads to match new parameters. (DOM::CSSMutableStyleDeclarationImpl::setStringProperty): Update to use QValueList. (DOM::CSSMutableStyleDeclarationImpl::setImageProperty): Ditto. (DOM::CSSMutableStyleDeclarationImpl::parseProperty): Remove unneeded initialization code due to QValueList. (DOM::CSSMutableStyleDeclarationImpl::addParsedProperties): Added. (DOM::CSSMutableStyleDeclarationImpl::setLengthProperty): Moved here from base class. (DOM::CSSMutableStyleDeclarationImpl::length): Update to use QValueList. (DOM::CSSMutableStyleDeclarationImpl::item): Moved here from base class. (DOM::CSSMutableStyleDeclarationImpl::cssText): Return empty string rather than null string when there are no styles in the list. Update to use QValueList. (DOM::CSSMutableStyleDeclarationImpl::setCssText): Update to use QValueList and to take an exceptionCode parameter and set it. (DOM::CSSMutableStyleDeclarationImpl::merge): Update to use QValueList. (DOM::CSSStyleDeclarationImpl::diff): Update to use QValueList. (DOM::CSSMutableStyleDeclarationImpl::copyBlockProperties): Moved here from base class. Change return type. (DOM::CSSStyleDeclarationImpl::copyPropertiesInSet): Update to use QValueList and use stack, not new/delete. (DOM::CSSMutableStyleDeclarationImpl::makeMutable): Added. (DOM::CSSMutableStyleDeclarationImpl::copy): Added. * khtml/css/cssparser.cpp: (CSSParser::parseValue): Changed to use addParsedProperties. (CSSParser::parseDeclaration): Ditto. (CSSParser::createStyleDeclaration): Use new constructor to create declaration in a more efficient manner. * khtml/css/cssproperties.in: Removed unused font-size-adjust and -khtml-flow-mode. * khtml/css/cssproperties.c: Regenerated. * khtml/css/cssproperties.h: Regenerated. * khtml/css/cssstyleselector.cpp: (khtml::CSSStyleSelector::applyDeclarations): Updated to use QValueList interface to CSSMutableStyleDeclarationImpl. * khtml/dom/css_value.cpp: (DOM::CSSStyleDeclaration::cssText): Removed unneeded cast. (DOM::CSSStyleDeclaration::setCssText): Added exception code handling. (DOM::CSSStyleDeclaration::getPropertyValue): Changed to call getPropertyValue directly instead of first doing getPropertyCSSValue and then doing cssText. (DOM::CSSStyleDeclaration::getPropertyCSSValue): Removed unneeded cast. (DOM::CSSStyleDeclaration::removeProperty): Added exception code handling. (DOM::CSSStyleDeclaration::setProperty): Added exception code handling. (DOM::CSSStyleDeclaration::length): Removed unneeded cast. (DOM::CSSStyleDeclaration::item): Removed unneeded cast. (DOM::CSSStyleDeclaration::parentRule): Removed unneeded cast. (DOM::CSSValue::setCssText): Removed strange non-implementation (still not implemented). * khtml/dom/dom_node.h: Made isNull and handle functions inline. * khtml/dom/dom_node.cpp: Ditto. * khtml/editing/htmlediting.h: Change some types to mutable style. * khtml/editing/htmlediting.cpp: (khtml::EditCommandPtr::typingStyle): Change return type to mutable style. (khtml::EditCommandPtr::setTypingStyle): Change parameter to mutable style. (khtml::StyleChange::init): Convert parameter to mutable style. Update to use QValueList. (khtml::EditCommand::assignTypingStyle): Change parameter to mutable type. (khtml::EditCommand::setTypingStyle): Ditto. (khtml::ApplyStyleCommand::ApplyStyleCommand): Convert parameter to mutable style. (khtml::ApplyStyleCommand::doApply): Change local variables to mutable style. (khtml::ApplyStyleCommand::applyBlockStyle): Change parameter to mutable style. (khtml::ApplyStyleCommand::applyInlineStyle): Ditto. (khtml::ApplyStyleCommand::isHTMLStyleNode): Ditto. (khtml::ApplyStyleCommand::removeCSSStyle): Ditto. Also update to use QValueList. (khtml::ApplyStyleCommand::removeBlockStyle): Change parameter to mutable style. (khtml::ApplyStyleCommand::removeInlineStyle): Ditto. (khtml::ApplyStyleCommand::addBlockStyleIfNeeded): Ditto. (khtml::ApplyStyleCommand::addInlineStyleIfNeeded): Ditto. (khtml::InsertLineBreakCommand::doApply): Convert locals to mutable style. (khtml::InsertTextCommand::prepareForTextInsertion): Ditto. (khtml::RemoveCSSPropertyCommand::RemoveCSSPropertyCommand): Convert parameter to mutable style. * khtml/editing/jsediting.cpp: Convert types to mutable styles where we create styles. * khtml/html/html_baseimpl.h: Change type to mutable style. * khtml/html/html_baseimpl.cpp: (HTMLBodyElementImpl::createLinkDecl): Ditto. * khtml/html/html_elementimpl.h: Make CSSMappedAttributeDeclarationImpl use the mutable style class as a base class, and change types to mutable style as needed. * khtml/html/html_elementimpl.cpp: (HTMLElementImpl::createInlineStyleDecl): Change type to mutable style. (HTMLElementImpl::parseHTMLAttribute): Call parseProperty method. (HTMLElementImpl::getInlineStyleDecl): Change type to mutable style. (HTMLElementImpl::additionalAttributeStyleDecl): Ditto. (HTMLElementImpl::createContextualFragment): Add ref/deref to fix potential node leak. (HTMLElementImpl::setInnerHTML): Remove ref/deref pair because this leak is now fixed by changes to appendChild. (HTMLElementImpl::setOuterHTML): Remove ref/deref pair because this leak is now fixed by changes to replaceChild. * khtml/html/html_tableimpl.h: Change types to mutable style. * khtml/html/html_tableimpl.cpp: (HTMLTableElementImpl::additionalAttributeStyleDecl): Change type to mutable style. (HTMLTableElementImpl::getSharedCellDecl): Change type to mutable style. (HTMLTableCellElementImpl::additionalAttributeStyleDecl): Change type to mutable style. * khtml/html/htmlparser.cpp: (KHTMLParser::parseToken): Use a local variable to protect the node by ref'ing it. This is better than using an explicit delete to make the node go away, and is required for compatibility with the changes to the NodeImpl functions. (KHTMLParser::insertNode): Ditto. (KHTMLParser::createHead): Get rid of explicit delete, no longer needed because of changes to the NodeImpl functions. * khtml/xml/dom_docimpl.cpp: (DocumentImpl::createCSSStyleDeclaration): Call simpler constructor now that there's no need to make the property list explictly. * kwq/DOM-CSS.mm: (-[DOMCSSStyleDeclaration setCssText:]): Raise exception when appropriate. (-[DOMCSSStyleDeclaration removeProperty:]): Ditto. (-[DOMCSSStyleDeclaration setProperty:::]): Dito. * khtml/xml/dom_nodeimpl.cpp: (NodeImpl::insertBefore): Always do a ref/deref, so callers don't have to worry about whether the function succeeded or not for ownership purposes. (NodeImpl::replaceChild): Ditto. (NodeImpl::appendChild): Ditto. (NodeBaseImpl::insertBefore): Ditto. (NodeBaseImpl::replaceChild): Ditto. (NodeBaseImpl::appendChild): Ditto. (NodeBaseImpl::addChild): Ditto. * WebCore-tests.exp: Removed CSSStyleDeclaration::length; not sure why it was in here. * WebCore-combined.exp: Regenerated. 2004-11-18 Maciej Stachowiak <mjs@apple.com> still even more build fixing * khtml/html/html_miscimpl.cpp: (HTMLCollectionImpl::resetCollectionInfo): 2004-11-18 Maciej Stachowiak <mjs@apple.com> more build fixing * khtml/html/html_miscimpl.cpp: (HTMLCollectionImpl::resetCollectionInfo): 2004-11-18 Maciej Stachowiak <mjs@apple.com> Fixed build problem. * khtml/html/html_miscimpl.h: (DOM::HTMLCollectionImpl::CollectionInfo::CollectionInfo): it's haslength, not hasLenght. 2004-11-18 Maciej Stachowiak <mjs@apple.com> Reviewed by Ken. - merged and cleaned up HTMLCollection and HTMLFormCollection speedups from konqueror <rdar://problem/3822992> VIP: Program listings pages at directv.com take a really long time to load [HTMLCollection] <rdar://problem/3701991> Safari unresponsive loading (www.maxim-ic.com) (HTMLCollection) This is also a start on fixing 5 other bugs, but those need additional work to make HTMLFormCollection fast. * khtml/html/html_documentimpl.h: (DOM::HTMLDocumentImpl::collectionInfo): * khtml/html/html_formimpl.cpp: (DOM::HTMLFormElementImpl::~HTMLFormElementImpl): (DOM::HTMLFormElementImpl::isURLAttribute): (DOM::HTMLFormElementImpl::registerImgElement): (DOM::HTMLFormElementImpl::removeImgElement): * khtml/html/html_formimpl.h: * khtml/html/html_imageimpl.cpp: (HTMLImageElementImpl::HTMLImageElementImpl): (HTMLImageElementImpl::~HTMLImageElementImpl): * khtml/html/html_imageimpl.h: * khtml/html/html_miscimpl.cpp: (HTMLCollectionImpl::HTMLCollectionImpl): (HTMLCollectionImpl::~HTMLCollectionImpl): (HTMLCollectionImpl::updateCollectionInfo): (HTMLCollectionImpl::length): (HTMLCollectionImpl::item): (HTMLCollectionImpl::firstItem): (HTMLCollectionImpl::nextItem): (HTMLCollectionImpl::namedItem): (HTMLCollectionImpl::nextNamedItemInternal): (HTMLFormCollectionImpl::getNamedFormItem): * khtml/html/html_miscimpl.h: (DOM::HTMLCollectionImpl::): (DOM::HTMLCollectionImpl::CollectionInfo::CollectionInfo): * khtml/html/htmlparser.cpp: (KHTMLParser::getElement): * khtml/xml/dom_docimpl.cpp: (DocumentImpl::DocumentImpl): * khtml/xml/dom_docimpl.h: (DOM::DocumentImpl::incDOMTreeVersion): (DOM::DocumentImpl::domTreeVersion): * khtml/xml/dom_nodeimpl.cpp: (NodeImpl::attach): (NodeImpl::detach): 2004-11-18 Kevin Decker <kdecker@apple.com> Reviewed by Chris. fixed: <rdar://problem/3841842> getPropertyID expensive * kwq/DOM-CSS.mm: (getPropertyID): avoid unnecessary memory allocations by using a fixed-sized stack based buffer. 2004-11-17 David Hyatt <hyatt@apple.com> Improve responsiveness by being willing to break out of the tokenizer. (This patch was landed already and subsequently backed out). Reviewed by kocienda * khtml/html/html_baseimpl.cpp: (HTMLBodyElementImpl::insertedIntoDocument): * khtml/html/htmltokenizer.cpp: (khtml::HTMLTokenizer::reset): (khtml::HTMLTokenizer::scriptHandler): (khtml::HTMLTokenizer::scriptExecution): (khtml::HTMLTokenizer::write): (khtml::HTMLTokenizer::continueProcessing): (khtml::HTMLTokenizer::timerEvent): (khtml::HTMLTokenizer::notifyFinished): * khtml/html/htmltokenizer.h: * khtml/khtmlview.cpp: (KHTMLViewPrivate::KHTMLViewPrivate): (KHTMLViewPrivate::reset): (KHTMLView::clear): (KHTMLView::layout): (KHTMLView::timerEvent): (KHTMLView::scheduleRelayout): (KHTMLView::layoutPending): (KHTMLView::haveDelayedLayoutScheduled): (KHTMLView::unscheduleRelayout): * khtml/khtmlview.h: * khtml/xml/dom_docimpl.cpp: (DocumentImpl::DocumentImpl): (DocumentImpl::close): (DocumentImpl::setParsing): (DocumentImpl::shouldScheduleLayout): (DocumentImpl::minimumLayoutDelay): (DocumentImpl::write): (DocumentImpl::finishParsing): (DocumentImpl::stylesheetLoaded): (DocumentImpl::updateStyleSelector): * khtml/xml/dom_docimpl.h: (DOM::DocumentImpl::parsing): * kwq/KWQDateTime.mm: (KWQUIEventTime::uiEventPending): 2004-11-17 David Harrison <harrison@apple.com> Reviewed by Ken Kocienda. Make sure previousLineStart is non-null before calling compareBoundaryPoints. Treat null case as meaning no post-move merge is needed. * khtml/editing/htmlediting.cpp: (khtml::DeleteSelectionCommand::initializePositionData): 2004-11-17 David Harrison <harrison@apple.com> Added displayNode and displayTree methods for debugging. Fixed comment typo in dispatchChildRemovalEvents. * khtml/xml/dom_nodeimpl.cpp: (NodeImpl::displayNode): (NodeImpl::displayTree): (NodeBaseImpl::dispatchChildRemovalEvents): * khtml/xml/dom_nodeimpl.h: 2004-11-16 John Sullivan <sullivan@apple.com> Reviewed by Richard. - fixed <rdar://problem/3881929> 32 byte leak in editingStyle() in KHTMLPart (one-time only) * khtml/khtml_part.cpp: (editingStyle): delete the list we created when we're done with it 2004-11-16 Ken Kocienda <kocienda@apple.com> Reviewed by John It is unwise to use the QPtrList autodelete feature on shared objects like DOM nodes. Instead, I replaced this with a helper function that derefs DOM nodes stored in a QPtrList when the list goes out of scope. * khtml/editing/htmlediting.cpp: (khtml::derefNodesInList): New helper to deref DOM nodes stored in a QPtrList. (khtml::InsertParagraphSeparatorCommand::InsertParagraphSeparatorCommand): No longer set lists to autodelete. (khtml::InsertParagraphSeparatorCommand::~InsertParagraphSeparatorCommand): Call new derefNodesInList helper. (khtml::InsertParagraphSeparatorInQuotedContentCommand::InsertParagraphSeparatorInQuotedContentCommand): No longer set lists to autodelete. (khtml::InsertParagraphSeparatorInQuotedContentCommand::~InsertParagraphSeparatorInQuotedContentCommand): Call new derefNodesInList helper. * khtml/editing/htmlediting.h: Add virtual destructor for InsertParagraphSeparatorCommand. It had no need of one before, but now it does. 2004-11-15 David Harrison <harrison@apple.com> Reviewed by Chris and Darin. <rdar://problem/3880304> Non-linear performance hit for style changes * khtml/xml/dom_nodeimpl.cpp: (NodeImpl::traverseNextNode): (NodeImpl::traverseNextSibling): (NodeImpl::traversePreviousNodePostOrder): Return 0 rather than traversing beyond stayWithin when this == stayWithin. Add asserts that stayWithin is an ancestor of the returned node. 2004-11-15 Darin Adler <darin@apple.com> Reviewed by Ken. - fixed <rdar://problem/3880036> Many leaks from CSSComputedStyleDeclarationImpl::getPropertyCSSValue, seen in Mail and Blot * khtml/css/css_computedstyle.cpp: (DOM::CSSComputedStyleDeclarationImpl::getPropertyValue): Ref and deref the value returned from getPropertyCSSValue, since there's no guarantee it's already ref'd. * khtml/css/css_valueimpl.cpp: (CSSStyleDeclarationImpl::getPropertyValue): Wrap result in a CSSValue to ref/deref. (CSSStyleDeclarationImpl::get4Values): Ref/deref explicitly. (CSSStyleDeclarationImpl::getShortHandValue): Ditto. (CSSStyleDeclarationImpl::merge): Ditto. (CSSStyleDeclarationImpl::diff): Ditto. * khtml/editing/htmlediting.cpp: (khtml::StyleChange::currentlyHasStyle): Ditto. (khtml::ApplyStyleCommand::removeCSSStyle): Ditto. * khtml/html/html_baseimpl.cpp: (HTMLBodyElementImpl::parseHTMLAttribute): Ditto. * khtml/html/html_tableimpl.cpp: (HTMLTableElementImpl::parseHTMLAttribute): Ditto. 2004-11-15 Darin Adler <darin@apple.com> Reviewed by Ken. Use separate mutable style and computed style types as appropriate. For now this should have no effect, but it prepares us for refactoring later. Also remove some unnecessary "DOM::" prefixes and in one case factor out some shared code. * khtml/khtml_part.cpp: (KHTMLPart::typingStyle): (KHTMLPart::setTypingStyle): (updateState): (KHTMLPart::selectionHasStyle): (KHTMLPart::selectionStartHasStyle): (KHTMLPart::selectionComputedStyle): * khtml/khtml_part.h: * khtml/khtmlpart_p.h: * khtml/css/css_base.h: * khtml/css/css_ruleimpl.cpp: (CSSStyleRuleImpl::setDeclaration): * khtml/css/css_ruleimpl.h: (DOM::CSSFontFaceRuleImpl::style): (DOM::CSSPageRuleImpl::style): (DOM::CSSStyleRuleImpl::style): (DOM::CSSStyleRuleImpl::declaration): * khtml/css/css_valueimpl.h: (DOM::CSSPrimitiveValueImpl::): * khtml/css/cssparser.cpp: (CSSParser::parseValue): (CSSParser::parseColor): (CSSParser::parseDeclaration): (CSSParser::createStyleDeclaration): * khtml/css/cssparser.h: * khtml/css/cssstyleselector.cpp: (khtml::CSSStyleSelector::addMatchedDeclaration): (khtml::CSSStyleSelector::matchRulesForList): (khtml::CSSStyleSelector::styleForElement): (khtml::CSSStyleSelector::applyDeclarations): * khtml/css/cssstyleselector.h: * khtml/css/parser.cpp: * khtml/css/parser.y: * khtml/dom/css_rule.h: * khtml/dom/css_stylesheet.h: * khtml/dom/css_value.h: * khtml/dom/dom2_views.cpp: * khtml/xml/dom2_viewsimpl.cpp: (DOM::AbstractViewImpl::getComputedStyle): * khtml/xml/dom_docimpl.cpp: (DocumentImpl::importNode): (DocumentImpl::setStyleSheet): * khtml/xml/dom_docimpl.h: * khtml/xml/dom_xmlimpl.cpp: (DOM::ProcessingInstructionImpl::setStyleSheet): * khtml/xml/dom_xmlimpl.h: * khtml/dom/css_value.cpp: (DOM::throwException): Added. (DOM::CSSStyleDeclaration::setCssText): Call throwException, but always on 0 for now. The real thing is coming with the next change to refactor. (DOM::CSSPrimitiveValue::setFloatValue): Call throwException. (DOM::CSSPrimitiveValue::setStringValue): Ditto. 2004-11-15 Darin Adler <darin@apple.com> Reviewed by Ken. - fixed <rdar://problem/3878489> REGRESSION: modifying attribute of <textarea> blows away edited text (breaks simplemachines.org forum) * khtml/xml/dom_nodeimpl.h: Added boolean "children changed" parameter to dispatchSubtreeModifiedEvent, so it can be called in cases where only the node's attributes changed without sending a misleading childrenChanged call, but the childrenChanged call can happen at the exact right moment. * khtml/xml/dom_nodeimpl.cpp: Removed some uneeded "DOM::". (NodeImpl::dispatchSubtreeModifiedEvent): Only call "children changed" if the boolean true is passed in. * khtml/xml/dom_elementimpl.cpp: (NamedAttrMapImpl::addAttribute): Pass false for "children changed". (NamedAttrMapImpl::removeAttribute): Ditto. 2004-11-15 John Sullivan <sullivan@apple.com> Reviewed by Ken. - fixed <rdar://problem/3880075> leak in CSSStyleDeclarationImpl::copyPropertiesInSet, seen often in Mail and Blot * khtml/css/css_valueimpl.cpp: (CSSStyleDeclarationImpl::copyPropertiesInSet): delete temporary list after we're done using it 2004-11-15 Richard Williamson <rjw@apple.com> Fixed leak (3879883) that John found. Early return leaked allocated instance. Reviewed by John. * khtml/css/css_computedstyle.cpp: (DOM::CSSComputedStyleDeclarationImpl::getPropertyCSSValue): 2004-11-15 Ken Kocienda <kocienda@apple.com> Reviewed by John Fix for this bug: <rdar://problem/3879569> Many leaks in EditCommand mechanism, seen in Mail Fixed a couple of object lifetime issues. The EditCommand class used to hold an EditCommandPtr to its parent, but this caused a a reference cycle in composite commands as the children held a ref to their parent. Now, the parent variable is a non-retained reference to an EditCommand *. It would be nice to have a weak reference to the parent or even override deref in composite commands (but I can't since deref() is not virtual). However, this should be OK since any dangling parent pointer is a sign of a bigger object lifetime problem that would need to be addressed anyway. * khtml/css/css_valueimpl.cpp: (CSSStyleDeclarationImpl::CSSStyleDeclarationImpl): Fix bug in constructor that takes a QPtrList<CSSProperty> *. List values must be copied into newly-allocated list, rather than just assigning the list variable passed in to the local list variable, or the list will be double-deleted. * khtml/editing/htmlediting.cpp: (khtml::EditCommand::setStartingSelection): No longer call get(). m_parent is no longer a smart pointer. (khtml::EditCommand::setEndingSelection): Ditto. (khtml::EditCommand::assignTypingStyle): Short-circuit if passed in style is identical to current style. Unrelated to the change, but saves some ref's and deref's. (khtml::EditCommand::setTypingStyle): No longer call get(). m_parent is no longer a smart pointer. * khtml/editing/htmlediting.h: Change m_parent to a EditCommand *. Was an EditCommandPtr. Using an EditCommandPtr caused a reference cycle in composite commands as the children held a ref to their parent. (khtml::EditCommand::parent): No longer call get(). m_parent is no longer a smart pointer. 2004-11-15 Maciej Stachowiak <mjs@apple.com> Reviewed by Kevin. <rdar://problem/3807080> Safari so slow it seems like a hang accessing a page on an IBM website * khtml/xml/dom_nodeimpl.cpp: (NodeListImpl::NodeListImpl): Initialize isItemCacheValid, renamed isCacheValid to isLengthCacheValid. (NodeListImpl::recursiveLength): Adjusted for rename. (NodeListImpl::recursiveItem): Cache the last item accessed and its offset. If the same offset is looked up again, just return it, otherwise, if looking up a later offset, start at the last item and proceed from there. (NodeListImpl::itemById): Apply the special document optimization to all nodes that are either a document or in a document - just walk up to make sure the node found by ID has the root node as an ancestor. (NodeListImpl::rootNodeSubtreeModified): Adjust both cache bits. * khtml/xml/dom_nodeimpl.h: Prototype new stuff. 2004-11-15 John Sullivan <sullivan@apple.com> Reviewed by Ken. - fixed <rdar://problem/3879539> leak of NSString after pasting into editable HTML (e.g. Mail) * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::documentFragmentWithText): release mutable copy of string after we're done using it 2004-11-14 Kevin Decker <kdecker@apple.com> Reviewed by mjs. fixed: <rdar://problem/3823038> LEAK: huge leak in DOM::HTMLElementImpl::createContextualFragment(DOM::DOMString const&, bool) * khtml/html/html_elementimpl.cpp: (HTMLElementImpl::setInnerHTML): uses the ref counting system to deallocate fragments instead of explicitly invoking a destructor. (HTMLElementImpl::setOuterHTML): function is responsible for derefing the fragment prior to returning. Now it does. 2004-11-13 Maciej Stachowiak <mjs@apple.com> Reviewed by Kevin. <rdar://problem/3878766> VIP: Program listings pages at directv.com takes 75% of time traversing NodeLists * khtml/dom/dom_node.cpp: (NodeList::itemById): New method, just forward to impl. * khtml/dom/dom_node.h: Prototype it. * khtml/ecma/kjs_dom.cpp: (DOMNodeList::tryGet): Instead of looping over the whole list to do by-id access, let the NodeList do it. The NodeList might be able to do it more efficiently. * khtml/xml/dom_nodeimpl.cpp: (NodeListImpl::itemById): Optimize for the case where the NodeList covers the whole document. In this case, just use getElementById, then check that the element satisfies the list criteria. (ChildNodeListImpl::nodeMatches): Return true only if the node is our child. (TagNodeListImpl::TagNodeListImpl): Irrelevant change to reformat initializers. * khtml/xml/dom_nodeimpl.h: 2004-11-12 Maciej Stachowiak <mjs@apple.com> Reviewed by Gramps. - fixed another bug in the last checkin, isCacheValid was unitialized, resulting in sometimes using a huge bogus length value. * khtml/xml/dom_nodeimpl.cpp: (NodeListImpl::NodeListImpl): Initialize isCacheValid. 2004-11-12 Darin Adler <darin@apple.com> Reviewed by Maciej. - fixed an infinite loop in that last check-in * khtml/xml/dom_nodeimpl.cpp: (NodeImpl::notifyLocalNodeListsSubtreeModified): Added a ++i to the loop so it won't get stuck on the first element in the list. 2004-11-12 Maciej Stachowiak <mjs@apple.com> Reviewed by Kevin. - fixed <rdar://problem/3878183> Safari is 77% slower than it should be on a page on an IBM website due to NodeListImpl length I fixed this by changing NodeLists to cache their length, but invalidate it whenever there is a change in the DOM subtree at which they are rooted. This makes NodeListImpl::recursiveLength() drop completely off the profile, since we were repeatedly getting a length for the same NodeList over and over. * khtml/xml/dom_nodeimpl.cpp: (NodeImpl::NodeImpl): (NodeImpl::~NodeImpl): (NodeImpl::registerNodeList): (NodeImpl::unregisterNodeList): (NodeImpl::notifyLocalNodeListsSubtreeModified): (NodeImpl::notifyNodeListsSubtreeModified): (NodeImpl::dispatchSubtreeModifiedEvent): (NodeListImpl::NodeListImpl): (NodeListImpl::~NodeListImpl): (NodeListImpl::recursiveLength): (NodeListImpl::recursiveItem): (NodeListImpl::rootNodeSubtreeModified): (ChildNodeListImpl::ChildNodeListImpl): (ChildNodeListImpl::length): (ChildNodeListImpl::item): (TagNodeListImpl::TagNodeListImpl): (TagNodeListImpl::length): (TagNodeListImpl::item): (NameNodeListImpl::NameNodeListImpl): (NameNodeListImpl::length): (NameNodeListImpl::item): * khtml/xml/dom_nodeimpl.h: 2004-11-12 Darin Adler <darin@apple.com> Reviewed by Maciej. - various small cleanups * khtml/xml/dom_docimpl.h: Added policyBaseURL and setPolicyBaseURL. * khtml/html/html_documentimpl.h: Removed policyBaseURL and setPolicyBaseURL. * khtml/xml/xml_tokenizer.h: Marked isWaitingForScripts const. * khtml/xml/xml_tokenizer.cpp: (khtml::XMLTokenizer::isWaitingForScripts): Marked const. * khtml/html/htmltokenizer.h: Marked isWaitingForScripts const. * khtml/html/htmltokenizer.cpp: (khtml::HTMLTokenizer::isWaitingForScripts): Marked const. (khtml::HTMLTokenizer::setOnHold): Took out extraneous line of code. * khtml/khtml_part.h: Removed docImpl function. * khtml/khtml_part.cpp: Ditto. * khtml/xml/dom_docimpl.cpp: (DocumentImpl::close): Simplified code that implements the "redirect during onload" optimization. Now uses isScheduledLocationChangePending. * kwq/KWQKHTMLPart.h: Removed now-unused _firstResponderAtMouseDownTime. * kwq/KWQKHTMLPart.mm: Removed _firstResponderAtMouseDownTime (forgot to land this part of the change last time, which is why the build broke). (KWQKHTMLPart::updatePolicyBaseURL): Use xmlDocImpl instead of docImpl. (KWQKHTMLPart::setPolicyBaseURL): Ditto. (KWQKHTMLPart::keyEvent): Ditto. (KWQKHTMLPart::dispatchCPPEvent): Ditto. (KWQKHTMLPart::bodyBackgroundColor): Ditto. 2004-11-12 Chris Blumenberg <cblu@apple.com> <rdar://problem/3843312> REGRESSION: Tabbing into content area puts insertion point at start, should go to where it last was Reviewed by rjw. * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::nextKeyViewInFrameHierarchy): only blow away selection when another view is focused === Safari-171 === 2004-11-12 Darin Adler <darin@apple.com> Reviewed by Kevin. - fixed a couple places that would not work for XML documents * khtml/ecma/kjs_window.cpp: (Window::isSafeScript): Use xmlDocImpl instead of docImpl, since the function we're using is present on the base class. (WindowFunc::tryCall): More of the same. 2004-11-12 Darin Adler <darin@apple.com> - land versions of these files generated by the newer gperf People building on Panther will continue to see these files modified. A workaround would be to install the newer gperf on our Tiger build machines. * khtml/css/cssproperties.c: Regenerated. * khtml/css/cssvalues.c: Regenerated. * khtml/html/doctypes.cpp: Regenerated. * khtml/html/kentities.c: Regenerated. * khtml/misc/htmlattrs.c: Regenerated. * khtml/misc/htmltags.c: Regenerated. * kwq/KWQColorData.c: Regenerated. 2004-11-11 Richard Williamson <rjw@apple.com> Fix build horkage from previous checkin. * kwq/KWQKHTMLPart.h: 2004-11-11 Darin Adler <darin@apple.com> Reviewed by John. - fixed <rdar://problem/3846152> REGRESSION (125-166): can't drag text out of <input type=text> fields * kwq/WebCoreBridge.h: Added wasFirstResponderAtMouseDownTime: method. * kwq/KWQKHTMLPart.h: Removed _firstResponderAtMouseDownTime. * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::passWidgetMouseDownEventToWidget): Use the new wasFirstResponderAtMouseDownTime: method on the bridge instead of _firstResponderAtMouseDownTime. This will return YES for the case where we started with the NSTextField as first responder, and then took focus away and gave it back, which makes dragging text work again. (KWQKHTMLPart::mouseDown): Removed code to set _firstResponderAtMouseDownTime. 2004-11-11 David Hyatt <hyatt@apple.com> Disable the tokenizer deferral, since it hurts the PLT by 3% or so. Reviewed by vicki * khtml/html/htmltokenizer.cpp: (khtml::HTMLTokenizer::continueProcessing): 2004-11-11 Ken Kocienda <kocienda@apple.com> Reviewed by Maciej * khtml/editing/htmlediting.cpp: (khtml::InsertLineBreakCommand::doApply): Use new isLastVisiblePositionInBlock() helper instead of old isLastInBlock() member function on VisiblePosition. This is a cosmetic change in keeping with the prevailing style for the VisiblePosition class. * khtml/editing/htmlediting.h: Move isLastVisiblePositionInNode() function to visible_position.[cpp|h] files. * khtml/editing/visible_position.cpp: Removed isLastInBlock() helper. Renamed to isLastVisiblePositionInBlock(). (khtml::visiblePositionsInDifferentBlocks): New helper method. (khtml::isLastVisiblePositionInBlock): Ditto. (khtml::isLastVisiblePositionInNode): Ditto. * khtml/editing/visible_position.h: Add declarations for new functions. 2004-11-11 Ken Kocienda <kocienda@apple.com> Reviewed by Hyatt * khtml/editing/htmlediting.cpp: (khtml::CompositeEditCommand::deleteInsignificantText): Call new compareBoundaryPoints convenience. (khtml::ApplyStyleCommand::removeBlockStyle): Ditto. (khtml::ApplyStyleCommand::removeInlineStyle): Ditto. (khtml::ApplyStyleCommand::nodeFullySelected): Ditto. (khtml::DeleteSelectionCommand::initializePositionData): Ditto. * khtml/xml/dom2_rangeimpl.cpp: (DOM::RangeImpl::compareBoundaryPoints): New convenience variant of this function which takes two Position objects. * khtml/xml/dom2_rangeimpl.h: Ditto. 2004-11-11 Ken Kocienda <kocienda@apple.com> Reviewed by Harrison Some improvements to deleting when complete lines are selected. * khtml/editing/htmlediting.cpp: (khtml::DeleteSelectionCommand::initializePositionData): Detect when the line containing the end of a selection is fully selected. Turn off block merging in this case. (khtml::DeleteSelectionCommand::handleSpecialCaseBRDelete): Fix a bug in the check for whether a BR immediately followed a block. The old code could erroneously skip nodes. (khtml::DeleteSelectionCommand::handleGeneralDelete): Add a case for when the entire start block is selected. This new code will now delete this block in one call, rather than iterating over each child. * khtml/editing/visible_position.cpp: (khtml::visiblePositionsOnDifferentLines): New helper called in initializePositionData() to do the work mentioned above in the comment for that function. (khtml::isFirstVisiblePositionOnLine): Ditto. (khtml::isLastVisiblePositionOnLine): Ditto. * khtml/editing/visible_position.h: Add new functions. * layout-tests/editing/deleting/delete-line-001-expected.txt: Added. * layout-tests/editing/deleting/delete-line-001.html: Added. * layout-tests/editing/deleting/delete-line-002-expected.txt: Added. * layout-tests/editing/deleting/delete-line-002.html: Added. * layout-tests/editing/deleting/delete-line-003-expected.txt: Added. * layout-tests/editing/deleting/delete-line-003.html: Added. * layout-tests/editing/deleting/delete-line-004-expected.txt: Added. * layout-tests/editing/deleting/delete-line-004.html: Added. * layout-tests/editing/deleting/delete-line-005-expected.txt: Added. * layout-tests/editing/deleting/delete-line-005.html: Added. * layout-tests/editing/deleting/delete-line-006-expected.txt: Added. * layout-tests/editing/deleting/delete-line-006.html: Added. * layout-tests/editing/deleting/delete-line-007-expected.txt: Added. * layout-tests/editing/deleting/delete-line-007.html: Added. * layout-tests/editing/deleting/delete-line-008-expected.txt: Added. * layout-tests/editing/deleting/delete-line-008.html: Added. * layout-tests/editing/deleting/delete-line-009-expected.txt: Added. * layout-tests/editing/deleting/delete-line-009.html: Added. * layout-tests/editing/deleting/delete-line-010-expected.txt: Added. * layout-tests/editing/deleting/delete-line-010.html: Added. * layout-tests/editing/deleting/delete-line-011-expected.txt: Added. * layout-tests/editing/deleting/delete-line-011.html: Added. * layout-tests/editing/deleting/delete-line-012-expected.txt: Added. * layout-tests/editing/deleting/delete-line-012.html: Added. 2004-11-11 Ken Kocienda <kocienda@apple.com> Reviewed by Adele * khtml/editing/htmlediting.cpp: (khtml::DeleteSelectionCommand::initializePositionData): Add some comments and a new piece of debugging output. 2004-11-11 Ken Kocienda <kocienda@apple.com> Reviewed by John Fix for these bugs: <rdar://problem/3875618> REGRESSION (Mail): Hitting down arrow with full line selected skips line (br case) <rdar://problem/3875641> REGRESSION (Mail): Hitting down arrow with full line selected skips line (div case) * khtml/editing/selection.cpp: (khtml::Selection::modifyMovingRightForward): Fixed by juggling the position as the starting point for the next line position when necessary. * layout-tests/editing/selection/move-3875618-fix-expected.txt: Added. * layout-tests/editing/selection/move-3875618-fix.html: Added. * layout-tests/editing/selection/move-3875641-fix-expected.txt: Added. * layout-tests/editing/selection/move-3875641-fix.html: Added. 2004-11-11 Ken Kocienda <kocienda@apple.com> Reviewed by John Improved some function names, at John's urging. No changes to the functions themselves. canPerformSpecialCaseAllContentDelete() --> handleSpecialCaseAllContentDelete() canPerformSpecialCaseBRDelete() --> handleSpecialCaseBRDelete() performGeneralDelete() --> handleGeneralDelete() * khtml/editing/htmlediting.cpp: (khtml::DeleteSelectionCommand::handleSpecialCaseAllContentDelete) (khtml::DeleteSelectionCommand::handleSpecialCaseBRDelete) (khtml::DeleteSelectionCommand::handleGeneralDelete) (khtml::DeleteSelectionCommand::doApply) * khtml/editing/htmlediting.h 2004-11-11 Ken Kocienda <kocienda@apple.com> Reviewed by John Updated some layout test results that changed as a result of my last checking. Added a new test that has been in my tree for a few days. * layout-tests/editing/deleting/delete-3775172-fix-expected.txt: * layout-tests/editing/deleting/delete-3800834-fix-expected.txt: * layout-tests/editing/inserting/insert-3851164-fix-expected.txt: Added. * layout-tests/editing/inserting/insert-3851164-fix.html: Added. 2004-11-11 Ken Kocienda <kocienda@apple.com> Reviewed by John * khtml/editing/htmlediting.cpp: (khtml::debugNode): New debugging helper. (khtml::DeleteSelectionCommand::initializePositionData): No longer call obsoleted startPositionForDelete() and endPositionForDelete() functions. Just use the m_selectionToDelete object to determine start and end positions for the delete. (khtml::DeleteSelectionCommand::canPerformSpecialCaseAllContentDelete): New function that creates a special case for deleting all the content in a root editable element. (khtml::DeleteSelectionCommand::doApply): Call canPerformSpecialCaseAllContentDelete() function before BR special case and the general case delete functions. * khtml/editing/htmlediting.h: Updated for changed functions. 2004-11-10 Kevin Decker <kdecker@apple.com> Reviewed by mjs. Fixed <rdar://problem/3875011> DOMNodeList::tryGet() performs unnecessary (and expensive) dom tree traversals. Improved a loop from 2-n-squared to just n-squared. * khtml/ecma/kjs_dom.cpp: (DOMNodeList::tryGet): Got rid of an unnecessary node traversal. 2004-11-10 Ken Kocienda <kocienda@apple.com> Reviewed by Chris * khtml/editing/htmlediting.cpp: (khtml::DeleteSelectionCommand::initializePositionData): Move position adjustments for smart delete from the two functions below to here. There was an unnecessary double calculation of the leading and trailing whitespace positions. Also refined the trailing case so it only acts when the leading position is null (which seems to match TextEdit in my tests). Also removed some unnecessary copying of Position objects. (khtml::DeleteSelectionCommand::startPositionForDelete): Move out smart delete adjustment from here. (khtml::DeleteSelectionCommand::endPositionForDelete): Ditto. 2004-11-10 Ken Kocienda <kocienda@apple.com> Reviewed by Harrison (khtml::DeleteSelectionCommand::performGeneralDelete): Add some more comments to make things more clear. * khtml/editing/selection.cpp: (khtml::Selection::toRange): Fixed the upstream and downstream calls so that the resulting positions do not cross block boundaries. This was a bug and caused some delete problems when whole blocks were selected. I will be addressing that issue more fully in upcoming changes. 2004-11-10 Ken Kocienda <kocienda@apple.com> Reviewed by Harrison Some cleanups and fixes in upstream and downstream functions. Removed redundant checks for isBlockFlow() when calling enclosingBlockFlowElement(). Blocks do not need to skip the call to enclosingBlockFlowElement() for fear that the block's enclosing block will be returned. Remove code from upstream that confined the serach to block boundaries outside of the code which runs in the StayInBlock case. This code was redundant, and caused incorrect results to be returned in the DoNotStayInBlock case. In downstream, the check for crossing into a new block should use the equivalentDeepPosition() node, not the the this pointer's node. * khtml/xml/dom_position.cpp: (DOM::Position::upstream) (DOM::Position::downstream) 2004-11-09 David Hyatt <hyatt@apple.com> Fix for 3873234, Safari UI is unresponsive when parsing multiple HTML docs and 3873233, Safari hangs when loading large local files.