18 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

18 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

18 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:
        * khtml/ecma/kjs_binding.h:

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

18 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

18 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

        Reviewed by darin

        * khtml/rendering/render_text.cpp:
        * khtml/rendering/render_text.h:

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

18 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

18 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

18 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

18 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

18 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

18 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/rendering/render_block.h:
        * khtml/rendering/render_line.cpp:
        * khtml/rendering/render_line.h:
        * khtml/rendering/render_text.cpp:
        * khtml/rendering/render_text.h:

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

18 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

18 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

18 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

18 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

18 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

18 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

18 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

18 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

18 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

18 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

18 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:
        * kwq/KWQKHTMLPart.mm:

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

18 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

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

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:
        * 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
        * 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


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

18 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

18 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

18 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

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

18 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

18 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

18 years ago Fixed:
cblu [Mon, 14 Jun 2004 17:58:11 +0000 (17:58 +0000)]
<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

18 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

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

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


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

18 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

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

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


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

18 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

18 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
        * 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

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

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:


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

18 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

18 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

18 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

18 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

18 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

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

        Reviewed by John.

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


        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:


        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

18 years ago Reviewed by Darin
kocienda [Thu, 10 Jun 2004 21:07:20 +0000 (21:07 +0000)]
    Reviewed by Darin

        Fix for this bug:

        <rdar://problem/3654850>: "Style changes do not work across blocks"

        Now, applying styles works across blocks. I did quite a bit
        of internal redsign on the member functions of this class to
        make this work. As a bonus, from an architectural standpoint,
        all style changes are now done "in place". There is no more
        copying of content in order to perform style changes.

        * khtml/editing/htmlediting_impl.cpp:
        * khtml/editing/htmlediting_impl.h:

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

18 years agoWebCore:
darin [Thu, 10 Jun 2004 20:36:25 +0000 (20:36 +0000)]

        Reviewed by Ken.

        - filled out execCommand a lot more
        - fixed <rdar://problem/3685231>: (execCommand italic is not implemented)
        - fixed <rdar://problem/3685232>: (execCommand bold is not implemented)
        - fixed <rdar://problem/3675899>: (Make queryCommandIndeterm work as specified in the Javascript execCommand Compatibility Plan)
        - fixed <rdar://problem/3675901>: (Make queryCommandState work as specified in the Javascript execCommand Compatibility Plan)
        - fixed <rdar://problem/3675904>: (Make queryCommandValue work as specified in the Javascript execCommand Compatibility Plan)

        * khtml/editing/jsediting.cpp:
        (DOM::JSEditor::queryCommandIndeterm): Changed to use KHTMLPart::TriState instead of CommandState.
        (DOM::JSEditor::queryCommandState): Ditto.
        (execStyleChange): Changed to use KHTMLPart::applyStyle.
        (stateStyle): Used KHTMLPart::selectionHasStyle for this.
        (selectionStartHasStyle): Use KHTMLPart::selectionStartHasStyle for this.
        (valueStyle): Used KHTMLPart::selectionStartStylePropertyValue for this.
        (execBold): Implemented toggling, using selectionStartHasStyle.
        (execItalic): Implemented toggling, using selectionStartHasStyle.
        (execPrint): Implemented.
        (enabledRedo): Implemented, using canRedo.
        (enabledUndo): Implemented, using canUndo.
        (stateNone): Renamed from stateNo.
        (valueBackColor): Implemented, using valueStyle.
        (valueFontName): Implemented, using valueStyle.
        (valueFontSize): Implemented, using valueStyle.
        (valueForeColor): Implemented, using valueStyle.
        (valueFontSize): Implemented, using valueStyle.

        * khtml/khtml_part.h: Added editing operations.
        * khtml/khtml_part.cpp:
        (KHTMLPart::copyToPasteboard): Added.
        (KHTMLPart::cutToPasteboard): Added.
        (KHTMLPart::redo): Added.
        (KHTMLPart::undo): Added.
        (KHTMLPart::applyStyle): Added.
        (updateState): Added.
        (KHTMLPart::selectionHasStyle): Added.
        (KHTMLPart::selectionStartHasStyle): Added.
        (KHTMLPart::selectionStartStylePropertyValue): Added.
        (KHTMLPart::selectionComputedStyle): Added.
        (KHTMLPart::print): Added.

        * khtml/ecma/kjs_window.cpp: (WindowFunc::tryCall): Call print() on plain old part, not KWQ(part).

        * kwq/KWQKHTMLPart.h: Removed print(), added _haveUndoRedoOperations.
        * kwq/KWQKHTMLPart.mm:
        (KHTMLPart::print): Moved from KWQKHTMLPart to KHTMLPart.
        (KWQKHTMLPart::registerCommandForUndo): Moved code here from bridge.
        (KWQKHTMLPart::registerCommandForRedo): Moved code here from bridge.
        (KWQKHTMLPart::clearUndoRedoOperations): Moved code here from bridge.
        (KWQKHTMLPart::issueUndoCommand): Moved code here from bridge.
        (KWQKHTMLPart::issueRedoCommand): Moved code here from bridge.
        (KWQKHTMLPart::issuePasteCommand): Moved code here from bridge.
        (KHTMLPart::canUndo): Added.
        (KHTMLPart::canRedo): Added.

        * kwq/WebCoreBridge.h: Added undoManager, removed undo-related methods.
        * kwq/WebCoreBridge.mm: (-[WebCoreBridge applyStyle:]): Changed to call

        * WebCore.pbproj/.cvsignore: Updated for new Xcode files.


        Reviewed by Ken.

        * WebCoreSupport.subproj/WebBridge.m: Removed undo-related methods.
        (-[WebBridge undoManager]): Added.

        * WebKit.pbproj/.cvsignore: Updated for new Xcode files.

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

18 years ago Reviewed by Darin
kocienda [Thu, 10 Jun 2004 16:27:46 +0000 (16:27 +0000)]
    Reviewed by Darin

        Fix for this bug:

        <rdar://problem/3672088>: "Editable WebViews should maintain a selection even when they're not firstResponder"

        Add some code to determine whether a WebHTMLView should maintain an
        inactive selection when the view is not first responder. Traditionally,
        these views have not maintained such selections, clearing them when the
        view was not first responder. However, for appls embedding this view as
        an editing widget, it is desirable to act more like an NSTextView. For
        now, however, the view only acts in this way when the web view is set to
        be editable with -[WebView setEditable:YES]. This will maintain
        traditional behavior for WebKit clients dating back to before this
        change, and will likely be a decent switch for the long term, since
        clients to ste the web view to be editable probably want it to act like
        a "regular" Cocoa view in terms of its selection behavior.

        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView updateTextBackgroundColor]): Add code to tell whether the view is resigning first responder,
        and if it is, use the inactive text background color.
        (-[WebHTMLView maintainsInactiveSelection]): New helper which does checks to see if the new selection
        behavior should be used, or whether we should continue with traditional WebKit behavior.
        (-[WebHTMLView resignFirstResponder]): Call new maintainsInactiveSelection helper. If true,
        do not clear the selection.
        * WebView.subproj/WebHTMLViewInternal.h: Add resigningFirstResponder flag.

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

