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

18 years ago Correctly size the <CANVAS> if margins, borders, or
rjw [Wed, 2 Jun 2004 23:24:02 +0000 (23:24 +0000)]
Correctly size the <CANVAS> if margins, borders, or
padding is added.

        Reviewed by Trey.

        * khtml/rendering/render_canvasimage.cpp:

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

18 years agoWebCore:
trey [Wed, 2 Jun 2004 21:12:07 +0000 (21:12 +0000)]

First cut at the source side of DHTML dragging.  Following IE, new events are added:
ondragstart, ondrag, ondragend.  The recently added CSS property -khtml-user-drag can
be used to make an element draggable.  event.dataTransfer.setDragImage(ImageObject,x,y)
can be used from ondragstart to set a static image for the dragImage.  x,y is the location
of the mouse within the image from the upper right corner.  clipboard methods setdata
and cleardata are implemented.

        Reviewed by hyatt.

        * 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:
        (DOMMouseEvent::getValueProperty):  Return undefined for clipboard when its not a drag event.
        (ClipboardProtoFunc::tryCall):  setDragImage glue to clipboard routine.
        * khtml/ecma/kjs_events.h:
        * khtml/ecma/kjs_events.lut.h:
        * khtml/html/html_elementimpl.cpp:
        (HTMLElementImpl::parseHTMLAttribute):  Boilerplate for new events
        * khtml/khtml_part.cpp:
        (KHTMLPart::shouldDragAutoNode):  Empty impl of new method, where UA determines
draggability for events with -khtml-user-drag=auto
        * khtml/khtml_part.h:
        * khtml/misc/htmlattrs.c:
        * khtml/misc/htmlattrs.h:
        * khtml/misc/htmlattrs.in:  Boilerplate for new events
        * khtml/rendering/render_object.cpp:
        (RenderObject::draggableNode):  Find the node or parent node which might be dragged.
        * khtml/rendering/render_object.h:
        * khtml/xml/dom2_eventsimpl.cpp:
        (EventImpl::typeToId):  Boilerplate for new events
        (EventImpl::idToType):  Boilerplate for new events
        * khtml/xml/dom2_eventsimpl.h:
        (DOM::EventImpl::):  Boilerplate for new events
        * kwq/KWQClipboard.h:
        * kwq/KWQClipboard.mm:
        (KWQClipboard::clearData):  Implemented to call NSPasteboard
        (KWQClipboard::clearAllData): ditto
        (KWQClipboard::getData):  fix corner case that came up testing
        (KWQClipboard::setData):  Implemented to call NSPasteboard
        (KWQClipboard::dragLocation):  Simple setter/getters
        * kwq/KWQKHTMLPart.h:
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::KWQKHTMLPart): init new member var
        (KWQKHTMLPart::dragHysteresisExceeded):  Hysteresis moved here from WebKit
        (KWQKHTMLPart::dispatchDragSrcEvent):  Send a dragging event to the current dragSource
        (KWQKHTMLPart::khtmlMouseMoveEvent):  Initiate dragging, now including consulting DHTML,
hysteresis and sending ondragstart.
        (KWQKHTMLPart::dragSourceMovedTo):  simple passthrough
        (KWQKHTMLPart::dragSourceEndedAt):  simple passthrough
        (KWQKHTMLPart::mouseDown):  salt away _mouseDownX, _mouseDownY
        (KWQKHTMLPart::shouldDragAutoNode):  Called for -khtml-user-drag=auto.  We just call
out to WebKit.
        * kwq/WebCoreBridge.h:
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge dragSourceMovedTo:]):  New glue to drive new dragging events.
        (-[WebCoreBridge dragSourceEndedAt:operation:]):


First cut at source side of DHTML dragging.  Most of the work is in WebCore.

        Reviewed by hyatt.

        * WebCoreSupport.subproj/WebBridge.m:
        (-[WebBridge startDraggingImage:at:event:]):  Added image and loc args for
when WC tells WK to start a drag.
        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView _startDraggingImage:at:event:]):  New image and loc args coming
from WebCore.  Hysteresis is moved to WC.
        (-[WebHTMLView mouseDragged:]):  Call new _startDragging method.
        (-[WebHTMLView draggedImage:movedTo:]):  Pass event to WC.
        (-[WebHTMLView draggedImage:endedAt:operation:]):  Pass event to WC.
        (-[WebHTMLView mouseUp:]):  Reset firstMouseDownEvent.  Fixes bug where
we would occasionally short-circuit WC event handling due to aliasing
problem with this event.
        * WebView.subproj/WebHTMLViewPrivate.h:

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

18 years agoWebKit:
darin [Wed, 2 Jun 2004 20:45:59 +0000 (20:45 +0000)]

        Reviewed by John.

        - fixed problem with timing of delegate callbacks in the back/forward cache case

        * WebView.subproj/WebFrame.m:
        (-[WebFrame _transitionToCommitted:]): Move code to indicate page is done loading in the
        back/forward cache case from here ...
        (-[WebFrame _opened]): ... to here.


        Reviewed by John.

        - removed workaround for bad timing of delegate callbacks in the back/forward cache case

        * BrowserWindowController.m: (-[BrowserWindowController webFrameLoadFinished:]):
        Removed delays that had been added to work around bad ordering of delegate callbacks
        in the back/forward cache case. The bug is now fixed in WebKit.
        * LocationChangeHandler.m: (-[LocationChangeHandler webView:locationChangeDone:forDataSource:]):
        More of the same.

        * AppController.m: (-[AppController safariSyndication]): Changed to use objc_getClass
        because I can't leave well-enough alone.

        * DownloadProgressEntry.m: (BOMCopierNew): Changed () to (void) in one place where it means
        "no parameters" rather than "unknown number of parameters".

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

