WebKit-https.git
17 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

17 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

17 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

17 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

17 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

17 years agoWebKit:
trey [Fri, 25 Jun 2004 22:53:02 +0000 (22:53 +0000)]
WebKit:

Added new utility method.

        Reviewed by John.

        * WebView.subproj/WebFrame.m:
        (-[WebFrame _isDescendantOfFrame:]):   New code.
        * WebView.subproj/WebFramePrivate.h:

WebBrowser:

3562182 - repro Safari crash when altering specific form field

The basic problem was that JS would disable the search field on submit, which prevents
AK from sending a proper endEditing notification, which left the FormCompletionControler
hung out to dry.  We now watch for page transitions, and clear the FormCC then.

Reviewed by John

        * BrowserWebController.h:
        * BrowserWebController.m:
        (-[BrowserWebView dataSourceHasChanged:forFrame:]):  New callback from
LocationChangeHandler, just pass through to FormDelegate.
        (-[FormDelegate controlTextDidBeginEditing:inFrame:]):  Add ASSERT to catch similiar
trouble in the figure.
        (-[FormDelegate controlTextDidEndEditing:inFrame:]):  Ditto.
        (-[FormDelegate controlTextDidChange:inFrame:]):  Ditto
        (-[FormDelegate control:textView:doCommandBySelector:inFrame:]):  Ditto.
        (-[FormDelegate frameHasChanged:]):  Clear state when page transitions out from under us.
        * CompletionController.m:
        (+[CompletionController setCurrentCompletionController:]):  Make the current comp controller a
non-retained reference.  Side pointers like this do not want to keep around objects with pointers
into UI widgetry.
        (-[CompletionController dealloc]):  Clear the current comp controller if we're going away.
        * FormCompletionController.h:
        * FormCompletionController.m:
        (-[FormCompletionController webFrame]):  New getter.
        * LocationChangeHandler.m:  Cleaned up a bunch of silly code due to old rote conversion.
        (-[LocationChangeHandler webView:didStartProvisionalLoadForFrame:]):
        (-[LocationChangeHandler webView:didReceiveServerRedirectForProvisionalLoadForFrame:]):
        (-[LocationChangeHandler webView:didCommitLoadForFrame:]):  Let WebView know of commit.
        (-[LocationChangeHandler webView:didReceiveTitle:forFrame:]):
        (-[LocationChangeHandler webView:didReceiveIcon:forFrame:]):
        (-[LocationChangeHandler webView:didChangeLocationWithinPageForFrame:]):
        (-[LocationChangeHandler webView:willCloseFrame:]):

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

17 years ago 3710422 - REGRESSION: Safari crashes trying to send onbeforecut event at about:...
trey [Fri, 25 Jun 2004 05:20:55 +0000 (05:20 +0000)]
3710422 - REGRESSION: Safari crashes trying to send onbeforecut event at about://blank

Simple fix - don't try to send the event to the body element if we have no body element.

        Reviewed by NOBODY (OOPS!).

        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::dispatchCPPEvent):

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

17 years ago Fixed <rdar://problem/3710313>: CGContext not zeroed when WebImageRenderer is copied
rjw [Fri, 25 Jun 2004 00:28:04 +0000 (00:28 +0000)]
Fixed <rdar://problem/3710313>: CGContext not zeroed when WebImageRenderer is copied
The context ivar of WebImageRenderer wasn't being nil when the object was copied.

        Reviewed by Darin.

        * WebCoreSupport.subproj/WebImageRenderer.m:
        (-[WebImageRenderer copyWithZone:]):
        (-[WebImageRenderer dealloc]):
        (-[WebImageRenderer drawImageInRect:fromRect:compositeOperator:context:]):

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

17 years agoWebKit:
trey [Thu, 24 Jun 2004 22:46:55 +0000 (22:46 +0000)]
WebKit:

3672725 - Assertion failure in URLCompletion code with particular set of bookmarks

Problem was caused by a URL with unescaped unicodes getting into
the Bookmarks file, presumably from import from IE.  We now test
for this case and convert the data on the way in as if it were
user-entered.

        Reviewed by John and Darin.

        * History.subproj/WebHistoryItem.m:
        (-[WebHistoryItem initFromDictionaryRepresentation:]):

WebBrowser:

A little extra timing logging added as part of fixing 3672725.

        Reviewed by John.

        * URLCompletionController.m:
        (+[URLCompletionController _loadDB]):

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

17 years agoHmm, I thought this was working when I checked it in, but now it's not.
trey [Thu, 24 Jun 2004 22:23:30 +0000 (22:23 +0000)]
Hmm, I thought this was working when I checked it in, but now it's not.
So once more with feeling, eliminate the cvs warnings for all *mode*
files within XCode doc wrappers.

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

17 years agoAdded *.mode% to all .cvsignore files in XCode project doc wrappers.
trey [Thu, 24 Jun 2004 20:53:34 +0000 (20:53 +0000)]
Added *.mode% to all .cvsignore files in XCode project doc wrappers.
Then copied the result to all the XCode wrappers that had none.

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

17 years agoWebCore:
trey [Thu, 24 Jun 2004 20:27:42 +0000 (20:27 +0000)]
WebCore:

3704950 drag image in DB ConfigBar has horizontal graphics turd WebCore JavaScript

When we generate a drag image (or a selection image too, for that matter) we
translate the CTM using a CG call.  Later, WebImageRenderer adjusts the pattern
phase based on the CTM of the focused view, which doesn't include our translate.
So we must inform WebKit about the additional phase adjustment.

        Reviewed by Richard

        * kwq/KWQKHTMLPart.mm:  Tell WebKit about the phase adjustment.
        (KWQKHTMLPart::imageFromRect):
        * kwq/WebCoreGraphicsBridge.h:
        * kwq/WebCoreGraphicsBridge.m:
        (-[WebCoreGraphicsBridge setAdditionalPatternPhase:]):  New routine to receive
the phase adjustment.

WebKit:

3704950 drag image in DB ConfigBar has horizontal graphics turd WebCore JavaScript

When we generate a drag image (or a selection image too, for that matter) we
translate the CTM using a CG call.  Later, WebImageRenderer adjusts the pattern
phase based on the CTM of the focused view, which doesn't include our translate.
So we must inform WebKit about the additional phase adjustment.

        Reviewed by Richard

        * WebCoreSupport.subproj/WebGraphicsBridge.h:
        * WebCoreSupport.subproj/WebGraphicsBridge.m:
        (-[WebGraphicsBridge setAdditionalPatternPhase:]):  New trivial setter.
        (-[WebGraphicsBridge additionalPatternPhase]):      ...and getter.
        * WebCoreSupport.subproj/WebImageRenderer.m:
        (-[WebImageRenderer tileInRect:fromPoint:context:]):  Take any additional phase
adjustment into account when setting phase.

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

17 years ago 3679986 - screenX and screenY are flipped and relative to the bottom left of the...
trey [Thu, 24 Jun 2004 20:20:44 +0000 (20:20 +0000)]
3679986 - screenX and screenY are flipped and relative to the bottom left of the WebView, rather than the screen
3699510 - synthesized click events have bogus screen coords

        Reviewed by Darin.

        * khtml/khtmlview.cpp:
        (KHTMLView::dispatchDragEvent):  Generate screen coords for drag events using new func.
        (KHTMLView::dispatchMouseEvent):   Ditto.
        * khtml/khtmlview.h:
        * khtml/xml/dom_nodeimpl.cpp:
        (NodeImpl::dispatchMouseEvent):  Comment tricky semantics.