18 years ago Reviewed by Dave.
mjs [Thu, 10 Jun 2004 05:28:28 +0000 (05:28 +0000)]
    Reviewed by Dave.

<rdar://problem/3671555>: Blot scrolls to the top every time you type

        * khtml/xml/dom_selection.cpp:
        (DOM::Selection::getRepaintRect): If the caret position is invalid, recompute it.

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

18 years ago Fix for 3607091, implement a style that prevents zoom and min font size from taking...
hyatt [Thu, 10 Jun 2004 03:25:39 +0000 (03:25 +0000)]
Fix for 3607091, implement a style that prevents zoom and min font size from taking effect.
The name of the new style is "-apple-text-size-adjust" with values of "none" and "auto."  The default
is "auto."

        Reviewed by mjs

        * khtml/css/cssparser.cpp:
        * khtml/css/cssproperties.c:
        * khtml/css/cssproperties.h:
        * khtml/css/cssproperties.in:
        * khtml/css/cssstyleselector.cpp:
        * khtml/css/cssstyleselector.h:
        * khtml/rendering/render_style.cpp:
        * khtml/rendering/render_style.h:

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

18 years ago Implemented drag destination portion of the new drag & drop API.
cblu [Wed, 9 Jun 2004 23:50:26 +0000 (23:50 +0000)]
Implemented drag destination portion of the new drag & drop API.

        Reviewed by trey.

        * WebView.subproj/WebDefaultUIDelegate.m:
        (-[WebDefaultUIDelegate webView:dragDestinationActionMaskForDraggingInfo:]): new delegate implementation
        (-[WebDefaultUIDelegate webView:willPerformDragDestinationAction:forDraggingInfo:]): ditto
        * WebView.subproj/WebDocumentInternal.h:
        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView draggingUpdatedWithDraggingInfo:actionMask:]): handle the action mask
        (-[WebHTMLView concludeDragForDraggingInfo:actionMask:]): ditto
        * WebView.subproj/WebUIDelegate.h:
        * WebView.subproj/WebUIDelegatePrivate.h:
        * WebView.subproj/WebView.m:
        (-[WebView _dragOperationForDraggingInfo:]): call new delegate methods
        (-[WebView performDragOperation:]): ditto
        * WebView.subproj/WebViewInternal.h:
        * WebView.subproj/WebViewPrivate.h:

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

18 years ago Implement parsing and setting of the text-overflow CSS3 property.
hyatt [Wed, 9 Jun 2004 22:58:15 +0000 (22:58 +0000)]
Implement parsing and setting of the text-overflow CSS3 property.

        Reviewed by kocienda

        * khtml/css/cssparser.cpp:
        * khtml/css/cssproperties.c:
        * khtml/css/cssproperties.h:
        * khtml/css/cssproperties.in:
        * khtml/css/cssstyleselector.cpp:
        * khtml/css/cssvalues.c:
        * khtml/css/cssvalues.h:
        * khtml/css/cssvalues.in:
        * khtml/rendering/render_style.cpp:
        * khtml/rendering/render_style.h:

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

18 years ago Fix for 3678031, implement better flexing for Emerson headers. This involved adding...
hyatt [Wed, 9 Jun 2004 20:19:05 +0000 (20:19 +0000)]
Fix for 3678031, implement better flexing for Emerson headers.  This involved adding support for max-width: intrinsic,
fixing the box layout algorithm to properly deal with max-widths, and implementing support for baseline alignment
so that boxes can be aligned vertically along their interior baselines.

        Reviewed by kocienda

        * khtml/css/cssparser.cpp:
        * khtml/css/cssparser.h:
        * khtml/css/cssproperties.c:
        * khtml/css/cssproperties.h:
        * khtml/css/cssproperties.in:
        * khtml/css/cssstyleselector.cpp:
        * khtml/css/cssvalues.c:
        * khtml/css/cssvalues.h:
        * khtml/css/cssvalues.in:
        * khtml/misc/khtmllayout.h:
        * khtml/rendering/render_block.cpp:
        * khtml/rendering/render_block.h:
        * khtml/rendering/render_box.cpp:
        * khtml/rendering/render_box.h:
        * khtml/rendering/render_flexbox.cpp:
        * khtml/rendering/render_flexbox.h:
        * khtml/rendering/render_image.cpp:
        * khtml/rendering/render_object.h:
        * khtml/rendering/render_style.cpp:
        * khtml/rendering/render_style.h:
        * khtml/rendering/table_layout.cpp:

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

18 years agoWebKit:
rjw [Wed, 9 Jun 2004 19:46:51 +0000 (19:46 +0000)]
        Implemented PDF rendering for the drawImage() function
        in Context2D.  This allows PDF files to be drawn in scaled
        or rotated context without rasterization artifacts.

        The PDF image is currently NOT cached.  Caching can/will be added
        as an optimization.  The hooks are already in place to flush
        the cache as necessary.

        Reviewed by John.

        * WebCoreSupport.subproj/WebImageRenderer.h:
        * WebCoreSupport.subproj/WebImageRenderer.m:
        (-[WebImageRenderer dealloc]):
        (-[WebImageRenderer _needsRasterFlush]):
        (-[WebImageRenderer drawClippedToValidInRect:fromRect:]):
        (-[WebImageRenderer _PDFDocumentRef]):
        (-[WebImageRenderer _PDFDraw]):
        (-[WebImageRenderer _PDFDrawFromRect:toRect:operation:alpha:flipped:]):
        (-[WebImageRenderer MIMEType]):
        (-[WebPDFDocument initWithData:]):
        (-[WebPDFDocument dealloc]):
        (-[WebPDFDocument documentRef]):
        (-[WebPDFDocument mediaBox]):
        (-[WebPDFDocument bounds]):
        (-[WebPDFDocument adjustCTM:]):
        (-[WebPDFDocument setCurrentPage:]):
        (-[WebPDFDocument currentPage]):
        (-[WebPDFDocument pageCount]):

        Added back check for old plugin API.

        * WebView.subproj/WebFrame.m:
        (-[WebFrame _reloadForPluginChanges]):
        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView addSubview:]):
        * WebCoreSupport.subproj/WebBridge.m:
        (-[WebBridge frameRequiredForMIMEType:URL:]):

Added support for drawing un-rasterized transformed PDFs.

        Reviewed by John.

        * khtml/ecma/kjs_html.cpp:

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

18 years ago Reviewed by Ken.
darin [Wed, 9 Jun 2004 17:29:25 +0000 (17:29 +0000)]
    Reviewed by Ken.

        - implemented still more execCommand commands

        * khtml/editing/jsediting.cpp: Added a lot more commands, and reformatted a bit.

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

