18 years ago Back out one of the previous changes, it causes a crash. Whoops!
mjs [Fri, 23 Apr 2004 08:43:51 +0000 (08:43 +0000)]
    Back out one of the previous changes, it causes a crash. Whoops!

        * kwq/KWQScrollView.mm:

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

18 years ago Fixed build snafu (re-declaration of NPBool in npruntime.h and
rjw [Thu, 22 Apr 2004 21:55:41 +0000 (21:55 +0000)]
Fixed build snafu (re-declaration of NPBool in npruntime.h and

        * bindings/npruntime.h:

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

18 years ago Updates to plugin binding APIs.
rjw [Thu, 22 Apr 2004 21:54:33 +0000 (21:54 +0000)]
Updates to plugin binding APIs.
Updates to Java plugin APIs.
Transparency fix for Dashboard.

        Reviewed by John and Greg Bolsinga.

        * Plugins.subproj/WebPluginJava.h: Added.
New API for Java plugin.

* Plugins.subproj/npfunctions.h:
        * Plugins.subproj/npruntime.h:
        * Plugins.subproj/npsap.h: Added.
New API for plugin bindings.

* WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView drawRect:]):
Update for Dashboard.  View must fill with transparency when not
drawing background.

* copy-webcore-files-to-webkit:

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

18 years ago Reviewed by Hyatt
kocienda [Thu, 22 Apr 2004 21:49:21 +0000 (21:49 +0000)]
    Reviewed by Hyatt

        * khtml/editing/htmlediting_impl.cpp:
        (DeleteSelectionCommandImpl::doApply): Short-circuit return if the selection
        is not a range after collapsing whitespace.

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

18 years ago Updated plugin binding API to reflect latest revision from
rjw [Thu, 22 Apr 2004 21:38:25 +0000 (21:38 +0000)]
Updated plugin binding API to reflect latest revision from
working group.

Biggest change is the introduction of NPVariant used to represent
value types.  NPVariant replaces the use of NPObject for the
exchange of values between scripting environment and native code.

        Reviewed by John.

        * JavaScriptCore.pbproj/project.pbxproj:
        * bindings/NP_jsobject.cpp:
        * bindings/c/c_class.cpp:
        * bindings/c/c_instance.cpp:
        * bindings/c/c_runtime.cpp:
        * bindings/c/c_utility.cpp:
        * bindings/c/c_utility.h:
        * bindings/npruntime.cpp:
        * bindings/npruntime.h:
        * bindings/testbindings.cpp:

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

18 years agoWebCore:
kocienda [Thu, 22 Apr 2004 20:06:38 +0000 (20:06 +0000)]

        Reviewed by Hyatt

        More work to bring code up to date with the latest API proposal.

        * khtml/xml/dom_selection.h: Fix typo in comment.
        * kwq/WebCoreBridge.h: -applyStyle:toElementsInDOMRange: is now applyStyle:
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge applyStyle:]): Ditto.


        Reviewed by Hyatt

        More work to bring code up to date with the latest API proposal. Note that
        all of the replaceXXX methods below now operate on the current selection, so
        the method implementations have been simplifed accordingly.

        * WebView.subproj/WebDataSource.m:
        (-[WebDataSource _replaceSelectionWithArchive:]): New name for _replaceSelectionWithWebArchive.
        * WebView.subproj/WebDataSourcePrivate.h: Ditto.
        * WebView.subproj/WebDefaultEditingDelegate.m:
        (-[WebDefaultEditingDelegate webViewShouldBeginEditing:inDOMRange:]): Added inDOMRange: parameter.
        (-[WebDefaultEditingDelegate webViewShouldEndEditing:inDOMRange:]): Ditto.
        (-[WebDefaultEditingDelegate webView shouldChangeSelectedDOMRange:toDOMRange:proposedRange affinity:stillSelecting:]):
        Missed adding affinity in last patch.
        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView _pasteFromPasteboard:]): Call old method with new name: _replaceSelectionWithArchive
        * WebView.subproj/WebView.m:
        (-[WebView replaceSelectionWithNode:]): New version of insertNode:replacingDOMRange:
        (-[WebView replaceSelectionWithText:]): New version of insertText:replacingDOMRange:
        (-[WebView replaceSelectionWithMarkupString:]): New version of insertMarkupString:replacingDOMRange:
        (-[WebView replaceSelectionWithArchive:]): New version of insertWebArchive:replacingDOMRange:
        (-[WebView deleteSelection]): New version of deleteDOMRange:
        (-[WebView applyStyle:]): New version of applyStyle:toElementsInDOMRange:
        * WebView.subproj/WebViewPrivate.h:

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

18 years agoTests:
kocienda [Thu, 22 Apr 2004 17:54:34 +0000 (17:54 +0000)]

        Reviewed by John

        * Blot/BlotDocument.m:
        (-[BlotDocument webView:didFinishLoadForFrame:]): Send along selection
        affinity in call to set selection.


        Reviewed by John

        Adds the notion of selection affinity to the editing API, bringing it up to
        date with the latest proposal.

        * khtml/xml/dom_selection.cpp:
        (DOM::Selection::Selection): Adds support for selection affinity member variable.
        (DOM::Selection::init): Ditto.
        (DOM::Selection::operator=): Ditto.
        (DOM::Selection::setAffinity): New function.
        (DOM::Selection::layoutCaret): Added comment to indicate that we need to enhance this
        function to handle selection affinity.
        * khtml/xml/dom_selection.h: Added EAffinity enum and m_affinity member variable.
        (DOM::Selection::): Moved the enums above the constructors. No code change.
        (DOM::Selection::affinity): New accessor.
        * kwq/WebCoreBridge.h:
        * kwq/WebCoreBridge.mm: Add selection affinity to API declarations as needed.
        (-[WebCoreBridge setSelectedDOMRange:affinity:]): Ditto.
        (-[WebCoreBridge selectedDOMRange]): Ditto.
        (-[WebCoreBridge selectionAffinity]): Ditto.


        Reviewed by John

        Adds the notion of selection affinity to the editing API, bringing it up to
        date with the latest proposal.

        * WebView.subproj/WebView.m:
        (-[WebView _alterCurrentSelection:direction:granularity:]): Pass selection affinity
        to the delegate. We can just pass the current one since this does not change with arrow keys.
        (-[WebView setSelectedDOMRange:affinity:]): Set the affinity on the selection.
        (-[WebView selectionAffinity]): New accessor.
        (-[WebView insertNode:replacingDOMRange:]): Change to pass selection affinity to call
        to set selection. This is just to get the code to compile for now, since this method
        will soon be removed in place of a similar one from the latest proposal that always
        works on the current selection.
        (-[WebView insertText:replacingDOMRange:]): Ditto.
        (-[WebView insertMarkupString:replacingDOMRange:]): Ditto.
        (-[WebView insertWebArchive:replacingDOMRange:]): Ditto.
        (-[WebView deleteDOMRange:]): Ditto.
        (-[WebView applyStyle:toElementsInDOMRange:]): Ditto.
        * WebView.subproj/WebViewPrivate.h: Add selection affinity to API declarations as needed.

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

18 years ago Reviewed by Maciej.
darin [Thu, 22 Apr 2004 17:10:59 +0000 (17:10 +0000)]
    Reviewed by Maciej.

        - fixed <rdar://problem/3627473>: "REGRESSION (125-137): memory trasher in UString::append, causing many different crashes"

        * kjs/ustring.cpp:
        (KJS::UString::expandCapacity): Fix sizeof(UChar *) that should be sizeof(UChar).
        Was resulting in a buffer 2x the needed size.
        (KJS::UString::expandPreCapacity): Ditto.
        (KJS::UString::append): Fix malloc that is missing a sizeof(UChar).

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

18 years ago*** empty log message ***
mjs [Thu, 22 Apr 2004 17:07:23 +0000 (17:07 +0000)]
*** empty log message ***

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

18 years agoJavaScriptCore:
mjs [Thu, 22 Apr 2004 16:53:36 +0000 (16:53 +0000)]

        Reviewed by Darin.

Preliminary change for conservative GC. Create "protected"
subclasses to GC-protect objects when on heap, since we will soon
remove the built-in refcounting of the normal wrapper classes. Use
them where needed.

        * JavaScriptCore.pbproj/project.pbxproj:
        * kjs/context.h:
        * kjs/internal.h:
        * kjs/interpreter.h:
        * kjs/property_map.cpp:
        * kjs/reference.h:
        * kjs/reference_list.cpp:


        Reviewed by Darin.

Preliminary change for conservative GC. Use new "protected"
subclasses to GC-protect objects when on heap, since we will soon
remove the built-in refcounting of the normal wrapper classes.

        * ForwardingHeaders/kjs/protect.h: Added.
        * khtml/ecma/kjs_binding.h:
        * khtml/ecma/kjs_events.h:
        * khtml/ecma/kjs_traversal.h:
        * khtml/ecma/kjs_window.h:

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

18 years ago Reviewed by Darin
kocienda [Thu, 22 Apr 2004 16:16:55 +0000 (16:16 +0000)]
    Reviewed by Darin

        Work around this bug:
        <rdar://problem/3630640>: "Calling interpretKeyEvents: in a custom text view can fail to process keys right after app startup"

        * WebView.subproj/WebView.m:
        (-[WebView _editingKeyDown:]): The issue is with a message to nil in AppKit
        key binding manager code. Add call to [NSKeyBindingManager sharedKeyBindingManager] to make
        sure the not-supposed-to-be-nil object is created before calling interpretKeyEvents:.

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

18 years ago * khtml/ecma/kjs_window.cpp: (Window::get): Removed code that gets properties...
darin [Thu, 22 Apr 2004 15:39:58 +0000 (15:39 +0000)]
    * khtml/ecma/kjs_window.cpp: (Window::get): Removed code that gets properties from the parent.
        This was a mistake we inherited from KHTML, and they have long since fixed it.

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

18 years agoWebCore:
kocienda [Thu, 22 Apr 2004 13:24:35 +0000 (13:24 +0000)]

        Reviewed by Hyatt

        Ensures caret visibility after making an editing action.

        * khtml/xml/dom_selection.cpp:
        (DOM::Selection::getRepaintRect): Expose this as public.
        * khtml/xml/dom_selection.h: Ditto.
        * kwq/WebCoreBridge.h: Add ensureCaretVisible method.
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge replaceSelectionWithMarkupString:baseURLString:]):
        Unrelated crash fix. Null-check baseURLString.
        (-[WebCoreBridge ensureCaretVisible]): Added.


        Reviewed by Hyatt

        Added calls to ensure caret visibility after the editing action is done.

        * WebView.subproj/WebView.m:
        (-[WebView _alterCurrentSelection:direction:granularity:]):
        (-[WebView insertNewline:]):
        (-[WebView deleteBackward:]):
        (-[WebView insertText:]):

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

18 years agoFix multiple rowspan test.
hyatt [Thu, 22 Apr 2004 04:41:03 +0000 (04:41 +0000)]
Fix multiple rowspan test.

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

18 years agoAdd layout test with multiple rows expanding in percentage heights.
hyatt [Thu, 22 Apr 2004 04:39:42 +0000 (04:39 +0000)]
Add layout test with multiple rows expanding in percentage heights.

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

18 years ago Fix for 3245627, nested tables don't expand vertically. I actually fixed the basic...
hyatt [Thu, 22 Apr 2004 04:37:16 +0000 (04:37 +0000)]
Fix for 3245627, nested tables don't expand vertically.  I actually fixed the basic problem in the
previous checkin, but this exposed another basic math error where |numVariable| was not being
decremented properly.  This meant space was mis-allocated when multiple variable height rows both needed
to expand.

        * khtml/rendering/render_table.cpp:

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

18 years agoAdd layout test for weird rowspan case.
hyatt [Thu, 22 Apr 2004 02:26:24 +0000 (02:26 +0000)]
Add layout test for weird rowspan case.

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

18 years ago Fix for 3020449, ensure that the paint order of cells with rowspans matches other...
hyatt [Thu, 22 Apr 2004 02:24:57 +0000 (02:24 +0000)]
Fix for 3020449, ensure that the paint order of cells with rowspans matches other browsers.

        Reviewed by darin

        * khtml/rendering/render_table.cpp:

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

18 years agoAdd test case for nested percent height tables.
hyatt [Wed, 21 Apr 2004 21:49:37 +0000 (21:49 +0000)]
Add test case for nested percent height tables.

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

18 years ago Remove the (incorrect) restriction on table flexing that required the cell to have...
hyatt [Wed, 21 Apr 2004 21:48:17 +0000 (21:48 +0000)]
Remove the (incorrect) restriction on table flexing that required the cell to have a fixed width.  In
reality, the style on the cell is completely irrelevant.

        Reviewed by kocienda

        * khtml/rendering/render_table.cpp:

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

18 years agoAdd layout test to cover percentage height cells case.
hyatt [Wed, 21 Apr 2004 21:25:30 +0000 (21:25 +0000)]
Add layout test to cover percentage height cells case.

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

18 years ago Make sure cells that get flexed vertically in tables don't check text children when...
hyatt [Wed, 21 Apr 2004 21:24:28 +0000 (21:24 +0000)]
Make sure cells that get flexed vertically in tables don't check text children when looking for
percentage height children.

        Reviewed by kocienda

        * khtml/rendering/render_table.cpp:

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

18 years agoAdd test for the hiermenu image positioning bug.
hyatt [Wed, 21 Apr 2004 20:56:13 +0000 (20:56 +0000)]
Add test for the hiermenu image positioning bug.

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