Calc screen coords in apple-specific way.
        * kwq/KWQKHTMLView.mm:
        (KHTMLView::viewportToGlobal):  Passthrough to window widget.
        * kwq/KWQScrollView.mm:
        * kwq/KWQWindowWidget.h:
        * kwq/KWQWindowWidget.mm:
        (KWQWindowWidget::mapToGlobal):  Call former code factored to new method below.
        (KWQWindowWidget::viewportToGlobal):  New method to convert "viewport" (which for us
really means NSWindow coords) to screen coords.

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

17 years agoWebCore:
trey [Thu, 24 Jun 2004 18:58:43 +0000 (18:58 +0000)]
WebCore:

3693420 - onbeforecut and onbeforepaste need real implementaion

        Reviewed by Chris.

        * kwq/KWQKHTMLPart.h:
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::mayCut):  Dispatch event to DHTML.
        (KWQKHTMLPart::mayCopy):  Ditto
        (KWQKHTMLPart::mayPaste):  Ditto
        (KWQKHTMLPart::tryCut):  No more need to send fake onbefore event
        (KWQKHTMLPart::tryCopy):  Ditto
        (KWQKHTMLPart::tryPaste): Ditto
        * kwq/WebCoreBridge.h:
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge mayDHTMLCut]):  Standard glue
        (-[WebCoreBridge mayDHTMLCopy]):  Ditto
        (-[WebCoreBridge mayDHTMLPaste]):  Ditto

WebKit:

3693420 - onbeforecut and onbeforepaste need real implementaion

        Reviewed by Chris.

        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView validateUserInterfaceItem:]):  Check with WebCore
to see if cut, copy, paste should be enabled.

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

17 years ago Reviewed by John.
darin [Thu, 24 Jun 2004 18:43:57 +0000 (18:43 +0000)]
    Reviewed by John.

        - fixed <rdar://problem/3709385> Find on page doesn't find a string at the very end of the file

        * khtml/misc/khtml_text_operations.cpp: (khtml::findPlainText): Rearrange loop to avoid an early
        exit once we have all the characters we need, but are at the end of the range we are searching.

        - fixed <rdar://problem/3102271>: (text areas have scroll bars even when they don't need them)
        - fixed <rdar://problem/3665430>: (horizontal scroll bar of text area does not show, even when text is wide in "no wrap" mode)

        * kwq/KWQTextArea.mm:
        (-[KWQTextArea _configureTextViewForWordWrapMode]): Added. Helper method that sets up the
        view for a new word wrap mode.
        (-[KWQTextArea _createTextView]): Moved much of the code inside _configureTextViewForWordWrapMode.
        (-[KWQTextArea _frameSizeChanged]): Added. Method shared by setFrame: and initWithFrame: to
        avoid duplicate code that was there before. The old code also had redundant code to update
        the text container size, but NSText handles that automatically.
        (-[KWQTextArea initWithFrame:]): Set wrap to YES by default, which is the key to fixing bug 3665430.
        Call setAutohidesScrollers:YES, which fixes bug 3102271. Also call the new _frameSizeChanged method.
        (-[KWQTextArea setWordWrap:]): Call _configureTextViewForWordWrapMode instead of trying
        to do the work here. The old version did both too little and too much.
        (-[KWQTextArea setFrame:]): Call _frameSizeChanged instead of trying to do the work here.
        The old version did both too little and too much.

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

17 years agoJavaScriptCore:
cblu [Thu, 24 Jun 2004 18:41:06 +0000 (18:41 +0000)]
JavaScriptCore:

Ignore .mode1 files in JavaScriptCore.pbproj

        Reviewed by kocienda.

        * JavaScriptCore.pbproj/.cvsignore:

Tests:

Made TestBindingsPlugin compile again.
Removed TestPlugin from CVS since NetscapeMoviePlugin is a better Netscape plug-in example.

        Reviewed by kocienda.

        * TestBindingsPlugin/TestBindingsPlugin.pbproj/.cvsignore: Added.
        * TestBindingsPlugin/TestBindingsPlugin.pbproj/project.pbxproj:
        * TestBindingsPlugin/main.c:
        (NPP_GetValue):
        (NPP_SetValue):
        * TestPlugin/English.lproj/InfoPlist.strings: Removed.
        * TestPlugin/TestPlugin.pbproj/project.pbxproj: Removed.
        * TestPlugin/main.c: Removed.
        * TestPlugin/npapi.h: Removed.
        * TestPlugin/test_plugin.html: Removed.

WebBrowser:

Ignore .mode1 files in WebBrowser.pbproj

        Reviewed by kocienda.

        * WebBrowser.pbproj/.cvsignore:

WebKitExamples:

Ignore .mode1 and other files in WebKitMoviePlugIn.xcode and NetscapeMoviePlugIn.xcode.

        Reviewed by kocienda.

        * NetscapeMoviePlugIn/NetscapeMoviePlugIn.xcode/.cvsignore: Added.
        * WebKitMoviePlugIn/WebKitMoviePlugIn.xcode/.cvsignore: Added.
        * WebKitMoviePlugIn/WebKitMoviePlugIn.xcode/project.pbxproj: Tiger updated the project

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

17 years ago Darin made this change on my machine; I reviewed it.
sullivan [Thu, 24 Jun 2004 18:22:54 +0000 (18:22 +0000)]
    Darin made this change on my machine; I reviewed it.

        - fixed <rdar://problem/3698333> Find on page doesn't find a particular string
        with a newline in the source

        * khtml/misc/khtml_text_operations.cpp:
        (khtml::TextIterator::handleTextBox):
        Clear m_lastTextNodeEndedWithCollapsedSpace after taking it into account.

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

17 years ago Reviewed by Darin.
sullivan [Thu, 24 Jun 2004 18:22:25 +0000 (18:22 +0000)]
    Reviewed by Darin.

        - fixed <rdar://problem/3706792> 8A161: Choosing text encoding for
        error page opens finder window!?

        * WebView.subproj/WebFrame.m:
        (-[WebFrame _reloadAllowingStaleDataWithOverrideEncoding:]):
        take unreachableURL into account

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

17 years agoWebKit:
rjw [Thu, 24 Jun 2004 00:36:33 +0000 (00:36 +0000)]
WebKit:
Implemented changes for latest npruntime.h.
Made npruntime.h public.

        Reviewed by Chris.

        * Plugins.subproj/WebBaseNetscapePluginView.h:
        * Plugins.subproj/WebBaseNetscapePluginView.m:
        (-[WebBaseNetscapePluginView pluginScriptableObject]):
        (-[WebBaseNetscapePluginView forceRedraw]):
        (-[WebBaseNetscapePluginView getVariable:value:]):
        * Plugins.subproj/WebBaseNetscapePluginViewPrivate.h:
        * Plugins.subproj/WebNetscapePluginPackage.m:
        (-[WebNetscapePluginPackage load]):
        * Plugins.subproj/npapi.h:
        * Plugins.subproj/npapi.m:
        (NPN_GetValue):
        * Plugins.subproj/npfunctions.h:
        * Plugins.subproj/npruntime.h:
        * WebKit.pbproj/project.pbxproj:

WebCore:
Implemented changes for latest npruntime.h.

        Reviewed by Chris.

        * kwq/KWQKHTMLPart.h:
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::KWQKHTMLPart):
        (KWQKHTMLPart::windowScriptNPObject):
        (KWQKHTMLPart::getEmbedInstanceForView):
        * kwq/WebCoreBridge.h:
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge windowScriptObject]):
        (-[WebCoreBridge windowScriptNPObject]):