18 years ago Reviewed by Maciej.
darin [Wed, 9 Jun 2004 06:31:06 +0000 (06:31 +0000)]
    Reviewed by Maciej.

        - implemented a bunch more execCommand commands
        - fixed <rdar://problem/3684792>: (JavaScript execCommand("paste") presents security issues)
        - fixed <rdar://problem/3675898>: (Make queryCommandEnabled work as specified in the Javascript execCommand Compatibility Plan)
        - fixed <rdar://problem/3675903>: (Make queryCommandSupported work as specified in the Javascript execCommand Compatibility Plan)
        - about half of <rdar://problem/3685231>: (execCommand italic is not implemented)
        - about half of <rdar://problem/3685232>: (execCommand bold is not implemented)

        * khtml/editing/jsediting.h: Made constructor inline. Deleted a few unneeded member functions
        that are now just private functions inside jsediting.cpp.

        * khtml/editing/jsediting.cpp:
        (commandImp): Changed this around, so the dictionary is a static local to this function,
        and initialized with C++ "first time initialization" rule.
        (DOM::JSEditor::execCommand): Got rid of special case for 0 for function pointer and added const.
        (DOM::JSEditor::queryCommandEnabled): Ditto.
        (DOM::JSEditor::queryCommandIndeterm): Got rid of special case for 0 for function pointer, added const,
        and use a common three-state state function rather than a separate "indeterm" function.
        (DOM::JSEditor::queryCommandState): Ditto.
        (DOM::JSEditor::queryCommandValue): More of the same.
        (execNotImplemented): Added. Used for unimplemented commands; there are only a few left.
        (execCopy): Renamed.
        (execCut): Renamed.
        (execDelete): Renamed.
        (execInsertText): Renamed.
        (execPaste): Renamed, and disabled.
        (execRedo): Renamed.
        (execSelectAll): Renamed.
        (execUndo): Renamed.
        (execStyleChange): Added. Helper function for commands that are style changes.
        (execBold): Added.
        (execItalic): Added.
        (execJustifyCenter): Added.
        (execJustifyFull): Added.
        (execJustifyLeft): Added.
        (execJustifyRight): Added.
        (execSubscript): Added.
        (execSuperscript): Added.
        (execUnselect): Added.
        (stateNotImplemented): Added. Used for unimplemented state queries; there are a few left.
        (noState): Added.
        (valueNotImplemented): Added. Used for unimplemented value queries; there are a few left.
        (nullStringValue): Added.
        (createCommandDictionary): Changed the initDict function into this function. Added implementations
        for many commands and condensed format so it's easier to work with.

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

18 years ago In DHTML dragging there is no notion of registering for types, so we'd
trey [Wed, 9 Jun 2004 00:55:15 +0000 (00:55 +0000)]
In DHTML dragging there is no notion of registering for types, so we'd
like to just pass all types down to WebCore.  It turns out that the per-type
registration doesn't matter as far as the underlying drag service is
concerned, so Cocoa is already getting called for any type.  We just hack and
override a private method to ensure we accept any type.

        Reviewed by Chris.

        * WebView.subproj/WebView.m:
        (-[WebView _hitTest:dragTypes:]):  We accept any drag type if it is within
our view, without overriding a subview's decision.

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

18 years agoNit build fix for deployment build style.
trey [Wed, 9 Jun 2004 00:37:52 +0000 (00:37 +0000)]
Nit build fix for deployment build style.

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

18 years ago Reviewed by Vicki.
darin [Wed, 9 Jun 2004 00:03:37 +0000 (00:03 +0000)]
    Reviewed by Vicki.

        - our part of fix to <rdar://problem/3629334>: (REGRESSION (Tiger): titles on pop-ups menus are truncated and show ellipses)

        * kwq/KWQComboBox.mm: (QComboBox::QComboBox): Call setLineBreakMode:NSLineBreakByClipping.
        In the current version of Tiger I am using, this is not implemented yet.

        - a couple of other unrelated changes

        * khtml/rendering/render_form.cpp: (RenderTextArea::calcMinMaxWidth): Put a little more code
        inside the APPLE_CHANGES ifdef.
        * kwq/KWQTextEdit.h: Remove unused setTabStopWidth function, and make empty setTextFormat
        function an inline for slightly smaller code size.
        * kwq/KWQTextEdit.mm: Ditto.
        * kwq/KWQTextField.mm: Update copyright date.

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

18 years agoWebCore:
trey [Tue, 8 Jun 2004 22:17:43 +0000 (22:17 +0000)]

A DHTML drag source can now change the dragging image during the drag.  Currently
it may only be set to a static image.

        Reviewed by John

        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::dragSourceMovedTo):  If the ondrag event handler set an image,
pass it to WebKit.
        * kwq/WebCoreBridge.h:


A DHTML drag source can now change the dragging image during the drag.  Currently
it may only be set to a static image.

        Reviewed by John

        * WebCoreSupport.subproj/WebBridge.m:
        (-[WebBridge setDraggingImage:at:]):  Typical bridge glue.
        * WebView.subproj/WebHTMLView.m:
        (FlipImageSpec):  New utility, copied from AppKit.
        (-[WebHTMLView _setDraggingImage:at:]):  Mostly copied from AppKit.  Sets the drag
image using CG API.
        * WebView.subproj/WebHTMLViewPrivate.h:

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

18 years ago Reviewed by Hyatt
kocienda [Tue, 8 Jun 2004 21:53:14 +0000 (21:53 +0000)]
    Reviewed by Hyatt

        Changes to the selection state for these tests as a result of my previous
        checkin. The changes are minor to a couple of offsets. I looked at the
        changes and approve them.

        * layout-tests/editing/deleting/delete-block-contents-001-expected.txt
        * layout-tests/editing/deleting/delete-block-contents-002-expected.txt
        * layout-tests/editing/deleting/delete-block-contents-003-expected.txt

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

18 years ago Fixed: <rdar://problem/3640423>: (REGRESSION: can't paste text copied from web page...
cblu [Tue, 8 Jun 2004 21:50:52 +0000 (21:50 +0000)]
Fixed: <rdar://problem/3640423>: (REGRESSION: can't paste text copied from web page into Excel (due to HTML on the pasteboard?))

        Reviewed by darin.

        * WebView.subproj/WebHTMLView.m:
        (+[WebHTMLView _selectionPasteboardTypes]): don't include NSHTMLPboardType
        (-[WebHTMLView _selectedArchive]): removed markup string parameter
        (_selectionPasteboardTypes::if): don't put NSHTMLPboardType on the pasteboard
        * WebView.subproj/WebHTMLViewPrivate.h:

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

