WebKit-https.git
16 years agoWebCore:
kocienda [Tue, 20 Jul 2004 23:32:08 +0000 (23:32 +0000)]
WebCore:

        Reviewed by Richard

        * khtml/xml/dom_elementimpl.cpp:
        (ElementImpl::defaultEventHandler): No longer check whether
        the command key is modifying the key event. This check is
        now done elsewhere in the code. See the WebKit checkin that
        added the _web_keyBindingManagerHasBinding method to
        WebNSEventExtras.

WebKit:

        Reviewed by Richard

        * Misc.subproj/WebNSEventExtras.h: Added helper that returns whether
        a key event has a binding in the key binding manager.
        * Misc.subproj/WebNSEventExtras.m:
        (-[NSEvent _web_keyBindingManagerHasBinding]): New helper mentioned above.
        * Plugins.subproj/npruntime.h:
        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView performKeyEquivalent:]): Add a check of whether the key event
        has a binding in the key binding manager. This works around the fact that
        NSResponder's interpretKeyEvents does not return a value telling whether
        or not the key was handled. This now makes it possible for us to trap
        modified key events we know we can handle (like those command-key + arrow events
        used for text navigation), while letting all others pass.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7077 268f45cc-cd09-0410-ab3c-d52691b4dbfc

16 years agoWebCore:
cblu [Tue, 20 Jul 2004 22:27:27 +0000 (22:27 +0000)]
WebCore:

Fixed:
<rdar://problem/3580589> REGRESSION (1.1-1.2): can't open a new window for an image that has not loaded
<rdar://problem/3612691> Missing image icons (blue ?) lack context menu

        Reviewed by john.

        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge elementAtPoint:]): if there is no image, put the image URL on the element anyway

WebKit:

Fixed:
<rdar://problem/3580589> REGRESSION (1.1-1.2): can't open a new window for an image that has not loaded
<rdar://problem/3612691> Missing image icons (blue ?) lack context menu

        Reviewed by john.

        * WebView.subproj/WebDefaultContextMenuDelegate.m:
        (-[WebDefaultUIDelegate webView:contextMenuItemsForElement:defaultMenuItems:]): if there is no image, but there is an image URL, provide image context menu items besides "Copy Image"
        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView _startDraggingImage:at:operation:event:sourceIsDHTML:DHTMLWroteData:]): don't drag an image with an actual image
        (-[WebHTMLView _mayStartDragAtEventLocation:]): ditto

WebBrowser:

Fixed:
<rdar://problem/3580589> REGRESSION (1.1-1.2): can't open a new window for an image that has not loaded
<rdar://problem/3612691> Missing image icons (blue ?) lack context menu

        Reviewed by john.

        * ContextMenuHandler.m:
        (-[BrowserWebView webView:contextMenuItemsForElement:defaultMenuItems:]): if there is no image, but there is an image URL, provide image context menu items besides copy and save menu items.
        * WebBrowser.pbproj/project.pbxproj:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7072 268f45cc-cd09-0410-ab3c-d52691b4dbfc

16 years agoReduced size of error images which affects test and fixed alt scaling bugs.
hyatt [Tue, 20 Jul 2004 22:11:53 +0000 (22:11 +0000)]
Reduced size of error images which affects test and fixed alt scaling bugs.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7071 268f45cc-cd09-0410-ab3c-d52691b4dbfc

16 years ago Reviewed by Chris.
mjs [Tue, 20 Jul 2004 21:58:28 +0000 (21:58 +0000)]
    Reviewed by Chris.

<rdar://problem/3721690> REGRESSION (125.7-148u) clicking on links at macosx.apple.com/Builds does not load new page in frame

        * Plugins.subproj/npruntime.h:
        * WebCoreSupport.subproj/WebBridge.m:
        (-[WebBridge canTargetLoadInFrame:]): Don't apply the restrictions to frames
that are in the same window (Mozilla does this too).

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7070 268f45cc-cd09-0410-ab3c-d52691b4dbfc

16 years ago Fix for alt text not working on images.
hyatt [Tue, 20 Jul 2004 21:54:13 +0000 (21:54 +0000)]
Fix for alt text not working on images.

        Reviewed by john

        * khtml/rendering/render_image.cpp:
        (RenderImage::RenderImage):
        (RenderImage::setPixmap):
        (RenderImage::paint):
        (RenderImage::calcReplacedWidth):
        (RenderImage::calcReplacedHeight):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7069 268f45cc-cd09-0410-ab3c-d52691b4dbfc

16 years ago Reviewed by Dave.
mjs [Tue, 20 Jul 2004 20:45:22 +0000 (20:45 +0000)]
    Reviewed by Dave.

<rdar://problem/3720111> REGRESSION(125-152): map fails to load depending on banner ad; weather.com (works in IE and Firefox)

        * khtml/html/htmltokenizer.cpp:
        (khtml::HTMLTokenizer::begin): Initialize currentPrependingSrc.
        (khtml::HTMLTokenizer::scriptHandler): Store a pointer to the currently
active prependingSrc variable on the stack, the better to handle weird cases
of scripts writing out additional script tags and so forth.
        (khtml::HTMLTokenizer::write): Deal with the above.
        * khtml/html/htmltokenizer.h: Declare new member field.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7068 268f45cc-cd09-0410-ab3c-d52691b4dbfc

16 years ago Fix for 3728558. Fixed the key event handling in the carbon/cocoa
rjw [Tue, 20 Jul 2004 20:41:44 +0000 (20:41 +0000)]
Fix for 3728558.  Fixed the key event handling in the carbon/cocoa
integration code.  This does not fix the arrow keys not working on
initial focus problem also mentioned in the bug.

Bumped the version of the NP function structures.

        Reviewed by John.

        * Carbon.subproj/CarbonUtils.m:
        (WebInitForCarbon):
        (PoolCleaner):
        * Carbon.subproj/HIWebView.m:
        (OwningWindowChanged):
        (WindowHandler):
        * Plugins.subproj/npapi.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7067 268f45cc-cd09-0410-ab3c-d52691b4dbfc

16 years agoAdd overflow test and fix rss test to not be rss.
hyatt [Tue, 20 Jul 2004 20:39:14 +0000 (20:39 +0000)]
Add overflow test and fix rss test to not be rss.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7066 268f45cc-cd09-0410-ab3c-d52691b4dbfc

16 years ago Fix for layer positioning error that occurs when absolute positioned blocks are...
hyatt [Tue, 20 Jul 2004 20:35:21 +0000 (20:35 +0000)]
Fix for layer positioning error that occurs when absolute positioned blocks are inside static positioned overflow:auto
elements.

        Reviewed by john

        * khtml/rendering/render_layer.cpp:
        (RenderLayer::updateLayerPosition):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7065 268f45cc-cd09-0410-ab3c-d52691b4dbfc

16 years ago 3733698 REGRESSION: sometimes dragging photos on homepage.mac.com leads to an assertion
trey [Tue, 20 Jul 2004 19:05:41 +0000 (19:05 +0000)]
3733698 REGRESSION: sometimes dragging photos on homepage.mac.com leads to an assertion

Relax an assertion, as we ran into a valid case where it's not true.

        Reviewed by Chris.

        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView _startDraggingImage:at:operation:event:sourceIsDHTML:DHTMLWroteData:]):
Removing this assert allows for the oddball case of a drag gesture that
starts on one element, but then the element is no longer there when
the drag is about to start.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7064 268f45cc-cd09-0410-ab3c-d52691b4dbfc

16 years ago 3705624 REGRESSION: can't rearrange photos on homepage.mac.com album
trey [Tue, 20 Jul 2004 18:56:37 +0000 (18:56 +0000)]
3705624 REGRESSION: can't rearrange photos on homepage.mac.com album

A subtle problem stemming from some interaction between focus handing and
event propagation.  We previously made it so when a focus shift fails we
don't propagate the event to KHTML.  The fix is to get rid of the inverse
effect, so now even if a focus shift succeeds, we don't propagate to KHTML if
the page already canceled default behavior.

In this specific case, the page is cancelling default behavior since it
does its own dragging, and the bug was our new system dragging was
kicking in.

        Reviewed by Ken.

        * khtml/khtmlview.cpp:
        (KHTMLView::dispatchMouseEvent):  What he said.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7063 268f45cc-cd09-0410-ab3c-d52691b4dbfc

16 years ago Reviewed by Darin
kocienda [Tue, 20 Jul 2004 18:06:24 +0000 (18:06 +0000)]
    Reviewed by Darin

        Fix for this bug:

        <rdar://problem/3695240> pasting plain text with newlines in it turns them into spaces

        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge documentFragmentWithText:]): Refine this function to be smart about converting
        line endings into BR elements.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7062 268f45cc-cd09-0410-ab3c-d52691b4dbfc