18 years ago Fix for hiermenus bug. Absolutely positioned images should not contribute to their...
hyatt [Wed, 21 Apr 2004 20:49:08 +0000 (20:49 +0000)]
Fix for hiermenus bug.  Absolutely positioned images should not contribute to their containing block's
max width.  Make sure to disregard positioned elements when computing min/max width.

        Reviewed by kocienda

        * khtml/rendering/render_block.cpp:

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

18 years ago Reviewed by Hyatt
kocienda [Wed, 21 Apr 2004 20:43:50 +0000 (20:43 +0000)]
    Reviewed by Hyatt

        A small collection of fixups.

        * khtml/editing/htmlediting_impl.cpp:
        (DeleteSelectionCommandImpl::doApply): Do not shift ending selection downstream
        when at position zero of a BR. That's just wrong. Simplify code that does
        "onlyWhitespace" delete. No need to handle multiple characters here; we can
        only ever have one thanks to the delete-collapsible-whitespace code.
        (TypingCommandImpl::issueCommandForDeleteKey): Don't do anything if at the
        start of a root editable block. This is a no-op....not an opportunity to crash.
        * khtml/rendering/render_block.cpp:
        (khtml::RenderBlock::positionForRenderer): Return this renderer's element position
        if the passed-in renderer is nil. This helps to make clicking in empty blocks work.
        * khtml/rendering/render_container.cpp:
        (RenderContainer::positionForCoordinates): Fixed typo in comment.
        * khtml/xml/dom_position.cpp:
        (DOM::Position::equivalentLeafPosition): Do not attempt to find a leaf if the
        position's node does not have a renderer, if the renderer has no kids.
        * layout-tests/editing/deleting/delete-br-001-expected.txt: Update expected results for BR fix.
        * layout-tests/editing/deleting/delete-br-003-expected.txt: Ditto.
        * layout-tests/editing/deleting/delete-br-006-expected.txt: Ditto.
        * layout-tests/editing/deleting/delete-br-007.html: Added. New BR test.
        * layout-tests/editing/deleting/delete-br-007-expected.txt: Added.

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

18 years ago Reviewed by Hyatt
kocienda [Wed, 21 Apr 2004 16:47:37 +0000 (16:47 +0000)]
    Reviewed by Hyatt

        * khtml/css/css_computedstyle.cpp:
        (DOM::CSSComputedStyleDeclarationImpl::getPropertyCSSValue): Added implementations for

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

18 years ago Reviewed by John
kocienda [Wed, 21 Apr 2004 16:42:34 +0000 (16:42 +0000)]
    Reviewed by John

        The Selection class now uses the Position class throughout its public and
        private interface. This replaces the inconsistent use of the Position
        class here and node/offset pairs there. There are no functional changes, only
        updates to the new Selection class API.

        * khtml/ecma/kjs_window.cpp:
        * khtml/editing/htmlediting_impl.cpp:
        * khtml/khtml_part.cpp:
        * khtml/rendering/render_block.cpp:
        * khtml/xml/dom_docimpl.cpp:
        * khtml/xml/dom_nodeimpl.cpp:
        * khtml/xml/dom_selection.cpp:
        * khtml/xml/dom_selection.h:
        * kwq/KWQKHTMLPart.mm:
        * kwq/KWQRenderTreeDebug.cpp:
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge isSelectionEditable]):
        (-[WebCoreBridge setSelectionFrom:startOffset:to:endOffset:]):
        (-[WebCoreBridge setSelectedDOMRange:]):

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

18 years agoFix frames layout tests now that regression has been fixed.
hyatt [Tue, 20 Apr 2004 23:36:59 +0000 (23:36 +0000)]
Fix frames layout tests now that regression has been fixed.

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

18 years ago Fixed: <rdar://problem/3605209>: "HITLIST: REGRESSION (131-132): iframes/frames...
cblu [Tue, 20 Apr 2004 22:59:08 +0000 (22:59 +0000)]
Fixed: <rdar://problem/3605209>: "HITLIST: REGRESSION (131-132): iframes/frames no longer dump on layout tests"

        Reviewed by hyatt.

        * WebView.subproj/WebHTMLRepresentation.m:
        (-[WebHTMLRepresentation finishedLoadingWithDataSource:]): the encoding was not being set in the about:blank case. Call receivedData:textEncodingName: as we did in the past to set it.

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

18 years ago Reviewed by Hyatt
kocienda [Tue, 20 Apr 2004 22:17:08 +0000 (22:17 +0000)]
    Reviewed by Hyatt

        Renamed DOMPosition class to Position.
        Renamed KHTMLSelection to Selection and moved to DOM namespace.

        * ForwardingHeaders/xml/dom_selection.h: Added.
        * WebCore.pbproj/project.pbxproj: Go Xcode!
        * khtml/khtml_selection.cpp: Removed.
        * khtml/khtml_selection.h: Removed.
        * khtml/xml/dom_position.cpp: Renamed DOMPosition to Position
        * khtml/xml/dom_position.h: Ditto.
        * khtml/xml/dom_selection.cpp: New home for renamed Selection object.
        * khtml/xml/dom_selection.h: Ditto.

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

18 years agoWebCore:
kocienda [Tue, 20 Apr 2004 21:20:23 +0000 (21:20 +0000)]

        Reviewed by Hyatt

        * WebCore.pbproj/project.pbxproj:
        * khtml/khtml_part.cpp:
        (KHTMLPart::handleMousePressEventDoubleClick): Improved name of expandToElement. Now is expandUsingGranularity.
        (KHTMLPart::handleMousePressEventTripleClick): Ditto.
        (KHTMLPart::handleMouseMoveEventSelection): Ditto.
        * khtml/khtml_selection.cpp:
        (KHTMLSelection::modify): Added support for modifying and extending selection right and left by word.
        Also added support for extending selection up and down.
        (KHTMLSelection::expandUsingGranularity): New name for expandToElement.
        (KHTMLSelection::xPosForVerticalArrowNavigation): Made this function handle cases where we know we
        want to use a particular position for calculating the right x position. We need this to handle
        extending selection up and down, and for setting the caret to the right place when moving up
        and down when a range is already selected.
        (KHTMLSelection::validate): Name tweak. expandTo variable now granularity.
        * khtml/khtml_selection.h: Make declaration changes for changes to cpp file.
        * khtml/misc/helper.cpp:
        (khtml::findWordBoundary): Added this hook for KDE to do their version of KWQFindWordBoundary
        * khtml/misc/helper.h:
        * khtml/rendering/render_block.cpp:
        (khtml::RenderBlock::positionForCoordinates): Factor out closest box finder code to its own function
        * khtml/rendering/render_line.cpp:
        (InlineFlowBox::closestChildForXPos): New function. This is the factored code that was taken out of
        (InlineBox::closestLeafChildForXPos): Ditto.
        * khtml/rendering/render_line.h: Ditto.
        * khtml/rendering/render_replaced.cpp:
        (RenderReplaced::positionForCoordinates): I think I am starting to get how the coordinate transforms work.
        Made some fixups based on this greater sense of enlightenment.
        * khtml/rendering/render_text.cpp:
        (RenderText::positionForCoordinates): Ditto. Fix lastTextBox/firstTextBox code mistake.
        * khtml/xml/dom_position.cpp:
        (DOMPosition::previousWordPosition): Added.
        (DOMPosition::nextWordPosition): Added.
        (DOMPosition::previousLinePosition): No longer use nodeAtPoint. Use new closestLeafChildForXPos instead.
        (DOMPosition::nextLinePosition): Ditto.
        * khtml/xml/dom_position.h:
        * kwq/KWQTextUtilities.cpp: Added.
        (KWQFindWordBoundary): Factored out code that was in a static function in khtml_selection.cpp so
        that DOMPosition can use it too.
        * kwq/KWQTextUtilities.h: Added.


        Reviewed by Hyatt

         Added implementations for these methods.

        * WebView.subproj/WebView.m:
        (-[WebView moveUpAndModifySelection:]):
        (-[WebView moveWordLeft:]):
        (-[WebView moveWordLeftAndModifySelection:]):
        (-[WebView moveWordRight:]):
        (-[WebView moveWordRightAndModifySelection:]):

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

18 years agoWebKit:
sullivan [Tue, 20 Apr 2004 18:28:53 +0000 (18:28 +0000)]

        - fixed <rdar://problem/3622393>: When in stealth mode, visited webpage
        contents should not be cached to disk

        Reviewed by Ken.

        * WebView.subproj/WebBaseResourceHandleDelegate.m:
        (-[WebBaseResourceHandleDelegate willCacheResponse:]):
        if will cache to disk and in stealth mode, replace cache response with
        an identical one that won't cache to disk.


        - fixed the following bugs:
        <rdar://problem/3529727>: click and hold on an auto-tab folder in the bookmarks bar should show the items in a menu
        <rdar://problem/3546013>: bookmark button is left in the wrong state when closing a tab with bookmarks in it
        <rdar://problem/3612787>: When printed page has no HTML title, put URL in header instead of footer
        <rdar://problem/3628119>: Would like "Reveal in Collections" context menu item in bookmarks filter search results
        <rdar://problem/3628143>: Would like "Reveal in Collections" context menu item in Bookmarks bar

        Reviewed by Chris.

        * BookmarksViewController.m:
        (-[BookmarksViewController revealBookmark:expand:]):
        generalized this to work with content items that aren't bookmarks (e.g. history items)
        (-[BookmarksViewController outlineView:menuForEvent:inRow:tableColumn:]):
        add a "Reveal in Collections" item just before Delete
        (-[BookmarksViewController revealSelectedFilterSearchItem]):
        new method, sets the collection appropriately and then reveals the item

        * BrowserWebBookmarkExtras.m:
        (-[WebBookmark revealFavorite]):
        new method, calls through to BrowserWindowController

        * BrowserWebViewPrinting.m:
        (-[BrowserWebView webView:drawFooterInRect:]):
        don't draw URL in footer if it's already being drawn in the header

        * BrowserWindowController.h:
        * BrowserWindowController.m:
        (-[BrowserWindowController revealFavorite:]):
        new method, calls through to BookmarksViewController
        (-[BrowserWindowController closeTab:]):
        update the show/hide bookmarks button here also (we were already updating
        it when showing a tab)

        * English.lproj/Localizable.strings:
        updated for these changes

        * FavoriteButton.m:
        (-[FavoriteButton menu]):
        add "Reveal in Collections" item
        (-[FavoriteButton shouldShowContentsMenuFromEvent:waitedForDragDelay:]):
        added waitedForDragDelay parameter, use it to decide whether to show the
        menu even for the auto-tab case
        (-[FavoriteButton performClick:]):
        pass NO for waitedForDragDelay
        (-[FavoriteButton mouseDown:]):
        pass appropriate value for waitedForDragDelay

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

18 years agoWebCore:
kocienda [Mon, 19 Apr 2004 22:54:55 +0000 (22:54 +0000)]

        Reviewed by Hyatt

        * khtml/khtml_part.cpp:
        (KHTMLPart::notifySelectionChanged): Clear the value
        used for maintaining x position when doing vertical arrow
        navigation. WebCoreBridge restores this value when needed.
        (KHTMLPart::setXPosForVerticalArrowNavigation): New accessor.
        (KHTMLPart::xPosForVerticalArrowNavigation): New accessor.
        * khtml/khtml_part.h:
        (KHTMLPart::): Add NoXPosForVerticalArrowNavigation constant.
        * khtml/khtml_selection.cpp:
        (KHTMLSelection::modify): Add cases for UP and DOWN navigation
        (KHTMLSelection::xPosForVerticalArrowNavigation): New helper.
        * khtml/khtml_selection.h: Add UP and DOWN constants to EDirection enum.
        * khtml/khtmlpart_p.h: Declare storage for m_xPosForVerticalArrowNavigation,
        the value used for maintaining x position when doing vertical arrow
        * khtml/rendering/render_block.cpp:
        (khtml::RenderBlock::positionForCoordinates): Improved this function to
        handle deficiencies exposed when trying to implement new behavior.
        * khtml/rendering/render_br.cpp:
        (RenderBR::positionForCoordinates): Added implementation of this virtual function.
        * khtml/rendering/render_br.h: Declare implementation for positionForCoordinates virtual function.
        * khtml/rendering/render_replaced.cpp:
        (RenderReplaced::positionForCoordinates): Improved this function to
        handle deficiencies exposed when trying to implement new behavior.
        * khtml/rendering/render_text.cpp:
        (InlineTextBox::offsetForPosition): Remove left/right "bounds" check here.
        (RenderText::positionForCoordinates): Improved this function to
        handle deficiencies exposed when trying to implement new behavior.
        * khtml/xml/dom_position.cpp:
        (inlineBoxForRenderer): Moved to top of file so all code in the file can see this static function.
        (renderersOnDifferentLine): Ditto.
        (nextRenderedEditable): Ditto.
        (previousRenderedEditable): Ditto.
        (DOMPosition::previousLinePosition): New function. Implements the guts of up/down navigation.
        (DOMPosition::nextLinePosition): Ditto.
        * khtml/xml/dom_position.h: Added declarations for nextLinePosition and previousLinePosition.
        * kwq/WebCoreBridge.h: Add WebSelectUp and WebSelectDown constants.
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge alterCurrentSelection:direction:granularity:]): Handles saving and restoring the
        x position used for doing vertical arrow navigation.


        Reviewed by Hyatt

        * WebView.subproj/WebView.m:
        (-[WebView moveDown:]): Added implementation.
        (-[WebView moveUp:]): Added implementation.

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

