WebCore:
Reviewed by John.
- fixed <rdar://problem/
3878329> REGRESSION (169-170): colors are wrong for my.yahoo.com due to CSS background parsing changes
* khtml/css/cssparser.cpp: (CSSParser::parseBackgroundShorthand): Changed function so it doesn't rely on the position
attribute being at the end of the array and then moved position attribute before color attribute so it takes precedence.
Since "0" can be both the X coordinate of a position and a legal color (meaning black), we need to do position first.
- fixed <rdar://problem/
3760869> click events for input type=button or type=checkbox don't have flags like shiftKey set
* khtml/rendering/render_form.h: Remove unused RenderFormElement fields.
* khtml/rendering/render_form.cpp:
(RenderFormElement::RenderFormElement): Take out code to set a bunch of unused fields.
(RenderFormElement::slotClicked): Change to create the QMouseEvent from the actual mouse event rather than
creating it with all the flags set to 0, using the new QMouseEvent constructor that does so.
* kwq/KWQEvent.h: Added constructor that takes no parameters which uses the current event from AppKit.
Made the click count getter const and added an isDoubleClick that matches the logic used elsewhere.
Added a fixState helper method so the constructors can save code.
* kwq/KWQEvent.mm:
(QMouseEvent::QMouseEvent): Factored out the state-fixing code that was in the two existing constructors
and added a third constructor that uses the "current event" from AppKit (used above).
(QMouseEvent::fixState): Compute state and click count based on event type.
- fixed first symptom of <rdar://problem/
3830936> REGRESSION (125-165): crash due to null font family, hang at changeforamerica.com
* kwq/KWQFontFamily.mm: (KWQFontFamily::getNSFamily): Handle empty strings specially so we don't run into trouble when
the family name is a null string. This prevents the crash, but there are still other problems that may have the same
underlying cause in CSS.
- fixed <rdar://problem/
3829808> Safari crashes when adding a DOM node that was removed from an XMLHTTP request result
* khtml/html/html_baseimpl.cpp: (HTMLBodyElementImpl::insertedIntoDocument):
Added nil check before calling scheduleRelayout. This is new code so the nil-dereference is a recent regression.
WebKit:
Reviewed by John.
- fixed <rdar://problem/
3846079> assertion failure in WebHTMLView(WebPrivate) removeTrackingRect at boots.com
- fixed <rdar://problem/
3857737> REGRESSION (165-166): clicking in a text field that's scrolled to the right causes it to scroll all the way left
- fixed <rdar://problem/
3861952> REGRESSION (165-166): selection is cleared when you start to scroll a frame
* WebView.subproj/WebHTMLViewInternal.h: Added handlingMouseDown flag.
* WebView.subproj/WebHTMLView.m:
(-[WebHTMLView _addTrackingRect:owner:userData:assumeInside:useTrackingNum:]): Allow passing in a
tracking number of 0, which means no existing tracking number.
(-[WebHTMLView _addTrackingRects:owner:userDataList:assumeInsideList:trackingNums:count:]): Ditto.
(-[WebHTMLView removeTrackingRect:]): Allow removing a tracking number of 0, which is a no-op.
(-[WebHTMLView _removeTrackingRects:count:]): Ditto.
(-[WebHTMLView acceptsFirstResponder]): Changed check to use handlingMouseDown flag instead of mouseDownEvent
field since that field is set up too early in the mouse down event handling process.
(-[WebHTMLView mouseDown:]): Added code to set handlingMouseDown flag.
- fixed part of <rdar://problem/
3829808> Safari crashes when adding a DOM node that was removed from an XMLHTTP request result
* WebCoreSupport.subproj/WebBridge.m:
(-[WebBridge syncLoadResourceWithURL:customHeaders:postData:finalURL:responseHeaders:statusCode:]):
Changed code around so that it won't try to create a WebResource when the load fails.
- moved next/previous links into private structure with the rest of WebFrame fields
(We have a rule against putting new fields into obejcts that are part of our public API.)
* WebView.subproj/WebFrame.h: Remove _nextSibling and _previousSibling.
* WebView.subproj/WebFramePrivate.h: Added nextSibling and previousSibling fields to private class.
* WebView.subproj/WebFrame.m: Got rid of some tabs in this file.
(-[WebFrame _addChild:]): Changed code to use fields inside _private.
(-[WebFrame _removeChild:]): Ditto.
(-[WebFrame _nextFrameWithWrap:]): Ditto.
(-[WebFrame _previousFrameWithWrap:]): Ditto.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8122
268f45cc-cd09-0410-ab3c-
d52691b4dbfc