16 years agoWebCore:
kocienda [Tue, 20 Jul 2004 15:38:14 +0000 (15:38 +0000)]
WebCore:

        Reviewed by Hyatt

        Fix for this bug:

        <rdar://problem/3707505> HTMLCompose: blinking cursor in both an address text field and the message body

        * khtml/khtml_part.cpp:
        (KHTMLPart::setCaretVisible): This method renamed from setSelectionVisible. Since it really only operates
        on the caret, this seems like a better name.
        * khtml/khtml_part.h:
        * khtml/khtmlview.cpp:
        (KHTMLView::focusInEvent): Call setCaretVisible(true)
        (KHTMLView::focusOutEvent): Call setCaretVisible(false)
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::setShowsFirstResponder): Name change: setSelectionVisible becomes setCaretVisible.
        * kwq/WebCoreBridge.h: Expose setCaretVisible as a bridge method.
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge setCaretVisible:]): Ditto.

WebKit:

        Reviewed by Hyatt

        Fix for this bug:

        <rdar://problem/3707505> HTMLCompose: blinking cursor in both an address text field and the message body

        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView setCaretVisible:]): New helper. Calls over bridge to do the work.
        (-[WebHTMLView windowDidBecomeKey:]): This function cannot just assume that self is first responder
        (and do things like adjusting text background color and restoring focus rings).
        First-responder-ness needs to be checked first. Now it is.
        (-[WebHTMLView windowDidResignKey:]): Ditto.
        (-[WebHTMLView becomeFirstResponder]): Call new helper to make caret visible.
        (-[WebHTMLView resignFirstResponder]): Call new helper to make caret invisible.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7061 268f45cc-cd09-0410-ab3c-d52691b4dbfc

16 years ago Reviewed by Trey.
mjs [Tue, 20 Jul 2004 08:12:08 +0000 (08:12 +0000)]
    Reviewed by Trey.

<rdar://problem/3721428> REGRESSION (125.8-146): external javascript statements produce extra garbage character (sina.com)

* khtml/misc/stringit.h:
        (khtml::TokenizerSubstring::TokenizerSubstring): For the apple branch, use the new
stableUnicode() method to get the unicode pointer.
        * kwq/KWQString.h:
        * kwq/KWQString.mm:
        (QString::detachIfInternal): Reorganize this to be a bit less wacky about refcounts.
It does not leave around a zombie internal data handle but rather destroys it right away,
and leaves the object pointing to the new handle (which it can then deref). This makes
the code more clear.
        (QString::~QString): Simplify.
        (QString::stableUnicode): New method that detaches a copy of the KWQStringData if it
is internal to a string besides this one. This guarantees that if you get the unicode()
pointer, it won't go bad so long as this string is still alive.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7060 268f45cc-cd09-0410-ab3c-d52691b4dbfc

16 years ago Reviewed by Maciej.
sullivan [Mon, 19 Jul 2004 23:43:54 +0000 (23:43 +0000)]
    Reviewed by Maciej.

        - bulletproofed array.slice() against NAN arguments. Harri noticed this
        vulnerability in my patch for 3714644

        * kjs/array_object.cpp:
        (ArrayProtoFuncImp::call):
        handle NAN parameters passed to slice() by clamping to 0 and length.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7059 268f45cc-cd09-0410-ab3c-d52691b4dbfc

16 years ago*** empty log message ***
hyatt [Mon, 19 Jul 2004 23:34:41 +0000 (23:34 +0000)]
*** empty log message ***

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7058 268f45cc-cd09-0410-ab3c-d52691b4dbfc

16 years ago Fix for 3715117, crash from a bug in removeChildren. Clean up node removal and...
hyatt [Mon, 19 Jul 2004 23:33:50 +0000 (23:33 +0000)]
Fix for 3715117, crash from a bug in removeChildren.  Clean up node removal and fix an n-squared removal
bug.  Also clean up checks in removeChild and in the dispatch of removedFromDocument mutation events to
make node removal more efficient.

        Reviewed by kocienda

        * khtml/xml/dom_nodeimpl.cpp:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7057 268f45cc-cd09-0410-ab3c-d52691b4dbfc

16 years ago Reviewed by Trey.
sullivan [Mon, 19 Jul 2004 22:40:57 +0000 (22:40 +0000)]
    Reviewed by Trey.

        - fixed <rdar://problem/3141150> can't undo in form textarea fields

        * kwq/KWQTextArea.mm:
        (-[KWQTextArea _createTextView]):
        call setAllowsUndo:YES. My, wasn't this easy?

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7056 268f45cc-cd09-0410-ab3c-d52691b4dbfc

16 years ago Fixed 3733349. Prevent Java applet callbacks into JavaScript after applet
rjw [Mon, 19 Jul 2004 22:32:48 +0000 (22:32 +0000)]
Fixed 3733349.  Prevent Java applet callbacks into JavaScript after applet
has been destroyed.

        Reviewed by John.

        * bindings/jni/jni_jsobject.cpp:
        (JSObject::invoke):
        (JSObject::JSObject):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7055 268f45cc-cd09-0410-ab3c-d52691b4dbfc