18 years ago Reviewed by me
kocienda [Wed, 2 Jun 2004 14:42:57 +0000 (14:42 +0000)]
    Reviewed by me

        Finish off name change from previous check-in by changing dom_edititerator
        file names to dom_positioniterator. Files copied and renamed in repository.
        Includes updated as needed.

        * ForwardingHeaders/xml/dom_edititerator.h: Removed.
        * ForwardingHeaders/xml/dom_positioniterator.h: Added.
        * WebCore.pbproj/project.pbxproj:
        * khtml/editing/htmlediting_impl.cpp:
        * khtml/xml/dom_edititerator.cpp: Removed.
        * khtml/xml/dom_edititerator.h: Removed.
        * khtml/xml/dom_position.cpp:
        * khtml/xml/dom_positioniterator.cpp: Added.
        * khtml/xml/dom_positioniterator.h: Added.
        * khtml/xml/dom_selection.cpp:

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

18 years ago Reviewed by Darin
kocienda [Wed, 2 Jun 2004 14:30:49 +0000 (14:30 +0000)]
    Reviewed by Darin

        Probable fix for this bug:

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

        I could not reproduce the bug myself, which is why I call the fix
        as probable.

        Darin and I did some code inspection and found some problems
        with the equivalentUpstreamPosition and
        equivalentDownstreamPosition functions on DOM::Position and how
        these functions dealt with changing from editable to
        non-editable content. As a result of these discoveries, I went
        over this code and the helpers and functions which support them,
        and made some corrections and simplifications. The big changes
        are as follows:

        1. Rename EditIterator class to PositionIterator. This class needs
        to run code for selections in non-editable content, so the name
        change is appropriate.

        2. Change containingEditableBlock to containingBlock. It turns out
        that none of the editing code relies on the distinction between
        editable blocks and non-editable blocks. The important distinction
        is the block boundary. The notion of rootEditableBlock remains.

        * khtml/editing/htmlediting_impl.cpp:
        (khtml::DeleteCollapsibleWhitespaceCommandImpl::deleteWhitespace): PositionIterator name change.
        (khtml::DeleteSelectionCommandImpl::joinTextNodesWithSameStyle): Ditto.
        (khtml::DeleteSelectionCommandImpl::containsOnlyWhitespace): Ditto.
        (khtml::DeleteSelectionCommandImpl::doApply): Ditto.
        (khtml::InputNewlineCommandImpl::doApply): Ditto.
        (khtml::RemoveNodeAndPruneCommandImpl::doApply): Ditto.
        * khtml/rendering/bidi.cpp:
        (khtml::RenderBlock::layoutInlineChildren): Ditto.
        * khtml/xml/dom_edititerator.cpp:
        (DOM::PositionIterator::peekPrevious): Call for previousLeafNode instead of previousEditable.
        Editable check is not appropriate as this class is used for non-editable content.
        (DOM::PositionIterator::peekNext): Call nextLeafNode instead of nextEditable, as above.
        (DOM::PositionIterator::atStart): Call for previousLeafNode instead of previousEditable, as above.
        (DOM::PositionIterator::atEnd): Call nextLeafNode instead of nextEditable, as above.
        * khtml/xml/dom_edititerator.h:
        (DOM::PositionIterator::PositionIterator): PositionIterator name change. Remove unused and unneeded constructors.
        * khtml/xml/dom_nodeimpl.cpp:
        (NodeImpl::previousEditable): Simplify. Rely on previousLeafNode as a helper.
        (NodeImpl::nextEditable): Ditto, but rely on nextLeafNode.
        (NodeImpl::previousLeafNode): Remove tree-walking code. Rely on traversePreviousNode as a helper.
        (NodeImpl::nextLeafNode): Ditto, but rely on traverseNextNode.
        (NodeImpl::containingBlock): Renamed replacement for containingEditableBlock.
        (NodeImpl::inSameContainingEditableBlock): Call renamed containingBlock.
        * khtml/xml/dom_nodeimpl.h:
        * khtml/xml/dom_position.cpp:
        (DOM::Position::previousCharacterPosition): Various name changes, as described above.
        (DOM::Position::nextCharacterPosition): Ditto.
        (DOM::Position::previousWordPosition): Ditto.
        (DOM::Position::nextWordPosition): Ditto.
        (DOM::Position::previousLinePosition): Ditto.
        (DOM::Position::nextLinePosition): Ditto.
        (DOM::Position::equivalentUpstreamPosition): Remove bogus check for editable node in loop. Perform
        improved block-crossing check at start of loop which works for editable and non-editable content.
        This is the crux of the fix for the bug.
        (DOM::Position::equivalentDownstreamPosition): Ditto.
        (DOM::Position::inRenderedContent): Various name changes, as described above.
        (DOM::Position::rendersOnSameLine): Ditto.
        (DOM::Position::rendersInDifferentPosition): Ditto.
        (DOM::Position::isFirstRenderedPositionOnLine): Ditto.
        (DOM::Position::isLastRenderedPositionOnLine): Ditto.
        (DOM::Position::isLastRenderedPositionInEditableBlock): Ditto.
        (DOM::Position::inFirstEditableInRootEditableBlock): Ditto.
        (DOM::Position::inLastEditableInRootEditableBlock): Ditto.
        (DOM::Position::inFirstEditableInContainingEditableBlock): Ditto.
        (DOM::Position::inLastEditableInContainingEditableBlock): Ditto.

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