18 years ago Reviewed by Dave.
mjs [Mon, 19 Apr 2004 21:26:40 +0000 (21:26 +0000)]
    Reviewed by Dave.

Optimize prepend using the shared substring optimization. Also,
limit the applicability of shared append and shared prepend. If
you overdo it, it does more harm than good, because you create a
bunch of strings that are disqualified from future shared
append/prepend, for not much immediate savings in allocate/copy

        * kjs/ustring.cpp:
        * kjs/ustring.h:

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

18 years ago Added support for pasting frames via WebArchives.
cblu [Mon, 19 Apr 2004 16:55:00 +0000 (16:55 +0000)]
Added support for pasting frames via WebArchives.

        Reviewed by kocienda.

        * WebView.subproj/WebDataSource.m:
        (-[WebDataSource _addSubframeArchives:]): renamed, now allows subframe archives to be added at anytime
        (-[WebDataSource _popSubframeArchiveWithName:]): renamed, now deletes the returned subframe to consume less memory
        (-[WebDataSource _replaceSelectionWithWebArchive:]): added support for subframes
        * WebView.subproj/WebDataSourcePrivate.h:
        * WebView.subproj/WebFrame.m:
        (-[WebFrame _loadRequest:subresources:subframeArchives:]): call renamed methods
        (-[WebFrame _loadURL:intoChild:]): ditto
        * WebView.subproj/WebHTMLRepresentation.m:
        (-[WebHTMLRepresentation loadArchive]): ditto

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

18 years ago Reviewed by Richard.
mjs [Mon, 19 Apr 2004 00:17:56 +0000 (00:17 +0000)]
    Reviewed by Richard.

No more need for Completion or Reference to privately inherit from
Value, none of the superclass functionality is used.

        * kjs/completion.h:
        * kjs/reference.h:

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

18 years ago Reviewed by Hyatt
kocienda [Sat, 17 Apr 2004 00:06:07 +0000 (00:06 +0000)]
    Reviewed by Hyatt

        * khtml/css/css_computedstyle.cpp:
        (DOM::CSSComputedStyleDeclarationImpl::getPropertyCSSValue): Added implementations for

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

18 years ago Subresources weren't being archived for LINK tags.
cblu [Fri, 16 Apr 2004 23:59:35 +0000 (23:59 +0000)]
Subresources weren't being archived for LINK tags.

        Reviewed by kocienda.

        * khtml/xml/dom_nodeimpl.cpp:
        (NodeImpl::recursive_toHTMLWithOptions): indent tweak
        * kwq/DOMHTML.mm:
        (-[DOMHTMLLinkElement _linkElementImpl]): C++ casting voodoo to make methods like rel and href work correctly

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

18 years ago Reviewed by Hyatt
kocienda [Fri, 16 Apr 2004 23:29:17 +0000 (23:29 +0000)]
    Reviewed by Hyatt

        * khtml/html/html_elementimpl.cpp:
        (HTMLElementImpl::isContentEditable): Call getDocument()->updateRendering() to make sure
        outstanding changes for this attribute are applied.
        (HTMLElementImpl::contentEditable): Call getDocument()->updateRendering() to make sure
        outstanding changes for this attribute are applied.
        (HTMLElementImpl::setContentEditable): Call enabled.isEmpty() before strcasecmp(enabled, "true").
        It's cheaper.

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

18 years ago Reviewed by Hyatt
kocienda [Fri, 16 Apr 2004 23:18:54 +0000 (23:18 +0000)]
    Reviewed by Hyatt

        * khtml/editing/htmlediting_impl.cpp: New helper.
        (DeleteSelectionCommandImpl::containsOnlyWhitespace): Fix deleting collapsed whitespace
        at the end of a line where text has flowed to the next line and the caret is at the
        beginning of the next line.
        (DeleteSelectionCommandImpl::doApply): Updated for new helper.
        * khtml/editing/htmlediting_impl.h:
        * layout-tests/editing/deleting/delete-line-end-ws-001-expected.txt: Added.
        * layout-tests/editing/deleting/delete-line-end-ws-001.html: Added.
        * layout-tests/editing/deleting/delete-line-end-ws-002-expected.txt: Added.
        * layout-tests/editing/deleting/delete-line-end-ws-002.html: Added.

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

18 years agoset version to '138u'. the tree is open!
vicki [Fri, 16 Apr 2004 23:03:15 +0000 (23:03 +0000)]
set version to '138u'.  the tree is open!

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

18 years agoSafari-137 stamp
vicki [Fri, 16 Apr 2004 22:59:25 +0000 (22:59 +0000)]
Safari-137 stamp

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

18 years agoAhh! I checked in changes in my tree when I rolled out. Rolling those changes out.
kocienda [Fri, 16 Apr 2004 22:25:51 +0000 (22:25 +0000)]
Ahh! I checked in changes in my tree when I rolled out. Rolling those changes out.

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

18 years agoRolling out last change. Tree was closed.
kocienda [Fri, 16 Apr 2004 22:24:41 +0000 (22:24 +0000)]
Rolling out last change. Tree was closed.

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

18 years ago Reviewed by Hyatt
kocienda [Fri, 16 Apr 2004 22:13:49 +0000 (22:13 +0000)]
    Reviewed by Hyatt

        * khtml/editing/htmlediting_impl.cpp:
        (DeleteSelectionCommandImpl::containsOnlyWhitespace): New helper.
        (DeleteSelectionCommandImpl::doApply): Fix deleting collapsed whitespace at the end of a line
        where text has flowed to the next line and the caret is at the beginning of the next line.
        * khtml/editing/htmlediting_impl.h: Updated for new helper.
        * layout-tests/editing/deleting/delete-line-end-ws-001-expected.txt: Added.
        * layout-tests/editing/deleting/delete-line-end-ws-001.html: Added.
        * layout-tests/editing/deleting/delete-line-end-ws-002-expected.txt: Added.
        * layout-tests/editing/deleting/delete-line-end-ws-002.html: Added.

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

18 years agoWebKit:
rjw [Fri, 16 Apr 2004 21:09:51 +0000 (21:09 +0000)]
Added an SPI to allow ObjC instances to be easily bound to
JS.  This is needed by the dashboard guys for their prototyping.
Eventually they will use new API.

        Reviewed by Chris.

        * WebView.subproj/WebView.m:
        (-[WebView _bindObject:withName:toFrame:]):
        * WebView.subproj/WebViewPrivate.h:

Added an SPI to allow ObjC instances to be easily bound to
JS.  This is needed by the dashboard guys for their prototyping.
Eventually they will use new API.

        Reviewed by Chris.

        * kwq/KWQKHTMLPart.h:
        * kwq/KWQKHTMLPart.mm:
        * kwq/WebCoreBridge.h:
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge bindObject:withName:]):

Added interpreter lock protection around object creation.

        Reviewed by Chris.

        * bindings/runtime.cpp:

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

18 years agoWebCore:
cblu [Fri, 16 Apr 2004 19:51:34 +0000 (19:51 +0000)]

Added DOMHTMLEmbedElement as a DOM extension since EMBED is represented in our DOM even though its not part of the spec.
Added all DOMCore and DOMHTML symbols to WebCore's symbols file.
Removed isSubresourceURLAttribute from dom node. This was only used for the WebArchive feature and all that work is now done in WebKit.

        Reviewed by kocienda.

        * WebCore-combined.exp:
        * WebCore.exp:
        * khtml/html/html_baseimpl.cpp:
        (HTMLBodyElementImpl::isURLAttribute): renamed from isSubresourceURLAttribute. As a convenience to subclasses, dom_elementimpl would call isSubresourceURLAttribute in isURLAttribute, but this is no longer done
        (HTMLFrameElementImpl::isURLAttribute): ditto
        (HTMLIFrameElementImpl::isURLAttribute): ditto
        * khtml/html/html_baseimpl.h:
        * khtml/html/html_formimpl.cpp:
        (HTMLInputElementImpl::isURLAttribute): ditto
        * khtml/html/html_formimpl.h:
        * khtml/html/html_headimpl.cpp:
        (HTMLScriptElementImpl::isURLAttribute): ditto
        * khtml/html/html_headimpl.h:
        * khtml/html/html_imageimpl.cpp:
        (HTMLImageElementImpl::isURLAttribute): ditto
        * khtml/html/html_imageimpl.h:
        * khtml/html/html_objectimpl.cpp:
        (HTMLEmbedElementImpl::isURLAttribute): ditto
        (HTMLObjectElementImpl::isURLAttribute): ditto
        (HTMLParamElementImpl::isURLAttribute): ditto
        * khtml/html/html_objectimpl.h:
        * khtml/html/html_tableimpl.cpp:
        (HTMLTableElementImpl::isURLAttribute): ditto
        (HTMLTableCellElementImpl::isURLAttribute): ditto
        * khtml/html/html_tableimpl.h:
        * khtml/xml/dom2_rangeimpl.cpp:
        (RangeImpl::toHTMLWithOptions): take a node list (see below)
        * khtml/xml/dom2_rangeimpl.h:
        * khtml/xml/dom_elementimpl.cpp:
        * khtml/xml/dom_elementimpl.h:
        * khtml/xml/dom_nodeimpl.cpp:
        (NodeImpl::recursive_toHTMLWithOptions): append copied nodes to a list of nodes so that WebKit can operate on them
        * khtml/xml/dom_nodeimpl.h:
        * kwq/DOM.mm:
        (+[DOMNode _nodeWithImpl:]): added support for HTML types
        * kwq/DOMExtensions.h:
        * kwq/DOMHTML.mm:
        (-[DOMHTMLPreElement setWidth:]):
        (-[DOMHTMLEmbedElement _embedElementImpl]):
        (-[DOMHTMLEmbedElement align]):
        (-[DOMHTMLEmbedElement setAlign:]):
        (-[DOMHTMLEmbedElement height]):
        (-[DOMHTMLEmbedElement setHeight:]):
        (-[DOMHTMLEmbedElement name]):
        (-[DOMHTMLEmbedElement setName:]):
        (-[DOMHTMLEmbedElement src]):
        (-[DOMHTMLEmbedElement setSrc:]):
        (-[DOMHTMLEmbedElement type]):
        (-[DOMHTMLEmbedElement setType:]):
        (-[DOMHTMLEmbedElement width]):
        (-[DOMHTMLEmbedElement setWidth:]):
        (-[DOMHTMLTableElement background]):
        (-[DOMHTMLTableElement setBackground:]):
        (-[DOMHTMLTableCellElement background]): new extension
        (-[DOMHTMLTableCellElement setBackground:]): ditto
        * kwq/WebCoreBridge.h:
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge nodesFromList:]): new
        (-[WebCoreBridge markupStringFromNode:nodes:]): return a list of nodes instead of subresource URLs so WebKit can operate on the nodes
        (-[WebCoreBridge markupStringFromRange:nodes:]): ditto


Fixed: <rdar://problem/3587599>: Mail Page, Web Archives don't preserve subframes
Moved code that assembled subresource URLs from DOM nodes from WebCore to WebKit.

        Reviewed by rjw.

        * DOM.subproj/DOMExtensions.h: copied from WebCore
        * DOM.subproj/WebDOMOperations.h:
        * DOM.subproj/WebDOMOperations.m:
        (-[DOMNode webArchive]): call renamed methods
        (-[DOMNode markupString]): ditto
        (-[DOMNode _URLsFromSelectors:]): new, returns array of URLs given selectors
        (-[DOMNode _subresourceURLs]): new, base class does nothing, subclasses call _URLsFromSelectors with URL selectors
        (-[DOMDocument webFrame]): new
        (-[DOMRange webArchive]): call renamed methods
        (-[DOMRange markupString]): ditto
        (-[DOMHTMLBodyElement _subresourceURLs]): new
        (-[DOMHTMLInputElement _subresourceURLs]): new
        (-[DOMHTMLLinkElement _subresourceURLs]): new
        (-[DOMHTMLScriptElement _subresourceURLs]): new
        (-[DOMHTMLImageElement _subresourceURLs]): new
        (-[DOMHTMLEmbedElement _subresourceURLs]): new
        (-[DOMHTMLObjectElement _subresourceURLs]): new
        (-[DOMHTMLParamElement _subresourceURLs]): new
        (-[DOMHTMLTableElement _subresourceURLs]): new
        (-[DOMHTMLTableCellElement _subresourceURLs]): new
        * WebKit.pbproj/project.pbxproj:
        * WebView.subproj/WebArchive.h:
        * WebView.subproj/WebArchive.m:
        (-[WebArchivePrivate dealloc]): release new subframeArchives ivar
        (-[WebArchive initWithMainResource:subresources:subframeArchives:]): take subframeArchives
        (-[WebArchive _initWithPropertyList:]): new, recursively creates WebArchives
        (-[WebArchive initWithData:]): call _initWithPropertyList
        (-[WebArchive subframeArchives]): new
        (-[WebArchive _propertyListRepresentation]): new, recursively creates property lists of WebArchives
        (-[WebArchive data]): call _propertyListRepresentation
        * WebView.subproj/WebBaseResourceHandleDelegate.m:
        (-[WebBaseResourceHandleDelegate saveResource]): call renamed methods
        * WebView.subproj/WebDataSource.m:
        (-[WebDataSourcePrivate dealloc]): release new pendingSubframeArchives ivar
        (-[WebDataSource _archiveWithMarkupString:nodes:]): renamed and reimplemented, handles subframes
        (-[WebDataSource _archive]): new
        (-[WebDataSource _setPendingSubframeArchives:]): new
        (-[WebDataSource _archiveForFrameName:]): new
        * WebView.subproj/WebDataSourcePrivate.h:
        * WebView.subproj/WebFrame.m:
        (-[WebFrame loadArchive:]): handle subframes
        (-[WebFrame _loadRequest:subresources:subframeArchives:]): ditto
        (-[WebFrame _loadURL:intoChild:]): use the subframe archive if we have it
        (-[WebFrame loadRequest:]): call renamed methods
        * WebView.subproj/WebFramePrivate.h:
        * WebView.subproj/WebHTMLRepresentation.m:
        (-[WebHTMLRepresentation loadWebArchive]): call renamed methods and handle subframes
        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView _selectedArchive:]): call renamed methods
        (-[WebHTMLView _pasteFromPasteboard:]): call renamed methods
        * WebView.subproj/WebHTMLViewPrivate.h:
        * WebView.subproj/WebImageRepresentation.h:
        * WebView.subproj/WebImageRepresentation.m: instead of storing some items from the data source, just store the data source
        (-[WebImageRepresentation dealloc]): removed use of deleted ivars
        (-[WebImageRepresentation URL]): use dataSource instead of ivar
        (-[WebImageRepresentation doneLoading]): use new boolean ivar
        (-[WebImageRepresentation setDataSource:]): store the data source
        (-[WebImageRepresentation receivedData:withDataSource:]): use dataSource instead of ivar
        (-[WebImageRepresentation receivedError:withDataSource:]): ditto
        (-[WebImageRepresentation finishedLoadingWithDataSource:]): ditto
        (-[WebImageRepresentation title]): ditto
        (-[WebImageRepresentation data]): ditto
        (-[WebImageRepresentation filename]): ditto
        (-[WebImageRepresentation archive]): ditto
        * WebView.subproj/WebResource.h:
        * WebView.subproj/WebResource.m:
        (-[WebResourcePrivate dealloc]): release new frame name ivar
        (-[WebResource initWithData:URL:MIMEType:textEncodingName:frameName:]): take a frame name
        (-[WebResource frameName]): new
        (-[WebResource _initWithPropertyList:]): handle frame name
        (-[WebResource _initWithCachedResponse:originalURL:]): call renamed methods
        (-[WebResource _propertyListRepresentation]):
        * WebView.subproj/WebResourcePrivate.h: handle frame name


        Reviewed by rjw.

        * BrowserDocument.m:
        (-[BrowserDocument mailPageAddress:]): call renamed methods

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