16 years ago Fixed 3721917. The RealPlayer plugin doesn't support the new
rjw [Mon, 19 Jul 2004 22:32:15 +0000 (22:32 +0000)]
    Fixed 3721917.  The RealPlayer plugin doesn't support the new
        NPPVpluginScriptableNPObject variable passed to NPP_GetValue and
        incorrectly returns NPERR_NO_ERROR.  We interpret this to the
        mean the variable has been set.  The variable has not been set
        and will consequently be uninitialized.

        Reviewed by NOBODY (OOPS!).

        * Plugins.subproj/WebBaseNetscapePluginView.m:
        (-[WebBaseNetscapePluginView pluginScriptableObject]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7054 268f45cc-cd09-0410-ab3c-d52691b4dbfc

16 years ago Merge @import fix for CSS1 test suite from Stephan Kulow.
hyatt [Mon, 19 Jul 2004 21:50:40 +0000 (21:50 +0000)]
Merge @import fix for CSS1 test suite from Stephan Kulow.

        Reviewed by hyatt

        * khtml/css/parser.cpp:
        * khtml/css/parser.y:
        * layout-tests/css1/basic/containment-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7053 268f45cc-cd09-0410-ab3c-d52691b4dbfc

16 years ago Fix for 3718697, crash clicking on JS tab at alaskaair.com.
hyatt [Mon, 19 Jul 2004 21:40:43 +0000 (21:40 +0000)]
Fix for 3718697, crash clicking on JS tab at alaskaair.com.

        Reviewed by kocienda

        * khtml/rendering/render_flow.cpp:
        (RenderFlow::detach):
        (RenderFlow::dirtyLinesFromChangedChild):
        * khtml/rendering/render_flow.h:
        * khtml/rendering/render_object.cpp:
        (RenderObject::dirtyLinesFromChangedChild):
        * khtml/rendering/render_object.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7052 268f45cc-cd09-0410-ab3c-d52691b4dbfc

16 years ago Reviewed by Richard
kocienda [Mon, 19 Jul 2004 20:58:08 +0000 (20:58 +0000)]
    Reviewed by Richard

        Fix for this bug:

        <rdar://problem/3707504> HTMLCompose: key events are stolen by Web(HTML)View

        * Misc.subproj/WebNSViewExtras.h:
        * Misc.subproj/WebNSViewExtras.m:
        (-[NSView firstResponderIsSelfOrDescendantView]): New helper to
        (-[WebHTMLView performKeyEquivalent:]): Do not pass key events through to the editing
        key handler unless the WebHTMLView is first responder or contains the first responder.
        This prevents the "stealing" of key events mentioned in the bug.
        * WebView.subproj/WebView.m:
        (-[WebView _performResponderOperation:with:]): Uses the new firstResponderIsSelfOrDescendantView
        helper. The code I replaced used the same logic as the new helper.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7051 268f45cc-cd09-0410-ab3c-d52691b4dbfc

16 years ago Reviewed by Maciej.
sullivan [Fri, 16 Jul 2004 22:56:24 +0000 (22:56 +0000)]
    Reviewed by Maciej.

        - fixed <rdar://problem/3714644> REGRESSION (125.8-146): bugzilla submit link
        hangs browser with javascript

        * kjs/array_object.cpp:
        (ArrayProtoFuncImp::call):
        Check for undefined type for args[0] the same way we were already checking
        for args[1]. In this case, args was zero-length, but we were treating
        args[0] like an integer anyway. Resulted in some code looping from a NAN
        value to 4, taking approximately forever.

        * JavaScriptCore.pbproj/project.pbxproj:
        version wars

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7047 268f45cc-cd09-0410-ab3c-d52691b4dbfc

16 years ago Fix for 3726471, need to ensure that it's safe to do updateRendering from within...
hyatt [Fri, 16 Jul 2004 22:20:35 +0000 (22:20 +0000)]
Fix for 3726471, need to ensure that it's safe to do updateRendering from within layout, since isContentEditable
relies on it.  The fix is to just recalcStyle up front before beginning the layout, so that all of our renderobjects
will be up-to-date.

        Reviewed by john

        * khtml/khtmlview.cpp:
        (KHTMLView::layout):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7046 268f45cc-cd09-0410-ab3c-d52691b4dbfc

16 years ago Reviewed by Hyatt
kocienda [Fri, 16 Jul 2004 21:19:18 +0000 (21:19 +0000)]
    Reviewed by Hyatt

        Fix for this bug:

        <rdar://problem/3722153> Random crash while typing (DOM::NodeImpl::parentNode (this=0x0))

        * khtml/editing/htmlediting_impl.cpp:
        (khtml::DeleteSelectionCommandImpl::doApply): This check merely makes the code
        more robust. I do not understand how Grant ended up with null start or end
        blocks in the case of his bug report, but by adding two null checks, the code is
        now hardened a bit in case it happens again.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7043 268f45cc-cd09-0410-ab3c-d52691b4dbfc

16 years ago Reviewed by Hyatt
kocienda [Fri, 16 Jul 2004 21:14:17 +0000 (21:14 +0000)]
    Reviewed by Hyatt

        Fix for these bugs:

        <rdar://problem/3730785> Crash when arrow navigation goes to empty table cell
        <rdar://problem/3730790> Caret does not blink when placed in empty table cell

        * khtml/rendering/render_block.cpp:
        (khtml::RenderBlock::paintObject): Caret node's renderer might be this block, so
        don't block the painting of the caret in this case. This was the case in 3730790.
        We had the right geometry for the caret but blocked its painting.
        * khtml/xml/dom_position.cpp:
        (DOM::Position::previousLinePosition): Rework the logic here. This function asserted
        that the new position we would navigate to had a line box, but empty table cells, for
        instance will not. So, deal with this situation as well. The end result is a
        function that worked like it did before in cases where the previous line position has
        a line box, but now also will allow navigation to work when it does not.
        (DOM::Position::nextLinePosition): Ditto.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7042 268f45cc-cd09-0410-ab3c-d52691b4dbfc

16 years ago Reviewed by Hyatt
kocienda [Fri, 16 Jul 2004 20:37:56 +0000 (20:37 +0000)]
    Reviewed by Hyatt

        Fix for this bug:

        <rdar://problem/3687216> editable inline causes crash when focused

        * khtml/xml/dom_docimpl.cpp:
        (DocumentImpl::relinquishesEditingFocus): Add null check for rootEditableElement.
        (DocumentImpl::acceptsEditingFocus): Ditto.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7041 268f45cc-cd09-0410-ab3c-d52691b4dbfc

16 years agoReturn Panther baseline to layout tests.
hyatt [Fri, 16 Jul 2004 20:25:03 +0000 (20:25 +0000)]
Return Panther baseline to layout tests.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7040 268f45cc-cd09-0410-ab3c-d52691b4dbfc

16 years agoAdd a layout test for the crashing compact case.
hyatt [Fri, 16 Jul 2004 20:17:01 +0000 (20:17 +0000)]
Add a layout test for the crashing compact case.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7039 268f45cc-cd09-0410-ab3c-d52691b4dbfc

16 years ago Fix for 3709337, crash when using display: compact. Need to make sure that the...
hyatt [Fri, 16 Jul 2004 20:15:34 +0000 (20:15 +0000)]
Fix for 3709337, crash when using display: compact.  Need to make sure that the isCompact() check in bidi.cpp is
also checking for RenderBlocks, since otherwise you match text nodes (and that's just wrong).

        Reviewed by kocienda

        * khtml/rendering/bidi.cpp:
        (khtml::RenderBlock::layoutInlineChildren):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7038 268f45cc-cd09-0410-ab3c-d52691b4dbfc

16 years agochange version number to '153u'. the tree is open!
vicki [Fri, 16 Jul 2004 18:00:03 +0000 (18:00 +0000)]
change version number to '153u'.  the tree is open!

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7037 268f45cc-cd09-0410-ab3c-d52691b4dbfc

16 years agoSafari-152 stamp
vicki [Fri, 16 Jul 2004 17:55:33 +0000 (17:55 +0000)]
Safari-152 stamp

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7035 268f45cc-cd09-0410-ab3c-d52691b4dbfc

16 years ago Fix for 3625611, images offset on first visit to page. The method for determining...
hyatt [Fri, 16 Jul 2004 00:05:42 +0000 (00:05 +0000)]
Fix for 3625611, images offset on first visit to page.  The method for determining the last clean line was
flawed and would incorrectly miss dirty lines that occurred after the first clean line.

        Reviewed by john

        * khtml/rendering/bidi.cpp:
        (khtml::RenderBlock::determineEndPosition):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7034 268f45cc-cd09-0410-ab3c-d52691b4dbfc

16 years ago Reviewed by John
kocienda [Thu, 15 Jul 2004 17:20:50 +0000 (17:20 +0000)]
    Reviewed by John

        Fix for this bug:
        <rdar://problem/3587601> reproducible assertion failure in Blot deleting text, then image at Yahoo.com

        * khtml/editing/htmlediting_impl.cpp:
        (khtml::DeleteCollapsibleWhitespaceCommandImpl::deleteWhitespace): Relax assertion
        that nodes are text nodes during the walk of eligible nodes that could possibly be
        deleted. Change the assertion to an conditional check for text nodes. We may have
        unrendered nodes in the mix here (as is the case in the bug where the assertion
        failed on an AREA element), and the conditional check is sufficient to
        skip them while leaving the delete logic we want unperturbed.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7033 268f45cc-cd09-0410-ab3c-d52691b4dbfc

16 years ago Reviewed by John.
mjs [Thu, 15 Jul 2004 00:14:51 +0000 (00:14 +0000)]
    Reviewed by John.

<rdar://problem/3711474>: (REGRESSION (125-146): JavaScript 'toString(16)' is broken)
<rdar://problem/3644873>: (REGRESSION (125-140u): secondary list doesn't fill in at Southwest.com)

        * kjs/number_object.cpp:
        (NumberProtoFuncImp::call): Initialize radix from dradix, not from itself!

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7032 268f45cc-cd09-0410-ab3c-d52691b4dbfc

16 years ago Reviewed by John
kocienda [Wed, 14 Jul 2004 23:35:17 +0000 (23:35 +0000)]
    Reviewed by John

        * khtml/rendering/render_block.cpp:
        (khtml::RenderBlock::paintObject): Add null check on DOM node before
        asking if it is contentEditable.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7031 268f45cc-cd09-0410-ab3c-d52691b4dbfc

16 years ago Fix for 3595073, setting innerHTML on a <table> should work.
hyatt [Wed, 14 Jul 2004 23:03:15 +0000 (23:03 +0000)]
Fix for 3595073, setting innerHTML on a <table> should work.

        Reviewed by rjw

        * khtml/html/html_elementimpl.cpp:
        (HTMLElementImpl::createContextualFragment):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7030 268f45cc-cd09-0410-ab3c-d52691b4dbfc

16 years ago Reviewed by Hyatt
kocienda [Wed, 14 Jul 2004 21:45:30 +0000 (21:45 +0000)]
    Reviewed by Hyatt

        Updated these layout tests as a result of the last patch.
        These results are better.

        * layout-tests/editing/execCommand/selectAll-expected.txt
        * layout-tests/editing/selection/extend-by-character-006-expected.txt
        * layout-tests/editing/selection/unrendered-001-expected.txt
        * layout-tests/editing/selection/unrendered-003-expected.txt

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7029 268f45cc-cd09-0410-ab3c-d52691b4dbfc

16 years ago Reviewed by Hyatt
kocienda [Wed, 14 Jul 2004 21:43:25 +0000 (21:43 +0000)]
    Reviewed by Hyatt

        * khtml/rendering/render_block.cpp:
        (khtml::RenderBlock::paintObject): Change back to start() from caretPosition().
        Since the policy is now to move the selection to rendered content, if possible,
        when the selection is set, there is no longer any reason to have the additional
        caretPosition() function to store where the caret should be drawn.
        * khtml/xml/dom_docimpl.cpp:
        (DocumentImpl::updateSelection): No longer any need to call closestRenderedPosition here.
        This is done in Selection::validate.
        * khtml/xml/dom_position.cpp:
        (DOM::Position::closestRenderedPosition): Improved algorithm. Now much simpler.
        * khtml/xml/dom_selection.cpp:
        (DOM::Selection::Selection): caretPosition() and m_caretPosition now obsolete.
        (DOM::Selection::init): Ditto.
        (DOM::Selection::modifyExtendingRightForward): No longer any need to call
        closestRenderedPosition here. This is done in Selection::validate.
        (DOM::Selection::modifyMovingRightForward): Ditto.
        (DOM::Selection::modifyExtendingLeftBackward): Ditto.
        (DOM::Selection::modifyMovingLeftBackward): Ditto.
        (DOM::Selection::layoutCaret): Ditto.
        (DOM::Selection::validate): Add code to move the selection to rendered content if possible.
        * khtml/xml/dom_selection.h: caretPosition() and m_caretPosition now obsolete.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7028 268f45cc-cd09-0410-ab3c-d52691b4dbfc

16 years agoAdd layout test for dynamic float/position change.
hyatt [Wed, 14 Jul 2004 21:01:37 +0000 (21:01 +0000)]
Add layout test for dynamic float/position change.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7027 268f45cc-cd09-0410-ab3c-d52691b4dbfc

16 years ago Fix for 3716082, assert when you dynamically remove float or position styles.
hyatt [Wed, 14 Jul 2004 20:13:54 +0000 (20:13 +0000)]
Fix for 3716082, assert when you dynamically remove float or position styles.

        Reviewed by kevin

        * khtml/rendering/render_object.cpp:
        (RenderObject::setStyle):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7026 268f45cc-cd09-0410-ab3c-d52691b4dbfc

16 years agonew layout test to cover percentage heights inside auto tables.
hyatt [Wed, 14 Jul 2004 19:56:18 +0000 (19:56 +0000)]
new layout test to cover percentage heights inside auto tables.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7025 268f45cc-cd09-0410-ab3c-d52691b4dbfc

16 years ago Fix for various table regressions (malumovies.com and cityofheroes.gameamp.com)...
hyatt [Wed, 14 Jul 2004 19:49:48 +0000 (19:49 +0000)]
Fix for various table regressions (malumovies.com and cityofheroes.gameamp.com) involving bungling of
percentage heights.

        Reviewed by kocienda

        * khtml/rendering/render_box.cpp:
        (RenderBox::calcPercentageHeight):
        (RenderBox::availableHeightUsing):
        * khtml/rendering/render_table.cpp:
        (RenderTable::layout):
        (RenderTableSection::calcRowHeight):
        (RenderTableSection::layoutRows):
        (RenderTableCell::updateFromElement):
        * khtml/rendering/render_table.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7024 268f45cc-cd09-0410-ab3c-d52691b4dbfc

16 years ago Reviewed by John
kocienda [Wed, 14 Jul 2004 19:48:59 +0000 (19:48 +0000)]
    Reviewed by John

        * khtml/xml/dom_position.cpp:
        (DOM::Position::equivalentDeepPosition): New helper function to improve selection handling.
        Soon, I plan to land some changes that use this new function.
        * khtml/xml/dom_position.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7023 268f45cc-cd09-0410-ab3c-d52691b4dbfc

16 years ago Reviewed by Vicki
kocienda [Wed, 14 Jul 2004 17:32:49 +0000 (17:32 +0000)]
    Reviewed by Vicki

        * WebCore-combined.exp: Added QString.at symbol to tests exports to facilitate debugging
        data formatting change that is to come.
        * WebCore-tests.exp:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7022 268f45cc-cd09-0410-ab3c-d52691b4dbfc

16 years agoReviewed by mjs
kdecker [Wed, 14 Jul 2004 05:27:47 +0000 (05:27 +0000)]
Reviewed by mjs

  - Modified the test driver to spew out each test as it processes it.  This is such a good thing to see from a performance perspective because it illustrates which tests JavaScriptCore chokes heavily.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7021 268f45cc-cd09-0410-ab3c-d52691b4dbfc

16 years ago - added a necessary support library for jsDriver.pl
kdecker [Wed, 14 Jul 2004 00:57:30 +0000 (00:57 +0000)]
 - added a necessary support library for jsDriver.pl

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7020 268f45cc-cd09-0410-ab3c-d52691b4dbfc

16 years ago*** empty log message ***
kdecker [Wed, 14 Jul 2004 00:38:38 +0000 (00:38 +0000)]
*** empty log message ***

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7019 268f45cc-cd09-0410-ab3c-d52691b4dbfc

16 years agoReviewed by mjs
kdecker [Tue, 13 Jul 2004 23:21:28 +0000 (23:21 +0000)]
Reviewed by mjs

- added support for the kjs engine type

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7018 268f45cc-cd09-0410-ab3c-d52691b4dbfc

16 years ago Reviewed by kocienda.
kdecker [Tue, 13 Jul 2004 23:00:39 +0000 (23:00 +0000)]
    Reviewed by kocienda.

- made testkjs and JavaScriptCore a subtarget of 'All'
- testkjs now builds in $SYMROOTS

        * JavaScriptCore.pbproj/project.pbxproj:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7017 268f45cc-cd09-0410-ab3c-d52691b4dbfc

16 years ago Reviewed by Ken.
sullivan [Tue, 13 Jul 2004 21:50:53 +0000 (21:50 +0000)]
    Reviewed by Ken.

        - fixed <rdar://problem/3705500> REGRESSION (125.8-146): Cmd-E on an
        HTML page puts a trailing space on Find pasteboard

        * khtml/misc/khtml_text_operations.cpp:
        (khtml::TextIterator::handleTextBox):
        In the case where a subrun doesn't extend to the end of the text box,
        the well-commented code was supposed to return from this routine, but
        the wrong variable was being compared. This would send us through another
        pass of the loop, which would end up worrying about collapsed space at the
        end of the current box, even though we only cared about the beginning of the
        current box.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7016 268f45cc-cd09-0410-ab3c-d52691b4dbfc

16 years ago Reviewed by Kevin.
mjs [Tue, 13 Jul 2004 06:40:36 +0000 (06:40 +0000)]
    Reviewed by Kevin.

<rdar://problem/3673988>: (REGRESSION(141-144): connection assertion failure at http://traffic.511.org/sfgate)

        * WebView.subproj/WebBaseResourceHandleDelegate.m:
        (-[WebBaseResourceHandleDelegate connectionDidFinishLoading:]):
Don't check connection consistency if this load got cancelled
while finishing, because in this case we have cleared the
connection field already. This can happen when a redirect fires
from an onload handler.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7015 268f45cc-cd09-0410-ab3c-d52691b4dbfc

16 years ago Reviewed by John.
mjs [Tue, 13 Jul 2004 00:26:18 +0000 (00:26 +0000)]
    Reviewed by John.

<rdar://problem/3632570>: (REGRESSION: SocialText.net wiki keeps asking for auth, even though pages load)

        * Misc.subproj/WebIconLoader.m:
        (-[WebIconLoader didReceiveAuthenticationChallenge:]): Ignore the challenge - we don't
want an auth panel for favicons.
        (-[WebIconLoader didCancelAuthenticationChallenge:]): Ignore cancel, since we are ignoring
the challenge.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7014 268f45cc-cd09-0410-ab3c-d52691b4dbfc

16 years ago Fixed 3717982. Implemented navigator.language!
rjw [Mon, 12 Jul 2004 23:33:10 +0000 (23:33 +0000)]
Fixed 3717982.  Implemented navigator.language!

        Reviewed by John.

        * khtml/ecma/kjs_navigator.cpp:
        (Navigator::getValueProperty):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7011 268f45cc-cd09-0410-ab3c-d52691b4dbfc

16 years agoReviewed by Dave
kdecker [Mon, 12 Jul 2004 23:01:08 +0000 (23:01 +0000)]
Reviewed by Dave

Added a layout test for css 'width:auto'

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7010 268f45cc-cd09-0410-ab3c-d52691b4dbfc

16 years agoBack out my changes to the fix for my previous checkin, since it broke the inline...
hyatt [Mon, 12 Jul 2004 22:58:42 +0000 (22:58 +0000)]
Back out my changes to the fix for my previous checkin, since it broke the inline-block layout test.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7009 268f45cc-cd09-0410-ab3c-d52691b4dbfc

16 years ago Reviewed by me
kocienda [Mon, 12 Jul 2004 22:30:09 +0000 (22:30 +0000)]
    Reviewed by me

        Remove cvs conflict indicators from ChangeLog

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7008 268f45cc-cd09-0410-ab3c-d52691b4dbfc

16 years ago Reviewed by Hyatt
kocienda [Mon, 12 Jul 2004 22:29:20 +0000 (22:29 +0000)]
    Reviewed by Hyatt

        * khtml/xml/dom_position.cpp:
        (DOM::Position::inRenderedContent): I broke selection drawing with my last patch. This
        function is now used in selection drawing, and it was making an unneeded check to see
        that content was editable to answer whether or not is was rendered. Bad. Fixed.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7007 268f45cc-cd09-0410-ab3c-d52691b4dbfc

16 years ago Fix for 3621138, crash on hrweb.apple.com. Make sure that in the case where objects...
hyatt [Mon, 12 Jul 2004 22:26:57 +0000 (22:26 +0000)]
Fix for 3621138, crash on hrweb.apple.com.  Make sure that in the case where objects get pulled up from merging
blocks that we just delete all line boxes.

        Reviewed by kocienda

        * khtml/rendering/render_block.cpp:
        (khtml::RenderBlock::removeChild):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7006 268f45cc-cd09-0410-ab3c-d52691b4dbfc

16 years ago Reviewed by John.
mjs [Mon, 12 Jul 2004 22:03:21 +0000 (22:03 +0000)]
    Reviewed by John.

<rdar://problem/3706080>: (REGRESSION (125.8-147u): Nested <ul> do not display bullets)
<rdar://problem/3676376>: (Second level bullets not printed when printing Xcode release notes)

        * kwq/KWQPainter.h:
        * kwq/KWQPainter.mm:
        (CGColorFromNSColor):
        (QPainter::drawEllipse):
        (QPainter::setShadow):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7005 268f45cc-cd09-0410-ab3c-d52691b4dbfc

16 years ago Reviewed by me
kocienda [Mon, 12 Jul 2004 21:57:34 +0000 (21:57 +0000)]
    Reviewed by me

        Added new editing-related layout tests

        * layout-tests/editing/deleting/delete-after-span-ws-001-expected.txt: Added.
        * layout-tests/editing/deleting/delete-after-span-ws-001.html: Added.
        * layout-tests/editing/deleting/delete-after-span-ws-002-expected.txt: Added.
        * layout-tests/editing/deleting/delete-after-span-ws-002.html: Added.
        * layout-tests/editing/deleting/delete-after-span-ws-003-expected.txt: Added.
        * layout-tests/editing/deleting/delete-after-span-ws-003.html: Added.
        * layout-tests/editing/selection/unrendered-001-expected.txt: Added.
        * layout-tests/editing/selection/unrendered-001.html: Added.
        * layout-tests/editing/selection/unrendered-002-expected.txt: Added.
        * layout-tests/editing/selection/unrendered-002.html: Added.
        * layout-tests/editing/selection/unrendered-003-expected.txt: Added.
        * layout-tests/editing/selection/unrendered-003.html: Added.
        * layout-tests/editing/selection/unrendered-004-expected.txt: Added.
        * layout-tests/editing/selection/unrendered-004.html: Added.
        * layout-tests/editing/selection/unrendered-005-expected.txt: Added.
        * layout-tests/editing/selection/unrendered-005.html: Added.
        * layout-tests/traversal/node-iterator-008-expected.txt: Added.
        * layout-tests/traversal/node-iterator-008.html: Added.
        * layout-tests/traversal/tree-walker-005-expected.txt: Added.
        * layout-tests/traversal/tree-walker-005.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7004 268f45cc-cd09-0410-ab3c-d52691b4dbfc

16 years ago Reviewed by Hyatt
kocienda [Mon, 12 Jul 2004 21:51:02 +0000 (21:51 +0000)]
    Reviewed by Hyatt

        Fixes for these bugs:

        <rdar://problem/3723359> Extending then "unextending" selection with arrow keys should draw caret but doesn't
        <rdar://problem/3724626> White-space deletion code deletes wrong character when space follows span

        * khtml/editing/htmlediting_impl.cpp:
        (khtml::DeleteSelectionCommandImpl::doApply): Modify special-case white-space deletion code so it runs
        only in the special case. It was throwing its net too widely, catching the case described in 3724626.
        By tightening up the special-case white-space deletion, and allowing the more general-purpose code to run,
        the bug is fixed.
        * khtml/xml/dom_docimpl.cpp:
        (DocumentImpl::updateSelection): Use recently-added closestRenderedPosition helper in Position class
        to figure out the start and end positions for selection drawing.
        * khtml/xml/dom_position.cpp:
        (DOM::Position::equivalentUpstreamPosition): Added code to handle white-space that causes line breaks.
        (DOM::Position::equivalentDownstreamPosition): Ditto.
        (DOM::Position::closestRenderedPosition): Trap empty selections at function entry, return *this.
        (DOM::Position::isFirstRenderedPositionOnLine): Can't be first rendered position on line if not rendered.
        Add check for this.
        (DOM::Position::isLastRenderedPositionOnLine): Ditto, but s/first/last/
        * khtml/xml/dom_selection.cpp:
        (DOM::Selection::validate): A selection is in caret state if the start and end are equal *or* equivalent.
        The equivalence case is new, and fixes 3723359.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7003 268f45cc-cd09-0410-ab3c-d52691b4dbfc

16 years agoFix the fast layout tests.
hyatt [Mon, 12 Jul 2004 20:13:10 +0000 (20:13 +0000)]
Fix the fast layout tests.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7002 268f45cc-cd09-0410-ab3c-d52691b4dbfc

16 years ago Reviewed by Hyatt.
kdecker [Fri, 9 Jul 2004 23:50:20 +0000 (23:50 +0000)]
    Reviewed by Hyatt.

        fixes the width:auto problem in
        <rdar://problem/3698344> REGRESSION (143?-144): macrumors.com tabs are compressed and illegible

        * khtml/css/cssstyleselector.cpp:
        (khtml::CSSStyleSelector::applyProperty):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6995 268f45cc-cd09-0410-ab3c-d52691b4dbfc

16 years ago Reviewed by me
kocienda [Fri, 9 Jul 2004 23:23:06 +0000 (23:23 +0000)]
    Reviewed by me

        Updated some layout test results.

        * layout-tests/editing/deleting/delete-image-004-expected.txt:
        * layout-tests/editing/selection/extend-by-character-006-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6992 268f45cc-cd09-0410-ab3c-d52691b4dbfc

16 years agoWebCore:
cblu [Fri, 9 Jul 2004 21:24:00 +0000 (21:24 +0000)]
WebCore:

Allowed my change for 3715785 to compile on Jaguar.

        Reviewed by kocienda.

        * kwq/WebCoreBridge.h:
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge domain]): new, allows access to the domain without using the DOM API which doesn't exist on Jaguar