18 years agoWebCore:
rjw [Wed, 2 Jun 2004 05:16:49 +0000 (05:16 +0000)]
        Fixed deployment build warning.

        * khtml/rendering/render_canvasimage.cpp:

        Fixed deployment build warning.

        * WebCoreSupport.subproj/WebImageRenderer.m:
        (-[WebImageRenderer incrementalLoadWithBytes:length:complete:]):

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

18 years agoWebCore:
rjw [Wed, 2 Jun 2004 02:12:10 +0000 (02:12 +0000)]
Added support for composite attribute to <CANVAS>
Added support for drawImage and drawImageFromRect to <CANVAS>, i.e.:


var img = new Image(600,600);

function drawImage()
var aCanvas = document.getElementById ("canvas1");
var context = aCanvas.getContext("context-2d");
context.drawImage (img, 0, 0, 600, 600, "copy");

img.onload = drawImage;
img.src = "http://www.google.com/images/logo.gif";

<canvas id="canvas1" width=600 height=600>

        Reviewed by Trey.

        * khtml/ecma/kjs_html.cpp:
        * khtml/ecma/kjs_html.h:
        * khtml/rendering/render_canvasimage.cpp:
        * kwq/KWQPainter.h:
        * kwq/KWQPainter.mm:
        * kwq/KWQPixmap.h:
        * kwq/KWQPixmap.mm:
        * kwq/WebCoreImageRenderer.h:
        * kwq/WebCoreImageRendererFactory.h:

Added support for drawImage and drawImageFromRect to <CANVAS>
Added support for composite attribute to <CANVAS>

        Reviewed by Trey.

        * WebCoreSupport.subproj/WebImageRenderer.h:
        * WebCoreSupport.subproj/WebImageRenderer.m:
        (-[WebImageContext initWithBounds:context:]):
        (-[WebImageContext dealloc]):
        (-[WebImageContext saveGraphicsState]):
        (-[WebImageContext restoreGraphicsState]):
        (-[WebImageContext isDrawingToScreen]):
        (-[WebImageContext focusStack]):
        (-[WebImageContext setFocusStack:]):
        (-[WebImageContext bounds]):
        (-[WebImageContext isFlipped]):
        (-[WebImageRenderer incrementalLoadWithBytes:length:complete:]):
        (-[WebImageRenderer dealloc]):
        (-[WebImageRenderer _beginRedirectContext:]):
        (-[WebImageRenderer _endRedirectContext:]):
        (-[WebImageRenderer _needsRasterFlush]):
        (-[WebImageRenderer drawClippedToValidInRect:fromRect:]):
        (-[WebImageRenderer drawImageInRect:fromRect:]):
        (-[WebImageRenderer flushRasterCache]):
        (-[WebImageRenderer drawImageInRect:fromRect:compositeOperator:context:]):
        (-[WebImageRenderer tileInRect:fromPoint:context:]):
        * WebCoreSupport.subproj/WebImageRendererFactory.m:
        (-[WebImageRendererFactory imageRendererWithMIMEType:]):
        (-[WebImageRendererFactory imageRendererWithName:]):
        (-[WebImageRendererFactory CGCompositeOperationInContext:]):
        (-[WebImageRendererFactory setCGCompositeOperation:inContext:]):
        (-[WebImageRendererFactory setCGCompositeOperationFromString:inContext:]):

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

18 years ago Reviewed by Trey.
sullivan [Wed, 2 Jun 2004 00:09:08 +0000 (00:09 +0000)]
    Reviewed by Trey.

        Work on text-align API. Marked these bugs fixed:
        <rdar://problem/3655380>: (Editing:�alignCenter:�ethod�nimplemented�WebKit�diting�PI))
        <rdar://problem/3655381>: (Editing:�alignJustified:�ethod�nimplemented�WebKit�diting�PI))
        <rdar://problem/3655383>: (Editing:�alignLeft:�ethod�nimplemented�WebKit�diting�PI))
        <rdar://problem/3655384>: (Editing:�alignRight:�ethod�nimplemented�WebKit�diting�PI))

        in favor of opening this bug:
        <rdar://problem/3675191>: (Editing: -alignLeft: and friends mostly implemented but not
        yet working (WebKit editing API))

        * English.lproj/StringsNotToBeLocalized.txt:
        updated for these changes

        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView changeDocumentBackgroundColor:]):
        added a FIXME about why this is still not quite right
        (-[WebHTMLView _alignSelectionUsingCSSValue:]):
        new method, bottleneck for the various values
        (-[WebHTMLView alignCenter:]):
        call _alignSelectionUsingCSSValue:@"center"
        (-[WebHTMLView alignJustified:]):
        call _alignSelectionUsingCSSValue:@"justify"
        (-[WebHTMLView alignLeft:]):
        call _alignSelectionUsingCSSValue:@"left"
        (-[WebHTMLView alignRight:]):
        call _alignSelectionUsingCSSValue:@"right"

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