JavaScriptCore:
Implemented changes for latest npruntime.h.

        Reviewed by Chris.

        * JavaScriptCore.pbproj/project.pbxproj:
        * bindings/NP_jsobject.cpp:
        (listFromVariantArgs):
        (identiferFromNPIdentifier):
        (_NPN_CreateScriptObject):
        (NPN_Call):
        (NPN_Evaluate):
        (NPN_GetProperty):
        (NPN_SetProperty):
        (NPN_RemoveProperty):
        * bindings/NP_jsobject.h:
        * bindings/c/c_class.cpp:
        (CClass::methodsNamed):
        (CClass::fieldNamed):
        * bindings/c/c_instance.cpp:
        (CInstance::invokeMethod):
        * bindings/c/c_utility.cpp:
        (convertNPVariantToValue):
        * bindings/c/c_utility.h:
        * bindings/npruntime.cpp:
        (stringIdentifierEqual):
        (stringIdentifierHash):
        (getStringIdentifierDictionary):
        (intIdentifierEqual):
        (intIdentifierHash):
        (getIntIdentifierDictionary):
        (NPN_GetStringIdentifier):
        (NPN_GetStringIdentifiers):
        (NPN_GetIntIdentifier):
        (NPN_IdentifierIsString):
        (NPN_UTF8FromIdentifier):
        (NPN_VariantToInt32):
        (NPN_VariantToDouble):
        (NPN_SetException):
        * bindings/npruntime.h:
        * bindings/objc/WebScriptObject.mm:
        (+[WebScriptObject _convertValueToObjcValue:KJS::root:Bindings::]):
        * bindings/runtime_object.cpp:
        (RuntimeObjectImp::~RuntimeObjectImp):
        * bindings/runtime_root.cpp:
        (KJS::Bindings::rootForInterpreter):
        * bindings/testbindings.cpp:
        (initializeIdentifiers):
        (logMessage):
        (setDoubleValue):
        (setIntValue):
        (setBooleanValue):

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

17 years ago- bump the version number in TOT to 148u, since I burned 147 for the WWDC demo build
vicki [Thu, 24 Jun 2004 00:23:11 +0000 (00:23 +0000)]
- bump the version number in TOT to 148u, since I burned 147 for the WWDC demo build

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

17 years ago Fixed <rdar://problem/3707162>: accessing embeds[] plug-in interface may crash
rjw [Wed, 23 Jun 2004 00:16:44 +0000 (00:16 +0000)]
Fixed <rdar://problem/3707162>: accessing embeds[] plug-in interface may crash

embedInstance was uninitialized.

        Reviewed by Chris.

        * khtml/html/html_objectimpl.cpp:
        (HTMLEmbedElementImpl::HTMLEmbedElementImpl):

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

17 years ago * English.lproj/StringsNotToBeLocalized.txt: Updated for recent changes.
darin [Mon, 21 Jun 2004 23:50:34 +0000 (23:50 +0000)]
    * English.lproj/StringsNotToBeLocalized.txt: Updated for recent changes.

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

17 years ago Made WebKitErrorDescriptionPlugInCancelledConnection have its own description string
cblu [Mon, 21 Jun 2004 22:13:21 +0000 (22:13 +0000)]
Made WebKitErrorDescriptionPlugInCancelledConnection have its own description string
(Not for software update branch)

        Reviewed by john.

        * English.lproj/Localizable.strings:
        * Misc.subproj/WebKitErrors.m:

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

17 years ago Made WebKitErrorDescriptionPlugInCancelledConnection properly reuse an already local...
cblu [Mon, 21 Jun 2004 22:05:33 +0000 (22:05 +0000)]
Made WebKitErrorDescriptionPlugInCancelledConnection properly reuse an already localized string to avoid loc changes.

        Reviewed by john.

        * ChangeLog:
        * Misc.subproj/WebKitErrors.m:

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

17 years agoWebKit:
cblu [Mon, 21 Jun 2004 21:28:58 +0000 (21:28 +0000)]
WebKit:

Fixed: <rdar://problem/3701269> change in error handling behavior from 10.3.3 to 10.3.4 breaks unreleased Adobe PDF plug-in

        Reviewed by john.

        * Misc.subproj/WebKitErrors.m:
        (registerErrors): register string for WebKitErrorPlugInCancelledConnection
        * Misc.subproj/WebKitErrorsPrivate.h:
        * Plugins.subproj/WebBaseNetscapePluginStream.h:
        * Plugins.subproj/WebBaseNetscapePluginStream.m:
        (-[WebBaseNetscapePluginStream startStreamWithURL:expectedContentLength:lastModifiedDate:MIMEType:]): use renamed WEB_REASON_PLUGIN_CANCELLED constant
        (-[WebBaseNetscapePluginStream destroyStream]): ditto
        * Plugins.subproj/WebNetscapePluginRepresentation.m:
        (-[WebNetscapePluginRepresentation cancelWithReason:]): if the reason is WEB_REASON_PLUGIN_CANCELLED, cancel the load with WebKitErrorPlugInCancelledConnection
        * Plugins.subproj/WebNetscapePluginStream.m:
        (-[WebNetscapePluginStream cancelWithReason:]): ditto

WebBrowser:

Fixed: <rdar://problem/3701269> change in error handling behavior from 10.3.3 to 10.3.4 breaks unreleased Adobe PDF plug-in

        Reviewed by john.

        * LoadProgressMonitor.m:
        * LocationChangeHandler.m: if the error is WebKitErrorPlugInCancelledConnection ignore it
        (-[LocationChangeHandler webView:locationChangeDone:forDataSource:]): ditto

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

17 years agoadd a release marker for WebCore-146.1
vicki [Mon, 21 Jun 2004 17:46:51 +0000 (17:46 +0000)]
add a release marker for WebCore-146.1

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

17 years agoadd release marker for JSC-146.1
vicki [Mon, 21 Jun 2004 17:24:11 +0000 (17:24 +0000)]
add release marker for JSC-146.1

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

17 years ago Fixed <rdar://problem/3702287> Crash returning nil from bound ObjC
rjw [Sat, 19 Jun 2004 01:41:24 +0000 (01:41 +0000)]
Fixed <rdar://problem/3702287> Crash returning nil from bound ObjC

This turned out to be a show stopper for Dashboard.  Accessing a nil
ObjC property from JS caused a crash.  Similar to the problem
3696112 fixed below.

        Reviewed by Trey.

        * bindings/objc/objc_runtime.mm:
        (KJS::Bindings::ObjcField::valueFromInstance):

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

17 years ago 3702053 - DHTML dragging destination can't control the cursor (by setting the drop...
trey [Fri, 18 Jun 2004 23:58:14 +0000 (23:58 +0000)]
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.

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

17 years ago Reviewed by John.
darin [Fri, 18 Jun 2004 23:50:23 +0000 (23:50 +0000)]
    Reviewed by John.

        - re-fixed <rdar://problem/3701893> 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.

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

17 years ago Reviewed by John.
darin [Fri, 18 Jun 2004 23:21:55 +0000 (23:21 +0000)]
    Reviewed by John.

        - fixed <rdar://problem/3701893> 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.

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

17 years ago Reviewed by Darin
sullivan [Fri, 18 Jun 2004 20:57:05 +0000 (20:57 +0000)]
    Reviewed by Darin

        - fixed <rdar://problem/3534851> Pop up windows not showing up within SAP's
        BW Module (changing location.href on new window created by window.open)

        * khtml/khtml_part.cpp:
        (KHTMLPart::scheduleRedirection):
        allow new redirect to win if delay <= current delay, not just <

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

17 years agoset version to 147u
vicki [Thu, 17 Jun 2004 22:46:04 +0000 (22:46 +0000)]
set version to 147u

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

17 years agoSafari-146 stamp
vicki [Thu, 17 Jun 2004 22:39:14 +0000 (22:39 +0000)]
Safari-146 stamp

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