WebKit:

Allowed my change for 3715785 to compile on Jaguar.

        Reviewed by kocienda.

        * WebCoreSupport.subproj/WebBridge.m:
        (-[WebBridge canTargetLoadInFrame:]): don't use the DOM API since it doesn't exist on Jaguar, instead call the new domain method on the bridge

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6985 268f45cc-cd09-0410-ab3c-d52691b4dbfc

16 years ago Reviewed by Hyatt
kocienda [Fri, 9 Jul 2004 18:31:01 +0000 (18:31 +0000)]
    Reviewed by Hyatt

        Some improvements to fix:

        <rdar://problem/3723111> Caret not drawn when selection set to unrendered content

        * khtml/editing/htmlediting_impl.cpp:
        (khtml::TypingCommandImpl::issueCommandForDeleteKey): Adjust selection to delete if
        selected position is not rendered.
        * khtml/rendering/render_block.cpp:
        (khtml::RenderBlock::paintObject): Use new caretPosition() function on Selection to
        figure out whether to paint.
        * khtml/xml/dom_position.cpp:
        (DOM::Position::previousCharacterPosition): Now correctly deals with a start
        position that is not rendered.
        (DOM::Position::nextCharacterPosition): Ditto.
        (DOM::Position::closestRenderedPosition): New helper.
        * khtml/xml/dom_position.h:
        (DOM::): Moved in EAffinity from Selection header. Now used in closestRenderedPosition function.
        * khtml/xml/dom_selection.cpp:
        (DOM::Selection::Selection): Added new m_caretPosition member. This is the position of the caret
        after a caret layout. This may be different from start or end if start and end are not rendered.
        (DOM::Selection::init):
        (DOM::Selection::modifyExtendingRightForward): New helper to clean up modify() and make it more readble.
        (DOM::Selection::modifyMovingRightForward): Ditto.
        (DOM::Selection::modifyExtendingLeftBackward): Ditto.
        (DOM::Selection::modifyMovingLeftBackward): Ditto.
        (DOM::Selection::modify): Use new helpers to make this more readble.
        (DOM::Selection::layoutCaret): Uses new closestRenderedPosition helper to place the caret if in unrendered
        content.
        (DOM::Selection::paintCaret): Remove moveToRenderedContent. obsolete.
        * khtml/xml/dom_selection.h:
        (DOM::Selection::caretPosition): New accessor.
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge setSelectedDOMRange:affinity:]): EAffinity no longer a member enum of Selection class.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6984 268f45cc-cd09-0410-ab3c-d52691b4dbfc