18 years ago Reviewed by Ken.
mjs [Fri, 16 Apr 2004 18:54:21 +0000 (18:54 +0000)]
    Reviewed by Ken.

Another JavaScript speed improvement: use the mechanism from
string append optimization to make taking a substring fast, again
sharing the buffer.

A further 22% improvement on the 24fun string speed test.

        * kjs/ustring.cpp:
        * kjs/ustring.h:

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

18 years ago Fix for 3624335, bugs with overflow and positioned objects. The scrollbar didn...
hyatt [Fri, 16 Apr 2004 01:07:35 +0000 (01:07 +0000)]
Fix for 3624335, bugs with overflow and positioned objects.  The scrollbar didn't properly update
as you changed the sizes of positioned objects inside an overflow block.

        Reviewed by rjw

        * khtml/rendering/render_block.cpp:
        * khtml/rendering/render_flexbox.cpp:
        * khtml/rendering/render_layer.cpp:

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

18 years ago Reviewed by Dave
kocienda [Thu, 15 Apr 2004 23:23:11 +0000 (23:23 +0000)]
    Reviewed by Dave

        Improved selection behavior. As part of this work, I removed
        almost all of the checkSelectionPoint() functions, leaving
        only those associated with fonts, and all of the
        checkSelectionPointIgnoringContinuations() functions. Each
        of these has been replaced by a new function called
        positionForCoordinates(), which returns a DOMPosition.

        * WebCore.pbproj/project.pbxproj:
        * khtml/khtml_events.cpp:
        (khtml::MouseEvent::offset): Converted to use positionForCoordinates.
        * khtml/khtml_part.cpp: Ditto.
        (KHTMLPart::handleMousePressEventDoubleClick): Ditto.
        (KHTMLPart::handleMousePressEventTripleClick): Ditto.
        (KHTMLPart::handleMousePressEventSingleClick): Ditto.
        (KHTMLPart::handleMouseMoveEventSelection): Ditto.
        (KHTMLPart::khtmlMouseReleaseEvent): Ditto.
        * khtml/khtml_part.h:
        * khtml/rendering/render_block.cpp:
        (khtml::RenderBlock::positionForBox): New helper.
        (khtml::RenderBlock::positionForRenderer): New helper.
        (khtml::RenderBlock::positionForCoordinates): New selection-node-offset-finder method.
        * khtml/rendering/render_block.h:
        * khtml/rendering/render_br.cpp: Removed checkSelectionPointIgnoringContinuations.
        No special behavior is needed for this class anymore.
        * khtml/rendering/render_br.h: Ditoo.
        * khtml/rendering/render_container.cpp:
        (RenderContainer::positionForCoordinates): New selection-node-offset-finder method.
        * khtml/rendering/render_container.h:
        * khtml/rendering/render_line.cpp:
        (InlineBox::firstLeafChild): New helper.
        (InlineBox::lastLeafChild): New helper.
        (InlineFlowBox::firstLeafChild): New helper.
        (InlineFlowBox::lastLeafChild): New helper.
        * khtml/rendering/render_line.h:
        * khtml/rendering/render_object.cpp:
        (RenderObject::firstLeafChild): New helper.
        (RenderObject::lastLeafChild): New helper.
        * khtml/rendering/render_object.h:
        * khtml/rendering/render_replaced.cpp:
        (RenderReplaced::positionForCoordinates): New selection-node-offset-finder method.
        * khtml/rendering/render_replaced.h:
        * khtml/rendering/render_text.cpp:
        (InlineTextBox::offsetForPosition): New helper, replaces checkSelectionPoint()
        (RenderText::positionForCoordinates): New selection-node-offset-finder method.
        * khtml/rendering/render_text.h:
        * khtml/xml/dom_nodeimpl.cpp: Added positionForCoordinates() convenience here. This
        checks to see if the node has a renderer before doing the position check.
        * khtml/xml/dom_nodeimpl.h: Ditto.
        * kwq/DOM.mm:
        (-[DOMNode isContentEditable]): Added this unrelated method, since without it, I crash when dragging an image.
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge moveCaretToPoint:]): Converted to use positionForCoordinates.

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

18 years ago Fix for 3603455, block truncation support.
hyatt [Thu, 15 Apr 2004 23:15:19 +0000 (23:15 +0000)]
Fix for 3603455, block truncation support.

        Reviewed by kocienda

        * khtml/css/cssparser.cpp:
        * khtml/css/cssproperties.c:
        * khtml/css/cssproperties.h:
        * khtml/css/cssproperties.in:
        * khtml/css/cssstyleselector.cpp:
        * khtml/ecma/kjs_css.cpp:
        * khtml/rendering/render_block.cpp:
        * khtml/rendering/render_block.h:
        * khtml/rendering/render_flexbox.cpp:
        * khtml/rendering/render_style.cpp:
        * khtml/rendering/render_style.h:

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

18 years ago Make sure isOpaque returns NO when the WebHTMLVIew doesn't draw its background.
hyatt [Thu, 15 Apr 2004 22:28:07 +0000 (22:28 +0000)]
Make sure isOpaque returns NO when the WebHTMLVIew doesn't draw its background.

        Reviewed by darin

        * WebView.subproj/WebFrameView.m:
        (-[WebFrameView isOpaque]):
        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView isOpaque]):

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

18 years ago * WebView.subproj/WebPreferencesPrivate.h:
sullivan [Thu, 15 Apr 2004 17:50:43 +0000 (17:50 +0000)]
    * WebView.subproj/WebPreferencesPrivate.h:
        added comments

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

18 years ago Updated fix for 3576315. Don't hardcode 22 as the titlebar
rjw [Thu, 15 Apr 2004 00:51:28 +0000 (00:51 +0000)]
Updated fix for 3576315.  Don't hardcode 22 as the titlebar
height.  (Note, other places in CarbonWindowFrame DO hardcode
window geometry information, yuck!).

        Reviewed by Hyatt.

        * Carbon.subproj/CarbonWindowFrame.m:

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

18 years agoRemove garbage from the render table header.
hyatt [Wed, 14 Apr 2004 23:05:14 +0000 (23:05 +0000)]
Remove garbage from the render table header.

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

18 years agoWebKit:
sullivan [Wed, 14 Apr 2004 20:39:56 +0000 (20:39 +0000)]

        - changed stealth mode preference name from "historyIsFrozen"
        to "privateBrowsingEnabled"

        Reviewed by Darin.

        * WebView.subproj/WebFrame.m:
        (-[WebFrame _transitionToCommitted:]):
        updated for method name change

        * WebView.subproj/WebPreferences.m:
        changed preference key name
        (+[WebPreferences initialize]):
        updated for preference key name change
        (-[WebPreferences setPrivateBrowsingEnabled:]):
        changed name from setHistoryIsFrozen:
        (-[WebPreferences privateBrowsingEnabled]):
        changed name from historyIsFrozen:

        * WebView.subproj/WebPreferencesPrivate.h:
        changed declared method names

        * English.lproj/StringsNotToBeLocalized.txt:
        updated for this and other recent changes


        fixed these bugs:
        <rdar://problem/3622190>: stealth mode menu item should be "Start Private Browsing�Stop Private Browsing"
        <rdar://problem/3622479>: Reword Private Browsing confirmation to use Ron's edited wording
        <rdar://problem/3622496>: stealth mode should automatically turn off between sessions

        Also, updated for WebKit stealth mode preference name change

        Reviewed by Darin.

        * AppController.m:
        (-[AppController applicationDidFinishLaunching:]):
        always turn off stealth mode on launch (previously did this only on Panther)
        (-[AppController confirmEnableStealthMode]):
        reworded confirmation title and message; also updated for preference name change
        (-[AppController toggleStealthMode:]):
        updated for preference name change
        (-[AppController validateUserInterfaceItem:]):
        use "Start/Stop" instead of checkmark to distinguish states; also updated for
        preference name change

        * BrowserWindowController.m:
        (-[BrowserWindowController searchField:shouldRememberSearchString:]):
        updated for preference name change

        * DownloadProgressEntry.m:
        (-[DownloadProgressEntry setDownloadStage:]):
        updated for preference name change

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

        * English.lproj/MainMenu.nib:
        changed menu item in the nib to "Start Private Browsing�, though this
        doesn't really matter since the toggling menu item title comes from the code now.

        * FormCompletionController.m:
        (+[FormCompletionController shouldSaveFormData]):
        updated for preference name change
        (+[FormCompletionController shouldSaveUsernamesAndPasswords]):

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

18 years ago Reviewed by Darin.
mjs [Wed, 14 Apr 2004 02:33:59 +0000 (02:33 +0000)]
    Reviewed by Darin.

- fixed <rdar://problem/3600695>: String manipulation in JavaScript 24fun test is very slow (slow)
- fixed <rdar://problem/3600691>: Table generation test is really slow
- fixed <rdar://problem/3600661>: 24fun date test is really slow

80% speedup on the string test, lesser speedups on the other two.

Two different optimizations here:

1) Avoid large overhead of scanning strings to see if they are all
ASCII before numeric conversion.

        * kjs/nodes.cpp:
        (AssignNode::evaluate): Don't convert to integer until we know for
sure the operation will need it. Attempting to convert strings to
numbers is a waste when they are being appended with +=.

2) Avoid huge cost of appending strings.

This is done by allowing multiple strings to share a buffer but
actually use different ranges of it. The first time a string is
appended to, we start leaving at least 10% extra space in the
buffer, so doing N appends to the same string takes O(log N)
mallocs instead of O(N).

        * kjs/identifier.cpp:
        * kjs/ustring.cpp:
        * kjs/ustring.h:

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

18 years agoWebCore:
cblu [Wed, 14 Apr 2004 01:00:47 +0000 (01:00 +0000)]

- Removed WebCoreElementIsEditableKey. This functionality is available via [DOMNode isContentEditable].

        Reviewed by rjw.

        * WebCore-combined.exp:
        * WebCore.exp:
        * kwq/WebCoreBridge.h:
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge elementAtPoint:]): removed use of WebCoreElementIsEditableKey
        (-[WebCoreBridge URLWithRelativeString:]): new method for WebKit API


- Added WebElementDOMNodeKey as a potential API so that clients can get the node from an element dictionary.
- Removed WebElementIsEditableKey. This functionality is available via [DOMNode isContentEditable].

        Reviewed by rjw.

        * DOM.subproj/WebDOMOperations.h:
        * DOM.subproj/WebDOMOperations.m:
        (-[DOMDocument URLWithRelativeString:]): new potential API
        * WebView.subproj/WebDefaultContextMenuDelegate.m:
        (-[WebDefaultUIDelegate webView:contextMenuItemsForElement:defaultMenuItems:]): indenting tweak
        (-[WebDefaultUIDelegate copyImageToClipboard:]): use WebElementDOMNodeKey
        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView _handleMouseDragged:]): use WebElementDOMNodeKey
        (-[WebHTMLView _dragOperationForDraggingInfo:]): use isContentEditable
        * WebView.subproj/WebView.h:
        * WebView.subproj/WebView.m:
        * WebView.subproj/WebViewPrivate.h:

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