17 years ago Changed private headers to be pubic for npapi.h and npfunctions.h. That
rjw [Thu, 17 Jun 2004 20:18:57 +0000 (20:18 +0000)]
Changed private headers to be pubic for npapi.h and npfunctions.h.  That
API was approved but never marked as public in the project file.  This change does
not make npruntime.h public, which contains the not yet approved changes
for script-ability of netscape plugins.  Unfortunately, that API will not
be public for WWDC.

        Reviewed by Chris.

        * WebKit.pbproj/project.pbxproj:

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

17 years ago Fixed <rdar://problem/3698867> setting the canvas or parent to display:none and...
rjw [Thu, 17 Jun 2004 18:24:46 +0000 (18:24 +0000)]
Fixed <rdar://problem/3698867> 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):

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

17 years ago Fix for 3674601, "Read More..." links should trail articles in Emerson.
hyatt [Thu, 17 Jun 2004 18:09:49 +0000 (18:09 +0000)]
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):

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

17 years agoWebCore:
trey [Thu, 17 Jun 2004 08:30:25 +0000 (08:30 +0000)]
WebCore:

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 .

WebKit:

3698514 - coordinates in ondragstart and ondrag events are wrong

This part fixes the ondrag coords.  I thought Cocoa passed us the mouse location
in draggedImage:movedTo:, but no, it's the position of the dragged image.
WebCore needs the mouse location, so to calc that we must save away the
offset of the mouse relative to the image when we kick off the drag.

        Reviewed by Maciej.

        * Misc.subproj/WebNSViewExtras.h:
        * Misc.subproj/WebNSViewExtras.m:
        (-[NSView _web_dragImage:rect:event:pasteboard:source:offset:]): Add the ability
to return the offset of the cursor wrt to the drag image, since this routine
generates its own drag image and positions it.
        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView _startDraggingImage:at:operation:event:sourceIsDHTML:DHTMLWroteData:]):
Calc the offset of the cursor wrt to the drag image in the myriad of ways
that we kick off the drag.
        (-[WebHTMLView draggedImage:movedTo:]):  Adjust the location by the
offset we save when we kicked off the drag.
        (-[WebHTMLView draggedImage:endedAt:operation:]):  Ditto.
        * WebView.subproj/WebHTMLViewInternal.h:
        * WebView.subproj/WebImageView.m:
        (-[WebImageView mouseDragged:]):  Pass nil for new arg, we don't care.

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

17 years ago- versioning and ChangeLog marker for WebCore-145.1 (WebCore-145 plus the selection...
vicki [Thu, 17 Jun 2004 04:52:31 +0000 (04:52 +0000)]
- versioning and ChangeLog marker for WebCore-145.1 (WebCore-145 plus the selection fix)

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

17 years agoWebCore:
hyatt [Thu, 17 Jun 2004 01:38:30 +0000 (01:38 +0000)]
WebCore:

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:

WebKit:

In order to support truncation in Emerson, enhance pointToOffset so that it needn't include partial
character glyphs (the left half of a glyph).

        Reviewed by mjs

        * WebCoreSupport.subproj/WebTextRenderer.m:
        (-[WebTextRenderer pointToOffset:style:position:reversed:includePartialGlyphs:]):
        (-[WebTextRenderer _ATSU_pointToOffset:style:position:reversed:includePartialGlyphs:]):
        (-[WebTextRenderer _CG_pointToOffset:style:position:reversed:includePartialGlyphs:]):

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

17 years ago Reviewed by John.
mjs [Thu, 17 Jun 2004 01:19:22 +0000 (01:19 +0000)]
    Reviewed by John.

<rdar://problem/3697602> REGRESSION (144.2-TOT) Selection highlight does not draw

        * khtml/rendering/render_canvas.cpp:
        (RenderCanvas::setSelection):

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

17 years ago Fixed <rdar://problem/3696112>: nil from an Objective-C class seems to get wrapped...
rjw [Thu, 17 Jun 2004 00:54:18 +0000 (00:54 +0000)]
Fixed <rdar://problem/3696112>: nil from an Objective-C class seems to get wrapped as a JavaScript proxy that will not print.

This turned out to be a show stopper for Dashboard.  We now
return Undefined() when nil is returned from a ObjC method
that returns an object type.

        Reviewed by Maciej.

        * bindings/objc/objc_utility.mm:
        (KJS::Bindings::convertObjcValueToValue):

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

17 years agochange version number to 146u -- the tree is open
vicki [Wed, 16 Jun 2004 23:46:08 +0000 (23:46 +0000)]
change version number to 146u -- the tree is open

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

17 years agoSafari-145 stamp
vicki [Wed, 16 Jun 2004 23:32:17 +0000 (23:32 +0000)]
Safari-145 stamp

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

17 years ago Reviewed by Darin.
sullivan [Wed, 16 Jun 2004 18:37:40 +0000 (18:37 +0000)]
    Reviewed by Darin.

        - fixed <rdar://problem/3685827> Add standard news feeds from marketing.

        * BookmarksController.m:
        (-[BookmarksController mergeBuiltInBookmarksIfNecessary]):
        Use a different file for Tiger than for Panther; only the Tiger one
        has the news feeds in it.

        * English.lproj/BuiltInBookmarks.plist:
        new file that contains news feeds from marketing

        * English.lproj/OldBuiltInBookmarks.plist:
        Added. New name for old file.

        * WebBookmark.m:
        (-[WebBookmark dictionaryRepresentation]):
        #ifdeffed hack to avoid writing out UUIDs; used for creating built-in bookmarks file

        * WebBookmarkLeaf.m:
        (-[WebBookmarkLeaf dictionaryRepresentation]):
        #ifdeffed hack to avoid writing out last visited time; used for creating built-in bookmarks file

        * WebBookmarkList.m:
        (-[WebBookmarkList dictionaryRepresentation]):
        #ifdeffed hack to avoid writing out proxy bookmarks; used for creating built-in bookmarks file

        * WebBrowser.pbproj/project.pbxproj:
        updated for new file

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

17 years ago - fixed <rdar://problem/3696081> REGRESSION: <WebKit/CarbonUtils.h> doesn...
darin [Wed, 16 Jun 2004 18:18:40 +0000 (18:18 +0000)]
    - fixed <rdar://problem/3696081> REGRESSION: <WebKit/CarbonUtils.h> doesn't build any more

        Reviewed by Trey.

        * Carbon.subproj/CarbonUtils.h: Fixed include. Need to include <ApplicationServices/ApplicationServices.h>
        to get CGImageRef; can't include an individual header.

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

17 years ago Fixed 3695730: Added support for document.embeds[], much like
rjw [Wed, 16 Jun 2004 18:09:53 +0000 (18:09 +0000)]
Fixed 3695730:  Added support for document.embeds[], much like
document.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):

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

17 years ago Reviewed by Dave.
mjs [Wed, 16 Jun 2004 06:29:26 +0000 (06:29 +0000)]
    Reviewed by Dave.

<rdar://problem/3695907>: (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):

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

17 years agoWebKit:
rjw [Wed, 16 Jun 2004 02:12:14 +0000 (02:12 +0000)]
WebKit:
Fixed <rdar://problem/3695875>: Objective-C instances that are exported to JavaScript are too promiscuous

Flip the policy for exposing Objective-C methods and properties.

Reviewed by Trey.

* Plugins.subproj/WebPluginPackage.m:
(+[NSObject isSelectorExcludedFromWebScript:]):  Just return YES.
(+[NSObject isKeyExcludedFromWebScript:]):  Just return YES.

JavaScriptCore:
Fixed <rdar://problem/3695875>: Objective-C instances that are exported to JavaScript are too promiscuous

No longer need to check respondsToSelector: for
isSelectorExcludedFromWebScript: and isKeyExcludedFromWebScript:
because these now have a default implementation on NSObject.

        Reviewed by Trey.

        * bindings/objc/objc_class.mm:
        (ObjcClass::methodsNamed):
        (ObjcClass::fieldNamed):

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