16 years ago Reviewed by John
kocienda [Fri, 9 Jul 2004 17:40:10 +0000 (17:40 +0000)]
    Reviewed by John

        * Plugins.subproj/npruntime.h: Updated license to lawyer-approved
        joint Apple-Mozilla BSD-style license.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6983 268f45cc-cd09-0410-ab3c-d52691b4dbfc

16 years ago Fix for the table layout test that failed because of a change in how innerText worke...
hyatt [Thu, 8 Jul 2004 22:54:49 +0000 (22:54 +0000)]
Fix for the table layout test that failed because of a change in how innerText worked.  We need to do
updateLayout now when using innerText, since the method has been changed to use line boxes in the render tree
that might otherwise be out of date.

        Reviewed by kocienda

        * khtml/html/html_elementimpl.cpp:
        (HTMLElementImpl::innerText):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6982 268f45cc-cd09-0410-ab3c-d52691b4dbfc

16 years ago Reviewed by Ken.
sullivan [Thu, 8 Jul 2004 21:31:58 +0000 (21:31 +0000)]
    Reviewed by Ken.

        - fixed <rdar://problem/3691569> REGRESSION (142): cmd-shift-clicking on a link
        now also extends selection (even if there wasn't one before)

        * khtml/khtml_part.cpp:
        (KHTMLPart::handleMousePressEventSingleClick):
        if there's a URL associated with the event, don't extend the selection

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6981 268f45cc-cd09-0410-ab3c-d52691b4dbfc

16 years ago Reviewed by Vicki
kocienda [Thu, 8 Jul 2004 21:08:03 +0000 (21:08 +0000)]
    Reviewed by Vicki

        Added some helper functions which provide strings to display in the
        Xcode debugger's variable inspector window. These functions are called
        from the LabyrinthDataFormatter debugger plugin I just checked in to
        the Labyrinth/Tools directory.

        Note that these functions are compiled in on Development builds only.

        * WebCore-combined.exp:
        * WebCore-tests.exp: Export all the formatForDebugger symbols so the
        debugger program can link with them.
        * khtml/xml/dom2_rangeimpl.cpp:
        (DOM::RangeImpl::formatForDebugger):
        * khtml/xml/dom2_rangeimpl.h:
        * khtml/xml/dom_elementimpl.cpp:
        (ElementImpl::formatForDebugger):
        * khtml/xml/dom_elementimpl.h:
        * khtml/xml/dom_nodeimpl.cpp:
        * khtml/xml/dom_nodeimpl.h:
        * khtml/xml/dom_position.cpp:
        (DOM::Position::formatForDebugger):
        * khtml/xml/dom_position.h:
        * khtml/xml/dom_selection.cpp:
        (DOM::Selection::formatForDebugger):
        * khtml/xml/dom_selection.h:
        * khtml/xml/dom_textimpl.cpp:
        (TextImpl::formatForDebugger):
        * khtml/xml/dom_textimpl.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6980 268f45cc-cd09-0410-ab3c-d52691b4dbfc

16 years ago Reviewed by Vicki.
sullivan [Thu, 8 Jul 2004 21:01:38 +0000 (21:01 +0000)]
    Reviewed by Vicki.

        - fixed <rdar://problem/3721544> crash increasing font size;
        entrezeroetun.com (works in IE and Firefox)

        * khtml/rendering/render_block.cpp:
        (khtml::RenderBlock::updateFirstLetter):
        Check for nil originalString() before dereffing

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6979 268f45cc-cd09-0410-ab3c-d52691b4dbfc

16 years ago Fixed: <rdar://problem/3720728> REGRESSION (125.8-146): Crash moving mouse over...
cblu [Thu, 8 Jul 2004 20:49:12 +0000 (20:49 +0000)]
Fixed: <rdar://problem/3720728> REGRESSION (125.8-146): Crash moving mouse over plugin at manray-photo.com

        Reviewed by john.

        * Plugins.subproj/WebBaseNetscapePluginView.m:
        (-[WebBaseNetscapePluginView pluginScriptableObject]): don't call NPP_GetValue unless the plug-in implements it

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6978 268f45cc-cd09-0410-ab3c-d52691b4dbfc

16 years ago Fixed: <rdar://problem/3706296> VIP: ifilm.com crashing reproducibly with Safari
cblu [Thu, 8 Jul 2004 20:28:24 +0000 (20:28 +0000)]
Fixed: <rdar://problem/3706296> VIP: ifilm.com crashing reproducibly with Safari

        Reviewed by kocienda.

        * Plugins.subproj/WebNetscapePluginPackage.m:
        (-[WebNetscapePluginPackage launchRealPlayer]): don't release a NULL appURL

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6977 268f45cc-cd09-0410-ab3c-d52691b4dbfc

16 years ago Fix for 3721453, CSS3 initial property caused crashes because the macros were not...
hyatt [Thu, 8 Jul 2004 20:22:01 +0000 (20:22 +0000)]
Fix for 3721453, CSS3 initial property caused crashes because the macros were not written correctly.

        Reviewed by john

        * khtml/css/cssstyleselector.cpp:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6976 268f45cc-cd09-0410-ab3c-d52691b4dbfc

16 years ago Fixed: <rdar://problem/3650140> reproducible assertion failure going to plugin page...
cblu [Thu, 8 Jul 2004 19:33:15 +0000 (19:33 +0000)]
Fixed: <rdar://problem/3650140> reproducible assertion failure going to plugin page with JavaScript disabled

        Reviewed by john.

        * Plugins.subproj/WebBaseNetscapePluginView.m:
        (-[WebBaseNetscapePluginView evaluateJavaScriptPluginRequest:]): don't call NPP_NewStream and other stream methods if there is no JS result to deliver. This is what Mozilla does.
        (-[WebBaseNetscapePluginView loadRequest:inTarget:withNotifyData:]): Return NPERR_GENERIC_ERROR if JS is disabled. This is what Mozilla does.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6975 268f45cc-cd09-0410-ab3c-d52691b4dbfc

16 years agochange the version number from '151' to '152u'
vicki [Thu, 8 Jul 2004 18:46:41 +0000 (18:46 +0000)]
change the version number from '151' to '152u'

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6974 268f45cc-cd09-0410-ab3c-d52691b4dbfc

16 years agoSafari-151 stamp!
vicki [Thu, 8 Jul 2004 18:38:17 +0000 (18:38 +0000)]
Safari-151 stamp!

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6972 268f45cc-cd09-0410-ab3c-d52691b4dbfc

16 years ago Fix for 3712133, crash from first-line pseudo-style use.
hyatt [Wed, 7 Jul 2004 23:24:25 +0000 (23:24 +0000)]
Fix for 3712133, crash from first-line pseudo-style use.

        Reviewed by kocienda

        * khtml/css/cssstyleselector.cpp:
        (khtml::CSSStyleSelector::styleForElement):
        * khtml/css/cssstyleselector.h:
        * khtml/rendering/render_object.cpp:
        (RenderObject::getPseudoStyle):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6971 268f45cc-cd09-0410-ab3c-d52691b4dbfc

16 years ago 3719051 - Safari doesn't update form inputs when a page was refreshed by javascript...
trey [Wed, 7 Jul 2004 21:36:48 +0000 (21:36 +0000)]
3719051 - Safari doesn't update form inputs when a page was refreshed by javascript window.location
... and at least 5 other cases in Radar

Very similar problem to the Harvard PIN bug.  We need to be sure
to not carry any state over when we are processing a client
redirect, which reuses the same WebHistoryItem.

        Reviewed by John.

        * WebView.subproj/WebFrame.m:
        (-[WebFrame _transitionToCommitted:]):  Comment
        (-[WebFrame _opened]):  Clear form and scroll state on client redirect.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6970 268f45cc-cd09-0410-ab3c-d52691b4dbfc

16 years ago Reviewed by Hyatt
kocienda [Wed, 7 Jul 2004 20:13:00 +0000 (20:13 +0000)]
    Reviewed by Hyatt

        Fix for this bug:

        <rdar://problem/3716479> calling setInnerHTML during a webViewDidChange delegate call causes a crash

        The fix involves some rearrangement of code in TypingCommand and TypingCommandImpl.
        Formerly, new TypingCommands would apply themselves (which was a no-op) and then
        do their action in some code a way different than other commands. This type of command
        application is different than for all other commands since TypingCommands can be coalesced.
        The crash occurred as a result of the "no-op" TypingCommand having the unconsidered
        consequence of causing editing delegate notifications to be sent before the command
        has actually run. This change takes a small step towards making TypingCommandImpl function like
        other commands, where the command work is done in doApply. This makes the notification
        happen in the right order.

        * khtml/editing/htmlediting.cpp:
        (khtml::TypingCommand::TypingCommand):
        (khtml::TypingCommand::insertText):
        (khtml::TypingCommand::insertNewline):
        (khtml::TypingCommand::deleteKeyPressed):
        * khtml/editing/htmlediting.h:
        (khtml::TypingCommand::):
        * khtml/editing/htmlediting_impl.cpp:
        (khtml::TypingCommandImpl::TypingCommandImpl):
        (khtml::TypingCommandImpl::doApply):
        * khtml/editing/htmlediting_impl.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6969 268f45cc-cd09-0410-ab3c-d52691b4dbfc

16 years ago Fixed: <rdar://problem/3715785> multiple frame injection vulnerability reported...
cblu [Tue, 6 Jul 2004 23:11:23 +0000 (23:11 +0000)]
Fixed: <rdar://problem/3715785> multiple frame injection vulnerability reported by Secunia, affects almost all browsers

        Reviewed by john, trey, kocienda.

        * WebCoreSupport.subproj/WebBridge.m:
        (-[WebBridge canTargetLoadInFrame:]): new method, return YES if the requesting frame is local, the target frame is an entire window or if the domain of the parent of the targeted frame equals this domain
        (-[WebBridge loadURL:referrer:reload:userGesture:target:triggeringEvent:form:formValues:]): call canTargetLoadInFrame: to make sure we can load the request
        (-[WebBridge postWithURL:referrer:target:data:contentType:triggeringEvent:form:formValues:]): ditto

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6968 268f45cc-cd09-0410-ab3c-d52691b4dbfc

16 years ago Reviewed by me
kocienda [Tue, 6 Jul 2004 22:18:06 +0000 (22:18 +0000)]
    Reviewed by me

        * khtml/html/html_tableimpl.cpp:
        (HTMLTableElementImpl::addChild): Added a better comment in the
        code I just checked in a few minutes ago.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6967 268f45cc-cd09-0410-ab3c-d52691b4dbfc

16 years ago Reviewed by Hyatt
kocienda [Tue, 6 Jul 2004 22:07:11 +0000 (22:07 +0000)]
    Reviewed by Hyatt

        Fix for this bug:

        <rdar://problem/3672377> assertion failure in AppendNodeCommandImpl::doApply
        due to non-0 exception code trying to insert a DIV markup string

        The solution was to revert to the code that was rolled out, and removing
        the child checks from NodeImpl::checkAddChild. However, this time, I added
        code very similar to this check into the code that runs while HTML is
        being parsed to build up tables. This code relies on child-add failure
        to ensure the proper construction of well-formed tables (as gross as that
        sounds), so the check needs to be retained there. No other code seems to
        be so affected. Layout tests are unchanged by this patch.

        * khtml/html/html_tableimpl.cpp:
        (HTMLTableElementImpl::addChild):
        * khtml/xml/dom_nodeimpl.cpp:
        (NodeImpl::checkAddChild):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6966 268f45cc-cd09-0410-ab3c-d52691b4dbfc

16 years ago Reviewed by John
kocienda [Tue, 6 Jul 2004 17:58:38 +0000 (17:58 +0000)]
    Reviewed by John

        Simple change. I switched the arguments of the appendNode helper function
        and the AppendNodeCommand and AppendNodeCommandImpl classes. The node to
        insert now comes before the parent node in the argument list. I did this
        to make this function match the convention of others in the HTML editing code.
        This was the only one that was "different" in the way that it ordered arguments.
        As a result, I was always looking to see that I was passing things in the right
        order.

        * khtml/editing/htmlediting.cpp:
        (khtml::AppendNodeCommand::AppendNodeCommand):
        (khtml::AppendNodeCommand::appendChild):
        (khtml::AppendNodeCommand::parentNode):
        * khtml/editing/htmlediting.h:
        * khtml/editing/htmlediting_impl.cpp:
        (khtml::CompositeEditCommandImpl::insertNodeAfter):
        (khtml::CompositeEditCommandImpl::insertNodeAt):
        (khtml::CompositeEditCommandImpl::appendNode):
        (khtml::AppendNodeCommandImpl::AppendNodeCommandImpl):
        (khtml::AppendNodeCommandImpl::~AppendNodeCommandImpl):
        (khtml::AppendNodeCommandImpl::doApply):
        (khtml::AppendNodeCommandImpl::doUnapply):
        (khtml::ApplyStyleCommandImpl::surroundNodeRangeWithElement):
        (khtml::DeleteSelectionCommandImpl::doApply):
        (khtml::InputNewlineCommandImpl::insertNodeAfterPosition):
        (khtml::InputNewlineCommandImpl::insertNodeBeforePosition):
        (khtml::InputTextCommandImpl::prepareForTextInsertion):
        * khtml/editing/htmlediting_impl.h:
        (khtml::AppendNodeCommandImpl::parentNode):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6965 268f45cc-cd09-0410-ab3c-d52691b4dbfc

16 years ago Reviewed by Trey
kocienda [Tue, 6 Jul 2004 17:04:45 +0000 (17:04 +0000)]
    Reviewed by Trey

        Fixed several problems with traversal classes. For one, NodeIterators treat
        FILTER_REJECT and FILTER_SKIP the same, since it treats the DOM tree as a
        flat collection of nodes free of hierarchy. The code before this change did
        not do this correctly. It sure pays to go back and read the specs. :)

        Also, the code to traverse from node to node when filters were applied was
        not working correctly. My first attemmpt to implement this was just plain
        buggy, as I discovered when I tried to write tests for my WWDC talk. I have
        settled on an implementation which is much simpler and worked for all the
        tests I threw at it.

        * khtml/xml/dom2_traversalimpl.cpp:
        (DOM::NodeIteratorImpl::findNextNode):
        (DOM::NodeIteratorImpl::nextNode):
        (DOM::NodeIteratorImpl::findPreviousNode):
        (DOM::NodeIteratorImpl::previousNode):
        (DOM::TreeWalkerImpl::parentNode):
        (DOM::TreeWalkerImpl::firstChild):
        (DOM::TreeWalkerImpl::lastChild):
        (DOM::TreeWalkerImpl::previousSibling):
        (DOM::TreeWalkerImpl::nextSibling):
        (DOM::TreeWalkerImpl::previousNode):
        (DOM::TreeWalkerImpl::nextNode):
        (DOM::TreeWalkerImpl::ancestorRejected):
        * khtml/xml/dom2_traversalimpl.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6964 268f45cc-cd09-0410-ab3c-d52691b4dbfc

