=== WebCore-146.1 === 2004-06-18 Vicki Murley - merge this change from HEAD 2004-06-18 Trey Matteson 3702053 - DHTML dragging destination can't control the cursor (by setting the drop operation) Fallout from security work, but an easy fix. Reviewed by Darin * kwq/KWQClipboard.mm: (KWQClipboard::setDropEffect): Allow dest side to set dropEffect. 2004-06-18 Vicki Murley - merge this change from HEAD 2004-06-18 Darin Adler Reviewed by John. - re-fixed show expert preferences notes in xcode causes crash (in EllipsisBox code) * khtml/rendering/render_block.cpp: (khtml::RenderBlock::paintEllipsisBoxes): Check !isInlineFlow rather than checking hasMarkupTruncation. Otherwise, we break plain old non-markup truncation. 2004-06-18 Vicki Murley - merge this change from HEAD 2004-06-18 Darin Adler Reviewed by John. - fixed show expert preferences notes in xcode causes crash (in EllipsisBox code) * khtml/rendering/render_block.cpp: (khtml::RenderBlock::paintEllipsisBoxes): Only walk the ellipsis list if hasMarkupTruncation is true. === Safari-146 === 2004-06-17 Richard Williamson Fixed setting the canvas or parent to display:none and updating the causes a nil-deref Ensured that we have a renderer before rendering. Reviewed by John. * khtml/ecma/kjs_html.cpp: (KJS::Context2DFunction::tryCall): 2004-06-17 David Hyatt Fix for 3674601, "Read More..." links should trail articles in Emerson. Reviewed by darin * khtml/rendering/bidi.cpp: (khtml::RenderBlock::layoutInlineChildren): (khtml::RenderBlock::deleteEllipsisLineBoxes): (khtml::RenderBlock::checkLinesForTextOverflow): * khtml/rendering/render_block.cpp: (khtml:::RenderFlow): (khtml::RenderBlock::paintEllipsisBoxes): (khtml::RenderBlock::nodeAtPoint): (khtml::shouldCheckLines): (khtml::getLineAtIndex): (khtml::getHeightForLineCount): (khtml::RenderBlock::lineAtIndex): (khtml::RenderBlock::lineCount): (khtml::RenderBlock::heightForLineCount): (khtml::RenderBlock::clearTruncation): * khtml/rendering/render_block.h: (khtml::RenderBlock::setHasMarkupTruncation): (khtml::RenderBlock::hasMarkupTruncation): * khtml/rendering/render_flexbox.cpp: (khtml::RenderFlexibleBox::layoutVerticalBox): * khtml/rendering/render_line.cpp: (khtml::EllipsisBox::m_str): (khtml::InlineBox::adjustPosition): (khtml::InlineFlowBox::adjustPosition): (khtml::InlineFlowBox::clearTruncation): (khtml::EllipsisBox::paint): (khtml::EllipsisBox::nodeAtPoint): (khtml::RootInlineBox::clearTruncation): (khtml::RootInlineBox::placeEllipsis): (khtml::RootInlineBox::paintEllipsisBox): (khtml::RootInlineBox::hitTestEllipsisBox): (khtml::RootInlineBox::adjustPosition): (khtml::RootInlineBox::childRemoved): * khtml/rendering/render_line.h: (khtml::InlineBox::clearTruncation): * khtml/rendering/render_text.cpp: * khtml/rendering/render_text.h: (khtml::InlineTextBox::clearTruncation): 2004-06-17 Trey Matteson 3698514 - coordinates in ondragstart and ondrag events are wrong This part fixes the ondragstart coords. We salt away the window-based mouseDown location, since we need that when we dispatch the ondragstart event. Previously we were errantly using a mouseDown point that had already been converted to view coords, and then the dispatch converted it again. Reviewed by Maciej. * kwq/KWQKHTMLPart.h: * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::khtmlMouseMoveEvent): Use window based mouse event coords to dispatch event. (KWQKHTMLPart::mouseDown): Save window based mouse event coords . 2004-06-16 David Hyatt Fix for 3596620, implement a subset of CSS3 text truncation for Emerson. Reviewed by mjs * khtml/rendering/bidi.cpp: (khtml::RenderBlock::checkLinesForTextOverflow): * khtml/rendering/font.cpp: (Font::checkSelectionPoint): * khtml/rendering/font.h: * khtml/rendering/render_block.cpp: (khtml::RenderBlock::paintObject): (khtml::RenderBlock::paintFloats): (khtml::RenderBlock::paintEllipsisBoxes): * khtml/rendering/render_block.h: * khtml/rendering/render_line.cpp: (InlineBox::canAccommodateEllipsis): (InlineBox::placeEllipsisBox): (InlineFlowBox::paintDecorations): (InlineFlowBox::placeEllipsisBox): (EllipsisBox::paint): (RootInlineBox::placeEllipsis): (RootInlineBox::placeEllipsisBox): * khtml/rendering/render_line.h: (khtml::EllipsisBox::m_str): (khtml::RootInlineBox::ellipsisBox): * khtml/rendering/render_text.cpp: (InlineTextBox::placeEllipsisBox): (InlineTextBox::paintDecoration): (InlineTextBox::offsetForPosition): (RenderText::positionForCoordinates): (RenderText::paint): * khtml/rendering/render_text.h: * kwq/KWQFontMetrics.h: * kwq/KWQFontMetrics.mm: (QFontMetrics::checkSelectionPoint): * kwq/WebCoreTextRenderer.h: === WebCore-145.1 === 2004-06-16 Maciej Stachowiak Reviewed by John. REGRESSION (144.2-TOT) Selection highlight does not draw * khtml/rendering/render_canvas.cpp: (RenderCanvas::setSelection): === Safari-145 === 2004-06-16 Richard Williamson Fixed 3695730: Added support for embeds[], much like applets[], to allow access to a plugin's exported interface. Reviewed by Chris. * khtml/dom/html_document.cpp: (HTMLDocument::embeds): * khtml/dom/html_document.h: * khtml/ecma/kjs_dom.cpp: (KJS::getRuntimeObject): * khtml/ecma/kjs_html.cpp: (KJS::HTMLDocument::tryGet): (KJS::HTMLElement::tryGet): (KJS::HTMLCollection::tryGet): (KJS::HTMLCollection::getNamedItems): * khtml/ecma/kjs_html.h: (KJS::HTMLDocument::): * khtml/ecma/kjs_html.lut.h: (KJS::): * khtml/html/html_miscimpl.cpp: (HTMLCollectionImpl::calcLength): (HTMLCollectionImpl::getItem): (HTMLCollectionImpl::getNamedItem): * khtml/html/html_miscimpl.h: (DOM::HTMLCollectionImpl::): * khtml/html/html_objectimpl.cpp: (HTMLEmbedElementImpl::getEmbedInstance): * khtml/html/html_objectimpl.h: * kwq/KWQKHTMLPart.h: * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::getEmbedInstanceForView): 2004-06-15 Maciej Stachowiak Reviewed by Dave. : (can't enable selection inside parent where it is disabled via CSS) * khtml/css/cssparser.cpp: (CSSParser::parseValue): * khtml/css/cssstyleselector.cpp: (khtml::CSSStyleSelector::applyProperty): * khtml/rendering/render_object.cpp: (RenderObject::shouldSelect): * khtml/rendering/render_style.h: (khtml::): (khtml::RenderStyle::userSelect): (khtml::RenderStyle::setUserSelect): (khtml::RenderStyle::initialUserSelect): 2004-06-15 David Hyatt Initial impl of the EllipsisBox. This code just gets the box created and gets it placed vertically. The next stage will be to position the box horizontally as well. Reviewed by trey * khtml/rendering/bidi.cpp: (khtml::RenderBlock::checkLinesForTextOverflow): * khtml/rendering/render_line.cpp: (RootInlineBox::placeEllipsis): * khtml/rendering/render_line.h: (khtml::EllipsisBox::m_str): 2004-06-15 David Hyatt Implement canAccommodateEllipsis. The basic idea is that everything on a line will allow an ellipsis to be drawn on top of it unless it's a replaced element. Then, if the replaced element overlaps, the ellipsis won't be allowed. Reviewed by john * khtml/rendering/bidi.cpp: (khtml::RenderBlock::checkLinesForTextOverflow): * khtml/rendering/render_line.cpp: (InlineBox::closestLeafChildForXPos): (InlineBox::canAccommodateEllipsis): (InlineFlowBox::canAccommodateEllipsis): (RootInlineBox::canAccommodateEllipsis): * khtml/rendering/render_line.h: 2004-06-15 Vicki Murley - added a few layout tests, rdar://3694510 * layout-tests/editing/deleting/delete-image-004-expected.txt: Added. * layout-tests/editing/deleting/delete-image-004.html: Added. * layout-tests/editing/selection/extend-by-character-006-expected.txt: Added. * layout-tests/editing/selection/extend-by-character-006.html: Added. 2004-06-15 Trey Matteson Dragging tweak: We pass the mouse down coords instead of the latest mouse drag coords to the ondragstart event. This makes it easy for the client to figure the correct drag image offset, whereas the mouse drag location is next to useless for that. Reviewed by Louch * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::khtmlMouseMoveEvent): 2004-06-15 Maciej Stachowiak Reviewed by Darin. : (Safari does not support onselectstart event handler) * khtml/ecma/kjs_dom.cpp: (DOMNode::getValueProperty): (DOMNode::putValue): * khtml/ecma/kjs_dom.h: (KJS::DOMNode::): * khtml/ecma/kjs_dom.lut.h: (KJS::): * khtml/html/html_elementimpl.cpp: (HTMLElementImpl::parseHTMLAttribute): * khtml/misc/htmlattrs.c: (hash_attr): (findAttr): * khtml/misc/htmlattrs.h: * khtml/misc/htmlattrs.in: * khtml/rendering/render_object.cpp: (RenderObject::shouldSelect): * khtml/xml/dom2_eventsimpl.cpp: (EventImpl::typeToId): (EventImpl::idToType): * khtml/xml/dom2_eventsimpl.h: (DOM::EventImpl::): 2004-06-15 Maciej Stachowiak Reviewed by Darin. Fix crash with last checkin. * khtml/ecma/kjs_binding.cpp: (ScriptInterpreter::domObjectsPerDocument): check the same property we want to initialize. 2004-06-15 Maciej Stachowiak Reviewed by Darin. : (properties not shared for JS wrappers of same DOM object, accessed from different frames) * khtml/ecma/kjs_binding.cpp: (ScriptInterpreter::domObjects): (ScriptInterpreter::domObjectsPerDocument): (ScriptInterpreter::ScriptInterpreter): (ScriptInterpreter::forgetDOMObject): (ScriptInterpreter::getDOMObjectForDocument): (ScriptInterpreter::putDOMObjectForDocument): (ScriptInterpreter::deleteDOMObjectsForDocument): (ScriptInterpreter::mark): (ScriptInterpreter::forgetDOMObjectsForDocument): (ScriptInterpreter::updateDOMObjectDocument): * khtml/ecma/kjs_binding.h: (KJS::ScriptInterpreter::getDOMObject): (KJS::ScriptInterpreter::putDOMObject): (KJS::ScriptInterpreter::deleteDOMObject): 2004-06-15 Darin Adler - rolled out Ken's fix for assertion failure in AppendNodeCommandImpl::doApply due to non-0 exception code trying to insert a DIV markup string (it was making most layout tests fail) * khtml/xml/dom_nodeimpl.cpp: (NodeImpl::checkAddChild): Rolled check back in. 2004-06-15 David Hyatt Add a truncation variable to text run boxes that will eventually be used to know how to cut out some of the glyphs when rendering. Reviewed by darin * khtml/rendering/render_text.cpp: (RenderText::clearTextOverflowTruncation): * khtml/rendering/render_text.h: (khtml::InlineTextBox:::InlineRunBox): (khtml::InlineTextBox::clearTruncation): 2004-06-14 Darin Adler Reviewed by Maciej. - fixed some things for GC that Patrick missed, or that happened after the branch * kwq/DOM-CSS.mm: (-[DOMStyleSheet finalize]): Added. (-[DOMStyleSheetList finalize]): Added. (-[DOMCSSStyleSheet finalize]): Added. (-[DOMMediaList finalize]): Added. (-[DOMCSSRuleList finalize]): Added. (-[DOMCSSRule finalize]): Added. (-[DOMCSSStyleDeclaration finalize]): Added. (-[DOMCSSValue finalize]): Added. (-[DOMRGBColor finalize]): Added. (-[DOMRect finalize]): Added. (-[DOMCounter finalize]): Added. * kwq/DOM.mm: (-[DOMObject finalize]): Added. (-[DOMNode finalize]): Added. (-[DOMNamedNodeMap finalize]): Added. (-[DOMNodeList finalize]): Added. (-[DOMImplementation finalize]): Added. (-[DOMRange finalize]): Added. (-[DOMNodeFilter finalize]): Added. (-[DOMNodeIterator finalize]): Added. (-[DOMTreeWalker dealloc]): Removed unneeded nil check. (-[DOMTreeWalker finalize]): Added. * kwq/DOMHTML.mm: (-[DOMHTMLCollection finalize]): Added. (-[DOMHTMLOptionsCollection finalize]): Added. * kwq/KWQClipboard.mm: (KWQClipboard::KWQClipboard): Use KWQRetain instead of retain. (KWQClipboard::~KWQClipboard): Use KWQRelease instead of release. * kwq/KWQEditCommand.mm: (-[KWQEditCommand finalize]): Added. * kwq/KWQFont.mm: (QFont::~QFont): Use KWQRelease instead of release. * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::keyEvent): Use KWQRetain instead of retain, and KWQRelease instead of release. (KWQKHTMLPart::mouseDown): Use KWQRetain instead of retain, and KWQRelease instead of release. (KWQKHTMLPart::mouseDragged): Use KWQRetain instead of retain, and KWQRelease instead of release. (KWQKHTMLPart::mouseUp): Use KWQRetain instead of retain, and KWQRelease instead of release. (KWQKHTMLPart::mouseMoved): Use KWQRetain instead of retain, and KWQRelease instead of release. (KWQKHTMLPart::sendContextMenuEvent): Use KWQRetain instead of retain, and KWQRelease instead of release. * kwq/KWQPageState.mm: (-[KWQPageState finalize]): Added. Filed about the fact that this is not right. * kwq/KWQTimer.mm: (-[KWQSingleShotTimerTarget finalize]): Added. * kwq/WebCoreBridge.mm: (-[WebCoreBridge finalize]): Added. Filed about the fact that this is not right. 2004-06-15 David Hyatt Initial work on text truncation. Working top-down, I think I've made all the changes I will need to bidi.cpp and to the block code itself. The rest of the code can be concentrated in the render_line and render_text files. Reviewed by darin * khtml/rendering/bidi.cpp: (khtml::RenderBlock::layoutInlineChildren): (khtml::RenderBlock::findNextLineBreak): (khtml::RenderBlock::deleteEllipsisLineBoxes): (khtml::RenderBlock::checkLinesForTextOverflow): * khtml/rendering/render_block.h: * khtml/rendering/render_line.cpp: (RootInlineBox::detach): (RootInlineBox::detachEllipsisBox): (RootInlineBox::canAccommodateEllipsis): (RootInlineBox::placeEllipsis): * khtml/rendering/render_line.h: (khtml::RootInlineBox::RootInlineBox): * khtml/rendering/render_text.cpp: (RenderText::clearTextOverflowTruncation): * khtml/rendering/render_text.h: 2004-06-14 Trey Matteson 3692690 - REGRESSION: canceling drag from WebView cause link to load Just need to take extra care to cancel any click handling in all cases once we're committed to doing the drag. Reviewed by Darin. * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::khtmlMouseMoveEvent): Call invalidateClick once we're past the hysteresis point, and definitely going to try to start a drag and drop. 2004-06-14 Darin Adler - fixed crash on boot * kwq/KWQFoundationExtras.h: (KWQRetainNSRelease): Fixed return value of this method; was uninitialized. 2004-06-14 Trey Matteson Dashboard wants access to pastboard data during the drag gesture. We address this need be allowing docs that are local files to access the pasteboard data during a drag, while other pages can only get at the types list until the drop happens. This is deemed safe because local files already have such broad super powers. Reviewed by Maciej. * kwq/KWQKURL.h: * kwq/KWQKURL.mm: (KURL::isLocalFile): Implement this QT method to look for the file scheme. * kwq/WebCoreBridge.mm: (-[WebCoreBridge dragOperationForDraggingInfo:]): Use more relaxed clipboard security for local file pages. (-[WebCoreBridge dragExitedWithDraggingInfo:]): Ditto. 2004-06-14 Darin Adler Reviewed by me, code changes by Patrick Beard. - fixed : (WebKit should adopt GC changes and compile with GC enabled) * WebCore.pbproj/project.pbxproj: Added KWQFoundationExtras.h. * kwq/KWQFoundationExtras.h: Added. (KWQRetain): Cover for CFRetain that is tolerant of nil. (KWQRelease): Cover for CFRelease that is tolerant of nil. (KWQRetainNSRelease): Combination of a CFRetain and an -[NSObject release] that is tolerant of nil. Also includes a declaration of finalize so we can call [super finalize] without warnings on Panther. * kwq/DOM.mm: (ObjCNodeFilterCondition::ObjCNodeFilterCondition): Use CFRetain instead of retain. (ObjCNodeFilterCondition::~ObjCNodeFilterCondition): Use CFRelease instead of release. * kwq/KWQComboBox.mm: (QComboBox::~QComboBox): Use KWQRelease instead of release. (QComboBox::setFont): Use KWQRelease instead of release. (QComboBox::labelFont): Use KWQRetain instead of retain. * kwq/KWQCursor.mm: (QCursor::QCursor): Use KWQRetain instead of retain. (QCursor::~QCursor): Use KWQRelease instead of release. (QCursor::operator=): More of the same. * kwq/KWQFileButton.mm: (KWQFileButton::KWQFileButton): Use KWQRetainNSRelease to retain a newly-allocated object. (KWQFileButton::~KWQFileButton): Use CFRelease instead of release. * kwq/KWQFont.mm: (QFont::QFont): Use KWQRetain instead of retain. (QFont::operator=): More of the same. (QFont::setFamily): Use KWQRelease instead of release. (QFont::setFirstFamily): Use KWQRelease instead of release. (QFont::setPixelSize): Use KWQRelease instead of release. (QFont::setWeight): Use KWQRelease instead of release. (QFont::setItalic): Use KWQRelease instead of release. (QFont::getNSFont): Use KWQRetain instead of retain. * kwq/KWQFontMetrics.mm: (QFontMetricsPrivate::~QFontMetricsPrivate): Use KWQRelease instead of release. (QFontMetricsPrivate::getRenderer): Use KWQRetain instead of retain. (QFontMetricsPrivate::setFont): Use KWQRelease instead of release. * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::~KWQKHTMLPart): Use KWQRelease instead of release. (KWQKHTMLPart::clearRecordedFormValues): Use KWQRelease instead of release. (KWQKHTMLPart::recordFormValue): Use KWQRetainNSRelease and use KWQRetain instead of retain. (KWQKHTMLPart::windowScriptObject): Use KWQRetainNSRelease. * kwq/KWQKJobClasses.mm: (KIO::TransferJobPrivate::TransferJobPrivate): Use KWQRetainNSRelease. (KIO::TransferJobPrivate::~TransferJobPrivate): Use KWQRelease instead of release. (KIO::TransferJob::setLoader): More of the same. * kwq/KWQLoader.mm: (KWQRetainResponse): Use KWQRetain instead of retain. (KWQReleaseResponse): Use KWQRelease instead of release. * kwq/KWQPainter.mm: (QPainterPrivate::~QPainterPrivate): Use KWQRelease instead of release. (QPainter::_updateRenderer): More of the same. (QPainter::initFocusRing): Use KWQRetainNSRelease. (QPainter::clearFocusRing): Use KWQRelease instead of release. * kwq/KWQPixmap.mm: (QPixmap::QPixmap): Use KWQRetain instead of retain. (QPixmap::~QPixmap): Use KWQRelease instead of release. (QPixmap::receivedData): Use KWQRetain instead of retain. (QPixmap::resize): Use KWQRetainNSRelease and use KWQRelease instead of release. (QPixmap::operator=): More of the same. * kwq/KWQRegion.mm: (QRegion::QRegion): Use KWQRetain instead of retain. (QRegion::~QRegion): Use KWQRelease instead of release. (QRegion::operator=): More of the same. * kwq/KWQTimer.mm: (QTimer::start): Use KWQRetain instead of retain. (QTimer::stop): Use KWQRelease instead of release. (QTimer::fire): Use KWQRelease instead of release. * kwq/KWQWidget.mm: (QWidget::QWidget): Use KWQRetain instead of retain. (QWidget::~QWidget): Use KWQRelease instead of release. (QWidget::setView): More of the same. * kwq/WebCoreSettings.mm: (-[WebCoreSettings finalize]): Delete the storage here, as well as in dealloc. 2004-06-14 Maciej Stachowiak Reviewed by Trey. : (Safari should use CG calls for circle drawing for better performance) * kwq/KWQPainter.mm: (QPainter::drawEllipse): Use CG calls instead of NS calls for faster circle drawing. (QPainter::drawArc): Ditto. 2004-06-14 Ken Kocienda Reviewed by Vicki Fix for this bug: Crash deleting text out of iChat's profile (an editable Webview) * khtml/html/html_elementimpl.cpp: (HTMLElementImpl::isFocusable): Added null-check of parent node before deref'ing it. 2004-06-14 Trey Matteson Two tweaks to recently added "drag" pseudo-class, as suggested by Dave. The class is renamed to "-khtml-drag", and we update layout when using it, instead of only updating styles. Reviewed by hyatt. * khtml/css/css_base.cpp: (CSSSelector::extractPseudoType): * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::snapshotDragImage): 2004-06-13 Trey Matteson Support for DHTML cut/copy/paste. We now support oncut, oncopy, onpaste. The events are sent to the first node in the selection, or else the body. Current holes are that we do not send events for operations in text fields or text areas (because it is hard to get the right hooks into the AppKit). We also send onbeforecut, onbeforecopy, onbeforepaste before the other events, which isn't really WinIE compatible, but is close. WinIE uses these to enable cut/paste menu items in its UI. DB doesn't need this for now. Reviewed by Chris * khtml/ecma/kjs_dom.cpp: (DOMNode::getValueProperty): Boilerplate for new events (DOMNode::putValue): Boilerplate for new events * khtml/ecma/kjs_dom.h: (KJS::DOMNode::): Boilerplate for new events * khtml/ecma/kjs_dom.lut.h: * khtml/ecma/kjs_events.cpp: (DOMEvent::DOMEvent): "dataTransfer" and "clipboardData" properties are conditionally defined on DOMEvent, depending on if the event is a dragging or clipboard event. (DOMMouseEvent::mark): Pass mark along to any clipboard object we have. (DOMEvent::getValueProperty): Return "dataTransfer" or "clipboardData". (DOMMouseEvent::getValueProperty): Returning "dataTransfer" now handled by the superclass. * khtml/ecma/kjs_events.h: (KJS::DOMEvent::): (KJS::DOMMouseEvent::DOMMouseEvent): (KJS::DOMMouseEvent::): (KJS::DOMMouseEvent::toMouseEvent): * khtml/ecma/kjs_events.lut.h: * khtml/html/html_elementimpl.cpp: (HTMLElementImpl::parseHTMLAttribute): Boilerplate for new events * khtml/misc/htmlattrs.c: * khtml/misc/htmlattrs.h: * khtml/misc/htmlattrs.in: Boilerplate for new events * khtml/xml/dom2_eventsimpl.cpp: (EventImpl::typeToId): Boilerplate for new events (EventImpl::idToType): Boilerplate for new events (EventImpl::isDragEvent): New utility (EventImpl::isClipboardEvent): New utility (MouseEventImpl::isDragEvent): New utility (ClipboardEventImpl::ClipboardEventImpl): ref optional clipboard (ClipboardEventImpl::~ClipboardEventImpl): deref optional clipboard (ClipboardEventImpl::isClipboardEvent): New utility * khtml/xml/dom2_eventsimpl.h: (DOM::EventImpl::): Boilerplate for new events (DOM::ClipboardEventImpl::clipboard): * kwq/KWQClipboard.h: Monkey business so this file is includable in C++. * kwq/KWQClipboard.mm: * kwq/KWQKHTMLPart.h: * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::dispatchCPPEvent): Send one of the new events. (KWQKHTMLPart::tryCut): Declare pasteboard types, send cut events. (KWQKHTMLPart::tryCopy): Declare pasteboard types, send copy events. (KWQKHTMLPart::tryPaste): Send paste events. * kwq/WebCoreBridge.h: * kwq/WebCoreBridge.mm: (-[WebCoreBridge tryDHTMLCut]): Pass through to part (-[WebCoreBridge tryDHTMLCopy]): Ditto (-[WebCoreBridge tryDHTMLPaste]): Ditto 2004-06-14 Trey Matteson A new CSS pseudo-class ".drag" is added. Analogous to the "hover" class, this class determines styles used while an element is generating a drag image. Reviewed by hyatt. * khtml/css/css_base.cpp: (CSSSelector::extractPseudoType): Boilerplate for adding new class. * khtml/css/css_base.h: Boilerplate for adding new class. * khtml/css/cssstyleselector.cpp: (khtml::CSSStyleSelector::checkOneSelector): Match new class against elements being dragged. * khtml/css/cssstyleselector.h: (khtml::StyleSelector::): Boilerplate for adding new class. * khtml/rendering/render_object.cpp: (RenderObject::RenderObject): Init new member. (RenderObject::isDragging): Return whether this object is being dragged. (RenderObject::updateDragState): Paint us an all children with a new dragged state. * khtml/rendering/render_object.h: * khtml/rendering/render_style.h: Boilerplate for adding new class. (khtml::RenderStyle::NonInheritedFlags::operator==): (khtml::RenderStyle::setBitDefaults): (khtml::RenderStyle::affectedByDragRules): (khtml::RenderStyle::setAffectedByDragRules): * kwq/KWQClipboard.mm: (KWQClipboard::dragNSImage): Method rename. * kwq/KWQKHTMLPart.h: * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::snapshotDragImage): Mark the element as being dragged before we snapshot it, so new style class will apply. 2004-06-14 Ken Kocienda Reviewed by me Added a few more editing-related layout tests. * layout-tests/editing/inserting/insert-3654864-fix-expected.txt: Added. * layout-tests/editing/inserting/insert-3654864-fix.html: Added. * layout-tests/editing/inserting/insert-3659587-fix-expected.txt: Added. * layout-tests/editing/inserting/insert-3659587-fix.html: Added. * layout-tests/editing/inserting/insert-after-delete-001-expected.txt: Added. * layout-tests/editing/inserting/insert-after-delete-001.html: Added. * layout-tests/editing/inserting/insert-br-case1-expected.txt: Added. * layout-tests/editing/inserting/insert-br-case1.html: Added. * layout-tests/editing/inserting/insert-br-case2-expected.txt: Added. * layout-tests/editing/inserting/insert-br-case2.html: Added. * layout-tests/editing/inserting/insert-br-case3-expected.txt: Added. * layout-tests/editing/inserting/insert-br-case3.html: Added. 2004-06-14 Ken Kocienda Reviewed by me Regarding the bug below, removing some tests since we have removed the execCommand("paste") feature, at least for now. : (JavaScript execCommand("paste") presents security issues) * layout-tests/editing/pasteboard/copy-paste-text-001-expected.txt: Removed. * layout-tests/editing/pasteboard/copy-paste-text-001.html: Removed. * layout-tests/editing/pasteboard/cut-paste-text-002-expected.txt: Removed. * layout-tests/editing/pasteboard/cut-paste-text-002.html: Removed. 2004-06-14 Ken Kocienda Reviewed by Darin Fix for this bug: assertion failure in AppendNodeCommandImpl::doApply due to non-0 exception code trying to insert a DIV markup string * khtml/xml/dom_nodeimpl.cpp: (NodeImpl::checkAddChild): This function was being too strict in disallowing certain nodes to be added as other child nodes, applying rules we typically use for parsing. However, those parsing rules are primarily for dealing with "bad" HTML, and should not be applied to programmatic DOM operations. The fix involves removing calls to childAllowed(). 2004-06-12 Trey Matteson The drag image may be updated during a DHTML drag. This includes updating from a Timer instead of a drag event handler. In addition, an arbitrary element can be set as the one to snapshot for the drag image. Reviewed by John * khtml/ecma/kjs_events.cpp: (ClipboardProtoFunc::tryCall): setDragImage accepts a node. Previously, it had to be an Image object. * khtml/rendering/render_object.cpp: (RenderObject::paintingRootRect): Also returns top element's rect. * khtml/rendering/render_object.h: * khtml/xml/dom2_eventsimpl.h: * kwq/KWQClipboard.h: New security mode where image is still writable, but pasteboard is not. (KWQClipboard::): (KWQClipboard::setDragHasStarted): * kwq/KWQClipboard.mm: (KWQClipboard::KWQClipboard): Part may be passed. Needed in the source case to generate an image from an element. (KWQClipboard::setAccessPolicy): New, replaces former becomeNumb method which wasn't flexible enough. (KWQClipboard::accessPolicy): New getter. (KWQClipboard::dragImage): No change, diff confusion. (KWQClipboard::setDragImage): Call new helper, below. (KWQClipboard::dragImageElement): New, return any element set. (KWQClipboard::setDragImageElement): New, call new helper. (KWQClipboard::setDragImage): New helper, set the image via either a pixmap or an element to snapshot, pushes the result to WebKit if we've already started the drag. (KWQClipboard::dragNSImage): Generate an NSImage and mouse offset, no matter how the drag image was set (Image or element). * kwq/KWQKHTMLPart.h: A single clipboard is kept over the life of a source drag instead of making one for each event. * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::KWQKHTMLPart): Init clipboard. (KWQKHTMLPart::~KWQKHTMLPart): Free clipboard. (KWQKHTMLPart::freeClipboard): New helper. (KWQKHTMLPart::dispatchDragSrcEvent): Most code moved to caller. (KWQKHTMLPart::khtmlMouseMoveEvent): Make clipboard for this drag session. Init clipboard to make an image from the dragSource element. Mark the drag as having started. (KWQKHTMLPart::dragSourceMovedTo): Clipboard will update WK with any new drag image, so we don't need to. (KWQKHTMLPart::dragSourceEndedAt): Ditto. (KWQKHTMLPart::elementImage): Also return element rect. * kwq/WebCoreBridge.h: Glue moved to WebCoreGraphicsBridge. * kwq/WebCoreBridge.mm: (-[WebCoreBridge dragOperationForDraggingInfo:]): Use new method. (-[WebCoreBridge dragExitedWithDraggingInfo:]): Ditto (-[WebCoreBridge concludeDragForDraggingInfo:]): Ditto * kwq/WebCoreGraphicsBridge.h: * kwq/WebCoreGraphicsBridge.m: (-[WebCoreGraphicsBridge setDraggingImage:at:]): Glue moved from WebBridge 2004-06-11 Chris Blumenberg Support for WebKit drag & drop API. Reviewed by trey. * kwq/WebCoreBridge.h: * kwq/WebCoreBridge.mm: (-[WebCoreBridge _positionForPoint:]): new (-[WebCoreBridge moveDragCaretToPoint:]): call _positionForPoint (-[WebCoreBridge editableDOMRangeForPoint:]): new 2004-06-11 Darin Adler Reviewed by Dave. - fixed : (REGRESSION: Stuck "Loading" when logging into Google's Gmail on newer versions of Safari) * khtml/html/html_baseimpl.cpp: (HTMLFrameElementImpl::parseHTMLAttribute): Call through to base class for ATTR_ID so the "has ID" bit gets set. * khtml/html/html_imageimpl.cpp: (HTMLImageElementImpl::parseHTMLAttribute): Move ATTR_COMPOSITE code up and out of the way so it doesn't screw up ATTR_ID parsing. (HTMLMapElementImpl::parseHTMLAttribute): Call through to base class for ATTR_ID so the "has ID" bit gets set. * khtml/html/html_objectimpl.cpp: (HTMLAppletElementImpl::parseHTMLAttribute): Remove ATTR_ID case; not needed. (HTMLParamElementImpl::parseHTMLAttribute): Call through to base class for ATTR_ID so the "has ID" bit gets set. 2004-06-11 Ken Kocienda Reviewed by Hyatt Fix for this bug: : "when typing in Blot, bold style does not carry over to next line after pressing 'return'" Did some work to improve the insert newline command. The refinement is to insert the newline at the upstream position of the caret, ensuring that the newline takes on the appropriate style, and does not let the caret "escape" from an element that is conferring style. * khtml/editing/htmlediting_impl.cpp: (khtml::InputNewlineCommandImpl::insertNodeAfterPosition): New helper. Adds smarts about adding newlines when the selection is a caret in a block. (khtml::InputNewlineCommandImpl::insertNodeBeforePosition): Ditto. (khtml::InputNewlineCommandImpl::doApply): Simplified cases. One case in the code could not happen. * khtml/editing/htmlediting_impl.h: Fix for this bug: : "Pasting content at start of line places it at end of previous line" (khtml::InputTextCommandImpl::prepareForTextInsertion): Simple code mistake. Content was indeed being added to the line before. Fixed to add new content after the line break. 2004-07-10 Trey Matteson Prep work for latest delegate API for dragging. In addition, I also straightened out all the cases of DHTML setting a drag image or setting pasteboard data, and how that would override WebKit's default behavior (which follows how WinIE does things). Reviewed by Chris. * khtml/rendering/render_object.cpp: (RenderObject::draggableNode): Obey new params for whether a DHTML or UserAgent (i.e., WebKit) drag source is allowed. * khtml/rendering/render_object.h: * kwq/KWQKHTMLPart.h: * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::dispatchDragSrcEvent): Setting pasteboard data was moved out of here, now caller's responsibility. (KWQKHTMLPart::khtmlMouseMoveEvent): Ask bridge for allowable drag actions (DHTML vs UA). Only send drag events if DHTML is allowed. Only generate a drag image if the source is a DHTML element. Note whether event handler set any pasteboard data, and pass that fact to WebKit. (KWQKHTMLPart::dragSourceMovedTo): Only send drag events if DHTML is allowed. (KWQKHTMLPart::dragSourceEndedAt): Only send drag events if DHTML is allowed. * kwq/WebCoreBridge.h: 2004-06-11 Ken Kocienda Reviewed by Trey Lay some groundwork for better testing of inserting newlines. Layout tests that use this new code will be coming soon. * khtml/editing/jsediting.cpp: Add commands for bold and inserting newlines. * layout-tests/editing/editing.js: Added new insertNewline command. which calls through to TypingCommand::insertNewline. There was no way to get to this command from JS before this addition. 2004-06-11 Ken Kocienda Reviewed by Darin Javascript execCommand system wants to use case-insensitive QDict. The interface for QDict offers this feature, but it was never implemented. Now it is. * kwq/KWQDictImpl.h: Declare bool to store case-sensitive bit. * kwq/KWQDictImpl.mm: (KWQDictImpl::KWQDictImpl): No longer drops caseSensitive on the floor; stores it in instance variable. (KWQDictImpl::insert): Make lowercase version of key for operation, if necessary. (KWQDictImpl::remove): Ditto. (KWQDictImpl::find): Ditto. (KWQDictIteratorImpl::currentStringKey): Whitespace cleanup. === Safari-144 === 2004-06-10 Ken Kocienda Reviewed by Darin Fix for this bug: : "Style changes do not work across blocks" Now, applying styles works across blocks. I did quite a bit of internal redsign on the member functions of this class to make this work. As a bonus, from an architectural standpoint, all style changes are now done "in place". There is no more copying of content in order to perform style changes. * khtml/editing/htmlediting_impl.cpp: (khtml::ApplyStyleCommandImpl::doApply): (khtml::ApplyStyleCommandImpl::removeHTMLStyleNode): (khtml::ApplyStyleCommandImpl::removeCSSStyle): (khtml::ApplyStyleCommandImpl::removeStyle): (khtml::ApplyStyleCommandImpl::nodeFullySelected): (khtml::ApplyStyleCommandImpl::splitTextAtStartIfNeeded): (khtml::ApplyStyleCommandImpl::splitTextAtEndIfNeeded): (khtml::ApplyStyleCommandImpl::surroundNodeRangeWithElement): (khtml::ApplyStyleCommandImpl::applyStyleIfNeeded): (khtml::ApplyStyleCommandImpl::positionInsertionPoint): * khtml/editing/htmlediting_impl.h: 2004-06-10 Darin Adler Reviewed by Ken. - filled out execCommand a lot more - fixed : (execCommand italic is not implemented) - fixed : (execCommand bold is not implemented) - fixed : (Make queryCommandIndeterm work as specified in the Javascript execCommand Compatibility Plan) - fixed : (Make queryCommandState work as specified in the Javascript execCommand Compatibility Plan) - fixed : (Make queryCommandValue work as specified in the Javascript execCommand Compatibility Plan) * khtml/editing/jsediting.cpp: (DOM::JSEditor::queryCommandIndeterm): Changed to use KHTMLPart::TriState instead of CommandState. (DOM::JSEditor::queryCommandState): Ditto. (execStyleChange): Changed to use KHTMLPart::applyStyle. (stateStyle): Used KHTMLPart::selectionHasStyle for this. (selectionStartHasStyle): Use KHTMLPart::selectionStartHasStyle for this. (valueStyle): Used KHTMLPart::selectionStartStylePropertyValue for this. (execBold): Implemented toggling, using selectionStartHasStyle. (execItalic): Implemented toggling, using selectionStartHasStyle. (execPrint): Implemented. (enabledRedo): Implemented, using canRedo. (enabledUndo): Implemented, using canUndo. (stateNone): Renamed from stateNo. (valueBackColor): Implemented, using valueStyle. (valueFontName): Implemented, using valueStyle. (valueFontSize): Implemented, using valueStyle. (valueForeColor): Implemented, using valueStyle. (valueFontSize): Implemented, using valueStyle. * khtml/khtml_part.h: Added editing operations. * khtml/khtml_part.cpp: (KHTMLPart::copyToPasteboard): Added. (KHTMLPart::cutToPasteboard): Added. (KHTMLPart::redo): Added. (KHTMLPart::undo): Added. (KHTMLPart::applyStyle): Added. (updateState): Added. (KHTMLPart::selectionHasStyle): Added. (KHTMLPart::selectionStartHasStyle): Added. (KHTMLPart::selectionStartStylePropertyValue): Added. (KHTMLPart::selectionComputedStyle): Added. (KHTMLPart::print): Added. * khtml/ecma/kjs_window.cpp: (WindowFunc::tryCall): Call print() on plain old part, not KWQ(part). * kwq/KWQKHTMLPart.h: Removed print(), added _haveUndoRedoOperations. * kwq/KWQKHTMLPart.mm: (KHTMLPart::print): Moved from KWQKHTMLPart to KHTMLPart. (KWQKHTMLPart::registerCommandForUndo): Moved code here from bridge. (KWQKHTMLPart::registerCommandForRedo): Moved code here from bridge. (KWQKHTMLPart::clearUndoRedoOperations): Moved code here from bridge. (KWQKHTMLPart::issueUndoCommand): Moved code here from bridge. (KWQKHTMLPart::issueRedoCommand): Moved code here from bridge. (KWQKHTMLPart::issuePasteCommand): Moved code here from bridge. (KHTMLPart::canUndo): Added. (KHTMLPart::canRedo): Added. * kwq/WebCoreBridge.h: Added undoManager, removed undo-related methods. * kwq/WebCoreBridge.mm: (-[WebCoreBridge applyStyle:]): Changed to call KHTMLPart::applyStyle. * WebCore.pbproj/.cvsignore: Updated for new Xcode files. 2004-06-09 Maciej Stachowiak Reviewed by Dave. : Blot scrolls to the top every time you type * khtml/xml/dom_selection.cpp: (DOM::Selection::getRepaintRect): If the caret position is invalid, recompute it. 2004-06-09 David Hyatt Fix for 3607091, implement a style that prevents zoom and min font size from taking effect. The name of the new style is "-apple-text-size-adjust" with values of "none" and "auto." The default is "auto." Reviewed by mjs * 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::styleForElement): (khtml::CSSStyleSelector::pseudoStyleForElement): (khtml::CSSStyleSelector::applyDeclarations): (khtml::CSSStyleSelector::applyProperty): (khtml::CSSStyleSelector::checkForTextSizeAdjust): * khtml/css/cssstyleselector.h: * khtml/rendering/render_style.cpp: (textSizeAdjust): (StyleCSS3InheritedData): (StyleCSS3InheritedData::operator==): (RenderStyle::diff): * khtml/rendering/render_style.h: (khtml::RenderStyle::lineClamp): (khtml::RenderStyle::textSizeAdjust): (khtml::RenderStyle::setTextSizeAdjust): (khtml::RenderStyle::initialTextSizeAdjust): 2004-06-09 David Hyatt Implement parsing and setting of the text-overflow CSS3 property. Reviewed by kocienda * 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: (hash_val): (findValue): * khtml/css/cssvalues.h: * khtml/css/cssvalues.in: * khtml/rendering/render_style.cpp: (textOverflow): (StyleCSS3NonInheritedData::operator==): (RenderStyle::diff): * khtml/rendering/render_style.h: (khtml::RenderStyle::textOverflow): (khtml::RenderStyle::setTextOverflow): (khtml::RenderStyle::initialTextOverflow): 2004-06-09 David Hyatt Fix for 3678031, implement better flexing for Emerson headers. This involved adding support for max-width: intrinsic, fixing the box layout algorithm to properly deal with max-widths, and implementing support for baseline alignment so that boxes can be aligned vertically along their interior baselines. Reviewed by kocienda * khtml/css/cssparser.cpp: (CSSParser::parseValue): (CSSParser::parseShadow): * khtml/css/cssparser.h: * 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: (hash_val): (findValue): * khtml/css/cssvalues.h: * khtml/css/cssvalues.in: * khtml/misc/khtmllayout.h: (khtml::): * khtml/rendering/render_block.cpp: (khtml::RenderBlock::baselinePosition): (khtml::RenderBlock::getBaselineOfFirstLineBox): * khtml/rendering/render_block.h: * khtml/rendering/render_box.cpp: (RenderBox::RenderBox): (RenderBox::overrideWidth): (RenderBox::overrideHeight): (RenderBox::calcWidth): (RenderBox::calcHeight): * khtml/rendering/render_box.h: (khtml::RenderBox::overrideSize): (khtml::RenderBox::setOverrideSize): * khtml/rendering/render_flexbox.cpp: (khtml::RenderFlexibleBox::calcMinMaxWidth): (khtml::RenderFlexibleBox::layoutBlock): (khtml::RenderFlexibleBox::layoutHorizontalBox): (khtml::RenderFlexibleBox::layoutVerticalBox): (khtml::RenderFlexibleBox::placeChild): (khtml::RenderFlexibleBox::allowedChildFlex): * khtml/rendering/render_flexbox.h: * khtml/rendering/render_image.cpp: (RenderImage::isWidthSpecified): (RenderImage::isHeightSpecified): * khtml/rendering/render_object.h: (khtml::RenderObject::getBaselineOfFirstLineBox): (khtml::RenderObject::overrideSize): (khtml::RenderObject::overrideWidth): (khtml::RenderObject::overrideHeight): (khtml::RenderObject::setOverrideSize): * khtml/rendering/render_style.cpp: (StyleFlexibleBoxData::StyleFlexibleBoxData): (StyleFlexibleBoxData::operator==): (ShadowData::operator==): * khtml/rendering/render_style.h: (khtml::RenderStyle::boxPack): (khtml::RenderStyle::setBoxPack): * khtml/rendering/table_layout.cpp: (AutoTableLayout::layout): 2004-06-09 Richard Williamson Added support for drawing un-rasterized transformed PDFs. Reviewed by John. * khtml/ecma/kjs_html.cpp: (KJS::Context2DFunction::tryCall): 2004-06-09 Darin Adler Reviewed by Ken. - implemented still more execCommand commands * khtml/editing/jsediting.cpp: Added a lot more commands, and reformatted a bit. 2004-06-08 Darin Adler Reviewed by Maciej. - implemented a bunch more execCommand commands - fixed : (JavaScript execCommand("paste") presents security issues) - fixed : (Make queryCommandEnabled work as specified in the Javascript execCommand Compatibility Plan) - fixed : (Make queryCommandSupported work as specified in the Javascript execCommand Compatibility Plan) - about half of : (execCommand italic is not implemented) - about half of : (execCommand bold is not implemented) * khtml/editing/jsediting.h: Made constructor inline. Deleted a few unneeded member functions that are now just private functions inside jsediting.cpp. * khtml/editing/jsediting.cpp: (commandImp): Changed this around, so the dictionary is a static local to this function, and initialized with C++ "first time initialization" rule. (DOM::JSEditor::execCommand): Got rid of special case for 0 for function pointer and added const. (DOM::JSEditor::queryCommandEnabled): Ditto. (DOM::JSEditor::queryCommandIndeterm): Got rid of special case for 0 for function pointer, added const, and use a common three-state state function rather than a separate "indeterm" function. (DOM::JSEditor::queryCommandState): Ditto. (DOM::JSEditor::queryCommandValue): More of the same. (execNotImplemented): Added. Used for unimplemented commands; there are only a few left. (execCopy): Renamed. (execCut): Renamed. (execDelete): Renamed. (execInsertText): Renamed. (execPaste): Renamed, and disabled. (execRedo): Renamed. (execSelectAll): Renamed. (execUndo): Renamed. (execStyleChange): Added. Helper function for commands that are style changes. (execBold): Added. (execItalic): Added. (execJustifyCenter): Added. (execJustifyFull): Added. (execJustifyLeft): Added. (execJustifyRight): Added. (execSubscript): Added. (execSuperscript): Added. (execUnselect): Added. (stateNotImplemented): Added. Used for unimplemented state queries; there are a few left. (noState): Added. (valueNotImplemented): Added. Used for unimplemented value queries; there are a few left. (nullStringValue): Added. (createCommandDictionary): Changed the initDict function into this function. Added implementations for many commands and condensed format so it's easier to work with. 2004-06-08 Darin Adler Reviewed by Vicki. - our part of fix to : (REGRESSION (Tiger): titles on pop-ups menus are truncated and show ellipses) * kwq/KWQComboBox.mm: (QComboBox::QComboBox): Call setLineBreakMode:NSLineBreakByClipping. In the current version of Tiger I am using, this is not implemented yet. - a couple of other unrelated changes * khtml/rendering/render_form.cpp: (RenderTextArea::calcMinMaxWidth): Put a little more code inside the APPLE_CHANGES ifdef. * kwq/KWQTextEdit.h: Remove unused setTabStopWidth function, and make empty setTextFormat function an inline for slightly smaller code size. * kwq/KWQTextEdit.mm: Ditto. * kwq/KWQTextField.mm: Update copyright date. 2004-06-08 Trey Matteson A DHTML drag source can now change the dragging image during the drag. Currently it may only be set to a static image. Reviewed by John * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::dragSourceMovedTo): If the ondrag event handler set an image, pass it to WebKit. * kwq/WebCoreBridge.h: 2004-06-08 Ken Kocienda Reviewed by Hyatt Changes to the selection state for these tests as a result of my previous checkin. The changes are minor to a couple of offsets. I looked at the changes and approve them. * layout-tests/editing/deleting/delete-block-contents-001-expected.txt * layout-tests/editing/deleting/delete-block-contents-002-expected.txt * layout-tests/editing/deleting/delete-block-contents-003-expected.txt 2004-06-08 Ken Kocienda Reviewed by Hyatt Fix for this bug: : "Hitting delete key with start of block selected does not merge content with preceding block" Selections that span blocks now work correctly for deleting the selection and inserting over the selection. The largest part of the change is adding a new field to the RemoveNodeAndPruneCommand and its impl version. This was done since the starting block for a multi-block selection should always be preserved when deleting, and this was a convenient way to express this using the code structure already in place. * khtml/editing/htmlediting.cpp: (khtml::RemoveNodeAndPruneCommand::RemoveNodeAndPruneCommand): Modify this command to take two nodes: the node to remove and a node to stop at when pruning back up the tree. (khtml::RemoveNodeAndPruneCommand::pruneNode): New accessor, replaces old node() accessor. (khtml::RemoveNodeAndPruneCommand::stopNode): New accessor for additional feature described above. * khtml/editing/htmlediting.h: * khtml/editing/htmlediting_impl.cpp: (khtml::shouldPruneNode): blow flow renderers can now be deleted, but not if they are a rootEditableElement. (khtml::CompositeEditCommandImpl::removeNodeAndPrune): Pass new stopNode param and change the name of the existing node argument to pruneNode to distinguish it. (khtml::DeleteSelectionCommandImpl::doApply): Pass the block containing the start of the selection to removeNodeAndPrune in each case. Also, add one little loop to move all the content from the block containing the end of the selection if that block is different than the start block. (khtml::RemoveNodeAndPruneCommandImpl::RemoveNodeAndPruneCommandImpl): Implement the pruneNode/stopNode design already described. (khtml::RemoveNodeAndPruneCommandImpl::~RemoveNodeAndPruneCommandImpl): Manage the lifecycle of stopNode. (khtml::RemoveNodeAndPruneCommandImpl::doApply): Add a check to stop at the stop node while pruning. * khtml/editing/htmlediting_impl.h: (khtml::RemoveNodeAndPruneCommandImpl::pruneNode): New accessor. (khtml::RemoveNodeAndPruneCommandImpl::stopNode): Ditto. 2004-06-07 Trey Matteson Clipboard access during DHTML dragging is made secure. Reviewed by John. * kwq/KWQClipboard.h: (KWQClipboard::): * kwq/KWQClipboard.mm: (KWQClipboard::KWQClipboard): Init new policy and changeCount members. (KWQClipboard::becomeNumb): Set policy to numb. (KWQClipboard::clearData): Check policy. (KWQClipboard::clearAllData): Check policy. (KWQClipboard::getData): Check policy and changeCount. (KWQClipboard::setData): Check policy. (KWQClipboard::types): Check policy and ChangeCount. (KWQClipboard::setDragLocation): Check policy. (KWQClipboard::setDragImage): Check policy. (KWQClipboard::setDropEffect): Check policy. (KWQClipboard::setEffectAllowed): Check policy. * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::dispatchDragSrcEvent): Set policy when creating clipboard, and numb-ify it when we're done. * kwq/WebCoreBridge.mm: (-[WebCoreBridge dragOperationForDraggingInfo:]): Set policy when creating clipboard, and numb-ify it when we're done. (-[WebCoreBridge dragExitedWithDraggingInfo:]): Ditto (-[WebCoreBridge concludeDragForDraggingInfo:]): Ditto 2004-06-08 Ken Kocienda Reviewed by me * khtml/editing/jsediting.cpp: (DOM::EditorCommand::): Stray capital letter in "selectAll" command static initializer prevented the command from ever working since the command strings are lower-cased when trying to find a match, but not when they are inserted into the dictionary. This is a one character change to make the string "selectall" in the initializer. 2004-06-07 Trey Matteson WebCore will now generate a default drag image when an element serves as a drag source. The basic idea is the image contains the element and all its children. As for the implementation, instead of adding a new paintAction I added a new field to the paintInfo struct, "paintingRoot". If this field is set, painting will only paint that root's descendants. Some code also moved from the bridge to the part, to be available within WebCore. Reviewed by hyatt. * khtml/rendering/render_block.cpp: (khtml::RenderBlock::paintObject): Pass along paintingRoot to kids. (khtml::RenderBlock::paintFloats): Pass along paintingRoot to kids. * khtml/rendering/render_box.cpp: (RenderBox::paintBoxDecorations): Test paintingRoot before painting. * khtml/rendering/render_canvasimage.cpp: (RenderCanvasImage::paint): Test paintingRoot before painting. * khtml/rendering/render_flow.cpp: (RenderFlow::paintLineBoxBackgroundBorder): Test paintingRoot before painting. (RenderFlow::paintLineBoxDecorations): Test paintingRoot before painting. * khtml/rendering/render_image.cpp: (RenderImage::paint): Test paintingRoot before painting. * khtml/rendering/render_inline.cpp: (RenderInline::paint): Pass along paintingRoot to kids. * khtml/rendering/render_layer.cpp: (RenderLayer::paint): Pass along paintingRoot to kids. (RenderLayer:: paintLayer): Pass along paintingRoot to kids. Test if we are within the paintingRoot to decide whether to pass the root to our renderer. * khtml/rendering/render_layer.h: * khtml/rendering/render_object.cpp: (RenderObject::hasAncestor): New utility. (RenderObject::absoluteBoundingBoxRect): Helper for paintingRootRect (RenderObject::addAbsoluteRectForLayer): Helper for paintingRootRect (RenderObject::paintingRootRect): Return rect that will be painted if we are the painting root. (RenderObject::draggableNode): Add test to avoid rare NULL ptr crash. * khtml/rendering/render_object.h: (khtml::RenderObject::PaintInfo::PaintInfo): Add paintingRoot field. (khtml::RenderObject::paintingRootForChildren): New utility. Return the current paintingRoot, or nil if we are the root (so kids draw normally). (khtml::RenderObject::shouldPaintWithinRoot): New utility. We can paint if we are the paintingRoot, or no root is set. * khtml/rendering/render_replaced.cpp: (RenderReplaced::shouldPaint): Pass along paintingRoot to kids. * khtml/rendering/render_table.cpp: (RenderTable::paint): Pass along paintingRoot to kids. * khtml/rendering/render_text.cpp: (RenderText::paint): Test paintingRoot before painting. * kwq/KWQKHTMLPart.h: * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::KWQKHTMLPart): Init new _elementToDraw member. (KWQKHTMLPart::paint): Generalized to handle cases of painting selection or a given element. (KWQKHTMLPart::khtmlMouseMoveEvent): Make a default image if dragSrc didn't provide one. (KWQKHTMLPart::selectionRect): Moved from bridge. (KWQKHTMLPart::visibleSelectionRect): Ditto. (KWQKHTMLPart::imageFromRect): Newly factored code, from bridge. (KWQKHTMLPart::selectionImage): Moved from bridge, wrapper around imageFromRect. (KWQKHTMLPart::elementImage): New method, wrapper around imageFromRect. * kwq/WebCoreBridge.h: * kwq/WebCoreBridge.mm: (-[WebCoreBridge drawRect:withPainter:]): Just call part to draw. (-[WebCoreBridge visibleSelectionRect]): Guts moved to part. (-[WebCoreBridge selectionImage]): Ditto. 2004-06-07 Darin Adler Reviewed by Chris. - fixed : (setTimeout fails when additional parameters are used and timeout function is a string) * khtml/ecma/kjs_window.cpp: (WindowFunc::tryCall): Ignore excess arguments instead of rejecting the argument list for window.scrollBy, scroll, scrollTo, moveBy, moveTo, resizeBy, resizeTo, and setTimeout (when the timeout is a string rather than an object). - did a refinement of JSEditor to be slightly more efficient, and not have to edit both the .cpp file and the .h when adding more implementation * khtml/khtml_part.h: Hack so we can get to the docImpl and xmlDocImpl without being a friend. * khtml/editing/jsediting.h: Simplified a bit. * khtml/editing/jsediting.cpp: Redid to use a table, and simplified a bit. 2004-06-07 Ken Kocienda Reviewed by Hyatt Fix for this bug: : "Typing style does not work yet" Did the final hook-up of support that has landed in the tree in the recent past as part of ongoing style-application work. For the most part, this patch modifies the InputNewlineCommandImpl and InputTextCommandImpl commands to insert a styling span when there is a typing style active. * khtml/editing/htmlediting_impl.cpp: (khtml::CompositeEditCommandImpl::createTypingStyleElement): Helper shared by the two commands modified. (khtml::InputNewlineCommandImpl::doApply): Create a styling span if the part has a typing style. Maintain a nodeToInsert local variable, which is either the break to insert or a styling span containing the break. Also, remove some utterly bogus derefs. They are just plain wrong. (khtml::InputTextCommandImpl::InputTextCommandImpl): Don't need to keep m_insertedTextNode. The composite commands this command uses will keep track of that object's lifetime. We do not need to do that here. (khtml::InputTextCommandImpl::~InputTextCommandImpl): No longer need to deref obsolete m_insertedTextNode. (khtml::InputTextCommandImpl::prepareForTextInsertion): Handle the case where a styling span needs to be added. (khtml::TypingCommandImpl::insertText): Create a new InputTextCommand when there is an active typping style. * khtml/editing/htmlediting_impl.h: Declare createTypingStyleElement helper. Remove m_insertedTextNode from InputTextCommandImpl. * kwq/WebCoreBridge.mm: (-[WebCoreBridge applyStyle:]): Swicth on the state of the selection, calling setTypingStyle when a caret and ApplyStyleCommand when a range. 2004-06-07 Darin Adler Reviewed by Ken. * khtml/editing/jsediting.h: Elide some unnecessary namespace prefixes. * khtml/editing/jsediting.cpp: Make typed constants instead of macros. (DOM::JSEditor::commandDict): Elide unnecessary namespace prefix. (DOM::JSEditor::execCommand): Remove xxxNotImplemented functions; just return false instead. (DOM::JSEditor::queryCommandEnabled): Ditto. (DOM::JSEditor::queryCommandIndeterm): Ditto. (DOM::JSEditor::queryCommandState): Ditto. (DOM::JSEditor::queryCommandSupported): Ditto. (DOM::JSEditor::queryCommandValue): Ditto. 2004-06-05 Trey Matteson As agreed with Hyatt and Louch, do not post incoming dragging events to text nodes. Reviewed by Maciej * khtml/khtmlview.cpp: (KHTMLView::updateDragAndDrop): For any drag target that is a text node, use its parent instead. 2004-06-03 Trey Matteson DHTML dragging uses the Cocoa NSDragOperation on both the source and dest ends. In addition, I caught a prime gaffe where I had used "dropAllowed" instead of "effectAllowed" for that particular WinIE property. That is renamed throughout. Reviewed by rjw * khtml/ecma/kjs_events.cpp: (stringOrUndefined): New little helper. (Clipboard::getValueProperty): Return Undefined if dropEffect or effectAllowed are not set. (Clipboard::putValue): Rename. * khtml/ecma/kjs_events.h: (KJS::Clipboard::): Rename. * khtml/ecma/kjs_events.lut.h: * khtml/xml/dom2_eventsimpl.h: Rename. * kwq/KWQClipboard.h: Rename, add access to Cocoa drag op. * kwq/KWQClipboard.mm: (KWQClipboard::dropEffect): These 4 just moved in the file. (KWQClipboard::setDropEffect): (KWQClipboard::effectAllowed): (KWQClipboard::setEffectAllowed): (cocoaOpFromIEOp): Convert from an IE operation string to a Cocoa DragOp (IEOpFromCocoaOp): and vice-versa (KWQClipboard::sourceOperation): Return effectAllowed, converted to a NSDragOp (KWQClipboard::destinationOperation): Return dropEffect, converted to a NSDragOp (KWQClipboard::setSourceOperation): Set effectAllowed, using a Cocoa value (KWQClipboard::setDestinationOperation): Set dropEffect, using a Cocoa value * kwq/KWQKHTMLPart.h: * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::dispatchDragSrcEvent): Return the drag op specified by the source element. (KWQKHTMLPart::khtmlMouseMoveEvent): Pass our drag op up to WebKit. (KWQKHTMLPart::dragSourceMovedTo): Pass NULL for new arg. (KWQKHTMLPart::dragSourceEndedAt): Ditto * kwq/WebCoreBridge.h: * kwq/WebCoreBridge.mm: (-[WebCoreBridge dragOperationForDraggingInfo:]): Set the incoming dragOp onto the clipboard so DHTML can access it. In addition, validate whatever op DHTML returns so we play well with Cocoa. 2004-06-04 David Hyatt Add support for auto values in flex transitions. Add support for mapping the back end values to front end values. Next it's time to actually try to use this stuff in render_flexbox. Reviewed by darin * khtml/css/css_valueimpl.cpp: (length): * khtml/css/css_valueimpl.h: (DOM::FlexGroupTransitionValueImpl::isAuto): * khtml/css/cssparser.cpp: (FlexGroupTransitionParseContext::length): (FlexGroupTransitionParseContext::commitAutoValue): (FlexGroupTransitionParseContext::commitValue): (CSSParser::parseFlexGroupTransition): * khtml/css/cssstyleselector.cpp: (khtml::CSSStyleSelector::applyProperty): * khtml/rendering/render_style.cpp: (FlexGroupTransitionData::operator==): * khtml/rendering/render_style.h: (khtml::FlexGroupTransitionData::next): (khtml::FlexGroupTransitionData::isAuto): === Safari-143 === 2004-06-04 Kevin Decker Reviewed by Dave. - kwq/KWQKHTMLPart.mm: addMessagetoConsole places sourceURL in the dictionary - khtml/xml/dom_docimpl.cpp: right now, we don't have a way to get a url, so we leave this blank - khtml/ecma/kjs_window.cpp: still need to get the real line number and sourceURL - khtml/ecma/kjs_proxy.cpp: now passing the sourceURL to addMessageToConsole - khtml/ecma/kjs_events.cpp: still need to grab an accurate line number and sourceURL * khtml/ecma/kjs_events.cpp: (JSEventListener::handleEvent): (JSLazyEventListener::handleEvent): * khtml/ecma/kjs_proxy.cpp: (KJSProxyImpl::evaluate): * khtml/ecma/kjs_window.cpp: (Window::isSafeScript): (ScheduledAction::execute): * khtml/xml/dom_docimpl.cpp: (DocumentImpl::open): * kwq/KWQKHTMLPart.h: * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::addMessageToConsole): 2004-06-04 Ken Kocienda Reviewed by Hyatt Fix a comical little bug where the style-applying code did not take into account deleting content from the start of a block. After the deletion, the caret is placed in the node before the deleted content and so inserting a styled fragment after the deletion position works great. The problem is that if the selectionis at the start of a block, there is no "position before the deletion" and the caret is placed in the new first child of the block. Inserting the styled content after this node is just plain wrong. Now, this case is handled correctly, and the styled content is inserted in the proper position. * khtml/editing/htmlediting_impl.cpp: (khtml::ApplyStyleCommandImpl::insertFragment): 2004-06-04 Ken Kocienda Reviewed by Hyatt * khtml/rendering/bidi.cpp: (khtml::RenderBlock::layoutInlineChildren): Only add additional line height in for root editable elements. This helps to keep layout from deviating too much from the intended page layout, but still gives an empty document a line in which it can blink the caret. 2004-06-04 Ken Kocienda Reviewed by Hyatt Made some progress on this set of related bugs: : "Make execCommand work as specified in the Javascript execCommand Compatibility Plan" : "Make queryCommandEnabled work as specified in the Javascript execCommand Compatibility Plan" : "Make queryCommandIndeterm work as specified in the Javascript execCommand Compatibility Plan" : "Make queryCommandState work as specified in the Javascript execCommand Compatibility Plan" : "Make queryCommandSupported work as specified in the Javascript execCommand Compatibility Plan" : "Make queryCommandValue work as specified in the Javascript execCommand Compatibility Plan" I did several things to move the ahead with the plan: 1. The latter five methods did not appear in the tree at all. Now they do, although 2. I removed the implementation for these editing methods from dom_docimpl.cpp, and moved them out to new js_editing.cpp/js_editing.h files. The remaining code in dom_docimpl.cpp is glue to call over to the new JSEditor object defined in the new files. 3. For a couple of the command implementations in js_editing.cpp, I made a stab at returning sensible values. For others, I just return place-holder values. I have added some comments to describe what has been done and what still needs to be done. * WebCore.pbproj/project.pbxproj: * khtml/dom/dom_doc.cpp: Add call-overs for these methods. (DOM::Document::queryCommandEnabled): (DOM::Document::queryCommandIndeterm): (DOM::Document::queryCommandState): (DOM::Document::queryCommandSupported): (DOM::Document::queryCommandValue): * khtml/dom/dom_doc.h: * khtml/ecma/kjs_dom.cpp: Add queryCommandXXX terminology. (DOMDocumentProtoFunc::tryCall): * khtml/ecma/kjs_dom.h: (KJS::DOMDocument::): * khtml/ecma/kjs_dom.lut.h: (KJS::): * khtml/editing/jsediting.cpp: Added. This file implements the guts of editing-related JS methods. (DOM::execCommandNotImplemented): (DOM::queryBoolNotImplemented): (DOM::queryValueNotImplemented): (DOM::JSEditor::commandDict): (DOM::JSEditor::JSEditor): (DOM::JSEditor::~JSEditor): (DOM::JSEditor::commandIdentifier): (DOM::JSEditor::addCommand): (DOM::JSEditor::initDict): (DOM::JSEditor::execCommand): (DOM::JSEditor::queryCommandEnabled): (DOM::JSEditor::queryCommandIndeterm): (DOM::JSEditor::queryCommandState): (DOM::JSEditor::queryCommandSupported): (DOM::JSEditor::queryCommandValue): (DOM::JSEditor::execCommandCopy): (DOM::JSEditor::execCommandCut): (DOM::JSEditor::execCommandDelete): (DOM::JSEditor::execCommandInsertText): (DOM::JSEditor::execCommandPaste): (DOM::JSEditor::execCommandRedo): (DOM::JSEditor::execCommandSelectAll): (DOM::JSEditor::execCommandUndo): (DOM::JSEditor::enabledIfPartNotNull): (DOM::JSEditor::enabledIfSelectionNotEmpty): (DOM::JSEditor::enabledIfSelectionIsRange): (DOM::JSEditor::commandSupported): * khtml/editing/jsediting.h: Added. (DOM::JSEditor::CommandIdentifier::CommandIdentifier): (DOM::JSEditor::document): (DOM::JSEditor::part): * khtml/xml/dom_docimpl.cpp: Rework JS editing support into glue that calls over into new JSEditor object. (DocumentImpl::DocumentImpl): (DocumentImpl::~DocumentImpl): (DocumentImpl::jsEditor): (DocumentImpl::execCommand): (DocumentImpl::queryCommandEnabled): (DocumentImpl::queryCommandIndeterm): (DocumentImpl::queryCommandState): (DocumentImpl::queryCommandSupported): (DocumentImpl::queryCommandValue): * khtml/xml/dom_docimpl.h: 2004-06-03 Richard Williamson Added setCompositeOperation method to Context2D. Actually pass composite operation to drawPixmap (instead of 1). Reviewed by jay lo. * khtml/ecma/kjs_html.cpp: (KJS::Context2DFunction::tryCall): * khtml/ecma/kjs_html.h: (KJS::Context2D::): * khtml/ecma/kjs_html.lut.h: (KJS::): * kwq/KWQPainter.h: * kwq/KWQPainter.mm: (QPainter::compositeOperatorFromString): (QPainter::drawPixmap): 2004-06-03 David Hyatt Add support for box-flex-group-transition (whew!), a new property that is going to enable some incredibly complicated flexing layouts in HTML. This is Stage 1 - wire up the CSS property and make it get parsed into front-end data. Nobody actually looks at this data yet. Reviewed by darin * khtml/css/css_valueimpl.cpp: (CSSInheritedValueImpl::cssText): (ShadowValueImpl::cssText): (length): (FlexGroupTransitionValueImpl::~FlexGroupTransitionValueImpl): (FlexGroupTransitionValueImpl::cssText): * khtml/css/css_valueimpl.h: (DOM::FlexGroupTransitionValueImpl::cssValueType): * khtml/css/cssparser.cpp: (CSSParser::parseValue): (CSSParser::parseShadow): (FlexGroupTransitionParseContext::length): (FlexGroupTransitionParseContext::~FlexGroupTransitionParseContext): (FlexGroupTransitionParseContext::failed): (FlexGroupTransitionParseContext::allowGroup): (FlexGroupTransitionParseContext::commitGroup): (FlexGroupTransitionParseContext::commitSlash): (FlexGroupTransitionParseContext::commitLength): (FlexGroupTransitionParseContext::commitValue): (CSSParser::parseFlexGroupTransition): * khtml/css/cssparser.h: * khtml/css/cssproperties.c: (hash_prop): (findProp): * khtml/css/cssproperties.h: * khtml/css/cssproperties.in: * khtml/rendering/render_style.cpp: (StyleFlexibleBoxData::StyleFlexibleBoxData): (StyleFlexibleBoxData::operator==): (StyleFlexibleBoxData::transitionDataEquivalent): (StyleCSS3InheritedData::operator==): (StyleCSS3InheritedData::shadowDataEquivalent): (ShadowData::operator==): (RenderStyle::setBoxFlexGroupTransition): (length): (FlexGroupTransitionData::operator==): * khtml/rendering/render_style.h: (khtml::FlexGroupTransitionData::next): (khtml::FlexGroupTransitionData::~FlexGroupTransitionData): (khtml::FlexGroupTransitionData::operator!=): (khtml::StyleFlexibleBoxData::~StyleFlexibleBoxData): (khtml::RenderStyle::boxFlexGroupTransition): 2004-06-03 Richard Williamson Add extra sanity check to Image parameter of drawImage... Reviewed by Hyatt. * khtml/ecma/kjs_html.cpp: (KJS::Context2DFunction::tryCall): 2004-06-02 David Hyatt Fix for 3673931, negative margins on objects that dodge floats not handled correctly. Reviewed by darin * khtml/rendering/render_block.cpp: (khtml::RenderBlock::layoutBlockChildren): 2004-06-03 Ken Kocienda Reviewed by Hyatt Fix for layout regression I caused when fixing: : "REGRESSION: text placed on pasteboard by WebKit is offset by one character" Extra height is added to empty blocks that are editable, so we can click to place the caret in them. This extra height was erroneously being added to non-editable blocks as a result of my earlier change. After looking at this and doing some code review, there are the following changes: Change away from "containingBlock" terminology in the NodeImpl class. The operation we are doing in NodeImpl is not the same as what is done in CSS when it uses the term "containingBlock" so: containingBlock changes to enclosingBlockFlowElement, and rootEditableBlock changes to rootEditableElement The vast majority of changes here are to make these name changes. The other significant piece of work, and the fix for the regression, is to change bidi.cpp to only include this extra line height if a block is empty and is content-editable. * khtml/editing/htmlediting_impl.cpp: (khtml::leadingWhitespacePosition): (khtml::trailingWhitespacePosition): (khtml::DeleteSelectionCommandImpl::doApply): (khtml::InputNewlineCommandImpl::doApply): (khtml::RemoveNodeAndPruneCommandImpl::doApply): (khtml::TypingCommandImpl::issueCommandForDeleteKey): * khtml/rendering/bidi.cpp: (khtml::RenderBlock::layoutInlineChildren): * khtml/xml/dom_docimpl.cpp: (DocumentImpl::relinquishesEditingFocus): (DocumentImpl::acceptsEditingFocus): * khtml/xml/dom_nodeimpl.cpp: * khtml/xml/dom_nodeimpl.h: * khtml/xml/dom_position.cpp: (DOM::Position::equivalentLeafPosition): (DOM::Position::previousCharacterPosition): (DOM::Position::nextCharacterPosition): (DOM::Position::previousLinePosition): (DOM::Position::nextLinePosition): (DOM::Position::equivalentUpstreamPosition): (DOM::Position::equivalentDownstreamPosition): (DOM::Position::atStartOfRootEditableElement): (DOM::Position::inRenderedContent): (DOM::Position::rendersOnSameLine): (DOM::Position::rendersInDifferentPosition): (DOM::Position::isLastRenderedPositionInEditableBlock): (DOM::Position::inFirstEditableInRootEditableElement): (DOM::Position::inLastEditableInRootEditableElement): (DOM::Position::inFirstEditableInContainingEditableBlock): (DOM::Position::inLastEditableInContainingEditableBlock): * khtml/xml/dom_position.h: * khtml/xml/dom_selection.cpp: (DOM::Selection::moveToRenderedContent): 2004-06-02 Trey Matteson Added types property to JS clipboard object. Reviewed by Richard. * khtml/ecma/kjs_events.cpp: (Clipboard::getValueProperty): Create JS array for strings coming from the clipboard impl. * khtml/ecma/kjs_events.h: (KJS::Clipboard::): * khtml/ecma/kjs_events.lut.h: * kwq/KWQClipboard.mm: (MIMETypeFromCocoaType): New helper routine to map types. (KWQClipboard::types): Implement based on NSPasteboard's types. 2004-06-02 Richard Williamson Corrected typo ID_IMG should have been ID_CANVAS when checking for the canvas composite operator. Reviewed by Ken. * khtml/rendering/render_canvasimage.cpp: (RenderCanvasImage::paint): 2004-06-02 Richard Williamson Correctly size the if margins, borders, or padding is added. Reviewed by Trey. * khtml/rendering/render_canvasimage.cpp: (RenderCanvasImage::createDrawingContext): 2004-06-01 Trey Matteson First cut at the source side of DHTML dragging. Following IE, new events are added: ondragstart, ondrag, ondragend. The recently added CSS property -khtml-user-drag can be used to make an element draggable. event.dataTransfer.setDragImage(ImageObject,x,y) can be used from ondragstart to set a static image for the dragImage. x,y is the location of the mouse within the image from the upper right corner. clipboard methods setdata and cleardata are implemented. Reviewed by hyatt. * khtml/ecma/kjs_dom.cpp: (DOMNode::getValueProperty): Boilerplate for new events (DOMNode::putValue): Boilerplate for new events * khtml/ecma/kjs_dom.h: (KJS::DOMNode::): Boilerplate for new events * khtml/ecma/kjs_dom.lut.h: * khtml/ecma/kjs_events.cpp: (DOMMouseEvent::getValueProperty): Return undefined for clipboard when its not a drag event. (ClipboardProtoFunc::tryCall): setDragImage glue to clipboard routine. * khtml/ecma/kjs_events.h: (KJS::Clipboard::): * khtml/ecma/kjs_events.lut.h: * khtml/html/html_elementimpl.cpp: (HTMLElementImpl::parseHTMLAttribute): Boilerplate for new events * khtml/khtml_part.cpp: (KHTMLPart::shouldDragAutoNode): Empty impl of new method, where UA determines draggability for events with -khtml-user-drag=auto * khtml/khtml_part.h: * khtml/misc/htmlattrs.c: * khtml/misc/htmlattrs.h: * khtml/misc/htmlattrs.in: Boilerplate for new events * khtml/rendering/render_object.cpp: (RenderObject::draggableNode): Find the node or parent node which might be dragged. * khtml/rendering/render_object.h: * khtml/xml/dom2_eventsimpl.cpp: (EventImpl::typeToId): Boilerplate for new events (EventImpl::idToType): Boilerplate for new events * khtml/xml/dom2_eventsimpl.h: (DOM::EventImpl::): Boilerplate for new events * kwq/KWQClipboard.h: * kwq/KWQClipboard.mm: (KWQClipboard::clearData): Implemented to call NSPasteboard (KWQClipboard::clearAllData): ditto (KWQClipboard::getData): fix corner case that came up testing (KWQClipboard::setData): Implemented to call NSPasteboard (KWQClipboard::dragLocation): Simple setter/getters (KWQClipboard::setDragLocation): (KWQClipboard::dragImage): (KWQClipboard::setDragImage): (KWQClipboard::dragNSImage): * kwq/KWQKHTMLPart.h: * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::KWQKHTMLPart): init new member var (KWQKHTMLPart::dragHysteresisExceeded): Hysteresis moved here from WebKit (KWQKHTMLPart::dispatchDragSrcEvent): Send a dragging event to the current dragSource (KWQKHTMLPart::khtmlMouseMoveEvent): Initiate dragging, now including consulting DHTML, hysteresis and sending ondragstart. (KWQKHTMLPart::dragSourceMovedTo): simple passthrough (KWQKHTMLPart::dragSourceEndedAt): simple passthrough (KWQKHTMLPart::mouseDown): salt away _mouseDownX, _mouseDownY (KWQKHTMLPart::shouldDragAutoNode): Called for -khtml-user-drag=auto. We just call out to WebKit. * kwq/WebCoreBridge.h: * kwq/WebCoreBridge.mm: (-[WebCoreBridge dragSourceMovedTo:]): New glue to drive new dragging events. (-[WebCoreBridge dragSourceEndedAt:operation:]): 2004-06-02 Ken Kocienda Reviewed by me Finish off name change from previous check-in by changing dom_edititerator file names to dom_positioniterator. Files copied and renamed in repository. Includes updated as needed. * ForwardingHeaders/xml/dom_edititerator.h: Removed. * ForwardingHeaders/xml/dom_positioniterator.h: Added. * WebCore.pbproj/project.pbxproj: * khtml/editing/htmlediting_impl.cpp: * khtml/xml/dom_edititerator.cpp: Removed. * khtml/xml/dom_edititerator.h: Removed. * khtml/xml/dom_position.cpp: * khtml/xml/dom_positioniterator.cpp: Added. (DOM::PositionIterator::peekPrevious): (DOM::PositionIterator::peekNext): (DOM::PositionIterator::atStart): (DOM::PositionIterator::atEnd): * khtml/xml/dom_positioniterator.h: Added. (DOM::PositionIterator::PositionIterator): (DOM::PositionIterator::current): (DOM::PositionIterator::previous): (DOM::PositionIterator::next): (DOM::PositionIterator::setPosition): (DOM::PositionIterator::isEmpty): * khtml/xml/dom_selection.cpp: 2004-06-02 Ken Kocienda Reviewed by Darin Probable fix for this bug: : "REGRESSION: text placed on pasteboard by WebKit is offset by one character" I could not reproduce the bug myself, which is why I call the fix as probable. Darin and I did some code inspection and found some problems with the equivalentUpstreamPosition and equivalentDownstreamPosition functions on DOM::Position and how these functions dealt with changing from editable to non-editable content. As a result of these discoveries, I went over this code and the helpers and functions which support them, and made some corrections and simplifications. The big changes are as follows: 1. Rename EditIterator class to PositionIterator. This class needs to run code for selections in non-editable content, so the name change is appropriate. 2. Change containingEditableBlock to containingBlock. It turns out that none of the editing code relies on the distinction between editable blocks and non-editable blocks. The important distinction is the block boundary. The notion of rootEditableBlock remains. * khtml/editing/htmlediting_impl.cpp: (khtml::DeleteCollapsibleWhitespaceCommandImpl::deleteWhitespace): PositionIterator name change. (khtml::DeleteSelectionCommandImpl::joinTextNodesWithSameStyle): Ditto. (khtml::DeleteSelectionCommandImpl::containsOnlyWhitespace): Ditto. (khtml::DeleteSelectionCommandImpl::doApply): Ditto. (khtml::InputNewlineCommandImpl::doApply): Ditto. (khtml::RemoveNodeAndPruneCommandImpl::doApply): Ditto. * khtml/rendering/bidi.cpp: (khtml::RenderBlock::layoutInlineChildren): Ditto. * khtml/xml/dom_edititerator.cpp: (DOM::PositionIterator::peekPrevious): Call for previousLeafNode instead of previousEditable. Editable check is not appropriate as this class is used for non-editable content. (DOM::PositionIterator::peekNext): Call nextLeafNode instead of nextEditable, as above. (DOM::PositionIterator::atStart): Call for previousLeafNode instead of previousEditable, as above. (DOM::PositionIterator::atEnd): Call nextLeafNode instead of nextEditable, as above. * khtml/xml/dom_edititerator.h: (DOM::PositionIterator::PositionIterator): PositionIterator name change. Remove unused and unneeded constructors. * khtml/xml/dom_nodeimpl.cpp: (NodeImpl::previousEditable): Simplify. Rely on previousLeafNode as a helper. (NodeImpl::nextEditable): Ditto, but rely on nextLeafNode. (NodeImpl::previousLeafNode): Remove tree-walking code. Rely on traversePreviousNode as a helper. (NodeImpl::nextLeafNode): Ditto, but rely on traverseNextNode. (NodeImpl::containingBlock): Renamed replacement for containingEditableBlock. (NodeImpl::inSameContainingEditableBlock): Call renamed containingBlock. * khtml/xml/dom_nodeimpl.h: * khtml/xml/dom_position.cpp: (DOM::Position::previousCharacterPosition): Various name changes, as described above. (DOM::Position::nextCharacterPosition): Ditto. (DOM::Position::previousWordPosition): Ditto. (DOM::Position::nextWordPosition): Ditto. (DOM::Position::previousLinePosition): Ditto. (DOM::Position::nextLinePosition): Ditto. (DOM::Position::equivalentUpstreamPosition): Remove bogus check for editable node in loop. Perform improved block-crossing check at start of loop which works for editable and non-editable content. This is the crux of the fix for the bug. (DOM::Position::equivalentDownstreamPosition): Ditto. (DOM::Position::inRenderedContent): Various name changes, as described above. (DOM::Position::rendersOnSameLine): Ditto. (DOM::Position::rendersInDifferentPosition): Ditto. (DOM::Position::isFirstRenderedPositionOnLine): Ditto. (DOM::Position::isLastRenderedPositionOnLine): Ditto. (DOM::Position::isLastRenderedPositionInEditableBlock): Ditto. (DOM::Position::inFirstEditableInRootEditableBlock): Ditto. (DOM::Position::inLastEditableInRootEditableBlock): Ditto. (DOM::Position::inFirstEditableInContainingEditableBlock): Ditto. (DOM::Position::inLastEditableInContainingEditableBlock): Ditto. 2004-06-01 Richard Williamson Fixed deployment build warning. * khtml/rendering/render_canvasimage.cpp: (RenderCanvasImage::paint): 2004-06-01 Richard Williamson Added support for composite attribute to Added support for drawImage and drawImageFromRect to , i.e.: Reviewed by Trey. * khtml/ecma/kjs_html.cpp: (KJS::Context2DFunction::tryCall): (Context2D::Context2D): * khtml/ecma/kjs_html.h: * khtml/rendering/render_canvasimage.cpp: (RenderCanvasImage::paint): * kwq/KWQPainter.h: * kwq/KWQPainter.mm: (QPainter::getCompositeOperation): (QPainter::setCompositeOperation): (QPainter::drawPixmap): (QPainter::drawTiledPixmap): * kwq/KWQPixmap.h: * kwq/KWQPixmap.mm: (QPixmap::flushRasterCache): * kwq/WebCoreImageRenderer.h: * kwq/WebCoreImageRendererFactory.h: 2004-06-01 Ken Kocienda Reviewed by Darin Fix for these bugs: : "Text styles have hard-coded values making bold the only supported text style" : "HTML Editing: Font panel doesn't work" * khtml/css/css_valueimpl.cpp: (FontFamilyValueImpl::cssText): Added implementation for this subclass. Returns parsedFontName. * khtml/css/css_valueimpl.h: Declare cssText() on FontFamilyValueImpl. (DOM::CSSProperty::value): * khtml/editing/htmlediting.cpp: (khtml::ApplyStyleCommand::ApplyStyleCommand): Changed signature to take a CSSStyleDeclarationImpl. (khtml::ApplyStyleCommand::style): Added accessor. * khtml/editing/htmlediting.h: Changed constructor signature to take a CSSStyleDeclarationImpl. * khtml/editing/htmlediting_impl.cpp: (khtml::styleSpanClassString): Added helper to return attribute used to tag spans we add to apply styles. (khtml::ApplyStyleCommandImpl::ApplyStyleCommandImpl): Ref style passed in. (khtml::ApplyStyleCommandImpl::~ApplyStyleCommandImpl): Deref style passed in. (khtml::ApplyStyleCommandImpl::doApply): m_removingStyle is obsolete. Removed. (khtml::ApplyStyleCommandImpl::isHTMLStyleNode): Now checks all properties in the object's declaration. (khtml::ApplyStyleCommandImpl::removeCSSStyle): Again, now is multi-property-savvy. Will now remove an empty span if we added it. (khtml::ApplyStyleCommandImpl::currentlyHasStyle): Replaced, bold-only code with code that can handle all styles. (khtml::ApplyStyleCommandImpl::computeStyleChange): Helper which helps to determine whether we want to apply HTML-style markup for bold and italic, and gathers up all style changes that need to be done. (khtml::ApplyStyleCommandImpl::positionInsertionPoint): Added comment explaining possible optimization that might be done in the future. (khtml::ApplyStyleCommandImpl::applyStyleIfNeeded): Significant reworking; now handles applying multiple styles. (khtml::ApplyStyleCommandImpl::cloneSelection): Assert fragment has at least one child. Don't want to work on empty fragments. (khtml::ApplyStyleCommandImpl::surroundContentsWithElement): New helper. (khtml::RemoveCSSPropertyCommandImpl::~RemoveCSSPropertyCommandImpl): Juggle asserts and lifecycle methods to be more like other commands. (khtml::RemoveCSSPropertyCommandImpl::doApply): Ditto. (khtml::RemoveNodeAttributeCommandImpl::~RemoveNodeAttributeCommandImpl): Ditto. (khtml::RemoveNodeAttributeCommandImpl::doApply):Ditto. * khtml/editing/htmlediting_impl.h: (khtml::ApplyStyleCommandImpl::style): Added. (khtml::ApplyStyleCommandImpl::StyleChange::StyleChange): Added. * kwq/DOM-CSS.mm: (-[DOMCSSStyleDeclaration setProperty:::]): Fix problem where passing an empty NSString to a function expecting a boolean made all properties important priority. * kwq/WebCoreBridge.mm: (-[WebCoreBridge applyStyle:]): Remove provisional code and comment. Now pass along style, following the intended design. 2004-06-01 Chris Blumenberg Reviewed by kocienda. * kwq/WebCoreBridge.h: * kwq/WebCoreBridge.mm: (-[WebCoreBridge dragCaretDOMRange]): new, lets WebKit pass the drag caret DOM range to the editing delegate 2004-05-28 John Louch Reviewed by gramps. - removed setShadowWithColor and change setShadow to work with optional attributes it follows the same rules as setFill/StrokeColor - Fixed bug in setFillColor and setStrokeColor for CMYK colors (missing break in case). * khtml/ecma/kjs_html.cpp: (KJS::Context2DFunction::tryCall): * khtml/ecma/kjs_html.h: (KJS::Context2D::): * khtml/ecma/kjs_html.lut.h: (KJS::): 2004-05-28 Darin Adler Reviewed by Ken. - various editing-related improvements * khtml/xml/dom_selection.h: Removed UP and DOWN directions, and added PARAGRAPH granularity. * khtml/xml/dom_selection.cpp: (DOM::Selection::modify): Got rid of the UP and DOWN directions, and made movement between lines happen when granularity is LINE. Added a new unimplemented granularity: PARAGRAPH. (DOM::Selection::validate): Remove some unneeded APPLE_CHANGES. The code need not be ifdef'd. (DOM::Selection::debugPosition): Ditto. * kwq/WebCoreBridge.h: Removed WebSelectUp and WebSelectDown, and added WebSelectByParagraph. Added stringForRange: and selectedDOMRangeWithGranularity:, and renamed replaceSelectionWithNewline to insertNewline because it has the insertText: semantic, not the replaceSelectionWithText: one. * kwq/WebCoreBridge.mm: (-[WebCoreBridge stringForRange:]): Added. (-[WebCoreBridge selectedDOMRangeWithGranularity:]): Added. (-[WebCoreBridge alterCurrentSelection:direction:granularity:]): Updated code to understand that vertical movement is based on granularity now, not direction. (-[WebCoreBridge replaceSelectionWithFragment:selectReplacement:]): Moved an ensureCaretVisible from the WebKit down here. I think perhaps this should go down even further in WebCore. (-[WebCoreBridge insertNewline]): Renamed, and moved ensureCaretVisible here. (-[WebCoreBridge insertText:]): Moved ensureCaretVisible here. (-[WebCoreBridge deleteKeyPressed]): Moved ensureCaretVisible here. * khtml/xml/dom_position.cpp: Some ifdef tweaks. * khtml/misc/helper.cpp: Namespace and formatting tweaks. * khtml/misc/helper.h: Removed some unused stuff. * khtml/dom/dom2_range.h: Make range constructor public so that anyone with a RangeImpl can easily make a Range. 2004-05-28 Richard Williamson setStrokeColor and setFillColor now support old school web color string, oswcs+alpha, gray, gray+alpha, rgba, and cmyka. Reviewed by jay-lo. * khtml/css/cssparser.cpp: (CSSParser::parseColor): (CSSParser::parseColorFromValue): * khtml/css/cssparser.h: Made parseColor static public class method * khtml/ecma/kjs_html.cpp: (KJS::Context2DFunction::tryCall): 2004-05-28 David Hyatt Implement -khtml-user-select and add support for the property -khtml-user-drag (although someone will still need to wire it up). Reviewed by rjw * 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: (hash_val): (findValue): * khtml/css/cssvalues.h: * khtml/css/cssvalues.in: * khtml/khtml_part.cpp: (KHTMLPart::handleMousePressEventDoubleClick): (KHTMLPart::handleMousePressEventTripleClick): (KHTMLPart::handleMousePressEventSingleClick): (KHTMLPart::handleMouseMoveEventSelection): * khtml/rendering/render_canvas.cpp: (RenderCanvas::setSelection): * khtml/rendering/render_object.cpp: (RenderObject::shouldSelect): * khtml/rendering/render_object.h: * khtml/rendering/render_style.cpp: (userSelect): (StyleCSS3NonInheritedData::operator==): (RenderStyle::diff): * khtml/rendering/render_style.h: (khtml::): (khtml::RenderStyle::userDrag): (khtml::RenderStyle::userSelect): (khtml::RenderStyle::setUserDrag): (khtml::RenderStyle::setUserSelect): (khtml::RenderStyle::initialUserDrag): (khtml::RenderStyle::initialUserSelect): 2004-05-28 John Louch added addArc and clip path routines. Reviewed by sullivan. * khtml/ecma/kjs_html.cpp: (KJS::Context2DFunction::tryCall): * khtml/ecma/kjs_html.h: (KJS::Context2D::): * khtml/ecma/kjs_html.lut.h: (KJS::): 2004-05-28 John Louch Added addArcToPoint and addRect path routines. Reviewed by sullivan. * khtml/ecma/kjs_html.cpp: (KJS::Context2DFunction::tryCall): * khtml/ecma/kjs_html.h: (KJS::Context2D::): * khtml/ecma/kjs_html.lut.h: (KJS::): 2004-05-27 Ken Kocienda Reviewed by John * khtml/xml/dom_selection.cpp: (DOM::Selection::toRange): Add call to update document layout before returning a Range. This is done to ensure recently-done editing changes are reflected in the calculation of the Range. This change solves a specific problem with updating the font panel, where the wrong Range was used, resulting in an incorrect font. Also, defer converting positions to be range-compliant positions. The nodeIsBeforeNode function is not range-compliant-position-savvy. 2004-05-27 Kevin Decker Reviewed by Ken. - added support for the new JavaScript error console - error messages are now wired directly to the bridge - revised generated error message content * khtml/ecma/kjs_events.cpp: (JSEventListener::handleEvent): * khtml/ecma/kjs_proxy.cpp: (KJSProxyImpl::evaluate): * khtml/ecma/kjs_window.cpp: (Window::isSafeScript): (ScheduledAction::execute): * kwq/KWQKHTMLPart.h: * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::addMessageToConsole): * kwq/WebCoreBridge.h: * kwq/WebCoreBridge.mm: 2004-05-27 Trey Matteson Two dragging tweaks: ondragleave events are sent before ondragenter events when going across element boundaries, to match WinIE. For compatibility with WinIE, we honor MIME types of "Text" and "URL". Reviewed by rjw. * khtml/khtmlview.cpp: (KHTMLView::updateDragAndDrop): * kwq/KWQClipboard.mm: (cocoaTypeFromMIMEType): === Safari-142 === 2004-05-27 Vicki Murley Reviewed by Darin. - Fix Tiger build failure. Rename constant "S" to "WHITESPACE", and change all instances of S to WHITESPACE. * khtml/css/cssparser.cpp: (DOM::CSSParser::lex): S to WHITESPACE * khtml/css/parser.cpp: regenerated file * khtml/css/parser.h: regenerated file * khtml/css/parser.y: S to WHITESPACE * khtml/css/tokenizer.cpp: regenerated file * khtml/css/tokenizer.flex: S to WHITESPACE 2004-05-27 John Louch Reviewed by NOBODY (OOPS!). * khtml/ecma/kjs_html.cpp: (KJS::Context2DFunction::tryCall): * khtml/ecma/kjs_html.h: (KJS::Context2D::): * khtml/ecma/kjs_html.lut.h: (KJS::): 2004-05-27 Trey Matteson First cut at DHTML dragging, destination side. Dragging text, files and URLs onto elements works. Type conversion from NSPasteboard to MIME types is hardwired. No JS access yet to modifier keys, or drag operations mask. Per IE's dragging API, we have the new DOM events ondragenter, ondragover, ondragleave and ondrop. We also have an event.dataTransfer object providing access to the NSPasteboard bearing the incoming data. Reviewed by rjw. * WebCore.pbproj/project.pbxproj: add 2 new files. * khtml/ecma/kjs_dom.cpp: (DOMNode::getValueProperty): JS access to ondragenter and pals (DOMNode::putValue): Ditto * khtml/ecma/kjs_dom.h: (KJS::DOMNode::): New attr enum values. * khtml/ecma/kjs_dom.lut.h: (KJS::): * khtml/ecma/kjs_events.cpp: (DOMMouseEvent::mark): Pass along mark to dataTransfer we hold. (DOMMouseEvent::getValueProperty): Create and return dataTransfer. (Clipboard::Clipboard): New class exposed in JS. (Clipboard::~Clipboard): (Clipboard::tryGet): Boilerplate. (Clipboard::getValueProperty): Return the clipboard's props. (Clipboard::tryPut): Boilerplate. (Clipboard::putValue): Set the clipboard's props. (ClipboardProtoFunc::tryCall): Implement clipboard's funcs. * khtml/ecma/kjs_events.h: (KJS::DOMMouseEvent::DOMMouseEvent): Init clipboard ptr. (KJS::DOMMouseEvent::): (KJS::Clipboard::toBoolean): (KJS::Clipboard::classInfo): (KJS::Clipboard::): * khtml/ecma/kjs_events.lut.h: (KJS::): * khtml/html/html_elementimpl.cpp: (HTMLElementImpl::parseHTMLAttribute): Enable setting ondragenter and friends as html attributes. * khtml/khtmlview.cpp: (KHTMLView::dispatchDragEvent): Send a drag related event to the DOM. (KHTMLView::updateDragAndDrop): Handle a dragenter or dragupdate. (KHTMLView::cancelDragAndDrop): Handle a dragexit. (KHTMLView::performDragAndDrop): Handle an actual drop. * khtml/khtmlview.h: * khtml/misc/htmlattrs.c: Generated code. * khtml/misc/htmlattrs.h: Generated code. * khtml/misc/htmlattrs.in: Add ondragenter, etc * khtml/xml/dom2_eventsimpl.cpp: (EventImpl::typeToId): Handle new event types for dragging. (EventImpl::idToType): Ditto. (MouseEventImpl::MouseEventImpl): Init new clipboard ptr. (MouseEventImpl::~MouseEventImpl): Deref clipboard. (ClipboardImpl::ClipboardImpl): (ClipboardImpl::~ClipboardImpl): * khtml/xml/dom2_eventsimpl.h: (DOM::EventImpl::): New event enums. (DOM::MouseEventImpl::clipboard): * kwq/KWQClipboard.h: Added. * kwq/KWQClipboard.mm: Added. (KWQClipboard::KWQClipboard): (KWQClipboard::~KWQClipboard): (KWQClipboard::isForDragging): Trivial getter/setters. (KWQClipboard::dropEffect): (KWQClipboard::setDropEffect): (KWQClipboard::dropAllowed): (KWQClipboard::setDropAllowed): (cocoaTypeFromMIMEType): Convert MIME pboard type to Cocoa type. (KWQClipboard::clearData): OSX specific clipboard impl. of IE func (KWQClipboard::clearAllData): Ditto (KWQClipboard::getData): Ditto (KWQClipboard::setData): Ditto * kwq/WebCoreBridge.h: * kwq/WebCoreBridge.mm: (-[WebCoreBridge dragOperationForDraggingInfo:]): Passthrough from WebKit to khtmlpart (-[WebCoreBridge dragExitedWithDraggingInfo:]): Ditto (-[WebCoreBridge concludeDragForDraggingInfo:]): Ditto 2004-05-27 Ken Kocienda Reviewed by Gramps * kwq/KWQKHTMLPart.h: Declare new fontForCurrentPosition helper. * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::fontForCurrentPosition): Determines the "current font" in the way that Cocoa does. Either the font of the character before the caret, when the selection is a caret, or the font of the first character selected, when the selection is a range. * kwq/WebCoreBridge.h: Declare bridge method so this can be called from WebKit. * kwq/WebCoreBridge.mm: (-[WebCoreBridge fontForCurrentPosition]): Calls through to fontForCurrentPosition on KWQKHTMLPart. 2004-05-27 Ken Kocienda Reviewed by Gramps Adds a typing style member variable to khtml part. This patch adds basic life-cycle management and accessors. In addition, one essential piece of behavior has been added: Clearing the typing style whenever the selection changes. Follow-on work will make this typing style a fully functional part of applying styles to text while typing. * khtml/khtml_part.cpp: (KHTMLPart::notifySelectionChanged): Clear typing style. (KHTMLPart::typingStyle): Getter. (KHTMLPart::setTypingStyle): Setter. (KHTMLPart::clearTypingStyle): Convenience. Sets to 0. * khtml/khtml_part.h: Function declarations. * khtml/khtmlpart_p.h: (KHTMLPartPrivate::KHTMLPartPrivate): Initialize member variable. (KHTMLPartPrivate::~KHTMLPartPrivate): Deref if necessary. 2004-05-27 Ken Kocienda Reviewed by Gramps Add helper to get the DOM element for a Position. * khtml/xml/dom_position.cpp: (DOM::Position::element): Returns the Position's node if it is an element, or the first ancestor of the node that is an element. Returns 0 if node is not an element and has no parent that is an element. * khtml/xml/dom_position.h: Added declaration. 2004-05-27 Darin Adler Reviewed by Maciej. - moved to new symlink technique for embedding frameworks * WebCore.pbproj/project.pbxproj: Get rid of embed-frameworks build step because we don't need it any more. 2004-05-27 Darin Adler - fixed bug where all pages with images would cause a crash - fixed Deployment build * kwq/KWQPainter.mm: (QPainter::drawPixmap): Put #if 0 around placeholder code for setting up the graphics context. 2004-05-26 Richard Williamson Added shadow support (w/ Louch). Added infrastructure for drawing images. New context methods: setShadow setShadowWithColor clearShadow Reviewed by me and Louch. * khtml/ecma/kjs_html.cpp: (KJS::Context2DFunction::tryCall): * khtml/ecma/kjs_html.h: (KJS::Image::image): (KJS::Context2D::): * khtml/ecma/kjs_html.lut.h: (KJS::): * kwq/KWQPainter.h: * kwq/KWQPainter.mm: (QPainter::drawPixmap): 2004-05-26 Richard Williamson Fixed build snafu. * khtml/ecma/kjs_html.cpp: (KJS::Context2DFunction::tryCall): * khtml/ecma/kjs_html.h: (KJS::Context2D::): * khtml/ecma/kjs_html.lut.h: (KJS::): 2004-05-26 Richard Williamson Part 2 of the new tag implementation. This adds the basic machinery and draw operations for the tag. Pretty cool. function drawLine() { var canvas1 = document.getElementById ("canvas1"); var context = canvas1.getContext("context-2d"); context.setStrokeColor ("red"); context.setLineWidth (10); context.beginPath(); context.moveToPoint (0,0); context.addLineToPoint (400,400); context.strokePath(); } ... Currently supported operations on the 2D context are: Save, Restore, Scale, Rotate, Translate, BeginPath, ClosePath, SetStrokeColor, SetFillColor, SetLineWidth, SetLineCap, SetLineJoin, SetMiterLimit, FillPath, StrokePath, MoveToPoint, AddLineToPoint, AddQuadraticCurveToPoint, AddBezierCurveToPoint, ClearRect More to come. Reviewed by Dave. * khtml/ecma/kjs_html.cpp: (KJS::HTMLElementFunction::tryCall): (KJS::Context2DFunction::tryCall): (Context2D::tryGet): (Context2D::getValueProperty): (Context2D::tryPut): (Context2D::putValue): (Context2D::Context2D): (Context2D::~Context2D): * khtml/ecma/kjs_html.h: (KJS::Context2D::toBoolean): (KJS::Context2D::classInfo): (KJS::Context2D::): * khtml/ecma/kjs_html.lut.h: (KJS::): * khtml/html/html_canvasimpl.cpp: (HTMLCanvasElementImpl::HTMLCanvasElementImpl): * khtml/html/htmlparser.cpp: (KHTMLParser::getElement): * khtml/rendering/render_canvasimage.cpp: (RenderCanvasImage::RenderCanvasImage): (RenderCanvasImage::~RenderCanvasImage): (RenderCanvasImage::createDrawingContext): (RenderCanvasImage::drawingContext): (RenderCanvasImage::setNeedsImageUpdate): (RenderCanvasImage::updateDrawnImage): (RenderCanvasImage::drawnImage): (RenderCanvasImage::paint): (RenderCanvasImage::layout): * khtml/rendering/render_canvasimage.h: * khtml/rendering/render_image.cpp: (RenderImage::paint): * khtml/rendering/render_image.h: * khtml/rendering/render_replaced.cpp: (RenderReplaced::shouldPaint): (RenderWidget::paint): * kwq/KWQPainter.h: * kwq/KWQPainter.mm: (QPainter::currentContext): 2004-05-26 Darin Adler - fixed warning that prevents Deployment build from compiling * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::khtmlMousePressEvent): Moved use of single-click boolean outside the scope of the "block exceptions" macros. 2004-05-25 Chris Blumenberg Fixed a regression where selections that were created via double or triple were not draggable. Reviewed by darin. * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::khtmlMousePressEvent): if the click count is greater than 1, don't allow drags (KWQKHTMLPart::khtmlMouseMoveEvent): allow drags to occur even if the selection was originally created via double or triple click 2004-05-25 Chris Blumenberg Fixed regression where undoing typing would undo character-by-character. Reviewed by kocienda. * kwq/WebCoreBridge.h: * kwq/WebCoreBridge.mm: (-[WebCoreBridge insertText:]): new, this method used to be replaceSelectionWithText, but replaceSelectionWithText now is one operation whereas calls to insertText: are coalesced 2004-05-25 Ken Kocienda Reviewed by John Change postDidChangeSelectionNotification and postDidChangeNotification tp respondToChangedSelection and respondToChangedContents, respectively, to account for the fact that we do work in these calls other than post a notification. * khtml/khtml_part.cpp: (KHTMLPart::notifySelectionChanged): Use new names. (KHTMLPart::appliedEditing): Ditto. (KHTMLPart::unappliedEditing): Ditto. (KHTMLPart::reappliedEditing): Ditto. * kwq/KWQKHTMLPart.h: Change name of functions as described. * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::respondToChangedSelection): Ditto. (KWQKHTMLPart::respondToChangedContents): Ditto. * kwq/WebCoreBridge.h: Ditto. 2004-05-25 Maciej Stachowiak Fixed build. * ForwardingHeaders/misc/khtml_text_operations.h: Added. 2004-05-25 Richard Williamson Part 1 of the new tag implementation. This patch adds the boiler plate for the new element. Reviewed by Dave. * ForwardingHeaders/html/html_canvasimpl.h: Added. * ForwardingHeaders/rendering/render_canvasimage.h: Added. * WebCore.pbproj/project.pbxproj: * khtml/ecma/kjs_html.cpp: (KJS::HTMLElement::classInfo): (KJS::HTMLElementFunction::tryCall): * khtml/ecma/kjs_html.h: (KJS::HTMLElement::): * khtml/ecma/kjs_html.lut.h: (KJS::): * khtml/html/dtd.cpp: (DOM::checkChild): * khtml/html/html_canvasimpl.cpp: Added. (HTMLCanvasElementImpl::HTMLCanvasElementImpl): (HTMLCanvasElementImpl::~HTMLCanvasElementImpl): (HTMLCanvasElementImpl::id): (HTMLCanvasElementImpl::mapToEntry): (HTMLCanvasElementImpl::parseHTMLAttribute): (HTMLCanvasElementImpl::createRenderer): (HTMLCanvasElementImpl::attach): (HTMLCanvasElementImpl::detach): (HTMLCanvasElementImpl::isURLAttribute): * khtml/html/html_canvasimpl.h: Added. * khtml/html/htmlparser.cpp: (KHTMLParser::getElement): * khtml/misc/htmltags.c: (hash_tag): (findTag): * khtml/misc/htmltags.h: * khtml/misc/htmltags.in: * khtml/rendering/render_canvasimage.cpp: Added. (RenderCanvasImage::RenderCanvasImage): (RenderCanvasImage::~RenderCanvasImage): (RenderCanvasImage::paint): (RenderCanvasImage::layout): * khtml/rendering/render_canvasimage.h: Added. (khtml::RenderCanvasImage::renderName): (khtml::RenderCanvasImage::element): 2004-05-25 Chris Blumenberg Fixed: : (when dragging text within an editable HTML doc, the selection should be moved not copied) Reviewed by kocienda. * khtml/editing/htmlediting_impl.cpp: (khtml::MoveSelectionCommandImpl::doApply): implemented * khtml/khtml_part.cpp: (KHTMLPart::setDragCaret): make the old drag cursor rect dirty * khtml/khtml_part.h: 2004-05-25 Maciej Stachowiak Reviewed by John. - fixed : (Editing: export innerText, innerHTML, outerText, outerHTML and setters to Objective-C) - partial fix for : (Fix innerText and setInnerText DOM extensions) * khtml/html/html_elementimpl.cpp: (HTMLElementImpl::innerText): Use plainText() to make the text, to match other browsers. (HTMLElementImpl::outerText): Extended comment. * khtml/misc/khtml_text_operations.h: * kwq/DOMExtensions.h: * kwq/DOMHTML.mm: (-[DOMHTMLElement outerText]): Added new ObjC wrapper for this. (-[DOMHTMLElement setOuterText:]): Ditto. 2004-05-25 Ken Kocienda Reviewed by Chris Defer setting the selection to delete when none has been passed in to the time that the command is run. This fixes a problem where a command nested in a composite was not correctly picking up the right selection to begin its work. Now, the command will correctly use the ending selection of its parent when no selection has been passed in. * khtml/editing/htmlediting_impl.cpp: (khtml::DeleteCollapsibleWhitespaceCommandImpl::DeleteCollapsibleWhitespaceCommandImpl): (khtml::DeleteCollapsibleWhitespaceCommandImpl::doApply): (khtml::DeleteSelectionCommandImpl::DeleteSelectionCommandImpl): (khtml::DeleteSelectionCommandImpl::doApply): * khtml/editing/htmlediting_impl.h: 2004-05-24 Maciej Stachowiak Reviewed by Dave. Added a new simple layout test for outerText. * layout-tests/fast/dom/outerText-expected.txt: Added. * layout-tests/fast/dom/outerText.html: Added. 2004-05-24 Darin Adler Reviewed by Vicki. - fixed : (iBench is crashing in TOT) * khtml/html/html_formimpl.cpp: (HTMLSelectElementImpl::HTMLSelectElementImpl): Initialize m_options to 0. 2004-05-24 Ken Kocienda Reviewed by Richard * khtml/xml/dom_selection.cpp: (DOM::Selection::toRange): Improved the code to return ranges that are convenient to use by WebKit code which needs to perform text-editor-like operations with ranges. Comments in the code describe this behavior. (DOM::Selection::nodeIsBeforeNode): Make this method const. * khtml/xml/dom_selection.h: Ditto. 2004-05-24 Chris Blumenberg Improved editing via drag. Reviewed by kocienda. * khtml/editing/htmlediting.cpp: Renamed PasteMarkupCommand to ReplaceSelectionCommand (khtml::ReplaceSelectionCommand::ReplaceSelectionCommand): (khtml::ReplaceSelectionCommand::~ReplaceSelectionCommand): (khtml::ReplaceSelectionCommand::impl): (khtml::MoveSelectionCommand::MoveSelectionCommand): (khtml::MoveSelectionCommand::~MoveSelectionCommand): (khtml::MoveSelectionCommand::impl): * khtml/editing/htmlediting.h: (khtml::): * khtml/editing/htmlediting_impl.cpp: (khtml::ReplaceSelectionCommandImpl::ReplaceSelectionCommandImpl): (khtml::ReplaceSelectionCommandImpl::~ReplaceSelectionCommandImpl): (khtml::ReplaceSelectionCommandImpl::commandID): (khtml::ReplaceSelectionCommandImpl::doApply): (khtml::MoveSelectionCommandImpl::MoveSelectionCommandImpl): new command (khtml::MoveSelectionCommandImpl::~MoveSelectionCommandImpl): (khtml::MoveSelectionCommandImpl::commandID): (khtml::MoveSelectionCommandImpl::doApply): * khtml/editing/htmlediting_impl.h: * khtml/khtml_part.cpp: (KHTMLPart::dragCaret): new (KHTMLPart::setDragCaret): new (KHTMLPart::notifyDragCaretChanged): new (KHTMLPart::paintDragCaret): new * khtml/khtml_part.h: * khtml/khtmlpart_p.h: * khtml/rendering/render_block.cpp: (khtml::RenderBlock::paintObject): paint the drag caret * kwq/DOM.mm: (+[DOMDocumentFragment _documentFragmentWithImpl:]): made internally available (-[DOMDocumentFragment _fragmentImpl]): * kwq/DOMInternal.h: * kwq/WebCoreBridge.h: * kwq/WebCoreBridge.mm: (-[WebCoreBridge documentFragmentWithMarkupString:baseURLString:]): new (-[WebCoreBridge documentFragmentWithText:]): new (-[WebCoreBridge replaceSelectionWithFragment:selectReplacement:]): new (-[WebCoreBridge replaceSelectionWithNode:selectReplacement:]): renamed to take the selectReplacement BOOL (-[WebCoreBridge replaceSelectionWithMarkupString:baseURLString:selectReplacement:]): ditto (-[WebCoreBridge replaceSelectionWithText:selectReplacement:]): ditto (-[WebCoreBridge replaceSelectionWithNewline]): moved (-[WebCoreBridge setSelectionToDragCaret]): new (-[WebCoreBridge moveSelectionToDragCaret:]): new (-[WebCoreBridge moveDragCaretToPoint:]): set the drag caret, not the selection (-[WebCoreBridge removeDragCaret]): new 2004-05-24 Ken Kocienda Reviewed by John Fixed some life-cycle issues with node iterators and detaching. Big deal is to detach in DOMNodeIterator dealloc. Otherwise, NodeIterators created from obj-c leak. * khtml/xml/dom2_traversalimpl.cpp: (DOM::NodeIteratorImpl::detach): Only detach if not yet detached. * khtml/xml/dom2_traversalimpl.h: (DOM::NodeIteratorImpl::setDetached): New convenience. * kwq/DOM.mm: (-[DOMNodeIterator dealloc]): Detach here, if not yet detached; fixes leak. 2004-05-24 Ken Kocienda Reviewed by Hyatt * khtml/css/css_computedstyle.cpp: (DOM::CSSComputedStyleDeclarationImpl::getPropertyValue): Fixed to return the property value, as it should, instead of the whole property, as it was doing before. 2004-05-23 Darin Adler Reviewed by Ken. - fixed : (Shift click should extend selection) * khtml/khtmlpart_p.h: Renamed m_textElement to m_selectionGranularity and m_mouseMovedSinceLastMousePress to m_beganSelectingText. * khtml/khtml_part.cpp: (KHTMLPart::handleMousePressEventDoubleClick): Set m_beganSelectingText if the double-click began selecting text. (KHTMLPart::handleMousePressEventTripleClick): Ditto. (KHTMLPart::handleMousePressEventSingleClick): Added code to extend selection if shift is down. (KHTMLPart::khtmlMousePressEvent): Remove code that sets the selection granularity to "by character". We only want to do that if we start selecting with a single click. Otherwise we want to leave the selection granularity alone. (KHTMLPart::khtmlMouseReleaseEvent): Change the code that clears the selection on a plain old click to check the m_beganSelectingText boolean so it won't run when you shift-click, for example. * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::khtmlMouseMoveEvent): Updated for m_textElement name change. 2004-05-22 Darin Adler Reviewed by Ken. - went through things marked "unimplemented" or "not implemented" and removed or implemented as many as possible * kwq/DOM.mm: (-[DOMNode dispatchEvent:]): Implemented. Also moved DOMAbstractView and DOMDocumentView into DOMViews.mm. * kwq/DOM-CSS.mm: (-[DOMDocument getComputedStyle::]): Implemented. * kwq/DOMEventsInternal.h: Added. * kwq/DOMEvents.mm: (-[DOMEvent type]): Implemented. (-[DOMEvent target]): Implemented. (-[DOMEvent currentTarget]): Implemented. (-[DOMEvent eventPhase]): Implemented. (-[DOMEvent bubbles]): Implemented. (-[DOMEvent cancelable]): Implemented. (-[DOMEvent timeStamp]): Implemented. (-[DOMEvent stopPropagation]): Implemented. (-[DOMEvent preventDefault]): Implemented. (-[DOMEvent initEvent:::]): Implemented. (-[DOMEvent _eventImpl]): Added. (-[DOMEvent _initWithEventImpl:]): Added. (+[DOMEvent _eventWithImpl:]): Added. (-[DOMMouseEvent _mouseEventImpl]): Added. (-[DOMMouseEvent screenX]): Implemented. (-[DOMMouseEvent screenY]): Implemented. (-[DOMMouseEvent clientX]): Implemented. (-[DOMMouseEvent clientY]): Implemented. (-[DOMMouseEvent ctrlKey]): Implemented. (-[DOMMouseEvent shiftKey]): Implemented. (-[DOMMouseEvent altKey]): Implemented. (-[DOMMouseEvent metaKey]): Implemented. (-[DOMMouseEvent button]): Implemented. (-[DOMMouseEvent relatedTarget]): Implemented. (-[DOMMouseEvent initMouseEvent:::::::::::::::]): Implemented. (-[DOMMutationEvent _mutationEventImpl]): Added. (-[DOMMutationEvent relatedNode]): Implemented. (-[DOMMutationEvent prevValue]): Implemented. (-[DOMMutationEvent newValue]): Implemented. (-[DOMMutationEvent attrName]): Implemented. (-[DOMMutationEvent attrChange]): Implemented. (-[DOMMutationEvent initMutationEvent::::::::]): (-[DOMUIEvent _UIEventImpl]): Added. (-[DOMUIEvent view]): Implemented. (-[DOMUIEvent detail]): Implemented. (-[DOMUIEvent initUIEvent:::::]): Implemented. (-[DOMDocument createEvent:]): Implemented. * kwq/DOMHTMLInternal.h: Added. * kwq/DOMHTML.mm: (+[DOMHTMLOptionsCollection _optionsCollectionWithImpl:]): Added. (-[DOMHTMLOptionsCollection length]): Implemented. (-[DOMHTMLOptionsCollection setLength:]): Implemented. (-[DOMHTMLOptionsCollection item:]): Implemented. (-[DOMHTMLOptionsCollection namedItem:]): Implemented. (-[DOMHTMLSelectElement options]): Implemented. * kwq/DOMViews.h: Changed DOMDocumentView to be a category on DOMDocument rather than a separate class. * kwq/DOMViewsInternal.h: Added. * kwq/DOMViews.mm: Added. (-[DOMAbstractView document]): Implemnted. (-[DOMAbstractView _abstractViewImpl]): Added. (-[DOMAbstractView _initWithAbstractViewImpl:]): Added. (+[DOMAbstractView _abstractViewWithImpl:]): Added. (-[DOMDocument defaultView]): Implemented. * khtml/dom/dom2_views.h: Made AbstractView constructor public to allow creation in the bindings. Would not be necessary if the impl classes were used consistently. * khtml/html/html_formimpl.h: Added options() function to HTMLSelectElementImpl. Added HTMLOptionsCollectionImpl class. * khtml/html/html_formimpl.cpp: (HTMLSelectElementImpl::~HTMLSelectElementImpl): Added code to detach and deref the options collection. (HTMLSelectElementImpl::options): Create an options collection if needed. (HTMLOptionsCollectionImpl::length): Added. Not yet implemented. (HTMLOptionsCollectionImpl::setLength): Ditto. (HTMLOptionsCollectionImpl::item): Ditto. (HTMLOptionsCollectionImpl::namedItem): Ditto. * khtml/khtmlview.h: Move unused focusNextPrevChild virtual function inside !APPLE_CHANGES. * khtml/khtmlview.cpp: Put the tp, paintBuffer, and formCompletions fields entirely inside !APPLE_CHANGES. Also made QT_NO_TOOLTIP entirely disable the tooltip field. Also put focusNextPrevChild and formCompletionItems functions inside !APPLE_CHANGES. * khtml/rendering/render_text.h: Removed unused isFixedWidthFont member function. * khtml/rendering/render_text.cpp: Ditto. * kwq/KWQCursor.h: Removed unused pos member function. * kwq/KWQCursor.mm: Ditto. * kwq/KWQFontMetrics.h: Removed unused rightBearing and leftBearing member functions. * kwq/KWQFontMetrics.mm: Ditto. * kwq/KWQKComboBox.h: Removed KCompletionBase as a base class. * kwq/KWQKConfigBase.h: Removed unused readBoolEntry, writeEntry, and readListEntry member functions. * kwq/KWQKConfigBase.mm: Ditto. (KConfig::readEntry): Improved "not implemented" message to indicate which key is uinimplemented. (KConfig::readNumEntry): Ditto. (KConfig::readUnsignedNumEntry): Ditto. * kwq/KWQKLineEdit.h: Removed everything, since all the KLineEdit stuff was unused. Changed KLineEdit to just be a typedef for QLineEdit. * kwq/KWQSlot.mm: Removed slotAutoScroll. (KWQSlot::KWQSlot): And from here. (KWQSlot::call): And from here. * kwq/KWQTextStream.h: Removed unused QTextOStream and QTextIStream. * kwq/KWQTextStream.mm: Removed unused QTextIStream function. Also made buffer sizes larger so we don't have any problems on 64-bit systems. 10 bytes might not be long enough to sprintf an integer or a long or a pointer, but 100 bytes surely will. * kwq/KWQWidget.h: Removed unused focusNextPrevChild. * kwq/KWQWidget.mm: Ditto. * WebCore.pbproj/project.pbxproj: Removed some files, added others. * ForwardingHeaders/kcompletionbox.h: Emptied out, no KWQKCompletionBox.h any more. * ForwardingHeaders/kiconloader.h: Emptied out, no KWQKIconLoader.h any more. * ForwardingHeaders/kmimetype.h: Emptied out, no KWQKMimeType.h any more. * ForwardingHeaders/ksimpleconfig.h: Emptied out, no KWQKSimpleConfig.h any more. * ForwardingHeaders/qfontinfo.h: Emptied out, no KWQFontInfo.h any more. * ForwardingHeaders/qtooltip.h: Replaced with define of QT_NO_TOOLTIP, no KWQToolTip.h any more. * kwq/KWQCompletion.h: Removed. * kwq/KWQCompletion.mm: Removed. * kwq/KWQFontInfo.h: Removed. * kwq/KWQFontInfo.mm: Removed. * kwq/KWQKCompletionBox.h: Removed. * kwq/KWQKIconLoader.h: Removed. * kwq/KWQKIconLoader.mm: Removed. * kwq/KWQKMimeType.h: Removed. * kwq/KWQKMimeType.mm: Removed. * kwq/KWQKSimpleConfig.h: Removed. * kwq/KWQKSimpleConfig.mm: Removed. * kwq/KWQToolTip.h: Removed. 2004-05-21 Darin Adler Reviewed by Maciej. - fixed : (result of toString mistakenly includes all subsequent sibling content) * khtml/xml/dom2_rangeimpl.h: Added private startNode() and pastEndNode() functions. * khtml/xml/dom2_rangeimpl.cpp: (DOM::RangeImpl::toString): Rewrote to use startNode(), pastEndNode(), and traverseNextNode(). The old code here was wrong, and it was easier to rewrite than fix. (DOM::RangeImpl::checkDeleteExtract): Extracted the logic to compute the start node and the past-end node into separate functions. (DOM::RangeImpl::startNode): Added. Started with code extracted from checkDeleteExtract, but then also fixed bugs by using the new traverseNextSibling. The old code handled cases where the offset was past the last child in a container incorrectly. (DOM::RangeImpl::pastEndNode): Added. Started with code extracted from checkDeleteExtract, but then also fixed bugs by using the new traverseNextSibling. The old code hanlded cases where the offset was past the last child in a container incorrectly, and also iterated one node too few in cases where the end contaier was a text node. * khtml/xml/dom2_traversalimpl.h: Removed a bunch of unused and unneeded member functions. * khtml/xml/dom_nodeimpl.h: Added traverseNextSibling. * khtml/xml/dom_nodeimpl.cpp: (NodeImpl::traverseNextNode): Reformatted the code a little bit. (NodeImpl::traverseNextSibling): Added. Like traverseNextNode except it starts after the node's children instead of starting at the beginning of the first child. 2004-05-21 Maciej Stachowiak Reviewed by Trey. : Implement outerText and setOuterText DOM extensions * khtml/html/html_elementimpl.cpp: (HTMLElementImpl::outerText): Return same value as innerText(). (HTMLElementImpl::setInnerText): Fix comment. (HTMLElementImpl::setOuterText): Replace node with text, merge neighboring text nodes. * khtml/html/html_elementimpl.h: Prototype new methods. * khtml/dom/html_element.cpp: (HTMLElement::outerText): Hook up to impl. (HTMLElement::setOuterText): Ditto. * khtml/dom/html_element.h: Prototype new methods. * khtml/ecma/kjs_html.cpp: (KJS::HTMLElement::getValueProperty): Glue up outerText. (KJS::HTMLElement::putValue): Ditto. * khtml/ecma/kjs_html.h: Added new enum value. * khtml/ecma/kjs_html.lut.h: (KJS::): Regenerated. 2004-05-21 Richard Williamson Removed _bindObject:forFrame: SPI. Reviewed by Chris. * kwq/KWQKHTMLPart.h: * kwq/KWQKHTMLPart.mm: * kwq/WebCoreBridge.h: * kwq/WebCoreBridge.mm: 2004-05-21 David Hyatt Fix for 3663644, repaints don't occur when the .innerHTML of a positioned element is changed. Reviewed by john * khtml/rendering/bidi.cpp: (khtml::RenderBlock::layoutInlineChildren): * khtml/rendering/render_layer.h: (khtml::RenderLayer::repaintRect): === Safari-141 === 2004-05-21 Darin Adler Reviewed by Ken and Chris. - fixed : (markup strings that contain and elements don't work, producing nothing) * khtml/html/html_elementimpl.cpp: (HTMLElementImpl::createContextualFragment): Changed things around so that nodes are removed from their parent node before 2004-05-21 Darin Adler Reviewed by Ken and Chris. - fixed part of : (HTML Editing: -[WebView replaceSelectionWithMarkupString:] doesn't seem to work) * khtml/editing/htmlediting_impl.cpp: (khtml::PasteMarkupCommandImpl::doApply): Changed code to handle case where contextual fragment parses to nothing without crashing. 2004-05-21 Darin Adler Reviewed by Ken. * kwq/DOM-CSS.mm: Change DOMCSSStyleDeclaration methods to use strings with dash-separators in them rather than interCaps. 2004-05-21 Darin Adler Reviewed by Maciej. - fixed : (scroll to top of page when anchor is "#top" or "#") * khtml/khtml_part.cpp: (KHTMLPart::gotoAnchor): Detect anchor by checking for non-null, not non-empty, because an empty anchor is not the same as no anchor. (KHTMLPart::gotoAnchor): Add special case for anchors named "" and "top" (case insensitive), to scroll to the top left of the frame to match what WinIE and Mozilla do. (KHTMLPart::checkCompleted): Check for non-null here too for consistency. * kwq/KWQKURL.mm: (KURL::ref): Change check so that we return empty, not null, if there's an empty ref, as opposed to no ref. (KURL::hasRef): Return true if there's an empty ref, as opposed to no ref. (KURL::parse): Preserve an empty fragment when parsing. 2004-05-20 Darin Adler Reviewed by Maciej. - fixed : (multiple radio buttons checked when arriving at sites (poll at www.1170kfaq.com, many others)) * khtml/html/html_formimpl.cpp: (HTMLInputElementImpl::parseHTMLAttribute): Use setChecked to set the default value if we are still in "use default checked" mode. That way, other radio buttons will be unchecked properly and the proper changed methods will be dispatched. (HTMLInputElementImpl::reset): Ditto. * khtml/html/html_formimpl.h: (DOM::HTMLInputElementImpl::checked): Changed to just return m_checked. The m_useDefaultChecked flag is now only really looked at when you parse a checked attribute; that's because m_checked and m_defaultChecked are kept equal as long as m_useDefaultChecked is true. * khtml/xml/dom_nodeimpl.h: Removed an unnecessary virtual, to make code a little smaller and faster. 2004-05-20 Darin Adler Reviewed by Chris. - fixed : (REGRESSION: drag slide-back sometimes causes link to load) - fixed : (REGRESSION: letting up mouse while dragging over link activates the link) * khtml/khtmlview.h: Added invalidateClick. * khtml/khtmlview.cpp: (KHTMLView::invalidateClick): Added. Sets clickCount to 0. * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::matchLabelsAgainstElement): Changed a string replace to a character replace for slightly faster code and smaller code size. (KWQKHTMLPart::khtmlMouseMoveEvent): Call invalidateClick at the appropriate times. To do this correctly, had to add a boolean result to handleMouseDragged: so I can tell if a drag started or not (due to hysteresis). (KWQKHTMLPart::attributedString): Changed a string append to a character append for slightly faster code and smaller code size. * kwq/WebCoreBridge.h: Added BOOL result to handleMouseDragged:. Reviewed by Dave. - handle rules with empty bodies properly * khtml/css/parser.y: Remove bogus check for empty body that prevents the rule from being created. * khtml/css/parser.cpp: Regenerated. 2004-05-20 David Hyatt Revise the patch for incorrect caret positions when brs get deleted. It can be even simpler. Reviewed by kocienda * khtml/rendering/render_flow.cpp: (RenderFlow::dirtyLinesFromChangedChild): * khtml/rendering/render_text.cpp: (RenderText::detach): 2004-05-20 David Hyatt Fix for 3629816, caret in wrong position when deleting
s on lines by themselves or when moving
s on lines by themselves. Reviewed by kocienda * khtml/rendering/render_box.cpp: (RenderBox::detach): * khtml/rendering/render_br.cpp: (RenderBR::setPos): * khtml/rendering/render_br.h: * khtml/rendering/render_flow.cpp: (RenderFlow::dirtyLinesFromChangedChild): 2004-05-20 Ken Kocienda Reviewed by Hyatt Provide the methods to glue the WebView's editing delegate so that these methods work: : "Editing: -webViewShouldBeginEditing:inDOMRange: method unimplemented (WebKit editing API)" : "Editing: -webViewShouldEndEditing:inDOMRange: method unimplemented (WebKit editing API)" While I was in the neighborhood and working on understanding focus shifts, I fixed this bug as well: : "contentEditable div receives focus and blur twice when focus changes to new element" * khtml/khtml_part.cpp: (KHTMLPart::invalidateSelection): Do not move focus in this function. That is just a mistake. This function is all about redraw. (KHTMLPart::selectionLayoutChanged): New function. Factor out the redraw parts of notifySelectionChanged so that invalidateSelection can call it. (KHTMLPart::notifySelectionChanged): Call selectionLayoutChanged now that the redraw parts have been factored out. (KHTMLPart::shouldBeginEditing): New function that calls through to the KWQKHTMLPart in an APPLE_CHANGES block. This is part of the code path that will eventually The WebView's delegate to ask the shouldBeginEditing question. (KHTMLPart::shouldEndEditing): Ditto, except the question is about shouldEndEditing. * khtml/khtml_part.h: * khtml/khtmlview.cpp: (KHTMLView::dispatchMouseEvent): Now looks at the boolean value returned from DocumentImpl::setFocusNode (described below). If the focus shift was blocked, swallow the mouse event. * khtml/xml/dom_docimpl.cpp: (DocumentImpl::relinquishesEditingFocus): Part of the WebView's delegation call chain described above. (DocumentImpl::acceptsEditingFocus): Ditto. (DocumentImpl::setFocusNode): Many improvements. Now handles WebView delegation and switching focus in the handlers called as a result of the DOM events that this function calls. Also now returns a boolean to say whether the attempt to set focus was blocked by a handler or by the WebView's delegate. * khtml/xml/dom_docimpl.h: * kwq/KWQKHTMLPart.h: * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::shouldBeginEditing): More WebView's delegation glue. (KWQKHTMLPart::shouldEndEditing): Ditto. * kwq/WebCoreBridge.h: 2004-05-20 Richard Williamson Reviewed by NOBODY (OOPS!). * kwq/DOM.mm: (-[DOMObject _init]): * kwq/DOMInternal.mm: (-[WebScriptObject _init]): (-[WebScriptObject _initializeScriptDOMNodeImp]): * kwq/KWQKHTMLPart.h: * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::KWQKHTMLPart): (KWQKHTMLPart::bindingRootObject): (KWQKHTMLPart::windowScriptObject): 2004-05-20 Darin Adler Reviewed by Ken. - fixed : "repro nil-deref in RenderImage::paint (www.codepoetry.net)" * khtml/rendering/render_image.cpp: (RenderImage::paint): Check renderer pointer to see if it's nil before dereferencing it. - fixed : "readFromData:options:documentAttributes: crashes when passed page without a body (in WebKit mode)" * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::bodyBackgroundColor): Check renderer pointer to see if it's nil before dereferencing it. - fixed : "implement addRule for JavaScript for style sheets" * khtml/dom/css_stylesheet.h: Added addRule. * khtml/dom/css_stylesheet.cpp: (CSSStyleSheet::addRule): Added. * khtml/css/css_stylesheetimpl.h: Added addRule. * khtml/css/css_stylesheetimpl.cpp: (CSSStyleSheetImpl::addRule): Added an implementation based on the Microsoft documentation. An index of -1 means "at the end of the list". * khtml/dom/dom_string.h: Changed the string-append operator to be a non-member function so it works even if the left side has to undergo type conversion. * khtml/dom/dom_string.cpp: (DOM::operator+): Changed implementation to match above. Also changed to not use anything private or protected so it doesn't have to be a friend. * khtml/ecma/kjs_css.h: Added addRule to the list of functions for CSS style sheets. * khtml/ecma/kjs_css.cpp: (DOMCSSStyleSheetProtoFunc::tryCall): Add support for addRule, based on the Microsoft documentation; always returns -1. Also removed unused string conversions. * khtml/ecma/kjs_css.lut.h: Regenerated. 2004-05-19 David Hyatt Implement support for notification posting to accessibility clients for layouts and loads. * khtml/khtmlview.cpp: (KHTMLView::layout): * khtml/xml/dom_docimpl.cpp: (DocumentImpl::close): * kwq/KWQAccObjectCache.h: (KWQAccObjectCache::enableAccessibility): (KWQAccObjectCache::accessibilityEnabled): * kwq/KWQAccObjectCache.mm: (KWQAccObjectCache::accObject): (KWQAccObjectCache::setAccObject): (KWQAccObjectCache::removeAccObject): (KWQAccObjectCache::detach): (KWQAccObjectCache::childrenChanged): (KWQAccObjectCache::postNotification): * kwq/WebCoreBridge.mm: (-[WebCoreBridge accessibilityTree]): 2004-05-19 Chris Blumenberg Tweaks for forthcoming dragging improvements. Reviewed by john. * kwq/WebCoreBridge.h: * kwq/WebCoreBridge.mm: (-[WebCoreBridge moveDragCaretToPoint:]): renamed for future reasons, removed text only restrictions 2004-05-19 Ken Kocienda Reviewed by Hyatt and Darin Fix for this bug: : "can't tab out of contentEditable Elements" * khtml/xml/dom_elementimpl.cpp: Now checks if key event was intercepted by the editing key-handler before setting the event as defaultHandled. (ElementImpl::defaultEventHandler): * kwq/KWQKHTMLPart.h: Name change from editingKeyEvent. Also now returns a BOOL to report whether the event was handled or not. * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::interceptEditingKeyEvent): Ditto. * kwq/WebCoreBridge.h: Renamed from _editingKeyDown. 2004-05-19 Ken Kocienda Reviewed by John Fix for this bug: : "deleting characters is much slower than inserting them" Cleaned up the way selections are set in edit commands, and how KHTMLPart is notified of these changes. This clears up a number of inefficiencies, including unnecessary repaints which were causing the performace problem. * khtml/editing/htmlediting.cpp: Removed moveToStartingSelection and moveToEndingSelection functions. This work is going to be done using another pre-existing communication facility shared by edit commands and the part. * khtml/editing/htmlediting.h: Ditto. * khtml/editing/htmlediting_impl.cpp: (khtml::EditCommandImpl::setStartingSelection): Fix coding mistake which caused double recursion while setting ancestor values. (khtml::EditCommandImpl::setEndingSelection): Ditto. (khtml::CompositeEditCommandImpl::doUnapply): No longer calls moveToStartingSelection. Work done in the part now. (khtml::CompositeEditCommandImpl::doReapply): No longer calls moveToEndingSelection. Work done in the part now. (khtml::TypingCommandImpl::typingAddedToOpenCommand): New function. Provides a hook for typing commands to tell the part about additional typing that has been done. (khtml::TypingCommandImpl::insertText): Now calls typingAddedToOpenCommand. (khtml::TypingCommandImpl::insertNewline): Ditto. (khtml::TypingCommandImpl::issueCommandForDeleteKey): Ditto. (khtml::TypingCommandImpl::deleteKeyPressed): Ditto. * khtml/editing/htmlediting_impl.h: Removed moveToStartingSelection and moveToEndingSelection functions. * khtml/khtml_part.cpp: (KHTMLPart::setSelection): Modified to take an argument which tells whether the set closes an active typing command. (KHTMLPart::notifySelectionChanged): Changed endTyping variable to be consistent with "close typing" terminology used elsewhere. (KHTMLPart::appliedEditing): Now sets the selection using the value of the passed-in command. Added an assert for typing cases. Fixed problem where didChangeNotification was not being posted for typing changes after the first one. (KHTMLPart::unappliedEditing): Now sets the selection using the value of the passed-in command. (KHTMLPart::reappliedEditing): Now sets the selection using the value of the passed-in command. * khtml/khtml_part.h: * khtml/rendering/render_canvas.cpp: (RenderCanvas::clearSelection): Do not call repaint when the selection is a caret. 2004-05-19 Ken Kocienda Reviewed by Hyatt * khtml/html/html_elementimpl.cpp: (HTMLElementImpl::isContentEditable): Ask if the part is contenteditable. True value is treated as an "override" and will short-circuit, returning true. * khtml/khtml_part.cpp: (KHTMLPart::isContentEditable): Call over bridge. Has the effect of checking the isEditable method on the WebView which contains this part. * khtml/khtml_part.h: Declare isContentEditable. * kwq/KWQKHTMLPart.h: Declare isContentEditable. * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::isContentEditable): Call over bridge, as described above. * kwq/WebCoreBridge.h: Declare isEditable. 2004-05-19 Darin Adler - fixed headers with licenses mangled by Xcode auto-indenting * kwq/DOMExtensions.h: * kwq/KWQAccObject.h: * kwq/KWQAccObject.mm: * kwq/KWQAccObjectCache.h: * kwq/KWQKSSLKeyGen.mm: * kwq/KWQScrollBar.mm: * kwq/KWQSlider.mm: * kwq/WebCoreGraphicsBridge.h: * kwq/WebCoreGraphicsBridge.m: * kwq/WebCoreKeyGenerator.h: * kwq/WebCoreKeyGenerator.m: 2004-05-18 David Hyatt Add two new attributes for accessibility that can be polled by the screen reader. AXLayoutCount indicates the number of layouts that have occurred, and AXLoaded indicates whether or not a page has finished loading. * khtml/khtmlview.cpp: (KHTMLViewPrivate::reset): (KHTMLView::layoutCount): (KHTMLView::layout): * khtml/khtmlview.h: * kwq/KWQAccObject.mm: (-[KWQAccObject roleDescription]): (-[KWQAccObject accessibilityAttributeNames]): (-[KWQAccObject accessibilityAttributeValue:]): 2004-05-18 David Hyatt Fix crash when retrieving the AXHelp text. * kwq/KWQAccObject.mm: (-[KWQAccObject helpText]): 2004-05-18 David Hyatt Improve layout scheduling and add instrumentation for debugging layout scheduling Reviewed by kocienda * khtml/khtml_part.cpp: (KHTMLPart::slotFinishedParsing): (KHTMLPart::checkCompleted): * khtml/khtmlview.cpp: (KHTMLViewPrivate::KHTMLViewPrivate): (KHTMLViewPrivate::reset): (KHTMLView::layout): (KHTMLView::scheduleRelayout): (KHTMLView::haveDelayedLayoutScheduled): (KHTMLView::unscheduleRelayout): * khtml/khtmlview.h: * khtml/rendering/render_object.cpp: (RenderObject::repaintAfterLayoutIfNeeded): * khtml/rendering/render_replaced.cpp: (RenderWidget::updateWidgetPositions): * khtml/xml/dom_docimpl.cpp: (DocumentImpl::DocumentImpl): (DocumentImpl::close): (DocumentImpl::setParsing): (DocumentImpl::shouldScheduleLayout): (DocumentImpl::minimumLayoutDelay): (DocumentImpl::elapsedTime): (DocumentImpl::finishParsing): (DocumentImpl::updateStyleSelector): * khtml/xml/dom_docimpl.h: (DOM::DocumentImpl::allDataReceived): * kwq/KWQDateTime.h: * kwq/KWQDateTime.mm: (QTime::elapsed): * kwq/KWQWidget.mm: (QWidget::setFrameGeometry): 2004-05-18 Richard Williamson Finished implementing support for windowScriptObject. Reviewed by Maciej. * khtml/khtml_part.cpp: (KHTMLPart::begin): * kwq/KWQKHTMLPart.h: * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::KWQKHTMLPart): (KWQKHTMLPart::~KWQKHTMLPart): (KWQKHTMLPart::windowScriptObject): * kwq/WebCoreBridge.mm: (updateRenderingForBindings): 2004-05-18 Richard Williamson Added stubs to get the WebScriptObject for the window JS object. Made updateRenderingForBindings more robust when handed a nil root object. This was causing a crash in DB. Still need to address root cause of nil root object. Reviewed by Maciej. * khtml/khtml_part.cpp: (KHTMLPart::begin): * kwq/KWQKHTMLPart.h: * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::windowScriptObject): (KWQKHTMLPart::partClearedInBegin): * kwq/WebCoreBridge.h: * kwq/WebCoreBridge.mm: (updateRenderingForBindings): (-[WebCoreBridge init]): (-[WebCoreBridge stringByEvaluatingJavaScriptFromString:]): (-[WebCoreBridge windowScriptObject]): 2004-05-17 Maciej Stachowiak Reviewed by Ken. : Implement outerHTML and setOuterHTML DOM extensions They were already implemented (by Chris), all that was required was exporting them to JavaScript. * khtml/dom/html_element.cpp: (HTMLElement::outerHTML): Call impl. (HTMLElement::setOuterHTML): Ditto. * khtml/dom/html_element.h: Prototype new methods. * khtml/ecma/kjs_html.cpp: (KJS::HTMLElement::getValueProperty): Add OuterHTML. (KJS::HTMLElement::putValue): Add OuterHTML. * khtml/ecma/kjs_html.h: Add new enum values. * khtml/ecma/kjs_html.lut.h: Regenerated. 2004-05-18 Ken Kocienda Reviewed by Hyatt Removed support for designMode attribute, which we will not be supporting for Tiger. Removed inEditMode from KHTMLPart. This cached designMode value. Removed KHTMLPart::isEditingAtNode function. Asking a node if it is content-editable is a suitable replacement. * khtml/dom/dom_misc.h: Remove TristateFlag enum that was used to track designMode values. * khtml/dom/html_document.cpp: Remove designMode and setDesignMode. * khtml/dom/html_document.h: Ditto. * khtml/ecma/kjs_html.cpp: (KJS::HTMLDocument::tryGet): Remove designMode. (KJS::HTMLDocument::putValue): Ditto. * khtml/ecma/kjs_html.lut.h: (KJS::): Ditto. * khtml/html/html_documentimpl.cpp: Remove designMode and setDesignMode. * khtml/html/html_documentimpl.h: Ditto. * khtml/khtml_part.cpp: Remove setEditMode, editMode, inEditMode, and isEditingAtNode. * khtml/khtml_part.h: Ditto. * khtml/khtmlpart_p.h: Remove m_inEditMode variable. (KHTMLPartPrivate::KHTMLPartPrivate): * khtml/khtmlview.cpp: (KHTMLView::focusNextPrevNode): Change over one use in tree of isEditingAtNode to use isContentEditable instead. isContentEditable will be modified in future patch to handle whether the per-part switch has been thrown to override whether something is editable or not. 2004-05-17 Richard Williamson Implemented new API for WebScriptObject. Fixed : (objc to javascript method calls do not cause updates.) Reviewed by Hyatt. * kwq/WebCoreBridge.mm: (updateRenderingForBindings): (-[WebCoreBridge init]): 2004-05-14 Vicki Murley Reviewed by mjs. : framework marketing number should be 2.0 for DoubleBarrel release * WebCore.pbproj/project.pbxproj: change CFBundleShortVersionString to 2.0 2004-05-14 Darin Adler Reviewed by Darin, coded by Maciej. - fixed extra repaints when doing auto-fill checks on all pages that have pop-up buttons * kwq/KWQComboBox.mm: (QComboBox::populateMenu): Set the populating-menu flag and clear it when done. (-[KWQPopUpButton setPopulatingMenu:]): Added. Sets flag. (-[KWQPopUpButton setNeedsDisplayInRect:]): Do nothing if the flag is set. 2004-05-14 Darin Adler Reviewed by Dave. - fixed : "background property doesn't work right on webdevtips.com due to background:inherit" * khtml/css/cssstyleselector.cpp: (khtml::CSSStyleSelector::applyDeclarations): Added CSS_PROP_BACKGROUND to the list of properties that must be applied in the first pass. === Safari-140 === 2004-05-13 David Hyatt Fix image loading for and . Make sure it works dynamically and make sure the renderer is properly null-checked at attach time. Reviewed by darin * khtml/html/html_formimpl.cpp: (HTMLInputElementImpl::HTMLInputElementImpl): (HTMLInputElementImpl::~HTMLInputElementImpl): (HTMLInputElementImpl::parseHTMLAttribute): (HTMLInputElementImpl::attach): * khtml/html/html_formimpl.h: * khtml/html/html_objectimpl.cpp: (HTMLObjectElementImpl::HTMLObjectElementImpl): (HTMLObjectElementImpl::~HTMLObjectElementImpl): (HTMLObjectElementImpl::parseHTMLAttribute): (HTMLObjectElementImpl::attach): * khtml/html/html_objectimpl.h: 2004-05-14 Chris Blumenberg - Made DOMEventTarget a formal protocol that is implemented by DOMNode - Made DOMEventListener a formal protocol that any object can implement Reviewed by kocienda. * kwq/DOMCore.h: * kwq/DOMEvents.h: 2004-05-13 Richard Williamson Removed vestigial isSelected method. Reviewed by Chris. * kwq/KWQWidget.h: * kwq/KWQWidget.mm: (QWidget::setIsSelected): * kwq/WebCoreBridge.h: 2004-05-13 Chris Blumenberg Fixed: : (API: Make DOM extensions and WebKit DOM operations public) Reviewed by rjw. * kwq/DOM.h: added DOMExtensions.h * kwq/DOMHTML.h: renamed frame on DOMHTMLTableElement to frameBorders to avoid NSView conflicts * kwq/DOMHTML.mm: (-[DOMHTMLTableElement frameBorders]): (-[DOMHTMLTableElement setFrameBorders:]): 2004-05-13 Richard Williamson Changed imports of all DOM headers. DOM headers should be imported using the normal #import , they import is modified when copied to WebKit. Reviewed by Chris. * ChangeLog: * kwq/DOM.h: * kwq/DOMCSS.h: * kwq/DOMCore.h: * kwq/DOMEvents.h: * kwq/DOMExtensions.h: * kwq/DOMHTML.h: * kwq/DOMInternal.h: * kwq/DOMRange.h: * kwq/DOMStylesheets.h: * kwq/DOMTraversal.h: * kwq/DOMViews.h: 2004-05-13 Ken Kocienda Reviewed by me * khtml/editing/htmlediting_impl.cpp: (khtml::ApplyStyleCommandImpl::applyStyleIfNeeded): Fix deployment build bustage. Uninitialized variable. 2004-05-13 Ken Kocienda Reviewed by Hyatt Implemented first cut at text style change code. * khtml/editing/htmlediting.cpp: (khtml::ApplyStyleCommand::ApplyStyleCommand): (khtml::ApplyStyleCommand::~ApplyStyleCommand): (khtml::ApplyStyleCommand::impl): (khtml::RemoveCSSPropertyCommand::RemoveCSSPropertyCommand): (khtml::RemoveCSSPropertyCommand::~RemoveCSSPropertyCommand): (khtml::RemoveCSSPropertyCommand::impl): (khtml::RemoveCSSPropertyCommand::styleDeclaration): (khtml::RemoveCSSPropertyCommand::property): (khtml::RemoveNodeAttributeCommand::RemoveNodeAttributeCommand): (khtml::RemoveNodeAttributeCommand::~RemoveNodeAttributeCommand): (khtml::RemoveNodeAttributeCommand::impl): (khtml::RemoveNodeAttributeCommand::element): (khtml::RemoveNodeAttributeCommand::attribute): (khtml::RemoveNodePreservingChildrenCommand::RemoveNodePreservingChildrenCommand): (khtml::RemoveNodePreservingChildrenCommand::~RemoveNodePreservingChildrenCommand): (khtml::RemoveNodePreservingChildrenCommand::impl): (khtml::RemoveNodePreservingChildrenCommand::node): (khtml::SetNodeAttributeCommand::SetNodeAttributeCommand): (khtml::SetNodeAttributeCommand::~SetNodeAttributeCommand): (khtml::SetNodeAttributeCommand::impl): (khtml::SetNodeAttributeCommand::element): (khtml::SetNodeAttributeCommand::attribute): (khtml::SetNodeAttributeCommand::value): * khtml/editing/htmlediting.h: (khtml::): (khtml::ApplyStyleCommand::): Removed a bunch of unnecessary DOM namespace qualifiers. Fixed calls to parent(), which relied on the TreeShared interface to get a parent, and changed to the parentNode() DOM Node call, which is more suitable given the intention. * khtml/editing/htmlediting_impl.cpp: (khtml::CompositeEditCommandImpl::insertNodeBefore): (khtml::CompositeEditCommandImpl::insertNodeAfter): (khtml::CompositeEditCommandImpl::appendNode): (khtml::CompositeEditCommandImpl::removeNode): (khtml::CompositeEditCommandImpl::removeNodeAndPrune): (khtml::CompositeEditCommandImpl::removeNodePreservingChildren): (khtml::CompositeEditCommandImpl::splitTextNode): (khtml::CompositeEditCommandImpl::joinTextNodes): (khtml::CompositeEditCommandImpl::insertText): (khtml::CompositeEditCommandImpl::deleteText): (khtml::CompositeEditCommandImpl::replaceText): (khtml::CompositeEditCommandImpl::removeCSSProperty): (khtml::CompositeEditCommandImpl::removeNodeAttribute): (khtml::CompositeEditCommandImpl::setNodeAttribute): Text style change command implementations. There are a couple more parent() -> parentNode() changes in here as well. (khtml::ApplyStyleCommandImpl::ApplyStyleCommandImpl): (khtml::ApplyStyleCommandImpl::~ApplyStyleCommandImpl): (khtml::ApplyStyleCommandImpl::commandID): (khtml::ApplyStyleCommandImpl::doApply): (khtml::ApplyStyleCommandImpl::isHTMLStyleNode): (khtml::ApplyStyleCommandImpl::removeHTMLStyleNode): (khtml::ApplyStyleCommandImpl::removeCSSStyle): (khtml::ApplyStyleCommandImpl::removeCSSProperty): (khtml::ApplyStyleCommandImpl::setNodeAttribute): (khtml::ApplyStyleCommandImpl::removeNodeAttribute): (khtml::ApplyStyleCommandImpl::removeNodePreservingChildren): (khtml::ApplyStyleCommandImpl::mustExlicitlyApplyStyle): (khtml::ApplyStyleCommandImpl::createExplicitApplyStyleNode): (khtml::ApplyStyleCommandImpl::currentlyHasStyle): (khtml::ApplyStyleCommandImpl::cssProperty): (khtml::ApplyStyleCommandImpl::matchesTargetStyle): (khtml::ApplyStyleCommandImpl::positionInsertionPoint): (khtml::ApplyStyleCommandImpl::splitTextAtStartIfNeeded): (khtml::ApplyStyleCommandImpl::splitTextAtEndIfNeeded): (khtml::ApplyStyleCommandImpl::applyStyleIfNeeded): (khtml::ApplyStyleCommandImpl::removeStyle): (khtml::ApplyStyleCommandImpl::cloneSelection): (khtml::ApplyStyleCommandImpl::insertFragment): (khtml::ApplyStyleCommandImpl::applyInPlace): (khtml::ApplyStyleCommandImpl::applyUsingFragment): (khtml::DeleteSelectionCommandImpl::DeleteSelectionCommandImpl): (khtml::InsertNodeBeforeCommandImpl::doApply): (khtml::InsertNodeBeforeCommandImpl::doUnapply): (khtml::JoinTextNodesCommandImpl::doApply): (khtml::PasteMarkupCommandImpl::PasteMarkupCommandImpl): (khtml::RemoveCSSPropertyCommandImpl::RemoveCSSPropertyCommandImpl): (khtml::RemoveCSSPropertyCommandImpl::~RemoveCSSPropertyCommandImpl): (khtml::RemoveCSSPropertyCommandImpl::commandID): (khtml::RemoveCSSPropertyCommandImpl::doApply): (khtml::RemoveCSSPropertyCommandImpl::doUnapply): (khtml::RemoveNodeAttributeCommandImpl::RemoveNodeAttributeCommandImpl): (khtml::RemoveNodeAttributeCommandImpl::~RemoveNodeAttributeCommandImpl): (khtml::RemoveNodeAttributeCommandImpl::commandID): (khtml::RemoveNodeAttributeCommandImpl::doApply): (khtml::RemoveNodeAttributeCommandImpl::doUnapply): (khtml::RemoveNodePreservingChildrenCommandImpl::RemoveNodePreservingChildrenCommandImpl): (khtml::RemoveNodePreservingChildrenCommandImpl::~RemoveNodePreservingChildrenCommandImpl): (khtml::RemoveNodePreservingChildrenCommandImpl::commandID): (khtml::RemoveNodePreservingChildrenCommandImpl::doApply): (khtml::SetNodeAttributeCommandImpl::SetNodeAttributeCommandImpl): (khtml::SetNodeAttributeCommandImpl::~SetNodeAttributeCommandImpl): (khtml::SetNodeAttributeCommandImpl::commandID): (khtml::SetNodeAttributeCommandImpl::doApply): (khtml::SetNodeAttributeCommandImpl::doUnapply): (khtml::SplitTextNodeCommandImpl::doUnapply): (khtml::TypingCommandImpl::insertText): Text style change command implementations. * khtml/editing/htmlediting_impl.h: (khtml::ApplyStyleCommandImpl::): (khtml::ApplyStyleCommandImpl::removingStyle): (khtml::RemoveCSSPropertyCommandImpl::styleDeclaration): (khtml::RemoveCSSPropertyCommandImpl::property): (khtml::RemoveNodeAttributeCommandImpl::element): (khtml::RemoveNodeAttributeCommandImpl::attribute): (khtml::RemoveNodePreservingChildrenCommandImpl::node): (khtml::SetNodeAttributeCommandImpl::element): (khtml::SetNodeAttributeCommandImpl::attribute): (khtml::SetNodeAttributeCommandImpl::value): Fixed a bug where the TreeWalker returned the current node instead of null when an attempt was made to use the iterator to go to a non-existent location. * khtml/xml/dom2_traversalimpl.cpp: (DOM::TreeWalkerImpl::parentNode): (DOM::TreeWalkerImpl::firstChild): (DOM::TreeWalkerImpl::lastChild): (DOM::TreeWalkerImpl::previousSibling): (DOM::TreeWalkerImpl::nextSibling): (DOM::TreeWalkerImpl::previousNode): (DOM::TreeWalkerImpl::nextNode): A convenience. * khtml/xml/dom_elementimpl.cpp: (ElementImpl::hasAttributes): * khtml/xml/dom_elementimpl.h: New helpers to begin moving us to using DOM Range-compliant positions in our code. * khtml/xml/dom_position.cpp: (DOM::Position::equivalentRangeCompliantPosition): (DOM::Position::equivalentShallowPosition): (DOM::Position::inLastEditableInContainingEditableBlock): (DOM::Position::debugPosition): Debugging aid. * khtml/xml/dom_position.h: * kwq/WebCoreBridge.mm: (-[WebCoreBridge applyStyle:]): First bit of wiring up. Some hard-coded temporary code in here will need to be improved soon. 2004-05-12 David Hyatt Improve layout scheduling. Make sure no layouts can be scheduled until over a minimum delay threshold. * khtml/khtmlview.cpp: (KHTMLView::scheduleRelayout): * khtml/rendering/render_frames.cpp: (RenderPart::updateWidgetPositions): * khtml/rendering/render_text.cpp: (RenderText::paint): * khtml/xml/dom_docimpl.cpp: (DocumentImpl::DocumentImpl): (DocumentImpl::close): (DocumentImpl::setParsing): (DocumentImpl::shouldScheduleLayout): (DocumentImpl::minimumLayoutDelay): * khtml/xml/dom_docimpl.h: 2004-05-11 Chris Blumenberg Support for: : (API: provide way to get from WebFrame to DOMDocument and vice versa) Reviewed by rjw. * kwq/DOM.mm: (-[DOMDocument _ownerElement]): new * kwq/DOMInternal.h: * kwq/WebCoreBridge.h: * kwq/WebCoreBridge.mm: (-[WebCoreBridge frameElement]): new 2004-05-11 David Hyatt Fix makeChildrenNonInline so that it does not wrap floats unless an inline is actually found. Fix block minmaxwidth to add together contiguous runs of floats. Fix the content image loader to not destroy the image when removed from the document. Reviewed by darin * ChangeLog: * khtml/html/html_imageimpl.cpp: (HTMLImageLoader::~HTMLImageLoader): (HTMLImageElementImpl::detach): * khtml/html/html_imageimpl.h: (DOM::): * khtml/html/html_objectimpl.cpp: (HTMLObjectElementImpl::createRenderer): * khtml/html/html_objectimpl.h: * khtml/rendering/render_block.cpp: (khtml::getInlineRun): (khtml::RenderBlock::calcInlineMinMaxWidth): (khtml::RenderBlock::calcBlockMinMaxWidth): 2004-05-06 David Hyatt Fix makeChildrenNonInline so that it does not wrap floats unless an inline is actually found. Fix block minmaxwidth to add together contiguous runs of floats. Fix the content image loader to not destroy the image when removed from the document. Reviewed by darin * khtml/rendering/render_block.cpp: (khtml::getInlineRun): (khtml::RenderBlock::calcBlockMinMaxWidth): 2004-05-11 Vicki Murley Reviewed by Vicki (fixed by Darin). * kwq/KWQKSSLKeyGen.h: fix build failure in B&I due to case sensitivity 2004-05-09 Maciej Stachowiak Reviewed by Darin. - avoid redecoding animated images that are only used once for ~2.5% iBench speedup (WebCore part of fix) * khtml/rendering/render_image.cpp: (RenderImage::setPixmap): Maintain use count for pixmap. (RenderImage::~RenderImage): Likewise. * kwq/KWQPixmap.h: * kwq/KWQPixmap.mm: (QPixmap::increaseUseCount): Call WebCoreImageRenderer (QPixmap::decreaseUseCount): Call WebCoreImageRenderer * kwq/WebCoreImageRenderer.h: Prototype new protocol methods. 2004-05-10 David Hyatt Make sure that when finished parsing if all the right conditions are met, we just go ahead and updateRendering and layout. Reviewed by rjw * khtml/khtmlview.cpp: (KHTMLView::scheduleRelayout): 2004-05-08 Maciej Stachowiak Reviewed by Dave. - some minor performance tweaks that together give .5% or so on the HTML iBench * khtml/css/css_valueimpl.h: don't use a bitfield for id and important, unpacking the bitfield is too expensive * kwq/KWQArrayImpl.h: * kwq/KWQArrayImpl.mm: (KWQArrayImpl::at): inline this method because it's so hot * kwq/KWQString.mm: (allocateHandle): inline this function because it's so hot (initializeHandleNodes): move this in the file so above can be inlined (allocateNode): ditto 2004-05-10 David Hyatt Move image loading to content. Reviewed by kocienda * khtml/html/html_imageimpl.cpp: (m_imageComplete): (HTMLImageLoader::~HTMLImageLoader): (HTMLImageLoader::updateFromElement): (HTMLImageLoader::removedFromDocument): (HTMLImageLoader::dispatchLoadEvent): (HTMLImageLoader::notifyFinished): (HTMLImageElementImpl::HTMLImageElementImpl): (HTMLImageElementImpl::parseHTMLAttribute): (HTMLImageElementImpl::attach): (HTMLImageElementImpl::detach): (HTMLImageElementImpl::removedFromDocument): (HTMLImageElementImpl::currentImage): * khtml/html/html_imageimpl.h: (DOM::): * khtml/html/html_objectimpl.cpp: (HTMLObjectElementImpl::HTMLObjectElementImpl): (HTMLObjectElementImpl::removedFromDocument): (HTMLObjectElementImpl::attach): * khtml/html/html_objectimpl.h: * khtml/misc/loader.cpp: (CachedImage::ref): * khtml/rendering/render_image.cpp: (RenderImage::RenderImage): (RenderImage::setImage): (RenderImage::updateAltText): * khtml/rendering/render_image.h: (khtml::RenderImage::getImage): * khtml/rendering/render_object.cpp: (RenderObject::canvas): * khtml/xml/dom_docimpl.cpp: (DocumentImpl::dispatchImageLoadEventSoon): (DocumentImpl::removeImage): (DocumentImpl::dispatchImageLoadEventsNow): * khtml/xml/dom_docimpl.h: 2004-05-10 Darin Adler Reviewed by Vicki. - fixed build failure seen in B&I log (due to case sensitive file system?) * kwq/KWQLoader.h: Include "KWQCString.h" rather than "QCString.h". The latter was failing because the forwarding header is called "qcstring.h" and I guess B&I started building with a case sensitive file system. I could have changed this to "qcstring.h", but it seemed better to use the header's real name since we're inside KWQ here. 2004-05-07 Maciej Stachowiak Reviewed by Dave. - change things around so extremely hot TokenizerString::current() method doesn't have to do any work. It's cheaper to maintain the relevant state than to always compute it. * khtml/misc/stringit.h: (khtml::TokenizerString::TokenizerString): Initialize m_currentChar (khtml::TokenizerString::push): update m_currentChar (khtml::TokenizerString::advance): ditto (khtml::TokenizerString::current): return m_currentChar * khtml/misc/stringit.cpp: (khtml::TokenizerString::clear): update m_currentChar (khtml::TokenizerString::append): update m_currentChar (khtml::TokenizerString::prepend): update m_currentChar 2004-05-07 Don Melton Reviewed by Dave. Fixed minor, edge-case regression in KEYGEN RSA logic caused by Dave's "atomic string" patch back in January. * khtml/html/html_formimpl.cpp: (HTMLKeygenElementImpl::encoding): === Safari-139 === 2004-05-06 Maciej Stachowiak Reviewed by Darin. - two trivial changes for a 1% speedup, thanks to Shark * khtml/dom/dom_string.cpp: * khtml/dom/dom_string.h: (DOM::DOMString::~DOMString): inline this method because it's hot and the function call overhead was very costly. * WebCore.pbproj/project.pbxproj: Add -falign-loops=16 optimization flag, as suggested by Shark. 2004-05-06 Chris Blumenberg Added alpha to DOMRGBColor as an extension. Reviewed by dave. * kwq/DOM-CSS.mm: (-[DOMRGBColor alpha]): new * kwq/DOMExtensions.h: 2004-05-05 David Hyatt Fix whitespace rendering for brs inside pres. The bug is 3640711. Reviewed by kocienda * khtml/rendering/bidi.cpp: (khtml::RenderBlock::layoutInlineChildren): (khtml::RenderBlock::findNextLineBreak): 2004-04-25 Maciej Stachowiak Reviewed by Darin. * khtml/ecma/kjs_events.cpp: (JSLazyEventListener::parseCode): Make sure to protect the permanent "event" string object. 2004-05-05 David Hyatt Fixes for 3637924, 3643356, and 3558513, all crashes in recalcStyle. Make sure the tree is always in a sane state when removing children while changing .innerHTML. Reviewed by darin * khtml/xml/dom_nodeimpl.cpp: 2004-05-05 David Hyatt A collection of fixes. (1) Fix a regression from the style sharing landing that made visited and unvisited links accidentally share. (2) Make sure 100% height divs fill the in quirks mode, even if the body has no height specified. (3) Make sure table cell percentage heights exclude border/padding. (4) Make sure that before flexing auto height is used for the contents of the cells. Reviewed by darin * khtml/css/cssstyleselector.cpp: (khtml::CSSStyleSelector::canShareStyleWithElement): (khtml::CSSStyleSelector::locateSharedStyle): * khtml/rendering/render_box.cpp: (RenderBox::calcPercentageHeight): * khtml/rendering/render_table.cpp: (RenderTable::layout): (RenderTableSection::layoutRows): 2004-05-05 Chris Blumenberg - DOM Extensions API tweaks - Implemented outerHTML Reviewed by kocienda. * WebCore-combined.exp: * khtml/html/html_elementimpl.cpp: (HTMLElementImpl::outerHTML): new (HTMLElementImpl::setOuterHTML): mew * khtml/html/html_elementimpl.h: * kwq/DOMExtensions.h: removed background methods on table and table cell since these are unnecessary conveniences * kwq/DOMHTML.mm: (-[DOMHTMLElement outerHTML]): new (-[DOMHTMLElement setOuterHTML:]): mew 2004-05-04 David Hyatt Fix for 3641331, make sure elements don't reset text-align to center if they inherit a specified value. Also remove the styles from and . Reviewed by darin * khtml/css/cssstyleselector.cpp: (khtml::CSSStyleSelector::adjustRenderStyle): * khtml/css/html4.css: * khtml/css/quirks.css: 2004-05-04 Ken Kocienda Reviewed by Hyatt Fix for behavior which extends selection drawing to beginning and end of blocks. I added this feature a few days ago, but my checks to see if the extension should be done was naive: Is first or last item in root line box selected? Clearly this needs to be "selection is *beyond* first or last item in root line box. Done. * khtml/rendering/render_image.cpp: (RenderImage::paint): Add selectionState() == SelectionInside check. * khtml/rendering/render_text.cpp: (InlineTextBox::paintSelection): Constrain passed-in offsets to be relative to box. Use passed-in offsets to check whether selection extends beyond this box. Also, now passes in flag to tell whether the whole RenderText has selectionState() == SelectionInside (in which case you always want to extend). (RenderText::paint): Remove box offset constraining from here. Now done in above function. * khtml/rendering/render_text.h: Modify paintSelection interface to add selectionState() == SelectionInside flag. 2004-05-04 Ken Kocienda Reviewed by me Added layout tests for DOM traversal objects. * layout-tests/traversal/node-iterator-001-expected.txt: Added. * layout-tests/traversal/node-iterator-001.html: Added. * layout-tests/traversal/node-iterator-002-expected.txt: Added. * layout-tests/traversal/node-iterator-002.html: Added. * layout-tests/traversal/node-iterator-003-expected.txt: Added. * layout-tests/traversal/node-iterator-003.html: Added. * layout-tests/traversal/node-iterator-004-expected.txt: Added. * layout-tests/traversal/node-iterator-004.html: Added. * layout-tests/traversal/node-iterator-005-expected.txt: Added. * layout-tests/traversal/node-iterator-005.html: Added. * layout-tests/traversal/node-iterator-006-expected.txt: Added. * layout-tests/traversal/node-iterator-006.html: Added. * layout-tests/traversal/node-iterator-007-expected.txt: Added. * layout-tests/traversal/node-iterator-007.html: Added. * layout-tests/traversal/traversal.js: Added. * layout-tests/traversal/tree-walker-001-expected.txt: Added. * layout-tests/traversal/tree-walker-001.html: Added. * layout-tests/traversal/tree-walker-002-expected.txt: Added. * layout-tests/traversal/tree-walker-002.html: Added. * layout-tests/traversal/tree-walker-003-expected.txt: Added. * layout-tests/traversal/tree-walker-003.html: Added. * layout-tests/traversal/tree-walker-004-expected.txt: Added. * layout-tests/traversal/tree-walker-004.html: Added. 2004-05-04 Ken Kocienda Reviewed by Hyatt * khtml/xml/dom2_traversalimpl.cpp: (DOM::NodeIteratorImpl::nextNode): Change to make NodeIterators behave like the spec in that reference node is null until you iterate the first time. (DOM::NodeIteratorImpl::previousNode): Ditto. 2004-05-04 Ken Kocienda Reviewed by me * WebCore.pbproj/project.pbxproj: Backed out unintentional change. 2004-05-04 Ken Kocienda Reviewed by Hyatt Implemented DOM traversal objects, NodeIterator and TreeWalker. * WebCore-combined.exp: Regenerate * WebCore.exp: Export DOMNodeFilter protocol * khtml/dom/dom2_traversal.cpp: Completed half-done implementation pulled from KDE tree. * khtml/dom/dom2_traversal.h: Ditto. * khtml/dom/dom_doc.cpp: (DOM::Document::createNodeIterator): Ditto. (DOM::Document::createTreeWalker): Ditto. * khtml/dom/dom_doc.h: Ditto. * khtml/ecma/kjs_dom.cpp: (DOMDocumentProtoFunc::tryCall): Fix cases that create traversal objects. * khtml/ecma/kjs_traversal.cpp: (DOMNodeIterator::getValueProperty): Add referenceNode and pointerBeforeReferenceNode properties to node interator. (DOMTreeWalkerProtoFunc::tryCall): Fix typo where DOMTreeWalker::PreviousNode case called previousSibling function. (JSNodeFilterCondition::JSNodeFilterCondition): Implement JS glue class for node filter conditions. (JSNodeFilterCondition::acceptNode): Ditto. * khtml/ecma/kjs_traversal.h: (KJS::DOMNodeIterator::): Add ReferenceNode and PointerBeforeReferenceNode constants. * khtml/ecma/kjs_traversal.lut.h: (KJS::): Regenerated * khtml/xml/dom2_traversalimpl.cpp: Completed half-done implementation pulled from KDE tree. * khtml/xml/dom2_traversalimpl.h: Ditto. * khtml/xml/dom_docimpl.cpp: (DocumentImpl::createNodeIterator): Ditto. (DocumentImpl::createTreeWalker): Ditto. * khtml/xml/dom_docimpl.h: Ditto. * khtml/xml/dom_nodeimpl.cpp: (NodeImpl::checkAddChild): Patched due to change in isAncestor function. This was the one pre-existing caller. (NodeImpl::isAncestor): Changed so that it does not return true for itself: node->isAncestor(node) now returns false. * khtml/xml/dom_nodeimpl.h: Made isAncestor const. * kwq/DOM.mm: Implemented obj-c glue for traversal objects. * kwq/DOMInternal.h: Ditto. * kwq/DOMTraversal.h: Ditto. 2004-05-04 Darin Adler Reviewed by Ken. - fixed : "starting to drag a link and then releasing needs to activate the link if you are still over it" * khtml/khtmlview.cpp: (KHTMLView::viewportMouseMoveEvent): Put hysteresis check inside !APPLE_CHANGES because the Web Kit does our hysteresis checks. (KHTMLView::viewportMouseReleaseEvent): Ditto. * kwq/KWQApplication.h: Removed startDragDistance and globalStrut; unused. * kwq/KWQApplication.mm: Removed the implementations. * kwq/KWQPointArray.h: Removed manhattanLength; unused. * kwq/KWQPoint.mm: Removed the implementation. * WebCore-tests.exp: Removed manhattanLength. * WebCore-combined.exp: Regenerated. 2004-05-03 Ken Kocienda Reviewed by Hyatt Nifty hack to work around problem where BR's inserted at the end of a block do not render. Since only the *last* BR has this quirk, insert two when at the end of a block. Once done, you can't caret past the last one, so you never insert two again. * khtml/editing/htmlediting_impl.cpp: (InputNewlineCommandImpl::doApply) 2004-05-03 Darin Adler Reviewed by Ken - fixed : "should format copied tables with tabs between cells, spreadsheet-style, for pasting to Excel" - fixed : "Find doesn't match across formatting boundaries" - fixed : "REGRESSION (136-137): nil-deref in KHTMLPart::setFocusNodeIfNeeded inside triple click code after repeatedly click/drag selecting text" - fixed : "too many blank lines between paragraphs in copied text" * khtml/dom/dom2_range.h: Added == and != operators to DOMRange. * khtml/dom/dom2_range.cpp: (DOM::operator==): Added. * khtml/khtml_part.cpp: (KHTMLPart::init): Don't call findTextBegin any more; it's now not used at all in WebCore. (KHTMLPart::clear): Don't call findTextBegin any more. Also don't set up the load statistics variables. (KHTMLPart::findTextNext): Roll out APPLE_CHANGES; this function is no longer used in WebCore any more and instead the entire thing is compiled out. (KHTMLPart::text): Reimplement this by calling one of the new text operations. All the interesting parts were moved into the TextIterator class. (KHTMLPart::setFocusNodeIfNeeded): Add a check for nil; this is the fix for 364030. * khtml/khtmlpart_p.h: (KHTMLPartPrivate::KHTMLPartPrivate): Put m_findPos, m_findNode, m_overURL, m_overURLTarget, m_scrollTimer, m_loadedObjects, m_totalObjectCount, and m_jobPercent inside !APPLE_CHANGES. * khtml/xml/dom_selection.h: Replaced uses of 4-character tabs with spaces. (DOM::Selection::Selection): Added a constructor that takes a DOM range. (DOM::Selection::operator=): Overloaded operator= for DOM range and position. This is slightly more efficient than letting a second Selection object be constructed. * khtml/xml/dom_selection.cpp: Replaced uses of 4-character tabs with spaces. (DOM::Selection::Selection): Added a constructor that takes a DOM range. * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::findString): Reimplement find so it uses the new text operations function for finding. * khtml/misc/khtml_text_operations.h: * khtml/misc/khtml_text_operations.cpp: * WebCore.pbproj/project.pbxproj: Added new text iterator classes that do the heavy lifting. 2004-05-03 David Hyatt Make sure that XML processing instructions set themselves as the parent node of the stylesheets they load, so that they will get stylesheetLoaded() notifications when @imported stylesheets are contained inside the sheet. Reviewed by cblu * khtml/xml/dom_xmlimpl.cpp: (ProcessingInstructionImpl::setStyleSheet): 2004-04-30 Chris Blumenberg Fixed: : HITLIST-137: REGRESSION: reproducible hang copying all text at Dave's blog, and other pages Reviewed by dave. * khtml/xml/dom2_rangeimpl.cpp: (RangeImpl::toHTMLWithOptions): when looping with containingBlock, check the value to see if it is the same 2004-04-30 David Hyatt Fix for 3639530, regression on generated content pages. They crash because I forgot to null-check the style object. Reviewed by kocienda * khtml/css/cssstyleselector.cpp: (khtml::CSSStyleSelector::checkOneSelector): 2004-04-30 John Sullivan - added bridge method to get the NSFont used to render a node, to help with supporting the font panel Reviewed by Ken. * kwq/WebCoreBridge.h: * kwq/WebCoreBridge.mm: (-[WebCoreBridge renderedFontForNode:]): return nil if no renderer, otherwise return NSFont 2004-04-29 David Hyatt Expose summary on tables. Reviewed by darin * kwq/KWQAccObject.mm: (-[KWQAccObject helpText]): 2004-04-29 David Hyatt Implement image maps for accessibility. Reviewed by darin * khtml/html/html_imageimpl.cpp: (HTMLAreaElementImpl::getRect): * khtml/html/html_imageimpl.h: * khtml/rendering/render_image.cpp: (RenderImage::imageMap): (RenderImage::nodeAtPoint): * khtml/rendering/render_image.h: * kwq/KWQAccObject.h: * kwq/KWQAccObject.mm: (-[KWQAccObject initWithRenderer:]): (-[KWQAccObject anchorElement]): (-[KWQAccObject parentObject]): (-[KWQAccObject parentObjectUnignored]): (-[KWQAccObject addChildrenToArray:]): (-[KWQAccObject role]): (-[KWQAccObject helpText]): (-[KWQAccObject value]): (-[KWQAccObject title]): (-[KWQAccObject position]): (-[KWQAccObject size]): (-[KWQAccObject accessibilityIsIgnored]): (-[KWQAccObject accessibilityAttributeNames]): (-[KWQAccObject accessibilityAttributeValue:]): * kwq/KWQRegion.mm: (QRegion::boundingRect): 2004-04-29 Chris Blumenberg Fixed: : web archive of .Mac welcome page renders has gaps in layout : news.google.com web archive has a different font than the live site Reviewed by kocienda. * khtml/html/html_documentimpl.cpp: (HTMLDocumentImpl::determineParseMode): don't set a name on the doc type when there is no doc type in the source * khtml/xml/dom_docimpl.cpp: (DocumentTypeImpl::toString): don't return "" when there is no doc type in the source * khtml/xml/dom_nodeimpl.cpp: (NodeImpl::recursive_toHTMLWithOptions): don't escape STYLE text, don't include the end tags for document nodes just as we don't for start tags 2004-04-29 Darin Adler Reviewed by Dave. - some tweaks on image * khtml/html/html_imageimpl.h: Remove unused noref bit and unneeded override of isURLAttribute. * khtml/html/html_imageimpl.cpp: (HTMLAreaElementImpl::HTMLAreaElementImpl): Remove unused noref bit. (HTMLAreaElementImpl::parseHTMLAttribute): Remove parsing of noref; no need to store the bit since it has no meaning. 2004-04-29 David Hyatt 1. Change the role of links from AXButton to AXLink. 2. Add support for list markers using a new role, AXListMarker. Reviewed by kocienda * khtml/rendering/render_list.h: (khtml::RenderListMarker::text): * kwq/KWQAccObject.mm: (-[KWQAccObject role]): (-[KWQAccObject roleDescription]): (-[KWQAccObject value]): (-[KWQAccObject accessibilityIsIgnored]): 2004-04-29 Darin Adler Reviewed by Ken. - fixed : "space bar on a form button hits default button instead (autorestore.apple.com)" * khtml/html/html_formimpl.cpp: (HTMLInputElementImpl::defaultEventHandler): Remove special handling for space, falling back to default AppKit behavior. Change enter handling to click the form element itself in the case of elements other than text input ones. 2004-04-29 Darin Adler Reviewed by Ken. - fixed : "unrepro nil-deref crash in KHTMLPart::frameDetached() (espn.com)" * kwq/KWQKHTMLPart.mm: (KHTMLPart::frameDetached): Check for nil. 2004-04-28 Chris Blumenberg - Implemented DOMHTMLElementExtensions. - Added stubs for the rest of the DOM API. Reviewed by dave. * WebCore.pbproj/project.pbxproj: * khtml/dom/html_element.cpp: (HTMLElement::setContentEditable): moved implementation from here to HTMLElementImpl * khtml/html/html_elementimpl.cpp: (HTMLElementImpl::setContentEditable): new, moved from HTMLElement * khtml/html/html_elementimpl.h: * kwq/DOM-CSS.mm: (-[DOMObject sheet]): (-[DOMDocument getComputedStyle::]): * kwq/DOM.mm: (-[DOMAbstractView document]): (-[DOMDocumentView defaultView]): (-[DOMDocument createNodeIterator::::]): (-[DOMDocument createTreeWalker::::]): (-[DOMNodeFilter acceptNode:]): (-[DOMNodeIterator root]): (-[DOMNodeIterator whatToShow]): (-[DOMNodeIterator filter]): (-[DOMNodeIterator expandEntityReferences]): (-[DOMNodeIterator nextNode]): (-[DOMNodeIterator previousNode]): (-[DOMNodeIterator detach]): (-[DOMTreeWalker root]): (-[DOMTreeWalker whatToShow]): (-[DOMTreeWalker filter]): (-[DOMTreeWalker expandEntityReferences]): (-[DOMTreeWalker currentNode]): (-[DOMTreeWalker setCurrentNode:]): (-[DOMTreeWalker parentNode]): (-[DOMTreeWalker firstChild]): (-[DOMTreeWalker lastChild]): (-[DOMTreeWalker previousSibling]): (-[DOMTreeWalker nextSibling]): (-[DOMTreeWalker previousNode]): (-[DOMTreeWalker nextNode]): * kwq/DOMEvents.mm: Added. (-[DOMEvent type]): (-[DOMEvent target]): (-[DOMEvent currentTarget]): (-[DOMEvent eventPhase]): (-[DOMEvent bubbles]): (-[DOMEvent cancelable]): (-[DOMEvent timeStamp]): (-[DOMEvent stopPropagation]): (-[DOMEvent preventDefault]): (-[DOMEvent initEvent:::]): (-[DOMEventTarget addEventListener:::]): (-[DOMEventTarget removeEventListener:::]): (-[DOMEventTarget dispatchEvent:]): (-[DOMMouseEvent screenX]): (-[DOMMouseEvent screenY]): (-[DOMMouseEvent clientX]): (-[DOMMouseEvent clientY]): (-[DOMMouseEvent ctrlKey]): (-[DOMMouseEvent shiftKey]): (-[DOMMouseEvent altKey]): (-[DOMMouseEvent metaKey]): (-[DOMMouseEvent button]): (-[DOMMouseEvent relatedTarget]): (-[DOMMouseEvent initMouseEvent:::::::::::::::]): (-[DOMMutationEvent relatedNode]): (-[DOMMutationEvent prevValue]): (-[DOMMutationEvent newValue]): (-[DOMMutationEvent attrName]): (-[DOMMutationEvent attrChange]): (-[DOMMutationEvent initMutationEvent::::::::]): (-[DOMUIEvent view]): (-[DOMUIEvent detail]): (-[DOMUIEvent initUIEvent:::::]): (-[DOMDocument createEvent:]): * kwq/DOMHTML.mm: (-[DOMHTMLElement innerHTML]): implemented (-[DOMHTMLElement setInnerHTML:]): implemented (-[DOMHTMLElement innerText]): implemented (-[DOMHTMLElement setInnerText:]): implemented (-[DOMHTMLElement children]): implemented (-[DOMHTMLElement contentEditable]): implemented (-[DOMHTMLElement setContentEditable:]): implemented (-[DOMHTMLElement isContentEditable]): implemented 2004-04-27 David Hyatt Implement sharing of similar style objects. Cuts the # of style objects allocated on the PLT by more than half. Reviewed by kocienda * khtml/css/cssstyleselector.cpp: (khtml::CSSStyleSelector::initElementAndPseudoState): (khtml::CSSStyleSelector::initForStyleResolve): (khtml::cleanpath): (khtml::checkPseudoState): (khtml::CSSStyleSelector::locateSiblingList): (khtml::CSSStyleSelector::canShareStyleWithElement): (khtml::CSSStyleSelector::locateSharedStyle): (khtml::CSSStyleSelector::styleForElement): (khtml::CSSStyleSelector::pseudoStyleForElement): (khtml::CSSStyleSelector::checkOneSelector): * khtml/css/cssstyleselector.h: * khtml/css/html4.css: * khtml/css/parser.cpp: * khtml/css/parser.y: * khtml/html/html_baseimpl.cpp: (HTMLBodyElementImpl::mapToEntry): (HTMLIFrameElementImpl::mapToEntry): * khtml/html/html_baseimpl.h: * khtml/html/html_blockimpl.cpp: (HTMLDivElementImpl::mapToEntry): (HTMLHRElementImpl::mapToEntry): (HTMLParagraphElementImpl::mapToEntry): (HTMLMarqueeElementImpl::mapToEntry): * khtml/html/html_blockimpl.h: * khtml/html/html_elementimpl.cpp: (HTMLNamedAttrMapImpl::declCount): (HTMLNamedAttrMapImpl::mapsEquivalent): (HTMLElementImpl::attributeChanged): (HTMLElementImpl::mapToEntry): * khtml/html/html_elementimpl.h: (DOM::HTMLElementImpl::isMappedAttribute): * khtml/html/html_formimpl.cpp: (HTMLInputElementImpl::mapToEntry): * khtml/html/html_formimpl.h: * khtml/html/html_imageimpl.cpp: (HTMLImageElementImpl::mapToEntry): * khtml/html/html_imageimpl.h: * khtml/html/html_inlineimpl.cpp: (HTMLBRElementImpl::mapToEntry): (HTMLFontElementImpl::mapToEntry): * khtml/html/html_inlineimpl.h: * khtml/html/html_listimpl.cpp: (HTMLUListElementImpl::mapToEntry): (HTMLOListElementImpl::mapToEntry): (HTMLLIElementImpl::mapToEntry): * khtml/html/html_listimpl.h: * khtml/html/html_objectimpl.cpp: (HTMLAppletElementImpl::mapToEntry): (HTMLEmbedElementImpl::mapToEntry): (HTMLObjectElementImpl::mapToEntry): * khtml/html/html_objectimpl.h: * khtml/html/html_tableimpl.cpp: (HTMLTableElementImpl::mapToEntry): (HTMLTablePartElementImpl::mapToEntry): (HTMLTableCellElementImpl::mapToEntry): (HTMLTableColElementImpl::mapToEntry): (HTMLTableCaptionElementImpl::mapToEntry): * khtml/html/html_tableimpl.h: * khtml/rendering/render_object.cpp: (RenderObject::setStyle): * khtml/rendering/render_style.cpp: (m_affectedByAttributeSelectors): (RenderStyle::RenderStyle): * khtml/rendering/render_style.h: (khtml::): (khtml::RenderStyle::pseudoState): (khtml::RenderStyle::setPseudoState): (khtml::RenderStyle::affectedByAttributeSelectors): (khtml::RenderStyle::setAffectedByAttributeSelectors): * khtml/xml/dom_docimpl.cpp: (DocumentImpl::DocumentImpl): * khtml/xml/dom_docimpl.h: (DOM::DocumentImpl::usesSiblingRules): (DOM::DocumentImpl::setUsesSiblingRules): 2004-04-28 Darin Adler Reviewed by Chris. - another step of refinement on the reinterpret_cast stuff; now it's a compile-time error if you do it wrong - fixed a couple of storage leaks * kwq/DOMInternal.h: Added new DOM_cast template function. Like reinterpret_cast, but a compile-time error if you use it with the wrong parameters. Also added type-safe versions of the wrapper functions that do the DOM_cast automatically. * kwq/DOMInternal.mm: (getDOMWrapperImpl): Changed name and parameter type as part of above change. (addDOMWrapperImpl): Ditto. (removeDOMWrapper): Ditto. * kwq/DOM.mm: Use the new DOM_cast instead of reinterpret_cast, and the new DOM wrapper calls that do the cast automatically. * kwq/DOM-CSS.mm: More of the same. (-[DOMCSSStyleSheet dealloc]): Added override to deref, fixes leak. * kwq/DOMHTML.mm: More of the same. (-[DOMHTMLCollection dealloc]): Added override to deref, fixes leak. (-[DOMHTMLOptionsCollection dealloc]): Added override to deref, fixes theoretical leak. 2004-04-28 Darin Adler Reviewed by Chris. - fixed reinterpret_cast mistakes and some style issues in DOM implementation * kwq/DOM-CSS.mm: (-[DOMCSSStyleRule _styleRuleImpl]): Fix broken reinterpret_cast; you must reinterpret_cast back to the class you reinterpret_casted from, not to a derived class. (-[DOMCSSMediaRule _mediaRuleImpl]): Ditto. (-[DOMCSSFontFaceRule _fontFaceRuleImpl]): Ditto. (-[DOMCSSPageRule _pageRuleImpl]): Ditto. (-[DOMCSSImportRule _importRuleImpl]): Ditto. (-[DOMCSSCharsetRule _importRuleImpl]): Ditto. * kwq/DOMHTML.mm: (-[DOMHTMLOptionsCollection length]): Put in an "unimplemented" version instead of leaving out the class implementation altogether. (-[DOMHTMLOptionsCollection setLength:]): Ditto. (-[DOMHTMLOptionsCollection item:]): Ditto. (-[DOMHTMLOptionsCollection namedItem:]): Ditto. (+[DOMHTMLElement _elementWithImpl:]): Corrected this implementation. The wrapper must use a standard node wrapper, since this is a subclass of DOMNode. Also moved into a separate category so it gets checked against the declarations above. (-[DOMHTMLElement _HTMLElementImpl]): Fix broken reinterpret_cast. (-[DOMHTMLHtmlElement _HTMLHtmlElementImpl]): Ditto. (-[DOMHTMLHeadElement _headElementImpl]): Ditto. (-[DOMHTMLLinkElement _linkElementImpl]): Ditto. (-[DOMHTMLTitleElement _titleElementImpl]): Ditto. (-[DOMHTMLMetaElement _metaElementImpl]): Ditto. (-[DOMHTMLBaseElement _baseElementImpl]): Ditto. (-[DOMHTMLStyleElement _styleElementImpl]): Ditto. (-[DOMHTMLBodyElement _bodyElementImpl]): Ditto. (-[DOMHTMLFormElement _formElementImpl]): Ditto. (+[DOMHTMLFormElement _formElementWithImpl:]): Another DOMNode subclass wrapper fix. (-[DOMHTMLIsIndexElement _isIndexElementImpl]): Fix broken reinterpret_cast. (-[DOMHTMLSelectElement _selectElementImpl]): Ditto. (-[DOMHTMLOptGroupElement _optGroupElementImpl]): Ditto. (-[DOMHTMLOptionElement _optionElementImpl]): Ditto. (-[DOMHTMLInputElement _inputElementImpl]): Ditto. (-[DOMHTMLTextAreaElement _textAreaElementImpl]): Ditto. (-[DOMHTMLButtonElement _buttonElementImpl]): Ditto. (-[DOMHTMLLabelElement _labelElementImpl]): Ditto. (-[DOMHTMLFieldSetElement _fieldSetElementImpl]): Ditto. (-[DOMHTMLLegendElement _legendElementImpl]): Ditto. (-[DOMHTMLUListElement _uListElementImpl]): Ditto. (-[DOMHTMLOListElement _oListElementImpl]): Ditto. (-[DOMHTMLDListElement _dListElementImpl]): Ditto. (-[DOMHTMLDirectoryElement _directoryListElementImpl]): Ditto. (-[DOMHTMLMenuElement _menuListElementImpl]): Ditto. (-[DOMHTMLLIElement _liElementImpl]): Ditto. (-[DOMHTMLQuoteElement _quoteElementImpl]): Ditto. (-[DOMHTMLDivElement _divElementImpl]): Ditto. (-[DOMHTMLParagraphElement _paragraphElementImpl]): Ditto. (-[DOMHTMLHeadingElement _headingElementImpl]): Ditto. (-[DOMHTMLPreElement _preElementImpl]): Ditto. (-[DOMHTMLBRElement _BRElementImpl]): Ditto. (-[DOMHTMLBaseFontElement _baseFontElementImpl]): Ditto. (-[DOMHTMLFontElement _fontElementImpl]): Ditto. (-[DOMHTMLHRElement _HRElementImpl]): Ditto. (-[DOMHTMLModElement _modElementImpl]): Ditto. (-[DOMHTMLAnchorElement _anchorElementImpl]): Ditto. (-[DOMHTMLImageElement _imageElementImpl]): Ditto. (-[DOMHTMLObjectElement _objectElementImpl]): Ditto. (-[DOMHTMLParamElement _paramElementImpl]): Ditto. (-[DOMHTMLAppletElement _appletElementImpl]): Ditto. (-[DOMHTMLMapElement _mapElementImpl]): Ditto. (-[DOMHTMLAreaElement _areaElementImpl]): Ditto. (-[DOMHTMLScriptElement _scriptElementImpl]): Ditto. (+[DOMHTMLTableCaptionElement _tableCaptionElementWithImpl:]): Another DOMNode subclass wrapper fix. (-[DOMHTMLTableCaptionElement _tableCaptionElementImpl]): Fix broken reinterpret_cast. (+[DOMHTMLTableSectionElement _tableSectionElementWithImpl:]): Another DOMNode subclass wrapper fix. (-[DOMHTMLTableSectionElement _tableSectionElementImpl]): Fix broken reinterpret_cast. (+[DOMHTMLTableElement _tableElementWithImpl:]): Another DOMNode subclass wrapper fix. (-[DOMHTMLTableElement _tableElementImpl]): Fix broken reinterpret_cast. (-[DOMHTMLTableColElement _tableColElementImpl]): Ditto. (-[DOMHTMLTableRowElement _tableRowElementImpl]): Ditto. (+[DOMHTMLTableCellElement _tableCellElementWithImpl:]): Another DOMNode subclass wrapper fix. (-[DOMHTMLTableCellElement _tableCellElementImpl]): Fix broken reinterpret_cast. (-[DOMHTMLFrameSetElement _frameSetElementImpl]): Ditto. (-[DOMHTMLFrameElement _frameElementImpl]): Ditto. (-[DOMHTMLIFrameElement _IFrameElementImpl]): Ditto. (-[DOMHTMLEmbedElement _embedElementImpl]): Ditto. * kwq/HTMLDOM.mm: Removed. 2004-04-28 Ken Kocienda Reviewed by Darin * khtml/khtml_part.cpp: (KHTMLPart::notifySelectionChanged): Call new postDidChangeSelectionNotification function to send Cocoa notification when the selection changes. (KHTMLPart::appliedEditing): Call postDidChangeNotification to send Cocoa notification when the document changes due to editing. (KHTMLPart::unappliedEditing): Ditto. (KHTMLPart::reappliedEditing): Ditto. * kwq/DOMHTML.mm: (-[DOMHTMLDocument _HTMLDocumentImpl]): Fix cast to account for multiple inheritance used by the impl class. * kwq/KWQKHTMLPart.h: * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::postDidChangeSelectionNotification): New function. Call the bridge to post the notification. (KWQKHTMLPart::postDidChangeNotification): Ditto. * kwq/WebCoreBridge.h: Declare new -postDidChangeSelectionNotification and -postDidChangeNotification methods. 2004-04-28 Darin Adler Reviewed by Ken. - fixed : "nil-deref in selectedStylesheetSet iterating through properties in a non-view document" * khtml/xml/dom_docimpl.cpp: (DocumentImpl::selectedStylesheetSet): Add nil check. (DocumentImpl::setSelectedStylesheetSet): Ditto. 2004-04-27 Richard Williamson : API: please add a way to set the media type for a WebView Reviewed by Chris. * khtml/khtmlview.cpp: (KHTMLView::mediaType): * kwq/KWQKHTMLPart.h: * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::overrideMediaType): * kwq/WebCoreBridge.h: 2004-04-27 Ken Kocienda Reviewed by Hyatt Make selections draw in a more Cocoa-like way, where fully-selected lines draw out to the ends of lines, and spaces between lines are drawn with the selection color as well. * WebCore-combined.exp: Add _WebCoreInitializeEmptyTextGeometry symbol * WebCore.exp: Ditto. * khtml/khtml_part.cpp: (KHTMLPart::isPointInsideSelection): Marginally-related change. Fix up this function so that it works right, given my recent changes to positionForCoordinates. This fix "really" fixes the problem. Unlike my attempt to fix yesterday. * khtml/rendering/font.cpp: (Font::drawHighlightForText): New drawHighlightForText interface which includes extra information to draw the selection. * khtml/rendering/font.h: Ditto. * khtml/rendering/render_block.cpp: (khtml::RenderBlock::positionForCoordinates): Some minor improvements and cleanups to make this code work correctly in more cases. * khtml/rendering/render_block.h: Remove spurious semi-colon after namespace block. * khtml/rendering/render_container.cpp: (RenderContainer::positionForCoordinates): Fix typo in comment. Also, clean up one unnecessary call to absolutePosition. * khtml/rendering/render_image.cpp: (RenderImage::paint): Many changes to add the new selection drawing behavior. * khtml/rendering/render_inline.cpp: (RenderInline::positionForCoordinates): Added to help make selections work right with continuations. * khtml/rendering/render_inline.h: Ditto. * khtml/rendering/render_object.h: Give zero default argument to inlineBox() helper. * khtml/rendering/render_text.cpp: (InlineTextBox::paintSelection): Many changes to add the new selection drawing behavior. * kwq/KWQListBox.mm: (-[KWQTableView drawRow:clipRect:]): Use new WebCoreTextGeometry struct. * kwq/KWQPainter.h: New drawHighlightForText interface which includes extra information to draw the selection. * kwq/KWQPainter.mm: (QPainter::drawText): Use new WebCoreInitializeEmptyTextGeometry struct. (QPainter::drawHighlightForText): Use new WebCoreTextGeometry struct. * kwq/WebCoreTextRenderer.h: Declare new WebCoreTextGeometry struct. * kwq/WebCoreTextRendererFactory.m: (WebCoreInitializeEmptyTextGeometry): Initializer for WebCoreTextGeometry struct. 2004-04-27 Richard Williamson Don't do unnecessary string comparisons when no composite operator is specified. Reviewed by Hyatt. * kwq/KWQPainter.mm: (compositeOperatorFromString): 2004-04-27 Darin Adler Reviewed by Ken. - fixed : "top level labels look identical in pop-up menus; should not" * khtml/rendering/render_form.cpp: (RenderSelect::updateFromElement): Call appendGroupLabel instead of appendItem for group labels. * kwq/KWQComboBox.h: Added appendGroupLabel, private setControlSize, labelFont, setTitle, _labelFont, and make _items a QValueList instead of QStringList. * kwq/KWQComboBox.mm: (QComboBox::QComboBox): Initializes _labelFont to nil. (QComboBox::~QComboBox): Release _labelFont. (QComboBox::setTitle): Added helper function. Uses an attributed string for group labels, and also sets the action to NULL so they are disabled. (QComboBox::appendItem): Added isLabel boolean parameter, make KWQListBoxItem, call setTitle. (QComboBox::sizeHint): Changed to handle group labels with a separate renderer to measure bolded text. (QComboBox::setCurrentItem): Changed to use setTitle helper. (QComboBox::setFont): Release _labelFont if control size changed. (QComboBox::labelFont): Compute label font lazily. (QComboBox::populateMenu): Changed to use setTitle helper. * kwq/KWQListBox.h: Removed excess includes, fixed comment. 2004-04-26 Darin Adler Reviewed by Maciej. - follow-on to fix for : "anchor names with non-ASCII characters in them do not work" This part fixes anchor names with non-ASCII characters in local files. * kwq/KWQKURL.mm: (KURL::KURL): For file and help URLs, force UTF-8 only for the path part of the URL. Use the document encoding for the rest of the URL. * kwq/KWQTextCodec.h: (operator!=): Added. 2004-04-26 David Hyatt Fix for Emerson truncation problem using apple-line-clamp. Always dirty positioned objects so that they will move when the height changes. Reviewed by darin * khtml/rendering/render_block.cpp: (khtml::RenderBlock::markPositionedObjectsForLayout): * khtml/rendering/render_block.h: * khtml/rendering/render_flexbox.cpp: (khtml::RenderFlexibleBox::layoutVerticalBox): 2004-04-26 Richard Williamson Added support for specifying composite operation on an image element. Attribute name is "composite", possible values are: clear, copy source-over source-in source-out source-atop destination-over destination-in destination-out destination-atop xor darker highlight lighter Reviewed by Ken. * khtml/html/html_imageimpl.cpp: (HTMLImageElementImpl::parseHTMLAttribute): * khtml/html/html_imageimpl.h: (DOM::HTMLImageElementImpl::compositeOperator): * khtml/misc/htmlattrs.c: (findAttr): * khtml/misc/htmlattrs.h: * khtml/misc/htmlattrs.in: * khtml/rendering/render_image.cpp: (RenderImage::paint): * kwq/KWQPainter.h: * kwq/KWQPainter.mm: (compositeOperatorFromString): (QPainter::drawPixmap): * kwq/WebCoreImageRenderer.h: 2004-04-26 Darin Adler - fixed : "REGRESSION: nil-deref in QTextCodec::toUnicode every time loading page at wiki.wordpress.org" * kwq/KWQKURL.mm: (KURL::KURL): Simplify check for nil that defaults to UTF-8. (KURL::decode_string): Add a similar test here. 2004-04-26 David Hyatt Implement the quirk that makes the and size to fill the viewport in quirks mode. This matches WinIE. Reviewed by john * khtml/rendering/render_box.cpp: (RenderBox::calcHeight): 2004-04-26 Ken Kocienda Reviewed by John Fix for this bug: : "REGRESSION (125-137): Can't drag a selection unless it starts at beginning of line" * khtml/khtml_part.cpp: (KHTMLPart::isPointInsideSelection): I flubbed when I converted this code to use my new positionForCoordinates helper. I failed to add in the passed in values for x and y to the absolute coordinates for the clicked node. So, the "unless it starts at beginning of line" behavior is exactly as one would expect. 2004-04-25 David Hyatt Eliminate overhangingContents. This concept was redundant with the overflowHeight mechanism that I implemented some time ago, and in fact, it causes us to grovel through much more of the render tree than we should when painting. It turns out that none of the places that used this boolean needed to any longer, and so the entire implementation can now be removed from the tree. Reviewed by mjs, darin * khtml/rendering/render_block.cpp: (khtml::RenderBlock::addChildToFlow): (khtml::RenderBlock::layoutBlock): (khtml::RenderBlock::paint): (khtml::RenderBlock::insertPositionedObject): * khtml/rendering/render_box.cpp: (RenderBox::calcHeight): * khtml/rendering/render_image.cpp: (RenderImage::setStyle): * khtml/rendering/render_inline.cpp: (RenderInline::addChildToFlow): * khtml/rendering/render_object.cpp: (RenderObject::RenderObject): (RenderObject::containingBlock): (RenderObject::information): (RenderObject::dump): (RenderObject::nodeAtPoint): * khtml/rendering/render_object.h: (khtml::RenderObject::minMaxKnown): * khtml/rendering/render_table.cpp: (RenderTable::layout): (RenderTable::paint): (RenderTableCell::paint): 2004-04-23 David Hyatt Fix for 3258403, implement support for min-height and max-height on normal flow elements. With this patch the only min-height/max-height work that remains to be done is for table cells and positioned elements. Reviewed by darin * khtml/rendering/render_box.cpp: (RenderBox::calcHeight): (RenderBox::calcHeightUsing): (RenderBox::calcPercentageHeight): * khtml/rendering/render_box.h: * layout-tests/fast/block/basic/minheight-expected.txt: Added. * layout-tests/fast/block/basic/minheight.html: Added. 2004-04-25 Darin Adler Reviewed by Dave. - fixed : "add overrideMimeType function to XMLHttpRequest" * khtml/ecma/xmlhttprequest.cpp: (KJS::XMLHttpRequest::getValueProperty): Add logic to override MIME type if OverrideMIMEType was called. (KJS::XMLHttpRequestProtoFunc::tryCall): Store the MIME type when overrideMimeType is called. * khtml/ecma/xmlhttprequest.h: Add OverrideMIMEType to the XMLHttpRequest property enum, and also add a MIMETypeOverride data member to the class. * khtml/ecma/xmlhttprequest.lut.h: Regenerated. 2004-04-25 Maciej Stachowiak Reviewed by Darin. : Fedex tracking page so slow it seems like a hang (site change?) : "ATI Developer site so slow it seems like a hang" : "Reproducible hang in JavaScript at www.tfl.gov.uk" : "Safari was consuming > 100% CPU on dual-G5 Mac, sample shows JavaScript" : "www.whatis.com search for "pivot table" leads to JavaScript hang" * khtml/ecma/kjs_html.cpp: (KJS::HTMLElement::getValueProperty): The "text" property for anchors should be innerText, not innerHTML. * khtml/html/html_elementimpl.cpp: (HTMLElementImpl::innerText): Make sure not to include all the text after an element if it has no children. * layout-tests/fast/dom/anchor-text-expected.txt: Added. * layout-tests/fast/dom/anchor-text.html: Added. * layout-tests/fast/dom/inner-text-expected.txt: Added. * layout-tests/fast/dom/inner-text.html: Added. 2004-04-24 Darin Adler Reviewed by Dave. - fixed : "anchor names with non-ASCII characters in them do not work" * khtml/khtml_part.h: Add new gotoAnchor helper function, private. * khtml/khtml_part.cpp: (KHTMLPart::openURL): Call new gotoAnchor helper, since the code is now complex enough that I don't want to copy and paste. (KHTMLPart::gotoAnchor): Use the pages own encoding when decoding the string for an anchor reference when going to an anchor. This matches the behavior of other browsers. (KHTMLPart::slotFinishedParsing): Call new gotoAnchor helper. * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::scrollToAnchor): Call new gotoAnchor helper. * kwq/KWQKURL.h: Removed htmlRef function, and made encodedHtmlRef an inline. Removed unused encoding hint parameter from setQuery (it's not a "hint" at all, but we don't use it). Added a codec parameter to decode_string. * kwq/KWQKURL.mm: (hexDigitValue): Added. Helper function. (KURL::setQuery): Removed unused parameter. (KURL::decode_string): Implemented this function. It needs to use an encoding specified by the web page. Also, we wanted to make a version that did not use the CFURLCreateStringByReplacingPercentEscapes function anyway. * kwq/KWQString.h: Added parameters to copyLatin1. Now you can copy an arbitrary substring. * kwq/KWQString.mm: (QString::copyLatin1): Updated implementation to handle the two new parameters. * WebCore-tests.exp: Updated for change in signature of setQuery and decode_string. * WebCore-combined.exp: Regenerated. 2004-04-24 Darin Adler - fixed : "Update "Acknowledgements" to remove expat and possibly include libxml" * WebCore.pbproj/project.pbxproj: Removed the part of the copyright notice that was for expat contributors. 2004-04-23 David Hyatt Fix the apple-line-clamp values to more closely match what is needed, an even split of the max lines between the possible values. * khtml/rendering/render_flexbox.cpp: (khtml::RenderFlexibleBox::layoutVerticalBox): 2004-04-23 David Hyatt Fix to make the containing block percentage height calculation actually work according to the CSS2 spec. Percentages other than 100% are now supported, and flexing percentage height blocks inside table cells are now supported. Reviewed by kocienda * khtml/rendering/render_box.cpp: (RenderBox::calcHeight): (RenderBox::calcPercentageHeight): * khtml/rendering/render_box.h: 2004-04-23 Ken Kocienda Reviewed by John Fix for this bug: : "REGRESSSION: crash on css home page" * khtml/rendering/render_block.cpp: (khtml::RenderBlock::positionForRenderer): Add null check. 2004-04-20 David Hyatt Fix hiermenu opacity bug. Make sure to save/restore the graphics state before pushing and popping transparency layers, so that alterations to alpha don't accidentally persist. Reviewed by kocienda * kwq/KWQPainter.mm: (QPainter::beginTransparencyLayer): (QPainter::endTransparencyLayer): 2004-04-20 David Hyatt Fix for 3622818, bad rendering on sabernomics.com. Just eliminate the priority difference between 4 and 5, and make all of the priority 4 tags the same. This seems to match other browsers. Reviewed by kocienda * khtml/html/dtd.cpp: 2004-04-23 Ken Kocienda Reviewed by Darin Changed inlineBoxForRenderer(RenderObject *, int) helper that was static in dom_position.cpp into a virtual method on RenderObjects. Function is now called inlineBox(int). Functionality unchanged. * khtml/rendering/render_br.cpp: (RenderBR::inlineBox) * khtml/rendering/render_br.h: * khtml/rendering/render_object.cpp: (RenderObject::caretMaxRenderedOffset) (RenderObject::inlineBox) * khtml/rendering/render_object.h: * khtml/rendering/render_text.cpp: (RenderText::inlineBox) * khtml/rendering/render_text.h: * khtml/xml/dom_position.cpp: (DOM::renderersOnDifferentLine): (DOM::nextRenderedEditable) (DOM::previousRenderedEditable) (DOM::Position::previousLinePosition) (DOM::Position::nextLinePosition) (DOM::Position::rendersInDifferentPosition) 2004-04-23 Ken Kocienda Reviewed by Darin * khtml/editing/htmlediting_impl.cpp: (DeleteSelectionCommandImpl::doApply): Fix editing test regression with deleting whitespace at the end of the line. I just made this "improvement" yesterday, and the concept of the change is a good one, but instead of short-circuiting if the selection after deleting collapsible whitespace is a range (which can be confused by "significant" collapsed whitespace at the end of a line), short-circuit if the upstream start position equals the downstream end position. === Safari-138 === 2004-04-23 Ken Kocienda Reviewed by John Added some plumbing for applying styles. * khtml/xml/dom_docimpl.cpp: (DocumentImpl::createCSSStyleDeclaration): New factory method. * khtml/xml/dom_docimpl.h: Declare the above. * kwq/DOM-CSS.mm: (-[DOMCSSStyleDeclaration _styleDeclarationImpl]): Expose this in the WebCoreInternal category, "promoting" it from being private to the DOM-CSS.mm file. * kwq/DOM.mm: Add -(DOMCSSStyleDeclaration *)createCSSStyleDeclaration extension. * kwq/DOMExtensions.h: Delcare the above. * kwq/DOMInternal.h: Add _styleDeclarationImpl to WebCoreInternal category. 2004-04-23 John Sullivan - fixed : "repro crash in KHTMLPart::setFocusNodeIfNeeded" Reviewed by Maciej. * khtml/khtml_part.cpp: (KHTMLPart::setFocusNodeIfNeeded): added nil check 2004-04-23 Maciej Stachowiak Back out one of the previous changes, it causes a crash. Whoops! * kwq/KWQScrollView.mm: (QScrollView::addChild): 2004-04-23 Maciej Stachowiak Reviewed by Dave. These two tiny changes (made w/ Dave's help) should get us about 1% or so combined on the HTML iBench. * khtml/rendering/render_br.cpp: (RenderBR::setStyle): Don't call superclass setStyle, since according to Dave we don't need any of the work done in there. * kwq/KWQScrollView.mm: (QScrollView::addChild): Don't actually move the widget if the x coordinate is -500000, since we don't need the initial offscreen positioning that KHTML does and it is costly to do. 2004-04-22 Ken Kocienda Reviewed by Hyatt * khtml/editing/htmlediting_impl.cpp: (DeleteSelectionCommandImpl::doApply): Short-circuit return if the selection is not a range after collapsing whitespace. 2004-04-22 Ken Kocienda Reviewed by Hyatt More work to bring code up to date with the latest API proposal. * khtml/xml/dom_selection.h: Fix typo in comment. * kwq/WebCoreBridge.h: -applyStyle:toElementsInDOMRange: is now applyStyle: * kwq/WebCoreBridge.mm: (-[WebCoreBridge applyStyle:]): Ditto. 2004-04-22 Ken Kocienda Reviewed by John Adds the notion of selection affinity to the editing API, bringing it up to date with the latest proposal. * khtml/xml/dom_selection.cpp: (DOM::Selection::Selection): Adds support for selection affinity member variable. (DOM::Selection::init): Ditto. (DOM::Selection::operator=): Ditto. (DOM::Selection::setAffinity): New function. (DOM::Selection::layoutCaret): Added comment to indicate that we need to enhance this function to handle selection affinity. * khtml/xml/dom_selection.h: Added EAffinity enum and m_affinity member variable. (DOM::Selection::): Moved the enums above the constructors. No code change. (DOM::Selection::affinity): New accessor. * kwq/WebCoreBridge.h: * kwq/WebCoreBridge.mm: Add selection affinity to API declarations as needed. (-[WebCoreBridge setSelectedDOMRange:affinity:]): Ditto. (-[WebCoreBridge selectedDOMRange]): Ditto. (-[WebCoreBridge selectionAffinity]): Ditto. 2004-04-21 Maciej Stachowiak Reviewed by Darin. Preliminary change for conservative GC. Use new "protected" subclasses to GC-protect objects when on heap, since we will soon remove the built-in refcounting of the normal wrapper classes. * ForwardingHeaders/kjs/protect.h: Added. * khtml/ecma/kjs_binding.h: * khtml/ecma/kjs_events.h: * khtml/ecma/kjs_traversal.h: * khtml/ecma/kjs_window.h: 2004-04-22 Darin Adler * khtml/ecma/kjs_window.cpp: (Window::get): Removed code that gets properties from the parent. This was a mistake we inherited from KHTML, and they have long since fixed it. 2004-04-22 Ken Kocienda Reviewed by Hyatt Ensures caret visibility after making an editing action. * khtml/xml/dom_selection.cpp: (DOM::Selection::getRepaintRect): Expose this as public. * khtml/xml/dom_selection.h: Ditto. * kwq/WebCoreBridge.h: Add ensureCaretVisible method. * kwq/WebCoreBridge.mm: (-[WebCoreBridge replaceSelectionWithMarkupString:baseURLString:]): Unrelated crash fix. Null-check baseURLString. (-[WebCoreBridge ensureCaretVisible]): Added. 2004-04-21 David Hyatt Fix for 3245627, nested tables don't expand vertically. I actually fixed the basic problem in the previous checkin, but this exposed another basic math error where |numVariable| was not being decremented properly. This meant space was mis-allocated when multiple variable height rows both needed to expand. * khtml/rendering/render_table.cpp: (RenderTableSection::layoutRows): 2004-04-21 David Hyatt Fix for 3020449, ensure that the paint order of cells with rowspans matches other browsers. Reviewed by darin * khtml/rendering/render_table.cpp: (RenderTableSection::paint): 2004-04-21 David Hyatt Remove the (incorrect) restriction on table flexing that required the cell to have a fixed width. In reality, the style on the cell is completely irrelevant. Reviewed by kocienda * khtml/rendering/render_table.cpp: (RenderTable::layout): 2004-04-21 David Hyatt Make sure cells that get flexed vertically in tables don't check text children when looking for percentage height children. Reviewed by kocienda * khtml/rendering/render_table.cpp: (RenderTableSection::layoutRows): 2004-04-21 David Hyatt Fix for hiermenus bug. Absolutely positioned images should not contribute to their containing block's max width. Make sure to disregard positioned elements when computing min/max width. Reviewed by kocienda * khtml/rendering/render_block.cpp: (khtml::InlineMinMaxIterator::next): 2004-04-21 Ken Kocienda Reviewed by Hyatt * khtml/editing/htmlediting_impl.cpp: (DeleteSelectionCommandImpl::doApply): Do not shift ending selection downstream when at position zero of a BR. That's just wrong. Simplify code that does "onlyWhitespace" delete. No need to handle multiple characters here; we can only ever have one thanks to the delete-collapsible-whitespace code. (TypingCommandImpl::issueCommandForDeleteKey): Don't do anything if at the start of a root editable block. This is a no-op....not an opportunity to crash. * khtml/rendering/render_block.cpp: (khtml::RenderBlock::positionForRenderer): Return this renderer's element position if the passed-in renderer is nil. This helps to make clicking in empty blocks work. * khtml/rendering/render_container.cpp: (RenderContainer::positionForCoordinates): Fixed typo in comment. * khtml/xml/dom_position.cpp: (DOM::Position::equivalentLeafPosition): Do not attempt to find a leaf if the position's node does not have a renderer, if the renderer has no kids. * layout-tests/editing/deleting/delete-br-001-expected.txt: Update expected results for BR fix. * layout-tests/editing/deleting/delete-br-003-expected.txt: Ditto. * layout-tests/editing/deleting/delete-br-006-expected.txt: Ditto. * layout-tests/editing/deleting/delete-br-007.html: Added. New BR test. * layout-tests/editing/deleting/delete-br-007-expected.txt: Added. 2004-04-21 Ken Kocienda Reviewed by Hyatt * khtml/css/css_computedstyle.cpp: (DOM::CSSComputedStyleDeclarationImpl::getPropertyCSSValue): Added implementations for these properties: CSS_PROP_TEXT_DECORATION, CSS_PROP_VERTICAL_ALIGN, CSS_PROP_TEXT_INDENT, CSS_PROP_LETTER_SPACING, CSS_PROP_WORD_SPACING, CSS_PROP_LINE_HEIGHT 2004-04-21 Ken Kocienda Reviewed by John The Selection class now uses the Position class throughout its public and private interface. This replaces the inconsistent use of the Position class here and node/offset pairs there. There are no functional changes, only updates to the new Selection class API. * khtml/ecma/kjs_window.cpp: (Selection::get): (SelectionFunc::tryCall): * khtml/editing/htmlediting_impl.cpp: (DeleteCollapsibleWhitespaceCommandImpl::doApply): (DeleteSelectionCommandImpl::joinTextNodesWithSameStyle): (DeleteSelectionCommandImpl::doApply): (InputNewlineCommandImpl::doApply): (InputTextCommandImpl::deleteCharacter): (InputTextCommandImpl::prepareForTextInsertion): (InputTextCommandImpl::execute): (PasteMarkupCommandImpl::doApply): (TypingCommandImpl::issueCommandForDeleteKey): * khtml/khtml_part.cpp: (KHTMLPart::findTextNext): (KHTMLPart::setFocusNodeIfNeeded): (KHTMLPart::notifySelectionChanged): (KHTMLPart::isPointInsideSelection): (KHTMLPart::handleMouseMoveEventSelection): (KHTMLPart::khtmlMouseReleaseEvent): (KHTMLPart::selectAll): * khtml/rendering/render_block.cpp: (khtml::RenderBlock::paintObject): * khtml/xml/dom_docimpl.cpp: (DocumentImpl::updateSelection): * khtml/xml/dom_nodeimpl.cpp: * khtml/xml/dom_selection.cpp: (DOM::emptyPosition): (DOM::Selection::Selection): (DOM::Selection::init): (DOM::Selection::operator=): (DOM::Selection::moveTo): (DOM::Selection::modify): (DOM::Selection::xPosForVerticalArrowNavigation): (DOM::Selection::clear): (DOM::Selection::setBase): (DOM::Selection::setExtent): (DOM::Selection::setBaseAndExtent): (DOM::Selection::setStart): (DOM::Selection::setEnd): (DOM::Selection::setStartAndEnd): (DOM::Selection::toRange): (DOM::Selection::layoutCaret): (DOM::Selection::needsCaretRepaint): (DOM::Selection::paintCaret): (DOM::Selection::validate): (DOM::Selection::moveToRenderedContent): (DOM::Selection::nodeIsBeforeNode): (DOM::startAndEndLineNodesIncludingNode): (DOM::Selection::debugRenderer): (DOM::Selection::debugPosition): * khtml/xml/dom_selection.h: (DOM::Selection::~Selection): (DOM::Selection::base): (DOM::Selection::extent): (DOM::Selection::start): (DOM::Selection::end): (DOM::Selection::assignBase): (DOM::Selection::assignExtent): (DOM::Selection::assignBaseAndExtent): (DOM::Selection::assignStart): (DOM::Selection::assignEnd): (DOM::Selection::assignStartAndEnd): (DOM::operator==): * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::jumpToSelection): (KWQKHTMLPart::selectionStartOffset): (KWQKHTMLPart::selectionEndOffset): (KWQKHTMLPart::selectionStart): (KWQKHTMLPart::selectionEnd): * kwq/KWQRenderTreeDebug.cpp: (writeSelection): * kwq/WebCoreBridge.mm: (-[WebCoreBridge isSelectionEditable]): (-[WebCoreBridge setSelectionFrom:startOffset:to:endOffset:]): (-[WebCoreBridge setSelectedDOMRange:]): 2004-04-20 Ken Kocienda Reviewed by Hyatt Renamed DOMPosition class to Position. Renamed KHTMLSelection to Selection and moved to DOM namespace. * ForwardingHeaders/xml/dom_selection.h: Added. * WebCore.pbproj/project.pbxproj: Go Xcode! * khtml/khtml_selection.cpp: Removed. * khtml/khtml_selection.h: Removed. * khtml/xml/dom_position.cpp: Renamed DOMPosition to Position * khtml/xml/dom_position.h: Ditto. * khtml/xml/dom_selection.cpp: New home for renamed Selection object. * khtml/xml/dom_selection.h: Ditto. 2004-04-20 Ken Kocienda Reviewed by Hyatt * WebCore.pbproj/project.pbxproj: * khtml/khtml_part.cpp: (KHTMLPart::handleMousePressEventDoubleClick): Improved name of expandToElement. Now is expandUsingGranularity. (KHTMLPart::handleMousePressEventTripleClick): Ditto. (KHTMLPart::handleMouseMoveEventSelection): Ditto. * khtml/khtml_selection.cpp: (KHTMLSelection::modify): Added support for modifying and extending selection right and left by word. Also added support for extending selection up and down. (KHTMLSelection::expandUsingGranularity): New name for expandToElement. (KHTMLSelection::xPosForVerticalArrowNavigation): Made this function handle cases where we know we want to use a particular position for calculating the right x position. We need this to handle extending selection up and down, and for setting the caret to the right place when moving up and down when a range is already selected. (KHTMLSelection::validate): Name tweak. expandTo variable now granularity. * khtml/khtml_selection.h: Make declaration changes for changes to cpp file. * khtml/misc/helper.cpp: (khtml::findWordBoundary): Added this hook for KDE to do their version of KWQFindWordBoundary * khtml/misc/helper.h: * khtml/rendering/render_block.cpp: (khtml::RenderBlock::positionForCoordinates): Factor out closest box finder code to its own function * khtml/rendering/render_line.cpp: (InlineFlowBox::closestChildForXPos): New function. This is the factored code that was taken out of render_block.cpp. (InlineBox::closestLeafChildForXPos): Ditto. * khtml/rendering/render_line.h: Ditto. * khtml/rendering/render_replaced.cpp: (RenderReplaced::positionForCoordinates): I think I am starting to get how the coordinate transforms work. Made some fixups based on this greater sense of enlightenment. * khtml/rendering/render_text.cpp: (RenderText::positionForCoordinates): Ditto. Fix lastTextBox/firstTextBox code mistake. * khtml/xml/dom_position.cpp: (DOMPosition::previousWordPosition): Added. (DOMPosition::nextWordPosition): Added. (DOMPosition::previousLinePosition): No longer use nodeAtPoint. Use new closestLeafChildForXPos instead. (DOMPosition::nextLinePosition): Ditto. (DOMPosition::inLastEditableInContainingEditableBlock): * khtml/xml/dom_position.h: * kwq/KWQTextUtilities.cpp: Added. (KWQFindWordBoundary): Factored out code that was in a static function in khtml_selection.cpp so that DOMPosition can use it too. * kwq/KWQTextUtilities.h: Added. 2004-04-19 Ken Kocienda Reviewed by Hyatt * khtml/khtml_part.cpp: (KHTMLPart::notifySelectionChanged): Clear the value used for maintaining x position when doing vertical arrow navigation. WebCoreBridge restores this value when needed. (KHTMLPart::setXPosForVerticalArrowNavigation): New accessor. (KHTMLPart::xPosForVerticalArrowNavigation): New accessor. * khtml/khtml_part.h: (KHTMLPart::): Add NoXPosForVerticalArrowNavigation constant. * khtml/khtml_selection.cpp: (KHTMLSelection::modify): Add cases for UP and DOWN navigation (KHTMLSelection::xPosForVerticalArrowNavigation): New helper. * khtml/khtml_selection.h: Add UP and DOWN constants to EDirection enum. (KHTMLSelection::): * khtml/khtmlpart_p.h: Declare storage for m_xPosForVerticalArrowNavigation, the value used for maintaining x position when doing vertical arrow navigation. * khtml/rendering/render_block.cpp: (khtml::RenderBlock::positionForCoordinates): Improved this function to handle deficiencies exposed when trying to implement new behavior. * khtml/rendering/render_br.cpp: (RenderBR::positionForCoordinates): Added implementation of this virtual function. * khtml/rendering/render_br.h: Declare implementation for positionForCoordinates virtual function. * khtml/rendering/render_replaced.cpp: (RenderReplaced::positionForCoordinates): Improved this function to handle deficiencies exposed when trying to implement new behavior. * khtml/rendering/render_text.cpp: (InlineTextBox::offsetForPosition): Remove left/right "bounds" check here. (RenderText::positionForCoordinates): Improved this function to handle deficiencies exposed when trying to implement new behavior. * khtml/xml/dom_position.cpp: (inlineBoxForRenderer): Moved to top of file so all code in the file can see this static function. (renderersOnDifferentLine): Ditto. (nextRenderedEditable): Ditto. (previousRenderedEditable): Ditto. (DOMPosition::previousLinePosition): New function. Implements the guts of up/down navigation. (DOMPosition::nextLinePosition): Ditto. * khtml/xml/dom_position.h: Added declarations for nextLinePosition and previousLinePosition. * kwq/WebCoreBridge.h: Add WebSelectUp and WebSelectDown constants. * kwq/WebCoreBridge.mm: (-[WebCoreBridge alterCurrentSelection:direction:granularity:]): Handles saving and restoring the x position used for doing vertical arrow navigation. 2004-04-16 Ken Kocienda Reviewed by Hyatt * khtml/css/css_computedstyle.cpp: (DOM::CSSComputedStyleDeclarationImpl::getPropertyCSSValue): Added implementations for these four properties: CSS_PROP_WHITE_SPACE, CSS_PROP_DISPLAY, CSS_PROP_FLOAT, and CSS_PROP_COLOR. 2004-04-16 Chris Blumenberg Subresources weren't being archived for LINK tags. Reviewed by kocienda. * khtml/xml/dom_nodeimpl.cpp: (NodeImpl::recursive_toHTMLWithOptions): indent tweak * kwq/DOMHTML.mm: (-[DOMHTMLLinkElement _linkElementImpl]): C+casting voodoo to make methods like rel and href work correctly 2004-04-16 Ken Kocienda Reviewed by Hyatt * khtml/html/html_elementimpl.cpp: (HTMLElementImpl::isContentEditable): Call getDocument()->updateRendering() to make sure outstanding changes for this attribute are applied. (HTMLElementImpl::contentEditable): Call getDocument()->updateRendering() to make sure outstanding changes for this attribute are applied. (HTMLElementImpl::setContentEditable): Call enabled.isEmpty() before strcasecmp(enabled, "true"). It's cheaper. 2004-04-16 Ken Kocienda Reviewed by Hyatt * khtml/editing/htmlediting_impl.cpp: New helper. (DeleteSelectionCommandImpl::containsOnlyWhitespace): Fix deleting collapsed whitespace at the end of a line where text has flowed to the next line and the caret is at the beginning of the next line. (DeleteSelectionCommandImpl::doApply): Updated for new helper. * khtml/editing/htmlediting_impl.h: * layout-tests/editing/deleting/delete-line-end-ws-001-expected.txt: Added. * layout-tests/editing/deleting/delete-line-end-ws-001.html: Added. * layout-tests/editing/deleting/delete-line-end-ws-002-expected.txt: Added. * layout-tests/editing/deleting/delete-line-end-ws-002.html: Added. === Safari-137 === 2004-04-16 Richard Williamson Added an SPI to allow ObjC instances to be easily bound to JS. This is needed by the dashboard guys for their prototyping. Eventually they will use new API. Reviewed by Chris. * kwq/KWQKHTMLPart.h: * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::bindObject): * kwq/WebCoreBridge.h: * kwq/WebCoreBridge.mm: (-[WebCoreBridge bindObject:withName:]): 2004-04-16 Chris Blumenberg Added DOMHTMLEmbedElement as a DOM extension since EMBED is represented in our DOM even though its not part of the spec. Added all DOMCore and DOMHTML symbols to WebCore's symbols file. Removed isSubresourceURLAttribute from dom node. This was only used for the WebArchive feature and all that work is now done in WebKit. Reviewed by kocienda. * WebCore-combined.exp: * WebCore.exp: * khtml/html/html_baseimpl.cpp: (HTMLBodyElementImpl::isURLAttribute): renamed from isSubresourceURLAttribute. As a convenience to subclasses, dom_elementimpl would call isSubresourceURLAttribute in isURLAttribute, but this is no longer done (HTMLFrameElementImpl::isURLAttribute): ditto (HTMLIFrameElementImpl::isURLAttribute): ditto * khtml/html/html_baseimpl.h: * khtml/html/html_formimpl.cpp: (HTMLInputElementImpl::isURLAttribute): ditto * khtml/html/html_formimpl.h: * khtml/html/html_headimpl.cpp: (HTMLScriptElementImpl::isURLAttribute): ditto * khtml/html/html_headimpl.h: * khtml/html/html_imageimpl.cpp: (HTMLImageElementImpl::isURLAttribute): ditto * khtml/html/html_imageimpl.h: * khtml/html/html_objectimpl.cpp: (HTMLEmbedElementImpl::isURLAttribute): ditto (HTMLObjectElementImpl::isURLAttribute): ditto (HTMLParamElementImpl::isURLAttribute): ditto * khtml/html/html_objectimpl.h: * khtml/html/html_tableimpl.cpp: (HTMLTableElementImpl::isURLAttribute): ditto (HTMLTableCellElementImpl::isURLAttribute): ditto * khtml/html/html_tableimpl.h: * khtml/xml/dom2_rangeimpl.cpp: (RangeImpl::toHTMLWithOptions): take a node list (see below) * khtml/xml/dom2_rangeimpl.h: * khtml/xml/dom_elementimpl.cpp: (ElementImpl::isURLAttribute): * khtml/xml/dom_elementimpl.h: * khtml/xml/dom_nodeimpl.cpp: (NodeImpl::recursive_toHTMLWithOptions): append copied nodes to a list of nodes so that WebKit can operate on them * khtml/xml/dom_nodeimpl.h: * kwq/DOM.mm: (+[DOMNode _nodeWithImpl:]): added support for HTML types * kwq/DOMExtensions.h: * kwq/DOMHTML.mm: (-[DOMHTMLPreElement setWidth:]): (-[DOMHTMLEmbedElement _embedElementImpl]): (-[DOMHTMLEmbedElement align]): (-[DOMHTMLEmbedElement setAlign:]): (-[DOMHTMLEmbedElement height]): (-[DOMHTMLEmbedElement setHeight:]): (-[DOMHTMLEmbedElement name]): (-[DOMHTMLEmbedElement setName:]): (-[DOMHTMLEmbedElement src]): (-[DOMHTMLEmbedElement setSrc:]): (-[DOMHTMLEmbedElement type]): (-[DOMHTMLEmbedElement setType:]): (-[DOMHTMLEmbedElement width]): (-[DOMHTMLEmbedElement setWidth:]): (-[DOMHTMLTableElement background]): (-[DOMHTMLTableElement setBackground:]): (-[DOMHTMLTableCellElement background]): new extension (-[DOMHTMLTableCellElement setBackground:]): ditto * kwq/WebCoreBridge.h: * kwq/WebCoreBridge.mm: (-[WebCoreBridge nodesFromList:]): new (-[WebCoreBridge markupStringFromNode:nodes:]): return a list of nodes instead of subresource URLs so WebKit can operate on the nodes (-[WebCoreBridge markupStringFromRange:nodes:]): ditto 2004-04-15 David Hyatt Fix for 3624335, bugs with overflow and positioned objects. The scrollbar didn't properly update as you changed the sizes of positioned objects inside an overflow block. Reviewed by rjw * khtml/rendering/render_block.cpp: (khtml::RenderBlock::layoutBlock): * khtml/rendering/render_flexbox.cpp: (khtml::RenderFlexibleBox::layoutBlock): * khtml/rendering/render_layer.cpp: (RenderLayer::updateScrollInfoAfterLayout): 2004-04-15 Ken Kocienda Reviewed by Dave Improved selection behavior. As part of this work, I removed almost all of the checkSelectionPoint() functions, leaving only those associated with fonts, and all of the checkSelectionPointIgnoringContinuations() functions. Each of these has been replaced by a new function called positionForCoordinates(), which returns a DOMPosition. * WebCore.pbproj/project.pbxproj: * khtml/khtml_events.cpp: (khtml::MouseEvent::offset): Converted to use positionForCoordinates. * khtml/khtml_part.cpp: Ditto. (KHTMLPart::isPointInsideSelection): (KHTMLPart::handleMousePressEventDoubleClick): Ditto. (KHTMLPart::handleMousePressEventTripleClick): Ditto. (KHTMLPart::handleMousePressEventSingleClick): Ditto. (KHTMLPart::handleMouseMoveEventSelection): Ditto. (KHTMLPart::khtmlMouseReleaseEvent): Ditto. * khtml/khtml_part.h: * khtml/rendering/render_block.cpp: (khtml::RenderBlock::positionForBox): New helper. (khtml::RenderBlock::positionForRenderer): New helper. (khtml::RenderBlock::positionForCoordinates): New selection-node-offset-finder method. * khtml/rendering/render_block.h: * khtml/rendering/render_br.cpp: Removed checkSelectionPointIgnoringContinuations. No special behavior is needed for this class anymore. * khtml/rendering/render_br.h: Ditoo. * khtml/rendering/render_container.cpp: (RenderContainer::positionForCoordinates): New selection-node-offset-finder method. * khtml/rendering/render_container.h: * khtml/rendering/render_line.cpp: (InlineBox::firstLeafChild): New helper. (InlineBox::lastLeafChild): New helper. (InlineFlowBox::firstLeafChild): New helper. (InlineFlowBox::lastLeafChild): New helper. * khtml/rendering/render_line.h: * khtml/rendering/render_object.cpp: (RenderObject::firstLeafChild): New helper. (RenderObject::lastLeafChild): New helper. (RenderObject::positionForCoordinates): * khtml/rendering/render_object.h: * khtml/rendering/render_replaced.cpp: (RenderReplaced::positionForCoordinates): New selection-node-offset-finder method. * khtml/rendering/render_replaced.h: * khtml/rendering/render_text.cpp: (InlineTextBox::offsetForPosition): New helper, replaces checkSelectionPoint() (RenderText::positionForCoordinates): New selection-node-offset-finder method. * khtml/rendering/render_text.h: * khtml/xml/dom_nodeimpl.cpp: Added positionForCoordinates() convenience here. This checks to see if the node has a renderer before doing the position check. * khtml/xml/dom_nodeimpl.h: Ditto. * kwq/DOM.mm: (-[DOMNode isContentEditable]): Added this unrelated method, since without it, I crash when dragging an image. * kwq/WebCoreBridge.mm: (-[WebCoreBridge moveCaretToPoint:]): Converted to use positionForCoordinates. 2004-04-15 David Hyatt Fix for 3603455, block truncation support. Reviewed by kocienda * 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/ecma/kjs_css.cpp: (cssPropertyName): * khtml/rendering/render_block.cpp: (khtml::RenderBlock::lineCount): (khtml::RenderBlock::heightForLineCount): * khtml/rendering/render_block.h: * khtml/rendering/render_flexbox.cpp: (khtml::RenderFlexibleBox::layoutHorizontalBox): (khtml::RenderFlexibleBox::layoutVerticalBox): * khtml/rendering/render_style.cpp: (marquee): (StyleCSS3NonInheritedData::operator==): (RenderStyle::diff): * khtml/rendering/render_style.h: (khtml::RenderStyle::lineClamp): (khtml::RenderStyle::setLineClamp): (khtml::RenderStyle::initialLineClamp): 2004-04-13 Chris Blumenberg - Removed WebCoreElementIsEditableKey. This functionality is available via [DOMNode isContentEditable]. Reviewed by rjw. * WebCore-combined.exp: * WebCore.exp: * kwq/WebCoreBridge.h: * kwq/WebCoreBridge.mm: (-[WebCoreBridge elementAtPoint:]): removed use of WebCoreElementIsEditableKey (-[WebCoreBridge URLWithRelativeString:]): new method for WebKit API 2004-04-13 David Hyatt Fix for 3559764, make sure overflow is applied consistently using a separate bit on render objects, so that the body scroll quirk can easily disable overflow even when it is present on the style. Reviewed by kocienda * khtml/ecma/kjs_dom.cpp: (DOMNode::putValue): * khtml/rendering/bidi.cpp: (khtml::RenderBlock::layoutInlineChildren): * khtml/rendering/render_block.cpp: (khtml::RenderBlock::setStyle): (khtml::RenderBlock::layoutBlock): (khtml::RenderBlock::layoutBlockChildren): (khtml::RenderBlock::paintObject): (khtml::RenderBlock::rightOffset): (khtml::RenderBlock::lowestPosition): (khtml::RenderBlock::rightmostPosition): (khtml::RenderBlock::leftmostPosition): (khtml::RenderBlock::isPointInScrollbar): (khtml::RenderBlock::nodeAtPoint): (khtml::RenderBlock::inRootBlockContext): * khtml/rendering/render_block.h: (khtml::RenderBlock::overflowHeight): (khtml::RenderBlock::overflowWidth): * khtml/rendering/render_box.cpp: (RenderBox::setStyle): (RenderBox::contentWidth): (RenderBox::contentHeight): (RenderBox::absolutePosition): (RenderBox::computeAbsoluteRepaintRect): (RenderBox::calcAbsoluteVertical): * khtml/rendering/render_flexbox.cpp: (khtml::RenderFlexibleBox::layoutBlock): * khtml/rendering/render_flow.cpp: (RenderFlow::lowestPosition): (RenderFlow::rightmostPosition): (RenderFlow::leftmostPosition): * khtml/rendering/render_layer.cpp: (RenderLayer::updateLayerPosition): (RenderLayer::updateScrollInfoAfterLayout): (RenderLayer::intersectsDamageRect): (RenderLayer::containsPoint): * khtml/rendering/render_object.cpp: (RenderObject::RenderObject): (RenderObject::requiresLayer): (RenderObject::clientWidth): (RenderObject::clientHeight): (RenderObject::scrollWidth): (RenderObject::scrollHeight): (RenderObject::setStyle): (RenderObject::absolutePosition): (RenderObject::nodeAtPoint): (RenderObject::avoidsFloats): * khtml/rendering/render_object.h: (khtml::RenderObject::hasOverflowClip): (khtml::RenderObject::hasAutoScrollbars): (khtml::RenderObject::scrollsOverflow): (khtml::RenderObject::includeScrollbarSize): (khtml::RenderObject::setHasOverflowClip): * khtml/rendering/render_style.h: (khtml::RenderStyle::overflow): (khtml::RenderStyle::isDisplayReplacedType): (khtml::RenderStyle::isDisplayInlineType): * khtml/rendering/render_table.cpp: (RenderTable::setStyle): (RenderTableCell::setStyle): (RenderTableCell::requiresLayer): * khtml/rendering/render_table.h: 2004-04-12 David Hyatt Fix for 3556036, make sure that when the position changes via style that all render layer descendants simply immediately repaint. Reviewed by kocienda * khtml/rendering/render_layer.cpp: (RenderLayer::repaintIncludingDescendants): * khtml/rendering/render_layer.h: * khtml/rendering/render_object.cpp: (RenderObject::setStyle): 2004-04-12 Chris Blumenberg - Fixed build failure by removing references to WebArchive in WebCore. - For HTML copy/paste, relative URLs are now made absolute at paste time instead of at copy time. This allows relative URLs to be kept relative if the destination page has the same base URL as the source page. Reviewed by kocienda. * khtml/editing/htmlediting.cpp: (PasteMarkupCommand::PasteMarkupCommand): take the base URL of the clipping * khtml/editing/htmlediting.h: * khtml/editing/htmlediting_impl.cpp: (PasteMarkupCommandImpl::PasteMarkupCommandImpl): take the base URL of the clipping (PasteMarkupCommandImpl::doApply): if we have a base URL and it is different than the base URL of the document, fix the URLs in the new DOM tree * khtml/editing/htmlediting_impl.h: * khtml/xml/dom2_rangeimpl.cpp: (RangeImpl::toHTMLWithOptions): removed completeURLs param * khtml/xml/dom2_rangeimpl.h: * khtml/xml/dom_nodeimpl.cpp: (NodeImpl::recursive_toHTMLWithOptions): removed completeURLs param (NodeImpl::recursive_toHTML): ditto (NodeImpl::recursive_completeURLs): new * khtml/xml/dom_nodeimpl.h: * kwq/WebCoreBridge.h: * kwq/WebCoreBridge.mm: (-[WebCoreBridge markupStringFromNode:subresourceURLStrings:]): call recursive_toHTML with less params (-[WebCoreBridge markupStringFromRange:subresourceURLStrings:]): ditto (-[WebCoreBridge replaceSelectionWithMarkupString:baseURLString:]): take a base URL 2004-04-12 Ken Kocienda Reviewed by Dave Added execCommand support for cut/copy/paste. * khtml/xml/dom_docimpl.cpp: (DocumentImpl::execCommand): Added cut/copy/paste atoms and added else if cases for the commands. * kwq/KWQKHTMLPart.h: * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::issueCutCommand): Glue for calling from WebCore to do a cut in Cocoa. (KWQKHTMLPart::issueCopyCommand): Same as above, but for copy. (KWQKHTMLPart::issuePasteCommand): Same as above, but for paste. * kwq/WebCoreBridge.h: Declared issueCutCommand, issueCopyCommand, and issuePasteCommand to be implemented on the WebKit side of the bridge. * layout-tests/editing/editing.js: Added cut/copy/paste support to js library to support making layout tests. * layout-tests/editing/pasteboard/copy-paste-text-001-expected.txt: Added. * layout-tests/editing/pasteboard/copy-paste-text-001.html: Added. * layout-tests/editing/pasteboard/cut-paste-text-002-expected.txt: Added. * layout-tests/editing/pasteboard/cut-paste-text-002.html: Added. * layout-tests/editing/pasteboard/cut-text-001-expected.txt: Added. * layout-tests/editing/pasteboard/cut-text-001.html: Added. 2004-04-12 Ken Kocienda Reviewed by John Some delete and insert cleanups. * khtml/editing/htmlediting_impl.cpp: (DeleteSelectionCommandImpl::doApply): For ending position case 1, the caret should be placed before the first child of the containing block, not before the containing block itself. Also, add some code to handle converting nbsp's back to regular spaces. This will need to be improved some day to convert only nbsp's added by the editor to make rendering come out right. (InputTextCommandImpl::execute): (TypingCommandImpl::issueCommandForDeleteKey): Make deleting collapsible whitespace part of the work of deleting a selection, rather than something that needs to be done by a user of DeleteSelectionCommandImpl. This makes it impossible to leave out this essential step. (TypingCommandImpl::deleteKeyPressed): We can't use a possible optimization here until the code to do deletions properly has been factored better. Big FIXME added. * layout-tests/editing/deleting/delete-block-contents-001-expected.txt: Updated for ending position case 1 behavior change. * layout-tests/editing/deleting/delete-block-contents-002-expected.txt: Ditto. * layout-tests/editing/deleting/delete-block-contents-003-expected.txt: Ditto. 2004-04-09 Ken Kocienda Reviewed by Darin Added support for methods added to flesh out the WebKit editing API. * khtml/khtml_part.h: Removed pasteMarkupString and deleteSelection functions. All this work is now done in WebCoreBridge. * kwq/WebCoreBridge.h: * kwq/WebCoreBridge.mm: (-[WebCoreBridge isSelectionEditable]): Added a FIXME. (-[WebCoreBridge setDrawsBackground:]): Moved this since CVS merged this in the middle of editing code. (-[WebCoreBridge replaceSelectionWithNode:]): New method. (-[WebCoreBridge replaceSelectionWithText:]): Replaces insertText: (-[WebCoreBridge replaceSelectionWithMarkupString:]): New method. (-[WebCoreBridge replaceSelectionWithWebArchive:]): New method. (-[WebCoreBridge replaceSelectionWithNewline]): Replaces insertNewline: (-[WebCoreBridge deleteSelection]): New method. (-[WebCoreBridge applyStyle:toElementsInDOMRange:]): New method. 2004-04-09 Darin Adler Reviewed by Ken. - added "transparent mode" * khtml/khtmlview.h: Added isTransparent and setTransparent functions. * khtml/khtmlview.cpp: (KHTMLViewPrivate::KHTMLViewPrivate): Initialize isTransparent to false. (KHTMLView::isTransparent): Return isTransparent. (KHTMLView::setTransparent): Set isTransparent. * khtml/rendering/render_box.cpp: (RenderBox::paintRootBoxDecorations): Use slow repaints for the top frame when the view is transparent; also don't draw a background. This is the same thing we do for subframes. (RenderBox::paintBackgroundExtended): Don't do the extra draw so we can blend with the background color for the top frame when the view is transparent. * khtml/rendering/render_canvas.cpp: (RenderCanvas::paintBoxDecorations): More of the same. * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::paint): Make "fill with red" debug mode work only when the view is not transparent. * kwq/WebCoreBridge.h: Added setDrawsBackground: method. * kwq/WebCoreBridge.mm: (-[WebCoreBridge setDrawsBackground:]): If told NO (don't draw background), then set isTransparent to true on the KHTMLView. 2004-04-09 Ken Kocienda Reviewed by me Added one more layout test for editing. * layout-tests/editing/deleting/delete-3608445-fix-expected.txt: Added. * layout-tests/editing/deleting/delete-3608445-fix.html: Added. 2004-04-08 Maciej Stachowiak Reviewed by John. Changed things so that newly created objects get a prototype based on the scope chain of the current function, rather than the interpreter that started execution. This fixes the following bugs: : ARCH: wrong prototype used to create new objects (hang on lookup.atomica.com) : ARCH: Cannot scan using a HP Jetdirect product (JS object prototypes bind incorrectly) * khtml/ecma/kjs_binding.h: (KJS::cacheDOMObject): (KJS::cacheGlobalObject): * khtml/ecma/kjs_css.cpp: (KJS::getDOMStyleSheet): (KJS::getDOMStyleSheetList): (KJS::getDOMCSSValue): * khtml/ecma/kjs_dom.cpp: (KJS::getDOMDocumentNode): (KJS::getDOMNode): * khtml/ecma/kjs_events.cpp: (KJS::getDOMEvent): * khtml/ecma/kjs_html.cpp: (KJS::HTMLDocument::tryGet): (KJS::HTMLDocument::putValue): (KJS::getSelectHTMLCollection): * khtml/ecma/kjs_navigator.cpp: (Navigator::Navigator): (PluginBase::PluginBase): * khtml/ecma/kjs_window.cpp: (KJS::History::History): (KJS::FrameArray::FrameArray): (Screen::Screen): (Window::retrieveActive): (Window::put): (Window::isSafeScript): (WindowFunc::tryCall): (Location::put): (LocationFunc::tryCall): 2004-04-09 David Hyatt Fix for 3613081, repaint glitches when using overflow:auto/overlay. Reviewed by john * khtml/rendering/render_layer.cpp: (RenderLayer::updateScrollInfoAfterLayout): 2004-04-09 David Hyatt Fix for 3608445, garbage characters rendered after doing delete. Delta was unsigned when it was supposed to be signed, since deletion involves a negative delta. Also had an off-by-one error in the line break end check. Reviewed by john * khtml/rendering/render_text.cpp: (RenderText::setTextWithOffset): 2004-04-09 Ken Kocienda Reviewed by me Added two more layout tests for editing. * layout-tests/editing/selection/move-between-blocks-no-001-expected.txt: Added. * layout-tests/editing/selection/move-between-blocks-no-001.html: Added. * layout-tests/editing/selection/move-between-blocks-yes-001-expected.txt: Added. * layout-tests/editing/selection/move-between-blocks-yes-001.html: Added. 2004-04-09 Ken Kocienda Reviewed by Dave Small collection of editing improvements. * ChangeLog: * khtml/editing/htmlediting_impl.cpp: (shouldDeleteUpstreamPosition): This was deleting significant spaces on preceding lines when the caret was at the start of a line. Fixed. (DeleteSelectionCommandImpl::doApply): Fixed a case where caret jumped to previous line when deleting a character at the start of a line after a BR. (InputNewlineCommandImpl::doApply): Handle more cases correctly. Previously, this only handled inserting a newline when the caret was already in a text node. (InputTextCommandImpl::prepareForTextInsertion): Ditto. (InputTextCommandImpl::execute): Ditto. * khtml/editing/htmlediting_impl.h: * khtml/rendering/render_block.cpp: (khtml::RenderBlock::checkSelectionPointIgnoringContinuations): Now can place caret with a click in an empty block. * khtml/rendering/render_block.h: Added checkSelectionPointIgnoringContinuations declaration. * khtml/rendering/render_replaced.cpp: (RenderReplaced::checkSelectionPointIgnoringContinuations): Now can place caret with a click on a replaced element. * khtml/rendering/render_replaced.h: Added checkSelectionPointIgnoringContinuations declaration. * khtml/rendering/render_text.cpp: (InlineTextBox::checkSelectionPoint): Now can place caret with a click in text on a line made "tall" by an image on the same line. * khtml/xml/dom_docimpl.cpp: (DocumentImpl::createEditingTextNode): This creates a text node subclass that whill always create a renderer for itself. * khtml/xml/dom_docimpl.h: * khtml/xml/dom_position.cpp: (DOMPosition::isLastRenderedPositionInEditableBlock): Improved code to handle more cases. * khtml/xml/dom_textimpl.cpp: (TextImpl::TextImpl): Rolled out m_rendererIsNeeded flag. (TextImpl::rendererIsNeeded): Ditto. (EditingTextImpl::EditingTextImpl): New class. (EditingTextImpl::~EditingTextImpl): New. (EditingTextImpl::rendererIsNeeded): New. Always returns true. * khtml/xml/dom_textimpl.h: New EditingTextImpl class. * layout-tests/editing/deleting/delete-3608430-fix-expected.txt: Added. * layout-tests/editing/deleting/delete-3608430-fix.html: Added. * layout-tests/editing/deleting/delete-3608462-fix-expected.txt: Added. * layout-tests/editing/deleting/delete-3608462-fix.html: Added. * layout-tests/editing/deleting/delete-trailing-ws-002-expected.txt: Added. * layout-tests/editing/deleting/delete-trailing-ws-002.html: Added. 2004-04-08 Chris Blumenberg Renamed the PasteHTMLCommand to PasteMarkupCommand. Removed PasteImageCommand because we will use PasteMarkupCommand for pasting images. Reviewed by kocienda. * ChangeLog: * khtml/editing/htmlediting.cpp: (PasteMarkupCommand::PasteMarkupCommand): (PasteMarkupCommand::~PasteMarkupCommand): (PasteMarkupCommand::impl): (PasteMarkupCommand::markupString): * khtml/editing/htmlediting.h: (khtml::): * khtml/editing/htmlediting_impl.cpp: (PasteMarkupCommandImpl::PasteMarkupCommandImpl): (PasteMarkupCommandImpl::~PasteMarkupCommandImpl): (PasteMarkupCommandImpl::commandID): (PasteMarkupCommandImpl::doApply): * khtml/editing/htmlediting_impl.h: (khtml::PasteMarkupCommandImpl::markupString): * khtml/khtml_part.cpp: (KHTMLPart::pasteMarkupString): * khtml/khtml_part.h: * kwq/WebCoreBridge.h: * kwq/WebCoreBridge.mm: (-[WebCoreBridge pasteMarkupString:]): 2004-04-08 David Hyatt Fix for 3608430 and 3608462, crashes in findNextLineBreak when deleting. Make sure that the removal of line boxes always checks the previous root line box's line break information and dirties the line if it is pointing to the deleted object. Reviewed by kocienda * khtml/rendering/render_line.cpp: (InlineFlowBox::removeChild): 2004-04-08 Chris Blumenberg Removed DOMExtensions.h from DOM.h until it is public. Reviewed by koicienda. * kwq/DOM.h: 2004-04-07 Chris Blumenberg WebCore side for supporting WebDOMOperations. Reviewed by rjw. * WebCore-combined.exp: * WebCore.exp: * kwq/DOM.mm: * kwq/DOMExtensions.h: * kwq/WebCoreBridge.h: * kwq/WebCoreBridge.mm: (+[WebCoreBridge bridgeForDOMDocument:]): new (-[WebCoreBridge imageForImageElement:]): new 2004-04-07 Darin Adler Reviewed by Chris. * kwq/DOMCSS.h: Changed DOMCSS2Properties to be a category on DOMCSSStyleDeclaration (after API review, oops!, but I doubt anyone will even notice). * kwq/DOM-CSS.mm: Implemented the entire DOMCSS2Properties category. 2004-04-07 Ken Kocienda Reviewed by Chris * kwq/WebCoreBridge.mm: (-[WebCoreBridge _stringWithDocumentTypeStringAndMarkupString:]): Do not add a newline in between the doctype and the content. The newline was showing up when the content was pasted. 2004-04-07 Ken Kocienda Reviewed by John Removed concept of currentSelection from EditCommands and refined concept of startingSelection and endingSelection, making them work more sensibly in the system of composed editing commands. * khtml/editing/htmlediting.cpp: Removed currentSelection(). * khtml/editing/htmlediting.h: Ditto. * khtml/editing/htmlediting_impl.cpp: currentSelection(). (CompositeEditCommandImpl::applyCommandToComposite): Set the startingSelection and endingSelection for the command being applied to the endingSelection of its new parent. This is the proper starting and ending point. (CompositeEditCommandImpl::deleteSelection): Changed call to currentSelection to endingSelection. (DeleteCollapsibleWhitespaceCommandImpl::DeleteCollapsibleWhitespaceCommandImpl): Ditto. (DeleteSelectionCommandImpl::DeleteSelectionCommandImpl): Changed call from startingSelection to endingSelection. (DeleteSelectionCommandImpl::joinTextNodesWithSameStyle): Changed call to currentSelection to endingSelection. (InputNewlineCommandImpl::doApply): Ditto. (InputTextCommandImpl::deleteCharacter): Ditto. (InputTextCommandImpl::prepareForTextInsertion): Ditto. (InputTextCommandImpl::execute): Ditto. (PasteHTMLCommandImpl::doApply): Ditto. (TypingCommandImpl::insertText): Remove extraneous call to reset endingSelection. This has already been done by the helpers this command uses to do its work. (TypingCommandImpl::issueCommandForDeleteKey): Changed call to currentSelection to endingSelection. (TypingCommandImpl::deleteKeyPressed): Remove extraneous call to reset endingSelection. This has already been done by the helpers this command uses to do its work. * khtml/editing/htmlediting_impl.h: (khtml::EditCommandImpl::endingSelection): Remove extraneous call to reset endingSelection. This has already been done by the helpers this command uses to do its work. 2004-04-07 Ken Kocienda Reviewed by John Make paste work again. It has been broken for some undetermined period of time. * khtml/editing/htmlediting_impl.cpp: (CompositeEditCommandImpl::insertNodeAt): Handle inserting a node when the reference node has children, or is an empty block. (CompositeEditCommandImpl::inputText): New convenience to create and apply an InputTextCommand. (InputTextCommandImpl::execute): Collapse whitespace when selection is not a range. Deleting the selection when it is a range already does that, so no need to make special accommodation for it. (PasteHTMLCommandImpl::PasteHTMLCommandImpl): Initialize m_HTMLString using an initialization list. (PasteHTMLCommandImpl::doApply): Collapse whitespace.... as above for InputTextCommandImpl::execute. Don't need to qualify NodeImpl's with DOM namespace. Clean up selection access; no need to grep around for it, the desired selection is returned by calling currentSelection(). Treat "simple text paste" like typing. Tighten up and simplify HTML fragment paste; no real change in algorithm. (SplitTextNodeCommandImpl::SplitTextNodeCommandImpl): m_text1 member variable not initialized. This bug was introduced by a recent change by me. Fixing now. * khtml/editing/htmlediting_impl.h: Add inputText() declaration. 2004-04-06 Ken Kocienda Reviewed by Richard * khtml/khtml_part.cpp: (KHTMLPart::setSelection): Now calls setFocusNodeIfNeeded. (KHTMLPart::takeSelectionFrom): Now calls setFocusNodeIfNeeded. (KHTMLPart::clearSelection): Now calls setFocusNodeIfNeeded. (KHTMLPart::invalidateSelection): Now calls setFocusNodeIfNeeded. (KHTMLPart::setSelectionVisible): Now calls setFocusNodeIfNeeded. (KHTMLPart::setFocusNodeIfNeeded): New function focuses first element of a selection that is contenteditable, if any of the nodes are. The "first" determination is made by doing a document-order search. * khtml/khtml_part.h: * khtml/xml/dom_nodeimpl.cpp: Remove debug spam. * kwq/WebCoreBridge.mm: (-[WebCoreBridge setSelectedDOMRange:]): Now updates document layout before setting the selection. This was needed for Blot, so that setting the contenteditable attribute on the body is "seen" when the attempt is made to set the selection right immediately after. 2004-04-06 David Hyatt After columns have been expanded to their preferred sizes, if space is left over in the table, then fixed columns should expand to fill space before percentage width columns do. The old code had it backwards. Reviewed by john * khtml/rendering/table_layout.cpp: (AutoTableLayout::layout): 2004-04-06 Ken Kocienda Reviewed by Dave * khtml/dom/dom_node.cpp: (Node::isContentEditable): Added. Calls through to impl function of same name. * khtml/dom/dom_node.h: Added isContentEditable declaration. * khtml/khtmlview.cpp: (KHTMLView::viewportMouseMoveEvent): Now, the cursor will change to an i-beam whenever it is over a node that is contenteditable, and nothing, like a link, takes precedence. 2004-04-06 Ken Kocienda Reviewed by Dave * khtml/css/html4.css: Refine focus rules so that HTML and BODY elements do not draw a focus ring around themselves when focused. This prevents a silly-looking focus ring from drawing around a document's entire contents when a body element is contenteditable. 2004-04-06 Ken Kocienda Reviewed by Dave Caret height is now the height of the tallest element on the line, mimicking NSText behavior. * khtml/rendering/render_box.cpp: (RenderBox::caretPos): Use root line box topOverflow and bottomOverflow for the calculation of caret height. * khtml/rendering/render_text.cpp: (RenderText::caretPos): Ditto. 2004-04-06 Ken Kocienda Reviewed by me Added a new suite of layout tests for editing, all added in the new layout-tests/editing subtree. * layout-tests/editing/abe.jpg: Added. * layout-tests/editing/deleting/delete-block-contents-001-expected.txt: Added. * layout-tests/editing/deleting/delete-block-contents-001.html: Added. * layout-tests/editing/deleting/delete-block-contents-002-expected.txt: Added. * layout-tests/editing/deleting/delete-block-contents-002.html: Added. * layout-tests/editing/deleting/delete-block-contents-003-expected.txt: Added. * layout-tests/editing/deleting/delete-block-contents-003.html: Added. * layout-tests/editing/deleting/delete-br-001-expected.txt: Added. * layout-tests/editing/deleting/delete-br-001.html: Added. * layout-tests/editing/deleting/delete-br-002-expected.txt: Added. * layout-tests/editing/deleting/delete-br-002.html: Added. * layout-tests/editing/deleting/delete-br-003-expected.txt: Added. * layout-tests/editing/deleting/delete-br-003.html: Added. * layout-tests/editing/deleting/delete-br-004-expected.txt: Added. * layout-tests/editing/deleting/delete-br-004.html: Added. * layout-tests/editing/deleting/delete-br-005-expected.txt: Added. * layout-tests/editing/deleting/delete-br-005.html: Added. * layout-tests/editing/deleting/delete-br-006-expected.txt: Added. * layout-tests/editing/deleting/delete-br-006.html: Added. * layout-tests/editing/deleting/delete-character-001-expected.txt: Added. * layout-tests/editing/deleting/delete-character-001.html: Added. * layout-tests/editing/deleting/delete-contiguous-ws-001-expected.txt: Added. * layout-tests/editing/deleting/delete-contiguous-ws-001.html: Added. * layout-tests/editing/deleting/delete-image-001-expected.txt: Added. * layout-tests/editing/deleting/delete-image-001.html: Added. * layout-tests/editing/deleting/delete-image-002-expected.txt: Added. * layout-tests/editing/deleting/delete-image-002.html: Added. * layout-tests/editing/deleting/delete-image-003-expected.txt: Added. * layout-tests/editing/deleting/delete-image-003.html: Added. * layout-tests/editing/deleting/delete-leading-ws-001-expected.txt: Added. * layout-tests/editing/deleting/delete-leading-ws-001.html: Added. * layout-tests/editing/deleting/delete-selection-001-expected.txt: Added. * layout-tests/editing/deleting/delete-selection-001.html: Added. * layout-tests/editing/deleting/delete-trailing-ws-001-expected.txt: Added. * layout-tests/editing/deleting/delete-trailing-ws-001.html: Added. * layout-tests/editing/editing.js: Added. * layout-tests/editing/inserting/typing-001-expected.txt: Added. * layout-tests/editing/inserting/typing-001.html: Added. * layout-tests/editing/inserting/typing-002-expected.txt: Added. * layout-tests/editing/inserting/typing-002.html: Added. * layout-tests/editing/inserting/typing-around-br-001-expected.txt: Added. * layout-tests/editing/inserting/typing-around-br-001.html: Added. * layout-tests/editing/inserting/typing-around-image-001-expected.txt: Added. * layout-tests/editing/inserting/typing-around-image-001.html: Added. * layout-tests/editing/selection/extend-by-character-001-expected.txt: Added. * layout-tests/editing/selection/extend-by-character-001.html: Added. * layout-tests/editing/selection/extend-by-character-002-expected.txt: Added. * layout-tests/editing/selection/extend-by-character-002.html: Added. * layout-tests/editing/selection/extend-by-character-003-expected.txt: Added. * layout-tests/editing/selection/extend-by-character-003.html: Added. * layout-tests/editing/selection/extend-by-character-004-expected.txt: Added. * layout-tests/editing/selection/extend-by-character-004.html: Added. * layout-tests/editing/selection/extend-by-character-005-expected.txt: Added. * layout-tests/editing/selection/extend-by-character-005.html: Added. * layout-tests/editing/selection/move-by-character-001-expected.txt: Added. * layout-tests/editing/selection/move-by-character-001.html: Added. * layout-tests/editing/selection/move-by-character-002-expected.txt: Added. * layout-tests/editing/selection/move-by-character-002.html: Added. * layout-tests/editing/selection/move-by-character-003-expected.txt: Added. * layout-tests/editing/selection/move-by-character-003.html: Added. * layout-tests/editing/selection/move-by-character-004-expected.txt: Added. * layout-tests/editing/selection/move-by-character-004.html: Added. * layout-tests/editing/selection/move-by-character-005-expected.txt: Added. * layout-tests/editing/selection/move-by-character-005.html: Added. * layout-tests/editing/undo/redo-typing-001-expected.txt: Added. * layout-tests/editing/undo/redo-typing-001.html: Added. * layout-tests/editing/undo/undo-typing-001-expected.txt: Added. * layout-tests/editing/undo/undo-typing-001.html: Added. 2004-04-06 Ken Kocienda Reviewed by Dave Added execCommand feature. Added Javascript selection object. This lays the groundwork for layout tests for editing. * khtml/dom/dom_doc.cpp: (DOM::Document::execCommand): Added. Calls through to impl's execCommand. * khtml/dom/dom_doc.h: Added execCommand declaration. * khtml/ecma/kjs_dom.cpp: (DOMDocumentProtoFunc::tryCall): Switch on new ExecCommand constant and call through to the document. * khtml/ecma/kjs_dom.h: Added ExecCommand constant. (KJS::DOMDocument::): * khtml/ecma/kjs_dom.lut.h: Generated file. * khtml/ecma/kjs_window.cpp: (Window::Window): Initialize selection object. (Window::selection): Return window's selection object. (Window::mark): Mark selection object. (WindowFunc::tryCall): Return selection object on GetSelection. (LocationFunc::tryCall): Added. (Selection::Selection): Added. (Selection::~Selection): Added. (Selection::get): Added. (Selection::put): Added. (Selection::toPrimitive): Added. (Selection::toString): Added. (SelectionFunc::tryCall): Added. * khtml/ecma/kjs_window.h: (KJS::Selection::): Added. (KJS::Selection::part): Added. (KJS::Selection::classInfo): Added. * khtml/ecma/kjs_window.lut.h: Generated file. * khtml/editing/htmlediting_impl.cpp: (debugPosition): Debugging aid. (DeleteCollapsibleWhitespaceCommandImpl::deleteWhitespace): Move the ending position if you are about to delete it. Fixes a crasher I discovered while writing tests. (DeleteSelectionCommandImpl::doApply): Move to containing editable block position 0 instead of 1 in a block in delete case 1. (InputTextCommandImpl::prepareForTextInsertion): (TypingCommandImpl::issueCommandForDeleteKey): * khtml/khtml_part.h: * khtml/khtml_selection.cpp: (KHTMLSelection::validate): Now adjusts the selection down to leaf nodes if needed. (KHTMLSelection::debugPosition): Debugging aid. * khtml/xml/dom_docimpl.cpp: (DocumentImpl::execCommand): Added. Supports five different commands. * khtml/xml/dom_docimpl.h: * khtml/xml/dom_nodeimpl.cpp: (NodeImpl::previousEditable): Use false instead of 0 for equality check. (NodeImpl::nextEditable): Ditto. * khtml/xml/dom_position.cpp: (DOMPosition::equivalentLeafPosition): New function (DOMPosition::previousRenderedEditablePosition): New function (DOMPosition::nextRenderedEditablePosition): New function (DOMPosition::equivalentUpstreamPosition): Refined behavior to handle more cases correctly. (DOMPosition::equivalentDownstreamPosition): Ditto. (DOMPosition::atStartOfContainingEditableBlock):New function (DOMPosition::atStartOfRootEditableBlock):New function * khtml/xml/dom_position.h: * kwq/KWQKHTMLPart.h: * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::issueUndoCommand): New function for calling undo programatically. (KWQKHTMLPart::issueRedoCommand): Ditto, but for redo. * kwq/KWQRenderTreeDebug.cpp: (nodePositionRelativeToRoot): New function to generate log information for the selection. (writeSelection): Writes the selection if there is one. (externalRepresentation): Calls writeSelection * kwq/WebCoreBridge.h: New declarations for issueUndoCommand and issueRedoCommand. 2004-04-05 Darin Adler * khtml/html/kentities.gperf: Added © and ®, both supported by Gecko (and presumably by WinIE). Also re-sorted the list. * khtml/html/kentities.c: Regenerated. 2004-04-05 Darin Adler Reviewed by Dave. - rolled over fix from KHTML tree; anchor inside another anchor * khtml/rendering/render_layer.cpp: (RenderLayer::nodeAtPoint): Make sure the URL element is the innermost one, by not setting it once it's already set. 2004-04-05 David Hyatt Implement overflow: overlay so that a scrollbar can show/hide without causing a layout. Reviewed by darin * ChangeLog: * khtml/css/css_computedstyle.cpp: (DOM::CSSComputedStyleDeclarationImpl::getPropertyCSSValue): * khtml/css/cssparser.cpp: (CSSParser::parseValue): * khtml/css/cssstyleselector.cpp: (khtml::CSSStyleSelector::applyProperty): * khtml/css/cssvalues.c: (hash_val): (findValue): * khtml/css/cssvalues.h: * khtml/css/cssvalues.in: * khtml/rendering/render_block.cpp: (khtml::RenderBlock::layoutBlock): (khtml::RenderBlock::layoutBlockChildren): (khtml::RenderBlock::rightOffset): * khtml/rendering/render_box.cpp: (RenderBox::contentWidth): (RenderBox::contentHeight): * khtml/rendering/render_layer.cpp: (RenderLayer::updateScrollInfoAfterLayout): * khtml/rendering/render_object.cpp: (RenderObject::clientWidth): (RenderObject::clientHeight): * khtml/rendering/render_style.h: (khtml::): (khtml::RenderStyle::hasAutoScrollbars): (khtml::RenderStyle::scrollsOverflow): (khtml::RenderStyle::includeScrollbarSize): 2004-04-03 David Hyatt Implementation of , which makes sliders available in Web pages. Reviewed by john * WebCore.pbproj/project.pbxproj: * khtml/ecma/kjs_dom.cpp: (DOMNode::getValueProperty): (DOMNode::putValue): * khtml/ecma/kjs_dom.h: (KJS::DOMNode::): * khtml/ecma/kjs_dom.lut.h: (KJS::): * khtml/html/html_formimpl.cpp: (HTMLInputElementImpl::setType): (HTMLInputElementImpl::type): (HTMLInputElementImpl::click): (HTMLInputElementImpl::accessKeyAction): (HTMLInputElementImpl::parseHTMLAttribute): (HTMLInputElementImpl::rendererIsNeeded): (HTMLInputElementImpl::createRenderer): (HTMLInputElementImpl::encoding): * khtml/html/html_formimpl.h: (DOM::HTMLInputElementImpl::): * khtml/misc/htmlattrs.c: (hash_attr): (findAttr): * khtml/misc/htmlattrs.h: * khtml/misc/htmlattrs.in: * khtml/rendering/render_form.cpp: (RenderLineEdit::slotTextChanged): (:RenderFormElement): (RenderSlider::calcMinMaxWidth): (RenderSlider::updateFromElement): (RenderSlider::slotSliderValueChanged): * khtml/rendering/render_form.h: (khtml::RenderSlider::element): (khtml::RenderSlider::renderName): (khtml::RenderSlider::canHaveIntrinsicMargins): * khtml/xml/dom2_eventsimpl.cpp: (EventImpl::typeToId): (EventImpl::idToType): * khtml/xml/dom2_eventsimpl.h: (DOM::EventImpl::): * kwq/KWQSlider.h: Added. * kwq/KWQSlider.mm: Added. (-[KWQSlider initWithQSlider:]): (-[KWQSlider slide:]): (m_val): (QSlider::setFont): (QSlider::sizeHint): (QSlider::setValue): (QSlider::setMinValue): (QSlider::setMaxValue): (QSlider::value): (QSlider::minValue): (QSlider::maxValue): (QSlider::sliderValueChanged): (QSlider::dimensions): * kwq/KWQSlot.mm: (KWQSlot::KWQSlot): (KWQSlot::call): 2004-04-05 Chris Blumenberg Fixed: : SPI: WebPlugin selection Reviewed by kocienda. * WebCore.pbproj/project.pbxproj: * khtml/rendering/render_replaced.cpp: (RenderWidget::setSelectionState): new override, calls QWidget::setIsSelected * khtml/rendering/render_replaced.h: (khtml::RenderWidget::selectionState): new override * kwq/KWQWidget.h: * kwq/KWQWidget.mm: (QWidget::setIsSelected): new, calls [WebCoreBridge setIsSelected:forView:] (QWidget::isSelected): new, calls [WebCoreBridge isViewSelected:] * kwq/WebCoreBridge.h: * kwq/WebCoreBridge.mm: (-[WebCoreBridge selectionColor]): new 2004-04-03 David Hyatt Fix for 3601728, text overlaps borders at ejai.org. Remove all the code in addForbidden for dir, menu, nobr, and pre that made them too restrictive regarding what child tags they could contain. Reviewed by kocienda * khtml/html/dtd.cpp: (DOM::addForbidden): (DOM::removeForbidden): 2004-04-02 Chris Blumenberg Moved the DOM extensions to their own headers Reviewed by kocienda. * WebCore.pbproj/project.pbxproj: * kwq/DOM.h: include DOMExtensions.h * kwq/DOMExtensions.h: Added. * kwq/DOMHTML.h: moved extensions to DOMExtensions.h * kwq/DOMHTML.mm: Renamed to match header 2004-04-02 David Hyatt Fix for 3610662, rendering sometimes doesn't update in response to mouse events that change style. The document changed list was getting messed up. Reviewed by darin * khtml/xml/dom_docimpl.cpp: (DocumentImpl::updateDocumentsRendering): * khtml/xml/dom_docimpl.h: === Safari-135 === 2004-04-01 Darin Adler Based on a fix by Eric Albert. - fixed : Safari crashes when a background image has a height or width of 0 * khtml/rendering/render_box.cpp: (RenderBox::paintBackgroundExtended): Change code path so we don't mod with 0. 2004-04-01 Darin Adler Reviewed by Dave. - fixed : DEMO: menu in search field has one disabled item: localized string not found * khtml/html/html_formimpl.cpp: (HTMLInputElementImpl::HTMLInputElementImpl): Initialize m_maxResults to 0. 2004-04-01 Darin Adler Reviewed by John. - cleaned up image map code and made it work with XML documents * khtml/html/html_documentimpl.h: Removed getMap and mapMap. * khtml/html/html_documentimpl.cpp: Removed getMap; moved to base class. * khtml/html/html_imageimpl.cpp: (HTMLMapElementImpl::~HTMLMapElementImpl): Call new removeImageMap function instead of manipulating the mapMap field directly. (HTMLMapElementImpl::parseHTMLAttribute): Rewrite name changing code for simplicity and to avoid running off the end of the bufffer. Also remove image map before changing name so it doesn't end up in the map twice under both the old and new names. * khtml/html/html_imageimpl.h: Use a DOMString instead of QString for the name, since the public API already uses a DOMString. * khtml/rendering/render_image.cpp: (RenderImage::nodeAtPoint): Call the new getImageMap instead of the old getMap. * khtml/xml/dom_docimpl.h: Added addImageMap, removeImageMap, getImageMap, and m_imageMapsByName. * khtml/xml/dom_docimpl.cpp: (DocumentImpl::addImageMap): Added. Stores the image map under its name, unless there's already another map of the same. (DocumentImpl::removeImageMap): Added. Removes the image map if it's already filed by name. Avoid pitfall of removing another image map that has the same name. (DocumentImpl::getImageMap): Added. Simplified version of logic from getMap in HTMLDocumentImpl. 2004-04-01 Darin Adler Reviewed by Ken. - fixed : dual means you can't select the enter site button at jurassicpark.com (same problem in MacIE, works in Netscape) * khtml/html/html_imageimpl.cpp: (HTMLMapElementImpl::parseHTMLAttribute): Make the first seen win, as in other browsers. The old code made the last seen win. 2004-04-01 Ken Kocienda Reviewed by me Missing file broke build after my last checkin * ForwardingHeaders/rendering/render_line.h: Added. 2004-03-31 Ken Kocienda Reviewed by Dave. Many, many editing improvements, with a concentration on getting caret navigation and deleting selections working correctly. * WebCore.pbproj/project.pbxproj: * khtml/dom/dom_position.cpp: Removed. * khtml/dom/dom_position.h: Removed. * khtml/editing/htmlediting.cpp: (EditCommand::isNull): Inlined. (EditCommand::notNull): New function. (EditCommand::parent): Commands now have parents. Allows for walking the tree of composite commands. (EditCommand::setParent): Ditto. (EditCommand::emptyCommand): Returns a static empty command. (AppendNodeCommand::AppendNodeCommand): (AppendNodeCommand::parentNode): Member variable name change only. parent -> parentNode. (DeleteCollapsibleWhitespaceCommand::DeleteCollapsibleWhitespaceCommand): New command. (InputTextCommand::InputTextCommand): (InputTextCommand::input): (InputTextCommand::charactersAdded): (JoinTextNodesCommand::JoinTextNodesCommand): Now derives directly from EditCommand. (RemoveNodeAndPruneCommand::RemoveNodeAndPruneCommand): New command. (SplitTextNodeCommand::SplitTextNodeCommand): Now derives directly from EditCommand. * khtml/editing/htmlediting.h: * khtml/editing/htmlediting_impl.cpp: (isNBSP): New helper. (isWS): New helper. (shouldPruneNode): New helper. (leadingWhitespacePosition): New helper. (trailingWhitespacePosition): New helper. (textNodesAreJoinable): New helper. (nonBreakingSpaceString): Returns a static DOMString containing a non-breaking space. (EditCommandImpl::EditCommandImpl): (EditCommandImpl::setStartingSelection): Now recursively sets starting selection on parents. (EditCommandImpl::setEndingSelection): As above, for ending selection. (EditCommandImpl::parent): New accessor. (EditCommandImpl::setParent): New accessor. (CompositeEditCommandImpl::doUnapply): Removed some logging. (CompositeEditCommandImpl::doReapply): Removed some logging. (CompositeEditCommandImpl::applyCommandToComposite): Sets parent. (CompositeEditCommandImpl::removeNodeAndPrune): New comvenience. (CompositeEditCommandImpl::replaceText): New comvenience. (CompositeEditCommandImpl::deleteSelection): New comvenience. (CompositeEditCommandImpl::deleteCollapsibleWhitespace): New comvenience. (AppendNodeCommandImpl::AppendNodeCommandImpl): Member variable name change only. parent -> parentNode. (AppendNodeCommandImpl::~AppendNodeCommandImpl): Ditto. (AppendNodeCommandImpl::doApply): Ditto. (AppendNodeCommandImpl::doUnapply): Ditto. (DeleteCollapsibleWhitespaceCommandImpl::DeleteCollapsibleWhitespaceCommandImpl): New command (debugPosition): New debugging aid. (DeleteSelectionCommandImpl::doApply): Major reworking to handle more cases correctly. (InputNewlineCommandImpl::doApply): Position and selection tweaks. (InputTextCommandImpl::InputTextCommandImpl): Handles more cases now, like typing after an image. (JoinTextNodesCommandImpl::JoinTextNodesCommandImpl): Now derives directly from EditCommand. Implements the guts of the command itself now, rather than replying on its former base class. (RemoveNodeAndPruneCommandImpl::RemoveNodeAndPruneCommandImpl): New command. (SplitTextNodeCommandImpl::SplitTextNodeCommandImpl): Now derives directly from EditCommand. Implements the guts of the command itself now, rather than replying on its former base class. (TypingCommandImpl::TypingCommandImpl): Major rework to handle more cases correctly. * khtml/editing/htmlediting_impl.h: * khtml/html/html_elementimpl.cpp: (HTMLElementImpl::isContentEditable): More efficient use of the style system to answer the question. * khtml/khtml_part.cpp: (KHTMLPart::setSelection): Fixes an issue where the caret would not repaint after being moved when undoing. (KHTMLPart::takeSelectionFrom): Ditto. (KHTMLPart::clearSelection): Ditto. (KHTMLPart::invalidateSelection): Ditto. (KHTMLPart::setSelectionVisible): Ditto. (KHTMLPart::slotClearSelection): Ditto. (KHTMLPart::clearCaretRectIfNeeded): Ditto. (KHTMLPart::notifySelectionChanged): Ditto. (KHTMLPart::unappliedEditing): Now uses EditCommand::emptyCommand(). (KHTMLPart::reappliedEditing): Ditto. * khtml/khtml_part.h: * khtml/khtml_selection.cpp: (KHTMLSelection::KHTMLSelection): (KHTMLSelection::modify): Updated to work with new DOMPosition API. (KHTMLSelection::paintCaret): Ditto. (KHTMLSelection::moveToRenderedContent): Ditto. (KHTMLSelection::basePosition): New convenience. (KHTMLSelection::extentPosition): New convenience. (KHTMLSelection::startPosition): New convenience. (KHTMLSelection::endPosition): New convenience. (KHTMLSelection::debugPosition): Modified debug output. * khtml/khtml_selection.h: (KHTMLSelection::isEmpty): (KHTMLSelection::notEmpty): * khtml/rendering/bidi.cpp: (khtml::RenderBlock::layoutInlineChildren): Fixed a crasher that happened when deleting content at the start of a line. * khtml/rendering/render_br.cpp: (RenderBR::caretMaxRenderedOffset): New function. (RenderBR::caretPos): Now draws the caret in the right place when a block is empty. * khtml/rendering/render_br.h: * khtml/rendering/render_flow.cpp: (RenderFlow::caretPos): Now draws the caret in the right place when a flow is empty. * khtml/rendering/render_line.cpp: (InlineBox::caretMaxRenderedOffset): New function. * khtml/rendering/render_line.h: * khtml/rendering/render_object.cpp: (RenderObject::isEditable): (RenderObject::caretMaxRenderedOffset): New function. * khtml/rendering/render_object.h: * khtml/rendering/render_replaced.cpp: (RenderReplaced::caretMaxRenderedOffset): New function. * khtml/rendering/render_replaced.h: * khtml/rendering/render_text.cpp: (InlineTextBox::caretMaxRenderedOffset): New function. (RenderText::detach): (RenderText::caretMaxOffset): (RenderText::caretMaxRenderedOffset): New function. * khtml/rendering/render_text.h: (khtml::InlineTextBox::len): * khtml/xml/dom_edititerator.cpp: Added. * khtml/xml/dom_edititerator.h: Added. * khtml/xml/dom_nodeimpl.cpp: (NodeImpl::previousEditable): Improved the correctness of this function. (NodeImpl::nextEditable): Ditto. * khtml/xml/dom_nodeimpl.h: * khtml/xml/dom_position.cpp: Added. (DOMPosition::renderedOffset): New function. (DOMPosition::previousCharacterPosition): New function. (DOMPosition::nextCharacterPosition): New function. (DOMPosition::equivalentUpstreamPosition): New function. (DOMPosition::equivalentDownstreamPosition): New function. (DOMPosition::validUpstreamDownstreamPosition): New function. (DOMPosition::inRenderedContent): New function. (inlineBoxForRenderer): New function. (renderersOnDifferentLine): New function. (nextRenderedEditable): New function. (previousRenderedEditable): New function. (DOMPosition::inRenderedText): New function. (DOMPosition::rendersOnSameLine): New function. (DOMPosition::rendersInDifferentPosition): New function. (DOMPosition::isFirstRenderedPositionOnLine): New function. (DOMPosition::isLastRenderedPositionOnLine): New function. (DOMPosition::isLastRenderedPositionInEditableBlock): New function. (DOMPosition::inFirstEditableInRootEditableBlock): New function. (DOMPosition::inLastEditableInRootEditableBlock): New function. (DOMPosition::inFirstEditableInContainingEditableBlock): New function. (DOMPosition::inLastEditableInContainingEditableBlock): New function. * khtml/xml/dom_position.h: Added. (DOM::DOMPosition::notEmpty): New function. * khtml/xml/dom_stringimpl.cpp: (DOM::DOMStringImpl::containsOnlyWhitespace): Added a version which takes an offset and length. * khtml/xml/dom_stringimpl.h: * khtml/xml/dom_textimpl.cpp: (CharacterDataImpl::containsOnlyWhitespace): As above (CharacterDataImpl::maxOffset): New function. (CharacterDataImpl::caretMaxRenderedOffset): New function. (TextImpl::TextImpl): (TextImpl::rendererIsNeeded): A new bit. When set, makes a text renderer unconditionally. * khtml/xml/dom_textimpl.h: (DOM::TextImpl::setRendererIsNeeded): Sets the bit. * kwq/KWQAssertions.m: (KWQLog): Change to decrease the amount of output for the Editing log level. (my preference) 2004-03-31 David Hyatt Fix for 3601834, make sure that textareas do a layout when their rows/cols/wrap attributes are dynamically changed. Reviewed by darin. * khtml/html/html_formimpl.cpp: (HTMLTextAreaElementImpl::parseHTMLAttribute): 2004-03-30 David Hyatt Fix for 3604241, simple space collapsing results in a doubled character. Simplify the ignoring of whitespace and make sure it works across absolutely positioned spans. Reviewed by darin * khtml/rendering/bidi.cpp: (khtml::RenderBlock::findNextLineBreak): 2004-03-30 Darin Adler Reviewed by Dave. - fixed : REGRESSION: onfocus handler not working at weather.com * khtml/ecma/kjs_binding.cpp: (UString::string): Turn a null UString into a null DOMString, but a non-null empty UString into a non-null empty DOMString. (UString::qstring): Ditto, for QString. (Identifier::string): Ditto, for Identifier. (Identifier::qstring): Ditto. * kwq/KWQLineEdit.h: Override focusPolicy. * kwq/KWQLineEdit.mm: (QLineEdit::focusPolicy): Return StrongFocus instead of TabFocus, since we allow clicking to focus on these widgets. * kwq/KWQTextEdit.h: More of the same. * kwq/KWQTextEdit.mm: (QTextEdit::focusPolicy): And still more. - fixed : text fields in web pages are too tall * kwq/KWQTextField.mm: (-[KWQTextFieldCell _typesetterBehavior]): Ignore the per-application typesetter setting and instead always use the latest behavior for text fields in web pages. (-[KWQSecureTextFieldCell _typesetterBehavior]): Ditto. (-[KWQSearchFieldCell _typesetterBehavior]): Ditto. - additional cleanup * khtml/html/html_formimpl.cpp: (HTMLGenericFormElementImpl::isKeyboardFocusable): Check tab focus bit instead of different modes. (HTMLGenericFormElementImpl::isMouseFocusable): Check click focus bit instead of different modes. 2004-03-30 David Hyatt Fix for 3603326, spurious line breaks in encyclopedia articles. Make sure makeChildrenNonInline knows to skip over floating/positioned elements so that they remain part of contiguous inline runs for static positioning purposes. Reviewed by darin * khtml/rendering/render_block.cpp: (khtml::getInlineRun): 2004-03-30 Darin Adler Reviewed by Ken. - fixed garbage characters seen while I was rigging up the Mozilla JavaScript tests * kwq/KWQString.h: Add a "move constructor" for KWQStringData that extracts the data from an existing KWQStringData. * kwq/KWQString.mm: (KWQStringData::KWQStringData): Implement the move constructor. (QString::detachInternal): Use the move constructor rather than making a copy of the data. Should be both more efficient and preserves both the Unicode and the ASCII. The bug here is that TokenizerSubstring relies on the Unicode staying around. We still have a problem in the case where the Unicode is inside the KWQStringData. To deal with that we'll have to add a new QString call that TokenizerSubstring can use. The new call will force QString to keep the Unicode outside the internal KWQStringData. 2004-03-30 Darin Adler Reviewed by Ken. - fixed : repro nil-deref in QWidget::move (www.stoltoffshore.com) * khtml/khtml_part.cpp: (KHTMLPart::requestObject): Add check for NULL widget. (KHTMLPart::processObjectRequest): Add check for NULL widget. 2004-03-29 David Hyatt Make sure "auto" is allowed as a valid value when parsing rect shapes (e.g., for the clip property). Reviewed by rjw * khtml/css/cssparser.cpp: (CSSParser::parseShape): 2004-03-29 David Hyatt Followup fix. Handle the case where a hard line break occurs right after a soft hyphen. In this case we were losing a letter of the word in addition to not rendering the soft hyphen. Reviewed by kocienda * khtml/rendering/bidi.cpp: (khtml::checkMidpoints): 2004-03-29 David Hyatt Fix for 3604154, support soft hyphens when rendering. This patch implements soft hyphen support that matches IE6 on Windows and Opera 7. Soft hyphens that don't break lines end up getting collapsed away. Only if the hyphen breaks a line does it render. Reviewed by kocienda * khtml/rendering/bidi.cpp: (khtml::chopMidpointsAt): (khtml::appendRunsForObject): (khtml::RenderBlock::findNextLineBreak): * khtml/rendering/render_text.cpp: (RenderText::calcMinMaxWidth): 2004-03-29 John Sullivan Made menu shortcuts work again when editing HTML Reviewed by Darin. * khtml/xml/dom_elementimpl.cpp: (ElementImpl::defaultEventHandler): Don't treat key events with command key down as editing events. 2004-03-28 Darin Adler Reviewed by John. - fixed : "feed:uuid:...." links in Emerson content are being changed into "feed:uuuid:...." * kwq/KWQKURL.mm: (copyPathRemovingDots): Add special case for empty path. The old code had an assertion that explicitly allowed this case, but it copied a character from the src buffer, which was incorrect. 2004-03-26 David Hyatt Fix for 3600642, letter magnet demo doesn't update until mouse move. This patch also fixes problems with the animated text Gecko DOM demos on developer.netscape.com. Make sure that timer callbacks via setTimeout always updateRendering after executing the JS code. Reviewed by darin * khtml/ecma/kjs_window.cpp: (ScheduledAction::execute): === Safari-134 === 2004-03-25 David Hyatt Implement the rest of the search field. Make it work with form submission. Implement onscroll at the document level. Reviewed by darin * khtml/html/html_formimpl.cpp: (HTMLFormElementImpl::submit): * khtml/rendering/render_form.cpp: (RenderLineEdit::addSearchResult): * khtml/rendering/render_form.h: * kwq/KWQKHTMLPart.h: * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::sendScrollEvent): * kwq/KWQLineEdit.h: * kwq/KWQLineEdit.mm: (QLineEdit::setMaxResults): (QLineEdit::setPlaceholderString): (QLineEdit::addSearchResult): * kwq/WebCoreBridge.h: * kwq/WebCoreBridge.mm: (-[WebCoreBridge sendScrollEvent]): * kwq/WebCoreViewFactory.h: 2004-03-25 David Hyatt Fix for 3570700, crash in inlineBox::isDirty. Make sure line boxes null out parent pointers when those parents get deleted. r=john Fix for .value not being settable on selects. r=darin * khtml/html/html_formimpl.cpp: (HTMLSelectElementImpl::setValue): * khtml/rendering/render_block.cpp: (khtml::RenderBlock::removeChildrenFromLineBoxes): (khtml::RenderBlock::removeChild): * khtml/rendering/render_block.h: * khtml/rendering/render_line.cpp: (InlineFlowBox::removeChild): 2004-03-25 Darin Adler Fix by Kristin Webster, reviewed by me. - fixed : HiDPI - Form elements not working when scaling factor != 1.0 * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::passWidgetMouseDownEventToWidget): Pass nil for fromView rather than passing the top level view. 2004-03-24 Darin Adler Reviewed by John. - fixed : REGRESSION: When the subject of mailto is 2 byte Safari failed to send mail address and subject to Mail.app * kwq/KWQKURL.mm: (KURL::findHostnamesInMailToURL): Update to handle hostnames that end just before a '?' since a '?' ends the entire part of the URL that can contain hostnames. Also change the logic so that the '?' will successfully end the search. 2004-03-24 Darin Adler Reviewed by John. - fixed : main image missing due to incorrect relative URL resolution at www.brother.com * kwq/KWQKURL.mm: (KURL::KURL): Implement compatibility rule from the URI RFC. If a URL has a scheme, but does not start with the "/" character, and the scheme matches the base URL, then treat it as a relative URL. 2004-03-24 Ken Kocienda Reviewed by me. I neglected to check in these required changes when I landed previously. This is what I get for trying to commit when I had other changes in my tree. * khtml/dom/html_form.cpp: (HTMLSelectElement::add): Uses new-style call. * khtml/html/html_formimpl.cpp: (HTMLSelectElementImpl::add): Change the interface for this call to use impl objects instead of API objects. This works around the fact that the API object's constructor that takes an impl is protected. * khtml/html/html_formimpl.h: Uses new-style call. 2004-03-24 Ken Kocienda Implemented the remainder of the HTML DOM API. Reviewed by Chris. * kwq/DOMHTML.h * kwq/HTMLDOM.mm 2004-03-23 David Hyatt Fix for 3487207, implement onscroll DOM event for elements with overflow:auto/scroll/hidden. This does not handle firing onscroll on the window when the document scrolls, nor does it handle firing onscroll on textareas. These are two separate bugs. This patch finishes stubbing out the onscroll event and adds support for it to the DOM. It also supports the firing of the event when overflow blocks scroll. Reviewed by darin * khtml/ecma/kjs_dom.cpp: (DOMNode::getValueProperty): (DOMNode::putValue): * khtml/ecma/kjs_dom.h: (KJS::DOMNode::): * khtml/ecma/kjs_dom.lut.h: (KJS::): * khtml/ecma/kjs_window.cpp: (Window::get): (Window::put): * khtml/ecma/kjs_window.h: (KJS::Window::): * khtml/ecma/kjs_window.lut.h: (KJS::): * khtml/html/html_baseimpl.cpp: (HTMLBodyElementImpl::parseHTMLAttribute): * khtml/html/html_elementimpl.cpp: (HTMLElementImpl::parseHTMLAttribute): * khtml/misc/htmlattrs.c: (hash_attr): (findAttr): * khtml/misc/htmlattrs.h: * khtml/misc/htmlattrs.in: * khtml/rendering/render_layer.cpp: (RenderLayer::scrollToOffset): 2004-03-23 David Hyatt Fix for 3513627, HTML mail prints upside down occasionally. Change printing so that it never resizes the WebHTMLView when formatting for printing. When computing page rects, instead of using the view's bounds, use the root layer's width instead. Reviewed by darin * khtml/khtmlview.cpp: (KHTMLView::layout): * kwq/WebCoreBridge.h: * kwq/WebCoreBridge.mm: (-[WebCoreBridge computePageRectsWithPrintWidthScaleFactor:printHeight:]): 2004-03-23 David Hyatt Fix for crasher 3598204, previousKeyView was calling nextKeyView instead. Reviewed by darin * kwq/KWQTextField.mm: (-[KWQTextField previousKeyView]): (-[KWQSecureTextField previousKeyView]): (-[KWQSearchField previousKeyView]): 2004-03-23 Darin Adler Reviewed by Vicki. - fixed deployment build 2004-03-22 David Hyatt Wire up NSSearchField to WebCore. Add support for placeholder strings, autosaving of recent items, the ability to show/hide the magnifying glass search button, the ability to specify the maximum number of results, the ability to specify an incremental search or not, etc. Added a DOM event that fires when the search field indicates that search results should be updated. Reviewed by darin * khtml/ecma/kjs_dom.cpp: (DOMNode::getValueProperty): (DOMNode::putValue): * khtml/ecma/kjs_dom.h: (KJS::DOMNode::): * khtml/ecma/kjs_dom.lut.h: (KJS::): * khtml/ecma/kjs_window.cpp: (Window::get): (Window::put): * khtml/ecma/kjs_window.h: (KJS::Window::): * khtml/ecma/kjs_window.lut.h: (KJS::): * khtml/html/html_formimpl.cpp: (HTMLInputElementImpl::parseHTMLAttribute): * khtml/html/html_formimpl.h: (DOM::HTMLInputElementImpl::maxResults): * khtml/misc/htmlattrs.c: (hash_attr): (findAttr): * khtml/misc/htmlattrs.h: * khtml/misc/htmlattrs.in: * khtml/rendering/render_form.cpp: (RenderLineEdit::RenderLineEdit): (RenderLineEdit::slotPerformSearch): (RenderLineEdit::updateFromElement): * khtml/rendering/render_form.h: * khtml/xml/dom2_eventsimpl.cpp: (EventImpl::typeToId): (EventImpl::idToType): * khtml/xml/dom2_eventsimpl.h: (DOM::EventImpl::): * kwq/KWQLineEdit.h: (QLineEdit::performSearch): (QLineEdit::type): * kwq/KWQLineEdit.mm: (QLineEdit::QLineEdit): (QLineEdit::setLiveSearch): (QLineEdit::setAutoSaveName): (QLineEdit::setMaxResults): (QLineEdit::setPlaceholderString): * kwq/KWQSlot.mm: (KWQSlot::KWQSlot): (KWQSlot::call): * kwq/KWQTextField.mm: (-[KWQTextFieldController initWithTextField:QLineEdit:]): (-[KWQTextFieldController invalidate]): (-[KWQTextFieldController action:]): (-[KWQTextFieldController controlTextDidBeginEditing:]): (-[KWQTextFieldController controlTextDidEndEditing:]): (-[KWQTextFieldController controlTextDidChange:]): (-[KWQTextFieldController control:textShouldBeginEditing:]): (-[KWQTextFieldController control:textShouldEndEditing:]): (-[KWQTextFieldController control:didFailToFormatString:errorDescription:]): (-[KWQTextFieldController control:didFailToValidatePartialString:errorDescription:]): (-[KWQTextFieldController control:isValidObject:]): (-[KWQTextFieldController control:textView:doCommandBySelector:]): (-[KWQTextFieldController textChanged]): 2004-03-22 David Hyatt Factoring of form control code to enable sharing between three types of text fields: normal, password, and the new search field. Also made search field creatable using . There are still many bugs with the field, but you can at least type in it and submit it with a form. Reviewed by darin * khtml/html/html_formimpl.cpp: (HTMLInputElementImpl::setType): (HTMLInputElementImpl::type): (HTMLInputElementImpl::click): (HTMLInputElementImpl::accessKeyAction): (HTMLInputElementImpl::rendererIsNeeded): (HTMLInputElementImpl::createRenderer): (HTMLInputElementImpl::encoding): (HTMLInputElementImpl::defaultEventHandler): (HTMLInputElementImpl::isEditable): * khtml/html/html_formimpl.h: (DOM::HTMLInputElementImpl::): * khtml/rendering/render_form.cpp: (RenderLineEdit::RenderLineEdit): * kwq/KWQKLineEdit.h: (KLineEdit::KLineEdit): * kwq/KWQLineEdit.h: (QLineEdit::): * kwq/KWQLineEdit.mm: (QLineEdit::QLineEdit): (QLineEdit::~QLineEdit): (QLineEdit::setFont): (QLineEdit::setText): (QLineEdit::text): (QLineEdit::setMaxLength): (QLineEdit::isReadOnly): (QLineEdit::setReadOnly): (QLineEdit::maxLength): (QLineEdit::selectAll): (QLineEdit::edited): (QLineEdit::setEdited): (QLineEdit::sizeForCharacterWidth): (QLineEdit::baselinePosition): (QLineEdit::setAlignment): (QLineEdit::setWritingDirection): (KWQNSTextAlignmentForAlignmentFlags): (QLineEdit::setLiveSearch): * kwq/KWQTextField.h: * kwq/KWQTextField.mm: (-[KWQTextFieldController initWithTextField:QLineEdit:]): (-[KWQTextFieldController action:]): (-[KWQTextFieldController dealloc]): (-[KWQTextFieldController widget]): (-[KWQTextFieldController setMaximumLength:]): (-[KWQTextFieldController controlTextDidBeginEditing:]): (-[KWQTextFieldController controlTextDidEndEditing:]): (-[KWQTextFieldController controlTextDidChange:]): (-[KWQTextFieldController control:textShouldBeginEditing:]): (-[KWQTextFieldController control:textShouldEndEditing:]): (-[KWQTextFieldController control:didFailToFormatString:errorDescription:]): (-[KWQTextFieldController control:didFailToValidatePartialString:errorDescription:]): (-[KWQTextFieldController control:isValidObject:]): (-[KWQTextFieldController control:textView:doCommandBySelector:]): (-[KWQTextFieldController textChanged]): (-[KWQTextFieldController setInDrawingMachinery:]): (-[KWQTextFieldController textView:shouldDrawInsertionPointInRect:color:turnedOn:]): (-[KWQTextFieldController textView:shouldHandleEvent:]): (-[KWQTextFieldController textView:didHandleEvent:]): (-[KWQTextFieldController setBaseWritingDirection:]): (-[KWQTextFieldController baseWritingDirection]): (-[KWQTextFieldController selectedRange]): (-[KWQTextFieldController setSelectedRange:]): (-[KWQTextFieldController setHasFocus:]): (-[KWQTextFieldController updateTextAttributes:]): (+[KWQTextField cellClass]): (-[KWQTextField initWithQLineEdit:]): (-[KWQTextField dealloc]): (-[KWQTextField controller]): (-[KWQTextField widget]): (-[KWQTextField selectText:]): (-[KWQTextField setStringValue:]): (-[KWQTextField nextKeyView]): (-[KWQTextField previousKeyView]): (-[KWQTextField nextValidKeyView]): (-[KWQTextField previousValidKeyView]): (-[KWQTextField acceptsFirstResponder]): (-[KWQTextField display]): (-[KWQTextField displayRectIgnoringOpacity:]): (-[KWQTextField textView:shouldDrawInsertionPointInRect:color:turnedOn:]): (-[KWQTextField textView:shouldHandleEvent:]): (-[KWQTextField textView:didHandleEvent:]): (-[KWQTextFieldCell editWithFrame:inView:editor:delegate:event:]): (-[KWQTextFieldCell selectWithFrame:inView:editor:delegate:start:length:]): (-[KWQTextFieldCell _textAttributes]): (-[KWQSecureTextField initWithQLineEdit:]): (-[KWQSecureTextField dealloc]): (-[KWQSecureTextField controller]): (-[KWQSecureTextField widget]): (-[KWQSecureTextField setStringValue:]): (-[KWQSecureTextField nextKeyView]): (-[KWQSecureTextField previousKeyView]): (-[KWQSecureTextField acceptsFirstResponder]): (-[KWQSecureTextField display]): (-[KWQSecureTextField displayRectIgnoringOpacity:]): (-[KWQSecureTextField textView:shouldDrawInsertionPointInRect:color:turnedOn:]): (-[KWQSecureTextField textView:shouldHandleEvent:]): (-[KWQSecureTextField textView:didHandleEvent:]): (-[KWQSecureTextField selectText:]): (-[KWQSecureTextFieldCell editWithFrame:inView:editor:delegate:event:]): (-[KWQSecureTextFieldCell selectWithFrame:inView:editor:delegate:start:length:]): (-[KWQSecureTextFieldCell _textAttributes]): (+[KWQSearchField cellClass]): (-[KWQSearchField initWithQLineEdit:]): (-[KWQSearchField dealloc]): (-[KWQSearchField controller]): (-[KWQSearchField widget]): (-[KWQSearchField selectText:]): (-[KWQSearchField setStringValue:]): (-[KWQSearchField nextKeyView]): (-[KWQSearchField previousKeyView]): (-[KWQSearchField nextValidKeyView]): (-[KWQSearchField previousValidKeyView]): (-[KWQSearchField acceptsFirstResponder]): (-[KWQSearchField display]): (-[KWQSearchField displayRectIgnoringOpacity:]): (-[KWQSearchField textView:shouldDrawInsertionPointInRect:color:turnedOn:]): (-[KWQSearchField textView:shouldHandleEvent:]): (-[KWQSearchField textView:didHandleEvent:]): (-[KWQSearchFieldCell editWithFrame:inView:editor:delegate:event:]): (-[KWQSearchFieldCell selectWithFrame:inView:editor:delegate:start:length:]): (-[KWQSearchFieldCell _textAttributes]): (-[KWQTextFieldFormatter init]): (-[KWQTextFieldFormatter setMaximumLength:]): (-[KWQTextFieldFormatter maximumLength]): (-[KWQTextFieldFormatter stringForObjectValue:]): (-[KWQTextFieldFormatter getObjectValue:forString:errorDescription:]): (-[KWQTextFieldFormatter isPartialStringValid:newEditingString:errorDescription:]): (-[KWQTextFieldFormatter attributedStringForObjectValue:withDefaultAttributes:]): (-[NSString _KWQ_truncateToNumComposedCharacterSequences:]): (-[NSTextField _KWQ_currentEditor]): === Safari-133 === 2004-03-19 Darin Adler Reviewed by Ken. - fixed : crash when choosing a file to upload * kwq/KWQFileButton.mm: (-[KWQFileButtonAdapter dealloc]): Removed unneeded method. (-[KWQFileButtonAdapter filenameChanged:]): Check for nil. (-[KWQFileButtonAdapter focusChanged:]): Ditto. (-[KWQFileButtonAdapter clicked]): Ditto. 2004-03-17 Darin Adler Reviewed by John. - fixed rdar://problem/3312803>: extra space in copied text (3g.co.uk) * khtml/khtml_part.cpp: (KHTMLPart::text): Explicitly set neededSpace to false after processing a line break. Doesn't really have an effect here, but matches the change to the styled text version. * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::attributedString): Same change in the styled text version. 2004-03-16 Darin Adler Reviewed by Ken. - a little more DOM cleanup * kwq/DOM-CSS.mm: Added DOMCSSUnknownRule. * kwq/DOM.mm: Split category implementations out to match category interfaces. * kwq/DOMHTML.h: Removed lowSrc, not in DOM Level 2. Added a category for some extensions we'll want on DOMElement. * kwq/DOMInternal.h: Moved _documentImpl method here so it can be used from separate categories. * kwq/DOMRange.h: Changed DOMDocumentRange to a category from a protocol. * kwq/HTMLDOM.mm: Removed unneeded methods. * WebCore.pbproj/project.pbxproj: Sort DOM header files alphabetically. 2004-03-16 Darin Adler Reviewed by Ken. - update for new DOM namespacing and header organization * WebCore.pbproj/project.pbxproj: * kwq/DOM-CSS.h: Removed. * kwq/DOM-CSS.mm: Update for name changes. * kwq/DOM.h: Changed to include the other DOM headers. * kwq/DOM.mm: Update for name changes. * kwq/DOMCSS.h: Added. * kwq/DOMCore.h: Added. * kwq/DOMEvents.h: Added. * kwq/DOMHTML.h: Added. * kwq/DOMInternal.h: Update for name changes. * kwq/DOMRange.h: Added. * kwq/DOMStylesheets.h: Added. * kwq/DOMTraversal.h: Added. * kwq/DOMViews.h: Added. * kwq/HTMLDOM.h: Removed. * kwq/HTMLDOM.mm: Update for name changes; add some missing setters. 2004-03-15 Maciej Stachowiak Reviewed by Darin. - max out our iBench cheat. Don't even paint or lay out a quarter of the pages. * khtml/xml/dom_docimpl.cpp: (DocumentImpl::close): 2004-03-15 Ken Kocienda Reviewed by John Fix for this bug: : REGRESSION (125-131u): Tabbing to links and tabbing in bookmarks view no longer works Change some support methods which feed editing key events to WebKit. The real fix is on the WebKit side. * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::editingKeyEvent): Call new -editingKeyDown: on WebCoreBridge, as described below. * kwq/WebCoreBridge.h: Changed -keyDown: to -editingKeyDown: since we want to tell WebView about editing key events in a way that does not interfere with other key down events the WebView processes. This is not necessary in the strictest sense, but it seems reasonable to keep the terminology clear. === Safari-132 === 2004-03-12 Chris Blumenberg Implemented ~25% of the HTML DOM API. Reviewed by kocienda. (DOM::HTMLElement::HTMLElement): * kwq/DOM.mm: * kwq/DOMInternal.h: * kwq/HTMLDOM.h: * kwq/HTMLDOM.mm: (-[HTMLCollection _initWithCollectionImpl:]): (+[HTMLCollection _collectionWithImpl:]): (-[HTMLCollection _collectionImpl]): (-[HTMLCollection length]): (-[HTMLCollection item:]): (-[HTMLCollection namedItem:]): (-[HTMLElement _initWithElementImpl:]): (+[HTMLElement _elementWithImpl:]): (-[HTMLElement _HTMLElementImpl]): (-[HTMLElement idName]): (-[HTMLElement setIdName:]): (-[HTMLElement title]): (-[HTMLElement setTitle:]): (-[HTMLElement lang]): (-[HTMLElement setLang:]): (-[HTMLElement dir]): (-[HTMLElement setDir:]): (-[HTMLElement className]): (-[HTMLElement setClassName:]): (-[HTMLDocument _HTMLDocumentImpl]): (-[HTMLDocument title]): (-[HTMLDocument setTitle:]): (-[HTMLDocument referrer]): (-[HTMLDocument domain]): (-[HTMLDocument URL]): (-[HTMLDocument body]): (-[HTMLDocument images]): (-[HTMLDocument applets]): (-[HTMLDocument links]): (-[HTMLDocument forms]): (-[HTMLDocument anchors]): (-[HTMLDocument setBody:]): (-[HTMLDocument cookie]): (-[HTMLDocument setCookie:]): (-[HTMLDocument open]): (-[HTMLDocument close]): (-[HTMLDocument write:]): (-[HTMLDocument writeln:]): (-[HTMLDocument getElementById:]): (-[HTMLDocument getElementsByName:]): (-[HTMLHtmlElement _HTMLHtmlElementImpl]): (-[HTMLHtmlElement version]): (-[HTMLHtmlElement setVersion:]): (-[HTMLHeadElement _headElementImpl]): (-[HTMLHeadElement profile]): (-[HTMLHeadElement setProfile:]): (-[HTMLLinkElement _linkElementImpl]): (-[HTMLLinkElement disabled]): (-[HTMLLinkElement setDisabled:]): (-[HTMLLinkElement charset]): (-[HTMLLinkElement setCharset:]): (-[HTMLLinkElement href]): (-[HTMLLinkElement setHref:]): (-[HTMLLinkElement hreflang]): (-[HTMLLinkElement setHreflang:]): (-[HTMLLinkElement media]): (-[HTMLLinkElement setMedia:]): (-[HTMLLinkElement rel]): (-[HTMLLinkElement setRel:]): (-[HTMLLinkElement rev]): (-[HTMLLinkElement setRev:]): (-[HTMLLinkElement target]): (-[HTMLLinkElement setTarget:]): (-[HTMLLinkElement type]): (-[HTMLLinkElement setType:]): (-[HTMLTitleElement _titleElementImpl]): (-[HTMLTitleElement text]): (-[HTMLTitleElement setText:]): (-[HTMLMetaElement _metaElementImpl]): (-[HTMLMetaElement content]): (-[HTMLMetaElement setContent:]): (-[HTMLMetaElement httpEquiv]): (-[HTMLMetaElement setHttpEquiv:]): (-[HTMLMetaElement name]): (-[HTMLMetaElement setName:]): (-[HTMLMetaElement scheme]): (-[HTMLMetaElement setScheme:]): (-[HTMLBaseElement _baseElementImpl]): (-[HTMLBaseElement href]): (-[HTMLBaseElement setHref:]): (-[HTMLBaseElement target]): (-[HTMLBaseElement setTarget:]): (-[HTMLStyleElement _styleElementImpl]): (-[HTMLStyleElement disabled]): (-[HTMLStyleElement setDisabled:]): (-[HTMLStyleElement media]): (-[HTMLStyleElement setMedia:]): (-[HTMLStyleElement type]): (-[HTMLStyleElement setType:]): (-[HTMLBodyElement _bodyElementImpl]): (-[HTMLBodyElement aLink]): (-[HTMLBodyElement setALink:]): (-[HTMLBodyElement background]): (-[HTMLBodyElement setBackground:]): (-[HTMLBodyElement bgColor]): (-[HTMLBodyElement setBgColor:]): (-[HTMLBodyElement link]): (-[HTMLBodyElement setLink:]): (-[HTMLBodyElement text]): (-[HTMLBodyElement setText:]): (-[HTMLBodyElement vLink]): (-[HTMLBodyElement setVLink:]): 2004-03-12 David Hyatt Fix for problem when undoing the deletion of a word in edit mode. Reviewed by kocienda * khtml/rendering/render_text.cpp: (RenderText::setTextWithOffset): 2004-03-12 Ken Kocienda Reviewed by Chris * khtml/khtml_part.cpp: (KHTMLPart::handleMouseMoveEventSelection): Clear the selection's "modify bias" since the user clicked, and is therefore no longer extending the selection with arrow keys. * khtml/khtml_selection.cpp: (KHTMLSelection::KHTMLSelection): Add new m_modifyBiasSet flag. (KHTMLSelection::init): Set the flag to false by default. (KHTMLSelection::operator=): Copy over the value of the new m_modifyBiasSet flag. (KHTMLSelection::modify): Set the flag if extending the selection and set the base and extent nodes based on the movement direction requested. * khtml/khtml_selection.h: * kwq/WebCoreBridge.h: See below. * kwq/WebCoreBridge.mm: (-[WebCoreBridge rangeByAlteringCurrentSelection:direction:granularity:]): This method is used by the WebKit side in response to requests to change the selection using the arrow keys. It used to be called rangeByModifyingRange:alteration:direction:granularity: but I changed it to this new format since I explicitly want to use the current selection, and not some arbitrarily passed in selection. This helps to maintain the "modify bias" correctly. (-[WebCoreBridge alterCurrentSelection:direction:granularity:]): New method. A command to alter the current selection as given. Again, applying the command to the current selection, rather than just setting the selection to a new one, helps to maintain the "modify bias" correctly. 2004-03-11 Chris Blumenberg Added stubs for the HTML DOM API. Reviewed by rjw. * WebCore.pbproj/project.pbxproj: * kwq/HTMLDOM.h: Added. * kwq/HTMLDOM.mm: Added. (-[HTMLCollection length]): (-[HTMLCollection item:]): (-[HTMLCollection namedItem:]): (-[HTMLElement idName]): (-[HTMLElement setIdName:]): (-[HTMLElement title]): (-[HTMLElement setTitle:]): (-[HTMLElement lang]): (-[HTMLElement setLang:]): (-[HTMLElement dir]): (-[HTMLElement setDir:]): (-[HTMLElement className]): (-[HTMLElement setClassName:]): (-[HTMLDocument title]): (-[HTMLDocument setTitle:]): (-[HTMLDocument referrer]): (-[HTMLDocument domain]): (-[HTMLDocument URL]): (-[HTMLDocument body]): (-[HTMLDocument images]): (-[HTMLDocument applets]): (-[HTMLDocument links]): (-[HTMLDocument forms]): (-[HTMLDocument anchors]): (-[HTMLDocument setBody:]): (-[HTMLDocument cookie]): (-[HTMLDocument setCookie:]): (-[HTMLDocument open]): (-[HTMLDocument close]): (-[HTMLDocument write:]): (-[HTMLDocument writeln:]): (-[HTMLDocument getElementById:]): (-[HTMLDocument getElementsByName:]): (-[HTMLHtmlElement version]): (-[HTMLHtmlElement setVersion:]): (-[HTMLHeadElement profile]): (-[HTMLHeadElement setProfile:]): (-[HTMLLinkElement disabled]): (-[HTMLLinkElement setDisabled:]): (-[HTMLLinkElement charset]): (-[HTMLLinkElement setCharset:]): (-[HTMLLinkElement href]): (-[HTMLLinkElement setHref:]): (-[HTMLLinkElement hreflang]): (-[HTMLLinkElement setHreflang:]): (-[HTMLLinkElement media]): (-[HTMLLinkElement setMedia:]): (-[HTMLLinkElement rel]): (-[HTMLLinkElement setRrevel:]): (-[HTMLLinkElement rev]): (-[HTMLLinkElement setRev:]): (-[HTMLLinkElement target]): (-[HTMLLinkElement setTarget:]): (-[HTMLLinkElement type]): (-[HTMLLinkElement setType:]): (-[HTMLTitleElement text]): (-[HTMLTitleElement setText:]): (-[HTMLMetaElement content]): (-[HTMLMetaElement setContent:]): (-[HTMLMetaElement httpEquiv]): (-[HTMLMetaElement setHttpEquiv:]): (-[HTMLMetaElement name]): (-[HTMLMetaElement setName:]): (-[HTMLMetaElement scheme]): (-[HTMLMetaElement setScheme:]): (-[HTMLBaseElement href]): (-[HTMLBaseElement setHref:]): (-[HTMLBaseElement target]): (-[HTMLBaseElement setTarget:]): (-[HTMLStyleElement disabled]): (-[HTMLStyleElement setDisabled:]): (-[HTMLStyleElement media]): (-[HTMLStyleElement setMedia:]): (-[HTMLStyleElement type]): (-[HTMLStyleElement setType:]): (-[HTMLBodyElement aLink]): (-[HTMLBodyElement setALink:]): (-[HTMLBodyElement background]): (-[HTMLBodyElement setBackground:]): (-[HTMLBodyElement bgColor]): (-[HTMLBodyElement setBgColor:]): (-[HTMLBodyElement link]): (-[HTMLBodyElement setLink:]): (-[HTMLBodyElement text]): (-[HTMLBodyElement setText:]): (-[HTMLBodyElement vLink]): (-[HTMLBodyElement setVLink:]): (-[HTMLFormElement elements]): (-[HTMLFormElement length]): (-[HTMLFormElement name]): (-[HTMLFormElement setName:]): (-[HTMLFormElement acceptCharset]): (-[HTMLFormElement setAcceptCharset:]): (-[HTMLFormElement action]): (-[HTMLFormElement setAction:]): (-[HTMLFormElement enctype]): (-[HTMLFormElement setEnctype:]): (-[HTMLFormElement method]): (-[HTMLFormElement setMethod:]): (-[HTMLFormElement target]): (-[HTMLFormElement setTarget:]): (-[HTMLFormElement submit]): (-[HTMLFormElement reset]): (-[HTMLIsIndexElement form]): (-[HTMLIsIndexElement prompt]): (-[HTMLIsIndexElement setPrompt:]): (-[HTMLSelectElement type]): (-[HTMLSelectElement selectedIndex]): (-[HTMLSelectElement setSelectedIndex:]): (-[HTMLSelectElement value]): (-[HTMLSelectElement setValue:]): (-[HTMLSelectElement length]): (-[HTMLSelectElement form]): (-[HTMLSelectElement options]): (-[HTMLSelectElement disabled]): (-[HTMLSelectElement multiple]): (-[HTMLSelectElement name]): (-[HTMLSelectElement setName:]): (-[HTMLSelectElement size]): (-[HTMLSelectElement tabIndex]): (-[HTMLSelectElement add::]): (-[HTMLSelectElement remove:]): (-[HTMLSelectElement blur]): (-[HTMLSelectElement focus]): (-[HTMLOptGroupElement disabled]): (-[HTMLOptGroupElement setDisabled:]): (-[HTMLOptGroupElement label]): (-[HTMLOptGroupElement setLabel:]): (-[HTMLOptionElement form]): (-[HTMLOptionElement defaultSelected]): (-[HTMLOptionElement setDefaultSelected:]): (-[HTMLOptionElement text]): (-[HTMLOptionElement index]): (-[HTMLOptionElement setIndex:]): (-[HTMLOptionElement disabled]): (-[HTMLOptionElement setDisabled:]): (-[HTMLOptionElement label]): (-[HTMLOptionElement setLabel:]): (-[HTMLOptionElement selected]): (-[HTMLOptionElement value]): (-[HTMLOptionElement setValue:]): (-[HTMLInputElement defaultValue]): (-[HTMLInputElement setDefaultValue:]): (-[HTMLInputElement defaultChecked]): (-[HTMLInputElement setDefaultChecked:]): (-[HTMLInputElement form]): (-[HTMLInputElement accept]): (-[HTMLInputElement setAccept:]): (-[HTMLInputElement accessKey]): (-[HTMLInputElement setAccessKey:]): (-[HTMLInputElement align]): (-[HTMLInputElement setAlign:]): (-[HTMLInputElement alt]): (-[HTMLInputElement setAlt:]): (-[HTMLInputElement checked]): (-[HTMLInputElement setChecked:]): (-[HTMLInputElement disabled]): (-[HTMLInputElement setDisabled:]): (-[HTMLInputElement maxLength]): (-[HTMLInputElement setMaxLength:]): (-[HTMLInputElement name]): (-[HTMLInputElement setName:]): (-[HTMLInputElement readOnly]): (-[HTMLInputElement setReadOnly:]): (-[HTMLInputElement size]): (-[HTMLInputElement setSize:]): (-[HTMLInputElement src]): (-[HTMLInputElement setSrc:]): (-[HTMLInputElement tabIndex]): (-[HTMLInputElement setTabIndex:]): (-[HTMLInputElement type]): (-[HTMLInputElement useMap]): (-[HTMLInputElement setUseMap:]): (-[HTMLInputElement value]): (-[HTMLInputElement setValue:]): (-[HTMLInputElement blur]): (-[HTMLInputElement focus]): (-[HTMLInputElement select]): (-[HTMLInputElement click]): (-[HTMLTextAreaElement defaultValue]): (-[HTMLTextAreaElement setDefaultValue:]): (-[HTMLTextAreaElement form]): (-[HTMLTextAreaElement accessKey]): (-[HTMLTextAreaElement setAccessKey:]): (-[HTMLTextAreaElement cols]): (-[HTMLTextAreaElement setCols:]): (-[HTMLTextAreaElement disabled]): (-[HTMLTextAreaElement setDisabled:]): (-[HTMLTextAreaElement name]): (-[HTMLTextAreaElement setName:]): (-[HTMLTextAreaElement readOnly]): (-[HTMLTextAreaElement setReadOnly:]): (-[HTMLTextAreaElement rows]): (-[HTMLTextAreaElement setRows:]): (-[HTMLTextAreaElement tabIndex]): (-[HTMLTextAreaElement setTabIndex:]): (-[HTMLTextAreaElement type]): (-[HTMLTextAreaElement value]): (-[HTMLTextAreaElement setValue:]): (-[HTMLTextAreaElement blur]): (-[HTMLTextAreaElement focus]): (-[HTMLTextAreaElement select]): (-[HTMLButtonElement form]): (-[HTMLButtonElement accessKey]): (-[HTMLButtonElement setAccessKey:]): (-[HTMLButtonElement disabled]): (-[HTMLButtonElement setDisabled:]): (-[HTMLButtonElement name]): (-[HTMLButtonElement setName:]): (-[HTMLButtonElement tabIndex]): (-[HTMLButtonElement setTabIndex:]): (-[HTMLButtonElement type]): (-[HTMLButtonElement value]): (-[HTMLButtonElement setValue:]): (-[HTMLLabelElement form]): (-[HTMLLabelElement accessKey]): (-[HTMLLabelElement setAccessKey:]): (-[HTMLLabelElement htmlFor]): (-[HTMLLabelElement setHtmlFor:]): (-[HTMLFieldSetElement form]): (-[HTMLLegendElement form]): (-[HTMLLegendElement accessKey]): (-[HTMLLegendElement setAccessKey:]): (-[HTMLLegendElement align]): (-[HTMLLegendElement setAlign:]): (-[HTMLUListElement compact]): (-[HTMLUListElement setCompact:]): (-[HTMLUListElement type]): (-[HTMLUListElement setType:]): (-[HTMLOListElement compact]): (-[HTMLOListElement setCompact:]): (-[HTMLOListElement start]): (-[HTMLOListElement setStart:]): (-[HTMLOListElement type]): (-[HTMLOListElement setType:]): (-[HTMLDListElement compact]): (-[HTMLDListElement setCompact:]): (-[HTMLDirectoryElement compact]): (-[HTMLDirectoryElement setCompact:]): (-[HTMLMenuElement compact]): (-[HTMLMenuElement setCompact:]): (-[HTMLLIElement type]): (-[HTMLLIElement setType:]): (-[HTMLLIElement value]): (-[HTMLLIElement setValue:]): (-[HTMLBlockquoteElement cite]): (-[HTMLBlockquoteElement setCite:]): (-[HTMLDivElement align]): (-[HTMLDivElement setAlign:]): (-[HTMLParagraphElement align]): (-[HTMLParagraphElement setAlign:]): (-[HTMLHeadingElement align]): (-[HTMLHeadingElement setAlign:]): (-[HTMLQuoteElement cite]): (-[HTMLQuoteElement setCite:]): (-[HTMLPreElement width]): (-[HTMLPreElement setWidth:]): (-[HTMLBRElement clear]): (-[HTMLBRElement setClear:]): (-[HTMLBaseFontElement color]): (-[HTMLBaseFontElement setColor:]): (-[HTMLBaseFontElement face]): (-[HTMLBaseFontElement setFace:]): (-[HTMLBaseFontElement size]): (-[HTMLBaseFontElement setSize:]): (-[HTMLFontElement color]): (-[HTMLFontElement setColor:]): (-[HTMLFontElement face]): (-[HTMLFontElement setFace:]): (-[HTMLFontElement size]): (-[HTMLFontElement setSize:]): (-[HTMLHRElement align]): (-[HTMLHRElement setAlign:]): (-[HTMLHRElement noShade]): (-[HTMLHRElement setNoShade:]): (-[HTMLHRElement size]): (-[HTMLHRElement setSize:]): (-[HTMLHRElement width]): (-[HTMLHRElement setWidth:]): (-[HTMLModElement cite]): (-[HTMLModElement setCite:]): (-[HTMLModElement dateTime]): (-[HTMLModElement setDateTime:]): (-[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]): (-[HTMLImageElement lowSrc]): (-[HTMLImageElement setLowSrc:]): (-[HTMLImageElement name]): (-[HTMLImageElement setName:]): (-[HTMLImageElement align]): (-[HTMLImageElement setAlign:]): (-[HTMLImageElement alt]): (-[HTMLImageElement setAlt:]): (-[HTMLImageElement border]): (-[HTMLImageElement setBorder:]): (-[HTMLImageElement height]): (-[HTMLImageElement setHeight:]): (-[HTMLImageElement hspace]): (-[HTMLImageElement setHspace:]): (-[HTMLImageElement isMap]): (-[HTMLImageElement setIsMap:]): (-[HTMLImageElement longDesc]): (-[HTMLImageElement setLongDesc:]): (-[HTMLImageElement src]): (-[HTMLImageElement setSrc:]): (-[HTMLImageElement useMap]): (-[HTMLImageElement setUseMap:]): (-[HTMLImageElement vspace]): (-[HTMLImageElement setVspace:]): (-[HTMLImageElement width]): (-[HTMLImageElement setWidth:]): (-[HTMLObjectElement form]): (-[HTMLObjectElement code]): (-[HTMLObjectElement setCode:]): (-[HTMLObjectElement align]): (-[HTMLObjectElement setAlign:]): (-[HTMLObjectElement archive]): (-[HTMLObjectElement setArchive:]): (-[HTMLObjectElement border]): (-[HTMLObjectElement setBorder:]): (-[HTMLObjectElement codeBase]): (-[HTMLObjectElement setCodeBase:]): (-[HTMLObjectElement codeType]): (-[HTMLObjectElement setCodeType:]): (-[HTMLObjectElement data]): (-[HTMLObjectElement setData:]): (-[HTMLObjectElement declare]): (-[HTMLObjectElement setDeclare:]): (-[HTMLObjectElement height]): (-[HTMLObjectElement setHeight:]): (-[HTMLObjectElement hspace]): (-[HTMLObjectElement setHspace:]): (-[HTMLObjectElement name]): (-[HTMLObjectElement setName:]): (-[HTMLObjectElement standby]): (-[HTMLObjectElement setStandby:]): (-[HTMLObjectElement tabIndex]): (-[HTMLObjectElement setTabIndex:]): (-[HTMLObjectElement type]): (-[HTMLObjectElement setType:]): (-[HTMLObjectElement useMap]): (-[HTMLObjectElement setUseMap:]): (-[HTMLObjectElement vspace]): (-[HTMLObjectElement setVspace:]): (-[HTMLObjectElement width]): (-[HTMLObjectElement setWidth:]): (-[HTMLParamElement name]): (-[HTMLParamElement setName:]): (-[HTMLParamElement type]): (-[HTMLParamElement setType:]): (-[HTMLParamElement value]): (-[HTMLParamElement setValue:]): (-[HTMLParamElement valueType]): (-[HTMLParamElement setValueType:]): (-[HTMLAppletElement align]): (-[HTMLAppletElement setAlign:]): (-[HTMLAppletElement alt]): (-[HTMLAppletElement setAlt:]): (-[HTMLAppletElement archive]): (-[HTMLAppletElement setArchive:]): (-[HTMLAppletElement code]): (-[HTMLAppletElement setCode:]): (-[HTMLAppletElement codeBase]): (-[HTMLAppletElement setCodeBase:]): (-[HTMLAppletElement codeType]): (-[HTMLAppletElement setCodeType:]): (-[HTMLAppletElement height]): (-[HTMLAppletElement setHeight:]): (-[HTMLAppletElement hspace]): (-[HTMLAppletElement setHspace:]): (-[HTMLAppletElement name]): (-[HTMLAppletElement setName:]): (-[HTMLAppletElement object]): (-[HTMLAppletElement setObject:]): (-[HTMLAppletElement vspace]): (-[HTMLAppletElement setVspace:]): (-[HTMLAppletElement width]): (-[HTMLAppletElement setWidth:]): (-[HTMLMapElement areas]): (-[HTMLMapElement name]): (-[HTMLMapElement setName:]): (-[HTMLAreaElement accessKey]): (-[HTMLAreaElement setAccessKey:]): (-[HTMLAreaElement alt]): (-[HTMLAreaElement setAlt:]): (-[HTMLAreaElement coords]): (-[HTMLAreaElement setCoords:]): (-[HTMLAreaElement href]): (-[HTMLAreaElement setHref:]): (-[HTMLAreaElement noHref]): (-[HTMLAreaElement setNoHref:]): (-[HTMLAreaElement shape]): (-[HTMLAreaElement setShape:]): (-[HTMLAreaElement tabIndex]): (-[HTMLAreaElement setTabIndex:]): (-[HTMLAreaElement target]): (-[HTMLAreaElement setTarget:]): (-[HTMLScriptElement text]): (-[HTMLScriptElement setText:]): (-[HTMLScriptElement htmlFor]): (-[HTMLScriptElement setHtmlFor:]): (-[HTMLScriptElement event]): (-[HTMLScriptElement setEvent:]): (-[HTMLScriptElement charset]): (-[HTMLScriptElement setCharset:]): (-[HTMLScriptElement defer]): (-[HTMLScriptElement setDefer:]): (-[HTMLScriptElement src]): (-[HTMLScriptElement setSrc:]): (-[HTMLScriptElement type]): (-[HTMLScriptElement setType:]): (-[HTMLTableCaptionElement align]): (-[HTMLTableCaptionElement setAlign:]): (-[HTMLTableSectionElement align]): (-[HTMLTableSectionElement setAlign:]): (-[HTMLTableSectionElement ch]): (-[HTMLTableSectionElement setCh:]): (-[HTMLTableSectionElement chOff]): (-[HTMLTableSectionElement setChOff:]): (-[HTMLTableSectionElement vAlign]): (-[HTMLTableSectionElement setVAlign:]): (-[HTMLTableSectionElement rows]): (-[HTMLTableSectionElement insertRow:]): (-[HTMLTableSectionElement deleteRow:]): (-[HTMLTableElement caption]): (-[HTMLTableElement tHead]): (-[HTMLTableElement tFoot]): (-[HTMLTableElement rows]): (-[HTMLTableElement tBodies]): (-[HTMLTableElement align]): (-[HTMLTableElement setAlign:]): (-[HTMLTableElement bgColor]): (-[HTMLTableElement setBgColor:]): (-[HTMLTableElement border]): (-[HTMLTableElement setBorder:]): (-[HTMLTableElement cellPadding]): (-[HTMLTableElement setCellPadding:]): (-[HTMLTableElement cellSpacing]): (-[HTMLTableElement setCellSpacing:]): (-[HTMLTableElement frame]): (-[HTMLTableElement setFrame:]): (-[HTMLTableElement rules]): (-[HTMLTableElement setRules:]): (-[HTMLTableElement summary]): (-[HTMLTableElement setSummary:]): (-[HTMLTableElement width]): (-[HTMLTableElement setWidth:]): (-[HTMLTableElement createTHead]): (-[HTMLTableElement deleteTHead]): (-[HTMLTableElement createTFoot]): (-[HTMLTableElement deleteTFoot]): (-[HTMLTableElement createCaption]): (-[HTMLTableElement deleteCaption]): (-[HTMLTableElement deleteRow:]): (-[HTMLTableColElement align]): (-[HTMLTableColElement setAlign:]): (-[HTMLTableColElement ch]): (-[HTMLTableColElement setCh:]): (-[HTMLTableColElement chOff]): (-[HTMLTableColElement setChOff:]): (-[HTMLTableColElement span]): (-[HTMLTableColElement setSpan:]): (-[HTMLTableColElement vAlign]): (-[HTMLTableColElement setVAlign:]): (-[HTMLTableColElement width]): (-[HTMLTableColElement setWidth:]): (-[HTMLTableRowElement rowIndex]): (-[HTMLTableRowElement setRowIndex:]): (-[HTMLTableRowElement sectionRowIndex]): (-[HTMLTableRowElement setSectionRowIndex:]): (-[HTMLTableRowElement cells]): (-[HTMLTableRowElement setCells:]): (-[HTMLTableRowElement align]): (-[HTMLTableRowElement setAlign:]): (-[HTMLTableRowElement bgColor]): (-[HTMLTableRowElement setBgColor:]): (-[HTMLTableRowElement ch]): (-[HTMLTableRowElement setCh:]): (-[HTMLTableRowElement chOff]): (-[HTMLTableRowElement setChOff:]): (-[HTMLTableRowElement vAlign]): (-[HTMLTableRowElement setVAlign:]): (-[HTMLTableRowElement insertCell:]): (-[HTMLTableRowElement deleteCell:]): (-[HTMLTableCellElement cellIndex]): (-[HTMLTableCellElement setCellIndex:]): (-[HTMLTableCellElement abbr]): (-[HTMLTableCellElement setAbbr:]): (-[HTMLTableCellElement align]): (-[HTMLTableCellElement setAlign:]): (-[HTMLTableCellElement axis]): (-[HTMLTableCellElement setAxis:]): (-[HTMLTableCellElement bgColor]): (-[HTMLTableCellElement setBgColor:]): (-[HTMLTableCellElement ch]): (-[HTMLTableCellElement setCh:]): (-[HTMLTableCellElement chOff]): (-[HTMLTableCellElement setChOff:]): (-[HTMLTableCellElement colSpan]): (-[HTMLTableCellElement setColSpan:]): (-[HTMLTableCellElement headers]): (-[HTMLTableCellElement setHeaders:]): (-[HTMLTableCellElement height]): (-[HTMLTableCellElement setHeight:]): (-[HTMLTableCellElement noWrap]): (-[HTMLTableCellElement setNoWrap:]): (-[HTMLTableCellElement rowSpan]): (-[HTMLTableCellElement setRowSpan:]): (-[HTMLTableCellElement scope]): (-[HTMLTableCellElement setScope:]): (-[HTMLTableCellElement vAlign]): (-[HTMLTableCellElement setVAlign:]): (-[HTMLTableCellElement width]): (-[HTMLTableCellElement setWidth:]): (-[HTMLFrameSetElement cols]): (-[HTMLFrameSetElement setCols:]): (-[HTMLFrameSetElement rows]): (-[HTMLFrameSetElement setRows:]): (-[HTMLFrameElement frameBorder]): (-[HTMLFrameElement setFrameBorder:]): (-[HTMLFrameElement longDesc]): (-[HTMLFrameElement setLongDesc:]): (-[HTMLFrameElement marginHeight]): (-[HTMLFrameElement setMarginHeight:]): (-[HTMLFrameElement marginWidth]): (-[HTMLFrameElement setMarginWidth:]): (-[HTMLFrameElement name]): (-[HTMLFrameElement setName:]): (-[HTMLFrameElement noResize]): (-[HTMLFrameElement setNoResize:]): (-[HTMLFrameElement scrolling]): (-[HTMLFrameElement setScrolling:]): (-[HTMLFrameElement src]): (-[HTMLFrameElement setSrc:]): (-[HTMLIFrameElement align]): (-[HTMLIFrameElement setAlign:]): (-[HTMLIFrameElement frameBorder]): (-[HTMLIFrameElement setFrameBorder:]): (-[HTMLIFrameElement height]): (-[HTMLIFrameElement setHeight:]): (-[HTMLIFrameElement longDesc]): (-[HTMLIFrameElement setLongDesc:]): (-[HTMLIFrameElement marginHeight]): (-[HTMLIFrameElement setMarginHeight:]): (-[HTMLIFrameElement marginWidth]): (-[HTMLIFrameElement setMarginWidth:]): (-[HTMLIFrameElement name]): (-[HTMLIFrameElement setName:]): (-[HTMLIFrameElement scrolling]): (-[HTMLIFrameElement setScrolling:]): (-[HTMLIFrameElement src]): (-[HTMLIFrameElement setSrc:]): (-[HTMLIFrameElement width]): (-[HTMLIFrameElement setWidth:]): 2004-03-11 Ken Kocienda Reviewed by Dave I have clarified the concept (at least in my head) that each edit command has an obligation to put the selection in the right place after it is applied, unapplied, or reapplied. Right now, each edit command calls setStartingSelection and setEndingSelection to do this, I made these function move the selection on setting. * khtml/editing/htmlediting_impl.cpp: (EditCommandImpl::setStartingSelection) (EditCommandImpl::setEndingSelection) (InputTextCommandImpl::coalesce) (InputTextCommandImpl::deleteCharacter) (InputTextCommandImpl::execute) * khtml/editing/htmlediting_impl.h: 2004-03-11 Ken Kocienda Reviewed by Dave Various changes to move us forward on editing. 1. I reorganized the concrete EditCommand interface and implementation classes alphabetically in their respective files, to make it easier to find things. 2. I added a TypingCommand composite class to gang up all keystrokes and make it possible to pass a single command over to the Cocoa undo system in all cases. 3. I now send all keystrokes back over to WebKit to be interpreted by the text input system. In concert with the many new NSResponder method implementations I added to WebView, we now respond to keystrokes in a much more Cocoa-like way that sets us down the path to integrating with the Cocoa text input system some day. 4. I fixed up our integration with the Cocoa undo system. I also removed much of the undo support code from the KHTMPart class. As a replacement, I implemented reporting of undoable commands to KHTMLPart so that a KDE hookup is quite feasible. As a result, undo should "just work" in Blot (Chris has reported that it has been busted). 5. I added the DOM CSS bindings for Objective-C. This required some rearranging of the existing DOM bindings code, and while I was there, I did various cleanups in the existing DOM bindings. * About 400 lines of changed files and functions elided. 2004-03-11 Chris Blumenberg Fixed some spacing issues in reconstructed source and web archives that were caused by a malformed doc type string that we were constructing. Reviewed by darin. * khtml/html/html_documentimpl.cpp: (HTMLDocumentImpl::determineParseMode): set the public ID and system ID on the doc type * khtml/xml/dom_docimpl.cpp: (DocumentTypeImpl::toString): put a space between DOCTYPE and the name * khtml/xml/dom_docimpl.h: (DOM::DocumentTypeImpl::setPublicId): new (DOM::DocumentTypeImpl::setSystemId): new 2004-03-10 David Hyatt Fix for 3584646, AxWebArea should encompass all children (its AxSize should). Reviewed by mjs * khtml/rendering/render_canvas.cpp: (RenderCanvas::absoluteRects): * khtml/rendering/render_canvas.h: 2004-03-10 Chris Blumenberg Fixed: INPUT images are not part of web archives. Reviewed by rjw. * khtml/html/html_formimpl.cpp: (HTMLInputElementImpl::isSubresourceURLAttribute): * khtml/html/html_formimpl.h: 2004-03-09 Chris Blumenberg Implemented WebCore side of: : API: web archive related API's Reviewed by rjw. * WebCore-combined.exp: * WebCore.exp: * kwq/DOM.mm: (+[DOMRange _rangeWithImpl:]): made internally accessible (-[DOMRange _rangeImpl]): ditto * kwq/DOMInternal.h: * kwq/KWQStringList.h: * kwq/KWQStringList.mm: (QStringList::getNSArray): new * kwq/WebCoreBridge.h: * kwq/WebCoreBridge.mm: (-[WebCoreBridge pasteMarkupString:]): renamed from pasteHTMLString since XML pasting may be possible (-[WebCoreBridge selectedRange]): new (-[WebCoreBridge _documentTypeString]): new (-[WebCoreBridge _stringWithDocumentTypeStringAndMarkupString:]): new (-[WebCoreBridge markupStringFromNode:subresourceURLStrings:]): new, needed for WebKit API's (-[WebCoreBridge markupStringFromRange:subresourceURLStrings:]): new, needed for WebKit API's 2004-03-09 David Hyatt Make the AXLinkUIElements attribute always return an array (never return nil). * kwq/KWQAccObject.mm: (-[KWQAccObject accessibilityAttributeValue:]): 2004-03-09 David Hyatt (1) Change root element in a document to have a role of AXWebArea. (2) Add support for AXURL to links and children of links. (3) Add support for AXLinkUIElements to the AXWebArea Reviewed by john * khtml/dom/html_misc.h: * kwq/KWQAccObject.mm: (-[KWQAccObject role]): (-[KWQAccObject roleDescription]): (-[KWQAccObject accessibilityAttributeNames]): (-[KWQAccObject accessibilityAttributeValue:]): 2004-03-09 John Sullivan Reviewed by nobody. * kwq/KWQKURL.mm: (KURL::KURL): Fixed broken build by removing wayward "break" statement. 2004-03-08 Darin Adler Reviewed by Maciej. - fixed : REGRESSION (100-125): cannot upload file if path contains non-ASCII characters * kwq/KWQKURL.mm: Remove Colon constant so we can fit in 8 bits again. (KURL::KURL): Rewrite so we don't need isSchemeCharOrColon. === Safari-131 === 2004-03-08 Ken Kocienda Reviewed by Darin * WebCore.pbproj/project.pbxproj: Added CFBundleName to Info.plist. 2004-03-05 David Hyatt Fix for first-line inheritance problem caused by incorrectly inheriting first-line into floating blocks. Reviewed by kocienda * khtml/rendering/render_block.cpp: (khtml::RenderBlock::firstLineBlock): 2004-03-05 Ken Kocienda Reviewed by me. Forgot to add this when I checked in last time. * ForwardingHeaders/css/css_computedstyle.h: Added. 2004-03-05 Ken Kocienda Reviewed by Dave. Added initial support for retrieving the computed style of document elements. * WebCore.pbproj/project.pbxproj: * khtml/css/css_computedstyle.cpp: Added. (DOM::valueForLength): Helper to turn a khtml::Length into a computed value string. (DOM::stringForBorderStyle): Helper to turn an EBorderStyle into a computed value string. (DOM::stringForTextAlign): Helper to turn an ETextAlign into a computed value string. (DOM::CSSComputedStyleDeclarationImpl::CSSComputedStyleDeclarationImpl): New function. (DOM::CSSComputedStyleDeclarationImpl::~CSSComputedStyleDeclarationImpl): Ditto. (DOM::CSSComputedStyleDeclarationImpl::cssText): Ditto. (DOM::CSSComputedStyleDeclarationImpl::setCssText): Ditto. (DOM::CSSComputedStyleDeclarationImpl::getPropertyCSSValue): Ditto. (DOM::CSSComputedStyleDeclarationImpl::getPropertyValue): Ditto. (DOM::CSSComputedStyleDeclarationImpl::getPropertyPriority): Ditto. (DOM::CSSComputedStyleDeclarationImpl::removeProperty): Ditto. (DOM::CSSComputedStyleDeclarationImpl::setProperty): Ditto. (DOM::CSSComputedStyleDeclarationImpl::setLengthProperty): Ditto. (DOM::CSSComputedStyleDeclarationImpl::item): Ditto. (DOM::CSSComputedStyleDeclarationImpl::property): Ditto. * khtml/css/css_computedstyle.h: Added. * khtml/css/css_valueimpl.cpp: (CSSPrimitiveValueImpl::cssText): Fixed some formatting of Rect. Added suppoprt for rgba colors. * khtml/css/css_valueimpl.h: (DOM::CSSStyleDeclarationImpl::node): * khtml/ecma/kjs_css.cpp: (KJS::getDOMCSSStyleDeclaration): * khtml/ecma/kjs_dom.cpp: (DOMDocument::getValueProperty): defaultView is a property, used to be a function, which was wrong. Fixed. (DOMDocumentProtoFunc::tryCall): Ditto. * khtml/ecma/kjs_dom.lut.h: (KJS::): Regenerated file. * khtml/misc/khtmllayout.h: (khtml::Length::length): Added an accessor to the value, to promote better coding style, rather than peeking and poking the value directly. * khtml/rendering/render_style.h: (khtml::RenderStyle::borderLeftWidth): BHIDDEN also should be treated like BNONE when it comes to returning a zero value. Now it is. (khtml::RenderStyle::borderRightWidth): Ditto. (khtml::RenderStyle::borderTopWidth): Ditto. (khtml::RenderStyle::borderBottomWidth): Ditto. (khtml::RenderStyle::outlineWidth): Ditto. (khtml::RenderStyle::outlineOffset): Ditto. * khtml/xml/dom2_viewsimpl.cpp: (AbstractViewImpl::getComputedStyle): Added an implementation for this formerly stubbed out function. 2004-03-05 Ken Kocienda Change by Darin. Reviewed by me. * kwq/DOM.mm: Fixed the following functions to deal with casting objects derived from NodeImpl back and forth to NodeImpl given that the derived classes use multiple inheritance. (-[DOMDocument _documentImpl]): (-[DOMCharacterData _characterDataImpl]): (-[DOMAttr _attrImpl]): (-[DOMElement _elementImpl]): (-[DOMText _textImpl]): (-[DOMDocumentType _documentTypeImpl]): (-[DOMNotation _notationImpl]): (-[DOMEntity _entityImpl]): (-[DOMProcessingInstruction _processingInstructionImpl]): 2004-03-03 Darin Adler Reviewed by Vicki. * English.lproj/InfoPlist.strings: Removed. No need to localize the version and copyright string, and that's all that was in here. * WebCore.pbproj/project.pbxproj: Removed InfoPlist.strings from build. 2004-03-03 David Hyatt Speed up access to the children arrays of accessibility objects by caching mutable arrays of children and nulling them out only when the children change. Reviewed by john * khtml/rendering/render_container.cpp: (RenderContainer::removeChildNode): (RenderContainer::appendChildNode): (RenderContainer::insertChildNode): * kwq/KWQAccObject.h: * kwq/KWQAccObject.mm: (-[KWQAccObject detach]): (-[KWQAccObject accessibilityAttributeValue:]): (-[KWQAccObject childrenChanged]): (-[KWQAccObject clearChildren]): * kwq/KWQAccObjectCache.h: * kwq/KWQAccObjectCache.mm: (KWQAccObjectCache::childrenChanged): 2004-03-02 Ken Kocienda Reviewed by Darin and me. Coding by Darin and me. 1) Fix some places that were calling [self class], in at least one case calling a method not defined on the class (not gonna work). 2) Add underscore prefix for all non-API method names. 3) Make DOMObject refuse to init, which might prevent problems where people get confused and think they can subclass or instantiate it or its subclasses. 4) Use some C+mojo to replace NSStringToDOMString and DOMStringToNSString with type conversions built into the DOMString class. 5) Removed NSError out parameters from the API. Methods now throw NSExceptions. 6) Exception code local variables now initialized before passing to khtml DOM impl calls. 7) Various other cleanups and tweaks. * khtml/dom/dom_string.h * khtml/xml/dom_atomicstring.h * kwq/DOM.h * kwq/DOM.mm * kwq/DOMInternal.h * kwq/KWQKHTMLPart.mm * kwq/WebCoreBridge.mm 2004-03-02 Richard Williamson Added NP_SAP API. This API includes the new entry points used to bind native interfaces to JavaScript. It's final location may change. Made changes to KWQKHTMLPart.mm to reflect changes in names on RootObject. Reviewed by Chris. * WebCore.pbproj/project.pbxproj: * khtml/ecma/NP_SAP.h: Added. * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::cleanupPluginRootObjects): * kwq/WebCoreBridge.mm: 2004-03-01 Maciej Stachowiak Reviewed by Darin. : repro crash in KHTMLPart::begin inside JavaScript code (gmpartsdirect.com) Added some null checks. I am not sure why this page attaches a document that has no view, but these changes make it work perfectly. * khtml/khtml_part.cpp: (KHTMLPart::begin): Add check for null view before use. * khtml/xml/dom_docimpl.cpp: (DocumentImpl::close): ditto (DocumentImpl::recalcStyle): Add check for null paint device. === Safari-130 === 2004-03-01 Ken Kocienda Reviewed by me Rollout last night's checkin. The tree was closed. * kwq/DOM.h * kwq/DOM.mm * kwq/DOMInternal.h * kwq/KWQKHTMLPart.mm * kwq/WebCoreBridge.mm 2004-03-01 Ken Kocienda Reviewed by me, changes by Darin. Yet another pass at the DOM API, this one by Darin to simplify the internal structure of the implementation. Little has changed in the API; much has changed in the implementation, particularly with regard to object creation and data storage and the class hierarchy. * kwq/DOM.h * kwq/DOM.mm * kwq/DOMInternal.h * kwq/KWQKHTMLPart.mm * kwq/WebCoreBridge.mm 2004-03-01 Maciej Stachowiak Reviewed by NOBODY (OOPS!). - fixed : REGRESSION: repro crash inside KJS (dispatchToBoolean) at www.thedonnas.com - fixed : REGRESSION: repro crash in JavaScript at www.alaska.com * khtml/ecma/kjs_window.cpp: (Window::getListener): Return Null() when the listener object is null, indicating the code failed to parse. Otherwise we return a bad value which can later crash the JS interpreter. 2004-03-01 Darin Adler Reviewed by Vicki. - fixed Tiger build * kwq/KWQXmlSimpleReader.mm: (QXmlSimpleReader::parse): Changed SAX structure initialization code so it compiles with both the newer and older libxml. Not sure this will work right with namespaces with the new libxml; we'll have to test. 2004-03-01 Ken Kocienda Reviewed by me, as suggested by Darin * khtml/misc/htmlattrs.c: (getAttrName): Generated code no longer has extraneous semicolon. * khtml/misc/htmltags.c: Generated code no longer has extraneous semicolon. (getTagName): * khtml/misc/makeattrs: Removed extraneous semicolon from end of file. * khtml/misc/maketags: Ditto. 2004-03-01 Ken Kocienda Reviewed by me * kwq/DOMInternal.h: Replaced tabs with spaces. 2004-03-01 Ken Kocienda Reviewed by Darin Changed all Objective-C DOM classes from protocols to classes, using a class cluster-like approach. * WebCore.pbproj/project.pbxproj: * khtml/dom/html_object.cpp: Put code in DOM namespace. * khtml/html/html_headimpl.cpp: Pull in entire DOM namespace in using directive to make up for the removal of it from htmlattrs. * khtml/html/htmltokenizer.cpp: Add using directives for the DOM classes used. * khtml/misc/htmlattrs.c: (getAttrName): * khtml/misc/htmlattrs.h: * khtml/misc/htmltags.c: (getTagName): * khtml/misc/makeattrs: Some changes here to avoid pulling in the entire DOM namespace. Explicitly use DOM namespace scoping for DOMString. * khtml/misc/maketags: Explicitly use DOM namespace scoping for DOMString. * khtml/rendering/render_form.cpp: Pull in entire DOM namespace in using directive to make up for the removal of it from htmlattrs. * kwq/DOM-compat.h: * kwq/DOM.h: * kwq/DOM.mm: Added. * kwq/WebCoreDOM.h: Removed. * kwq/WebCoreDOM.mm: Removed. 2004-02-26 Maciej Stachowiak Reviewed by John. : nil-deref in createHTMLEventListener at skiset.com : nil-deref of view in DocumentImpl::createHTMLEventListener at kirotv.com * khtml/xml/dom_docimpl.cpp: (DocumentImpl::createHTMLEventListener): Don't create the listener if there is no part. Also, get the part when going through the view. This prevents problems when handlers are set or removed from the onUnload handler. 2004-02-27 Maciej Stachowiak Reviewed by Dave. - fixed : REGRESSION: Crash in isPointInsideSelection clicking on link in Apple web directory frame * khtml/khtml_part.cpp: (KHTMLPart::isPointInsideSelection): Don't crash if innerNode is NULL, as this can happen mousing over a frame that's in the process of loading and currently empty. Since such a frame obviously can't be inside the selection, this seems like a good enough fix. 2004-02-26 David Hyatt Fix for 3528839, wide table cut off because of shorts being used instead of ints. Reviewed by darin * khtml/rendering/render_table.cpp: (RenderTableSection::layoutRows): (RenderTableCell::setWidth): * khtml/rendering/table_layout.cpp: (FixedTableLayout::calcWidthArray): (FixedTableLayout::calcMinMaxWidth): (AutoTableLayout::calcMinMaxWidth): 2004-02-26 Chris Blumenberg Fixed a few problems I found with reconstructed source while on my way to implementing "Mail Page". Reviewed by hyatt. * khtml/html/html_headimpl.cpp: (HTMLLinkElementImpl::isSubresourceURLAttribute): only true for stylesheet and icon * khtml/html/html_imageimpl.cpp: (HTMLAreaElementImpl::isURLAttribute): implement isURLAttribute not isSubresourceURLAttribute * khtml/html/html_imageimpl.h: * khtml/rendering/render_box.cpp: (RenderBox::dirtyLineBoxes): crasher fix that I found using libgmalloc * khtml/xml/dom_nodeimpl.cpp: (NodeImpl::recursive_toHTMLWithOptions): don't escape SCRIPT and TEXTAREA text, write close tags for tags that need them instead of relying on the children check * kwq/WebCoreBridge.mm: (-[WebCoreBridge HTMLString:]): call recursive_toHTMLWithOptions on the first child of the document so <#document /> isn't part of the source 2004-02-26 David Hyatt Convert render object widths from short to int. There was a bug on this, but I can't find it in Radar. Reviewed by john * khtml/rendering/render_applet.cpp: (RenderApplet::intrinsicWidth): (RenderEmptyApplet::intrinsicWidth): * khtml/rendering/render_applet.h: * khtml/rendering/render_block.cpp: (khtml::RenderBlock::calcMinMaxWidth): (khtml::RenderBlock::calcInlineMinMaxWidth): * khtml/rendering/render_block.h: * khtml/rendering/render_box.cpp: (RenderBox::contentWidth): (RenderBox::width): (RenderBox::containingBlockWidth): (RenderBox::calcReplacedWidth): (RenderBox::setStaticX): * khtml/rendering/render_box.h: (khtml::RenderBox::minWidth): (khtml::RenderBox::maxWidth): * khtml/rendering/render_br.h: (khtml::RenderBR::minWidth): (khtml::RenderBR::maxWidth): * khtml/rendering/render_canvas.cpp: (RenderCanvas::layout): * khtml/rendering/render_flexbox.cpp: (khtml::RenderFlexibleBox::calcMinMaxWidth): * khtml/rendering/render_frames.cpp: (RenderPart::intrinsicWidth): (RenderPartObject::layout): * khtml/rendering/render_frames.h: * khtml/rendering/render_image.cpp: (RenderImage::layout): (RenderImage::calcReplacedWidth): * khtml/rendering/render_image.h: * khtml/rendering/render_inline.cpp: (RenderInline::width): * khtml/rendering/render_inline.h: * khtml/rendering/render_layer.cpp: (RenderLayer::scrollWidth): * khtml/rendering/render_layer.h: (khtml::RenderLayer::width): (khtml::RenderLayer::setWidth): (khtml::RenderLayer::scrollXOffset): * khtml/rendering/render_line.h: (khtml::InlineBox::setWidth): (khtml::InlineBox::width): (khtml::InlineBox::setXPos): (khtml::InlineBox::xPos): * khtml/rendering/render_object.cpp: (RenderObject::containingBlockWidth): * khtml/rendering/render_object.h: (khtml::RenderObject::setStaticX): (khtml::RenderObject::contentWidth): (khtml::RenderObject::intrinsicWidth): (khtml::RenderObject::width): (khtml::RenderObject::offsetWidth): (khtml::RenderObject::minWidth): (khtml::RenderObject::maxWidth): * khtml/rendering/render_replaced.h: (khtml::RenderReplaced::intrinsicWidth): * khtml/rendering/render_table.cpp: (RenderTable::calcWidth): * khtml/rendering/render_table.h: * khtml/rendering/render_text.cpp: (RenderText::trimmedMinMaxWidth): (RenderText::width): * khtml/rendering/render_text.h: (khtml::RenderText::minWidth): (khtml::RenderText::maxWidth): * khtml/rendering/table_layout.cpp: 2004-02-26 Trey Matteson 3566668 - REGRESSION (125-128): autofill of popup lists is broken 3571271 - autofill parsing of field names should treat _ as a word separator Reviewed by Chris, Darin * kwq/KWQComboBox.h: * kwq/KWQComboBox.mm: (QComboBox::populate): New virtual method to force any lazy field population to happen. * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::matchLabelsAgainstElement): Change _ to ' ', to make it a word separator. * kwq/KWQWidget.h: (QWidget::populate): Implement populate to fill out the menu's data. * kwq/WebCoreBridge.mm: (viewForElement): Make sure widget is populated before handing it out. 2004-02-26 Ken Kocienda Reviewed by Chris * WebCore.pbproj/project.pbxproj: * khtml/xml/dom2_rangeimpl.h: Now includes createInstance glue function as do the other khtml DOM objects that we reflect into ObjC. * kwq/DOM-compat.h: Added. Compatibility declarations for DOM SPI. Note that this file is copied into WebKit by the build system as needed. * kwq/DOM.h: Added. New home for DOM SPI. Note that this file is copied into WebKit by the build system as needed. * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::recordFormValue): Updated usage to new DOM SPI. * kwq/WebCoreBridge.h: Updated usage to new DOM SPI. * kwq/WebCoreBridge.mm: Updated usage to new DOM SPI. Needed to add DOM range impl include since includes jiggered around and this needed header was no longer included indirectly. (-[WebCoreBridge elementForView:]): Ditto. (inputElementFromDOMElement): Ditto. (formElementFromDOMElement): Ditto. (-[WebCoreBridge elementWithName:inForm:]): Ditto. (-[WebCoreBridge elementDoesAutoComplete:]): Ditto. (-[WebCoreBridge elementIsPassword:]): Ditto. (-[WebCoreBridge currentForm]): Ditto. (-[WebCoreBridge controlsInForm:]): Ditto. (-[WebCoreBridge searchForLabels:beforeElement:]): Ditto. (-[WebCoreBridge matchLabels:againstElement:]): Ditto. (-[WebCoreBridge elementAtPoint:]): Ditto. (-[WebCoreBridge DOMDocument]): Ditto. (-[WebCoreBridge setSelectionFrom:startOffset:to:endOffset:]): Ditto. (-[WebCoreBridge attributedStringFrom:startOffset:to:endOffset:]): Ditto. (-[WebCoreBridge selectionStart]): Ditto. (-[WebCoreBridge selectionEnd]): Ditto. * kwq/WebCoreDOM.h: New home for all private declarations needed for reflecting DOM into ObjC. * kwq/WebCoreDOM.mm: Added. New home for all implementations needed for reflecting DOM into ObjC. * kwq/WebCoreDOMDocument.mm: Removed. All ObjC DOM implementation now in WebCoreDOM.mm. * kwq/WebCoreDOMNode.mm: Removed. All ObjC DOM implementation now in WebCoreDOM.mm. * kwq/WebCoreDOMPrivate.h: Removed. * kwq/WebDOMDocument.h: Removed. * kwq/WebDOMElement.h: Removed. * kwq/WebDOMNode.h: Removed. 2004-02-25 John Sullivan WebCore part of fix for : add a way to tab to menus, checkmarks, and buttons without turning on Full Keyboard Acceess Reviewed by Ken. * kwq/KWQKHTMLPart.h: * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::tabsToAllControls): now checks for option-tab like tabsToLinks (KWQKHTMLPart::partForWidget): new method, extracted from bridgeForWidget (KWQKHTMLPart::bridgeForWidget): now calls extracted method * kwq/KWQButton.mm: (-[KWQButton canBecomeKeyView]): overridden to handle our rules about full keyboard access, different than NSView's rules * kwq/KWQComboBox.mm: (-[KWQPopUpButton canBecomeKeyView]): ditto * kwq/KWQListBox.mm: (-[KWQTableView canBecomeKeyView]): ditto 2004-02-24 Darin Adler Reviewed by Ken. * kwq/KWQString.mm: (QString::endsWith): Fixed broken end of string test, to get rid of false positives. * WebCore-tests.exp: Added endsWith so it can be tested. * WebCore-combined.exp: Regenerated. 2004-02-23 David Hyatt Fix for 3549772, hangs on border collapsing. Reviewed by darin * khtml/rendering/render_object.cpp: (RenderObject::collectBorders): * khtml/rendering/render_object.h: * khtml/rendering/render_table.cpp: (RenderTable::paint): (compareBorders): (RenderTableCell::paint): (addBorderStyle): (RenderTableCell::collectBorders): * khtml/rendering/render_table.h: 2004-02-23 David Hyatt Fix for 3558717, make sure that form elements that are removed from a document also remove themselves from the form. Reviewed by darin. * khtml/html/html_formimpl.cpp: (HTMLGenericFormElementImpl::removedFromDocument): * khtml/html/html_formimpl.h: * khtml/xml/dom_nodeimpl.cpp: * khtml/xml/dom_nodeimpl.h: Implement smarter line layout for faster typing and repainting when individual lines change. Reviewed by kocienda. * khtml/khtmlview.cpp: (KHTMLViewPrivate::KHTMLViewPrivate): (KHTMLViewPrivate::~KHTMLViewPrivate): (KHTMLViewPrivate::reset): (KHTMLView::addRepaintInfo): (KHTMLView::layout): * khtml/khtmlview.h: * khtml/rendering/bidi.cpp: (khtml::Bidinext): (khtml::appendRun): (khtml::embed): (khtml::RenderBlock::constructLine): (khtml::RenderBlock::computeHorizontalPositionsForLine): (khtml::RenderBlock::computeVerticalPositionsForLine): (khtml::RenderBlock::bidiReorderLine): (khtml::buildCompactRuns): (khtml::RenderBlock::layoutInlineChildren): (khtml::RenderBlock::determineStartPosition): (khtml::RenderBlock::determineEndPosition): (khtml::RenderBlock::matchedEndLine): (khtml::RenderBlock::findNextLineBreak): * khtml/rendering/render_block.cpp: (khtml:::RenderFlow): (khtml::RenderBlock::layoutBlock): (khtml::RenderBlock::layoutBlockChildren): (khtml::RenderBlock::positionNewFloats): (khtml::RenderBlock::lowestPosition): (khtml::RenderBlock::rightmostPosition): (khtml::RenderBlock::leftmostPosition): * khtml/rendering/render_block.h: (khtml::RenderBlock::firstRootBox): (khtml::RenderBlock::lastRootBox): (khtml::RenderBlock::setLinesAppended): (khtml::RenderBlock::linesAppended): * khtml/rendering/render_box.cpp: (RenderBox::dirtyLineBoxes): (RenderBox::deleteLineBoxWrapper): (RenderBox::setInlineBoxWrapper): * khtml/rendering/render_box.h: * khtml/rendering/render_br.cpp: (RenderBR::createInlineBox): (RenderBR::position): * khtml/rendering/render_br.h: * khtml/rendering/render_container.cpp: (RenderContainer::appendChildNode): (RenderContainer::insertChildNode): * khtml/rendering/render_flexbox.cpp: (khtml::RenderFlexibleBox::placeChild): * khtml/rendering/render_flow.cpp: (RenderFlow::extractLineBox): (RenderFlow::attachLineBox): (RenderFlow::removeLineBox): (RenderFlow::dirtyLinesFromChangedChild): (RenderFlow::dirtyLineBoxes): (RenderFlow::createInlineBox): * khtml/rendering/render_flow.h: * khtml/rendering/render_line.cpp: (InlineBox::dirtyLineBoxes): (InlineBox::deleteLine): (InlineBox::extractLine): (InlineBox::attachLine): (InlineBox::adjustVerticalPosition): (InlineBox::root): (InlineBox::nextOnLineExists): (InlineBox::prevOnLineExists): (InlineFlowBox::removeChild): (InlineFlowBox::deleteLine): (InlineFlowBox::extractLine): (InlineFlowBox::attachLine): (InlineFlowBox::adjustVerticalPosition): (InlineFlowBox::verticallyAlignBoxes): (InlineFlowBox::adjustMaxAscentAndDescent): (RootInlineBox::adjustVerticalPosition): (RootInlineBox::childRemoved): * khtml/rendering/render_line.h: (khtml::InlineBox::m_extracted): (khtml::InlineBox::setExtracted): (khtml::InlineBox::object): (khtml::InlineBox::parent): (khtml::InlineBox::isDirty): (khtml::InlineBox::markDirty): (khtml::InlineFlowBox::prevFlowBox): (khtml::InlineFlowBox::nextFlowBox): (khtml::RootInlineBox::RootInlineBox): (khtml::RootInlineBox::nextRootBox): (khtml::RootInlineBox::prevRootBox): (khtml::RootInlineBox::setLineBreakInfo): (khtml::RootInlineBox::setLineBreakPos): (khtml::RootInlineBox::setBlockHeight): (khtml::RootInlineBox::setEndsWithBreak): (khtml::RootInlineBox::blockHeight): (khtml::RootInlineBox::endsWithBreak): (khtml::RootInlineBox::lineBreakObj): (khtml::RootInlineBox::lineBreakPos): * khtml/rendering/render_object.cpp: (RenderObject::repaintAfterLayoutIfNeeded): (RenderObject::repaintObjectsBeforeLayout): (RenderObject::dirtyLinesFromChangedChild): (RenderObject::createInlineBox): (RenderObject::dirtyLineBoxes): (RenderObject::setInlineBoxWrapper): (RenderObject::deleteLineBoxWrapper): * khtml/rendering/render_object.h: (khtml::RenderObject::RepaintInfo::m_repaintRect): * khtml/rendering/render_table.cpp: (RenderTableSection::layoutRows): * khtml/rendering/render_text.cpp: (InlineTextBox::deleteLine): (InlineTextBox::extractLine): (InlineTextBox::attachLine): (RenderText::RenderText): (RenderText::detach): (RenderText::extractTextBox): (RenderText::attachTextBox): (RenderText::removeTextBox): (RenderText::setTextWithOffset): (RenderText::setText): (RenderText::dirtyLineBoxes): (RenderText::createInlineBox): * khtml/rendering/render_text.h: (khtml::InlineTextBox::start): (khtml::InlineTextBox::end): (khtml::InlineTextBox::offsetRun): * khtml/xml/dom_textimpl.cpp: (CharacterDataImpl::setData): (CharacterDataImpl::appendData): (CharacterDataImpl::insertData): (CharacterDataImpl::deleteData): (CharacterDataImpl::replaceData): (TextImpl::splitText): * kwq/KWQRenderTreeDebug.cpp: (write): RenderBlock contains two other fixes. The first is a fix to rightmost/lowestPosition to properly add in margins to floats. Reviewed by mjs The second fix is to repair a bug in block-level replaced elements with margins. If the floats they moved to dodge can fit in their margins, then they don't technically have to move at all. Reviewed by john 2004-02-20 Maciej Stachowiak Reviewed by Darin. : REGRESSION 100-125: nil-dereference in KHTMLPart::isPointInsideSelection (progz.ru, many other sites) * khtml/rendering/render_layer.cpp: (RenderLayer::nodeAtPointForLayer): To cover the case of positioned generated content, make sure to find an element if we don't have one yet when we get to the layer level. === Safari-129 === 2004-02-19 Chris Blumenberg Fixed: : when copying HTML, relative URLs should be made absolute - Added isSubresourceURLAttribute to ElementImpl which is overridden by subclasses determine if an attribute refers to a subresource. - Added isURLAttribute to ElementImpl which is overridden by subclasses determine if an attribute refers to any kind of URL. Reviewed by Dave. * khtml/html/html_baseimpl.cpp: (HTMLBodyElementImpl::isSubresourceURLAttribute): (HTMLFrameElementImpl::isSubresourceURLAttribute): (HTMLIFrameElementImpl::openURL): (HTMLIFrameElementImpl::isSubresourceURLAttribute): * khtml/html/html_baseimpl.h: * khtml/html/html_formimpl.cpp: (HTMLFormElementImpl::isURLAttribute): * khtml/html/html_formimpl.h: * khtml/html/html_headimpl.cpp: (HTMLLinkElementImpl::isSubresourceURLAttribute): (HTMLScriptElementImpl::id): (HTMLScriptElementImpl::isSubresourceURLAttribute): * khtml/html/html_headimpl.h: * khtml/html/html_imageimpl.cpp: (HTMLImageElementImpl::isSubresourceURLAttribute): (HTMLAreaElementImpl::getRegion): (HTMLAreaElementImpl::isSubresourceURLAttribute): * khtml/html/html_imageimpl.h: * khtml/html/html_inlineimpl.cpp: (HTMLAnchorElementImpl::isURLAttribute): * khtml/html/html_inlineimpl.h: * khtml/html/html_objectimpl.cpp: (HTMLEmbedElementImpl::isSubresourceURLAttribute): (HTMLObjectElementImpl::isSubresourceURLAttribute): (HTMLParamElementImpl::parseHTMLAttribute): (HTMLParamElementImpl::isSubresourceURLAttribute): * khtml/html/html_objectimpl.h: * khtml/html/html_tableimpl.cpp: (HTMLTableElementImpl::isSubresourceURLAttribute): (HTMLTableCellElementImpl::attach): (HTMLTableCellElementImpl::isSubresourceURLAttribute): * khtml/html/html_tableimpl.h: * khtml/xml/dom2_rangeimpl.cpp: (RangeImpl::toHTMLWithOptions): take completeURLs and subresourceURLs arguments (RangeImpl::toHTML): call toHTMLWithOptions with default options * khtml/xml/dom2_rangeimpl.h: * khtml/xml/dom_elementimpl.cpp: (ElementImpl::isURLAttribute): (ElementImpl::isSubresourceURLAttribute): * khtml/xml/dom_elementimpl.h: * khtml/xml/dom_nodeimpl.cpp: (NodeImpl::recursive_toHTMLWithOptions): take completeURLs and subresourceURLs arguments (NodeImpl::recursive_toHTML): call recursive_toHTML with default options * khtml/xml/dom_nodeimpl.h: * kwq/WebCoreBridge.h: * kwq/WebCoreBridge.mm: (-[WebCoreBridge selectedHTML:]): renamed to return subresource URL strings 2004-02-17 Maciej Stachowiak Reviewed by Darin. : REGRESSION (100-114): Return doesn't work in Japanese input method for some HomePage fields * kwq/KWQTextArea.mm: (-[KWQTextAreaTextView keyDown:]): Don't send events through DOM when there is marked text. (-[KWQTextAreaTextView keyUp:]): Ditto. * kwq/KWQTextField.mm: (-[KWQTextField textView:shouldHandleEvent:]): Ditto. (-[KWQSecureTextField textView:shouldHandleEvent:]): Ditto. * khtml/html/html_formimpl.cpp: (HTMLInputElementImpl::defaultEventHandler): No need to check for marked text on "return" any more, because we won't send key events through the DOM at all when there is marked text. * kwq/KWQLineEdit.h: * kwq/KWQLineEdit.mm: Removed haveMarkedText method, no longer used by anything. 2004-02-16 Chris Blumenberg WebCore side of pasting image data. Reviewed by kocienda. * khtml/editing/htmlediting.cpp: (PasteImageCommand::PasteImageCommand): new (PasteImageCommand::~PasteImageCommand): new (PasteImageCommand::impl): new * khtml/editing/htmlediting.h: (khtml::): * khtml/editing/htmlediting_impl.cpp: (EditCommandImpl::name): added support for PasteImageCommandID (CompositeEditCommandImpl::insertNodeAt): new, factored out from PasteHTMLCommandImpl::apply (PasteHTMLCommandImpl::apply): call insertNodeAt (PasteImageCommandImpl::PasteImageCommandImpl): new (PasteImageCommandImpl::~PasteImageCommandImpl): new (PasteImageCommandImpl::apply): new * khtml/editing/htmlediting_impl.h: * khtml/khtml_part.cpp: (KHTMLPart::pasteHTMLString): unchanged (KHTMLPart::pasteImage): new * khtml/khtml_part.h: * kwq/WebCoreBridge.h: * kwq/WebCoreBridge.mm: (-[WebCoreBridge pasteImageWithURL:]): new 2004-02-16 Darin Adler Reviewed by Ken. - Fixed some dynamic casts that Dirk complained about to use virtual functions instead. Since the virtual functions were already there, this is faster and better in most ways anyway. * khtml/dom/dom2_events.cpp: (UIEvent::keyCode): Use virtual function instead of dynamic_cast. (UIEvent::charCode): Ditto. (UIEvent::pageX): Ditto. (UIEvent::pageY): Ditto. (UIEvent::layerX): Ditto. (UIEvent::layerY): Ditto. (UIEvent::which): Ditto. 2004-02-15 Darin Adler Reviewed by Dave. * WebCore.pbproj/project.pbxproj: Tweak build styles a bit, fixing OptimizedWithSymbols, and removing redundant settings of things that match defaults in other build styles. 2004-02-15 Darin Adler Reviewed by Dave. - fixed 3548533: crash in XMLHttpRequest::slotData using Orkut's rating system * khtml/ecma/xmlhttprequest.cpp: (KJS::XMLHttpRequest::~XMLHttpRequest): Delete the QObject side, which has a side effect of disconnecting the signals which seem to be firing after the request is gone. There may be another way of addressing the crash by correcting some other problem with killing the job, but this demonstrably works and fixes a storage leak. 2004-02-12 Maciej Stachowiak Reviewed by John. - redo visited link history checking for a 2% speed improvement * kwq/KWQKHistoryProvider.mm: (KParts::HistoryProvider::contains): Don't make a KURL or an NSString. Punt on canonicalization and directly pass the internal Latin1 or unicode buffer. * kwq/KWQString.h: * kwq/KWQString.mm: (QString::hasFastLatin1): New method to check whether getting the latin1 buffer is fast (doesn't allocate). * kwq/WebCoreHistory.h: add new methods to look up by raw latin1 or unicode buffer instead of NSString. === Safari-128 === 2004-02-12 David Hyatt Fix for 3557850 and 3557607. Make sure to setParent(0) on the body's link declaration, so that TreeShared will delete it. * khtml/html/html_baseimpl.cpp: (HTMLBodyElementImpl::~HTMLBodyElementImpl): 2004-02-12 Ken Kocienda Reviewed by Hyatt Refactored object design for edit commands into something that's starting to feel more solid. Added some accessors to edit commands. * WebCore.pbproj/project.pbxproj: * khtml/editing/htmlediting_impl.h: Added. * khtml/editing/htmlediting_impl.m: Added. 2004-02-11 David Hyatt Fix for 3550005, 936 leaks when loading checkbox page of pain. Make sure to nuke the inline box wrapper when detaching the RenderWidget. * khtml/rendering/render_replaced.cpp: (RenderWidget::detach): 2004-02-11 David Hyatt Add some more polish to ensure the ypos estimate is right. Correct the clearing of images so that their top margins do not get added in when they clear the float because of having a large width. Reviewed by kocienda * khtml/rendering/render_block.cpp: (khtml::RenderBlock::layoutBlockChildren): * layout-tests/fast/block/margin-collapse/101-expected.txt: Added. * layout-tests/fast/block/margin-collapse/101.html: Added. * layout-tests/fast/block/margin-collapse/102-expected.txt: Added. * layout-tests/fast/block/margin-collapse/102.html: Added. 2004-02-11 David Hyatt Fix for 3556702, margin collapsing gets disabled when images spill out of the containing block. Reviewed by kocienda * khtml/rendering/render_block.cpp: (khtml::RenderBlock::layoutBlockChildren): 2004-02-11 David Hyatt Fix the .rows and .cells arrays on tables by merging with the KHTML trunk. TH was being included as a row instead of as a cell. Reviewed by kocienda * khtml/html/html_miscimpl.cpp: (HTMLCollectionImpl::calcLength): (HTMLCollectionImpl::getItem): (HTMLCollectionImpl::getNamedItem): 2004-02-11 David Hyatt Remove my bogus refs of the elementSheet. Fixes 3554213 and 3555467. * khtml/html/html_baseimpl.cpp: (HTMLBodyElementImpl::createLinkDecl): * khtml/html/html_tableimpl.cpp: (HTMLTableElementImpl::additionalAttributeStyleDecl): (HTMLTableElementImpl::getSharedCellDecl): 2004-02-11 David Hyatt Fix for 3556037, regression where display:block generated content didn't work. Reviewed by kocienda * khtml/rendering/render_block.cpp: (khtml::RenderBlock::setStyle): (khtml::RenderBlock::addChildToFlow): (khtml::RenderBlock::removeChild): (khtml::RenderBlock::renderName): * khtml/rendering/render_container.cpp: (RenderContainer::insertChildNode): (RenderContainer::removeLeftoverAnonymousBoxes): * khtml/rendering/render_inline.cpp: (RenderInline::splitFlow): (RenderInline::renderName): * khtml/rendering/render_list.cpp: (RenderListItem::updateMarkerLocation): * khtml/rendering/render_object.h: (khtml::RenderObject::isAnonymousBlock): * layout-tests/css1/pseudo/firstletter-expected.txt: * layout-tests/css1/pseudo/multiple_pseudo_elements-expected.txt: * layout-tests/fast/css-generated-content/002-expected.txt: * layout-tests/fast/css-generated-content/004-expected.txt: * layout-tests/fast/css-generated-content/005-expected.txt: * layout-tests/fast/css-generated-content/006-expected.txt: * layout-tests/fast/css-generated-content/007-expected.txt: * layout-tests/fast/css-generated-content/009-expected.txt: * layout-tests/fast/css-generated-content/010-expected.txt: * layout-tests/fast/selectors/039-expected.txt: * layout-tests/fast/selectors/039b-expected.txt: * layout-tests/fast/selectors/041-expected.txt: * layout-tests/fast/selectors/042-expected.txt: * layout-tests/fast/selectors/166a-expected.txt: * layout-tests/fast/selectors/168-expected.txt: * layout-tests/fast/selectors/168a-expected.txt: * layout-tests/fast/selectors/169-expected.txt: * layout-tests/fast/selectors/169a-expected.txt: * layout-tests/fast/text/firstline/002-expected.txt: * layout-tests/fast/text/firstline/003-expected.txt: 2004-02-11 Darin Adler Reviewed by Richard. * kwq/KWQTextCodec.mm: (KWQTextDecoder::convertLatin1): Fix off by one error. 2004-02-11 David Hyatt Convert paint methods over to use a new PaintInfo struct. Eliminate the paintObject method. Reviewed by kocienda * khtml/rendering/render_block.cpp: (khtml::RenderBlock::paint): (khtml::RenderBlock::paintObject): (khtml::RenderBlock::paintFloats): * khtml/rendering/render_block.h: * khtml/rendering/render_box.cpp: (RenderBox::paint): (RenderBox::paintRootBoxDecorations): (RenderBox::paintBoxDecorations): * khtml/rendering/render_box.h: * khtml/rendering/render_br.h: (khtml::RenderBR::paint): * khtml/rendering/render_canvas.cpp: (RenderCanvas::paint): (RenderCanvas::paintBoxDecorations): * khtml/rendering/render_canvas.h: * khtml/rendering/render_flow.cpp: (RenderFlow::paintLineBoxBackgroundBorder): (RenderFlow::paintLineBoxDecorations): * khtml/rendering/render_flow.h: * khtml/rendering/render_form.cpp: (RenderFieldset::paintBoxDecorations): * khtml/rendering/render_form.h: * khtml/rendering/render_image.cpp: (RenderImage::paint): (RenderImage::updateFromElement): * khtml/rendering/render_image.h: * khtml/rendering/render_inline.cpp: (RenderInline::paint): * khtml/rendering/render_inline.h: * khtml/rendering/render_layer.cpp: (RenderLayer::paintLayer): * khtml/rendering/render_line.cpp: (InlineFlowBox::paintBackgroundAndBorder): (InlineFlowBox::paintDecorations): * khtml/rendering/render_line.h: (khtml::InlineRunBox::paintBackgroundAndBorder): (khtml::InlineRunBox::paintDecorations): * khtml/rendering/render_list.cpp: (RenderListItem::paint): (RenderListMarker::paint): * khtml/rendering/render_list.h: * khtml/rendering/render_object.cpp: (RenderObject::paint): * khtml/rendering/render_object.h: (khtml::RenderObject::PaintInfo::PaintInfo): (khtml::RenderObject::paintBoxDecorations): * khtml/rendering/render_replaced.cpp: (RenderReplaced::shouldPaint): (RenderWidget::paint): * khtml/rendering/render_replaced.h: * khtml/rendering/render_table.cpp: (RenderTable::paint): (RenderTable::paintBoxDecorations): (RenderTableSection::paint): (RenderTableCell::paint): (RenderTableCell::paintBoxDecorations): * khtml/rendering/render_table.h: * khtml/rendering/render_text.cpp: (RenderText::paint): * khtml/rendering/render_text.h: 2004-02-11 Ken Kocienda Reviewed by me Removed include file I was considering checking, but decided against. Of course, this dangling include broke the build. * kwq/KWQKHTMLPart.mm * kwq/WebCoreBridge.mm 2004-02-10 Ken Kocienda Reviewed by Hyatt Several big changes. EditSteps are now all EditCommands. Smart pointer for Shared classes added to shared.h. Some events, like text input events, are now coalesced. "Undo typing" now implemented, even though the name is not in the menu yet. Integer id's added to EditCommand and its subclasses. A bunch of cleanup in the EditCommand classes. * khtml/editing/htmlediting.cpp: (EditCommand::EditCommand): (EditCommand::~EditCommand): (EditCommand::commandID): (EditCommand::reapply): (EditCommand::beginApply): (EditCommand::endApply): (EditCommand::beginUnapply): (EditCommand::endUnapply): (EditCommand::beginReapply): (EditCommand::endReapply): (EditCommand::currentSelection): (EditCommand::coalesce): (EditCommand::groupForUndo): (EditCommand::groupForRedo): (EditCommand::moveToStartingSelection): (EditCommand::moveToEndingSelection): (EditCommand::name): (CompositeEditCommand::CompositeEditCommand): (CompositeEditCommand::~CompositeEditCommand): (CompositeEditCommand::unapply): (CompositeEditCommand::reapply): (CompositeEditCommand::applyCommand): (CompositeEditCommand::insertNodeBefore): (CompositeEditCommand::insertNodeAfter): (CompositeEditCommand::appendNode): (CompositeEditCommand::removeNode): (CompositeEditCommand::splitTextNode): (CompositeEditCommand::joinTextNodes): (CompositeEditCommand::insertText): (CompositeEditCommand::deleteText): (CompositeEditCommand::moveSelectionTo): (CompositeEditCommand::deleteSelection): (InsertNodeBeforeCommand::InsertNodeBeforeCommand): (InsertNodeBeforeCommand::~InsertNodeBeforeCommand): (InsertNodeBeforeCommand::apply): (InsertNodeBeforeCommand::unapply): (AppendNodeCommand::AppendNodeCommand): (AppendNodeCommand::~AppendNodeCommand): (AppendNodeCommand::apply): (AppendNodeCommand::unapply): (RemoveNodeCommand::RemoveNodeCommand): (RemoveNodeCommand::~RemoveNodeCommand): (RemoveNodeCommand::apply): (RemoveNodeCommand::unapply): (ModifyTextNodeCommand::ModifyTextNodeCommand): (ModifyTextNodeCommand::~ModifyTextNodeCommand): (ModifyTextNodeCommand::splitTextNode): (ModifyTextNodeCommand::joinTextNodes): (SplitTextNodeCommand::SplitTextNodeCommand): (SplitTextNodeCommand::~SplitTextNodeCommand): (SplitTextNodeCommand::apply): (SplitTextNodeCommand::unapply): (JoinTextNodesCommand::JoinTextNodesCommand): (JoinTextNodesCommand::~JoinTextNodesCommand): (JoinTextNodesCommand::apply): (JoinTextNodesCommand::unapply): (InsertTextCommand::InsertTextCommand): (InsertTextCommand::~InsertTextCommand): (InsertTextCommand::apply): (InsertTextCommand::unapply): (DeleteTextCommand::DeleteTextCommand): (DeleteTextCommand::~DeleteTextCommand): (DeleteTextCommand::apply): (DeleteTextCommand::unapply): (MoveSelectionToCommand::MoveSelectionToCommand): (MoveSelectionToCommand::~MoveSelectionToCommand): (MoveSelectionToCommand::commandID): (MoveSelectionToCommand::apply): (MoveSelectionToCommand::unapply): (DeleteSelectionCommand::DeleteSelectionCommand): (DeleteSelectionCommand::~DeleteSelectionCommand): (DeleteSelectionCommand::apply): (InputTextCommand::InputTextCommand): (InputTextCommand::~InputTextCommand): (InputTextCommand::commandID): (InputTextCommand::isLineBreak): (InputTextCommand::isSpace): (InputTextCommand::apply): (InputTextCommand::coalesce): (InputTextCommand::groupForUndo): (InputTextCommand::groupForRedo): (InputTextCommand::execute): (DeleteKeyCommand::DeleteKeyCommand): (DeleteKeyCommand::~DeleteKeyCommand): (DeleteKeyCommand::commandID): (DeleteKeyCommand::apply): (DeleteKeyCommand::groupForUndo): (DeleteKeyCommand::groupForRedo): (PasteHTMLCommand::PasteHTMLCommand): (PasteHTMLCommand::~PasteHTMLCommand): (PasteHTMLCommand::apply): * khtml/editing/htmlediting.h: (khtml::): (khtml::EditCommand::): (khtml::EditCommand::document): (khtml::EditCommand::state): (khtml::EditCommand::setState): (khtml::SplitTextNodeCommand::joinState): (khtml::SplitTextNodeCommand::splitState): (khtml::JoinTextNodesCommand::joinState): (khtml::JoinTextNodesCommand::splitState): * khtml/khtml_part.cpp: (KHTMLPart::openURL): (KHTMLPart::deleteSelection): (KHTMLPart::applyCommand): (KHTMLPart::undoEditing): (KHTMLPart::redoEditing): (KHTMLPart::pasteHTMLString): * khtml/khtml_part.h: * khtml/khtmlpart_p.h: (KHTMLPartPrivate::~KHTMLPartPrivate): * khtml/misc/shared.h: (khtml::SharedPtr::SharedPtr): (khtml::SharedPtr::~SharedPtr): (khtml::SharedPtr::isEmpty): (khtml::SharedPtr::get): (khtml::SharedPtr::operator*): (khtml::SharedPtr::operator->): (khtml::SharedPtr::operator!): (khtml::SharedPtr::operator==): (khtml::::operator): (khtml::operator!=): * khtml/xml/dom_elementimpl.cpp: (ElementImpl::defaultEventHandler): * kwq/KWQKHTMLPart.h: * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::registerCommandForUndo): (KWQKHTMLPart::registerCommandForRedo): (KWQKHTMLPart::clearUndoRedoOperations): * kwq/WebCoreBridge.h: * kwq/WebCoreBridge.mm: (-[WebCoreBridge undoEditing:]): (-[WebCoreBridge redoEditing:]): 2004-02-10 David Hyatt Eliminate the double-completion and double-parsing of KURLs for every single image request. * khtml/misc/loader.cpp: (DocLoader::requestImage): (Cache::requestImage): * khtml/misc/loader.h: 2004-02-10 David Hyatt Merged patch that fixes clear:both for floats. This patch comes from the KHTML tree. * khtml/rendering/render_block.cpp: (khtml::RenderBlock::positionNewFloats): * layout-tests/fast/block/float/029-expected.txt: Added. * layout-tests/fast/block/float/029.html: Added. 2004-02-10 David Hyatt Fix crasher in list code caused by incorrect style deallocation. Regression from the arena changes for RenderStyles. Reviewed by darin * khtml/rendering/render_object.cpp: (RenderObject::remove): (RenderObject::arenaDelete): 2004-02-10 David Hyatt Fix for osnews.com's wacky layout problem. Put back in the check for isEmpty. Reviewed by darin * khtml/html/htmltokenizer.cpp: (khtml::HTMLTokenizer::scriptHandler): 2004-02-10 David Hyatt Fix for the bad background color on abcnews.com. Make cloning optionally drop the style declarations. * khtml/html/html_elementimpl.cpp: (HTMLAttributeImpl::clone): * khtml/html/html_elementimpl.h: * khtml/html/htmlparser.cpp: (KHTMLParser::insertNode): * khtml/xml/dom_elementimpl.cpp: (AttributeImpl::clone): * khtml/xml/dom_elementimpl.h: 2004-02-10 Chris Blumenberg Fixed: : Cut, Paste and Delete must support Undo and Redo Reviewed by kocienda. * khtml/editing/htmlediting.cpp: (ModifyTextNodeStep::splitTextNode): ken's fix that fixes a problem with unapply (ModifyTextNodeStep::joinTextNodes): my fix that fixes a problem with unapply (PasteHTMLCommand::PasteHTMLCommand): new (PasteHTMLCommand::apply): moved from dom_docimpl.cpp and improved * khtml/editing/htmlediting.h: (khtml::PasteHTMLCommand::~PasteHTMLCommand): * khtml/khtml_part.cpp: (KHTMLPart::deleteSelection): new, create and applies a DeleteTextCommand (KHTMLPart::pasteHTMLString): new, create and applies a PasteHTMLCommand * khtml/khtml_part.h: * khtml/xml/dom_docimpl.cpp: moved paste code to htmlediting.cpp * khtml/xml/dom_docimpl.h: * kwq/WebCoreBridge.mm: (-[WebCoreBridge pasteHTMLString:]): call pasteHTMLString on the part instead of the bridge (-[WebCoreBridge deleteSelection]): call deleteSelection on the part instead of the bridge 2004-02-10 David Hyatt Fix crash on abcnews.com by adding isEmpty checks before dereferencing. * khtml/html/htmltokenizer.cpp: (khtml::HTMLTokenizer::parseTag): 2004-02-10 David Hyatt Improve attribute parsing of mapped attributes (that map to CSS properties) so that they can pull the style declarations from a global cache. Made RenderStyles be arena allocated as well. Reviewed by darin * khtml/css/css_valueimpl.cpp: (CSSImageValueImpl::CSSImageValueImpl): (CSSImageValueImpl::image): * khtml/css/css_valueimpl.h: * khtml/css/cssstyleselector.cpp: (khtml::CSSStyleSelector::initForStyleResolve): (khtml::CSSStyleSelector::styleForElement): (khtml::CSSStyleSelector::pseudoStyleForElement): (khtml::CSSStyleSelector::applyProperty): * khtml/css/cssstyleselector.h: * khtml/css/html4.css: * khtml/css/quirks.css: * khtml/dom/dom_element.cpp: (Element::style): * khtml/dom/html_element.cpp: * khtml/dom/html_element.h: * khtml/html/html_baseimpl.cpp: (HTMLBodyElementImpl::HTMLBodyElementImpl): (HTMLBodyElementImpl::mapToEntry): (HTMLBodyElementImpl::parseHTMLAttribute): (HTMLBodyElementImpl::insertedIntoDocument): (HTMLFrameElementImpl::parseHTMLAttribute): (HTMLFrameSetElementImpl::parseHTMLAttribute): (HTMLIFrameElementImpl::mapToEntry): (HTMLIFrameElementImpl::parseHTMLAttribute): * khtml/html/html_baseimpl.h: * khtml/html/html_blockimpl.cpp: (HTMLDivElementImpl::mapToEntry): (HTMLDivElementImpl::parseHTMLAttribute): (HTMLHRElementImpl::mapToEntry): (HTMLHRElementImpl::parseHTMLAttribute): (HTMLParagraphElementImpl::mapToEntry): (HTMLParagraphElementImpl::parseHTMLAttribute): (HTMLMarqueeElementImpl::mapToEntry): (HTMLMarqueeElementImpl::parseHTMLAttribute): (HTMLLayerElementImpl::HTMLLayerElementImpl): (HTMLLayerElementImpl::id): * khtml/html/html_blockimpl.h: * khtml/html/html_documentimpl.cpp: (HTMLDocumentImpl::determineParseMode): * khtml/html/html_documentimpl.h: * khtml/html/html_elementimpl.cpp: (CSSMappedAttributeDeclarationImpl::~CSSMappedAttributeDeclarationImpl): (HTMLElementImpl::getMappedAttributeDecl): (HTMLElementImpl::setMappedAttributeDecl): (HTMLElementImpl::removeMappedAttributeDecl): (HTMLAttributeImpl::~HTMLAttributeImpl): (HTMLAttributeImpl::clone): (m_mappedAttributeCount): (HTMLNamedAttrMapImpl::clearAttributes): (HTMLElementImpl::HTMLElementImpl): (HTMLElementImpl::~HTMLElementImpl): (HTMLElementImpl::createAttribute): (HTMLElementImpl::createInlineStyleDecl): (HTMLElementImpl::attributeChanged): (HTMLElementImpl::mapToEntry): (HTMLElementImpl::parseHTMLAttribute): (HTMLElementImpl::additionalAttributeStyleDecl): (isHexDigit): (toHex): (HTMLElementImpl::addCSSProperty): (HTMLElementImpl::addCSSStringProperty): (HTMLElementImpl::addCSSImageProperty): (HTMLElementImpl::addCSSLength): (HTMLElementImpl::addHTMLColor): (HTMLElementImpl::createMappedDecl): (HTMLElementImpl::addHTMLAlignment): (HTMLElementImpl::setContentEditable): * khtml/html/html_elementimpl.h: (DOM::): (DOM::CSSMappedAttributeDeclarationImpl::CSSMappedAttributeDeclarationImpl): (DOM::CSSMappedAttributeDeclarationImpl::setMappedState): (DOM::HTMLAttributeImpl::HTMLAttributeImpl): (DOM::HTMLAttributeImpl::decl): (DOM::HTMLAttributeImpl::setDecl): (DOM::HTMLNamedAttrMapImpl::hasMappedAttributes): (DOM::HTMLNamedAttrMapImpl::declRemoved): (DOM::HTMLNamedAttrMapImpl::declAdded): (DOM::HTMLNamedAttrMapImpl::attributeItem): (DOM::HTMLElementImpl::hasMappedAttributes): (DOM::HTMLElementImpl::htmlAttributes): (DOM::HTMLElementImpl::inlineStyleDecl): * khtml/html/html_formimpl.cpp: (HTMLFormElementImpl::parseHTMLAttribute): (HTMLGenericFormElementImpl::parseHTMLAttribute): (HTMLButtonElementImpl::parseHTMLAttribute): (HTMLInputElementImpl::setType): (HTMLInputElementImpl::mapToEntry): (HTMLInputElementImpl::parseHTMLAttribute): (HTMLInputElementImpl::attach): (HTMLLabelElementImpl::parseHTMLAttribute): (HTMLSelectElementImpl::parseHTMLAttribute): (HTMLKeygenElementImpl::parseHTMLAttribute): (HTMLOptGroupElementImpl::parseHTMLAttribute): (HTMLOptionElementImpl::parseHTMLAttribute): (HTMLTextAreaElementImpl::parseHTMLAttribute): (HTMLIsIndexElementImpl::parseHTMLAttribute): * khtml/html/html_formimpl.h: * khtml/html/html_headimpl.cpp: (HTMLBaseElementImpl::parseHTMLAttribute): (HTMLLinkElementImpl::parseHTMLAttribute): (HTMLMetaElementImpl::parseHTMLAttribute): (HTMLStyleElementImpl::parseHTMLAttribute): * khtml/html/html_headimpl.h: * khtml/html/html_imageimpl.cpp: (HTMLImageElementImpl::mapToEntry): (HTMLImageElementImpl::parseHTMLAttribute): (HTMLMapElementImpl::parseHTMLAttribute): (HTMLAreaElementImpl::parseHTMLAttribute): * khtml/html/html_imageimpl.h: * khtml/html/html_inlineimpl.cpp: (HTMLAnchorElementImpl::parseHTMLAttribute): (HTMLBRElementImpl::mapToEntry): (HTMLBRElementImpl::parseHTMLAttribute): (HTMLFontElementImpl::mapToEntry): (HTMLFontElementImpl::parseHTMLAttribute): * khtml/html/html_inlineimpl.h: * khtml/html/html_listimpl.cpp: (HTMLUListElementImpl::mapToEntry): (HTMLUListElementImpl::parseHTMLAttribute): (HTMLOListElementImpl::mapToEntry): (HTMLOListElementImpl::parseHTMLAttribute): (HTMLLIElementImpl::mapToEntry): (HTMLLIElementImpl::parseHTMLAttribute): * khtml/html/html_listimpl.h: * khtml/html/html_objectimpl.cpp: (HTMLAppletElementImpl::mapToEntry): (HTMLAppletElementImpl::parseHTMLAttribute): (HTMLEmbedElementImpl::HTMLEmbedElementImpl): (HTMLEmbedElementImpl::mapToEntry): (HTMLEmbedElementImpl::parseHTMLAttribute): (HTMLEmbedElementImpl::attach): (HTMLObjectElementImpl::mapToEntry): (HTMLObjectElementImpl::parseHTMLAttribute): (HTMLParamElementImpl::parseHTMLAttribute): * khtml/html/html_objectimpl.h: * khtml/html/html_tableimpl.cpp: (HTMLTableElementImpl::HTMLTableElementImpl): (HTMLTableElementImpl::~HTMLTableElementImpl): (HTMLTableElementImpl::mapToEntry): (HTMLTableElementImpl::parseHTMLAttribute): (HTMLTableElementImpl::additionalAttributeStyleDecl): (HTMLTableElementImpl::getSharedCellDecl): (HTMLTableElementImpl::attach): (HTMLTablePartElementImpl::mapToEntry): (HTMLTablePartElementImpl::parseHTMLAttribute): (HTMLTableCellElementImpl::mapToEntry): (HTMLTableCellElementImpl::parseHTMLAttribute): (HTMLTableCellElementImpl::additionalAttributeStyleDecl): (HTMLTableCellElementImpl::attach): (HTMLTableColElementImpl::mapToEntry): (HTMLTableColElementImpl::parseHTMLAttribute): (HTMLTableCaptionElementImpl::mapToEntry): (HTMLTableCaptionElementImpl::parseHTMLAttribute): * khtml/html/html_tableimpl.h: * khtml/html/htmlparser.cpp: (KHTMLParser::insertNode): (KHTMLParser::getElement): * khtml/html/htmltokenizer.h: (khtml::Token::addAttribute): * khtml/misc/htmlattrs.c: (hash_attr): (findAttr): * khtml/misc/htmlattrs.h: * khtml/misc/htmlattrs.in: * khtml/rendering/render_block.cpp: (khtml::RenderBlock::setStyle): (khtml::RenderBlock::updateFirstLetter): * khtml/rendering/render_container.cpp: (RenderContainer::addChild): (RenderContainer::updatePseudoChild): * khtml/rendering/render_frames.cpp: (RenderPartObject::updateWidget): * khtml/rendering/render_inline.cpp: (RenderInline::addChildToFlow): * khtml/rendering/render_list.cpp: (RenderListItem::setStyle): * khtml/rendering/render_object.cpp: (RenderObject::~RenderObject): (RenderObject::createAnonymousBlock): (RenderObject::setStyle): (RenderObject::remove): * khtml/rendering/render_style.cpp: (throw): (RenderStyle::operator delete): (RenderStyle::arenaDelete): (RenderStyle::RenderStyle): (RenderStyle::~RenderStyle): (RenderStyle::addPseudoStyle): * khtml/rendering/render_style.h: (khtml::RenderStyle::ref): (khtml::RenderStyle::deref): (khtml::RenderStyle::hasOneRef): (khtml::RenderStyle::refCount): * khtml/rendering/render_table.cpp: (RenderTable::addChild): (RenderTableSection::addChild): (RenderTableRow::addChild): * khtml/xml/dom_docimpl.cpp: (DocumentImpl::DocumentImpl): (DocumentImpl::createAttribute): (DocumentImpl::recalcStyle): * khtml/xml/dom_docimpl.h: * khtml/xml/dom_elementimpl.cpp: (AttributeImpl::clone): (AttrImpl::setValue): (AttrImpl::cloneNode): (ElementImpl::setAttribute): (ElementImpl::createAttribute): (ElementImpl::setAttributeMap): (ElementImpl::recalcStyle): (NamedAttrMapImpl::~NamedAttrMapImpl): (NamedAttrMapImpl::operator=): (NamedAttrMapImpl::addAttribute): (NamedAttrMapImpl::removeAttribute): * khtml/xml/dom_elementimpl.h: (DOM::AttributeImpl::~AttributeImpl): (DOM::ElementImpl::attributeChanged): (DOM::NamedAttrMapImpl::length): * khtml/xml/dom_nodeimpl.cpp: 2004-02-09 Darin Adler Reviewed by Dave. * khtml/html/html_formimpl.cpp: (HTMLGenericFormElementImpl::defaultEventHandler): Removed bogus extra setActive/focus code. Dave says this is no longer needed for the active state handling, and the focus call caused a problem, although I can't find the bug report at the moment. 2004-02-08 Darin Adler Reviewed by Don. - fixed an assertion failure when putting up Java applets caused by my last change * kwq/KWQKJavaAppletWidget.mm: (KJavaAppletWidget::KJavaAppletWidget): Don't try to get x() and y(). They are always zero because the widget is just being created at this point and has not yet been positioned; trying to get them leads to an assertion because there is no NSView until we call setView(). Before my change, there was a KWQView object at 0,0 that was released when we called setView, which is why the problem is new. 2004-02-08 Darin Adler Reviewed by Dave. - fixed things seen in the profile, for a total speedup of 4% on cvs-base - fixed some layout regressions from my last speedup due to text measurement inconsistencies * WebCorePrefix.h: Add a workaround for a bug in our system headers that prevents the macros from working right in C+code that uses the header. * khtml/css/cssstyleselector.cpp: (khtml::checkPseudoState): Use prepend instead of operator here. Will probably be obviated if someone fixes the checkPseudoState problem. (khtml::colorForCSSValue): Get rid of all the code that uses QPalette; it wasn't doing any good in Safari. Instead, hardcode the UI colors. * kwq/KWQChar.mm: (QChar::isDigitNonASCII): Non-inline part. The ASCII case is handled with an inline now. (QChar::isLetterNonASCII): Ditto. (QChar::isNumberNonASCII): Ditto. (QChar::isLetterOrNumberNonASCII): Ditto. (QChar::lowerNonASCII): Ditto. (QChar::upperNonASCII): Ditto. (QChar::digitValueNonASCII): Ditto. * kwq/KWQColorGroup.mm: Put all roles base inside #if, since we don't need them, and copying the color group and palette was making things slow. * kwq/KWQComboBox.h: Remove KWQComboBoxAdapter, not needed any more. * kwq/KWQComboBox.mm: (QComboBox::QComboBox): Remove KWQComboBoxAdapter, not needed any more. (QComboBox::~QComboBox): Ditto. (QComboBox::sizeHint): Turn off rounding; we use that in web text, but not in widgets. (-[KWQPopUpButton action:]): Moved the action method here. * kwq/KWQLineEdit.mm: (QLineEdit::sizeForCharacterWidth): Turn off rounding. We use it in web page text, but not in widgets. * kwq/KWQListBox.mm: (QListBox::sizeForNumberOfLines): Ditto. (-[KWQTableView drawRow:clipRect:]): Ditto. * kwq/KWQKURL.mm: (KURL::KURL): Added code to put the "file:" in front of a path without making a QString. (hasSlashDotOrDotDot): Added. Faster than two calls to strstr. (matchLetter): Added. Faster than tolower calls on each letter. (KURL::parse): Changed to use matchLetter and hasSlashDotOrDotDot. * kwq/KWQPalette.h: Remove all roles except base, and all groups except active, since we don't need them, and copying the color group and palette was making things slow. * kwq/KWQPalette.mm: Ditto. * kwq/KWQRegExp.mm: (QRegExp::match): Fixed logic so we don't create and destroy a QCString in the fast case. Also avoid UTF-8/UTF-16 offset mapping. * kwq/KWQString.h: (QChar::isDigit): Add inline section for ASCII. (QChar::isLetter): Ditto. (QChar::isNumber): Ditto. (QChar::isLetterOrNumber): Ditto. (QChar::digitValue): Ditto. (QChar::lower): Ditto. (QChar::upper): Ditto. (QString::utf8): Add a new version that returns the length; used by QRegExp. (QString::operator+=): Call a new append function. * kwq/KWQString.mm: (ucstrcmp): Made this function inline. (equal): Added, replacing various strcmp functions. (equalCaseInsensitive): Ditto. (ok_in_base): Changed to use isdigit and isalpha instead of QChar functions. (QString::detachInternal): Moved up so it will be inlined. (QString::~QString): Streamlined a little. (QString::utf8): Changed to return the length. (QString::find): Use unicode() instead of cell() in various places. Also refined a faster version of the one that takes a char *. (QString::contains): Changed all of the overloads to have structure that's more similar, and made them slightly faster too. (QString::isAllLatin1): Added. (QString::copyLatin1): Added. Lets you get the string as a char * buffer without changing the string itself into that format. (QString::toLong): Changed to use isdigit instead of QChar function. (QString::toULong): Ditto. (QString::setUnicode): Call the new detachAndDiscardCharacters; not implemented yet. (QString::setLatin1): Call the new detachAndDiscardCharacters; not implemented yet. (QString::sprintf): Call the new detachAndDiscardCharacters; not implemented yet. (QString::insert): Remove one memmove call for the case that appends at the end. (QString::detach): Change code to use the internal data if we can; saves at destructor time. (QString::detachAndDiscardCharacters): Added. Placeholder for now that just calls detach(). (QString::setLength): Optimize the setLength(0) case. (QString::fill): Call the new detachAndDiscardCharacters; not implemented yet. (QString::append): Renamed from operator+=, which now simply calls append(). (QString::reserve): Added. Useful when building up a string, like in QTextCodec. * WebCore-tests.exp: Added new function names for QChar. * WebCore-combined.exp: Updated. * kwq/KWQTextCodec.mm: (KWQTextDecoder::convertLatin1): Added. Since this is the most common encoding, and very easy to decode (built into QString, in fact), best to do it as a special case, not with TEC. (KWQTextDecoder::convertUTF16): Added a reserve() call for better performance and made the stack buffer larger. (KWQTextDecoder::convertUsingTEC): Added a reserve() call for better performance and made the stack buffer larger. (KWQTextDecoder::convert): Added a switch statement and convertLatin1 case. * kwq/KWQView.h: Removed the KWQView class. * kwq/KWQView.mm: Removed. * WebCore.pbproj/project.pbxproj: Removed KWQView.mm. * kwq/KWQWidget.h: Changed name of QWidgetPrivate to KWQWidgetPrivate. * kwq/KWQWidget.mm: (QWidget::QWidget): Got rid of code that makes a KWQView when no view is passed in. We were creating and destroying extra views because of this. (QWidget::setFrameGeometry): Only call getOuterView() once, not three times. Also, don't do any work at all if the frame is already correct. * khtml/khtmlview.cpp: (KHTMLView::init): Removed a call that will hit an assertion due to the way a new KHTMLView does not yet have an NSView. * kwq/WebCoreTextRenderer.h: Broke applyRounding into applyRunRounding and applyWordRounding. * kwq/WebCoreTextRendererFactory.m: (WebCoreInitializeEmptyTextStyle): Initialize both rounding flags on. 2004-02-07 Darin Adler Reviewed by Dave. - switched KWQComboBox, KWQListBox, and KWQLineEdit to use WebKit text measuring/rendering instead of AppKit - fixed width calculation for KWQListBox that made them too wide (the computation used the width of standard scroll bars rather than the small scroll bars they actually use) Speeds up cvs-base by 5%! * khtml/rendering/render_form.cpp: (RenderSelect::updateFromElement): Get rid of beginBatchInsert, and rename endBatchInsert. Use our own "append" calls instead of "insert" calls. * kwq/KWQComboBox.h: Replace insertItem with appendItem. Add a new populateMenu call (for internal use, but public). Change width member to be int instead of float. Remove updateCurrentItem(), and add a menuPopulated boolean and a QStringList containing the items. * kwq/KWQComboBox.mm: (QComboBox::QComboBox): Initialize currentItem directly instead of calling updateCurrentItem. Also initialize menuPopulated to true. (QComboBox::appendItem): Replaces insertItem. Put items in a string list. Don't keep the menu populated unless the button is highlighted (which indicates the menu is showing). (QComboBox::sizeHint): Compute widths using WebCoreTextRenderer, and the string list. (QComboBox::baselinePosition): Change ceil to ceilf, since we are dealing with floats, not doubles. (QComboBox::clear): Clear the items list. Also reset the currentItem field directly instead of using updateCurrentItem(). (QComboBox::setCurrentItem): If the menu is not populated, then keep a single item with the appropriate title. If the menu is populated, then select the appropriate item. (QComboBox::itemSelected): Moved the logic from updateCurrentItem in here for simplicity. (QComboBox::focusPolicy): Tweaked the comment. (QComboBox::populateMenu): Added. (-[KWQPopUpButtonCell setHighlighted:]): Populate the menu when the cell is highlighted. * kwq/KWQLineEdit.mm: (QLineEdit::sizeForCharacterWidth): Put an empty string in the cell, and add in a separately-computed width for the string. (QLineEdit::baselinePosition): Use ceilf instead of ceil since we are doing floats, not doubles. * kwq/KWQListBox.h: Changed the items list from an NSArray to a QValueList. (KWQListBoxItem::KWQListBoxItem): Added a new class to keep the string and the "is label" boolean. (QListBox::count): Now inline. (QListBox::appendItem): Replaced insertItem with this. (QListBox::appendGroupLabel): Replaced insertGroupLabel with this. (QListBox::itemAtIndex): Replaced itemIsGroupLabel with this. * kwq/KWQListBox.mm: (itemTextRenderer): Replaced itemFont with this, which returns a WebCoreTextRenderer. (groupLabelTextRenderer): Ditto. (QListBox::QListBox): Removed the _insertingItems boolean, and handling of the _items list. (QListBox::~QListBox): Ditto. (QListBox::clear): Now clears the items list. Doesn't both with reloadData, since doneAppendingItems handles that. (QListBox::appendItem): Replaced insertItem. Just adds to the list. No need to construct attributed strings any more. (QListBox::doneAppendingItems): Replaced endBatchInsert. No need to clear the obsolete _insertingItems boolean. (QListBox::setEnabled): Added a call to reloadData. (QListBox::sizeForNumberOfLines): Compute widths using WebCoreTextRenderer, and the string list. Also adjust for the difference in widths between small and default scrollers and add in margins. (QListBox::setWritingDirection): Remove code that updates the direction in attributed strings. (-[KWQTableView initWithListBox:]): Compute height from font, not cell. (-[KWQTableView numberOfRowsInTableView:]): Get count from QListBox instead of items array. (-[KWQTableView tableView:objectValueForTableColumn:row:]): Return nil becase we don't want to create an NSString for each cell. We'll draw the appropriate thing. (-[KWQTableView tableView:shouldSelectRow:]): Update for change to QComboBox function. (-[KWQTableView drawRow:clipRect:]): Added. Draws the text in the cell, with the appropriate color and position, using WebCoreTextRenderer for speed. (-[KWQTableView _accessibilityTableCell:tableColumn:]): Set up cell with a string in this case, because we need the string to be seen by the accessibilty framework. * kwq/WebCoreTextRenderer.h: Fixed typo in comment. * kwq/WebCoreTextRendererFactory.m: Removed bogus inline specifiers. * khtml/rendering/render_layer.cpp: Fixed a couple of cases of RenderLayer::RenderLayer that just should have said RenderLayer. 2004-02-07 Darin Adler * WebCore.pbproj/project.pbxproj: Get rid of the DEPLOYMENT_LOCATION and DEPLOYMENT_POSTPROCESSING flags that were in the Deployment build style. These were causing the need to chmod all the time after building WebCore successfully, and were doing us no good. 2004-02-07 Darin Adler * kwq/can-convert.mm: Added test program to see which conversions are actually supported by TEC. 2004-02-06 David Hyatt Implemented a TokenizerString that can walk a list of substrings, so that data can be enqueued in the list without having to do a copy. Speeds up voodooextreme by 20% or so, giving the overall page-load tests get a 2% boost. Reviewed by darin * WebCore.pbproj/project.pbxproj: * khtml/html/html_documentimpl.h: * khtml/html/htmltokenizer.cpp: (khtml::HTMLTokenizer::begin): (khtml::HTMLTokenizer::processListing): (khtml::HTMLTokenizer::parseSpecial): (khtml::HTMLTokenizer::scriptHandler): (khtml::HTMLTokenizer::parseComment): (khtml::HTMLTokenizer::parseServer): (khtml::HTMLTokenizer::parseProcessingInstruction): (khtml::HTMLTokenizer::parseText): (khtml::HTMLTokenizer::parseEntity): (khtml::HTMLTokenizer::parseTag): (khtml::HTMLTokenizer::write): (khtml::HTMLTokenizer::notifyFinished): (khtml::HTMLTokenizer::setSrc): (khtml::HTMLTokenizer::setOnHold): * khtml/html/htmltokenizer.h: (khtml::Token::Token): (khtml::Token::~Token): (khtml::Token::addAttribute): (khtml::Token::reset): * khtml/khtml_part.cpp: (KHTMLPart::handleMousePressEventDoubleClick): * khtml/khtml_part.h: * khtml/misc/stringit.cpp: Added. (khtml::TokenizerString::length): (khtml::TokenizerString::clear): (khtml::TokenizerString::append): (khtml::TokenizerString::prepend): (khtml::TokenizerString::advanceSubstring): (khtml::TokenizerString::toString): * khtml/misc/stringit.h: (khtml::TokenizerSubstring::TokenizerSubstring): (khtml::TokenizerSubstring::clear): (khtml::TokenizerSubstring::appendTo): (khtml::TokenizerString::TokenizerString): (khtml::TokenizerString::push): (khtml::TokenizerString::isEmpty): (khtml::TokenizerString::advance): (khtml::TokenizerString::escaped): (khtml::TokenizerString::lineCount): (khtml::TokenizerString::resetLineCount): (khtml::TokenizerString::operator++): (khtml::TokenizerString::operator*): (khtml::TokenizerString::operator->): (khtml::TokenizerString::current): * khtml/xbl/xbl_docimpl.cpp: * khtml/xbl/xbl_docimpl.h: (XBL::): * khtml/xbl/xbl_tokenizer.h: (XBL::): * khtml/xml/dom_docimpl.h: (DOM::DocumentImpl::tokenizer): * khtml/xml/xml_tokenizer.cpp: (khtml::XMLTokenizer::write): * khtml/xml/xml_tokenizer.h: * kwq/KWQSignalStubs.mm: * kwq/KWQValueList.h: (QValueList::insert): (QValueList::fromLast): * kwq/KWQValueListImpl.h: * kwq/KWQValueListImpl.mm: (KWQValueListImpl::clear): (KWQValueListImpl::insert): (KWQValueListImpl::fromLast): === Safari-127 === 2004-02-06 Ken Kocienda Reviewed by Chris Steps no longer return int error codes. Steps are operations that should succeed. (When was the last time that typing in a text editor failed for reasons which could not have been figured out ahead of time...like file permissions?). If this does not work for the future, perhaps we can change some or all of the many asserts in the code to throw C+ exceptions instead, which can be caught and handled at a suitable level. I also made some nice convenience functions to create and apply EditStep objects, and moved the command code to use the new functions. * khtml/editing/htmlediting.cpp: (EditStep::EditStep): (EditStep::~EditStep): (EditStep::reapply): (EditStep::beginApply): (EditStep::endApply): (EditStep::beginUnapply): (EditStep::endUnapply): (EditStep::beginReapply): (EditStep::endReapply): (CompositeEditStep::unapply): (CompositeEditStep::reapply): (CompositeEditStep::applyStep): (CompositeEditStep::insertNodeBefore): (CompositeEditStep::insertNodeAfter): (CompositeEditStep::appendNode): (CompositeEditStep::removeNode): (CompositeEditStep::splitTextNode): (CompositeEditStep::joinTextNodes): (CompositeEditStep::insertText): (CompositeEditStep::deleteText): (CompositeEditStep::moveSelectionTo): (CompositeEditStep::deleteSelection): (InsertNodeBeforeStep::InsertNodeBeforeStep): (InsertNodeBeforeStep::apply): (InsertNodeBeforeStep::unapply): (AppendNodeStep::AppendNodeStep): (AppendNodeStep::apply): (AppendNodeStep::unapply): (RemoveNodeStep::RemoveNodeStep): (RemoveNodeStep::apply): (RemoveNodeStep::unapply): (ModifyTextNodeStep::ModifyTextNodeStep): (ModifyTextNodeStep::splitTextNode): (ModifyTextNodeStep::joinTextNodes): (SplitTextNodeStep::apply): (SplitTextNodeStep::unapply): (JoinTextNodesStep::apply): (JoinTextNodesStep::unapply): (InsertTextStep::InsertTextStep): (InsertTextStep::apply): (InsertTextStep::unapply): (DeleteTextStep::DeleteTextStep): (DeleteTextStep::apply): (DeleteTextStep::unapply): (MoveSelectionToStep::MoveSelectionToStep): (MoveSelectionToStep::apply): (MoveSelectionToStep::unapply): (DeleteSelectionStep::apply): (EditCommand::EditCommand): (EditCommand::~EditCommand): (EditCommand::currentSelection): (InputTextCommand::apply): (DeleteTextCommand::apply): * khtml/editing/htmlediting.h: (khtml::MoveSelectionToStep::~MoveSelectionToStep): (khtml::EditCommand::cookie): * khtml/khtml_part.cpp: (KHTMLPart::applyCommand): (KHTMLPart::undoRedoEditing): (KHTMLPart::undoEditing): (KHTMLPart::redoEditing): * khtml/khtml_part.h: * khtml/xml/dom_elementimpl.cpp: (ElementImpl::defaultEventHandler): 2004-02-05 Ken Kocienda Reviewed by Hyatt This patch includes two major pieces of work. 1. The KHTMLSelection object has been reworked to be a value object. Part-related state has been moved out to KHTMLPart. This change makes it much easier to program with these objects, since they can now be treating unambigously like built-in types. As part of this work, I did a pass over the API and improved some function names. A related part of work was to clean up the relationship between KHTMLSelection, KHTMLPart and DOMDocumentImpl, and cleared up how to change the selection when that is necessary. (There is now a small set of functions on KHTMLPart). 2. Implemented undo/redo, and hooked into the Cocoa undo architecture. The notion of EditCommands has been enhanced by the addition of EditSteps, which are primitive operations out of which edit commands are built. Most of the existing operations have been updated to use this new design. The last couple will be updated soon, so that all supported editing operations will be undoable. * khtml/editing/htmlediting.cpp: * khtml/editing/htmlediting.h: * khtml/html/html_elementimpl.cpp: (HTMLElementImpl::isFocusable): Prevents children of content editable parents from receiving focus. * khtml/khtml_part.cpp: Modified to work with new KHTMLSelection class design. Also added some new code to work with new edit command architecture. * khtml/khtml_part.h: * khtml/khtml_selection.cpp: Reworked as a value class. Too much state was being stored in this object for it to be convenient to use as a value. That has been fixed. * khtml/khtml_selection.h: * khtml/khtmlpart_p.h: (KHTMLPartPrivate::KHTMLPartPrivate): (KHTMLPartPrivate::~KHTMLPartPrivate): * khtml/khtmlview.cpp: Modified to work with new KHTMLSelection class design. * khtml/rendering/render_block.cpp: Modified to work with new KHTMLSelection class design. (khtml::RenderBlock::paintObject): * khtml/xml/dom_docimpl.cpp: (DocumentImpl::updateSelection): (DocumentImpl::deleteSelection): (DocumentImpl::pasteHTMLString): * khtml/xml/dom_docimpl.h: * khtml/xml/dom_elementimpl.cpp: (ElementImpl::defaultEventHandler): Modified to work with new edit command architecture. * kwq/KWQKHTMLPart.h: * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::registerCommandForUndo): Added hook to Cocoa undo/redo architecture. * kwq/WebCoreBridge.h: * kwq/WebCoreBridge.mm: (-[WebCoreBridge isSelectionEditable]): Modified to work with new edit command architecture. (-[WebCoreBridge moveCaretToPoint:]): Ditto (-[WebCoreBridge haveSelection]): Ditto (-[WebCoreBridge selectedHTML]): Ditto (-[WebCoreBridge setSelectionFrom:startOffset:to:endOffset:]): Ditto (-[WebCoreBridge reconstructedSource]): Ditto (-[WebCoreBridge undoRedoEditing:]): Added hook to Cocoa undo/redo architecture. 2004-02-04 David Hyatt Improve rule matching in the style system. Filter out most rules up front, so that only a small number of rules need to be walked for any given element. Yields a ~4-5% improvement on the PLT. Reviewed by kocienda * khtml/css/css_base.cpp: (StyleBaseImpl::setParsedValue): (CSSSelector::specificity): (CSSSelector::extractPseudoType): (CSSSelector::operator == ): * khtml/css/css_base.h: (DOM::CSSSelector::CSSSelector): (DOM::CSSSelector::~CSSSelector): (DOM::CSSSelector::append): (DOM::CSSSelector::next): (DOM::CSSSelector::): (DOM::StyleBaseImpl::StyleBaseImpl): * khtml/css/css_ruleimpl.cpp: (CSSStyleRuleImpl::selectorText): (CSSRuleListImpl::insertRule): * khtml/css/css_ruleimpl.h: (DOM::CSSStyleRuleImpl::setSelector): (DOM::CSSStyleRuleImpl::selector): * khtml/css/css_stylesheetimpl.cpp: * khtml/css/css_stylesheetimpl.h: * khtml/css/css_valueimpl.cpp: (CSSStyleDeclarationImpl::getPropertyCSSValue): (CSSStyleDeclarationImpl::removeProperty): (CSSStyleDeclarationImpl::setProperty): (CSSStyleDeclarationImpl::setStringProperty): (CSSStyleDeclarationImpl::setImageProperty): (CSSStyleDeclarationImpl::setLengthProperty): (CSSStyleDeclarationImpl::cssText): (CSSStyleDeclarationImpl::setCssText): * khtml/css/css_valueimpl.h: (DOM::CSSStyleDeclarationImpl::node): (DOM::CSSProperty::CSSProperty): (DOM::CSSProperty::id): (DOM::CSSProperty::isImportant): * khtml/css/cssparser.cpp: (CSSParser::CSSParser): (ParseString::lower): (CSSParser::parseValue): (CSSParser::parseDeclaration): (CSSParser::addProperty): (CSSParser::parseShadow): * khtml/css/cssparser.h: * khtml/css/cssstyleselector.cpp: (khtml::): (khtml::CSSStyleSelector::CSSStyleSelector): (khtml::CSSStyleSelector::init): (khtml::CSSStyleSelector::~CSSStyleSelector): (khtml::CSSStyleSelector::loadDefaultStyle): (khtml::CSSStyleSelector::addMatchedRule): (khtml::CSSStyleSelector::addMatchedDeclaration): (khtml::CSSStyleSelector::matchRules): (khtml::CSSStyleSelector::matchRulesForList): (khtml::operator >): (khtml::operator <=): (khtml::CSSStyleSelector::sortMatchedRules): (khtml::CSSStyleSelector::initForStyleResolve): (khtml::CSSStyleSelector::styleForElement): (khtml::CSSStyleSelector::pseudoStyleForElement): (khtml::checkPseudoState): (khtml::CSSStyleSelector::checkSelector): (khtml::CSSStyleSelector::checkOneSelector): (khtml::CSSRuleSet::CSSRuleSet): (khtml::CSSRuleSet::addToRuleSet): (khtml::CSSRuleSet::addRule): (khtml::CSSRuleSet::addRulesFromSheet): (khtml::CSSStyleSelector::applyDeclarations): (khtml::CSSStyleSelector::applyProperty): (khtml::CSSStyleSelector::smallerFontSize): (khtml::CSSStyleSelector::getColorFromPrimitiveValue): * khtml/css/cssstyleselector.h: (khtml::): (khtml::CSSRuleData::m_next): (khtml::CSSRuleData::~CSSRuleData): (khtml::CSSRuleData::position): (khtml::CSSRuleData::rule): (khtml::CSSRuleData::selector): (khtml::CSSRuleData::next): (khtml::CSSRuleDataList::CSSRuleDataList): (khtml::CSSRuleDataList::~CSSRuleDataList): (khtml::CSSRuleDataList::first): (khtml::CSSRuleDataList::last): (khtml::CSSRuleDataList::append): (khtml::CSSRuleSet::~CSSRuleSet): (khtml::CSSRuleSet::getIDRules): (khtml::CSSRuleSet::getClassRules): (khtml::CSSRuleSet::getTagRules): (khtml::CSSRuleSet::getUniversalRules): * khtml/css/cssvalues.c: (hash_val): (findValue): * khtml/css/cssvalues.h: * khtml/css/cssvalues.in: * khtml/css/html4.css: * khtml/css/parser.cpp: * khtml/css/parser.h: * khtml/css/parser.y: * khtml/dom/dom_element.cpp: (Element::style): * khtml/html/html_baseimpl.cpp: (HTMLBodyElementImpl::HTMLBodyElementImpl): (HTMLBodyElementImpl::~HTMLBodyElementImpl): (HTMLBodyElementImpl::createLinkDecl): (HTMLBodyElementImpl::parseAttribute): * khtml/html/html_baseimpl.h: * khtml/html/html_elementimpl.cpp: (HTMLNamedAttrMapImpl::parseClassAttribute): (HTMLElementImpl::HTMLElementImpl): (HTMLElementImpl::~HTMLElementImpl): (HTMLElementImpl::createInlineStyleDecl): (HTMLElementImpl::createMappedAttributeDecl): (HTMLElementImpl::parseAttribute): (HTMLElementImpl::getClassList): (HTMLElementImpl::addCSSProperty): (HTMLElementImpl::addCSSStringProperty): (HTMLElementImpl::addCSSImageProperty): (HTMLElementImpl::addCSSLength): (HTMLElementImpl::addHTMLColor): (HTMLElementImpl::removeCSSProperty): * khtml/html/html_elementimpl.h: (DOM::HTMLNamedAttrMapImpl::getClassList): (DOM::HTMLElementImpl::inlineStyleDecl): (DOM::HTMLElementImpl::attributeStyleDecl): (DOM::HTMLElementImpl::getInlineStyleDecl): * khtml/html/html_tableimpl.cpp: (HTMLTableElementImpl::createSharedCellDecls): (HTMLTableCellElementImpl::additionalAttributeStyleDecl): * khtml/html/html_tableimpl.h: * khtml/xml/dom_atomicstring.cpp: (DOM::AtomicString::add): (DOM::AtomicString::remove): * khtml/xml/dom_docimpl.cpp: (DocumentImpl::DocumentImpl): (DocumentImpl::resetLinkColor): (DocumentImpl::resetVisitedLinkColor): (DocumentImpl::resetActiveLinkColor): (DocumentImpl::recalcStyleSelector): * khtml/xml/dom_docimpl.h: (DOM::DocumentImpl::linkColor): (DOM::DocumentImpl::visitedLinkColor): (DOM::DocumentImpl::activeLinkColor): (DOM::DocumentImpl::setLinkColor): (DOM::DocumentImpl::setVisitedLinkColor): (DOM::DocumentImpl::setActiveLinkColor): * khtml/xml/dom_elementimpl.cpp: (ElementImpl::ElementImpl): (ElementImpl::~ElementImpl): (ElementImpl::getClassList): (ElementImpl::getIDAttribute): (ElementImpl::cloneNode): (XMLElementImpl::cloneNode): * khtml/xml/dom_elementimpl.h: (DOM::ElementImpl::inlineStyleDecl): (DOM::ElementImpl::attributeStyleDecl): (DOM::ElementImpl::getInlineStyleDecl): (DOM::ElementImpl::additionalAttributeStyleDecl): (DOM::NamedAttrMapImpl::id): (DOM::NamedAttrMapImpl::setID): * khtml/xml/dom_stringimpl.cpp: (DOM::DOMStringImpl::DOMStringImpl): (DOM::DOMStringImpl::~DOMStringImpl): (DOM::DOMStringImpl::append): (DOM::DOMStringImpl::insert): (DOM::DOMStringImpl::truncate): (DOM::DOMStringImpl::remove): (DOM::DOMStringImpl::split): * khtml/xml/dom_stringimpl.h: (DOM::DOMStringImpl::DOMStringImpl): 2004-02-04 David Hyatt Fix line-height regression on altavista. * khtml/rendering/render_br.cpp: (RenderBR::RenderBR): (RenderBR::position): (RenderBR::lineHeight): (RenderBR::setStyle): * khtml/rendering/render_br.h: * khtml/rendering/render_flow.h: (khtml::RenderFlow::RenderFlow): 2004-02-04 David Hyatt Fix a regression in the line-height of first-lines and inline-blocks. Reviewed by darin * khtml/rendering/render_flow.cpp: (RenderFlow::lineHeight): * khtml/rendering/render_text.cpp: (RenderText::lineHeight): 2004-02-02 Chris Blumenberg Fixed: : REGRESSION: dragging text or images over a WebView is jerky Reviewed by mjs. * WebCore-combined.exp: * WebCore.exp: * kwq/WebCoreBridge.h: added the DOM node element key constant (SPI for now) * kwq/WebCoreBridge.mm: (-[WebCoreBridge elementAtPoint:]): instead of calling toHTML for every node, put the node on the element so the caller can get the HTML string representation when it needs to. * kwq/WebCoreDOMNode.mm: (-[WebCoreDOMNode HTMLString]): new 2004-02-02 Darin Adler Reviewed by Maciej. - use toInt32 where we really need an int, rather than toInteger, because toInteger needs to return an integral number as a double, not as an int * khtml/ecma/kjs_css.cpp: (DOMCSSStyleDeclarationProtoFunc::tryCall): Call toInt32 intead of toInteger. (DOMStyleSheetListFunc::tryCall): Ditto. (KJS::DOMMediaListProtoFunc::tryCall): Ditto. (DOMCSSStyleSheetProtoFunc::tryCall): Ditto. (DOMCSSRuleListFunc::tryCall): Ditto. (DOMCSSRuleFunc::tryCall): Ditto. (DOMCSSPrimitiveValueProtoFunc::tryCall): Ditto. (DOMCSSValueListFunc::tryCall): Ditto. * khtml/ecma/kjs_dom.cpp: (DOMCharacterDataProtoFunc::tryCall): Ditto. (DOMTextProtoFunc::tryCall): Ditto. * khtml/ecma/kjs_events.cpp: (DOMUIEventProtoFunc::tryCall): Ditto. (DOMMouseEventProtoFunc::tryCall): Ditto. (DOMKeyboardEventProtoFunc::tryCall): Ditto. (DOMMutationEventProtoFunc::tryCall): Ditto. * khtml/ecma/kjs_html.cpp: (KJS::HTMLElementFunction::tryCall): Ditto. (KJS::HTMLElement::putValue): Ditto. (KJS::HTMLSelectCollection::tryPut): Ditto. * khtml/ecma/kjs_range.cpp: (DOMRangeProtoFunc::tryCall): Ditto. * khtml/ecma/kjs_traversal.cpp: (JSNodeFilter::acceptNode): Ditto. * khtml/ecma/kjs_window.cpp: (WindowFunc::tryCall): Ditto. (HistoryFunc::tryCall): Ditto. 2004-02-02 Darin Adler Reviewed by John. - fix at least some of : 10,000 leaks, many of DOM::AtomicString::add, after one run of cvs-base * khtml/xml/dom_atomicstring.cpp: (DOM::AtomicString::add): Remove extra allocation of strings. This should speed things up a bit as well as fixing one big leak. 2004-02-02 Chris Blumenberg Fixed: : support for editing via drag & drop Reviewed by kocienda. * khtml/xml/dom_docimpl.cpp: (DocumentImpl::deleteSelection): fixed a crash I encountered while attempting to delete and empty selection * kwq/WebCoreBridge.h: * kwq/WebCoreBridge.mm: (-[WebCoreBridge isSelectionEditable]): renamed from isEditable (-[WebCoreBridge moveCaretToPoint:]): new (-[WebCoreBridge elementAtPoint:]): added support for WebCoreElementHTMLStringKey and WebCoreElementIsEditableKey 2004-01-30 David Hyatt Fix for 3522497,
s should not get AXObjects created. Reviewed by mjs * kwq/KWQAccObject.mm: (-[KWQAccObject accessibilityIsIgnored]): === Safari-126 === 2004-01-30 David Hyatt Fix a regression I introduced in my atomicstring patch. I meant to say !attr->isNull() in the contentedtiable attribute parsing code. Reviewed by cblu * khtml/html/html_elementimpl.cpp: (HTMLElementImpl::parseAttribute): 2004-01-30 David Hyatt Make m_lineHeight be cached on RenderFlow instead of RenderText and avoid recomputing it so much when it is not set by CSS (since calls to fontMetrics().lineSpacing() are expensive). Yields ~1.5% performance improvement. Reviewed by darin * khtml/rendering/render_block.cpp: (khtml::RenderBlock::setStyle): * khtml/rendering/render_flow.cpp: (RenderFlow::lineHeight): * khtml/rendering/render_flow.h: * khtml/rendering/render_inline.cpp: (RenderInline::setStyle): * khtml/rendering/render_object.cpp: (RenderObject::verticalPositionHint): (RenderObject::lineHeight): * khtml/rendering/render_object.h: * khtml/rendering/render_text.cpp: (RenderText::setStyle): (RenderText::checkSelectionPointIgnoringContinuations): (RenderText::height): (RenderText::lineHeight): * khtml/rendering/render_text.h: 2004-01-30 David Hyatt Disable XBL. The loadBindings call was taking 0.1-0.25%. While I know how to get rid of this overhead, it's easier for now to just disable all of XBL. * WebCorePrefix.h: * khtml/misc/loader.h: * khtml/xbl/xbl_binding.cpp: * khtml/xbl/xbl_binding_manager.cpp: * khtml/xbl/xbl_docimpl.cpp: * khtml/xbl/xbl_protobinding.cpp: * khtml/xbl/xbl_protohandler.cpp: * khtml/xbl/xbl_protoimplementation.cpp: * khtml/xbl/xbl_tokenizer.cpp: 2004-01-29 David Hyatt Atomize font families (KWQFontFamily) and all attribute values. Move atomic string into separate files. In my testing, this patch yields the same score as Safari-125 in tests and recovers all lost performance (mostly from excess copying of AtomicStrings where DOMStringImpl* used to be returned). Reviewed by darin * ForwardingHeaders/xml/dom_atomicstring.h: Added. * WebCore.pbproj/project.pbxproj: * khtml/css/css_base.cpp: (CSSSelector::print): (CSSSelector::extractPseudoType): (CSSSelector::selectorText): * khtml/css/css_valueimpl.cpp: (FontFamilyValueImpl::FontFamilyValueImpl): * khtml/css/cssparser.cpp: (CSSParser::parseFontFamily): * khtml/css/cssparser.h: * khtml/css/cssstyleselector.cpp: (khtml::checkPseudoState): (khtml::CSSStyleSelector::checkOneSelector): (khtml::CSSStyleSelector::applyRule): * khtml/dom/dom_element.cpp: (Element::getAttributeNS): * khtml/dom/dom_string.cpp: (DOMString::toInt): (DOMString::toLengthArray): (DOM::operator==): * khtml/dom/dom_string.h: (DOM::operator==): (DOM::operator!=): * khtml/ecma/kjs_navigator.cpp: (Plugins::get): (MimeTypes::get): (Plugin::get): * khtml/html/html_baseimpl.cpp: (HTMLBodyElementImpl::parseAttribute): (HTMLFrameElementImpl::isURLAllowed): (HTMLFrameElementImpl::openURL): (HTMLFrameElementImpl::parseAttribute): (HTMLFrameElementImpl::attach): (HTMLFrameElementImpl::setLocation): (HTMLFrameSetElementImpl::parseAttribute): (HTMLIFrameElementImpl::attach): * khtml/html/html_baseimpl.h: * khtml/html/html_blockimpl.cpp: (HTMLHRElementImpl::parseAttribute): (HTMLHRElementImpl::attach): (HTMLMarqueeElementImpl::parseAttribute): * khtml/html/html_documentimpl.cpp: (HTMLDocumentImpl::documentElement): * khtml/html/html_documentimpl.h: * khtml/html/html_elementimpl.cpp: (HTMLElementImpl::parseAttribute): (HTMLElementImpl::addCSSLength): (HTMLElementImpl::addHTMLAlignment): * khtml/html/html_elementimpl.h: * khtml/html/html_formimpl.cpp: (HTMLGenericFormElementImpl::parseAttribute): (HTMLInputElementImpl::parseAttribute): (HTMLInputElementImpl::attach): (HTMLSelectElementImpl::parseAttribute): (HTMLKeygenElementImpl::parseAttribute): (HTMLKeygenElementImpl::encoding): (HTMLOptionElementImpl::parseAttribute): (HTMLTextAreaElementImpl::parseAttribute): * khtml/html/html_formimpl.h: * khtml/html/html_headimpl.cpp: (HTMLLinkElementImpl::parseAttribute): (HTMLStyleElementImpl::parseAttribute): * khtml/html/html_imageimpl.cpp: (HTMLImageElementImpl::parseAttribute): (HTMLAreaElementImpl::parseAttribute): * khtml/html/html_inlineimpl.cpp: (HTMLAnchorElementImpl::parseAttribute): * khtml/html/html_listimpl.cpp: (HTMLOListElementImpl::parseAttribute): (HTMLLIElementImpl::parseAttribute): * khtml/html/html_miscimpl.cpp: (HTMLCollectionImpl::getNamedItem): (HTMLFormCollectionImpl::getNamedFormItem): (HTMLFormCollectionImpl::getNamedImgItem): * khtml/html/html_objectimpl.cpp: (HTMLEmbedElementImpl::parseAttribute): (HTMLObjectElementImpl::parseAttribute): (HTMLParamElementImpl::HTMLParamElementImpl): (HTMLParamElementImpl::~HTMLParamElementImpl): (HTMLParamElementImpl::parseAttribute): * khtml/html/html_objectimpl.h: (DOM::HTMLParamElementImpl::name): (DOM::HTMLParamElementImpl::value): * khtml/html/html_tableimpl.cpp: (HTMLTableElementImpl::parseAttribute): (HTMLTablePartElementImpl::parseAttribute): (HTMLTableCellElementImpl::parseAttribute): (HTMLTableColElementImpl::parseAttribute): * khtml/html/htmlparser.cpp: (KHTMLParser::insertNode): (KHTMLParser::handleIsindex): * khtml/html/htmltokenizer.cpp: (HTMLTokenizer::parseTag): * khtml/html/htmltokenizer.h: (khtml::Token::addAttribute): * khtml/khtml_part.cpp: (KHTMLPart::init): * khtml/khtmlview.cpp: (KHTMLToolTip::maybeTip): * khtml/xml/dom_atomicstring.cpp: Added. (DOM::AtomicStringStatisticsExitLogger::~AtomicStringStatisticsExitLogger): (DOM::AtomicString::equal): (DOM::AtomicString::add): (DOM::AtomicString::insert): (DOM::AtomicString::remove): (DOM::AtomicString::expand): (DOM::AtomicString::shrink): (DOM::AtomicString::rehash): (DOM::AtomicString::init): (DOM::operator==): (DOM::equalsIgnoreCase): * khtml/xml/dom_atomicstring.h: Added. (DOM::AtomicString::AtomicString): (DOM::AtomicString:::m_string): (DOM::AtomicString::operator const DOMString&): (DOM::AtomicString::domString): (DOM::AtomicString::string): (DOM::AtomicString::implementation): (DOM::AtomicString::unicode): (DOM::AtomicString::length): (DOM::AtomicString::ascii): (DOM::AtomicString::find): (DOM::AtomicString::toInt): (DOM::AtomicString::percentage): (DOM::AtomicString::toLengthArray): (DOM::AtomicString::isNull): (DOM::AtomicString::isEmpty): (DOM::AtomicString::equal): (DOM::operator==): (DOM::operator!=): * khtml/xml/dom_atomicstringlist.h: Added. (DOM::AtomicStringList:::m_next): (DOM::AtomicStringList::m_next): (DOM::AtomicStringList::~AtomicStringList): (DOM::AtomicStringList::next): (DOM::AtomicStringList::setNext): (DOM::AtomicStringList::string): (DOM::AtomicStringList::setString): (DOM::AtomicStringList::clone): (DOM::AtomicStringList::clear): * khtml/xml/dom_docimpl.h: * khtml/xml/dom_elementimpl.cpp: (AttrImpl::nodeValue): (AttrImpl::cloneNode): (ElementImpl::getAttribute): (ElementImpl::getAttributeNS): (ElementImpl::setAttribute): (ElementImpl::setAttributeMap): (ElementImpl::attach): (ElementImpl::detach): (ElementImpl::updateId): (NamedAttrMapImpl::setNamedItem): (NamedAttrMapImpl::removeNamedItem): (NamedAttrMapImpl::getAttributeItem): (NamedAttrMapImpl::operator=): (NamedAttrMapImpl::removeAttribute): * khtml/xml/dom_elementimpl.h: (DOM::AttributeImpl::AttributeImpl): (DOM::AttributeImpl::value): (DOM::AttributeImpl::prefix): (DOM::AttributeImpl::isNull): (DOM::AttributeImpl::isEmpty): (DOM::AttributeImpl::setValue): (DOM::AttributeImpl::setPrefix): (DOM::ElementImpl::getAttribute): * khtml/xml/dom_nameimpl.cpp: Removed. * khtml/xml/dom_nameimpl.h: (DOM::Name::namespaceURI): (DOM::Name::localName): * khtml/xml/dom_nodeimpl.h: * khtml/xml/dom_stringimpl.cpp: * kwq/KWQFont.mm: (QFont::family): * kwq/KWQFontFamily.h: (KWQFontFamily::family): * kwq/KWQFontFamily.mm: (retainDOMStringImpl): (releaseDOMStringImpl): (KWQFontFamily::getNSFamily): (KWQFontFamily::setFamily): (KWQFontFamily::operator==): * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::fileWrapperForElement): * kwq/WebCoreBridge.mm: (-[WebCoreBridge elementAtPoint:]): 2004-01-29 Chris Blumenberg Fixed: : copied HTML is strangely formatted, random whitespace and return characters Reviewed by dave. * khtml/xml/dom_nodeimpl.cpp: (NodeImpl::recursive_toHTMLWithRange): remove all code that tries to format the HTML since we can rely on the existing white space to preserve the original formatting 2004-01-28 John Sullivan Reviewed by Dave. * khtml/rendering/render_text.cpp: (RenderText::paintObject): Increment s in the while() clause so it is incremented even after a continue statement. This fixes an infinite loop I ran into in the printing code path at certain scaled print sizes on certain pages. 2004-01-28 Chris Blumenberg Fixed: : when pasting an image, cursor should be after the image, not before Reviewed by rjw. * khtml/xml/dom_docimpl.cpp: (DocumentImpl::pasteHTMLString): when the last node of the paste is non-text, use 1 instead of 0 as the start offset of the caret 2004-01-28 Ken Kocienda Reviewed by Hyatt A small collection of fixes and improvements to editing. Added a forwarding header for dom_position.h Added some debugging output to KHTMLSelection Added support for left arrow navigation. Greatly improved support for right arrow navigation. Added include guards to dom_position.h. Oops! Removed pruneEmptyNodes() function from htmlediting.cpp. That was crack. Improved the text insert command so that it splits the text node being operated on only when necessary. Added support for placing the caret in and arrowing into BR elements. Moved precedesLineBreak/followsLineBreak from RenderText to RenderObject. * ForwardingHeaders/dom/dom_position.h: Added. * khtml/dom/dom_position.h: * khtml/editing/htmlediting.cpp: (InputTextCommand::apply): (DeleteTextCommand::apply): * khtml/khtml_selection.cpp: (KHTMLSelection::setSelection): (KHTMLSelection::alterSelection): (KHTMLSelection::update): (KHTMLSelection::previousCharacterPosition): (KHTMLSelection::nextCharacterPosition): (startAndEndLineNodesIncludingNode): (KHTMLSelection::debugRenderer): (KHTMLSelection::debugPosition): * khtml/khtml_selection.h: * khtml/rendering/render_br.cpp: (RenderBR::RenderBR): (RenderBR::position): (RenderBR::caretMaxOffset): (RenderBR::caretPos): * khtml/rendering/render_br.h: (khtml::RenderBR::xPos): (khtml::RenderBR::yPos): (khtml::RenderBR::height): * khtml/rendering/render_object.cpp: (RenderObject::precedesLineBreak): (RenderObject::followsLineBreak): (RenderObject::isEditable): * khtml/rendering/render_object.h: * khtml/rendering/render_text.cpp: (RenderText::caretPos): (RenderText::position): (RenderText::caretMaxOffset): * khtml/rendering/render_text.h: * khtml/xml/dom_elementimpl.cpp: (ElementImpl::defaultEventHandler): 2004-01-28 David Hyatt Fix for 3537694, make blocks for parents of inline children be axobjects. Reviewed by kocienda * kwq/KWQAccObject.mm: (-[KWQAccObject role]): (-[KWQAccObject accessibilityIsIgnored]): 2004-01-28 David Hyatt Make AtomicString a new class that owns DOMStrings, instead of using KJS::Identifier. One day when we convert DOMString and UString to have the same underlying rep, then these classes could possibly re-merge. For now this provides an easy migration path for all the code that is using DOMStringImpl*. Also fixed a bug with float clearing in the style cascade. Reviewed by darin * khtml/css/cssparser.h: (DOM::atomicString): * khtml/css/cssstyleselector.cpp: (khtml::CSSStyleSelector::checkOneSelector): (khtml::CSSStyleSelector::applyRule): * khtml/dom/dom_string.cpp: (DOMString::DOMString): * khtml/xml/dom_nameimpl.cpp: (DOM::AtomicStringStatisticsExitLogger::~AtomicStringStatisticsExitLogger): (DOM::AtomicString::equal): (DOM::AtomicString::add): (DOM::AtomicString::insert): (DOM::AtomicString::remove): (DOM::AtomicString::expand): (DOM::AtomicString::shrink): (DOM::AtomicString::rehash): (DOM::AtomicString::null): (DOM::AtomicString::init): (DOM::operator==): (DOM::equalsIgnoreCase): * khtml/xml/dom_nameimpl.h: (DOM::AtomicString::AtomicString): (DOM::AtomicString:::m_string): (DOM::AtomicString::string): (DOM::AtomicString::qstring): (DOM::AtomicString::implementation): (DOM::AtomicString::unicode): (DOM::AtomicString::length): (DOM::AtomicString::ascii): (DOM::AtomicString::find): (DOM::AtomicString::isNull): (DOM::AtomicString::isEmpty): (DOM::AtomicString::equal): (DOM::operator==): (DOM::operator!=): * khtml/xml/dom_stringimpl.cpp: (DOM::DOMStringImpl::empty): (DOM::DOMStringImpl::DOMStringImpl): (DOM::DOMStringImpl::~DOMStringImpl): (DOM::DOMStringImpl::append): (DOM::DOMStringImpl::insert): (DOM::DOMStringImpl::truncate): (DOM::DOMStringImpl::remove): (DOM::DOMStringImpl::split): (DOM::DOMStringImpl::substring): (DOM::DOMStringImpl::replace): (DOM::DOMStringImpl::computeHash): * khtml/xml/dom_stringimpl.h: (DOM::DOMStringImpl::DOMStringImpl): (DOM::DOMStringImpl::hash): * khtml/xml/dom_textimpl.cpp: (CharacterDataImpl::CharacterDataImpl): 2004-01-27 Chris Blumenberg Fixed: : Implement Paste menu item : Implement Delete menu item : Implement Cut menu item Reviewed by dave. * khtml/xml/dom_docimpl.cpp: (DocumentImpl::deleteSelection): new (DocumentImpl::pasteHTMLString): new * khtml/xml/dom_docimpl.h: * kwq/WebCoreBridge.h: * kwq/WebCoreBridge.mm: (-[WebCoreBridge isEditable]): new (-[WebCoreBridge pasteHTMLString:]): new (-[WebCoreBridge deleteSelection]): new (-[WebCoreBridge haveSelection]): new 2004-01-27 David Hyatt Add a new AtomicString type (that is really just a KJS::Identifier). Define a Name class that will eventually be used for element and attribute names. Atomize the CSS selector's "value" field, used to hold class names, identifier names, attribute values, and pseudo-element names. Reviewed by rjw * ForwardingHeaders/kjs/identifier.h: Added. * WebCore.pbproj/project.pbxproj: * khtml/css/css_base.cpp: (CSSSelector::print): (CSSSelector::specificity): (CSSSelector::extractPseudoType): (CSSSelector::selectorText): * khtml/css/css_base.h: (DOM::CSSSelector::): * khtml/css/cssparser.cpp: (ParseString::lower): * khtml/css/cssparser.h: (DOM::atomicString): * khtml/css/cssstyleselector.cpp: (khtml::CSSStyleSelector::checkOneSelector): * khtml/css/parser.cpp: * khtml/css/parser.y: * khtml/html/html_elementimpl.cpp: (:NamedAttrMapImpl): (HTMLNamedAttrMapImpl::clearAttributes): (HTMLNamedAttrMapImpl::isHTMLAttributeMap): (HTMLNamedAttrMapImpl::parseClassAttribute): (HTMLNamedAttrMapImpl::matchesCSSClass): (HTMLElementImpl::parseAttribute): (HTMLElementImpl::createAttributeMap): (HTMLElementImpl::matchesCSSClass): * khtml/html/html_elementimpl.h: * khtml/html/html_objectimpl.cpp: (HTMLObjectElementImpl::recalcStyle): * khtml/html/htmltokenizer.h: (khtml::Token::addAttribute): * khtml/xml/dom_elementimpl.cpp: (ElementImpl::matchesCSSClass): (NamedAttrMapImpl::isHTMLAttributeMap): (NamedAttrMapImpl::operator=): * khtml/xml/dom_elementimpl.h: * khtml/xml/dom_nameimpl.cpp: Added. (DOM::AtomicStringList::clone): (DOM::operator==): (DOM::equalsIgnoreCase): * khtml/xml/dom_nameimpl.h: Added. (DOM::AtomicStringList:::m_next): (DOM::AtomicStringList::m_next): (DOM::AtomicStringList::~AtomicStringList): (DOM::AtomicStringList::next): (DOM::AtomicStringList::setNext): (DOM::AtomicStringList::string): (DOM::AtomicStringList::setString): (DOM::AtomicStringList::clear): (DOM::Name::Name): (DOM::Name::m_localName): (DOM::Name::namespaceURI): (DOM::Name::localName): (DOM::operator==): (DOM::operator!=): * khtml/xml/dom_nodeimpl.h: 2004-01-27 Darin Adler Reviewed by Ken. - fixed : W3C says that DEL key identifier should be U+00007F, we give ForwardDelete instead * kwq/KWQEvent.mm: (keyIdentifierForKeyEvent): Correct the key identifiers for the Delete, Insert, Menu, Scroll Lock, and Select keys, as well as some obscure F25 and higher keys. Also add some explicit constants for the keys defined in NSEvent.h that we map to a key identifier using the vendor-area Unicode values (which are probably not appropriate). 2004-01-27 David Hyatt Make a change suggested by kocienda to add a remove() method to InlineBoxes. Reviewed by kocienda * khtml/rendering/render_box.cpp: (RenderBox::detach): (RenderBox::position): * khtml/rendering/render_line.cpp: (InlineBox::remove): * khtml/rendering/render_line.h: * khtml/rendering/render_text.cpp: (RenderText::detach): (RenderText::position): 2004-01-26 Darin Adler Reviewed by Maciej. - follow-on to the text-align change I did earlier today * khtml/css/html4.css: Set input and textarea so they do not inherit text-align from their parent by doing "text-align: -khtml-auto". This fixes google.com among others. 2004-01-26 Darin Adler Reviewed by Maciej. - fixed : pop-up windows appear very narrow because of bogus width (carad.com/ebaymotors) * khtml/ecma/kjs_window.cpp: (WindowFunc::tryCall): Check the "OK" result from toFloat in window.open, and omit any parameters that can't be parsed. 2004-01-26 Darin Adler Reviewed by Maciej. - fixed : REGRESSION (100-125): optgroup labels are no longer indented as they were before * khtml/rendering/render_form.cpp: (RenderSelect::updateFromElement): Move code that adds spaces after code that strips whitespace. Also simplify the code a bit by using DOMString::string(). 2004-01-26 Darin Adler Reviewed by Dave. - fixed : text with a transparent background color pastes as black on black * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::attributedString): Don't put color in the mutable string if it's entirely transparent. * kwq/KWQColor.mm: (QColor::getNSColor): Fix bug where we would return nil for RGBA of 0. 2004-01-26 Darin Adler Reviewed by Maciej. - fixed : text-align style property not respected on input fields * khtml/rendering/render_form.h: Added textAlignment function. * khtml/rendering/render_form.cpp: (RenderFormElement::textAlignment): Added. Converts style alignment to Qt alignment. (RenderLineEdit::setStyle): Call textAlignment intead of using direction from style. (RenderTextArea::setStyle): Call textAlignment intead of using direction from style. * kwq/KWQLineEdit.h: Added KWQNSTextAlignmentForAlignmentFlags function. * kwq/KWQLineEdit.mm: (QLineEdit::setAlignment): Use KWQNSTextAlignmentForAlignmentFlags instead of code that handles only left and right alignment. (KWQNSTextAlignmentForAlignmentFlags): Added. Converts Qt alignment to NS alignment. * kwq/KWQTextEdit.mm: (QTextEdit::setAlignment): Use KWQNSTextAlignmentForAlignmentFlags instead of code that handles only left and right alignment. 2004-01-26 Darin Adler Reviewed by Dave. - fixed : background image with apostrophe in name missing at http://www.nbc.com * khtml/html/html_baseimpl.cpp: (HTMLBodyElementImpl::parseAttribute): Use addCSSImageProperty instead of addCSSProperty, obviating the need for the "url()" syntax (and fixing quoting issues). * khtml/html/html_tableimpl.cpp: (HTMLTableElementImpl::parseAttribute): Ditto. (HTMLTablePartElementImpl::parseAttribute): Ditto. * khtml/html/html_elementimpl.h: Added addCSSStringProperty and addCSSImageProperty. * khtml/html/html_elementimpl.cpp: (HTMLElementImpl::addCSSStringProperty): Added. Calls setStringProperty. Not used yet. (HTMLElementImpl::addCSSImageProperty): Added. Calls setImageProperty. * khtml/css/css_valueimpl.h: Added setStringProperty and setImageProperty. * khtml/css/css_valueimpl.cpp: (CSSStyleDeclarationImpl::setStringProperty): Added. Sets a property without parsing. (CSSStyleDeclarationImpl::setImageProperty): Added. Sets a property without parsing. You'd think we'd be able to just use setStringProperty, but that's not how the image properties work. 2004-01-26 Darin Adler * Makefile.am: Switch from pbxbuild to xcodebuild. 2004-01-26 David Hyatt Add CSS3 @namespace support. The whole way namespaces, element, and attribute names are being handled right now is temporary. This code gives us a baseline of functionality (for regression testing) that we can use when we implement namespaces "the right way." Reviewed by darin * WebCore.pbproj/project.pbxproj: * khtml/css/css_base.cpp: (CSSSelector::specificity): (CSSSelector::selectorText): * khtml/css/css_base.h: (DOM::CSSNamespace::m_parent): (DOM::CSSNamespace::~CSSNamespace): (DOM::CSSNamespace::uri): (DOM::CSSNamespace::prefix): (DOM::CSSNamespace::namespaceForPrefix): (DOM::CSSSelector::CSSSelector): * khtml/css/css_stylesheetimpl.cpp: (CSSStyleSheetImpl::CSSStyleSheetImpl): (CSSStyleSheetImpl::addNamespace): (CSSStyleSheetImpl::determineNamespace): * khtml/css/css_stylesheetimpl.h: (DOM::CSSStyleSheetImpl::~CSSStyleSheetImpl): * khtml/css/cssparser.cpp: (CSSParser::CSSParser): (CSSParser::parseSheet): * khtml/css/cssparser.h: * khtml/css/cssstyleselector.cpp: (khtml::CSSStyleSelector::styleForElement): (khtml::CSSStyleSelector::pseudoStyleForElement): (khtml::CSSStyleSelector::checkSelector): (khtml::CSSStyleSelector::checkOneSelector): (khtml::CSSStyleSelector::buildLists): * khtml/css/html4.css: * khtml/css/parser.cpp: * khtml/css/parser.y: * khtml/xml/dom_docimpl.cpp: (DocumentImpl::DocumentImpl): (DocumentImpl::~DocumentImpl): (DocumentImpl::attrId): (DocumentImpl::attrName): (DocumentImpl::tagId): (DocumentImpl::tagName): (DocumentImpl::namespaceURI): * khtml/xml/dom_elementimpl.cpp: (NamedAttrMapImpl::getAttributeItem): * khtml/xml/dom_nodeimpl.cpp: (NodeImpl::checkSetPrefix): * khtml/xml/dom_nodeimpl.h: (DOM::namespacePart): (DOM::localNamePart): (DOM::makeId): * khtml/xml/dom_xmlimpl.cpp: (ProcessingInstructionImpl::checkStyleSheet): * khtml/xml/xml_namespace_table.cpp: Added. (DOM::XmlNamespaceTable::getNamespaceID): (DOM::XmlNamespaceTable::getNamespaceURI): * khtml/xml/xml_namespace_table.h: Added. (DOM::XmlNamespaceEntry::m_uri): 2004-01-26 Darin Adler Reviewed by Dave. - fixed :