17 years ago 3639321 - Harvard PIN authentication ends up sending PIN as clear text with POST...
trey [Wed, 16 Jun 2004 01:59:26 +0000 (01:59 +0000)]
3639321 - Harvard PIN authentication ends up sending PIN as clear text with POST action

When going back/forward to an item, if we went there originally via a POST,
we ask the user about rePOSTing, and if they say yes, we resend the POST.
This rePOST case is triggered by the form data that we saved on the b/f item.
In the case of this bug, the overall navigation was accomplished by a POST,
then a redirect, causing a GET.  When a load of type redirect achieves the Committed
stage, we replace the current URL in the b/f item with the new URL (instead of
adding a new item to the b/f list).

The bug is that at the same time we should also update the form data in
the b/f item to match that of the new request.  I think this will normally
mean nil'ing it out, unless there's some way for the result of the redirect
to be another POST.

The security leak occurred because we did not clear the form data on the item,
so when going back or forward to the page, we would go into the rePOSTing code,
even though we eventually reached that page via a GET (caused by the redirect).
So we would do a POST to the redirect URL containing the private data sent in
the original POST.

        Reviewed by mjs and rjw.

        * History.subproj/WebHistoryItem.m:
        (-[WebHistoryItem _setFormInfoFromRequest:]):  New method, just wraps 3 old set methods.
        (-[WebHistoryItem formData]):  Diff being dumb, no change.
        (-[WebHistoryItem formContentType]):  Ditto
        (-[WebHistoryItem formReferrer]): Ditto
        * History.subproj/WebHistoryItemPrivate.h:
        * WebView.subproj/WebFrame.m:
        (-[WebFrame _createItem:]):  Call new WebHistoryItem method - no change in real behavior
        (-[WebFrame _transitionToCommitted:]):  Clear out the form data at the key time, to fix the bug.

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

17 years ago Initial impl of the EllipsisBox. This code just gets the box created and gets it...
hyatt [Wed, 16 Jun 2004 01:19:26 +0000 (01:19 +0000)]
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):

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

17 years ago Fixed: <rdar://problem/3695724> WebKit plug-ins should only have to implement plugIn...
cblu [Wed, 16 Jun 2004 00:41:21 +0000 (00:41 +0000)]
Fixed: <rdar://problem/3695724> WebKit plug-ins should only have to implement plugInViewWithArguments:

        Reviewed by rjw.

        * ChangeLog:
        * Plugins.subproj/WebPluginViewFactory.h: mention that plugInViewWithArguments is required
        * WebView.subproj/WebFrame.m:
        (-[WebFrame _reloadForPluginChanges]): check for plugInViewWithArguments: not webPlugInInitialize
        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView addSubview:]): ditto

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

17 years ago Implement canAccommodateEllipsis. The basic idea is that everything on a line will...
hyatt [Wed, 16 Jun 2004 00:00:13 +0000 (00:00 +0000)]
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:

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

17 years ago 3695240 - pasting plain text with newlines in it turns them into spaces
trey [Tue, 15 Jun 2004 22:48:02 +0000 (22:48 +0000)]
3695240 - pasting plain text with newlines in it turns them into spaces

Easy fix, we just need to consume the incoming data as text instead of markup.

        Reviewed by John and Darin.

        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView _documentFragmentFromPasteboard:allowPlainText:]):

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

17 years ago - added a few layout tests, rdar://3694510
vicki [Tue, 15 Jun 2004 18:07:27 +0000 (18:07 +0000)]
- 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.

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

17 years ago Dragging tweak: We pass the mouse down coords instead of the
trey [Tue, 15 Jun 2004 16:15:07 +0000 (16:15 +0000)]
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):

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

17 years ago Reviewed by Darin.
mjs [Tue, 15 Jun 2004 09:44:45 +0000 (09:44 +0000)]
    Reviewed by Darin.

<rdar://problem/3685236>: (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::):

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

17 years ago Reviewed by Darin.
mjs [Tue, 15 Jun 2004 08:49:17 +0000 (08:49 +0000)]
    Reviewed by Darin.

Fix crash with last checkin.

        * khtml/ecma/kjs_binding.cpp:
        (ScriptInterpreter::domObjectsPerDocument): check the same
property we want to initialize.

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

17 years ago - fixed crash introduced by my earlier change
darin [Tue, 15 Jun 2004 08:30:25 +0000 (08:30 +0000)]
    - fixed crash introduced by my earlier change

        * WebCoreSupport.subproj/WebImageRenderer.m:
        (-[WebImageContext dealloc]): Set _cgsContext to 0 before calling super as before.
        (-[WebImageContext finalize]): Ditto.

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

17 years ago Reviewed by Darin.
mjs [Tue, 15 Jun 2004 08:12:00 +0000 (08:12 +0000)]
    Reviewed by Darin.

<rdar://problem/3685309>: (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):

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

17 years ago - rolled out Ken's fix for <rdar://problem/3672377> assertion failure in...
darin [Tue, 15 Jun 2004 08:07:26 +0000 (08:07 +0000)]
    - rolled out Ken's fix for <rdar://problem/3672377> 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.

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

17 years ago Add a truncation variable to text run boxes that will eventually be used to know...
hyatt [Tue, 15 Jun 2004 08:01:43 +0000 (08:01 +0000)]
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):

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

17 years ago Reviewed by Maciej.
darin [Tue, 15 Jun 2004 07:53:28 +0000 (07:53 +0000)]
    Reviewed by Maciej.

        - fixed some things for GC that Patrick missed, or that happened after the branch

        * Carbon.subproj/HIWebView.m:
        (HIWebViewConstructor): Use CFRetain instead of retain.
        (HIWebViewDestructor): Use CFRelease instead of release.
        * Misc.subproj/WebFileDatabase.m:
        (-[WebFileDatabase initWithPath:]): Use release instead of dealloc.
        * WebCoreSupport.subproj/WebImageRenderer.m:
        (-[WebImageContext finalize]): Had [super dealloc] here by mistake; change to [super finalize].
        * WebCoreSupport.subproj/WebTextRenderer.m:
        (-[WebTextRenderer finalize]): Added.
        * WebView.subproj/WebDebugDOMNode.m:
        (-[WebDebugDOMNode initWithWebFrameView:]): Use release instead of dealloc.
        * WebView.subproj/WebRenderNode.m:
        (-[WebRenderNode initWithWebFrameView:]): Use release instead of dealloc.

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

17 years ago Reviewed by Maciej.
darin [Tue, 15 Jun 2004 07:46:22 +0000 (07:46 +0000)]
    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 <rdar://problem/3694163> about the fact that this is not right.
        * kwq/KWQTimer.mm:
        (-[KWQSingleShotTimerTarget finalize]): Added.
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge finalize]): Added. Filed <rdar://problem/3694165> about the fact that this is not right.

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

17 years ago Reviewed by Maciej.
darin [Tue, 15 Jun 2004 07:38:52 +0000 (07:38 +0000)]
    Reviewed by Maciej.

        - fixed some things for GC that Patrick missed, or that happened after the branch

        * bindings/objc/WebScriptObject.mm:
        (-[WebScriptObject dealloc]): Moved removeNativeReference call here from private object.
        (-[WebScriptObject finalize]): Added.

        - added some missing nil checks

        * bindings/objc/objc_instance.mm:
        (ObjcInstance::ObjcInstance): Check for nil.
        (ObjcInstance::~ObjcInstance): Check for nil.
        (ObjcInstance::operator=): Check for nil.

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

17 years agoTypo in src comment.
hyatt [Tue, 15 Jun 2004 07:24:11 +0000 (07:24 +0000)]
Typo in src comment.

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