16 years ago Reviewed by Trey.
sullivan [Tue, 6 Jul 2004 16:45:13 +0000 (16:45 +0000)]
    Reviewed by Trey.

        - fixed <rdar://problem/3717147> folder icon used for error page in back/forward
        menu when iTunes is not installed

        * WebView.subproj/WebFrame.m:
        (-[WebFrame _transitionToCommitted:]):
        When displaying the error page for an unreachable URL, leave the requested URL
        in the WebHistoryItem; don't clobber it with a bogus one that represents the
        error page. This not only avoids the wrong-icon problem, but should also help
        in cases where an unreachable URL becomes reachable later on.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6963 268f45cc-cd09-0410-ab3c-d52691b4dbfc

16 years ago Reviewed by kocienda.
vicki [Tue, 6 Jul 2004 16:23:43 +0000 (16:23 +0000)]
    Reviewed by kocienda.

- added backColorCommand, foreColorCommand, fontNameCommand,
and fontSizeCommand

        * layout-tests/editing/editing.js:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6962 268f45cc-cd09-0410-ab3c-d52691b4dbfc

16 years agoWebCore:
trey [Tue, 6 Jul 2004 16:13:36 +0000 (16:13 +0000)]
WebCore:

3716053 - www.theage.com.au has extra back/forward items due to ads