18 years ago Reviewed by Ken.
sullivan [Tue, 1 Jun 2004 23:08:20 +0000 (23:08 +0000)]
    Reviewed by Ken.

        - fixed <rdar://problem/3655378>: (Editing:�changeDocumentBackgroundColor:�        method�nimplemented�WebKit�diting�PI))
        - made startSpeaking: actually work; previous implementation raised a DOMException

        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView _changeCSSColorUsingSelector:inRange:]):
        added range parameter
        (-[WebHTMLView _entireDOMRange]):
        new convenience method
        (-[WebHTMLView changeDocumentBackgroundColor:]):
        now affects entire document, not just selected range, a la NSTextView
        (-[WebHTMLView changeColor:]):
        now passes in a range to _changeCSSColorUsingSelector:inRange:
        (-[WebHTMLView startSpeaking:]):
        now uses _entireDOMRange

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

18 years ago Fixed: <rdar://problem/3661505>: (REGRESSION (Safari-140) can't drag standalone...
cblu [Tue, 1 Jun 2004 22:31:50 +0000 (22:31 +0000)]
Fixed: <rdar://problem/3661505>: (REGRESSION (Safari-140) can't drag standalone images more than once)

        Reviewed by john.

        * WebView.subproj/WebImageView.m:
        (-[WebImageView mouseDown:]): set ignoringMouseDraggedEvents to NO. This line of code was deleted somehow.

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

18 years ago Reviewed by Darin.
sullivan [Tue, 1 Jun 2004 21:21:07 +0000 (21:21 +0000)]
    Reviewed by Darin.

        - fixed <rdar://problem/3657003>: (HTML Editing: Color panel doesn't work)

        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView _colorPanelColorAsStyleUsingSelector:]):
        new method, returns a DOMCSSStyleDeclaration *
        (-[WebHTMLView _changeCSSColorUsingSelector:]):
        new method, sets a color-related style attribute on the selection
        (-[WebHTMLView changeDocumentBackgroundColor:]):
        call _changeCSSColorUsingSelector: with @selector(setBackgroundColor:)
        (-[WebHTMLView changeColor:]):
        call _changeCSSColorUsingSelector: with @selector(setColor:); also added
        comments explaining why changeDocumentBackgroundColor: will never actually
        be called until an AppKit code-incest mess is straighted out.

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

18 years ago Reviewed by Darin
kocienda [Tue, 1 Jun 2004 20:58:31 +0000 (20:58 +0000)]
    Reviewed by Darin

        Fix for these bugs:

        <rdar://problem/3655028>: "Text styles have hard-coded values making bold the only supported text style"
        <rdar://problem/3656969>: "HTML Editing: Font panel doesn't work"

        * khtml/css/css_valueimpl.cpp:
        (FontFamilyValueImpl::cssText): Added implementation for this subclass. Returns parsedFontName.
        * khtml/css/css_valueimpl.h: Declare cssText() on FontFamilyValueImpl.
        * khtml/editing/htmlediting.cpp:
        (khtml::ApplyStyleCommand::ApplyStyleCommand): Changed signature to take a CSSStyleDeclarationImpl.
        (khtml::ApplyStyleCommand::style): Added accessor.
        * khtml/editing/htmlediting.h: Changed constructor signature to take a CSSStyleDeclarationImpl.
        * khtml/editing/htmlediting_impl.cpp:
        (khtml::styleSpanClassString): Added helper to return attribute used to tag spans we add to apply styles.
        (khtml::ApplyStyleCommandImpl::ApplyStyleCommandImpl): Ref style passed in.
        (khtml::ApplyStyleCommandImpl::~ApplyStyleCommandImpl): Deref style passed in.
        (khtml::ApplyStyleCommandImpl::doApply): m_removingStyle is obsolete. Removed.
        (khtml::ApplyStyleCommandImpl::isHTMLStyleNode): Now checks all properties in the object's declaration.
        (khtml::ApplyStyleCommandImpl::removeCSSStyle): Again, now is multi-property-savvy. Will now remove an empty span
        if we added it.
        (khtml::ApplyStyleCommandImpl::currentlyHasStyle): Replaced, bold-only code with code that can handle all styles.
        (khtml::ApplyStyleCommandImpl::computeStyleChange): Helper which helps to determine whether we want to apply
        HTML-style markup for bold and italic, and gathers up all style changes that need to be done.
        (khtml::ApplyStyleCommandImpl::positionInsertionPoint): Added comment explaining possible optimization that might be
        done in the future.
        (khtml::ApplyStyleCommandImpl::applyStyleIfNeeded): Significant reworking; now handles applying multiple styles.
        (khtml::ApplyStyleCommandImpl::cloneSelection): Assert fragment has at least one child. Don't want to work
        on empty fragments.
        (khtml::ApplyStyleCommandImpl::surroundContentsWithElement): New helper.
        (khtml::RemoveCSSPropertyCommandImpl::~RemoveCSSPropertyCommandImpl): Juggle asserts and lifecycle methods to be
        more like other commands.
        (khtml::RemoveCSSPropertyCommandImpl::doApply): Ditto.
        (khtml::RemoveNodeAttributeCommandImpl::~RemoveNodeAttributeCommandImpl): Ditto.
        * khtml/editing/htmlediting_impl.h:
        (khtml::ApplyStyleCommandImpl::style): Added.
        (khtml::ApplyStyleCommandImpl::StyleChange::StyleChange): Added.
        * kwq/DOM-CSS.mm:
        (-[DOMCSSStyleDeclaration setProperty:::]): Fix problem where passing an empty NSString to a function expecting a boolean
        made all properties important priority.
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge applyStyle:]): Remove provisional code and comment. Now pass along style, following the intended design.

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