18 years ago Reviewed by Hyatt
kocienda [Tue, 8 Jun 2004 21:49:33 +0000 (21:49 +0000)]
    Reviewed by Hyatt

        Fix for this bug:

        <rdar://problem/3654841>: "Hitting delete key with start of block selected
        does not merge content with preceding block"

        Selections that span blocks now work correctly for deleting the selection and inserting
        over the selection. The largest part of the change is adding a new field to the
        RemoveNodeAndPruneCommand and its impl version. This was done since the starting block
        for a multi-block selection should always be preserved when deleting, and this was
        a convenient way to express this using the code structure already in place.

        * khtml/editing/htmlediting.cpp:
        (khtml::RemoveNodeAndPruneCommand::RemoveNodeAndPruneCommand): Modify this command to
        take two nodes: the node to remove and a node to stop at when pruning back up the tree.
        (khtml::RemoveNodeAndPruneCommand::pruneNode): New accessor, replaces old node() accessor.
        (khtml::RemoveNodeAndPruneCommand::stopNode): New accessor for additional feature described
        * khtml/editing/htmlediting.h:
        * khtml/editing/htmlediting_impl.cpp:
        (khtml::shouldPruneNode): blow flow renderers can now be deleted, but not if they are a
        (khtml::CompositeEditCommandImpl::removeNodeAndPrune): Pass new stopNode param and change the
        name of the existing node argument to pruneNode to distinguish it.
        (khtml::DeleteSelectionCommandImpl::doApply): Pass the block containing the start of the
        selection to removeNodeAndPrune in each case. Also, add one little loop to move all
        the content from the block containing the end of the selection if that block is different
        than the start block.
        (khtml::RemoveNodeAndPruneCommandImpl::RemoveNodeAndPruneCommandImpl): Implement the
        pruneNode/stopNode design already described.
        (khtml::RemoveNodeAndPruneCommandImpl::~RemoveNodeAndPruneCommandImpl): Manage the
        lifecycle of stopNode.
        (khtml::RemoveNodeAndPruneCommandImpl::doApply): Add a check to stop at the stop
        node while pruning.
        * khtml/editing/htmlediting_impl.h:
        (khtml::RemoveNodeAndPruneCommandImpl::pruneNode): New accessor.
        (khtml::RemoveNodeAndPruneCommandImpl::stopNode): Ditto.

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

18 years ago Clipboard access during DHTML dragging is made secure.
trey [Tue, 8 Jun 2004 19:49:29 +0000 (19:49 +0000)]
Clipboard access during DHTML dragging is made secure.

        Reviewed by John.

        * kwq/KWQClipboard.h:
        * kwq/KWQClipboard.mm:
        (KWQClipboard::KWQClipboard):    Init new policy and changeCount members.
        (KWQClipboard::becomeNumb):  Set policy to numb.
        (KWQClipboard::clearData):   Check policy.
        (KWQClipboard::clearAllData):   Check policy.
        (KWQClipboard::getData):   Check policy and changeCount.
        (KWQClipboard::setData):   Check policy.
        (KWQClipboard::types):   Check policy and ChangeCount.
        (KWQClipboard::setDragLocation):   Check policy.
        (KWQClipboard::setDragImage):   Check policy.
        (KWQClipboard::setDropEffect):   Check policy.
        (KWQClipboard::setEffectAllowed):   Check policy.
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::dispatchDragSrcEvent):  Set policy when creating clipboard,
and numb-ify it when we're done.
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge dragOperationForDraggingInfo:]): Set policy when creating clipboard,
and numb-ify it when we're done.
        (-[WebCoreBridge dragExitedWithDraggingInfo:]):  Ditto
        (-[WebCoreBridge concludeDragForDraggingInfo:]):  Ditto

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

18 years ago Reviewed by me
kocienda [Tue, 8 Jun 2004 15:01:28 +0000 (15:01 +0000)]
    Reviewed by me

        * khtml/editing/jsediting.cpp:
        (DOM::EditorCommand::): Stray capital letter in "selectAll" command static
        initializer prevented the command from ever working since the command
        strings are lower-cased when trying to find a match, but not when they
        are inserted into the dictionary. This is a one character change to make
        the string "selectall" in the initializer.

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

18 years ago WebCore will now generate a default drag image when an element serves as a drag
trey [Tue, 8 Jun 2004 07:11:50 +0000 (07:11 +0000)]
WebCore will now generate a default drag image when an element serves as a drag
source.  The basic idea is the image contains the element and all its children.

As for the implementation, instead of adding a new paintAction I added a new
field to the paintInfo struct, "paintingRoot".  If this field is set, painting will
only paint that root's descendants.

Some code also moved from the bridge to the part, to be available within WebCore.

        Reviewed by hyatt.

        * khtml/rendering/render_block.cpp:
        (khtml::RenderBlock::paintObject):  Pass along paintingRoot to kids.
        (khtml::RenderBlock::paintFloats):  Pass along paintingRoot to kids.
        * khtml/rendering/render_box.cpp:
        (RenderBox::paintBoxDecorations):  Test paintingRoot before painting.
        * khtml/rendering/render_canvasimage.cpp:
        (RenderCanvasImage::paint):    Test paintingRoot before painting.
        * khtml/rendering/render_flow.cpp:
        (RenderFlow::paintLineBoxBackgroundBorder):    Test paintingRoot before painting.
        (RenderFlow::paintLineBoxDecorations):    Test paintingRoot before painting.
        * khtml/rendering/render_image.cpp:
        (RenderImage::paint):    Test paintingRoot before painting.
        * khtml/rendering/render_inline.cpp:
        (RenderInline::paint):    Pass along paintingRoot to kids.
        * khtml/rendering/render_layer.cpp:
        (RenderLayer::paint):   Pass along paintingRoot to kids.
        (RenderLayer:: paintLayer):  Pass along paintingRoot to kids.  Test if we are within the
paintingRoot to decide whether to pass the root to our renderer.
        * khtml/rendering/render_layer.h:
        * khtml/rendering/render_object.cpp:
        (RenderObject::hasAncestor):  New utility.
        (RenderObject::absoluteBoundingBoxRect): Helper for paintingRootRect
        (RenderObject::addAbsoluteRectForLayer):  Helper for paintingRootRect
        (RenderObject::paintingRootRect):  Return rect that will be painted if we are
the painting root.
        (RenderObject::draggableNode):  Add test to avoid rare NULL ptr crash.
        * khtml/rendering/render_object.h:
        (khtml::RenderObject::PaintInfo::PaintInfo):  Add paintingRoot field.
        (khtml::RenderObject::paintingRootForChildren):  New utility.  Return the current
paintingRoot, or nil if we are the root (so kids draw normally).
        (khtml::RenderObject::shouldPaintWithinRoot):  New utility.  We can paint if we