17 years ago Fix ASSERT/crash we get sometimes when dragging link images. Turns
trey [Tue, 15 Jun 2004 07:23:22 +0000 (07:23 +0000)]
Fix ASSERT/crash we get sometimes when dragging link images.  Turns
out there was an uninitialized variable for the image size,
so at random we would try to create huge images that could not
be focused.

        Reviewed by Maciej and Darin.

        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView _dragImageForLinkElement:]):  Trivial fix to
not use += with uninited variable.

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

17 years ago Initial work on text truncation. Working top-down, I think I've made all the change...
hyatt [Tue, 15 Jun 2004 07:21:23 +0000 (07:21 +0000)]
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:

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

17 years ago 3692690 - REGRESSION: canceling drag from WebView cause link to load
trey [Tue, 15 Jun 2004 07:01:25 +0000 (07:01 +0000)]
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.

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

17 years ago - fixed crash on boot
darin [Tue, 15 Jun 2004 06:48:56 +0000 (06:48 +0000)]
    - fixed crash on boot

        * kwq/KWQFoundationExtras.h: (KWQRetainNSRelease):
        Fixed return value of this method; was uninitialized.

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

17 years ago Dashboard wants access to pastboard data during the drag gesture.
trey [Tue, 15 Jun 2004 06:22:45 +0000 (06:22 +0000)]
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.

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

17 years ago Reviewed by me, code changes by Patrick Beard.
darin [Tue, 15 Jun 2004 05:55:27 +0000 (05:55 +0000)]
    Reviewed by me, code changes by Patrick Beard.

        - fixed <rdar://problem/3671507>: (WebKit should adopt GC changes and compile with GC enabled)

        * WebKit.pbproj/project.pbxproj: Added WebNSObjectExtras.h.
        * Misc.subproj/WebNSObjectExtras.h: Added. Includes WebMakeCollectable, a cover for
        CFMakeCollectable that returns type id, for less casting, and works on Panther as well
        as Tiger. Also declares finalize in NSObject so we can call super without warnings on Panther.

        * Carbon.subproj/CarbonWindowAdapter.m: Fixed header and includes a bit.
        (-[CarbonWindowAdapter finalize]): Added.
        * History.subproj/WebBackForwardList.m:
        (-[WebBackForwardList dealloc]): Got count outside loop.
        (-[WebBackForwardList finalize]): Added.
        * History.subproj/WebHistoryItem.m:
        (-[WebHistoryItem finalize]): Added.
        * Misc.subproj/WebFileDatabase.m:
        (-[WebFileDatabase _createLRUList:]): Use release on Panther, drain on Tiger.
        (+[WebFileDatabase _syncLoop:]): Ditto.
        (-[WebFileDatabase dealloc]): Removed, since we never deallocate objects of this class, and
        the method was untested.
        * Misc.subproj/WebKitErrors.m: (registerErrors): Use release on Panther, drain on Tiger.
        * Misc.subproj/WebKitNSStringExtras.m: (+[NSString _web_encodingForResource:]): Use
        WebMakeCollectable. Also fixed indenting.
        * Misc.subproj/WebNSURLExtras.m:
        (+[NSURL _web_URLWithData:relativeToURL:]): Use WebMakeCollectable.
        (-[NSURL _web_URLWithLowercasedScheme]): Use WebMakeCollectable.
        (-[NSString _web_mapHostNameWithRange:encode:makeString:]): Change code to use CFRelease
        to balance CFURLCreateStringByReplacingPercentEscapes CFString creation, not release.
        * Plugins.subproj/WebBaseNetscapePluginStream.m:
        (-[WebBaseNetscapePluginStream finalize]): Added.
        * Plugins.subproj/WebBaseNetscapePluginView.m:
        (-[WebBaseNetscapePluginView freeAttributeKeysAndValues]): Added. Shared code for dealloc and finalize.
        (-[WebBaseNetscapePluginView dealloc]): Call freeAttributeKeysAndValues.
        (-[WebBaseNetscapePluginView finalize]): Added.
        (-[WebBaseNetscapePluginView requestWithURLCString:]): Changed so that CFString objects are
        released with CFRelease, not release.
        (-[WebBaseNetscapePluginView loadRequest:inTarget:withNotifyData:]): Fixed storage leak in
        error case. Made sure CFString object is released with CFRelease, not release.
        (-[WebBaseNetscapePluginView _postURLNotify:target:len:buf:file:notifyData:allowHeaders:]):
        Another CFString that needed to a CFRelease, not a release.
        (-[WebBaseNetscapePluginView status:]): Ditto.
        * Plugins.subproj/WebBasePluginPackage.m:
        (-[WebBasePluginPackage pathByResolvingSymlinksAndAliasesInPath:]): Changed code to
        CFRelease a CFURLRef, instead of release.
        (-[WebBasePluginPackage finalize]): Added.
        * WebCoreSupport.subproj/WebBridge.m:
        (-[WebBridge fini]): Added. Shared code for dealloc and finalize.
        (-[WebBridge dealloc]): Call fini.
        (-[WebBridge finalize]): Added.
        * WebCoreSupport.subproj/WebGlyphBuffer.m:
        (-[WebGlyphBuffer finalize]): Added.
        * WebCoreSupport.subproj/WebImageRenderer.m:
        (-[WebImageContext initWithBounds:context:]): Use CGContextRetain to avoid cast.
        (-[WebImageContext dealloc]): Tweaked.
        (-[WebImageContext finalize]): Added.
        (-[WebImageRenderer finalize]): Added.
        (-[WebPDFDocument finalize]): Added.
        * WebView.subproj/WebDataProtocol.m:
        (+[NSURL _web_uniqueWebDataURL]): Changed so that CFString object is released with
        CFRelease, not release.
        * WebView.subproj/WebDataSource.m:
        (-[WebDataSourcePrivate dealloc]): Took non-release work out of here.
        (-[WebDataSource dealloc]): Moved it here.
        (-[WebDataSource finalize]): Added.
        (-[WebDataSource isLoading]): Use release on Panther, drain on Tiger.
        * WebView.subproj/WebFrame.m:
        (-[WebFramePrivate dealloc]): Took non-release work out of here.
        (-[WebFrame dealloc]): Moved it here.
        (-[WebFrame finalize]): Added.
        * WebView.subproj/WebFrameView.m:
        (-[WebFrameView finalize]): Added.
        * WebView.subproj/WebHTMLRepresentation.m:
        (-[WebHTMLRepresentation finalize]): Added.
        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLViewPrivate dealloc]): Moved non-release work out of here.
        (-[WebHTMLView dealloc]): Moved it here.
        (-[WebHTMLView finalize]): Added.
        * WebView.subproj/WebImageView.m:
        (-[WebImageView finalize]): Added.
        * WebView.subproj/WebMainResourceClient.m:
        (-[WebMainResourceClient finalize]): Added.
        * WebView.subproj/WebTextView.m:
        (-[WebTextView finalize]): Added.
        * WebView.subproj/WebView.m:
        (-[WebView finalize]): Added.

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

17 years ago Reviewed by me, code changes by Patrick Beard.
darin [Tue, 15 Jun 2004 05:33:44 +0000 (05:33 +0000)]
    Reviewed by me, code changes by Patrick Beard.

        - fixed <rdar://problem/3671507>: (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.

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