This turned out to be easily fixed by generalizing the fix to 3438441.  We prevent
addition to the b/f list not just during an onload event, but during any non-user
gesture, which includes top level script executing.

        Reviewed by Richard.

        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::openURL):  Only real change - prevent adding to b/f list if not
a user gesture.
        (KWQKHTMLPart::openURLRequest):  Rename "onLoadEvent" to "userGesture", swap sense
        (KWQKHTMLPart::submitForm):  Ditto
        (KWQKHTMLPart::urlSelected): Ditto
        * kwq/KWQKHTMLPartBrowserExtension.mm:
        (KHTMLPartBrowserExtension::createNewWindow):  Ditto
        * kwq/WebCoreBridge.h:

WebKit:

3716053 - www.theage.com.au has extra back/forward items due to ads

The real change was in WebKit.  Here was are just renaming a method and folding
all the WebFrameLoadTypeOnLoadEvent uses to be WebFrameLoadTypeInternal, since there
was never any difference anyway.

        Reviewed by Richard

        * WebCoreSupport.subproj/WebBridge.m:
        (-[WebBridge loadURL:referrer:reload:userGesture:target:triggeringEvent:form:formValues:]):  rename part of the method.
        * WebView.subproj/WebFrame.m:  Nuke WebFrameLoadTypeOnLoadEvent.
        (-[WebFrame _transitionToCommitted:]):
        (-[WebFrame _checkLoadCompleteForThisFrame]):
        (-[WebFrame _loadItem:withLoadType:]):
        (-[WebFrame _itemForRestoringDocState]):
        * WebView.subproj/WebFramePrivate.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6961 268f45cc-cd09-0410-ab3c-d52691b4dbfc

16 years ago Reviewed by Trey
kocienda [Tue, 6 Jul 2004 15:46:43 +0000 (15:46 +0000)]
    Reviewed by Trey

        Only register the editing delegate for those notifications for which it implements the callbacks.

        * WebView.subproj/WebView.m:
        (-[WebView registerForEditingDelegateNotification:selector:]):
        (-[WebView setEditingDelegate:]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6960 268f45cc-cd09-0410-ab3c-d52691b4dbfc

16 years ago 3294652 - Failed drag of links doesn't slide back
trey [Tue, 6 Jul 2004 15:40:04 +0000 (15:40 +0000)]
3294652 - Failed drag of links doesn't slide back

The only reason for this is that because of some hacks, we lie to
AK about the drag image offset, which means we slide back to
slightly the wrong place.  But it's very minor, so we should
just fix it.

        Reviewed by Ken.

        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView _startDraggingImage:at:operation:event:sourceIsDHTML:DHTMLWroteData:]):
Ask for slideback.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6959 268f45cc-cd09-0410-ab3c-d52691b4dbfc

16 years ago Reviewed by Dave.
darin [Fri, 2 Jul 2004 17:27:36 +0000 (17:27 +0000)]
    Reviewed by Dave.

        - fixed problem where tabsToLinks and privateBrowsingEnabled did not work with non-
          standard WebPreferences objects

        * WebView.subproj/WebPreferences.m:
        (-[WebPreferences _valueForKey:]): New helper.
        (-[WebPreferences _stringValueForKey:]): Use _valueForKey.
        (-[WebPreferences _integerValueForKey:]): Use _valueForKey.
        (-[WebPreferences _boolValueForKey:]): Use _valueForKey.
        (-[WebPreferences tabsToLinks]): Use _boolValueForKey; this is the bug fix.
        (-[WebPreferences privateBrowsingEnabled]): Ditto.
        (+[WebPreferences _setIBCreatorID:]): Use copy instead of retain for keeping an NSString.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6958 268f45cc-cd09-0410-ab3c-d52691b4dbfc