are the paintingRoot, or no root is set.
        * khtml/rendering/render_replaced.cpp:
        (RenderReplaced::shouldPaint):  Pass along paintingRoot to kids.
        * khtml/rendering/render_table.cpp:
        (RenderTable::paint):   Pass along paintingRoot to kids.
        * khtml/rendering/render_text.cpp:
        (RenderText::paint):  Test paintingRoot before painting.
        * kwq/KWQKHTMLPart.h:
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::KWQKHTMLPart):  Init new _elementToDraw member.
        (KWQKHTMLPart::paint):  Generalized to handle cases of painting selection or a
given element.
        (KWQKHTMLPart::khtmlMouseMoveEvent):  Make a default image if dragSrc didn't
provide one.
        (KWQKHTMLPart::selectionRect):  Moved from bridge.
        (KWQKHTMLPart::visibleSelectionRect):  Ditto.
        (KWQKHTMLPart::imageFromRect):  Newly factored code, from bridge.
        (KWQKHTMLPart::selectionImage):  Moved from bridge, wrapper around imageFromRect.
        (KWQKHTMLPart::elementImage):  New method, wrapper around imageFromRect.
        * kwq/WebCoreBridge.h:
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge drawRect:withPainter:]):  Just call part to draw.
        (-[WebCoreBridge visibleSelectionRect]):  Guts moved to part.
        (-[WebCoreBridge selectionImage]):  Ditto.

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

18 years ago Reviewed by Chris.
darin [Tue, 8 Jun 2004 00:22:26 +0000 (00:22 +0000)]
    Reviewed by Chris.

        - fixed <rdar://problem/3682821>: (setTimeout fails when additional parameters are used and timeout function is a string)

        * khtml/ecma/kjs_window.cpp: (WindowFunc::tryCall): Ignore excess arguments instead
        of rejecting the argument list for window.scrollBy, scroll, scrollTo, moveBy, moveTo,
        resizeBy, resizeTo, and setTimeout (when the timeout is a string rather than an object).

        - did a refinement of JSEditor to be slightly more efficient, and not have to edit
          both the .cpp file and the .h when adding more implementation

        * khtml/khtml_part.h: Hack so we can get to the docImpl and xmlDocImpl without being a friend.
        * khtml/editing/jsediting.h: Simplified a bit.
        * khtml/editing/jsediting.cpp: Redid to use a table, and simplified a bit.

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

18 years agoadd a release marker for JavaScriptCore-143.2
vicki [Tue, 8 Jun 2004 00:14:15 +0000 (00:14 +0000)]
add a release marker for JavaScriptCore-143.2

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

18 years ago Reviewed by Chris.
darin [Tue, 8 Jun 2004 00:10:30 +0000 (00:10 +0000)]
    Reviewed by Chris.

        - fixed <rdar://problem/3676761>: (REGRESSION: Text Bigger/Smaller commands are always disabled in TOT)

        * WebView.subproj/WebHTMLView.m: Add @interface declaration for WebTextSizing category
        on WebHTMLView. This must have gotten lost somewhere along the way.

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

18 years ago Reviewed by Hyatt
kocienda [Mon, 7 Jun 2004 22:09:58 +0000 (22:09 +0000)]
    Reviewed by Hyatt

        Fix for this bug:

        <rdar://problem/3682354>: "Typing style does not work yet"

        Did the final hook-up of support that has landed in the tree in the
        recent past as part of ongoing style-application work.

        For the most part, this patch modifies the InputNewlineCommandImpl and
        InputTextCommandImpl commands to insert a styling span when there is
        a typing style active.

        * khtml/editing/htmlediting_impl.cpp:
        (khtml::CompositeEditCommandImpl::createTypingStyleElement): Helper
        shared by the two commands modified.
        (khtml::InputNewlineCommandImpl::doApply): Create a styling span if the
        part has a typing style. Maintain a nodeToInsert local variable, which is
        either the break to insert or a styling span containing the break. Also,
        remove some utterly bogus derefs. They are just plain wrong.
        (khtml::InputTextCommandImpl::InputTextCommandImpl): Don't need to keep
        m_insertedTextNode. The composite commands this command uses will keep
        track of that object's lifetime. We do not need to do that here.
        (khtml::InputTextCommandImpl::~InputTextCommandImpl): No longer need
        to deref obsolete m_insertedTextNode.
        (khtml::InputTextCommandImpl::prepareForTextInsertion): Handle the case
        where a styling span needs to be added.
        (khtml::TypingCommandImpl::insertText): Create a new InputTextCommand when
        there is an active typping style.
        * khtml/editing/htmlediting_impl.h: Declare createTypingStyleElement helper.
        Remove m_insertedTextNode from InputTextCommandImpl.
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge applyStyle:]): Swicth on the state of the selection, calling
        setTypingStyle when a caret and ApplyStyleCommand when a range.

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

18 years ago - fixed <rdar://problem/3682489>: (JavaScriptGlue no longer compiles because...
darin [Mon, 7 Jun 2004 21:53:44 +0000 (21:53 +0000)]
    - fixed <rdar://problem/3682489>: (JavaScriptGlue no longer compiles because Interpreter::evaluate parameters changed)

        * kjs/interpreter.h: Added an overload to make JavaScriptGlue compile.
        * kjs/interpreter.cpp: (KJS::Interpreter::evaluate): Implemented the overload.

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

18 years ago Reviewed by Ken.
darin [Mon, 7 Jun 2004 17:56:53 +0000 (17:56 +0000)]
    Reviewed by Ken.

        * khtml/editing/jsediting.h: Elide some unnecessary namespace prefixes.
        * khtml/editing/jsediting.cpp: Make typed constants instead of macros.
        (DOM::JSEditor::commandDict): Elide unnecessary namespace prefix.
        (DOM::JSEditor::execCommand): Remove xxxNotImplemented functions; just return false instead.
        (DOM::JSEditor::queryCommandEnabled): Ditto.
        (DOM::JSEditor::queryCommandIndeterm): Ditto.
        (DOM::JSEditor::queryCommandState): Ditto.
        (DOM::JSEditor::queryCommandSupported): Ditto.
        (DOM::JSEditor::queryCommandValue): Ditto.

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

18 years ago WebKit no longer causes an endless stream of dragexit events to
trey [Mon, 7 Jun 2004 17:56:19 +0000 (17:56 +0000)]
WebKit no longer causes an endless stream of dragexit events to
occur at the DHTML level when hovering over an element that is
not accepting the drag.

        Reviewed by Chris

        * WebView.subproj/WebView.m:
        (-[WebView _dragOperationForDraggingInfo:]):  If the potential target refuses
the item, don't turn around and immediately tell it to cancel the drag, which is
what leads to the exit event happening at the DOM level.  If the target just
refused the drag, it should not have anything it needs to cancel.

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

18 years ago As agreed with Hyatt and Louch, do not post incoming dragging events
trey [Sun, 6 Jun 2004 04:28:57 +0000 (04:28 +0000)]
As agreed with Hyatt and Louch, do not post incoming dragging events
to text nodes.

        Reviewed by Maciej

        * khtml/khtmlview.cpp:
        (KHTMLView::updateDragAndDrop):  For any drag target that is a text node,
