=== WebCore-415.5 === 2005-05-07 Adele Peterson Merged fix for from TOT for SUTiAtlanta 2005-05-07 David Harrison Reviewed by John. Deleting text at the end of email moves insertion point to the top of the document * khtml/editing/htmlediting.cpp: (khtml::DeleteSelectionCommand::handleGeneralDelete): Update m_upstreamStart when deleting m_downstreamEnd.node() if the former is no longer in the document. Better to update here than trying to recover later in calculateEndingPosition(). === WebCore-415.3 === 2005-05-05 Adele Peterson Merging fix for from TOT for SUTiAtlanta. 2005-05-05 Darin Adler Reviewed by Dave Hyatt. - fixed REGRESSION (Atlanta): maps.google.com doesn't always center California correctly * khtml/ecma/kjs_events.cpp: (offsetFromTarget): Fix two places that said X where they should say Y. === WebCore-415.2 === 2005-05-02 Chris Petersen Reviewed by Adele. Merging changes for SUTiAtlanta. 2005-04-29 David Harrison Reviewed by Darin. When deleting link at end of sentence, entire sentence gets deleted * khtml/editing/htmlediting.cpp: (khtml::DeleteSelectionCommand::initializePositionData): Work around bug #4103339 (whose real fix is somewhat risky), so this fix can get into a software update. (khtml::DeleteSelectionCommand::handleGeneralDelete): Add isAncestor check when comparing m_downstreamEnd.node() and m_startNode. === WebCore-415.1 === 2005-04-27 Vicki Murley - merge this fix from HEAD This fix was included in WebCore-413, which shipped in Tiger GM (8A428). However, Safari-2-0-anchor was mistakenly placed at WebCore-412. Merging this fix to the branch so that this fix isn't lost in the SU. 2005-03-27 Darin Adler Reviewed by me, fix by Kida-san. - fixed 8A424: Safari immediately quit by Cmd+Ctrll+'D' * kwq/WebCoreBridge.mm: (-[WebCoreBridge convertToNSRange:DOM::]): Added nil check. 2005-04-27 Adele Peterson Merging John's fix for alt/shift bug in fix from TOT. 2005-04-27 John Sullivan Reviewed by Adele. - fixed problem with mouse wheel patch where alt and shift keys were switched * khtml/xml/dom2_eventsimpl.h: use the order cntl, alt, shift, meta in KeyboardEventImpl constructors to match superclass. This isn't necessary to fix the bug, but is better for clarity. * khtml/xml/dom2_eventsimpl.cpp: (KeyboardEventImpl::KeyboardEventImpl): switch parameter order to match superclass. Then pass the parameters to superclass's constructor in the right order. (KeyboardEventImpl::initKeyboardEvent): Pass parameters to superclass's constructor in the right order. 2005-04-27 chris petersen Removed fix for 4032346 and merged new fix as described in 4097842. 2005-04-18 David Hyatt Back out fix for 4032346, since it is causing garbled image content on many sites. The bug tracking the fix is 4069093. (khtml::RenderBlock::matchedEndLine): 2005-04-25 David Hyatt Fix for 4097842, changing 1st line of a url that wraps doesn't update the second line. Make sure to update line break info for the last dirty line so that when a clean line tries to figure out where it started, it will get an accurate position taking into account the updated string. By doing this, the code will be able to properly distinguish between the old and new positions and not accidentally assume they are the same. Reviewed by darin * khtml/rendering/render_text.cpp: (RenderText::setTextWithOffset): 2005-04-26 chris petersen Merged for 3655817 from TOT Reviewed by Adele. 2005-04-26 Darin Adler Reviewed by John. - fixed please add support for mouse wheel events and the onmousewheel handler Loose ends: - need to test behavior of Windows IE with horizontal scroll wheeling; we currently send a distinct event for that relatively obscure case, which means the event handlers won't fire at all; might be incorrect - overflow scrolling is done after all DOM event handling, but ideally should be done in the overflowing element's default event handler; not important in practice - frame scrolling is done after all DOM event handling, but probably should be done in a default event handler; not sure about this, but it's probably not important in practice and definitely not required - JavaScript * khtml/ecma/kjs_events.h: Added DOMWheelEvent. * khtml/ecma/kjs_events.cpp: (KJS::getDOMEvent): Added a case for wheel event. To be forward looking, I use the event's impl pointer instead of a C++ DOM wrapper. Eventually it will all work this way. (offsetFromTarget): Added. Factored out code to compute offsetX/Y for an event. (DOMMouseEvent::getValueProperty): Changed to call offsetFromTarget for offsetX/Y. (DOMWheelEvent::DOMWheelEvent): Added. (DOMWheelEvent::tryGet): Added. (DOMWheelEvent::getValueProperty): Added. (DOMWheelEventProtoFunc::tryCall): Added. Nothing at the moment, but might get contents later. * khtml/ecma/kjs_dom.h: Added OnMouseWheel to the enum with the list of properties. * khtml/ecma/kjs_dom.cpp: Added onmousewheel as a property of DOM nodes. (DOMNode::getValueProperty): Return the mouse wheel event handler. (DOMNode::putValue): Set the mouse wheel event handler. * khtml/ecma/kjs_window.cpp: Added onmousewheel as a property of the window. (Window::get): Return the mouse wheel event handler. (Window::put): Set the mouse wheel event handler. * khtml/ecma/kjs_window.h: Added OnWindowMouseWheel to the enum with the list of properties. (Other properties distinguish the window handler by lower-casing the initial letter, way too subtle, so I did this one a good way.) * khtml/dom/dom2_events.h: Made the constructors for Event and UIEvent public. There's no good reason for them to be private, and I had to use the UIEvent one in the JavaScript implementation. - DOM * khtml/xml/dom2_eventsimpl.h: Added events for mouse wheel and horizontal mouse wheel. Added isWheelEvent function to EventImpl. (DOM::UIEventWithKeyStateImpl): Added. Base class shared by mouse, wheel, and keyboard events. (DOM::MouseRelatedEventImpl): Added. Base class shared by mouse and wheel events. (DOM::WheelEventImpl): Added. * khtml/xml/dom2_eventsimpl.cpp: Added "mousewheel" to list of event names and a placeholder for the horizontal mouse wheel. (EventImpl::isWheelEvent): Added. Returns false. (MouseRelatedEventImpl::MouseRelatedEventImpl): Added. Factored out what's shared between mouse events and wheel events to avoid duplicated code. (MouseRelatedEventImpl::computeLayerPos): Moved to MouseRelatedWheelEventImpl. (MouseEventImpl::MouseEventImpl): Changed since MouseRelatedWheelEventImpl is now the base class so we can share more code with wheel events. (KeyboardEventImpl::KeyboardEventImpl): Changed since UIEventWithKeyStateImpl is now the base class so we can share more code with mouse and wheel events. (WheelEventImpl::WheelEventImpl): Added. (WheelEventImpl::isWheelEvent): Added. Returns true. * khtml/misc/htmlattrs.in: Added "onmousewheel" attribute name. * khtml/html/html_elementimpl.cpp: (HTMLElementImpl::parseHTMLAttribute): Added parsing of the "onmousewheel" atribute, consistent with other event handler attributes. - event handling * kwq/WebCoreBridge.h: Renamed scrollOverflowWithScrollWheelEvent to sendScrollWheelEvent. * kwq/WebCoreBridge.mm: (-[WebCoreBridge sendScrollWheelEvent:]): Renamed. * kwq/KWQEvent.h: Added Wheel as an event type value. (QWheelEvent::QWheelEvent): Added. * kwq/KWQEvent.mm: (positionForEvent): Updated to know that wheel events have valid positions in them. (orientationForEvent): Added. (deltaForEvent): Added. (QWheelEvent::QWheelEvent): Added. * kwq/KWQKHTMLPart.h: Renamed scrollOverflowWithScrollWheelEvent to wheelEvent. * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::wheelEvent): Renamed and added code to construct a QWheelEvent and send it along to KHTMLView::viewportWheelEvent, consistent with how mouse events work. * khtml/khtmlview.cpp: (KHTMLView::viewportWheelEvent): Do a hit test to figure out which node to send the event to, and then call dispatchWheelEvent. * khtml/xml/dom_nodeimpl.h: Added dispatchWheelEvent. * khtml/xml/dom_nodeimpl.cpp: (NodeImpl::dispatchWheelEvent): Added. - generated files * khtml/ecma/kjs_dom.lut.h: Regenerated. * khtml/ecma/kjs_events.lut.h: Regenerated. * khtml/ecma/kjs_window.lut.h: Regenerated. * khtml/misc/htmlattrs.c: Regenerated. * khtml/misc/htmlattrs.h: Regenerated. 2005-04-26 chris petersen Merging fix for from TOT Reviewed by Adele. 2005-04-26 David Harrison Reviewed by Darin, Maciej. Deleting text in new message borks content Fixed by removing the methods that attempted to preserve the position. The idea of preserving position is a very recent one, and turned out to not actually address the problem it was intended to fix (see below). Further, is unclear how the position could be preserved in a form that could be properly used later on. Therefore, removing the code to work like before is the preferred alternative for this software update. I've written to cover the bug that position preservation was supposed to fix (but did not). Added layout tests for both this bug and 4099839. Also, updated existing tests with correct expected results (delete-at-paragraph-boundaries-003 and 004). * khtml/editing/htmlediting.cpp: (khtml::CompositeEditCommand::removeFullySelectedNode): (khtml::CompositeEditCommand::removeChildrenInRange): (khtml::DeleteSelectionCommand::handleGeneralDelete): * khtml/editing/htmlediting.h: * layout-tests/editing/deleting/delete-at-paragraph-boundaries-003-expected.txt: * layout-tests/editing/deleting/delete-at-paragraph-boundaries-004-expected.txt: 2005-04-26 chris petersen Merging fix for from TOT Reviewed by Adele. 2005-03-28 David Harrison Reviewed by Darin. REGRESSION (8A416-8A419): Safari crash bringing up context menu for non-HTML content in a frame * kwq/KWQAccObject.mm: (-[KWQAccObject rendererForView:]): Nil-check node variable instead of rechecking document variable. === Safari-412 === 2005-03-24 Richard Williamson Fixed After adding/removing stocks from Stocks Widget, stock areas went blank The request was being collected before firing it's load handler. We now gc protect the request while it's loading. Reviewed by Maciej. * khtml/ecma/xmlhttprequest.cpp: (KJS::XMLHttpRequest::send): (KJS::XMLHttpRequest::abort): (KJS::XMLHttpRequest::slotFinished): (KJS::XMLHttpRequestProtoFunc::tryCall): === Safari-411 === 2005-03-23 Darin Adler Further fix for 4053515. Covered cases where text position doesn't lie inside a text node. Reviewed by Richard. * khtml/editing/visible_text.cpp: (khtml::TextIterator::setRangeFromLocationAndLength): 2005-03-23 Richard Williamson Fixed REGRESSION (Mail): Kotoeri input method reconversion does not work in WebViews We now use actual document NSRanges to represent both marked text ranges and selection ranges. Reviewed by Ken. * khtml/editing/visible_text.cpp: (khtml::TextIterator::rangeLength): (khtml::TextIterator::setRangeFromLocationAndLength): * khtml/editing/visible_text.h: * kwq/WebCoreBridge.h: * kwq/WebCoreBridge.mm: (-[WebCoreBridge convertToNSRange:DOM::]): (-[WebCoreBridge DOM::convertToDOMRange:]): (-[WebCoreBridge selectNSRange:]): (-[WebCoreBridge markedTextDOMRange]): (-[WebCoreBridge markedTextNSRange]): 2005-03-22 Kevin Decker Reviewed by Vicki. Fixed REGRESSION (406-407): HTML submenus not working at hrweb.apple.com after going back Rolled out the fix for REGRESSION (185-186): unload handlers (at least those added with addEventListener) are broken We clearly need a better solution to 4041374. We can't indiscriminately remove event listeners in closeURL() after-all. Since event listeners are registered in a