18 years agoAdd overflow test for overflow:scroll body quirk bug.
hyatt [Tue, 13 Apr 2004 23:02:01 +0000 (23:02 +0000)]
Add overflow test for overflow:scroll body quirk bug.

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

18 years ago Fix for 3559764, make sure overflow is applied consistently using a separate bit...
hyatt [Tue, 13 Apr 2004 22:57:12 +0000 (22:57 +0000)]
Fix for 3559764, make sure overflow is applied consistently using a separate bit on render objects, so that
the body scroll quirk can easily disable overflow even when it is present on the style.

        Reviewed by kocienda

        * khtml/ecma/kjs_dom.cpp:
        * khtml/rendering/bidi.cpp:
        * khtml/rendering/render_block.cpp:
        * khtml/rendering/render_block.h:
        * khtml/rendering/render_box.cpp:
        * khtml/rendering/render_flexbox.cpp:
        * khtml/rendering/render_flow.cpp:
        * khtml/rendering/render_layer.cpp:
        * khtml/rendering/render_object.cpp:
        * khtml/rendering/render_object.h:
        * khtml/rendering/render_style.h:
        * khtml/rendering/render_table.cpp:
        * khtml/rendering/render_table.h:

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

18 years ago Fixed deployment build failure.
cblu [Tue, 13 Apr 2004 17:57:46 +0000 (17:57 +0000)]
Fixed deployment build failure.

        Reviewed by john.

        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView _handleMouseDragged:]): removed use of fileWrapper variable

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

18 years ago Reviewed by John.
mjs [Mon, 12 Apr 2004 22:19:23 +0000 (22:19 +0000)]
    Reviewed by John.

- fix deployment build by avoiding deployment-only warning.

        * kjs/scope_chain.cpp:

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

18 years ago Fix for 3556036, make sure that when the position changes via style that all render...
hyatt [Mon, 12 Apr 2004 21:13:32 +0000 (21:13 +0000)]
Fix for 3556036, make sure that when the position changes via style that all render layer
descendants simply immediately repaint.

        Reviewed by kocienda

        * khtml/rendering/render_layer.cpp:
        * khtml/rendering/render_layer.h:
        * khtml/rendering/render_object.cpp:

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

18 years agoWebCore:
cblu [Mon, 12 Apr 2004 20:46:13 +0000 (20:46 +0000)]

- Fixed build failure by removing references to WebArchive in WebCore.
- For HTML copy/paste, relative URLs are now made absolute at paste time instead of at copy time. This allows relative URLs to be kept relative if the destination page has the same base URL as the source page.

        Reviewed by kocienda.

        * khtml/editing/htmlediting.cpp:
        (PasteMarkupCommand::PasteMarkupCommand): take the base URL of the clipping
        * khtml/editing/htmlediting.h:
        * khtml/editing/htmlediting_impl.cpp:
        (PasteMarkupCommandImpl::PasteMarkupCommandImpl): take the base URL of the clipping
        (PasteMarkupCommandImpl::doApply): if we have a base URL and it is different than the base URL of the document, fix the URLs in the new DOM tree
        * khtml/editing/htmlediting_impl.h:
        * khtml/xml/dom2_rangeimpl.cpp:
        (RangeImpl::toHTMLWithOptions): removed completeURLs param
        * khtml/xml/dom2_rangeimpl.h:
        * khtml/xml/dom_nodeimpl.cpp:
        (NodeImpl::recursive_toHTMLWithOptions): removed completeURLs param
        (NodeImpl::recursive_toHTML): ditto
        (NodeImpl::recursive_completeURLs): new
        * khtml/xml/dom_nodeimpl.h:
        * kwq/WebCoreBridge.h:
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge markupStringFromNode:subresourceURLStrings:]): call recursive_toHTML with less params
        (-[WebCoreBridge markupStringFromRange:subresourceURLStrings:]): ditto
        (-[WebCoreBridge replaceSelectionWithMarkupString:baseURLString:]): take a base URL


Factored out WebArchive to DOM code so that it could be used by both [WebHTMLView _pasteFromPasteboard:] and [WebView insertWebArchive:replacingDOMRange:].

        Reviewed by kocienda.

        * WebView.subproj/WebDataSource.m:
        (-[WebDataSource _replaceSelectionWithMarkupString:baseURL:]): moved from WebHTMLView
        (-[WebDataSource _replaceSelectionWithImageResource:]): ditto
        (-[WebDataSource _replaceSelectionWithWebArchive:]): ditto
        * WebView.subproj/WebDataSourcePrivate.h:
        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView _replaceSelectionWithMarkupString:]): renamed
        (-[WebHTMLView _pasteFromPasteboard:]): call renamed methods
        * WebView.subproj/WebView.m:
        (-[WebView insertMarkupString:replacingDOMRange:]): call renamed methods
        (-[WebView insertWebArchive:replacingDOMRange:]): have data source handle the archive instead of the bridge

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

18 years agoWebCore:
kocienda [Mon, 12 Apr 2004 18:41:51 +0000 (18:41 +0000)]

        Reviewed by Dave

        Added execCommand support for cut/copy/paste.

        * khtml/xml/dom_docimpl.cpp:
        (DocumentImpl::execCommand): Added cut/copy/paste atoms and added else if cases
        for the commands.
        * kwq/KWQKHTMLPart.h:
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::issueCutCommand): Glue for calling from WebCore to do a cut in Cocoa.
        (KWQKHTMLPart::issueCopyCommand): Same as above, but for copy.
        (KWQKHTMLPart::issuePasteCommand): Same as above, but for paste.
        * kwq/WebCoreBridge.h: Declared issueCutCommand, issueCopyCommand, and issuePasteCommand
        to be implemented on the WebKit side of the bridge.
        * layout-tests/editing/editing.js: Added cut/copy/paste support to js library to support
        making layout tests.
        * layout-tests/editing/pasteboard/copy-paste-text-001-expected.txt: Added.
        * layout-tests/editing/pasteboard/copy-paste-text-001.html: Added.
        * layout-tests/editing/pasteboard/cut-paste-text-002-expected.txt: Added.
        * layout-tests/editing/pasteboard/cut-paste-text-002.html: Added.
        * layout-tests/editing/pasteboard/cut-text-001-expected.txt: Added.
        * layout-tests/editing/pasteboard/cut-text-001.html: Added.


        Reviewed by Dave

        Added execCommand support for cut/copy/paste.

        * WebCoreSupport.subproj/WebBridge.m:
        (-[WebBridge issueCutCommand]): Glue for calling from WebCore to do a cut in Cocoa.
        (-[WebBridge issueCopyCommand]): Same as above, but for copy.
        (-[WebBridge issuePasteCommand]): Same as above, but for paste.
        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView copy:]): Move this to private implementation category so the bridge can see it.
        (-[WebHTMLView cut:]): Ditto.
        (-[WebHTMLView paste:]): Ditto.
        * WebView.subproj/WebHTMLViewPrivate.h: Move copy;, cut:, and paste: to private implementation
        category so the bridge can see it.
        * WebView.subproj/WebView.m:
        (-[WebView copy:]): Implemented by calling WebHTMLView to do the work.
        (-[WebView cut:]): Ditto.
        (-[WebView paste:]): Ditto.
        * WebView.subproj/WebViewPrivate.h: Added all the NSReponder methods we plan to implement as
        part of the WebKit editing API.

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

18 years ago Reviewed by John
kocienda [Mon, 12 Apr 2004 17:16:47 +0000 (17:16 +0000)]
    Reviewed by John

        Some delete and insert cleanups.

        * khtml/editing/htmlediting_impl.cpp:
        (DeleteSelectionCommandImpl::doApply): For ending position case 1,
        the caret should be placed before the first child of the containing block,
        not before the containing block itself. Also, add some code to handle
        converting nbsp's back to regular spaces. This will need to be improved
        some day to convert only nbsp's added by the editor to make rendering come out right.
        (TypingCommandImpl::issueCommandForDeleteKey): Make deleting collapsible whitespace part
        of the work of deleting a selection, rather than something that needs to be done by a
        user of DeleteSelectionCommandImpl. This makes it impossible to leave out
        this essential step.
        (TypingCommandImpl::deleteKeyPressed): We can't use a possible optimization here until
        the code to do deletions properly has been factored better. Big FIXME added.
        * layout-tests/editing/deleting/delete-block-contents-001-expected.txt: Updated for
        ending position case 1 behavior change.
        * layout-tests/editing/deleting/delete-block-contents-002-expected.txt: Ditto.
        * layout-tests/editing/deleting/delete-block-contents-003-expected.txt: Ditto.

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

18 years agoWebCore:
kocienda [Fri, 9 Apr 2004 23:30:18 +0000 (23:30 +0000)]

        Reviewed by Darin

        Added support for methods added to flesh out the WebKit
        editing API.

        * khtml/khtml_part.h: Removed pasteMarkupString and deleteSelection functions.
        All this work is now done in WebCoreBridge.
        * kwq/WebCoreBridge.h:
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge isSelectionEditable]): Added a FIXME.
        (-[WebCoreBridge setDrawsBackground:]): Moved this since CVS merged this in the
        middle of editing code.
        (-[WebCoreBridge replaceSelectionWithNode:]): New method.
        (-[WebCoreBridge replaceSelectionWithText:]): Replaces insertText:
        (-[WebCoreBridge replaceSelectionWithMarkupString:]): New method.
        (-[WebCoreBridge replaceSelectionWithWebArchive:]): New method.
        (-[WebCoreBridge replaceSelectionWithNewline]): Replaces insertNewline:
        (-[WebCoreBridge deleteSelection]): New method.
        (-[WebCoreBridge applyStyle:toElementsInDOMRange:]): New method.


        Reviewed by Darin

        Stubbed in the entire WebKit editing API, improving some
        methods already present in minor ways, and adding those
        methods not yet present.

        * WebCoreSupport.subproj/WebBridge.m:
        (-[WebBridge editingKeyDown:]):
        * WebView.subproj/WebDefaultEditingDelegate.m:
        (-[WebDefaultEditingDelegate webView:shouldChangeSelectedDOMRange:toDOMRange:stillSelecting:]):
        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView _pasteMarkupString:]):
        * WebView.subproj/WebView.m:
        (-[WebView _alterCurrentSelection:direction:granularity:]):
        (-[WebView _currentSelectionIsEditable]):
        (-[WebView computedStyleForElement:pseudoElement:]):
        (-[WebView _editingKeyDown:]):
        (-[WebView setEditable:]):
        (-[WebView isEditable]):
        (-[WebView setTypingStyle:]):
        (-[WebView typingStyle]):
        (-[WebView setSmartInsertDeleteEnabled:]):
        (-[WebView smartInsertDeleteEnabled]):
        (-[WebView setContinuousSpellCheckingEnabled:]):
        (-[WebView isContinuousSpellCheckingEnabled]):
        (-[WebView spellCheckerDocumentTag]):
        (-[WebView undoManager]):
        (-[WebView insertNode:replacingDOMRange:]):
        (-[WebView insertText:replacingDOMRange:]):
        (-[WebView insertMarkupString:replacingDOMRange:]):
        (-[WebView insertWebArchive:replacingDOMRange:]):
        (-[WebView deleteDOMRange:]):
        (-[WebView applyStyle:toElementsInDOMRange:]):
        (-[WebView centerSelectionInVisibleArea:]):
        (-[WebView moveBackward:]):
        (-[WebView moveBackwardAndModifySelection:]):
        (-[WebView moveDown:]):
        (-[WebView moveDownAndModifySelection:]):
        (-[WebView moveForward:]):
        (-[WebView moveForwardAndModifySelection:]):
        (-[WebView moveLeft:]):
        (-[WebView moveLeftAndModifySelection:]):
        (-[WebView moveRight:]):
        (-[WebView moveRightAndModifySelection:]):
        (-[WebView moveToBeginningOfDocument:]):
        (-[WebView moveToBeginningOfLine:]):
        (-[WebView moveToBeginningOfParagraph:]):
        (-[WebView moveToEndOfDocument:]):
        (-[WebView moveToEndOfLine:]):
        (-[WebView moveToEndOfParagraph:]):
        (-[WebView moveUp:]):
        (-[WebView moveUpAndModifySelection:]):
        (-[WebView moveWordBackward:]):
        (-[WebView moveWordBackwardAndModifySelection:]):
        (-[WebView moveWordForward:]):
        (-[WebView moveWordForwardAndModifySelection:]):
        (-[WebView moveWordLeft:]):
        (-[WebView moveWordLeftAndModifySelection:]):
        (-[WebView moveWordRight:]):
        (-[WebView moveWordRightAndModifySelection:]):
        (-[WebView pageDown:]):
        (-[WebView pageUp:]):
        (-[WebView scrollLineDown:]):
        (-[WebView scrollLineUp:]):
        (-[WebView scrollPageDown:]):
        (-[WebView scrollPageUp:]):
        (-[WebView selectAll:]):
        (-[WebView selectParagraph:]):
        (-[WebView selectLine:]):
        (-[WebView selectWord:]):
        (-[WebView copy:]):
        (-[WebView cut:]):
        (-[WebView paste:]):
        (-[WebView copyFont:]):
        (-[WebView pasteFont:]):
        (-[WebView delete:]):
        (-[WebView pasteAsPlainText:]):
        (-[WebView pasteAsRichText:]):
        (-[WebView changeFont:]):
        (-[WebView changeAttributes:]):
        (-[WebView changeDocumentBackgroundColor:]):
        (-[WebView changeColor:]):
        (-[WebView alignCenter:]):
        (-[WebView alignJustified:]):
        (-[WebView alignLeft:]):
        (-[WebView alignRight:]):
        (-[WebView indent:]):
        (-[WebView insertTab:]):
        (-[WebView insertBacktab:]):
        (-[WebView insertNewline:]):
        (-[WebView insertParagraphSeparator:]):
        (-[WebView changeCaseOfLetter:]):
        (-[WebView uppercaseWord:]):
        (-[WebView lowercaseWord:]):
        (-[WebView capitalizeWord:]):
        (-[WebView deleteForward:]):
        (-[WebView deleteBackward:]):
        (-[WebView deleteBackwardByDecomposingPreviousCharacter:]):
        (-[WebView deleteWordForward:]):
        (-[WebView deleteWordBackward:]):
        (-[WebView deleteToBeginningOfLine:]):
        (-[WebView deleteToEndOfLine:]):
        (-[WebView deleteToBeginningOfParagraph:]):
        (-[WebView deleteToEndOfParagraph:]):
        (-[WebView complete:]):
        (-[WebView checkSpelling:]):
        (-[WebView showGuessPanel:]):
        (-[WebView performFindPanelAction:]):
        (-[WebView startSpeaking:]):
        (-[WebView stopSpeaking:]):
        (-[WebView insertText:]):
        * WebView.subproj/WebViewPrivate.h:

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