18 years ago Reviewed by Darin
kocienda [Tue, 1 Jun 2004 20:57:57 +0000 (20:57 +0000)]
    Reviewed by Darin

        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView _fontManagerOperationAsStyle]): Fixed typo in family-name code that caused
        family names to match when they should not.

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

18 years agoWebCore:
cblu [Tue, 1 Jun 2004 20:53:33 +0000 (20:53 +0000)]

        Reviewed by kocienda.

        * kwq/WebCoreBridge.h:
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge dragCaretDOMRange]): new, lets WebKit pass the drag caret DOM range to the editing delegate


Made paste and drop ask the delegate before making any replacements.

        Reviewed by kocienda.

        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView _pasteWithPasteboard:allowPlainText:]): renamed, now calls _shouldInsertFragment:replacingDOMRange:givenAction:
        (-[WebHTMLView _shouldInsertFragment:replacingDOMRange:givenAction:]): new, asks delegate
        (-[WebHTMLView concludeDragForDraggingInfo:]): now calls _shouldInsertFragment:replacingDOMRange:givenAction:
        (-[WebHTMLView paste:]): call renamed _pasteWithPasteboard:allowPlainText:
        (-[WebHTMLView pasteAsRichText:]): ditto

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

18 years ago Reviewed by gramps.
ouch [Sat, 29 May 2004 04:23:22 +0000 (04:23 +0000)]
    Reviewed by gramps.

- removed setShadowWithColor and change setShadow to work with optional attributes
it follows the same rules as setFill/StrokeColor
- Fixed bug in setFillColor and setStrokeColor for CMYK colors (missing break in case).

        * khtml/ecma/kjs_html.cpp:
        * khtml/ecma/kjs_html.h:
        * khtml/ecma/kjs_html.lut.h:

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

18 years ago Reviewed by Maciej.
darin [Sat, 29 May 2004 00:07:44 +0000 (00:07 +0000)]
    Reviewed by Maciej.

        * WebView.subproj/WebHTMLView.m: (-[WebHTMLView _fontManagerOperationAsStyle]):
        First cut at figuring out what operation the font manager is doing without
        digging into its private data structures.

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