16 years ago Reviewed by Dave.
darin [Fri, 2 Jul 2004 17:03:32 +0000 (17:03 +0000)]
    Reviewed by Dave.

        - fixed half of <rdar://problem/3709244> utf-8 meta tag not parsed when page title contains angle brackets or if </meta> tag used

        * khtml/misc/decoder.cpp: (Decoder::decode): Allow </meta> tags without deciding we
        are done with the header.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6957 268f45cc-cd09-0410-ab3c-d52691b4dbfc

16 years ago 3556159 - Crashes in -[WebFrame(WebPrivate) _transitionToCommitted:] at www.masterca...
trey [Thu, 1 Jul 2004 20:41:07 +0000 (20:41 +0000)]
3556159 - Crashes in -[WebFrame(WebPrivate) _transitionToCommitted:] at mastercardbusiness.com

We know from the line number of the crash that it is due to [self parentFrame]==nil.

Looking at the HTML and that of the related bugs, they do special stuff with onload
handlers.  It is no longer repro, presumably because the includes JS files changed,
as the bugs only included the top level HTML.  I suspect that the problem is that the
WebFrameLoadTypeOnLoadEvent case was added, and in some weird sequence specific to
MasterCard, they hit a case where we would be in WebFrameLoadTypeOnLoadEvent mode but
not have a parent frame.

So we guard in the code against hitting a nil parentFrame, and log an error just in
case this ever crops up again and we can learn more about it.

        Reviewed by Richard.

        * WebView.subproj/WebFrame.m:
        (-[WebFrame _transitionToCommitted:]):  Guard against nil parentFrame.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6956 268f45cc-cd09-0410-ab3c-d52691b4dbfc

16 years ago Reviewed by Trey.
sullivan [Thu, 1 Jul 2004 17:41:26 +0000 (17:41 +0000)]
    Reviewed by Trey.

        - fixed these bugs:
        <rdar://problem/3709110> REGRESSION (Tiger): Pressing Tab key to move focus
        onto links skips every other link
        <rdar://problem/3692576> focus ring is in odd place after clicking RSS button
        with "Tab to links" enabled

        WebHTMLView has some trickery by which we advance the focused link when nextKeyView
        or previousKeyView is called within nextValidKeyView or previousValidKeyView. This
        broke in Tiger because AppKit now (sometimes at least) calls nextKeyView more than
        once within nextValidKeyView. Fixed 3709110 by making sure we only advance the focus
        once within a call to nextValidKeyView or previousValidKeyView.

        Also, this same trickery didn't work right with hidden views. Fixed 3692576 by checking
        whether the view is hidden and bypassing the focus-moving trickery in that case.

        * WebView.subproj/WebHTMLViewInternal.h:
        renamed inNextValidKeyView -> nextKeyViewAccessShouldMoveFocus

        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView nextKeyView]):
        now clears nextKeyViewAccessShouldMoveFocus
        (-[WebHTMLView previousKeyView]):
        ditto
        (-[WebHTMLView nextValidKeyView]):
        now doesn't set focus-moving trigger ivar if view is hidden or has hidden ancestor
        (-[WebHTMLView previousValidKeyView]):
        ditto

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6955 268f45cc-cd09-0410-ab3c-d52691b4dbfc

16 years agoWebCore:
trey [Thu, 1 Jul 2004 02:07:43 +0000 (02:07 +0000)]
WebCore:

Dragging within a web view should be allowed to start when the window isn't key.

A few months ago, Chris made this work, but it relied on the fact that all dragging
was done in WebKit.  When WebCore got involved in dragging, it was broken.  Now we
have a new scheme that gets it working again that properly involves WebCore.

The general idea is that when AK asks us whether to accept the first mouse and do
"delayed window ordering", we must consult WC to see if we might start a drag.  In
addition, instead of these drags in non-active windows being started as a special
case in WK, they go through the normal WK-WC drag machinery.

        Reviewed by John.

        * khtml/khtml_part.cpp:
        (KHTMLPart::shouldDragAutoNode):  New x,y args.
        * khtml/khtml_part.h:
        * khtml/rendering/render_object.cpp:
        (RenderObject::draggableNode):  Pass through new x,y args.
        * khtml/rendering/render_object.h:
        * kwq/KWQKHTMLPart.h:
        (KWQKHTMLPart::setActivationEventNumber):  New setter.
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::KWQKHTMLPart):  Init new ivar.
        (KWQKHTMLPart::eventMayStartDrag):  New routine that checks if we might start
a drag in response to a mouseDown.
        (KWQKHTMLPart::khtmlMouseMoveEvent):  Pass x,y to the routine that finds a draggable
node.  This eventually gets back up to WK's _mayStartDragAtEventLocation:.
Delay requirement when dragging the selection now implemented here.
        (KWQKHTMLPart::khtmlMouseReleaseEvent):  Must avoid changing the selection if we
wind up here as part of the first click in a window (because we started handling
the click to possible start a drag, but that never came through).
        (KWQKHTMLPart::mouseDown): Save away event timestamp.
        (KWQKHTMLPart::shouldDragAutoNode):  Pass location up to WK instead of the
most recent event we stashed.
        * kwq/WebCoreBridge.h:
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge setActivationEventNumber:]):  Trivial glue.
        (-[WebCoreBridge eventMayStartDrag:]):  Ditto.

WebKit:

Dragging within a web view should be allowed to start when the window isn't key.

A few months ago, Chris made this work, but it relied on the fact that all dragging
was done in WebKit.  When WebCore got involved in dragging, it was broken.  Now we
have a new scheme that gets it working again that properly involves WebCore.

The general idea is that when AK asks us whether to accept the first mouse and do
"delayed window ordering", we must consult WC to see if we might start a drag.  In
addition, instead of these drags in non-active windows being started as a special
case in WK, they go through the normal WK-WC drag machinery.  Finally to work in
frames we have to drill to the deepest hit view in acceptsFirstMouse, because previous
hacks to hitTest make the top-most WebHTMLView field all events for its view tree
(which leads to it fielding all acceptFirstMouse messages too).

        Reviewed by John.

        * WebCoreSupport.subproj/WebBridge.m:
        (-[WebBridge mayStartDragAtEventLocation:]):  Glue change for new arg type.
        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView _startDraggingImage:at:operation:event:sourceIsDHTML:DHTMLWroteData:]):
firstMouseDownEvent ivar is no longer needed.
        (-[WebHTMLView _mayStartDragAtEventLocation:]):  Receives a location instead of a drag
event, since we need to do this work when we have no drag event.  This means the
check of the delay for text dragging is moved down to WebCore.
        (-[WebHTMLView acceptsFirstMouse:]):  Respond based on whether we might do a drag.
This includes drilling to the deepest view the event hits, whereas we used to only
respond considering the topmost WebHTMLView.
        (-[WebHTMLView shouldDelayWindowOrderingForEvent:]):  Ditto.
        (-[WebHTMLView mouseDown:]):  Get rid of special case where some activating
mouseDown events weren't sent to WC.  We need to go through the whole pipeline
now to get a drag started properly.
        (-[WebHTMLView mouseDragged:]):  Ditto, let WC start the drag.
        (-[WebHTMLView mouseUp:]):  firstMouseDownEvent ivar is no longer needed.
        * WebView.subproj/WebHTMLViewInternal.h:
        * WebView.subproj/WebHTMLViewPrivate.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6954 268f45cc-cd09-0410-ab3c-d52691b4dbfc

16 years ago Need to tighten up JS error checking for requesting drag props
trey [Wed, 30 Jun 2004 17:14:58 +0000 (17:14 +0000)]
Need to tighten up JS error checking for requesting drag props
in the wrong cases.

        Reviewed by John.

        * khtml/ecma/kjs_events.cpp:
        (Clipboard::getValueProperty):  Assert if someone somehow set
dropEffect or effectAllowed and it's a copy/paste clipboard
instead of a dragging clipboard.
        (Clipboard::putValue):  Don't let anyone set dropEffect or
effectAllowed on a copy/paste clipboard.
        (ClipboardProtoFunc::tryCall):  Disallow setting dragImage on
a copy/paste clipboard.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6953 268f45cc-cd09-0410-ab3c-d52691b4dbfc

16 years ago DHTML dragging - source should have access to the operation chosen
trey [Tue, 29 Jun 2004 23:37:57 +0000 (23:37 +0000)]
DHTML dragging - source should have access to the operation chosen
by the destination.

        Reviewed by John

        * kwq/KWQKHTMLPart.h:
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::dragSourceEndedAt):  Set the destination's operation
on the clipboard.
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge dragExitedWithDraggingInfo:]):  For completeness
we set the source op for the ondragexit event.
        (-[WebCoreBridge concludeDragForDraggingInfo:]):  Ditto for the
drop event.
        (-[WebCoreBridge dragSourceEndedAt:operation:]):  Pass through of operation.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6952 268f45cc-cd09-0410-ab3c-d52691b4dbfc

16 years agoFix "reviewed by" line.
trey [Fri, 25 Jun 2004 23:49:22 +0000 (23:49 +0000)]
Fix "reviewed by" line.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6951 268f45cc-cd09-0410-ab3c-d52691b4dbfc