18 years agoWebCore:
darin [Fri, 9 Apr 2004 23:04:13 +0000 (23:04 +0000)]

        Reviewed by Ken.

        - added "transparent mode"

        * khtml/khtmlview.h: Added isTransparent and setTransparent functions.
        * khtml/khtmlview.cpp:
        (KHTMLViewPrivate::KHTMLViewPrivate): Initialize isTransparent to false.
        (KHTMLView::isTransparent): Return isTransparent.
        (KHTMLView::setTransparent): Set isTransparent.

        * khtml/rendering/render_box.cpp:
        (RenderBox::paintRootBoxDecorations): Use slow repaints for the top frame when the view
        is transparent; also don't draw a background. This is the same thing we do for subframes.
        (RenderBox::paintBackgroundExtended): Don't do the extra draw so we can blend with the
        background color for the top frame when the view is transparent.
        * khtml/rendering/render_canvas.cpp: (RenderCanvas::paintBoxDecorations): More of the same.

        * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::paint): Make "fill with red" debug mode work only
        when the view is not transparent.

        * kwq/WebCoreBridge.h: Added setDrawsBackground: method.
        * kwq/WebCoreBridge.mm: (-[WebCoreBridge setDrawsBackground:]): If told NO
        (don't draw background), then set isTransparent to true on the KHTMLView.


        Reviewed by Ken.

        - added "transparent mode"

        * WebView.subproj/WebFrameInternal.h: Added. Contains _updateDrawsBackground.
        * WebView.subproj/WebFrame.m:
        (-[WebFrame _makeDocumentView]): Call _updateDrawsBackground to tell the newly created
        KHTMLView whether to draw a background or not.
        (-[WebFrame _setState:]): Don't tell the scroll view to start drawing background if the
        WebView is not supposed to draw a background.
        (-[WebFrame _updateDrawsBackground]): Call setDrawsBackground: on the bridge, and do the
        same for all subframes.

        * WebView.subproj/WebFrameView.m: (-[WebFrameView setFrameSize:]): Only call setDrawsBackground:YES
        on the scroll view if the WebView has drawsBackground set to YES.

        * WebView.subproj/WebViewPrivate.h: Added new proposed API, setDrawsBackground and drawsBackground.
        Also added drawsBackground boolean to private structure.
        * WebView.subproj/WebView.m:
        (-[WebView _commonInitializationWithFrameName:groupName:]): Set drawsBackground to YES by default.
        (-[WebView setDrawsBackground:]): Added. Sets boolean and calls _updateDrawsBackground to update
        the flag for each frame.
        (-[WebView drawsBackground]): Added. Returns value of boolean.
        (-[WebView _bridgeForCurrentSelection]): Tweaked comment for no good reason.

        * WebView.subproj/WebViewInternal.h: Added, but empty for the moment.
        * WebView.subproj/WebFramePrivate.h: Tweaked a bit.

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

18 years ago Reviewed by me
kocienda [Fri, 9 Apr 2004 20:18:59 +0000 (20:18 +0000)]
    Reviewed by me

        Added one more layout test for editing.

        * layout-tests/editing/deleting/delete-3608445-fix-expected.txt: Added.
        * layout-tests/editing/deleting/delete-3608445-fix.html: Added.

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

18 years agoJavaScriptCore:
mjs [Fri, 9 Apr 2004 20:07:47 +0000 (20:07 +0000)]

        Reviewed by John.

Changed things so that newly created objects get a prototype based
on the scope chain of the current function, rather than the
interpreter that started execution. This fixes the following bugs:

<rdar://problem/3368523>: ARCH: wrong prototype used to create new objects (hang on lookup.atomica.com)
        <rdar://problem/3559173>: ARCH: Cannot scan using a HP Jetdirect product (JS object prototypes bind incorrectly)

* JavaScriptCore.pbproj/project.pbxproj:
        * kjs/array_object.cpp:
        * kjs/bool_object.cpp:
        * kjs/date_object.cpp:
        * kjs/error_object.cpp:
        * kjs/function.cpp:
        * kjs/function_object.cpp:
        * kjs/internal.cpp:
        * kjs/internal.h:
        * kjs/interpreter.cpp:
        * kjs/interpreter.h:
        * kjs/math_object.cpp:
        * kjs/nodes.cpp:
        * kjs/number_object.cpp:
        * kjs/object.cpp:
        * kjs/object_object.cpp:
        * kjs/reference.cpp:
        * kjs/regexp_object.cpp:
        * kjs/scope_chain.cpp:
        * kjs/scope_chain.h:
        * kjs/string_object.cpp:


        Reviewed by John.

Changed things so that newly created objects get a prototype based
on the scope chain of the current function, rather than the
interpreter that started execution. This fixes the following bugs:

<rdar://problem/3368523>: ARCH: wrong prototype used to create new objects (hang on lookup.atomica.com)
        <rdar://problem/3559173>: ARCH: Cannot scan using a HP Jetdirect product (JS object prototypes bind incorrectly)

* khtml/ecma/kjs_binding.h:
        * khtml/ecma/kjs_css.cpp:
        * khtml/ecma/kjs_dom.cpp:
        * khtml/ecma/kjs_events.cpp:
        * khtml/ecma/kjs_html.cpp:
        * khtml/ecma/kjs_navigator.cpp:
        * khtml/ecma/kjs_window.cpp:

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

18 years ago Fix for 3613081, repaint glitches when using overflow:auto/overlay.
hyatt [Fri, 9 Apr 2004 19:59:59 +0000 (19:59 +0000)]
Fix for 3613081, repaint glitches when using overflow:auto/overlay.

        Reviewed by john

        * khtml/rendering/render_layer.cpp:

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

18 years agoFixed build problem.
rjw [Fri, 9 Apr 2004 19:49:04 +0000 (19:49 +0000)]
Fixed build problem.

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

18 years ago Fix for 3608445, garbage characters rendered after doing delete. Delta was unsigned...
hyatt [Fri, 9 Apr 2004 19:02:45 +0000 (19:02 +0000)]
Fix for 3608445, garbage characters rendered after doing delete.  Delta was unsigned when it was supposed to
be signed, since deletion involves a negative delta.  Also had an off-by-one error in the line break end check.

        Reviewed by john

        * khtml/rendering/render_text.cpp:

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

18 years agoWebKit:
cblu [Fri, 9 Apr 2004 18:48:40 +0000 (18:48 +0000)]

<rdar://problem/3616873>: support for pasting and drag and dropping of URLS to editable WebViews
<rdar://problem/3546417>: support for pasting and drag and dropping of images to editable WebViews

        Reviewed by rjw.

        * DOM.subproj/WebDOMOperations.h:
        * DOM.subproj/WebDOMOperations.m:
        (-[DOMNode webArchive]): renamed from "archive" because "archive" collides with DOMHTMLObjectElement's method
        (-[DOMRange webArchive]): ditto
        * Misc.subproj/WebNSPasteboardExtras.h:
        * Misc.subproj/WebNSPasteboardExtras.m:
        (-[NSPasteboard _web_writeImage:URL:title:archive:]): take just an archive instead of an HTML string and file wrapper
        * Misc.subproj/WebNSViewExtras.h:
        * Misc.subproj/WebNSViewExtras.m:
        (-[NSView _web_dragImage:archive:rect:URL:title:event:]): take just an archive instead of an HTML string and file wrapper
        * WebView.subproj/WebDataProtocol.h:
        * WebView.subproj/WebDataProtocol.m:
        (+[NSURL _web_uniqueWebDataURL]): new
        (+[NSURL _web_uniqueWebDataURLWithRelativeString:]): new
        * WebView.subproj/WebDefaultContextMenuDelegate.m:
        (-[WebDefaultUIDelegate copyImageToClipboard:]): call renamed _web_writeImage
        * WebView.subproj/WebFrame.m:
        (-[WebFrame _webDataRequestForData:MIMEType:textEncodingName:baseURL:unreachableURL:]): use _web_uniqueWebDataURL for creating a URL
        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView _pasteImageResource:]): new
        (-[WebHTMLView _pasteFromPasteboard:]): renamed, now handles images and URLs
        (-[WebHTMLView _handleMouseDragged:]): call renamed _web_dragImage
        (-[WebHTMLView paste:]): call renamed _pasteFromPasteboard
        (-[WebHTMLView concludeDragOperation:]): call renamed _pasteFromPasteboard
        * WebView.subproj/WebHTMLViewPrivate.h:
        * WebView.subproj/WebImageRepresentation.h:
        * WebView.subproj/WebImageRepresentation.m:
        (-[WebImageRepresentation archive]): new
        * WebView.subproj/WebImageView.m:
        (-[WebImageView writeImageToPasteboard:]): call renamed _web_writeImage
        (-[WebImageView mouseDragged:]): call renamed _web_dragImage


        Reviewed by rjw.

        * BrowserDocument.m:
        (-[BrowserDocument dataRepresentationOfType:]): call renamed [DOMNode webArchive]
        (-[BrowserDocument mailPage:]): ditto

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

18 years ago Reviewed by me
kocienda [Fri, 9 Apr 2004 14:41:37 +0000 (14:41 +0000)]
    Reviewed by me

        Added two more layout tests for editing.

        * layout-tests/editing/selection/move-between-blocks-no-001-expected.txt: Added.
        * layout-tests/editing/selection/move-between-blocks-no-001.html: Added.
        * layout-tests/editing/selection/move-between-blocks-yes-001-expected.txt: Added.
        * layout-tests/editing/selection/move-between-blocks-yes-001.html: Added.

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

18 years ago Reviewed by Dave
kocienda [Fri, 9 Apr 2004 14:13:42 +0000 (14:13 +0000)]
    Reviewed by Dave

        Small collection of editing improvements.

        * ChangeLog:
        * khtml/editing/htmlediting_impl.cpp:
        (shouldDeleteUpstreamPosition): This was deleting significant spaces on preceding
        lines when the caret was at the start of a line. Fixed.
        (DeleteSelectionCommandImpl::doApply): Fixed a case where caret jumped to previous
        line when deleting a character at the start of a line after a BR.
        (InputNewlineCommandImpl::doApply): Handle more cases correctly. Previously, this
        only handled inserting a newline when the caret was already in a text node.
        (InputTextCommandImpl::prepareForTextInsertion): Ditto.
        (InputTextCommandImpl::execute): Ditto.
        * khtml/editing/htmlediting_impl.h:
        * khtml/rendering/render_block.cpp:
        (khtml::RenderBlock::checkSelectionPointIgnoringContinuations): Now can place caret
        with a click in an empty block.
        * khtml/rendering/render_block.h: Added checkSelectionPointIgnoringContinuations declaration.
        * khtml/rendering/render_replaced.cpp:
        (RenderReplaced::checkSelectionPointIgnoringContinuations): Now can place caret with a click
        on a replaced element.
        * khtml/rendering/render_replaced.h: Added checkSelectionPointIgnoringContinuations declaration.
        * khtml/rendering/render_text.cpp:
        (InlineTextBox::checkSelectionPoint): Now can place caret with a click in text on a line made "tall"
        by an image on the same line.
        * khtml/xml/dom_docimpl.cpp:
        (DocumentImpl::createEditingTextNode): This creates a text node subclass that whill always create
        a renderer for itself.
        * khtml/xml/dom_docimpl.h:
        * khtml/xml/dom_position.cpp:
        (DOMPosition::isLastRenderedPositionInEditableBlock): Improved code to handle more cases.
        * khtml/xml/dom_textimpl.cpp:
        (TextImpl::TextImpl): Rolled out m_rendererIsNeeded flag.
        (TextImpl::rendererIsNeeded): Ditto.
        (EditingTextImpl::EditingTextImpl): New class.
        (EditingTextImpl::~EditingTextImpl): New.
        (EditingTextImpl::rendererIsNeeded): New. Always returns true.
        * khtml/xml/dom_textimpl.h: New EditingTextImpl class.
        * layout-tests/editing/deleting/delete-3608430-fix-expected.txt: Added.
        * layout-tests/editing/deleting/delete-3608430-fix.html: Added.
        * layout-tests/editing/deleting/delete-3608462-fix-expected.txt: Added.
        * layout-tests/editing/deleting/delete-3608462-fix.html: Added.
        * layout-tests/editing/deleting/delete-trailing-ws-002-expected.txt: Added.
        * layout-tests/editing/deleting/delete-trailing-ws-002.html: Added.

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