use its parent instead.

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

18 years agoWebCore:
trey [Sat, 5 Jun 2004 03:21:30 +0000 (03:21 +0000)]

DHTML dragging uses the Cocoa NSDragOperation on both the source and dest ends.

In addition, I caught a prime gaffe where I had used "dropAllowed" instead of "effectAllowed"
for that particular WinIE property.  That is renamed throughout.

        Reviewed by rjw

        * khtml/ecma/kjs_events.cpp:
        (stringOrUndefined):  New little helper.
        (Clipboard::getValueProperty):  Return Undefined if dropEffect or effectAllowed are not set.
        (Clipboard::putValue):  Rename.
        * khtml/ecma/kjs_events.h:
        (KJS::Clipboard::):  Rename.
        * khtml/ecma/kjs_events.lut.h:
        * khtml/xml/dom2_eventsimpl.h:  Rename.
        * kwq/KWQClipboard.h: Rename, add access to Cocoa drag op.
        * kwq/KWQClipboard.mm:
        (KWQClipboard::dropEffect):   These 4 just moved in the file.
        (cocoaOpFromIEOp):  Convert from an IE operation string to a Cocoa DragOp
        (IEOpFromCocoaOp):  and vice-versa
        (KWQClipboard::sourceOperation):  Return effectAllowed, converted to a NSDragOp
        (KWQClipboard::destinationOperation):  Return dropEffect, converted to a NSDragOp
        (KWQClipboard::setSourceOperation):  Set effectAllowed, using a Cocoa value
        (KWQClipboard::setDestinationOperation):  Set dropEffect, using a Cocoa value
        * kwq/KWQKHTMLPart.h:
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::dispatchDragSrcEvent):  Return the drag op specified by the source element.
        (KWQKHTMLPart::khtmlMouseMoveEvent):  Pass our drag op up to WebKit.
        (KWQKHTMLPart::dragSourceMovedTo):  Pass NULL for new arg.
        (KWQKHTMLPart::dragSourceEndedAt):  Ditto
        * kwq/WebCoreBridge.h:
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge dragOperationForDraggingInfo:]):  Set the incoming dragOp onto the clipboard
so DHTML can access it.  In addition, validate whatever op DHTML returns so we play well
with Cocoa.


DHTML dragging uses the Cocoa NSDragOperation on both the source and dest ends.
Most of the real work is in WebCore.

        Reviewed by rjw

        * WebCoreSupport.subproj/WebBridge.m:
        (-[WebBridge startDraggingImage:at:operation:event:]):  Pass the drag op along.
        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView _startDraggingImage:at:operation:event:]):  Remember drag op from WC.
        (-[WebHTMLView mouseDragged:]):  Pass None for the op (alternate code path that will
be going away).
        (-[WebHTMLView draggingSourceOperationMaskForLocal:]):  Use the WC drag op.
        * WebView.subproj/WebHTMLViewInternal.h:
        * WebView.subproj/WebHTMLViewPrivate.h:

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

18 years ago Add support for auto values in flex transitions. Add support for mapping the back...
hyatt [Fri, 4 Jun 2004 23:27:38 +0000 (23:27 +0000)]
Add support for auto values in flex transitions.  Add support for mapping the back end values to
front end values.  Next it's time to actually try to use this stuff in render_flexbox.

        Reviewed by darin

        * khtml/css/css_valueimpl.cpp:
        * khtml/css/css_valueimpl.h:
        * khtml/css/cssparser.cpp:
        * khtml/css/cssstyleselector.cpp:
        * khtml/rendering/render_style.cpp:
        * khtml/rendering/render_style.h:

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

18 years agochange the JSC version number from 143.1 back to 144u
vicki [Fri, 4 Jun 2004 23:00:30 +0000 (23:00 +0000)]
change the JSC version number from 143.1 back to 144u

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

18 years agorelease marker and version change for JavaScriptCore-143.1
vicki [Fri, 4 Jun 2004 22:47:20 +0000 (22:47 +0000)]
release marker and version change for JavaScriptCore-143.1

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

18 years ago Reviewed by Darin
kdecker [Fri, 4 Jun 2004 22:16:48 +0000 (22:16 +0000)]
    Reviewed by Darin

 - fixed <rdar://problem/3680594>

        * kjs/object.cpp:

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

18 years agochange version number to '144u'. the tree is open.
vicki [Fri, 4 Jun 2004 22:01:59 +0000 (22:01 +0000)]
change version number to '144u'. the tree is open.

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

18 years agoSafari 2.0 (v143) stamp
vicki [Fri, 4 Jun 2004 21:55:13 +0000 (21:55 +0000)]
Safari 2.0 (v143) stamp

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

18 years ago * kjs/testkjs.cpp: (main): Fix build breakage by adding URL and line number...
darin [Fri, 4 Jun 2004 20:19:12 +0000 (20:19 +0000)]
    * kjs/testkjs.cpp: (main): Fix build breakage by adding URL and line number parameters.

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

18 years agoJavaScriptCore:
kdecker [Fri, 4 Jun 2004 18:49:54 +0000 (18:49 +0000)]

        Reviewed by Dave.

        - ObjC bindings do not (yet) pass along sourceurl or line numbers
        - we don't have a way as of yet to accomidate line numbers and urls for dynamic javascript
        - changed the wording of an error message
        - the lexer, parser, and interpreter have been made "sourceURL aware"
        - stored the url into Error

        * bindings/NP_jsobject.cpp:
        * bindings/jni/jni_jsobject.cpp:
        * bindings/objc/WebScriptObject.mm:
        (-[WebScriptObject evaluateWebScript:]):
        * kjs/function.cpp:
        * kjs/function_object.cpp:
        * kjs/internal.cpp:
        * kjs/internal.h:
        * kjs/interpreter.cpp:
        * kjs/interpreter.h:
        * kjs/lexer.cpp:
        * kjs/lexer.h:
        * kjs/nodes.cpp:
        * kjs/nodes.h:
        * kjs/object.cpp:
        * kjs/object.h:


        Reviewed by Dave.

        - kwq/KWQKHTMLPart.mm: addMessagetoConsole places sourceURL in the dictionary
        - khtml/xml/dom_docimpl.cpp: right now, we don't have a way to get a url,
          so we leave this blank
        - khtml/ecma/kjs_window.cpp: still need to get the real line number and sourceURL
        - khtml/ecma/kjs_proxy.cpp: now passing the sourceURL to addMessageToConsole
        - khtml/ecma/kjs_events.cpp: still need to grab an accurate line number and sourceURL

        * khtml/ecma/kjs_events.cpp:
        * khtml/ecma/kjs_proxy.cpp:
        * khtml/ecma/kjs_window.cpp:
        * khtml/xml/dom_docimpl.cpp:
        * kwq/KWQKHTMLPart.h:
        * kwq/KWQKHTMLPart.mm:


        Reviewed by Dave.

        - model is now source url aware
        - refined the ui with custom NSCells that now display error messages,
          line numbers, and source urls
        - increased the row size to 35 pixels to accomimdate for ErrorCells

        * Debug/ErrorCell.h: Added.
        * Debug/ErrorCell.m: Added.
        (-[ErrorCell setURL:]):
        (-[ErrorCell setErrorMessasge:]):
        (-[ErrorCell setLineNumber:]):
        (-[ErrorCell drawInteriorWithFrame:inView:]):
        * Debug/ErrorConsole.nib:
        * Debug/ErrorConsoleController.m:
        (-[ErrorConsoleController init]):
        (-[ErrorConsoleController awakeFromNib]):
        * Debug/ErrorConsoleModel.h:
        * Debug/ErrorConsoleModel.m:
        (-[ErrorConsoleModel tableView:willDisplayCell:forTableColumn:row:]):
        (-[ErrorConsoleModel count]):
        (-[ErrorConsoleModel selectedURL]):
        * WebBrowser.pbproj/project.pbxproj:

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