18 years agoWebCore:
darin [Fri, 28 May 2004 23:26:30 +0000 (23:26 +0000)]

        Reviewed by Ken.

        - various editing-related improvements

        * khtml/xml/dom_selection.h: Removed UP and DOWN directions, and added PARAGRAPH granularity.
        * khtml/xml/dom_selection.cpp:
        (DOM::Selection::modify): Got rid of the UP and DOWN directions, and made movement
        between lines happen when granularity is LINE. Added a new unimplemented granularity:
        (DOM::Selection::validate): Remove some unneeded APPLE_CHANGES. The code need not be ifdef'd.
        (DOM::Selection::debugPosition): Ditto.

        * kwq/WebCoreBridge.h: Removed WebSelectUp and WebSelectDown, and added WebSelectByParagraph.
        Added stringForRange: and selectedDOMRangeWithGranularity:, and renamed replaceSelectionWithNewline
        to insertNewline because it has the insertText: semantic, not the replaceSelectionWithText: one.
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge stringForRange:]): Added.
        (-[WebCoreBridge selectedDOMRangeWithGranularity:]): Added.
        (-[WebCoreBridge alterCurrentSelection:direction:granularity:]): Updated code to understand
        that vertical movement is based on granularity now, not direction.
        (-[WebCoreBridge replaceSelectionWithFragment:selectReplacement:]): Moved an ensureCaretVisible
        from the WebKit down here. I think perhaps this should go down even further in WebCore.
        (-[WebCoreBridge insertNewline]): Renamed, and moved ensureCaretVisible here.
        (-[WebCoreBridge insertText:]): Moved ensureCaretVisible here.
        (-[WebCoreBridge deleteKeyPressed]): Moved ensureCaretVisible here.

        * khtml/xml/dom_position.cpp: Some ifdef tweaks.

        * khtml/misc/helper.cpp: Namespace and formatting tweaks.
        * khtml/misc/helper.h: Removed some unused stuff.

        * khtml/dom/dom2_range.h: Make range constructor public so that anyone with
        a RangeImpl can easily make a Range.


        Reviewed by Ken.

        - various editing-related improvements
        - fixed <rdar://problem/3655366>: (Editing: -selectParagraph: method unimplemented (WebKit editing API))
        - fixed <rdar://problem/3655367>: (Editing: -selectLine: method unimplemented (WebKit editing API))
        - fixed <rdar://problem/3655369>: (Editing: -selectWord: method unimplemented (WebKit editing API))
        - fixed <rdar://problem/3655392>: (Editing: -uppercaseWord: method unimplemented (WebKit editing API))
        - fixed <rdar://problem/3655393>: (Editing: -lowercaseWord: method unimplemented (WebKit editing API))
        - fixed <rdar://problem/3655394>: (Editing: -capitalizeWord: method unimplemented (WebKit editing API))

        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView _alterCurrentSelection:direction:granularity:]): Removed the call to
        ensureCaretVisible. This is now handled on the other side of the bridge.
        (-[WebHTMLView moveDown:]): Changed to use WebSelectByLine granularity instead of
        WebSelectDown direction.
        (-[WebHTMLView moveDownAndModifySelection:]): Ditto.
        (-[WebHTMLView moveUp:]): Ditto.
        (-[WebHTMLView moveUpAndModifySelection:]): Ditto.
        (-[WebHTMLView _expandSelectionToGranularity:]): Added.
        (-[WebHTMLView selectParagraph:]): Implemented by calling _expandSelectionToGranularity.
        (-[WebHTMLView selectLine:]): Ditto.
        (-[WebHTMLView selectWord:]): Ditto.
        (-[WebHTMLView _fontManagerOperationAsStyle]): Added. Placeholder for the job of figuring
        out what style change to make based on NSFontManager.
        (-[WebHTMLView changeFont:]): Implemented, but not really tested because guts are still
        missing due to lack of above method.
        (-[WebHTMLView insertTab:]): Removed the call to ensureCaretVisible.
        (-[WebHTMLView insertNewline:]): Removed the call to ensureCaretVisible.
        (-[WebHTMLView insertParagraphSeparator:]): Made this insert a newline for now.
        (-[WebHTMLView _changeWordCaseWithSelector:]): Added.
        (-[WebHTMLView uppercaseWord:]): Implemented by calling _changeWordCaseWithSelector.
        (-[WebHTMLView lowercaseWord:]): Ditto.
        (-[WebHTMLView capitalizeWord:]): Ditto.
        (-[WebHTMLView deleteBackward:]): Removed the call to ensureCaretVisible.
        (-[WebHTMLView checkSpelling:]): Put a pile of AppKit code in here as a placeholder.
        (-[WebHTMLView startSpeaking:]): Use the new stringForRange: method instead of outerText.
        That way we can handle cases where the entire document is selected.
        (-[WebHTMLView insertText:]): Removed the call to ensureCaretVisible.

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

18 years ago setStrokeColor and setFillColor now support
rjw [Fri, 28 May 2004 21:40:42 +0000 (21:40 +0000)]
setStrokeColor and setFillColor now support
old school web color string, oswcs+alpha, gray, gray+alpha,
rgba, and cmyka.

        Reviewed by jay-lo.

        * khtml/css/cssparser.cpp:
        * khtml/css/cssparser.h: Made parseColor static public class method
        * khtml/ecma/kjs_html.cpp:

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

18 years ago Fixed: <rdar://problem/3672129>: (selection deselects when clicking editable WebView...
cblu [Fri, 28 May 2004 19:41:48 +0000 (19:41 +0000)]
Fixed: <rdar://problem/3672129>: (selection deselects when clicking editable WebView in background window)

Fixed this problem by using NSTextView's approach of only allowing dragging on first mouse down.

        Reviewed by john.

        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView acceptsFirstMouse:]): store the first mouse down
        (-[WebHTMLView mouseDown:]): Don't tell WebCore about the first mouse down event since only dragging can occur on the first mouse down.
        (-[WebHTMLView mouseDragged:]): Don't tell WebCore about the drags that occur after the first mouse down since only dragging can occur after the first mouse down.
        * WebView.subproj/WebHTMLViewInternal.h:

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

18 years ago Implement -khtml-user-select and add support for the property -khtml-user-drag ...
hyatt [Fri, 28 May 2004 19:33:46 +0000 (19:33 +0000)]
Implement -khtml-user-select and add support for the property -khtml-user-drag (although someone will still
need to wire it up).

        Reviewed by rjw

        * 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/khtml_part.cpp:
        * khtml/rendering/render_canvas.cpp:
        * khtml/rendering/render_object.cpp:
        * khtml/rendering/render_object.h:
        * khtml/rendering/render_style.cpp:
        * khtml/rendering/render_style.h:

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

18 years ago added addArc and clip path routines.
ouch [Fri, 28 May 2004 18:33:39 +0000 (18:33 +0000)]
added addArc and clip path routines.

        Reviewed by sullivan.

        * khtml/ecma/kjs_html.cpp:
        * khtml/ecma/kjs_html.h:
        * khtml/ecma/kjs_html.lut.h:

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

18 years ago * WebView.subproj/WebView.m: At Ken's suggestion, for better efficiency and...
kdecker [Fri, 28 May 2004 18:00:05 +0000 (18:00 +0000)]
    * WebView.subproj/WebView.m: At Ken's suggestion, for better efficiency and safety,
        use _cmd rather than explicit selector names in the forwarding methods.

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