18 years ago Renamed the PasteHTMLCommand to PasteMarkupCommand. Removed PasteImageCommand becaus...
cblu [Fri, 9 Apr 2004 01:05:03 +0000 (01:05 +0000)]
Renamed the PasteHTMLCommand to PasteMarkupCommand. Removed PasteImageCommand because we will use PasteMarkupCommand for pasting images.

        Reviewed by kocienda.

        * ChangeLog:
        * khtml/editing/htmlediting.cpp:
        * khtml/editing/htmlediting.h:
        * khtml/editing/htmlediting_impl.cpp:
        * khtml/editing/htmlediting_impl.h:
        * khtml/khtml_part.cpp:
        * khtml/khtml_part.h:
        * kwq/WebCoreBridge.h:
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge pasteMarkupString:]):

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

18 years agochange version number to 137u. the tree is open
vicki [Thu, 8 Apr 2004 22:53:25 +0000 (22:53 +0000)]
change version number to 137u.  the tree is open

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

18 years agoSafari-136 stamp
vicki [Thu, 8 Apr 2004 22:48:02 +0000 (22:48 +0000)]
Safari-136 stamp

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

18 years agoRolling out previous commit. Tree was closed. Doh!
cblu [Thu, 8 Apr 2004 22:42:19 +0000 (22:42 +0000)]
Rolling out previous commit. Tree was closed. Doh!

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

18 years ago Renamed the PasteHTMLCommand to PasteMarkupCommand. Removed PasteImageCommand becaus...
cblu [Thu, 8 Apr 2004 22:31:49 +0000 (22:31 +0000)]
Renamed the PasteHTMLCommand to PasteMarkupCommand. Removed PasteImageCommand because we will use PasteMarkupCommand for pasting images.

        Reviewed by kocienda.

        * khtml/editing/htmlediting.cpp:
        * khtml/editing/htmlediting.h:
        * khtml/editing/htmlediting_impl.cpp:
        * khtml/editing/htmlediting_impl.h:
        * khtml/khtml_part.cpp:
        * khtml/khtml_part.h:
        * kwq/WebCoreBridge.h:
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge pasteMarkupString:]):

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

18 years ago Fix for 3608430 and 3608462, crashes in findNextLineBreak when deleting. Make sure...
hyatt [Thu, 8 Apr 2004 20:34:26 +0000 (20:34 +0000)]
Fix for 3608430 and 3608462, crashes in findNextLineBreak when deleting.  Make sure that the removal of line boxes
always checks the previous root line box's line break information and dirties the line if it is pointing
to the deleted object.

        Reviewed by kocienda

        * khtml/rendering/render_line.cpp:

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

18 years agoWebCore:
cblu [Thu, 8 Apr 2004 18:43:37 +0000 (18:43 +0000)]

Removed DOMExtensions.h from DOM.h until it is public.

        Reviewed by koicienda.

        * kwq/DOM.h:


Fixed: <rdar://problem/3548274>: API: DOM API for WebKit clients

        Reviewed by kocienda.

        * DOM.subproj/DOM.h: copied from WebCore
        * WebKit.pbproj/project.pbxproj: made our DOM headers public!

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

18 years agoTests:
cblu [Thu, 8 Apr 2004 18:05:30 +0000 (18:05 +0000)]

Support for moving WebArchive to its own file.

        Reviewed by kocienda.

        * Blot/BlotApp.m:


Moved WebArchive to its own file.

        Reviewed by kocienda.

        * WebKit.pbproj/project.pbxproj:
        * WebView.subproj/WebArchive.h: Added.
        * WebView.subproj/WebArchive.m: Added.
        (-[WebArchive data]): renamed from dataRepresentation
        * WebView.subproj/WebDataSource.m:
        * WebView.subproj/WebFrame.m:
        * WebView.subproj/WebHTMLRepresentation.m:
        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView _writeSelectionToPasteboard:]): call renamed [WebArchive data]
        * WebView.subproj/WebResource.h:
        * WebView.subproj/WebResource.m:


Support for moving WebArchive to its own file.

        Reviewed by kocienda.

        * BrowserDocument.m:
        (-[BrowserDocument dataRepresentationOfType:]): call renamed [WebArchive data]
        (-[BrowserDocument mailPage:]): ditto
        (-[BrowserDocument mailPageAddress:]): ditto

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

18 years agoTests:
cblu [Thu, 8 Apr 2004 00:46:35 +0000 (00:46 +0000)]

Interact with WebArchives via WebDOMOperations.

        Reviewed by rjw.

        * Blot/BlotApp.m:
        (-[BlotApp handleNewMessageEvent:withReplyEvent:]):
        * Blot/BlotDocument.h:
        * Blot/BlotDocument.m:
        (-[BlotDocument dataRepresentationOfType:]):
        (-[BlotDocument loadArchive:]):


WebCore side for supporting WebDOMOperations.

        Reviewed by rjw.

        * WebCore-combined.exp:
        * WebCore.exp:
        * kwq/DOM.mm:
        * kwq/DOMExtensions.h:
        * kwq/WebCoreBridge.h:
        * kwq/WebCoreBridge.mm:
        (+[WebCoreBridge bridgeForDOMDocument:]): new
        (-[WebCoreBridge imageForImageElement:]): new


Created WebDOMOperations which are WebKit-specific categories on DOM objects.

        Reviewed by rjw.

        * DOM.subproj/DOMExtensions.h:
        * DOM.subproj/WebDOMOperations.h: Added.
        * DOM.subproj/WebDOMOperations.m: Added.
        (-[DOMNode _bridge]): new
        (-[DOMNode archive]): new
        (-[DOMNode markupString]): new
        (-[DOMRange _bridge]): new
        (-[DOMRange archive]): new
        (-[DOMRange markupString]): new
        (-[DOMHTMLImageElement image]):
        * WebCoreSupport.subproj/WebBridge.h:
        * WebCoreSupport.subproj/WebBridge.m:
        (-[WebBridge webFrame]): new
        * WebKit.pbproj/project.pbxproj:
        * WebView.subproj/WebDataSource.m:
        (-[WebDataSource _archiveWithMarkupString:subresourceURLStrings:]): moved from WebHTMLRepresentation
        * WebView.subproj/WebDataSourcePrivate.h:
        * WebView.subproj/WebDefaultContextMenuDelegate.m:
        (-[WebDefaultUIDelegate copyImageToClipboard:]): call markupString on the node
        * WebView.subproj/WebDocumentPrivate.h:
        * WebView.subproj/WebFrame.m:
        (+[WebFrame frameForDOMDocument:]): new
        (-[WebFrame loadArchive:]): renamed
        * WebView.subproj/WebFramePrivate.h:
        * WebView.subproj/WebHTMLRepresentation.h:
        * WebView.subproj/WebHTMLRepresentation.m:
        * WebView.subproj/WebHTMLRepresentationPrivate.h:
        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView _selectedArchive:]): renamed
        (-[WebHTMLView _handleMouseDragged:]): called renamed methods


Interact with WebArchives via WebDOMOperations.

        Reviewed by rjw.

        * BrowserDocument.m:
        (-[BrowserDocument canSaveAsWebArchive]): check for the renamed WebDocumentDOM protocol
        (-[BrowserDocument dataRepresentationOfType:]): use the archive method on node
        (-[BrowserDocument validateUserInterfaceItem:]): check for the renamed WebDocumentDOM protocol
        (-[BrowserDocument mailPage:]): use the archive method on node

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

18 years agoWebCore:
darin [Thu, 8 Apr 2004 00:36:32 +0000 (00:36 +0000)]

        Reviewed by Chris.

        * kwq/DOMCSS.h: Changed DOMCSS2Properties to be a category on DOMCSSStyleDeclaration
        (after API review, oops!, but I doubt anyone will even notice).
        * kwq/DOM-CSS.mm: Implemented the entire DOMCSS2Properties category.


        Reviewed by Chris.

        * DOM.subproj/DOMCSS.h: Updated from WebCore.

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

18 years ago Reviewed by Darin and Dave (many weeks ago....I am so ashamed for not landing)
kocienda [Wed, 7 Apr 2004 23:33:57 +0000 (23:33 +0000)]
    Reviewed by Darin and Dave (many weeks ago....I am so ashamed for not landing)

        * WebCoreSupport.subproj/WebBridge.m:
        (-[WebBridge expiresTimeForResponse:]): Now adds in the difference between
        the Mac OS X epoch and the "standard" unix epoch when passing back a time
        that WebCore will use for its cache expiration determinations.

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

18 years ago Reviewed by Chris
kocienda [Wed, 7 Apr 2004 23:25:45 +0000 (23:25 +0000)]
    Reviewed by Chris

        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge _stringWithDocumentTypeStringAndMarkupString:]): Do not add a newline in between
        the doctype and the content. The newline was showing up when the content was pasted.

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

18 years ago Fix for 3604388. The runtime version check (_CFExecutableLinkedOnOrAfter) used...
rjw [Wed, 7 Apr 2004 21:06:42 +0000 (21:06 +0000)]
Fix for 3604388.  The runtime version check (_CFExecutableLinkedOnOrAfter) used by many of
our frameworks doesn't work for CFM apps.  So, conditional panther bugs fixes aren't
being pickup by CFM apps that use WebKit, specifically Contribute.  This particular radar
describes a problem that was conditionally fixed in the AppKit for panther.  The work-around
is to force NSBitmapImageRep to execute to conditional code.

        Reviewed by Maciej.

        * Carbon.subproj/CarbonUtils.m:

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

18 years ago Reviewed by John
kocienda [Wed, 7 Apr 2004 18:52:47 +0000 (18:52 +0000)]
    Reviewed by John

        Removed concept of currentSelection from EditCommands and refined concept of
        startingSelection and endingSelection, making them work more sensibly in the
        system of composed editing commands.

        * khtml/editing/htmlediting.cpp: Removed currentSelection().
        * khtml/editing/htmlediting.h: Ditto.
        * khtml/editing/htmlediting_impl.cpp: currentSelection().
        (CompositeEditCommandImpl::applyCommandToComposite): Set the startingSelection
        and endingSelection for the command being applied to the endingSelection of
        its new parent. This is the proper starting and ending point.
        (CompositeEditCommandImpl::deleteSelection): Changed call to currentSelection
        to endingSelection.
        (DeleteCollapsibleWhitespaceCommandImpl::DeleteCollapsibleWhitespaceCommandImpl): Ditto.
        (DeleteSelectionCommandImpl::DeleteSelectionCommandImpl): Changed call from startingSelection
        to endingSelection.
        (DeleteSelectionCommandImpl::joinTextNodesWithSameStyle): Changed call to currentSelection
        to endingSelection.
        (InputNewlineCommandImpl::doApply): Ditto.
        (InputTextCommandImpl::deleteCharacter): Ditto.
        (InputTextCommandImpl::prepareForTextInsertion): Ditto.
        (InputTextCommandImpl::execute): Ditto.
        (PasteHTMLCommandImpl::doApply): Ditto.
        (TypingCommandImpl::insertText): Remove extraneous call to reset endingSelection. This has
        already been done by the helpers this command uses to do its work.
        (TypingCommandImpl::issueCommandForDeleteKey): Changed call to currentSelection
        to endingSelection.
        (TypingCommandImpl::deleteKeyPressed): Remove extraneous call to reset endingSelection. This has
        already been done by the helpers this command uses to do its work.
        * khtml/editing/htmlediting_impl.h:
        (khtml::EditCommandImpl::endingSelection): Remove extraneous call to reset endingSelection. This has
        already been done by the helpers this command uses to do its work.

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

18 years ago Reviewed by John
kocienda [Wed, 7 Apr 2004 17:55:08 +0000 (17:55 +0000)]
    Reviewed by John

        Make paste work again. It has been broken for some undetermined
        period of time.

        * khtml/editing/htmlediting_impl.cpp:
        (CompositeEditCommandImpl::insertNodeAt): Handle inserting a node when
        the reference node has children, or is an empty block.
        (CompositeEditCommandImpl::inputText): New convenience to create and
        apply an InputTextCommand.
        (InputTextCommandImpl::execute): Collapse whitespace when selection is
        not a range. Deleting the selection when it is a range already does that,
        so no need to make special accommodation for it.
        (PasteHTMLCommandImpl::PasteHTMLCommandImpl): Initialize m_HTMLString using
        an initialization list.
        (PasteHTMLCommandImpl::doApply): Collapse whitespace.... as above for
        InputTextCommandImpl::execute. Don't need to qualify NodeImpl's with DOM
        namespace. Clean up selection access; no need to grep around for it, the
        desired selection is returned by calling currentSelection(). Treat "simple
        text paste" like typing. Tighten up and simplify HTML fragment paste; no
        real change in algorithm.
        (SplitTextNodeCommandImpl::SplitTextNodeCommandImpl): m_text1 member variable
        not initialized. This bug was introduced by a recent change by me. Fixing now.
        * khtml/editing/htmlediting_impl.h: Add inputText() declaration.

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

18 years ago Fixed 3510805. Only release pool in timer if the current nesting level of the
rjw [Wed, 7 Apr 2004 00:24:23 +0000 (00:24 +0000)]
Fixed 3510805.  Only release pool in timer if the current nesting level of the
pool matches the nesting level when the pool was created.

        Reviewed by Chris.

        * Carbon.subproj/CarbonUtils.m:

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

