2005-11-03 Timothy Hatcher Reviewed by Darin and Vicki. * WebCore.xcodeproj/project.pbxproj: Change to use $(SYSTEM_LIBRARY_DIR) consistently and place $(NEXT_ROOT) in a few spots to make build-root work. 2005-11-03 David Hyatt Cleanup of bidi.cpp. This is bug 5532. I merged it nearly as is, although I did one additional rename of my own (BidiIterator's "par" -> "block") and I did not merge the * changes, since that particular style guideline is "in dispute." :) Reviewed by darin * khtml/rendering/bidi.cpp: (khtml::BidiIterator::BidiIterator): (khtml::BidiIterator::pos): (khtml::BidiState::BidiState): (khtml::getBPMWidth): (khtml::BidiContext::BidiContext): (khtml::BidiContext::~BidiContext): (khtml::BidiContext::deref): (khtml::operator==): (khtml::operator!=): (khtml::bidiNext): (khtml::bidiFirst): (khtml::BidiIterator::increment): (khtml::BidiIterator::atEnd): (khtml::BidiIterator::current): (khtml::chopMidpointsAt): (khtml::checkMidpoints): (khtml::appendRunsForObject): (khtml::appendRun): (khtml::embed): (khtml::RenderBlock::constructLine): (khtml::RenderBlock::tabWidth): (khtml::RenderBlock::computeHorizontalPositionsForLine): (khtml::RenderBlock::bidiReorderLine): (khtml::buildCompactRuns): (khtml::RenderBlock::layoutInlineChildren): (khtml::RenderBlock::determineStartPosition): (khtml::RenderBlock::skipWhitespace): (khtml::RenderBlock::findNextLineBreak): 2005-11-03 David Hyatt Make pre-wrap collapse away spaces at the start of a line. There are still several bugs, namely with overflow and with selection. This is bugzilla bug 5593. Reviewed by adele fast/text/whitespace/pre-wrap.html * khtml/rendering/bidi.cpp: (khtml::skipNonBreakingSpace): (khtml::shouldCollapseWhiteSpace): (khtml::RenderBlock::skipWhitespace): * khtml/rendering/render_block.h: 2005-11-03 Adele Peterson Reviewed by Darin. * khtml/rendering/render_layer.cpp: (khtml::): Made global ScrollAlignment members const (khtml::RenderLayer::scrollRectToVisible): Changed ScrollAlignment parameters to const ScrollAlignment& (khtml::RenderLayer::getRectToExpose): ditto. * khtml/rendering/render_layer.h: (khtml::RenderLayer::): removed typedefs (khtml::RenderLayer::getVisibleBehavior): Made this static. (khtml::RenderLayer::getPartialBehavior): ditto. (khtml::RenderLayer::getHiddenBehavior): ditto. 2005-11-03 Adele Peterson Reviewed by Hyatt. Clean up of layer scrolling code. Now we can clearly define what to do if a rectangle is fully visible, partially visible, or hidden. This also fixes a bug with the previous implementation where nested layers/frames would get passed a rect that was too large. Added fast/overflow/scrollRevealButton.html * khtml/rendering/render_layer.h: (khtml::RenderLayer::): Added ScrollBehavior enum, ScrollAlignment struct, and ScrollAlignment static members to describe specific scrolling behaviors depending on how visible the rectangle is. In the future, we can add other statics to easily describe desired behaviors. * khtml/rendering/render_layer.cpp: (khtml::): initialize ScrollAlignment static members: alignCenterIfNeeded, alignToEdgeIfNeeded, alignCenterAlways, alignTopAlways, alignBottomAlways (khtml::RenderLayer::scrollRectToVisible): alignCenterIfNeeded is the default behavior for both directions. Pass the original rect (adjusted if scrolling has occurred) when recursively calling this function. (khtml::RenderLayer::getRectToExpose): Adjusted for new ScrollAlignment parameters. * khtml/khtml_part.cpp: (KHTMLPart::gotoAnchor): Use the node's rect to determine where to scroll. We used to just use the origin, but this helps us match other browsers better. (KHTMLPart::setActiveNode): Removed scrolling code, since this is now also done in setFocusNode * khtml/xml/dom_elementimpl.cpp: (ElementImpl::scrollIntoView): Use new ScrollAlignment values to describe scrolling behavior. * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::nextKeyViewInFrame): Removed scrolling code, since this is now also done in setFocusNode (KWQKHTMLPart::centerSelectionInVisibleArea): Use new ScrollAlignment values to describe scrolling behavior. * kwq/WebCoreBridge.mm: (-[WebCoreBridge ensureSelectionVisible]): ditto. * kwq/KWQScrollView.h: Removed ensureRectVisible, since we no longer use this. * kwq/KWQScrollView.mm: ditto. * khtml/khtmlview.cpp: (KHTMLView::doAutoScroll): Removed unnecessary nil checks for enclosingLayer (KHTMLView::focusNextPrevNode): ditto. 2005-11-02 David Harrison Reviewed by Justin. Tests added in editing/inserting. in reply, extra line is inserted after pressing return on blank quoted line Also, did some minor cleanup. * khtml/editing/break_blockquote_command.cpp: (khtml::BreakBlockquoteCommand::BreakBlockquoteCommand): (khtml::BreakBlockquoteCommand::doApply): Make sure not to clone parent of skipped BR unless there are siblings to move over. * khtml/editing/break_blockquote_command.h: * khtml/editing/jsediting.cpp: 2005-11-02 Vicki Murley Reviewed by Darin. - fix REGRESSION (TOT): Scrollwheel doesn't work on frameset pages (5450) * kwq/KWQKHTMLPart.h: * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::wheelEvent): set _currentEvent to the wheel event (KWQKHTMLPart::passWheelEventToChildWidget): New. Pass the event to the child widget, if we haven't already handled the event * khtml/khtmlview.cpp: (KHTMLView::viewportWheelEvent): add passWheelEventToChildWidget check, and accept the event if we're passing to the child widget 2005-11-02 David Hyatt Fix for 5587, implement pre-wrap and pre-line white-space values. Reviewed by mjs Tests Added in fast/text/whitespace * khtml/css/css_computedstyle.cpp: (DOM::CSSComputedStyleDeclarationImpl::getPropertyCSSValue): * khtml/css/cssparser.cpp: (CSSParser::parseValue): * khtml/css/cssstyleselector.cpp: (khtml::CSSStyleSelector::applyProperty): * khtml/css/cssvalues.in: * khtml/css/html4.css: * khtml/ecma/kjs_html.cpp: (KJS::HTMLElement::preGetter): (KJS::HTMLElement::preSetter): * khtml/ecma/kjs_html.h: (KJS::HTMLElement::): * khtml/editing/visible_text.cpp: (khtml::TextIterator::handleTextNode): * khtml/editing/visible_units.cpp: (khtml::startOfParagraph): (khtml::endOfParagraph): * khtml/html/html_blockimpl.cpp: (HTMLPreElementImpl::mapToEntry): (HTMLPreElementImpl::parseMappedAttribute): (HTMLPreElementImpl::wrap): (HTMLPreElementImpl::setWrap): * khtml/html/html_blockimpl.h: * khtml/rendering/bidi.cpp: (khtml::checkMidpoints): (khtml::RenderBlock::computeHorizontalPositionsForLine): (khtml::RenderBlock::layoutInlineChildren): (khtml::RenderBlock::skipNonBreakingSpace): (khtml::RenderBlock::skipWhitespace): (khtml::RenderBlock::findNextLineBreak): * khtml/rendering/render_block.cpp: (khtml:::RenderFlow): (khtml::RenderBlock::setStyle): (khtml::RenderBlock::calcMinMaxWidth): (khtml::stripTrailingSpace): (khtml::RenderBlock::calcInlineMinMaxWidth): (khtml::RenderBlock::dump): * khtml/rendering/render_block.h: * khtml/rendering/render_layer.h: (khtml::): * khtml/rendering/render_line.cpp: (khtml::shouldDrawDecoration): * khtml/rendering/render_object.cpp: (RenderObject::tabWidth): * khtml/rendering/render_style.h: (khtml::): (khtml::RenderStyle::autoWrap): (khtml::RenderStyle::preserveNewline): (khtml::RenderStyle::collapseWhiteSpace): (khtml::RenderStyle::isCollapsibleWhiteSpace): (khtml::RenderStyle::breakOnlyAfterWhiteSpace): * khtml/rendering/render_table.cpp: (RenderTableCell::calcMinMaxWidth): * khtml/rendering/render_text.cpp: (RenderText::caretRect): (RenderText::trimmedMinMaxWidth): (RenderText::calcMinMaxWidth): (RenderText::width): * khtml/xml/dom_elementimpl.h: (DOM::): * khtml/xml/dom_textimpl.cpp: (TextImpl::rendererIsNeeded): * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::attributedString): 2005-11-01 David Hyatt Fix for bug 5580, slashdot regression with percentage height blocks. Reviewed by darin Added fast/block/basic/021.html * khtml/rendering/render_box.cpp: (RenderBox::calcPercentageHeight): 2005-11-01 Justin Garcia Reviewed by harrison Tweaked my previous fix for caret movement while scrolling. * khtml/editing/SelectionController.cpp: (khtml::SelectionController::SelectionController): Forgot to copy m_caretPositionOnLayout. (khtml::SelectionController::operator=): Ditto. (khtml::SelectionController::layout): Initialize m_caretPositionOnLayout to a dummy value when the selection isNone. * khtml/editing/SelectionController.h: Tweaked my comment. 2005-11-01 Justin Garcia Reviewed by darin Fixes Seed: Mail crash adjusting quote level - KHTMLPart::computeAndSetTypingStyle No test cases added, requires Mail * kwq/WebCoreBridge.mm: (-[WebCoreBridge typingStyle]): Crashes were happening after a style was merged with itself. Mail was doing a setTypingStyle with a pointer to our internal typing style. Fix is to only hand out copies of our typingStyle. 2005-11-01 Justin Garcia Reviewed by harrison Fixed caret does not move when scrolling overflow: auto editable area * manual-tests/caretScrolling.html: Added. * khtml/editing/SelectionController.cpp: (khtml::SelectionController::SelectionController): Removed the unused expectedVisibleRect (khtml::SelectionController::operator=): Ditto. (khtml::SelectionController::layout): Save the caret's absolute position on layout. (khtml::SelectionController::caretRect): Adjust the returned caret rect for offset due to scrolling since the last layout. (khtml::SelectionController::paintCaret): * khtml/editing/SelectionController.h: * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::nextKeyViewInFrame): Small tweak to a previous change. * kwq/KWQRect.h: (QRect::moveTopLeft): Added. 2005-11-01 Mitz Pettel Reviewed by Dave Hyatt. Commited by Tim Hatcher. Fixes http://bugzilla.opendarwin.org/show_bug.cgi?id=5256 Relayout during load causes duplicate plugin part. This was a problem with s that contain an , if layout happened in the middle of the OBJECT but before the EMBED. No test case added, requires manual testing. * khtml/html/html_objectimpl.cpp: (DOM::HTMLObjectElementImpl::HTMLObjectElementImpl): (DOM::HTMLObjectElementImpl::closeRenderer): (DOM::HTMLObjectElementImpl::setComplete): * khtml/html/html_objectimpl.h: (DOM::HTMLObjectElementImpl::isComplete): * khtml/html/htmlfactory.cpp: (DOM::objectConstructor): * khtml/rendering/render_frames.cpp: (RenderPartObject::updateWidget): 2005-11-01 Alexey Proskuryakov Reviewed by Dave Hyatt. Commited by Tim Hatcher. Fixes http://bugzilla.opendarwin.org/show_bug.cgi?id=5541 HTMLNames constants are not yet initialized at Safari startup, when bookmarks are imported, which caused a crash in Decoder::decode(). * kwq/WebCoreEncodings.mm: (+[WebCoreEncodings decodeData:]): 2005-11-01 John Sullivan Change by Alexey Proskuryakov, reviewed by Darin Adler. * kwq/KWQKURL.mm: (encodeRelativeString): switched to use fastStrdup(), we can't use strdup because we need to use fastFree(), not regular free() 2005-11-01 Anders Carlsson Reviewed by Darin. * khtml/ecma/kjs_dom.cpp: (KJS::DOMNode::getValueProperty): (KJS::DOMNode::putValueProperty): * khtml/ecma/kjs_dom.h: (KJS::DOMNode::): Add setter and setter for textContent. * khtml/xml/dom_nodeimpl.cpp: (DOM::NodeImpl::textContent): (DOM::NodeImpl::setTextContent): * khtml/xml/dom_nodeimpl.h: Implement textContent and setTextContent. * kwq/DOM.mm: (-[DOMNode textContent]): (-[DOMNode setTextContent:]): Add Objective C wrappers. 2005-10-31 Eric Seidel Reviewed by hyatt. Now ignores XSLT PIs in documents resulting from transforms. http://bugzilla.opendarwin.org/show_bug.cgi?id=5529 * khtml/xml/dom_docimpl.cpp: (DocumentImpl::recalcStyleSelector): * khtml/xml/xml_tokenizer.cpp: (khtml::XMLTokenizer::processingInstruction): 2005-10-31 David Harrison Remove conditionalized away code added as part of tab character support. * khtml/editing/insert_text_command.cpp: (khtml::InsertTextCommand::prepareForTextInsertion): (khtml::InsertTextCommand::insertTab): * khtml/editing/markup.cpp: (khtml::createParagraphContentsFromString): 2005-10-29 David Hyatt Fix the performance regression caused by doing too much copying of background/border values. This patch attempts to rectify things by doing the following: (1) Don't initialize the border/background cached values on every single style resolution. (2) Only cache the border/background values just after user agent styles have been resolved if the user agent set an appearance. (3) Only check for appearance disabling if you had a UA appearance originally (and then continue to have an appearance after author/user styles have been resolved too) (4) Make sure to patch the pseudoStyleForElement method too. With the removal of the initialization code for the values running over and over again, I needed to make sure to patch this function to match styleForElement. Reviewed by sullivan * khtml/css/cssstyleselector.cpp: (khtml::CSSStyleSelector::initForStyleResolve): (khtml::CSSStyleSelector::styleForElement): (khtml::CSSStyleSelector::pseudoStyleForElement): (khtml::CSSStyleSelector::adjustRenderStyle): * khtml/css/cssstyleselector.h: 2005-10-28 Beth Dakin Reviewed by John Fix for REGRESSION (125-312): crash in [KWQTableView resignFirstResponder] selecting from JS menu (car4you.at, etc.) Since it is possible that a render widget's eventFilterObject has been destroyed even though the render widget is still ref-ed, we need to nil-check the eventFilterObject before we use it to get the eventFilter. * kwq/KWQComboBox.mm: (-[KWQPopUpButton becomeFirstResponder]): Added nil check. (-[KWQPopUpButton resignFirstResponder]): Added nil check. * kwq/KWQListBox.mm: (-[KWQTableView becomeFirstResponder]): Added nil check. (-[KWQTableView resignFirstResponder]): Added nil check. * kwq/KWQTextArea.mm: (-[KWQTextAreaTextView becomeFirstResponder]): Added nil check. (-[KWQTextAreaTextView resignFirstResponder]): Added nil check. * kwq/KWQTextField.mm: (-[KWQTextFieldController setHasFocus:]): Added nil check. * kwq/WebCoreBridge.mm: (-[WebCoreBridge elementForView:]): Added nil check. 2005-10-28 Adele Peterson Reviewed by Beth. - fixed finding text in overflow area doesn't always scroll to the right place * khtml/rendering/render_text.cpp: (RenderText::selectionRect): Subtracts scroll offset of containing block layer. 2005-10-28 David Hyatt Make sure positioned content works with width:intrinsic. Fixes positioned buttons. The bug is bugzilla #5520. Reviewed by mjs fast/forms/positioned-button.html * khtml/rendering/render_box.cpp: (RenderBox::calcAbsoluteHorizontalValues): 2005-10-28 Adele Peterson Reviewed by Hyatt. -fixed focus() does not work properly on anchors new form elements don't get revealed when focus() is called on them * khtml/xml/dom_docimpl.cpp: (DocumentImpl::setFocusNode): call scrollRectToVisible. 2005-10-27 David Hyatt Fix for bug 5519, buttons need to honor background/border: none and turn off styles. This patch changes the default style rules so that buttons have both a border and a background color. If the author changes the border/background so that it no longer matches these chosen defaults, we assume that the button has now been styled and we turn off the Aqua appearance. We also play more games with border and padding and juggle the values around so that things look right with Aqua turned on and off. Reviewed by mjs * khtml/css/cssstyleselector.cpp: (khtml::CSSStyleSelector::matchRules): (khtml::CSSStyleSelector::initForStyleResolve): (khtml::CSSStyleSelector::styleForElement): (khtml::CSSStyleSelector::adjustRenderStyle): (khtml::CSSStyleSelector::applyDeclarations): * khtml/css/cssstyleselector.h: * khtml/css/html4.css: * khtml/rendering/render_style.h: (khtml::BorderValue::BorderValue): (khtml::BorderData::operator!=): (khtml::RenderStyle::border): * khtml/rendering/render_theme.cpp: (khtml::RenderTheme::paint): (khtml::RenderTheme::isControlStyled): * khtml/rendering/render_theme.h: * khtml/rendering/render_theme_mac.h: * khtml/rendering/render_theme_mac.mm: (khtml::RenderThemeMac::adjustButtonStyle): (khtml::RenderThemeMac::setButtonCellState): (khtml::RenderThemeMac::paintButton): 2005-10-26 Vicki Murley Reviewed by Hyatt. Fix problems with link jumping. In the cases below, we were calculating the wrong position to scroll to. link jumping should scroll to tallest object on line, not first object on line when calculating position for link jumping, skip siblings that are unrendered whitespace Safari - erratic behavior of empty anchor tags followed by whitespace Link scrolling to last object on the page doesn't work if the link being scrolled to contains an empty inline erratic link jumping when tables are involved * khtml/xml/dom_nodeimpl.cpp: (DOM::ContainerNodeImpl::getUpperLeftCorner): 2005-10-27 Eric Seidel Build fix, forgot to commit project file. Also need to make XSLT #ifdef's work for portability. http://bugzilla.opendarwin.org/show_bug.cgi?id=3275 * WebCore.xcodeproj/project.pbxproj: * khtml/ecma/XSLTProcessor.cpp: * khtml/ecma/XSLTProcessor.h: * khtml/ecma/kjs_window.cpp: (KJS::Window::getValueProperty): 2005-10-27 Eric Seidel No review needed, svg build fix only. * kdom/xpointer/XPointerExpressionImpl.cpp: "Shared.h" to "kdom/Shared.h" 2005-10-27 David Harrison Reviewed by Justin Garcia and Dave Hyatt. crash trying to forward msg - khtml::RenderBlock::addChildToFlow Problem was that onunload events were being fired while in the middle of trying to detach, which resulted in updateDocumentsRendering re-attaching the previously detached nodes. Similar problem with load events while attaching. Solved by eliminating load and unload for object nodes, pre-sending unload before detach, and sending dom mutation and load events after attaching. Also, added asserts to catch this problem more easily in the future. Added test: * fast/events/event-targets.html Make sure that load and unload events do not fire on certain objects. * khtml/ecma/kjs_html.cpp: (KJS::Image::notifyFinished): Use constant string for "load" event name. * khtml/ecma/xmlhttprequest.cpp: (KJS::XMLHttpRequest::changeState): Use constant strings for "load" and "readystatechange" event names. * khtml/html/html_baseimpl.cpp: (HTMLFrameElementImpl::close): (HTMLFrameElementImpl::willRemove): (HTMLFrameElementImpl::detach): Add willRemove() function. * khtml/html/html_baseimpl.h: Add willRemove() function. * khtml/html/html_objectimpl.cpp: (DOM::HTMLObjectElementImpl::attach): (DOM::HTMLObjectElementImpl::detach): Stop needlessly sending load and unload events for OBJECT elements. * khtml/xml/dom2_traversalimpl.cpp: (DOM::NodeIteratorImpl::notifyBeforeNodeRemoval): Rename local variable from willRemove to removedNode for clarity. * khtml/xml/dom_docimpl.cpp: (DocumentImpl::DocumentImpl): (DocumentImpl::forbidEventDispatch): (DocumentImpl::allowEventDispatch): (DocumentImpl::eventDispatchForbidden): (DocumentImpl::createEvent): Add mechanism to prevent event dispatch. * khtml/xml/dom_docimpl.h: * khtml/xml/dom_nodeimpl.cpp: (DOM::NodeImpl::dispatchEvent): (DOM::NodeImpl::dispatchGenericEvent): (DOM::NodeImpl::dispatchHTMLEvent): (DOM::NodeImpl::dispatchWindowEvent): (DOM::NodeImpl::dispatchMouseEvent): (DOM::NodeImpl::dispatchSimulatedMouseEvent): (DOM::NodeImpl::dispatchUIEvent): (DOM::NodeImpl::dispatchSubtreeModifiedEvent): (DOM::NodeImpl::dispatchKeyEvent): (DOM::NodeImpl::dispatchWheelEvent): (DOM::NodeImpl::willRemove): (DOM::ContainerNodeImpl::insertBefore): (DOM::ContainerNodeImpl::replaceChild): (DOM::ContainerNodeImpl::willRemove): (DOM::ContainerNodeImpl::willRemoveChild): (DOM::ContainerNodeImpl::removeChild): (DOM::ContainerNodeImpl::removeChildren): (DOM::ContainerNodeImpl::appendChild): (DOM::ContainerNodeImpl::addChild): (DOM::ContainerNodeImpl::dispatchChildInsertedEvents): (DOM::ContainerNodeImpl::dispatchChildRemovalEvents): Prevent event dispatch during DOM node removals and additions. * khtml/xml/dom_nodeimpl.h: 2005-10-27 David Harrison Reviewed by Tim Omerick. AX: Safari crashes on www.mozilla.org with Voice Over - khtml::RenderImage::imageMap Test cases added: None. Manual testing is way to awkward, and automated testing is not possible. See following bug... Need automated testing support for accessibility APIs * ChangeLog: * khtml/rendering/render_image.cpp: (RenderImage::RenderImage): (RenderImage::imageMap): (RenderImage::updateAltText): 2005-10-27 Eric Seidel Reviewed by hyatt. Add XSLTProcessor support to WebCore's JavaScript bindings. add XSLTProcessor to WebCore's JavaScript support http://bugzilla.opendarwin.org/show_bug.cgi?id=3275 * WebCore.xcodeproj/project.pbxproj: * khtml/ecma/XSLTProcessor.cpp: Added. (KJS::): (KJS::XSLTProcessor::XSLTProcessor): (KJS::XSLTProcessor::~XSLTProcessor): (KJS::XSLTProcessorProtoFunc::callAsFunction): * khtml/ecma/XSLTProcessor.h: Added. (KJS::XSLTProcessor::classInfo): (KJS::XSLTProcessor::): (KJS::XSLTProcessor::impl): (KJS::XSLTProcessorConstructorImp::XSLTProcessorConstructorImp): (KJS::XSLTProcessorConstructorImp::implementsConstruct): (KJS::XSLTProcessorConstructorImp::construct): * khtml/ecma/kjs_window.cpp: (KJS::Window::getValueProperty): * khtml/ecma/kjs_window.h: (KJS::Window::): * khtml/khtml_part.cpp: (KHTMLPart::replaceDocImpl): * khtml/xml/dom_docimpl.cpp: (DocumentImpl::DocumentImpl): (DocumentImpl::~DocumentImpl): (DocumentImpl::applyXSLTransform): * khtml/xml/dom_docimpl.h: (DOM::DocumentImpl::transformSourceDocument): (DOM::DocumentImpl::setTransformSourceDocument): * khtml/xml/xml_tokenizer.cpp: (khtml::xmlDocPtrForString): (khtml::XMLTokenizer::setTransformSource): * khtml/xml/xml_tokenizer.h: * khtml/xsl/xslt_processorimpl.cpp: (DOM::parseErrorFunc): (DOM::stylesheetLoadFunc): (DOM::setXSLTLoadCallBack): (DOM::writeToQString): (DOM::saveResultToString): (DOM::transformTextStringToXHTMLDocumentString): (DOM::xsltParamArrayFromQDict): (DOM::freeXsltParamArray): (DOM::XSLTProcessorImpl::createDocumentFromSource): (DOM::createFragmentFromSource): (DOM::xsltStylesheetPointer): (DOM::xmlDocPtrFromNode): (DOM::resultMIMEType): (DOM::XSLTProcessorImpl::transformToString): (DOM::XSLTProcessorImpl::transformToDocument): (DOM::XSLTProcessorImpl::transformToFragment): (DOM::XSLTProcessorImpl::setParameter): (DOM::XSLTProcessorImpl::getParameter): (DOM::XSLTProcessorImpl::removeParameter): * khtml/xsl/xslt_processorimpl.h: (DOM::XSLTProcessorImpl::XSLTProcessorImpl): (DOM::XSLTProcessorImpl::setXSLStylesheet): (DOM::XSLTProcessorImpl::importStylesheet): (DOM::XSLTProcessorImpl::clearParameters): (DOM::XSLTProcessorImpl::reset): (DOM::XSLTProcessorImpl::xslStylesheet): 2005-10-27 Adele Peterson Reviewed by Vicki. Fixed bug that prevents overflow areas from scrolling to reveal anchor. Part of . * khtml/khtml_part.cpp: (KHTMLPart::gotoAnchor): 2005-10-27 Adele Peterson Reviewed by Vicki. - fixed REGRESSION: content doesn't scroll far enough to the left after clicking links at aplacecalledcommon.co.uk * khtml/rendering/render_layer.cpp: (khtml::RenderLayer::scrollRectToVisible): fixed a typo where verticalAlignment was being passed instead of horizontalAlignment. * khtml/khtml_part.cpp: (KHTMLPart::gotoAnchor): specified alignLeft as horizontal alignment. 2005-10-27 David Hyatt Fix form controls so that they can take advantage of the style sharing optimization. Special-case the "type" attribute to accomplish this. Also add checks for missing pseudo-classes that the sharing code now needs to check once form controls start sharing style. These include enabled, checked and indeterminate. Finally, :target should have been checked all along and was broken by the original style sharing landing. Add it to the list of things checked as well. It's impossible to write a :target test. Other areas more than covered by existing test cases. Reviewed by mjs * khtml/css/cssstyleselector.cpp: (khtml::CSSStyleSelector::canShareStyleWithElement): (khtml::CSSStyleSelector::checkOneSelector): 2005-10-27 David Hyatt Fix for bug 5517, percentage height relative block inside a percentage height absolute block did not stretch properly to fill the absolute block. Also fixing box-sizing bugs in percentage height calculations. Recurrence in calcPercentageHeight needed a content box adjustment. Reviewed by mjs fast/block/positioning/062.html fast/box-sizing/percentage-test.html fast/box-sizing/panels-one.html fast/box-sizing/panels-two.html * khtml/rendering/render_box.cpp: (RenderBox::calcPercentageHeight): 2005-10-27 Eric Seidel No review, SVG build fix only. Fixing fallout from . * WebCore+SVG/xml_kdomtokenizer.cpp: (KDOMTokenizer::write): now returns bool (KDOMTokenizer::finish): error check 2005-10-26 Eric Seidel Reviewed by mjs & darin. Various fixes to createMarkup and toString code to properly support serialization of XML. http://bugzilla.opendarwin.org/show_bug.cgi?id=5404 * khtml/editing/markup.cpp: (khtml::startMarkup): (khtml::doesHTMLForbidEndTag): (khtml::shouldSelfClose): (khtml::endMarkup): (khtml::markup): (khtml::createFragmentFromMarkup): (khtml::createMarkup): * khtml/html/html_elementimpl.cpp: (HTMLElementImpl::createContextualFragment): (HTMLElementImpl::toString): * khtml/html/htmltokenizer.cpp: (khtml::parseHTMLDocumentFragment): * khtml/html/htmltokenizer.h: * khtml/xml/dom_xmlimpl.cpp: (DOM::ProcessingInstructionImpl::ProcessingInstructionImpl): (DOM::ProcessingInstructionImpl::~ProcessingInstructionImpl): (DOM::ProcessingInstructionImpl::toString): * khtml/xml/dom_xmlimpl.h: (DOM::ProcessingInstructionImpl::sheet): (DOM::ProcessingInstructionImpl::setStyleSheet): 2005-10-26 David Hyatt Don't allow position:relative to apply to table sections. Fixes the crash described in Radar bug 4107882. (http://cityoflakeforest.com/cs/pw/cs_pw2a3.htm) Reviewed by bdakin * khtml/css/cssstyleselector.cpp: (khtml::CSSStyleSelector::adjustRenderStyle): 2005-10-26 Adele Peterson Reviewed by John. Fixes a few problems with that I noticed with code inspection. * khtml/rendering/render_layer.h: removed inline scrollToPoint * khtml/rendering/render_layer.cpp: (khtml::RenderLayer::getRectToExpose): * khtml/khtml_part.cpp: (KHTMLPart::gotoAnchor): Used to call scrollToPoint, now calls scrollRectToVisible * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::jumpToSelection): Now uses the enclosing layer of the selection start, instead of the outermost layer. (KWQKHTMLPart::centerSelectionInVisibleArea): ditto. 2005-10-26 Anders Carlsson Reviewed by Maciej. * khtml/ecma/kjs_dom.cpp: (KJS::DOMNodeProtoFunc::callAsFunction): * khtml/ecma/kjs_dom.h: Add JS wrapper. (KJS::DOMNode::): * khtml/xml/dom_nodeimpl.cpp: (DOM::NodeImpl::isEqualNode): * khtml/xml/dom_nodeimpl.h: Implement isEqualNode. * kwq/DOM.mm: (-[DOMNode isEqualNode:]): Add Objective C wrapper. 2005-10-26 David Hyatt Add support for the indeterminate boolean for placing checkboxes into a mixed state. This is a feature of WinIE. Along with this feature, add support for the CSS3 :indeterminate selector, although one wonders how this could be part of the selectors spec when no DOM standard covers the ability to make a mixed checkbox in the first place. This implementation may seem like it's overlooking some things, but it's not. Specifically "indeterminate" has no effect on form submission, it does not get cleared by a form reset, and the pre/post reversal code for undoing clicks only resets the state that changed in WinIE. This is all bizarre behavior, but this is a WinIE extension, so we're going to match. Reviewed by mjs fast/forms/indeterminate.html * khtml/css/css_base.cpp: (CSSSelector::extractPseudoType): * khtml/css/css_base.h: (DOM::CSSSelector::): * khtml/css/cssstyleselector.cpp: (khtml::CSSStyleSelector::checkOneSelector): * khtml/ecma/kjs_html.cpp: (KJS::HTMLElement::inputGetter): (KJS::HTMLElement::inputSetter): * khtml/ecma/kjs_html.h: (KJS::HTMLElement::): * khtml/html/html_formimpl.cpp: (DOM::HTMLInputElementImpl::init): (DOM::HTMLInputElementImpl::setIndeterminate): (DOM::HTMLInputElementImpl::preDispatchEventHandler): (DOM::HTMLInputElementImpl::postDispatchEventHandler): * khtml/html/html_formimpl.h: (DOM::HTMLInputElementImpl::isIndeterminate): (DOM::HTMLInputElementImpl::indeterminate): * khtml/rendering/render_theme.cpp: (khtml::RenderTheme::isIndeterminate): * khtml/rendering/render_theme.h: * khtml/rendering/render_theme_mac.mm: (khtml::RenderThemeMac::updateCheckedState): (khtml::RenderThemeMac::setCheckboxCellState): * khtml/xml/dom_nodeimpl.h: (DOM::NodeImpl::isIndeterminate): 2005-10-26 Maciej Stachowiak Re-landed fix for the following bug: crash repeatedly reloading www.supermanhomepage.com (fixed in Denver, broken on TOT) * khtml/ecma/kjs_events.cpp: (KJS::JSAbstractEventListener::handleEvent): 2005-10-25 Darin Adler Reviewed by Eric. - fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=5315 need to set document type based on contents of (fixes one layout test) * khtml/html/html_documentimpl.cpp: (DOM::HTMLDocumentImpl::determineParseMode): Use the new setDocType function instead of modifying m_doctype directly. * khtml/xml/dom_docimpl.h: Changed to use SharedPtr more. (DOM::DocumentImpl::realDocType): Add get() since we're using SharedPtr. (DOM::DocumentImpl::setDocType): Added. * khtml/xml/dom_docimpl.cpp: (DOMImplementationImpl::createDocument): Use setDocType instead of using realDocType()->copyFrom to set up the document type in the new document. (DocumentImpl::DocumentImpl): Don't create an empty document type during constructor. (DocumentImpl::~DocumentImpl): Remove explicit deref since we're using SharedPtr. (DocumentImpl::doctype): Add get() since we're using SharedPtr. (DocumentTypeImpl::DocumentTypeImpl): Streamlined implementation since we're using SharedPtr. * khtml/xml/xml_tokenizer.cpp: (khtml::XMLTokenizer::internalSubset): Added. Calls setDocType. (khtml::internalSubsetHandler): Added. Calls xmlSAX2InternalSubset after calling our function. (khtml::XMLTokenizer::finish): Changed to pass our internalSubsetHandler function pointer. 2005-10-25 David Hyatt This patch makes a number of refinements to buttons to make the custom s on hotwire.com look correct. Also back out my fix for bug 5283, since it causes some bad regressions and basically needs to be rethought. (This part not reviewed, since it's just a backout.) Reviewed by darin * khtml/css/html4.css: Added rules to reset many more properties on form controls, including text-align, letter-spacing, word-spacing, line-height text-transform and others. Remove the !important from the line-height reset, since WinIE honors line-height on buttons. Mozilla does not, but we will match WinIE. * khtml/rendering/render_button.cpp: (khtml::RenderButton::setStyle): Make sure to preserve the box-flex of our generated interior block, so that it doesn't end up packing left inside its container when styles change. (khtml::RenderButton::paintObject): Change the clipping heuristic to only clip to the border box. This does mean text can run right up to the edge of an Aqua button, but without this change we just don't match other browsers. * khtml/rendering/render_flexbox.cpp: (khtml::RenderFlexibleBox::layoutHorizontalBox): (khtml::RenderFlexibleBox::layoutVerticalBox): Change the behavior of box-align:center. If it would result in spillage out the top or left when centering, then don't move it. 2005-10-25 Maciej Stachowiak Re-landing the isSameNode fix from Anders, I verified there is no effect on performance: Re-land isSameNode change * khtml/ecma/kjs_dom.cpp: * khtml/ecma/kjs_dom.h: * khtml/xml/dom_nodeimpl.h: * kwq/DOM.mm: 2005-10-25 Maciej Stachowiak Re-land the following fix, I tested to verify there is no performance regression: Makes tags not use image mode for svg content: http://bugzilla.opendarwin.org/show_bug.cgi?id=5175 * khtml/html/html_objectimpl.cpp: (DOM::HTMLObjectElementImpl::isImageType): 2005-10-25 Adele Peterson Reviewed by Hyatt. - fixed setting focus, by tabbing, searching, or with JavaScript does not scroll overflow:auto/scroll/overlay to reveal focused element (3480) * khtml/rendering/render_layer.cpp: (khtml::RenderLayer::scrollRectToVisible): Added case for when the renderer has an overflow clip, so we can scroll overflow and views recursively. 2005-10-25 Adele Peterson Reviewed by Vicki. Fixed RoboHelp-generated html help system crashes in latest Safari -KWQValueListImpl::copyOnWrite The tokenizer's timer was causing the tokenizer to be deleted twice. In timerEvent, we'll now check to see if the write has destroyed the tokenizer before trying to do it again. * khtml/html/htmltokenizer.cpp: (khtml::HTMLTokenizer::write): Returns a boolean to indicate whether end() gets called (khtml::HTMLTokenizer::timerEvent): Moved code from allDataProcessed, and now, checks to see if write() called end() to notify WebKit that processing is done. * khtml/html/htmltokenizer.h: write() returns a bool. * khtml/xml/xml_tokenizer.cpp: (khtml::XMLTokenizer::write): returns a bool (always false in the XMLTokenizer case). * khtml/xml/xml_tokenizer.h: ditto. 2005-10-25 Beth Dakin Reviewed by Maciej Fix for SureSec si#182 safari heap overflow. When a table has a really huge rowSpan, Safari used to crash because the malloc of the grid for the table failed. This fix just checks for the success of the malloc. * khtml/rendering/render_table.cpp: (RenderTableSection::ensureRows): Return false if the grid resize is not successful. (RenderTableSection::addCell): Return early if ensureRows() returned false. * khtml/rendering/render_table.h: Make ensureRows() return a bool instead of void. 2005-10-25 Adele Peterson Reviewed by Hyatt. - first step of fix for setting focus, by tabbing, searching, or with JavaScript does not scroll overflow:auto/scroll/overlay to reveal focused element (3480) This change moves the scrolling code for revealing elements to the RenderLayer, instead of being specific to the view. * khtml/rendering/render_layer.h: Added scrollRectToVisible. Added getRectToExpose. Added ScrollAlignment enum so callers can be more specific about exactly where they want to scroll. (khtml::RenderLayer::scrollToPoint): Added inline function to scroll to a point. * khtml/rendering/render_layer.cpp: (khtml::RenderLayer::scrollRectToVisible): Replaces recursive view scrolling functions. (khtml::RenderLayer::getRectToExpose): Calculates the rectangle to expose based on the alignment parameters. * khtml/khtml_part.cpp: (KHTMLPart::gotoAnchor): Changed use of setContentsPosRecursive to scrollToPoint. (KHTMLPart::setActiveNode): Changed use of ensureVisible to scrollRectToVisible. * khtml/khtmlview.cpp: (KHTMLView::doAutoScroll): Changed use of ensureVisible to scrollRectToVisible. (KHTMLView::focusNextPrevNode): ditto. * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::jumpToSelection): Changed use of _KWQ_scrollRectToVisible to scrollRectToVisible. (KWQKHTMLPart::nextKeyViewInFrame): Changed use of ensureRectVisibleCentered to scrollRectToVisible. (KWQKHTMLPart::centerSelectionInVisibleArea): ditto. * khtml/xml/dom_elementimpl.cpp: (ElementImpl::scrollIntoView): Changed use of setContentsPos and ensureVisible to scrollRectToVisible. * kwq/WebCoreBridge.mm: (-[WebCoreBridge ensureSelectionVisible]): Changed use of ensureRectVisibleCentered to scrollRectToVisible. * kwq/KWQComboBox.mm: (-[KWQPopUpButton becomeFirstResponder]): Changing use of _KWQ_scrollFrameToVisible to scrollRectToVisible. * kwq/KWQFileButton.mm: (KWQFileButton::focusChanged): ditto. * kwq/KWQListBox.mm: (-[KWQTableView becomeFirstResponder]): ditto. * kwq/KWQSlider.mm: (-[KWQSlider becomeFirstResponder]): ditto. * kwq/KWQTextArea.mm: (-[KWQTextAreaTextView becomeFirstResponder]): ditto. * kwq/KWQTextField.mm: (-[KWQTextFieldController setHasFocus:]): ditto. * kwq/KWQScrollView.h: Removed ensureVisible, and ensureRectVisibleCentered. Added ensureRectVisible which just calls across to AppKit to scroll the NSView. * kwq/KWQScrollView.mm: (QScrollView::ensureRectVisible): ditto. * WebCore.xcodeproj/project.pbxproj: Removed KWQNSViewExtras since it is no longer needed. * kwq/KWQNSViewExtras.h: Removed. * kwq/KWQNSViewExtras.m: Removed. 2005-10-25 David Hyatt Land box-sizing support and change button to work correctly with it. Also stop honoring of font properties on if Aqua is enabled. If you allow bold, but don't honor size, then you end up with poorly rendered buttons on cnn.com (box-sizing made this apparent, since the buttons got smaller). Fix the clipping code for button content to actually work. :) Function needed to be designated virtual in order to get called. Reviewed by darin fast/box-sizing/box-sizing.html is the new test case. * ChangeLog: * WebCore.xcodeproj/project.pbxproj: * khtml/rendering/render_block.cpp: (khtml::RenderBlock::calcMinMaxWidth): * khtml/rendering/render_block.h: * khtml/rendering/render_box.cpp: (RenderBox::calcBorderBoxWidth): (RenderBox::calcBorderBoxHeight): (RenderBox::calcContentBoxWidth): (RenderBox::calcContentBoxHeight): (RenderBox::calcWidth): (RenderBox::calcWidthUsing): (RenderBox::calcHeight): (RenderBox::calcHeightUsing): (RenderBox::calcPercentageHeight): (RenderBox::calcReplacedWidth): (RenderBox::calcReplacedWidthUsing): (RenderBox::calcReplacedHeightUsing): (RenderBox::availableHeightUsing): (RenderBox::calcAbsoluteHorizontalValues): (RenderBox::calcAbsoluteVerticalValues): * khtml/rendering/render_box.h: * khtml/rendering/render_button.cpp: (khtml::RenderButton::paintObject): * khtml/rendering/render_button.h: * khtml/rendering/render_flexbox.cpp: (khtml::RenderFlexibleBox::calcMinMaxWidth): * khtml/rendering/render_theme_mac.mm: (khtml::RenderThemeMac::setFontFromControlSize): (khtml::RenderThemeMac::adjustButtonStyle): 2005-10-25 Vicki Murley Reviewed by Hyatt. - fix DOM tests expect hierarchy exception adding wrong types of nodes to parents (4568) Check that the node being added is an allowable child. If inserting a document fragment node, check each child of the node. Fixes 4 of the W3C DOM HTML tests and 11 of the XHTML tests. * khtml/xml/dom_nodeimpl.cpp: (DOM::NodeImpl::checkAddChild): 2005-10-25 Darin Adler Reviewed by Dave Hyatt. - fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=4945 event init calls should not do anything if the event has already been dispatched - made a small performance improvement to event creation by simplifying the date code (seen on profiles) - changed DOMTimestamp to be a 64-bit integer on Mac OS X (requested by the DOM standard) * khtml/dom/dom_node.h: Made DOMTimestamp be unsigned long long on Mac OS X. * khtml/xml/dom_nodeimpl.cpp: (DOM::NodeImpl::dispatchGenericEvent): Assert that the event has a target. (DOM::NodeImpl::dispatchWindowEvent): Set the event target to the document. * khtml/xml/dom2_eventsimpl.h: Changed many data members to use SharedPtr instead of explicit ref/deref. Changed m_createTime to be a DOMTimeStamp instead of a QDateTime. (DOM::EventImpl::setTarget): Now inlined. (DOM::EventImpl::timeStamp): Now inlined. (DOM::EventImpl::preventDefault): Now inlined. (DOM::EventImpl::dispatched): Added. Returns true if the event was already dispatched, meaning it already has a target. * khtml/xml/dom2_eventsimpl.cpp: (DOM::currentTimeStamp): Added. Faster inline version on Mac OS X, since this shows up in profiles. (DOM::EventImpl::EventImpl): Changed to use contructor syntax and set m_createTime to currentTimeStamp(). (DOM::EventImpl::~EventImpl): Removed explicit derefs; no longer needed. (DOM::EventImpl::initEvent): Do nothing if dispatched() is true. Simplify since SharedPtr handles ref/deref. (DOM::UIEventImpl::UIEventImpl): Changed to use contructor syntax and take advantage of the fact that some data members are now SharedPtr. (DOM::UIEventImpl::initUIEvent): Do nothing if dispatched() is true. Simplify since SharedPtr handles ref/deref. (DOM::MouseEventImpl::MouseEventImpl): Changed to use contructor syntax and take advantage of the fact that some data members are now SharedPtr. (DOM::MouseEventImpl::~MouseEventImpl): Removed explicit derefs; no longer needed. (DOM::MouseEventImpl::initMouseEvent): Do nothing if dispatched() is true. Simplify since SharedPtr handles ref/deref. (DOM::MouseEventImpl::isDragEvent): Use a local variable. (DOM::KeyboardEventImpl::KeyboardEventImpl): Changed to use contructor syntax and take advantage of the fact that some data members are now SharedPtr. (DOM::KeyboardEventImpl::~KeyboardEventImpl): Removed explicit derefs; no longer needed. (DOM::KeyboardEventImpl::initKeyboardEvent): Do nothing if dispatched() is true. Simplify since SharedPtr handles ref/deref. (DOM::MutationEventImpl::MutationEventImpl): Changed to use contructor syntax and take advantage of the fact that some data members are now SharedPtr. (DOM::MutationEventImpl::initMutationEvent): Do nothing if dispatched() is true. Simplify since SharedPtr handles ref/deref. (DOM::ClipboardEventImpl::ClipboardEventImpl): Simplify since SharedPtr handles initialization and ref/deref. (DOM::RegisteredEventListener::RegisteredEventListener): Ditto. 2005-10-24 Geoffrey Garen Patch by Niels Leenheer. Fixes http://bugzilla.opendarwin.org/show_bug.cgi?id=3587 http://bugzilla.opendarwin.org/show_bug.cgi?id=3587 Reviewed by hyatt. Layout tests added: * dom/xhtml/level2/html/HTMLBaseElement02-expected.txt: * dom/xhtml/level2/html/frame-expected.txt: * fast/frames/calculate-fixed-expected.txt: Added. * fast/frames/calculate-fixed.html: Added. * fast/frames/calculate-order-expected.txt: Added. * fast/frames/calculate-order.html: Added. * fast/frames/calculate-percentage-expected.txt: Added. * fast/frames/calculate-percentage.html: Added. * fast/frames/calculate-relative-expected.txt: Added. * fast/frames/calculate-relative.html: Added. * fast/frames/calculate-round-expected.txt: Added. * fast/frames/calculate-round.html: Added. * khtml/rendering/render_frames.cpp: (RenderFrameSet::layout): 2005-10-24 Darin Adler Reviewed by Hyatt. - fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=5054 Crash with dataTransfer.setDragImage * khtml/ecma/kjs_events.cpp: (KJS::ClipboardProtoFunc::callAsFunction): Added type check in case the parameter passed is not an object. 2005-10-24 Darin Adler Reviewed by Beth. - got ready to make m_parent private by removing references to it also removed tabs (and used spaces instead) to files I touched - fixed code that initialized m_parent twice * khtml/css/css_base.cpp: (StyleBaseImpl::checkLoaded): Use parent(). (StyleBaseImpl::stylesheet): Ditto. * khtml/css/css_base.h: (DOM::StyleBaseImpl::StyleBaseImpl): Initialize base TreeShared with the appropriate parent instead of first setting m_parent to 0 and then to the correct value. Also removed setParent, since the base class setParent works fine. * khtml/css/css_ruleimpl.cpp: (DOM::CSSRuleImpl::parentStyleSheet): Use parent(). (DOM::CSSRuleImpl::parentRule): Ditto. * khtml/css/css_stylesheetimpl.cpp: (StyleSheetImpl::parentStyleSheet): Ditto. (MediaListImpl::parentStyleSheet): Ditto. (MediaListImpl::parentRule): Ditto. * khtml/css/css_valueimpl.cpp: (DOM::CSSStyleDeclarationImpl::parentRule): Ditto. * khtml/rendering/render_replaced.cpp: Reformatting only, and removed some APPLE_CHANGES-only instead. * khtml/xml/dom_nodeimpl.cpp: (DOM::NodeImpl::isContentEditable): Use parent(). * khtml/xml/dom_nodeimpl.h: (DOM::NodeImpl::parentNode): Ditto. * khtml/xsl/xsl_stylesheetimpl.cpp: (DOM::XSLImportRuleImpl::parentStyleSheet): Ditto. 2005-10-24 David Hyatt Fix for 5485, make sure generated content's "rightmost selector" check does not apply once you move to another selector in the compound selector chain. Reviewed by mjs * khtml/css/cssstyleselector.cpp: (khtml::CSSStyleSelector::checkSelector): 2005-10-24 Mitz Pettel Reviewed by Darin, committed by beth. Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=5384 Soft hyphen displayed as hyphen when it is the first character in a line/run. * khtml/rendering/bidi.cpp: (khtml::checkMidpoints): (khtml::RenderBlock::skipWhitespace): (khtml::RenderBlock::findNextLineBreak): * khtml/rendering/render_text.cpp: (RenderText::calcMinMaxWidth): 2005-10-23 David Hyatt Make sure the button's generated text using the value with the default label so that Submit/Reset buttons aren't blank. Reviewed by mjs Added fast/forms/blankbuttons.html * khtml/rendering/render_button.cpp: (khtml::RenderButton::updateFromElement): 2005-10-24 Maciej Stachowiak Re-landing Dave Hyatt's changes from when the tree was closed. * khtml/rendering/render_container.cpp: (RenderContainer::destroy): (RenderContainer::destroyLeftoverAnonymousChildren): * khtml/rendering/render_container.h: * khtml/rendering/render_flow.cpp: (RenderFlow::destroy): * khtml/rendering/render_layer.cpp: (khtml::RenderLayer::isTransparent): (khtml::RenderLayer::paintLayer): (khtml::isOverflowOnly): (khtml::compare): (khtml::sortByZOrder): * khtml/rendering/render_layer.h: 2005-10-24 Alexey Proskuryakov Reviewed by Darin Adler. Commited by Tim Hatcher. - fixes http://bugzilla.opendarwin.org/show_bug.cgi?id=5484 REGRESSION: reproducible crash in CachedCSSStyleSheet::setCharset * khtml/misc/loader.cpp: (CachedCSSStyleSheet::setCharset): (CachedScript::setCharset): 2005-10-24 Mitz Pettel Reviewed by Darin. Committed by David Harrison. http://bugzilla.opendarwin.org/show_bug.cgi?id=5449 "OBJECT should be accessible by id/name as document property only if its only children are PARAMs" Test added: * fast/js/object-by-name-or-id-expected.txt: Added. * fast/js/object-by-name-or-id.html: Added. Files changed: * khtml/html/html_miscimpl.cpp: (DOM::HTMLNameCollectionImpl::traverseNextItem): * khtml/html/html_objectimpl.cpp: (DOM::HTMLObjectElementImpl::HTMLObjectElementImpl): (DOM::HTMLObjectElementImpl::parseMappedAttribute): (DOM::HTMLObjectElementImpl::insertedIntoDocument): (DOM::HTMLObjectElementImpl::removedFromDocument): (DOM::HTMLObjectElementImpl::childrenChanged): (DOM::HTMLObjectElementImpl::updateDocNamedItem): * khtml/html/html_objectimpl.h: (DOM::HTMLObjectElementImpl::isDocNamedItem): * manual-tests/drag_select_highlighting.html: Added. 2005-10-24 Mitz Pettel Reviewed by Darin. Committed by David Harrison. http://bugzilla.opendarwin.org/show_bug.cgi?id=5415 "Left border of selection highlight leaves behind a trail" (Code changes are in WebKit) * manual-tests/drag_select_highlighting.html: Added. 2005-10-24 Vicki Murley Changes by Mitz Pettel, reviewed by Maciej. - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=5306 (KHTMLPart::requestObject doesn't destroy old plugin content) * khtml/html/html_objectimpl.cpp: (DOM::HTMLObjectElementImpl::recalcStyle): 2005-10-24 Vicki Murley Changes by Alexey Proskuryakov, reviewed by Maciej. - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=5140 (CachedObject loading ignores charset from HTTP headers) * khtml/misc/loader.cpp: (CachedCSSStyleSheet::setCharset): (CachedScript::setCharset): (CachedXSLStyleSheet::setCharset): (CachedXSLStyleSheet::data): (CachedXBLDocument::CachedXBLDocument): (CachedXBLDocument::setCharset): (CachedXBLDocument::data): (Loader::slotReceivedResponse): * khtml/misc/loader.h: 2005-10-24 Antti Koivisto Reviewed by Hyatt, landed by beth. Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=5318 forced line break should not be allowed after a list marker. * khtml/rendering/bidi.cpp: (khtml::RenderBlock::findNextLineBreak): 2005-10-24 Darin Adler Reviewed by hyatt. Fix Qualified Name parsing to match spec. xhtml dom tests cover these cases. http://bugzilla.opendarwin.org/show_bug.cgi?id=5317 * khtml/xml/dom_docimpl.cpp: (isValidNameStart): (isValidNamePart): (qualifiedNameIsMalformed): (DOMImplementationImpl::createDocumentType): (DOMImplementationImpl::createDocument): (DocumentImpl::createElementNS): (DocumentImpl::isValidName): (DocumentImpl::parseQualifiedName): * khtml/xml/dom_docimpl.h: * khtml/xml/dom_elementimpl.cpp: (ElementImpl::setAttributeNS): 2005-10-23 Julien Palmas Reviewed by eseidel. Finally fix pattern "userspaceonuse" support. Several test cases already cover this. http://bugzilla.opendarwin.org/show_bug.cgi?id=5361 * kcanvas/device/quartz/KRenderingPaintServerQuartz.mm: (KRenderingPaintServerPatternQuartz::draw): * svg-tests/W3C-SVG-1.1/pservers-grad-03-b-expected.checksum: * svg-tests/W3C-SVG-1.1/pservers-grad-03-b-expected.png: * svg-tests/W3C-SVG-1.1/pservers-grad-06-b-expected.checksum: * svg-tests/W3C-SVG-1.1/pservers-grad-06-b-expected.png: * svg-tests/W3C-SVG-1.1/pservers-pattern-01-b-expected.checksum: * svg-tests/W3C-SVG-1.1/pservers-pattern-01-b-expected.png: 2005-10-23 Julien Palmas Reviewed by eseidel. Merged over Shared -> Shared change from kdom. http://bugzilla.opendarwin.org/show_bug.cgi?id=5391 * WebCore.xcodeproj/project.pbxproj: * kdom/Shared.h: (KDOM::Shared::Shared): (KDOM::Shared::~Shared): (KDOM::Shared::refCount): (KDOM::Shared::ref): (KDOM::Shared::deref): * kdom/SharedPtr.h: Added. (KDOM::SharedPtr::SharedPtr): (KDOM::SharedPtr::~SharedPtr): (KDOM::SharedPtr::isNull): (KDOM::SharedPtr::notNull): (KDOM::SharedPtr::reset): (KDOM::SharedPtr::get): (KDOM::SharedPtr::operator!): (KDOM::SharedPtr::operator bool): (KDOM::SharedPtr::operator==): (KDOM::::operator): * kdom/TreeShared.h: (KDOM::TreeShared::TreeShared): (KDOM::TreeShared::~TreeShared): (KDOM::TreeShared::refCount): (KDOM::TreeShared::ref): (KDOM::TreeShared::deref): (KDOM::TreeShared::parent): (KDOM::TreeShared::setParent): * kdom/core/DOMConfigurationImpl.cpp: (DOMConfigurationImpl::DOMConfigurationImpl): * kdom/core/DOMConfigurationImpl.h: * kdom/core/DOMErrorHandlerImpl.cpp: (DOMErrorHandlerImpl::DOMErrorHandlerImpl): * kdom/core/DOMErrorHandlerImpl.h: * kdom/core/DOMErrorImpl.cpp: (DOMErrorImpl::DOMErrorImpl): * kdom/core/DOMErrorImpl.h: (KDOM::): * kdom/core/DOMExceptionImpl.cpp: (DOMExceptionImpl::DOMExceptionImpl): * kdom/core/DOMExceptionImpl.h: * kdom/core/DOMList.h: (KDOM::DOMList::DOMList): (KDOM::DOMList::~DOMList): * kdom/core/DOMLocatorImpl.cpp: (DOMLocatorImpl::DOMLocatorImpl): * kdom/core/DOMLocatorImpl.h: * kdom/core/DOMObjectImpl.cpp: (DOMObjectImpl::DOMObjectImpl): * kdom/core/DOMObjectImpl.h: * kdom/core/DOMStringImpl.cpp: (DOMStringImpl::DOMStringImpl): * kdom/core/DOMStringImpl.h: * kdom/core/DOMUserDataImpl.cpp: (DOMUserDataImpl::DOMUserDataImpl): * kdom/core/DOMUserDataImpl.h: * kdom/core/NamedNodeMapImpl.cpp: (NamedNodeMapImpl::NamedNodeMapImpl): * kdom/core/NamedNodeMapImpl.h: * kdom/core/NodeImpl.h: * kdom/core/NodeListImpl.cpp: (NodeListImpl::NodeListImpl): * kdom/core/NodeListImpl.h: * kdom/core/TypeInfoImpl.cpp: (TypeInfoImpl::TypeInfoImpl): * kdom/core/TypeInfoImpl.h: * kdom/css/CSSRuleListImpl.cpp: (CSSRuleListImpl::CSSRuleListImpl): * kdom/css/CSSRuleListImpl.h: * kdom/css/CounterImpl.cpp: (CounterImpl::CounterImpl): * kdom/css/CounterImpl.h: * kdom/css/RGBColorImpl.cpp: (RGBColorImpl::RGBColorImpl): * kdom/css/RGBColorImpl.h: * kdom/css/RectImpl.cpp: (RectImpl::RectImpl): * kdom/css/RectImpl.h: * kdom/css/RenderStyle.cpp: (RenderStyle::RenderStyle): * kdom/css/RenderStyle.h: (KDOM::RenderStyle::RenderStyle): * kdom/css/RenderStyleDefs.cpp: (StyleSurroundData::StyleSurroundData): (StyleBoxData::StyleBoxData): (StyleVisualData::StyleVisualData): (StyleBackgroundData::StyleBackgroundData): (StyleMarqueeData::StyleMarqueeData): (StyleCSS3NonInheritedData::StyleCSS3NonInheritedData): (StyleCSS3InheritedData::StyleCSS3InheritedData): (StyleInheritedData::StyleInheritedData): * kdom/css/RenderStyleDefs.h: (KDOM::BorderData::BorderData): * kdom/css/StyleSheetListImpl.cpp: (StyleSheetListImpl::StyleSheetListImpl): * kdom/css/StyleSheetListImpl.h: * kdom/events/EventExceptionImpl.cpp: (EventExceptionImpl::EventExceptionImpl): * kdom/events/EventExceptionImpl.h: * kdom/events/EventImpl.cpp: (EventImpl::EventImpl): * kdom/events/EventImpl.h: * kdom/events/EventListenerImpl.cpp: (EventListenerImpl::EventListenerImpl): * kdom/events/EventListenerImpl.h: * kdom/ls/LSExceptionImpl.cpp: (LSExceptionImpl::LSExceptionImpl): * kdom/ls/LSExceptionImpl.h: * kdom/ls/LSInputImpl.cpp: (LSInputImpl::LSInputImpl): * kdom/ls/LSInputImpl.h: * kdom/ls/LSOutputImpl.cpp: (LSOutputImpl::LSOutputImpl): * kdom/ls/LSOutputImpl.h: * kdom/ls/LSParserFilterImpl.cpp: (LSParserFilterImpl::LSParserFilterImpl): * kdom/ls/LSParserFilterImpl.h: * kdom/ls/LSResourceResolverImpl.cpp: (LSResourceResolverImpl::LSResourceResolverImpl): * kdom/ls/LSResourceResolverImpl.h: * kdom/ls/LSSerializerImpl.cpp: (LSSerializerImpl::LSSerializerImpl): * kdom/ls/LSSerializerImpl.h: * kdom/range/RangeExceptionImpl.cpp: (RangeExceptionImpl::RangeExceptionImpl): * kdom/range/RangeExceptionImpl.h: * kdom/range/RangeImpl.cpp: (RangeImpl::RangeImpl): * kdom/range/RangeImpl.h: * kdom/traversal/NodeFilterImpl.cpp: (NodeFilterImpl::NodeFilterImpl): * kdom/traversal/NodeFilterImpl.h: (KDOM::NodeFilterCondition::NodeFilterCondition): (KDOM::NodeFilterCondition::~NodeFilterCondition): (KDOM::NodeFilterCondition::acceptNode): * kdom/traversal/TraversalImpl.cpp: (TraversalImpl::TraversalImpl): * kdom/traversal/TraversalImpl.h: * kdom/views/AbstractViewImpl.cpp: (AbstractViewImpl::AbstractViewImpl): * kdom/views/AbstractViewImpl.h: * kdom/xpath/XPathExceptionImpl.h: * kdom/xpath/XPathExpressionImpl.h: * kdom/xpath/XPathNSResolverImpl.h: * kdom/xpath/XPathResultImpl.h: * kdom/xpointer/NBCImpl.cpp: (NBCImpl::NBCImpl): * kdom/xpointer/NBCImpl.h: * kdom/xpointer/PointerPartImpl.cpp: (PointerPartImpl::PointerPartImpl): * kdom/xpointer/PointerPartImpl.h: * kdom/xpointer/XPointerExceptionImpl.cpp: (XPointerExceptionImpl::XPointerExceptionImpl): * kdom/xpointer/XPointerExceptionImpl.h: * kdom/xpointer/XPointerExpressionImpl.cpp: (XPointerExpressionImpl::XPointerExpressionImpl): * kdom/xpointer/XPointerExpressionImpl.h: * kdom/xpointer/XPointerResultImpl.cpp: (XPointerResultImpl::XPointerResultImpl): * kdom/xpointer/XPointerResultImpl.h: * ksvg2/css/SVGRenderStyleDefs.cpp: (StyleFillData::StyleFillData): (StyleStrokeData::StyleStrokeData): (StyleStopData::StyleStopData): (StyleClipData::StyleClipData): (StyleMarkerData::StyleMarkerData): (StyleMiscData::StyleMiscData): * ksvg2/css/SVGRenderStyleDefs.h: * ksvg2/svg/SVGAngleImpl.cpp: (SVGAngleImpl::SVGAngleImpl): * ksvg2/svg/SVGAngleImpl.h: * ksvg2/svg/SVGAnimatedBooleanImpl.cpp: (SVGAnimatedBooleanImpl::SVGAnimatedBooleanImpl): * ksvg2/svg/SVGAnimatedBooleanImpl.h: * ksvg2/svg/SVGAnimatedEnumerationImpl.cpp: (SVGAnimatedEnumerationImpl::SVGAnimatedEnumerationImpl): * ksvg2/svg/SVGAnimatedEnumerationImpl.h: * ksvg2/svg/SVGAnimatedIntegerImpl.cpp: (SVGAnimatedIntegerImpl::SVGAnimatedIntegerImpl): * ksvg2/svg/SVGAnimatedIntegerImpl.h: * ksvg2/svg/SVGAnimatedNumberImpl.cpp: (SVGAnimatedNumberImpl::SVGAnimatedNumberImpl): * ksvg2/svg/SVGAnimatedNumberImpl.h: * ksvg2/svg/SVGAnimatedTemplate.h: (KSVG::SVGAnimatedTemplate::SVGAnimatedTemplate): * ksvg2/svg/SVGExceptionImpl.cpp: (SVGExceptionImpl::SVGExceptionImpl): * ksvg2/svg/SVGExceptionImpl.h: * ksvg2/svg/SVGLengthImpl.cpp: (SVGLengthImpl::SVGLengthImpl): * ksvg2/svg/SVGLengthImpl.h: * ksvg2/svg/SVGMatrixImpl.cpp: (SVGMatrixImpl::SVGMatrixImpl): * ksvg2/svg/SVGMatrixImpl.h: * ksvg2/svg/SVGNumberImpl.cpp: (SVGNumberImpl::SVGNumberImpl): * ksvg2/svg/SVGNumberImpl.h: * ksvg2/svg/SVGPathSegImpl.cpp: (SVGPathSegImpl::SVGPathSegImpl): * ksvg2/svg/SVGPathSegImpl.h: * ksvg2/svg/SVGPointImpl.cpp: (SVGPointImpl::SVGPointImpl): * ksvg2/svg/SVGPointImpl.h: * ksvg2/svg/SVGPreserveAspectRatioImpl.cpp: (SVGPreserveAspectRatioImpl::SVGPreserveAspectRatioImpl): * ksvg2/svg/SVGPreserveAspectRatioImpl.h: * ksvg2/svg/SVGRectImpl.cpp: (SVGRectImpl::SVGRectImpl): * ksvg2/svg/SVGRectImpl.h: * ksvg2/svg/SVGTransformImpl.cpp: (SVGTransformImpl::SVGTransformImpl): * ksvg2/svg/SVGTransformImpl.h: 2005-10-23 Eric Seidel No review, build fix only. * WebCore.xcodeproj/project.pbxproj: added RenderButton.cpp 2005-10-23 Geoffrey Garen Reviewed by Maciej. Removed early return from stopLoading because it prevented onunload events from firing. Also, for better abstraction, made the tokenizer -- instead of the data source -- responsible for calling [WebFrame _checkLoadComplete] when the tokenizer stops. * khtml/html/htmltokenizer.cpp: (khtml::HTMLTokenizer::stopParsing): * khtml/khtml_part.cpp: (KHTMLPart::stopLoading): 2005-10-23 Julien Palmas Reviewed by mjs. * WebCore+SVG/xml_kdomtokenizer.cpp: (KDOMTokenizer::KDOMTokenizer): build fix. http://bugzilla.opendarwin.org/show_bug.cgi?id=5462 2005-10-23 Nicholas Shanks Reviewed by Dave Hyatt. http://bugzilla.opendarwin.org/show_bug.cgi?id=3442 Adds support for :first-of-type CSS3 pseudo-selectors And builds foundations for :last-of-type and :only-of-type * khtml/css/css_base.cpp: (CSSSelector::extractPseudoType): * khtml/css/css_base.h: (DOM::CSSSelector::CSSSelector): (DOM::CSSSelector::~CSSSelector): (DOM::CSSSelector::): (DOM::CSSSelector::pseudoType): (DOM::StyleBaseImpl::StyleBaseImpl): (DOM::StyleBaseImpl::~StyleBaseImpl): (DOM::StyleBaseImpl::isStyleSheet): (DOM::StyleBaseImpl::isCSSStyleSheet): (DOM::StyleBaseImpl::isStyleSheetList): (DOM::StyleBaseImpl::isMediaList): (DOM::StyleBaseImpl::isRuleList): (DOM::StyleBaseImpl::isRule): (DOM::StyleBaseImpl::isStyleRule): (DOM::StyleBaseImpl::isCharetRule): (DOM::StyleBaseImpl::isImportRule): (DOM::StyleBaseImpl::isMediaRule): (DOM::StyleBaseImpl::isFontFaceRule): (DOM::StyleBaseImpl::isPageRule): (DOM::StyleBaseImpl::isUnknownRule): (DOM::StyleBaseImpl::isStyleDeclaration): (DOM::StyleBaseImpl::isValue): (DOM::StyleBaseImpl::isPrimitiveValue): (DOM::StyleBaseImpl::isValueList): (DOM::StyleBaseImpl::isValueCustom): (DOM::StyleBaseImpl::setParent): (DOM::StyleBaseImpl::parseString): (DOM::StyleBaseImpl::setStrictParsing): (DOM::StyleBaseImpl::useStrictParsing): (DOM::StyleListImpl::StyleListImpl): (DOM::StyleListImpl::length): (DOM::StyleListImpl::item): (DOM::StyleListImpl::append): * khtml/css/cssstyleselector.cpp: (khtml::CSSStyleSelector::checkSelector): (khtml::CSSStyleSelector::checkOneSelector): 2005-10-21 David Hyatt Reviewed by darin * khtml/css/cssstyleselector.cpp: Add support for the GrayText CSS2 system color to represent the disabled text color for controls. * khtml/css/html4.css: Make sure that the default cursor is set for all types of buttons and not just the HTML4 button. Set the foreground color for buttons using the CSS2 system color. Set the disabled text color using the CSS2 system color. Move the default padding for buttons into the CSS file. It will get overridden by Aqua buttons but be honored by all other types of buttons. This allows the author to override it as well when customizing. * khtml/rendering/render_block.h: Make paintChildren virtual so that RenderButton can push a clip and pop a clip when painting children. * khtml/rendering/render_box.cpp: (RenderBox::paintBoxDecorations): Let the theme now decide whether the border/background should still be painted after the theme has painted. This allows buttons to paint custom borders but still use a pretty OS X background for the button face. * khtml/rendering/render_button.cpp: (khtml::RenderButton::paintChildren): Overridden to push/pop a clip so that the contents of a button don't ever spill out. * khtml/rendering/render_button.h: Added paintChildren method. * khtml/rendering/render_style.h: (khtml::BorderData::hasBorder): Fixed a regression in hasBorder. The border-image logic was inverted, resulting in hasBorder being true for every element! * khtml/rendering/render_theme.cpp: (khtml::RenderTheme::paint): Patched to return a boolean indicating whether or not the border/background should be painted. * khtml/rendering/render_theme.h: * khtml/rendering/render_theme_mac.h: * khtml/rendering/render_theme_mac.mm: (khtml::RenderThemeMac::adjustRepaintRect): Forgot to include radio and button in this method so that repaint rects would be correct. (khtml::RenderThemeMac::paintCheckbox): (khtml::RenderThemeMac::paintRadio): Adjusted to return the boolean to indicate that painting of border/background should not occur. (khtml::RenderThemeMac::adjustButtonStyle): Added support for border/background/colors. Also locked white-space to nowrap for Aqua buttons to avoid line wrapping. (khtml::RenderThemeMac::setButtonCellState): (khtml::RenderThemeMac::paintButton): More support for custom border/background/color. 2005-10-21 Geoffrey Garen Reviewed by darin. WebCore side of fix for window.print() followed by window.close() causes world leak No test case added because I have another reviewed patch that will include a test for this bug as well as many others. Under some conditions, [WebDataSource stopLoading] did not set [WebDataSource isLoading] to false, so the didFInishLoad delegates never fired. The reason isLoading didn't become false was that the tokenizer was still running. The fix here is to add a call to Tokenizer::stopParsing inside HTMLPart::stopLoading. Since the WebKit side of the fix eliminates an early return that used to protect HTMLPart::stopLoading from multiple calls, I added an early return inside HTMLPart::stopLoading. I also merged stopped and stopLoading, and merged the way XMLTokenizer and HTMLTokenizer track whether they're in a stopped state, because anything less would be uncivilized. * khtml/html/htmltokenizer.cpp: (khtml::HTMLTokenizer::HTMLTokenizer): (khtml::HTMLTokenizer::write): (khtml::HTMLTokenizer::stopParsing): (khtml::HTMLTokenizer::processToken): * khtml/html/htmltokenizer.h: * khtml/khtml_part.cpp: (KHTMLPart::stopLoading): (KHTMLPart::endIfNotLoading): (KHTMLPart::stop): * khtml/xml/xml_tokenizer.cpp: (khtml::Tokenizer::Tokenizer): (khtml::Tokenizer::finishedParsing): (khtml::XMLTokenizer::XMLTokenizer): (khtml::XMLTokenizer::endElementNs): (khtml::XMLTokenizer::characters): (khtml::XMLTokenizer::error): (khtml::XMLTokenizer::processingInstruction): (khtml::XMLTokenizer::cdataBlock): (khtml::XMLTokenizer::comment): (khtml::XMLTokenizer::stopParsing): * khtml/xml/xml_tokenizer.h: (khtml::Tokenizer::stopParsing): * kwq/KWQSignalStubs.mm: (Loader::requestStarted): 2005-10-21 Beth Dakin Reviewed by Hyatt Fix for certain sequence of DOM method calls involving CSS outline and display crashes Safari (in repaint code). * khtml/rendering/render_flow.cpp: (RenderFlow::destroy): Need to set m_continuation to 0 after it is destroyed to prevent possible crashes. 2005-10-21 Vicki Murley Reviewed by John. - fixed sometimes have to click twice to jump to top, on href="" * manual-tests/linkjump-1.html: Added. * khtml/khtml_part.cpp: (KHTMLPart::gotoAnchor): remove check for m_url.hasRef() - encodedHtmlRef and gotoAnchor handle empty strings for scrolling to the top of the document 2005-10-21 John Sullivan No test cases added. * khtml/rendering/render_theme_mac.mm: (khtml::RenderThemeMac::setButtonPaddingFromControlSize): fix deployment build by adding default: statement to button-size switch statement 2005-10-21 Beth Dakin Reviewed by Hyatt Fix for crash due to infinite layout regression in RenderLayer::updateScrollInfoAfterLayout (was at ourmedia.org) Cannot use hasOverhangingFloats() in this case because borderBottom() has already been added into m_height. This was causing m_height to be off by a pixel in some cases and then causing infinite recursion in the scroll bar code. * khtml/rendering/render_block.cpp: Replaced call to hasOverhangingFloats() (khtml::RenderBlock::layoutBlock): 2005-10-21 Beth Dakin Reviewed by Hyatt...sort of. No test cases added. Fix for a build failure after Hyatt's button check-in. KWQSlider.mm was still importing the now deprecated KWQButton.h Changed it to import KWQLineEdit.h instead. * kwq/KWQSlider.mm: 2005-10-21 David Hyatt Land the new "NSView-less" buttons. With this landing both and