18 years ago Reviewed by Hyatt
kocienda [Fri, 4 Jun 2004 18:35:45 +0000 (18:35 +0000)]
    Reviewed by Hyatt

        Fix a comical little bug where the style-applying code did not take into
        account deleting content from the start of a block. After the deletion,
        the caret is placed in the node before the deleted content and so
        inserting a styled fragment after the deletion position works great.
        The problem is that if the selectionis at the start of a block, there
        is no "position before the deletion" and the caret is placed in the new
        first child of the block. Inserting the styled content after this
        node is just plain wrong. Now, this case is handled correctly, and the
        styled content is inserted in the proper position.

        * khtml/editing/htmlediting_impl.cpp:

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

18 years ago Reviewed by Hyatt
kocienda [Fri, 4 Jun 2004 18:21:48 +0000 (18:21 +0000)]
    Reviewed by Hyatt

        * khtml/rendering/bidi.cpp:
        (khtml::RenderBlock::layoutInlineChildren): Only add additional line height
        in for root editable elements. This helps to keep layout from deviating too
        much from the intended page layout, but still gives an empty document a line
        in which it can blink the caret.

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

18 years ago Reviewed by Hyatt
kocienda [Fri, 4 Jun 2004 18:17:26 +0000 (18:17 +0000)]
    Reviewed by Hyatt

        Made some progress on this set of related bugs:

        <rdar://problem/3675867>: "Make execCommand work as specified in the Javascript execCommand Compatibility Plan"
        <rdar://problem/3675898>: "Make queryCommandEnabled work as specified in the Javascript execCommand Compatibility Plan"
        <rdar://problem/3675899>: "Make queryCommandIndeterm work as specified in the Javascript execCommand Compatibility Plan"
        <rdar://problem/3675901>: "Make queryCommandState work as specified in the Javascript execCommand Compatibility Plan"
        <rdar://problem/3675903>: "Make queryCommandSupported work as specified in the Javascript execCommand Compatibility Plan"
        <rdar://problem/3675904>: "Make queryCommandValue work as specified in the Javascript execCommand Compatibility Plan"

        I did several things to move the ahead with the plan:

        1. The latter five methods did not appear in the tree at all. Now they do, although

        2. I removed the implementation for these editing methods from dom_docimpl.cpp, and moved
           them out to new js_editing.cpp/js_editing.h files. The remaining code in dom_docimpl.cpp
           is glue to call over to the new JSEditor object defined in the new files.

        3. For a couple of the command implementations in js_editing.cpp, I made a stab at returning sensible values.
           For others, I just return place-holder values. I have added some comments to describe what has been done and
           what still needs to be done.

        * WebCore.pbproj/project.pbxproj:
        * khtml/dom/dom_doc.cpp: Add call-overs for these methods.
        * khtml/dom/dom_doc.h:
        * khtml/ecma/kjs_dom.cpp: Add queryCommandXXX terminology.
        * khtml/ecma/kjs_dom.h:
        * khtml/ecma/kjs_dom.lut.h:
        * khtml/editing/jsediting.cpp: Added. This file implements the guts of editing-related JS methods.
        * khtml/editing/jsediting.h: Added.
        * khtml/xml/dom_docimpl.cpp: Rework JS editing support into glue that calls over into new JSEditor object.
        * khtml/xml/dom_docimpl.h:

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

18 years ago Fixed: <rdar://problem/3674921>: (can't drag an image from Desktop to Blot document)
cblu [Fri, 4 Jun 2004 18:02:19 +0000 (18:02 +0000)]
Fixed: <rdar://problem/3674921>: (can't drag an image from Desktop to Blot document)

        Reviewed by mjs.

        * WebView.subproj/WebDataSource.m:
        (-[WebDataSource _imageElementWithImageResource:]): factored out from _documentFragmentWithImageResource:
        (-[WebDataSource _documentFragmentWithImageResource:]): call _imageElementWithImageResource:
        * WebView.subproj/WebDataSourcePrivate.h:
        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView _imageExistsAtPaths:]): new
        (-[WebHTMLView _documentFragmentWithPaths:]): new
        (-[WebHTMLView _documentFragmentFromPasteboard:allowPlainText:]): handle NSFilenamesPboardType
        (+[WebHTMLView _insertablePasteboardTypes]): include NSFilenamesPboardType
        (-[WebHTMLView _canProcessDragWithDraggingInfo:]): check for NSFilenamesPboardType and check that the files are images

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

18 years ago Fixed crash when attempting to access properties on nil
rjw [Fri, 4 Jun 2004 17:54:29 +0000 (17:54 +0000)]
    Fixed crash when attempting to access properties on nil

        Reviewed by John.

        * bindings/objc/objc_instance.mm:
        * bindings/runtime_object.cpp:
        * bindings/testM.js:
        * bindings/testbindings.mm:
        (-[MyFirstInterface getString]):

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

18 years ago Fixed crasher from last checkin.
rjw [Fri, 4 Jun 2004 16:12:37 +0000 (16:12 +0000)]
    Fixed crasher from last checkin.

        Reviewed by Ken.

        * Plugins.subproj/WebPluginDatabase.m:
        (+[WebPluginDatabase setAdditionalWebPlugInPaths:]):

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

18 years ago Added setCompositeOperation method to Context2D.
rjw [Fri, 4 Jun 2004 01:36:34 +0000 (01:36 +0000)]
Added setCompositeOperation method to Context2D.
Actually pass composite operation to drawPixmap (instead of 1).

        Reviewed by jay lo.

        * khtml/ecma/kjs_html.cpp:
        * khtml/ecma/kjs_html.h:
        * khtml/ecma/kjs_html.lut.h:
        * kwq/KWQPainter.h:
        * kwq/KWQPainter.mm:

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