18 years agoTests:
kocienda [Tue, 6 Apr 2004 23:08:51 +0000 (23:08 +0000)]

        Reviewed by Richard

        Default document is now blank, since blinking a caret in
        an empty document is now supported.

        Added some code to move the caret to the start of the
        body element after loading it.

        Improved the code which makes the whole document
        contenteditable (by checking for and setting contenteditable,
        if needed).

        * Blot/BlotDocument.m:
        (-[BlotDocument webView:didFinishLoadForFrame:]):
        * Blot/Resources/default.html:


        Reviewed by Richard

        * khtml/khtml_part.cpp:
        (KHTMLPart::setSelection): Now calls setFocusNodeIfNeeded.
        (KHTMLPart::takeSelectionFrom): Now calls setFocusNodeIfNeeded.
        (KHTMLPart::clearSelection): Now calls setFocusNodeIfNeeded.
        (KHTMLPart::invalidateSelection): Now calls setFocusNodeIfNeeded.
        (KHTMLPart::setSelectionVisible): Now calls setFocusNodeIfNeeded.
        (KHTMLPart::setFocusNodeIfNeeded): New function focuses first element
        of a selection that is contenteditable, if any of the nodes are. The "first"
        determination is made by doing a document-order search.
        * khtml/khtml_part.h:
        * khtml/xml/dom_nodeimpl.cpp: Remove debug spam.
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge setSelectedDOMRange:]): Now updates document layout before
        setting the selection. This was needed for Blot, so that setting the
        contenteditable attribute on the body is "seen" when the attempt is made
        to set the selection right immediately after.

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

18 years ago After columns have been expanded to their preferred sizes, if space is left over...
hyatt [Tue, 6 Apr 2004 21:03:24 +0000 (21:03 +0000)]
After columns have been expanded to their preferred sizes, if space is left over in the table, then
fixed columns should expand to fill space before percentage width columns do.  The old code had it

        Reviewed by john

        * khtml/rendering/table_layout.cpp:

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

18 years agoWebKit:
cblu [Tue, 6 Apr 2004 21:00:43 +0000 (21:00 +0000)]

Fixed: <rdar://problem/3613974>: remove "to Clipboard" from context menus because it is redundant

        Reviewed by john.

        * English.lproj/Localizable.strings:
        * WebView.subproj/WebDefaultContextMenuDelegate.m:
        (-[WebDefaultUIDelegate menuItemWithTag:]):


Fixed: <rdar://problem/3316489>: ER: Safari� image context menu should have "Copy Image Address"

        Reviewed by john.

        * ContextMenuHandler.m:
        (-[BrowserWebView webView:contextMenuItemsForElement:defaultMenuItems:]): added "Copy Image Address" for Tiger only, moved "Add Link to Bookmarks" above "Copy Link" to keep all copy-related menu items at the bottom
        (-[BrowserWebView copyImageAddress:]): new
        * English.lproj/Localizable.strings:
        * English.lproj/StringsNotToBeLocalized.txt:

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

18 years ago Reviewed by Dave
kocienda [Tue, 6 Apr 2004 16:01:01 +0000 (16:01 +0000)]
    Reviewed by Dave

        * khtml/dom/dom_node.cpp:
        (Node::isContentEditable): Added. Calls through to impl function of same name.
        * khtml/dom/dom_node.h: Added isContentEditable declaration.
        * khtml/khtmlview.cpp:
        (KHTMLView::viewportMouseMoveEvent): Now, the cursor will change
        to an i-beam whenever it is over a node that is contenteditable, and nothing,
        like a link, takes precedence.

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

18 years ago Reviewed by Dave
kocienda [Tue, 6 Apr 2004 15:50:13 +0000 (15:50 +0000)]
    Reviewed by Dave

        * khtml/css/html4.css: Refine focus rules so that HTML and BODY
        elements do not draw a focus ring around themselves when focused.
        This prevents a silly-looking focus ring from drawing around a
        document's entire contents when a body element is contenteditable.

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

18 years ago Reviewed by Dave
kocienda [Tue, 6 Apr 2004 15:25:15 +0000 (15:25 +0000)]
    Reviewed by Dave

        Caret height is now the height of the tallest element on the line,
        mimicking NSText behavior.

        * khtml/rendering/render_box.cpp:
        (RenderBox::caretPos): Use root line box topOverflow and bottomOverflow
        for the calculation of caret height.
        * khtml/rendering/render_text.cpp:
        (RenderText::caretPos): Ditto.

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

18 years ago Reviewed by me
kocienda [Tue, 6 Apr 2004 15:21:34 +0000 (15:21 +0000)]
    Reviewed by me

        Added a new suite of layout tests for editing, all added
        in the new layout-tests/editing subtree.

        * layout-tests/editing/abe.jpg: Added.
        * layout-tests/editing/deleting/delete-block-contents-001-expected.txt: Added.
        * layout-tests/editing/deleting/delete-block-contents-001.html: Added.
        * layout-tests/editing/deleting/delete-block-contents-002-expected.txt: Added.
        * layout-tests/editing/deleting/delete-block-contents-002.html: Added.
        * layout-tests/editing/deleting/delete-block-contents-003-expected.txt: Added.
        * layout-tests/editing/deleting/delete-block-contents-003.html: Added.
        * layout-tests/editing/deleting/delete-br-001-expected.txt: Added.
        * layout-tests/editing/deleting/delete-br-001.html: Added.
        * layout-tests/editing/deleting/delete-br-002-expected.txt: Added.
        * layout-tests/editing/deleting/delete-br-002.html: Added.
        * layout-tests/editing/deleting/delete-br-003-expected.txt: Added.
        * layout-tests/editing/deleting/delete-br-003.html: Added.
        * layout-tests/editing/deleting/delete-br-004-expected.txt: Added.
        * layout-tests/editing/deleting/delete-br-004.html: Added.
        * layout-tests/editing/deleting/delete-br-005-expected.txt: Added.
        * layout-tests/editing/deleting/delete-br-005.html: Added.
        * layout-tests/editing/deleting/delete-br-006-expected.txt: Added.
        * layout-tests/editing/deleting/delete-br-006.html: Added.
        * layout-tests/editing/deleting/delete-character-001-expected.txt: Added.
        * layout-tests/editing/deleting/delete-character-001.html: Added.
        * layout-tests/editing/deleting/delete-contiguous-ws-001-expected.txt: Added.
        * layout-tests/editing/deleting/delete-contiguous-ws-001.html: Added.
        * layout-tests/editing/deleting/delete-image-001-expected.txt: Added.
        * layout-tests/editing/deleting/delete-image-001.html: Added.
        * layout-tests/editing/deleting/delete-image-002-expected.txt: Added.
        * layout-tests/editing/deleting/delete-image-002.html: Added.
        * layout-tests/editing/deleting/delete-image-003-expected.txt: Added.
        * layout-tests/editing/deleting/delete-image-003.html: Added.
        * layout-tests/editing/deleting/delete-leading-ws-001-expected.txt: Added.
        * layout-tests/editing/deleting/delete-leading-ws-001.html: Added.
        * layout-tests/editing/deleting/delete-selection-001-expected.txt: Added.
        * layout-tests/editing/deleting/delete-selection-001.html: Added.
        * layout-tests/editing/deleting/delete-trailing-ws-001-expected.txt: Added.
        * layout-tests/editing/deleting/delete-trailing-ws-001.html: Added.
        * layout-tests/editing/editing.js: Added.
        * layout-tests/editing/inserting/typing-001-expected.txt: Added.
        * layout-tests/editing/inserting/typing-001.html: Added.
        * layout-tests/editing/inserting/typing-002-expected.txt: Added.
        * layout-tests/editing/inserting/typing-002.html: Added.
        * layout-tests/editing/inserting/typing-around-br-001-expected.txt: Added.
        * layout-tests/editing/inserting/typing-around-br-001.html: Added.
        * layout-tests/editing/inserting/typing-around-image-001-expected.txt: Added.
        * layout-tests/editing/inserting/typing-around-image-001.html: Added.
        * layout-tests/editing/selection/extend-by-character-001-expected.txt: Added.
        * layout-tests/editing/selection/extend-by-character-001.html: Added.
        * layout-tests/editing/selection/extend-by-character-002-expected.txt: Added.
        * layout-tests/editing/selection/extend-by-character-002.html: Added.
        * layout-tests/editing/selection/extend-by-character-003-expected.txt: Added.
        * layout-tests/editing/selection/extend-by-character-003.html: Added.
        * layout-tests/editing/selection/extend-by-character-004-expected.txt: Added.
        * layout-tests/editing/selection/extend-by-character-004.html: Added.
        * layout-tests/editing/selection/extend-by-character-005-expected.txt: Added.
        * layout-tests/editing/selection/extend-by-character-005.html: Added.
        * layout-tests/editing/selection/move-by-character-001-expected.txt: Added.
        * layout-tests/editing/selection/move-by-character-001.html: Added.
        * layout-tests/editing/selection/move-by-character-002-expected.txt: Added.
        * layout-tests/editing/selection/move-by-character-002.html: Added.
        * layout-tests/editing/selection/move-by-character-003-expected.txt: Added.
        * layout-tests/editing/selection/move-by-character-003.html: Added.
        * layout-tests/editing/selection/move-by-character-004-expected.txt: Added.
        * layout-tests/editing/selection/move-by-character-004.html: Added.
        * layout-tests/editing/selection/move-by-character-005-expected.txt: Added.
        * layout-tests/editing/selection/move-by-character-005.html: Added.
        * layout-tests/editing/undo/redo-typing-001-expected.txt: Added.
        * layout-tests/editing/undo/redo-typing-001.html: Added.
        * layout-tests/editing/undo/undo-typing-001-expected.txt: Added.
        * layout-tests/editing/undo/undo-typing-001.html: Added.

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

18 years agoWebCore:
kocienda [Tue, 6 Apr 2004 15:14:30 +0000 (15:14 +0000)]

        Reviewed by Dave

        Added execCommand feature.
        Added Javascript selection object.
        This lays the groundwork for layout tests for editing.

        * khtml/dom/dom_doc.cpp:
        (DOM::Document::execCommand): Added. Calls through to impl's execCommand.
        * khtml/dom/dom_doc.h: Added execCommand declaration.
        * khtml/ecma/kjs_dom.cpp:
        (DOMDocumentProtoFunc::tryCall): Switch on new ExecCommand constant and call through to the document.
        * khtml/ecma/kjs_dom.h: Added ExecCommand constant.
        * khtml/ecma/kjs_dom.lut.h: Generated file.
        * khtml/ecma/kjs_window.cpp:
        (Window::Window): Initialize selection object.
        (Window::selection): Return window's selection object.
        (Window::mark): Mark selection object.
        (WindowFunc::tryCall): Return selection object on GetSelection.
        (LocationFunc::tryCall): Added.
        (Selection::Selection): Added.
        (Selection::~Selection): Added.
        (Selection::get): Added.
        (Selection::put): Added.
        (Selection::toPrimitive): Added.
        (Selection::toString): Added.
        (SelectionFunc::tryCall): Added.
        * khtml/ecma/kjs_window.h:
        (KJS::Selection::): Added.
        (KJS::Selection::part): Added.
        (KJS::Selection::classInfo): Added.
        * khtml/ecma/kjs_window.lut.h: Generated file.
        * khtml/editing/htmlediting_impl.cpp:
        (debugPosition): Debugging aid.
        (DeleteCollapsibleWhitespaceCommandImpl::deleteWhitespace): Move the ending position
        if you are about to delete it. Fixes a crasher I discovered while writing tests.
        (DeleteSelectionCommandImpl::doApply): Move to containing editable block position 0
        instead of 1 in a block in delete case 1.
        * khtml/khtml_part.h:
        * khtml/khtml_selection.cpp:
        (KHTMLSelection::validate): Now adjusts the selection down to leaf nodes if needed.
        (KHTMLSelection::debugPosition): Debugging aid.
        * khtml/xml/dom_docimpl.cpp:
        (DocumentImpl::execCommand): Added. Supports five different commands.
        * khtml/xml/dom_docimpl.h:
        * khtml/xml/dom_nodeimpl.cpp:
        (NodeImpl::previousEditable): Use false instead of 0 for equality check.
        (NodeImpl::nextEditable): Ditto.
        * khtml/xml/dom_position.cpp:
        (DOMPosition::equivalentLeafPosition): New function
        (DOMPosition::previousRenderedEditablePosition): New function
        (DOMPosition::nextRenderedEditablePosition): New function
        (DOMPosition::equivalentUpstreamPosition): Refined behavior to handle more cases correctly.
        (DOMPosition::equivalentDownstreamPosition): Ditto.
        (DOMPosition::atStartOfContainingEditableBlock):New function
        (DOMPosition::atStartOfRootEditableBlock):New function
        * khtml/xml/dom_position.h:
        * kwq/KWQKHTMLPart.h:
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::issueUndoCommand): New function for calling undo programatically.
        (KWQKHTMLPart::issueRedoCommand): Ditto, but for redo.
        * kwq/KWQRenderTreeDebug.cpp:
        (nodePositionRelativeToRoot): New function to generate log information for the selection.
        (writeSelection): Writes the selection if there is one.
        (externalRepresentation): Calls writeSelection
        * kwq/WebCoreBridge.h: New declarations for issueUndoCommand and issueRedoCommand.


        Reviewed by Dave

        * WebCoreSupport.subproj/WebBridge.m:
        (-[WebBridge issueUndoCommand]): New method. Forwards call to the undo manager. Added
        to support undo called via Javascript execCommand.
        (-[WebBridge issueRedoCommand]): Ditto.

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