17 years ago Reviewed by me, code changes by Patrick Beard.
darin [Tue, 15 Jun 2004 05:17:37 +0000 (05:17 +0000)]
    Reviewed by me, code changes by Patrick Beard.

        - fixed <rdar://problem/3671507>: (WebKit should adopt GC changes and compile with GC enabled)

        * bindings/objc/objc_instance.mm:
        (ObjcInstance::ObjcInstance): Use CFRetain instead of retain.
        (ObjcInstance::~ObjcInstance): Use CFRelease instead of release.
        (ObjcInstance::operator=): More of the same.
        (ObjcInstance::end): Use [pool drain] if compiling on Tiger.

        * bindings/objc/objc_runtime.mm:
        (ObjcArray::ObjcArray): Use CFRetain instead of retain.
        (ObjcArray::~ObjcArray): Use CFRelease instead of release.
        (ObjcArray::operator=): More of the same.

        * bindings/testbindings.mm: Fixed incorrect license.
        (main): Use [pool drain] if compiling on Tiger.

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

17 years ago Reviewed by Trey.
mjs [Tue, 15 Jun 2004 01:21:02 +0000 (01:21 +0000)]
    Reviewed by Trey.

<rdar://problem/3693818>: (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.

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

17 years agoFix reviewer field of previous checkin
trey [Tue, 15 Jun 2004 01:09:18 +0000 (01:09 +0000)]
Fix reviewer field of previous checkin

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

17 years agoFill in reviewer field from previous checkin.
trey [Tue, 15 Jun 2004 01:07:30 +0000 (01:07 +0000)]
Fill in reviewer field from previous checkin.

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

17 years ago Reviewed by Vicki
kocienda [Mon, 14 Jun 2004 22:43:04 +0000 (22:43 +0000)]
    Reviewed by Vicki

        Fix for this bug:

        <rdar://problem/3690115> 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.

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

17 years ago Two tweaks to recently added "drag" pseudo-class, as suggested by
trey [Mon, 14 Jun 2004 21:43:32 +0000 (21:43 +0000)]
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):

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

17 years ago Reviewed by Darin
kocienda [Mon, 14 Jun 2004 21:33:11 +0000 (21:33 +0000)]
    Reviewed by Darin

        Fix for this bug:

        <rdar://problem/3693202> WebView.h header unnecessarily lists NSResponder methods it overrides

        * WebView.subproj/WebView.h: NSResponder overrides now gathered in a comment section.

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

17 years agoWebCore:
trey [Mon, 14 Jun 2004 20:58:21 +0000 (20:58 +0000)]
WebCore:

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 NOBODY (OOPS!).

        * 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

WebKit:

Support for DHTML cut/copy/paste.

        Reviewed by NOBODY (OOPS!).

        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView copy:]):  Give DHTML first crack at executing the command.
        (-[WebHTMLView cut:]):  Ditto
        (-[WebHTMLView paste:]):  Ditto

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

17 years ago Fixed: <rdar://problem/3674456> make new drag & drop API compatible with DHTML dragging
cblu [Mon, 14 Jun 2004 18:50:39 +0000 (18:50 +0000)]
Fixed: <rdar://problem/3674456> make new drag & drop API compatible with DHTML dragging

        Reviewed by trey.

        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView concludeDragForDraggingInfo:actionMask:]): tweak
        * WebView.subproj/WebUIDelegate.h: removed old, added new methods
        * WebView.subproj/WebUIDelegatePrivate.h: moved new methods to public header
        * WebView.subproj/WebView.h: removed old, added new methods
        * WebView.subproj/WebView.m: moved methods around
        (-[WebView moveDragCaretToPoint:]): moved
        (-[WebView removeDragCaret]): moved
        (-[WebView _bridgeAtPoint:]): moved
        (-[WebView editableDOMRangeForPoint:]): moved
        * WebView.subproj/WebViewInternal.h: add new internal method
        * WebView.subproj/WebViewPrivate.h: moved new methods to public header

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

17 years ago Use a different hack, as recommended by Kristin, to force the drag
trey [Mon, 14 Jun 2004 18:47:39 +0000 (18:47 +0000)]
Use a different hack, as recommended by Kristin, to force the drag
manager to exit a modal event wait it is in.  The hack is required
to update the drag image on the fly.  Instead of posting a CG
event we post at the AppKit level.

        Reviewed by Louch

        * WebCoreSupport.subproj/WebGraphicsBridge.m:
        (-[WebGraphicsBridge setDraggingImage:at:]):

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

17 years ago A new CSS pseudo-class ".drag" is added. Analogous to the "hover" class,
trey [Mon, 14 Jun 2004 18:26:33 +0000 (18:26 +0000)]
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.

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

17 years ago Reviewed by me
kocienda [Mon, 14 Jun 2004 17:59:46 +0000 (17:59 +0000)]
    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.

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

17 years ago Reviewed by me
kocienda [Mon, 14 Jun 2004 17:58:18 +0000 (17:58 +0000)]
    Reviewed by me

        Regarding the bug below, removing some tests since we have removed the execCommand("paste")
        feature, at least for now.

        <rdar://problem/3684792>: (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.

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

17 years ago Fixed:
cblu [Mon, 14 Jun 2004 17:58:11 +0000 (17:58 +0000)]
Fixed:
<rdar://problem/3692668> REGRESSION: delay when images and links
<rdar://problem/3692675> links should drag when dragging images that are links when drag source action is WebDragSourceActionLink

        Reviewed by trey.

        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView _mayStartDragWithMouseDragged:]): cleaned up, only use selection delay for selections, allow links to be dragged when image dragging is disabled

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

17 years ago Reviewed by Darin
kocienda [Mon, 14 Jun 2004 17:50:46 +0000 (17:50 +0000)]
    Reviewed by Darin

        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

        * 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().

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

17 years agoWebCore:
trey [Mon, 14 Jun 2004 17:00:05 +0000 (17:00 +0000)]
WebCore:

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

WebKit:

Small rearrangement to support dynamic changing of the drag
image during DHTML dragging.

        Reviewed by John

        * WebCoreSupport.subproj/WebBridge.m:  Bridge glue moved to WebGraphicsBridge.
        * WebCoreSupport.subproj/WebGraphicsBridge.m:
        (FlipImageSpec):  Code moved from WebHTMLView.m.
        (-[WebGraphicsBridge setDraggingImage:at:]):  Ditto.  Plus, we've added a gross
event posting hack to force CG drag manager to update the display when we set
the drag image.
        * WebView.subproj/WebHTMLView.m:  Code moved to WebGraphicsBridge.
        * WebView.subproj/WebHTMLViewPrivate.h:

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

17 years agofix the release markers in the ChangeLogs, which said '144' instead of 'Safari-144...
vicki [Sun, 13 Jun 2004 05:38:01 +0000 (05:38 +0000)]
fix the release markers in the ChangeLogs, which said '144' instead of 'Safari-144' (oops)

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

17 years agoWebCore:
cblu [Sat, 12 Jun 2004 01:04:58 +0000 (01:04 +0000)]
WebCore:

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

WebKit:

Implemented the remainder of the drag & drop API.

        Reviewed by trey.

        * Misc.subproj/WebNSPasteboardExtras.h:
        * Misc.subproj/WebNSPasteboardExtras.m:
        (-[NSPasteboard _web_declareAndWriteDragImage:URL:title:archive:source:]): new
        * Misc.subproj/WebNSViewExtras.h:
        * Misc.subproj/WebNSViewExtras.m:
        (-[NSView _web_dragImage:rect:event:pasteboard:source:]): simplified, this method now just creates a drag image and starts the drag
        * WebCoreSupport.subproj/WebBridge.m:
        (-[WebBridge allowDHTMLDrag:UADrag:]): now calls _delegateDragSourceActionMask on WebHTMLView to interact with the delegate
        * WebView.subproj/WebDefaultUIDelegate.m:
        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView _startDraggingImage:at:operation:event:sourceIsDHTML:DHTMLWroteData:]): call new delegate method, cleaned-up a little
        (-[WebHTMLView draggingUpdatedWithDraggingInfo:actionMask:]): call drag caret methods on WebView instead of WebBridge so WebView can make sure only 1 HTML view has a drag cursor
        (-[WebHTMLView draggingCancelledWithDraggingInfo:]): ditto
        (-[WebHTMLView concludeDragForDraggingInfo:actionMask:]): ditto
        (-[WebHTMLView _delegateDragSourceActionMask]): new, gets drag source action mask from delegate
        * WebView.subproj/WebHTMLViewInternal.h:
        * WebView.subproj/WebImageView.h:
        * WebView.subproj/WebImageView.m:
        (-[WebImageView mouseDown:]): get the drag source action mask from the delegate
        (-[WebImageView mouseDragged:]): inform the delegate of the drag
        * WebView.subproj/WebView.m:
        (-[WebViewPrivate dealloc]): assert that dragCursorBridge is nil
        (-[WebView _close]): release dragCursorBridge
        (-[WebView _bridgeAtPoint:]): new
        (-[WebView editableDOMRangeForPoint:]): new API
        (-[WebView moveDragCaretToPoint:]): new API
        (-[WebView removeDragCaret]): new API
        (-[WebView _frameViewAtWindowPoint:]): moved so this can be called internally
        * WebView.subproj/WebViewInternal.h:
        * WebView.subproj/WebViewPrivate.h:

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

17 years ago Reviewed by Dave.
darin [Fri, 11 Jun 2004 21:01:53 +0000 (21:01 +0000)]
    Reviewed by Dave.

        - fixed <rdar://problem/3645846>: (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.

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

17 years ago Reviewed by Hyatt
kocienda [Fri, 11 Jun 2004 19:37:49 +0000 (19:37 +0000)]
    Reviewed by Hyatt

        Fix for this bug:

        <rdar://problem/3659587>: "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:

        <rdar://problem/3654864>: "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.

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

17 years agoWebCore:
trey [Fri, 11 Jun 2004 19:21:33 +0000 (19:21 +0000)]
WebCore:

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:

WebKit:

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.

        * Misc.subproj/WebNSViewExtras.h:
        * Misc.subproj/WebNSViewExtras.m:
        (-[NSView _web_dragImage:archive:rect:URL:title:event:dragImage:dragLocation:writePasteboard:]):
New args to allow WebCore override of dragImage and pasteboard data.
        * WebCoreSupport.subproj/WebBridge.m:
        (-[WebBridge allowDHTMLDrag:UADrag:]):  New method to return the drag action info to WC.
        (-[WebBridge startDraggingImage:at:operation:event:sourceIsDHTML:DHTMLWroteData:]):
Pass along new args.
        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView _startDraggingImage:at:operation:event:sourceIsDHTML:DHTMLWroteData:]):
Allow WebCore to override drag image and pasteboard data for any type of drag.
        (-[WebHTMLView mouseDragged:]):  Pass NO for new args.
        * WebView.subproj/WebHTMLViewPrivate.h:
        * WebView.subproj/WebImageView.m:
        (-[WebImageView mouseDragged:]):  Pass NO/nil for new args.

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

17 years ago Reviewed by Dave.
sullivan [Fri, 11 Jun 2004 19:07:28 +0000 (19:07 +0000)]
    Reviewed by Dave.

        - fixed <rdar://problem/3688971>: (on dual-800 tower, url field animation
        doesn't work half the time)

        * BrowserWindowController.m:
        (-[BrowserWindowController installRSSTransitionImageView]):
        Set the window's first responder to nil before hiding the webview if the
        focus had been in the webview. It's not clear why the behavior on one
        machine was different than others, but this fix is sensible and definitely
        fixes the problem on Jess's machine.

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

17 years ago Reviewed by Trey
kocienda [Fri, 11 Jun 2004 18:33:50 +0000 (18:33 +0000)]
    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.

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

17 years ago Reviewed by Darin
kocienda [Fri, 11 Jun 2004 18:06:35 +0000 (18:06 +0000)]
    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.

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

17 years agoset version number to 145u; the tree is open
vicki [Fri, 11 Jun 2004 00:08:34 +0000 (00:08 +0000)]
set version number to 145u; the tree is open

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

17 years agoSafari-144 stamp
vicki [Fri, 11 Jun 2004 00:00:35 +0000 (00:00 +0000)]
Safari-144 stamp

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

17 years agoJavaScriptCore:
kdecker [Thu, 10 Jun 2004 21:19:45 +0000 (21:19 +0000)]
JavaScriptCore:

        Reviewed by John.

        * kjs/lexer.cpp:
        (Lexer::setCode):
            - fixed <rdar://problem/3682398>: (error console line numbers are offset by 1)
        * kjs/lexer.h:
        (KJS::Lexer::lineNo):
            - fixed <rdar://problem/3682398>: (error console line numbers are offset by 1)

WebKit:

        Reviewed by John.

        * WebView.subproj/WebResource.m:
        (-[WebResource description]):
            -added per request of cblu
        (-[WebResource _response]):
            -added this method to the header
        (-[WebResource _stringValue]):
            - gives the string value of the NSData representation
        * WebView.subproj/WebResourcePrivate.h:

WebBrowser:

        Reviewed by John.

        * BrowserDocumentController.h:
        * BrowserDocumentController.m:
          -added support to open an HTMLSourceDocument powered by a WebResource
        (-[BrowserDocumentController openHTMLSourceDocumentWithResource:]):
        * Debug/DebugUtilities.m:
        (-[BrowserDocument showJavaScriptConsole:]):
        * Debug/ErrorCell.m:
            - doesn't display "Line:" if a line number is not present
            - magic numbers are now #define'd
        (-[ErrorCell drawInteriorWithFrame:inView:]):
        * Debug/ErrorConsoleController.h:
        * Debug/ErrorConsoleController.m:
        (-[ErrorConsoleController init]):
        (-[ErrorConsoleController awakeFromNib]):
            - properly set the model's table view here, instead of init
        (-[ErrorConsoleController clear:]):
            - removes errors from the model
        (-[ErrorConsoleController findResourceInWebFrame:forURL:]):
            - fixes <rdar://problem/3682337>: (safari error console does not open the correct source document when an error is double-clicked)
        (-[ErrorConsoleController findResourceInDocument:forURL:]):
            - fixes <rdar://problem/3682337>: (safari error console does not open the correct source document when an error is double-clicked)
        (-[ErrorConsoleController findResourceInURL:]):
            - fixes <rdar://problem/3682337>: (safari error console does not open the correct source document when an error is double-clicked)
        (-[ErrorConsoleController showPageSourceWindow:]):
            - fixes <rdar://problem/3682337>: (safari error console does not open the correct source document when an error is double-clicked)
        * Debug/ErrorConsoleModel.h:
        * Debug/ErrorConsoleModel.m:
        (-[ErrorConsoleModel setTable:]):
        (-[ErrorConsoleModel selectedURL]):
        (-[ErrorConsoleModel selectedLineNumber]):
        * HTMLSourceController.h:
        * HTMLSourceController.m:
        (-[HTMLSourceController selectLineAtIndex:]):
        (-[HTMLSourceController textView]):
        (-[HTMLSourceController rangeForLine:]):
            - fixes rdr://problem/3682360 (error console should highlight/select offending code when viewing error source)
        * HTMLSourceDocument.h:
        * HTMLSourceDocument.m:
        (-[HTMLSourceDocument initWithResource:]):
        (-[HTMLSourceDocument makeWindowControllers]):
        (-[HTMLSourceDocument displayName]):
            - now WebResource aware
        (-[HTMLSourceDocument resource]):
        (-[HTMLSourceDocument setResource:]):
        * WebBrowser.pbproj/project.pbxproj:

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