18 years ago * WebView.subproj/WebView.m: At Ken's suggestion, for better efficiency and...
kdecker [Fri, 28 May 2004 17:57:23 +0000 (17:57 +0000)]
    * WebView.subproj/WebView.m: At Ken's suggestion, for better efficiency and safety,
        use _cmd rather than explicit selector names in the forwarding methods.

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

18 years ago Reviewed by Ken.
kdecker [Fri, 28 May 2004 17:47:57 +0000 (17:47 +0000)]
    Reviewed by Ken.

        -revised generated error message content

        * kjs/error_object.cpp:
        * kjs/internal.cpp:
        * kjs/object.cpp:

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

18 years ago * WebView.subproj/WebView.m: At Ken's suggestion, for better efficiency and...
darin [Fri, 28 May 2004 17:21:58 +0000 (17:21 +0000)]
    * WebView.subproj/WebView.m: At Ken's suggestion, for better efficiency and safety,
        use _cmd rather than explicit selector names in the forwarding methods.

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

18 years ago Added addArcToPoint and addRect path routines.
kdecker [Fri, 28 May 2004 17:21:35 +0000 (17:21 +0000)]
Added addArcToPoint and addRect path routines.

        Reviewed by sullivan.

        * khtml/ecma/kjs_html.cpp:
        * khtml/ecma/kjs_html.h:
        * khtml/ecma/kjs_html.lut.h:

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

18 years ago Reviewed by Ken.
darin [Fri, 28 May 2004 17:14:37 +0000 (17:14 +0000)]
    Reviewed by Ken.

        - implemented a few more editing operations, moved code from WebView to WebHTMLView

        * WebCoreSupport.subproj/WebBridge.m:
        (-[WebBridge respondToChangedContents]): Call _updateFontPanel on the WebHTMLView, not the WebView.
        (-[WebBridge respondToChangedSelection]): Ditto.

        * WebView.subproj/WebHTMLView.m: Moved WebElementOrTextFilter class here from WebView and
        gave it a prefix so it won't conflict with developers' class names.
        (-[WebHTMLView _updateFontPanel]): Moved here from WebView.

        * WebView.subproj/WebView.m:
        (-[WebView toggleSmartInsertDelete:]): Added.
        (-[WebView toggleContinuousSpellChecking:]): Added.
        (-[WebView isContinuousGrammarCheckingEnabled]): Added.
        (-[WebView setContinuousGrammarCheckingEnabled:]): Added.
        (-[WebView toggleContinuousGrammarChecking:]): Added.
        (-[WebView setSmartInsertDeleteEnabled:]): Implemented. We have the flag now, although we
        still don't actually have smart insert and delete implemented.
        (-[WebView smartInsertDeleteEnabled]): Ditto.
        (-[WebView setContinuousSpellCheckingEnabled:]): Implemented.
        (-[WebView isContinuousSpellCheckingEnabled]): Implemented.
        (-[WebView spellCheckerDocumentTag]): Implemented.
        (-[WebView _preflightSpellCheckerNow:]): Added.
        (-[WebView _preflightSpellChecker]): Added.
        (-[WebView _continuousCheckingAllowed]): Added.

        * WebView.subproj/WebHTMLViewInternal.h: Added. We'll things here from WebHTMLViewPrivate so
        they are internal to the framework, rather than SPI.
        * WebKit.pbproj/project.pbxproj: Added WebHTMLViewInternal.h.
        * WebView.subproj/WebHTMLViewPrivate.h: Moved WebHTMLViewPrivate into the internal header.
        Despite its name, it's internal, not SPI.

        * WebView.subproj/WebViewPrivate.h: Moved WebViewPrivate into the internal header.
        Despite its name, it's internal, not SPI. Added a number of new operations which should
        be public API. We'll have to figure out what to do about API review and the WWDC deadline.
        * WebView.subproj/WebViewInternal.h: Removed _updateFontPanel method.

        * English.lproj/StringsNotToBeLocalized.txt: Update.

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

18 years ago Added addArcToPoint and addRect path routines.
ouch [Fri, 28 May 2004 15:54:26 +0000 (15:54 +0000)]
Added addArcToPoint and addRect path routines.

        Reviewed by sullivan.

        * khtml/ecma/kjs_html.cpp:
        * khtml/ecma/kjs_html.h:
        * khtml/ecma/kjs_html.lut.h:

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

18 years agoTests:
kocienda [Fri, 28 May 2004 14:19:48 +0000 (14:19 +0000)]

        Reviewed by Maciej.

        - moved to new symlink technique for embedding frameworks

        * Blot/Blot.xcode/project.pbxproj: Call the new create-framework-symlinks script
        instead of copy-frameworks-to-dstroot.sh.
        * Blot/embed-frameworks.sh: Removed.

        * PDFViewer/PDFViewer.pbproj/project.pbxproj: Call the new create-framework-symlinks
        script instead using a copy files phase.


        Reviewed by John

        * khtml/xml/dom_selection.cpp:
        (DOM::Selection::toRange): Add call to update document layout before returning a Range.
        This is done to ensure recently-done editing changes are reflected in the calculation
        of the Range. This change solves a specific problem with updating the font panel, where
        the wrong Range was used, resulting in an incorrect font. Also, defer converting
        positions to be range-compliant positions. The nodeIsBeforeNode function is not


        Reviewed by John

        The font panel now updates correctly, reflecting the current selection. There may
        still be some bugs and corner cases to handle, but this will work for a general
        implementation of the feature.

        * WebView.subproj/WebView.m:
        (+[ElementOrTextFilter filter]): Added. This filter will accept DOM elements and
        text nodes and skip everything else. This filter is used when walking a selection
        to determine the fonts in use.
        (-[ElementOrTextFilter acceptNode:]): DOM node filter implementation method.
        (-[WebView _fontFromStyle]): Removed, in lieu of new fontForCurrentPosition call on the bridge.
        (-[WebView _updateFontPanel]): Reworked to use a TreeWalker instead of a NodeIterator. This
        was done since the iterator must be rooted at the document root, but start iterating
        at the start of the selection. TreeWalker's setCurrentNode allows this to be done.

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