18 years ago Add SPI to allow setting of plugin load path.
rjw [Fri, 4 Jun 2004 01:01:36 +0000 (01:01 +0000)]
Add SPI to allow setting of plugin load path.

        Reviewed by Hyatt.

        * Plugins.subproj/WebPluginDatabase.h:
        * Plugins.subproj/WebPluginDatabase.m:
        (+[WebPluginDatabase setAdditionalWebPlugInPaths:]):

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

18 years ago Add support for box-flex-group-transition (whew!), a new property that is going...
hyatt [Fri, 4 Jun 2004 00:39:23 +0000 (00:39 +0000)]
Add support for box-flex-group-transition (whew!), a new property that is going to enable some incredibly
complicated flexing layouts in HTML.

This is Stage 1 - wire up the CSS property and make it get parsed into front-end data.  Nobody actually looks
at this data yet.

        Reviewed by darin

        * khtml/css/css_valueimpl.cpp:
        * khtml/css/css_valueimpl.h:
        * khtml/css/cssparser.cpp:
        * khtml/css/cssparser.h:
        * khtml/css/cssproperties.c:
        * khtml/css/cssproperties.h:
        * khtml/css/cssproperties.in:
        * khtml/rendering/render_style.cpp:
        * khtml/rendering/render_style.h:

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

18 years ago Add extra sanity check to Image parameter of drawImage...
rjw [Fri, 4 Jun 2004 00:21:53 +0000 (00:21 +0000)]
Add extra sanity check to Image parameter of drawImage...

        Reviewed by Hyatt.

        * khtml/ecma/kjs_html.cpp:

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

18 years ago Fix for 3673931, negative margins on objects that dodge floats not handled correctly.
hyatt [Thu, 3 Jun 2004 21:36:15 +0000 (21:36 +0000)]
Fix for 3673931, negative margins on objects that dodge floats not handled correctly.

        Reviewed by darin

        * khtml/rendering/render_block.cpp:

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

18 years ago Reviewed by Chris.
darin [Thu, 3 Jun 2004 21:24:45 +0000 (21:24 +0000)]
    Reviewed by Chris.

        - fixed <rdar://problem/3677038>: (Need SPI to get URL of favicon for a site)

        * Misc.subproj/WebIconDatabase.h: Add iconURLForURL: method.
        * Misc.subproj/WebIconDatabase.m: (-[WebIconDatabase iconURLForURL:]): Added.

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

18 years agoRemoved some tabs from the ChangeLog.
darin [Thu, 3 Jun 2004 21:17:56 +0000 (21:17 +0000)]
Removed some tabs from the ChangeLog.

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

18 years ago Reviewed by John
kocienda [Thu, 3 Jun 2004 15:22:34 +0000 (15:22 +0000)]
    Reviewed by John

        Fix for these bugs:

        <rdar://problem/3675806>: "Make API name change for -webViewShouldBeginEditing:inDOMRange:"
        <rdar://problem/3675809>: "Make API name change for -webViewShouldEndEditing:inDOMRange:"

        New names are -webView:shouldBeginEditingInDOMRange: and -webView:shouldEndEditingInDOMRange:,

        * WebView.subproj/WebDefaultEditingDelegate.m:
        (-[WebDefaultEditingDelegate webView:shouldBeginEditingInDOMRange:]):
        (-[WebDefaultEditingDelegate webView:shouldEndEditingInDOMRange:]):
        * WebView.subproj/WebEditingDelegate.h:
        * WebView.subproj/WebView.m:
        (-[WebView _shouldBeginEditingInDOMRange:]):
        (-[WebView _shouldEndEditingInDOMRange:]):

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

18 years ago Reviewed by Hyatt
kocienda [Thu, 3 Jun 2004 14:38:25 +0000 (14:38 +0000)]
    Reviewed by Hyatt

        Fix for layout regression I caused when fixing:

        <rdar://problem/3668619>: "REGRESSION: text placed on pasteboard by WebKit is offset by one character"

        Extra height is added to empty blocks that are editable, so we can click to place
        the caret in them. This extra height was erroneously being added to non-editable
        blocks as a result of my earlier change. After looking at this and doing some
        code review, there are the following changes:

        Change away from "containingBlock" terminology in the NodeImpl class. The
        operation we are doing in NodeImpl is not the same as what is done in CSS
        when it uses the term "containingBlock" so:
            containingBlock changes to enclosingBlockFlowElement, and
            rootEditableBlock changes to rootEditableElement

        The vast majority of changes here are to make these name changes. The other
        significant piece of work, and the fix for the regression, is to change
        bidi.cpp to only include this extra line height if a block is empty
        and is content-editable.

        * khtml/editing/htmlediting_impl.cpp:
        * khtml/rendering/bidi.cpp:
        * khtml/xml/dom_docimpl.cpp:
        * khtml/xml/dom_nodeimpl.cpp:
        * khtml/xml/dom_nodeimpl.h:
        * khtml/xml/dom_position.cpp:
        * khtml/xml/dom_position.h:
        * khtml/xml/dom_selection.cpp:

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

18 years agoOoops, missed one small change from code review in previous checkin.
trey [Thu, 3 Jun 2004 07:01:13 +0000 (07:01 +0000)]
Ooops, missed one small change from code review in previous checkin.

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

18 years ago Added types property to JS clipboard object.
trey [Thu, 3 Jun 2004 06:57:50 +0000 (06:57 +0000)]
Added types property to JS clipboard object.

        Reviewed by Richard.

        * khtml/ecma/kjs_events.cpp:
        (Clipboard::getValueProperty):  Create JS array for strings coming from the clipboard impl.
        * khtml/ecma/kjs_events.h:
        * khtml/ecma/kjs_events.lut.h:
        * kwq/KWQClipboard.mm:
        (MIMETypeFromCocoaType):  New helper routine to map types.
        (KWQClipboard::types):  Implement based on NSPasteboard's types.

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

18 years ago conformsToProtocol:@protocol(WebPlugin) becomes
rjw [Thu, 3 Jun 2004 02:48:21 +0000 (02:48 +0000)]
conformsToProtocol:@protocol(WebPlugin) becomes
respondsToSelector:@selector(webPlugInInitialize) because
protocol was changed to an informal protocol.

        Reviewed by Kevin.

        * WebCoreSupport.subproj/WebBridge.m:
        (-[WebBridge frameRequiredForMIMEType:URL:]):
        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView addSubview:]):

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

18 years ago Corrected typo ID_IMG should have been ID_CANVAS when
rjw [Wed, 2 Jun 2004 23:39:29 +0000 (23:39 +0000)]
Corrected typo ID_IMG should have been ID_CANVAS when
checking for the canvas composite operator.

        Reviewed by Ken.

        * khtml/rendering/render_canvasimage.cpp:

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