18 years agoWebBrowser:
kdecker [Fri, 28 May 2004 03:02:45 +0000 (03:02 +0000)]

        Reviewed by Ken.

-added the Error Console feature

        * ChangeLog:
        * Debug/ErrorConsoleController.h: Added.
        * Debug/ErrorConsoleController.m: Added.
        (+[ErrorConsoleController sharedController]):
        (-[ErrorConsoleController init]):
        (-[ErrorConsoleController windowNibName]):
        (-[ErrorConsoleController awakeFromNib]):
        (-[ErrorConsoleController addMessage:]):
        * Debug/ErrorConsoleModel.h: Added.
        * Debug/ErrorConsoleModel.m: Added.
        (-[ErrorConsoleModel init]):
        (-[ErrorConsoleModel addErrorToModel:]):
        (-[ErrorConsoleModel setTable:]):
        (-[ErrorConsoleModel numberOfRowsInTableView:]):
        (-[ErrorConsoleModel tableView:objectValueForTableColumn:row:]):
        (-[ErrorConsoleModel tableView:willDisplayCell:forTableColumn:row:]):

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

18 years agoJavaScriptCore:
kdecker [Fri, 28 May 2004 02:06:05 +0000 (02:06 +0000)]

        Reviewed by Ken.

-revised generated error message content

        * kjs/error_object.cpp:
        * kjs/internal.cpp:
        * kjs/object.cpp:


        Reviewed by Ken.

-wired up JavaScript error message handling to
the WebCoreBridge

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


        Reviewed by Ken.

-wired up JavaScript error message handling through
the WebCoreBridge

        * WebCoreSupport.subproj/WebBridge.m:
        (-[WebBridge addMessageToConsole:]):
        * WebKit.pbproj/project.pbxproj:
        * WebView.subproj/WebUIDelegatePrivate.h:


        Reviewed by Ken.

-added the JavaScript Console feature

        * BrowserWebController.m:
        (-[BrowserWebView setWindowFocusDisabled:]):
        (-[BrowserWebView webView:addMessageToConsole:]):
        * Debug/DebugUtilities.m:
        (-[DebugUtilities createDebugMenu]):
        (-[BrowserDocument showJavaScriptConsole:]):
        * WebBrowser.pbproj/project.pbxproj:

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

18 years ago Two dragging tweaks: ondragleave events are sent before ondragenter events when
trey [Fri, 28 May 2004 00:14:45 +0000 (00:14 +0000)]
Two dragging tweaks:  ondragleave events are sent before ondragenter events when
going across element boundaries, to match WinIE.
For compatibility with WinIE, we honor MIME types of "Text" and "URL".

        Reviewed by rjw.

        * khtml/khtmlview.cpp:
        * kwq/KWQClipboard.mm:

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

18 years ago- Change version number to '143u'. The tree is open!
vicki [Thu, 27 May 2004 23:28:06 +0000 (23:28 +0000)]
- Change version number to '143u'.  The tree is open!

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

18 years agoSafari-142 stamp
vicki [Thu, 27 May 2004 23:22:42 +0000 (23:22 +0000)]
Safari-142 stamp

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

18 years ago Reviewed by Darin.
vicki [Thu, 27 May 2004 23:05:15 +0000 (23:05 +0000)]
    Reviewed by Darin.

- Fix Tiger build failure.  Rename constant "S" to "WHITESPACE",
and change all instances of S to WHITESPACE.

        * khtml/css/cssparser.cpp:
        (DOM::CSSParser::lex): S to WHITESPACE
        * khtml/css/parser.cpp: regenerated file
        * khtml/css/parser.h: regenerated file
        * khtml/css/parser.y: S to WHITESPACE
        * khtml/css/tokenizer.cpp: regenerated file
        * khtml/css/tokenizer.flex: S to WHITESPACE

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

18 years ago Renamed WebScriptMethods to WebScripting based on feedback
rjw [Thu, 27 May 2004 22:46:53 +0000 (22:46 +0000)]
Renamed WebScriptMethods to WebScripting based on feedback
from Nancy.

        Reviewed by Chris.

        * bindings/objc/WebScriptObject.h:

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

18 years ago Added support for fillRect, strokeRect, and setAlpha.
ouch [Thu, 27 May 2004 18:28:36 +0000 (18:28 +0000)]
Added support for fillRect, strokeRect, and setAlpha.

        reviewed by richard.

        * khtml/ecma/kjs_html.cpp:
        * khtml/ecma/kjs_html.h:
        * khtml/ecma/kjs_html.lut.h:

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