17 years ago Reviewed by John.
mjs [Wed, 16 Mar 2005 03:19:17 +0000 (03:19 +0000)]
    Reviewed by John.

<rdar://problem/4053266> Pressing return a few times right after a link makes the new blank lines part of the link

        * khtml/editing/htmlediting.cpp:
(khtml::InsertLineBreakCommand::doApply): Use
positionOutsideContainingSpecialElement in the right two places.
        (khtml::InsertParagraphSeparatorCommand::doApply): Ditto.

- move all these helper functions higher in the file

        * khtml/editing/htmlediting.cpp:

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

17 years ago Fixed <rdar://problem/4053658> Crash getting direction at maps.google.com
rjw [Wed, 16 Mar 2005 02:02:33 +0000 (02:02 +0000)]
Fixed <rdar://problem/4053658> Crash getting direction at maps.google.com

Add non nil style() check.

        Reviewed by Dave Harrison.

        * khtml/rendering/render_table.cpp:

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

17 years ago Reviewed by John
kdecker [Wed, 16 Mar 2005 01:40:31 +0000 (01:40 +0000)]
    Reviewed by John

Fixed: <rdar://problem/4041374> REGRESSION (185-186): unload handlers (at least those added with addEventListener) are broken

The reason why UNLOAD_EVENT wouldn't dispatch was because the code would delete all event listeners at the detach() phase which is prior to closeURL().

This fixes a recent regression from:

 <rdar://problem/3977973> pages on ebay leak referenced JavaScript objects -- over time browsing becomes super-slow

        * khtml/khtml_part.cpp:
        (KHTMLPart::closeURL): After dispatching event handlers, go ahead and remove them from the DOM.
        * khtml/xml/dom_docimpl.cpp:
        (DocumentImpl::detach): Took out the call to removeAllEventListenersFromAllNodes(). If we remove all event listeners here then when KHTMLPart::closeURL() checks for even listeners, it will never have any because they'll already be gone.

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

17 years ago Fixed <rdar://problem/4040321> Exception: Someone's trying to encode a WebDataReques...
rjw [Wed, 16 Mar 2005 00:00:39 +0000 (00:00 +0000)]
Fixed <rdar://problem/4040321> Exception: Someone's trying to encode a WebDataRequestParameters instance

If client mutates request use new Foundation SPI to address remove applewebdata properties from request.

        Reviewed by Ken Kocienda.

        * WebView.subproj/WebBaseResourceHandleDelegate.m:
        (-[WebBaseResourceHandleDelegate willSendRequest:redirectResponse:]):
        * WebView.subproj/WebDataProtocol.h:
        * WebView.subproj/WebDataProtocol.m:
        (+[NSURLRequest _webDataRequestPropertyKey]):

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

17 years ago Fixed <rdar://problem/4053276> WebScripting protocol in WebKit cannot convert Boolea...
rjw [Tue, 15 Mar 2005 23:52:26 +0000 (23:52 +0000)]
Fixed <rdar://problem/4053276> WebScripting protocol in WebKit cannot convert Boolean in Javascript to BOOL in Objective-C

Added JavaScript boolean to type that can be converted to
ObjC scalar parameters.

        Reviewed by Ken Kocienda.

        * bindings/objc/objc_utility.mm:

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

17 years ago Reviewed by Vicki
kocienda [Tue, 15 Mar 2005 23:27:44 +0000 (23:27 +0000)]
    Reviewed by Vicki

        Fox for this bug:

        <rdar://problem/4052642> Each delete keystroke is in its own undo group; not included in undo group with other typing

        Calling -[WebCore setSelectedDOMRange:range affinity:] had the result of "closing" any active set of typing
        keystrokes grouped together in a single undo operation. My change on 27 Jan to route delete keystrokes
        through _deleteRange:killRing:... made this feature regress. Previous to that change, the backwards delete
        key went through separate code that is no longer in the tree that did not set the selection in the way
        it is done now.

        The solution is to add an extra argument to the set-selection call. The WebCoreBridge now offers this method:
        -[WebCore setSelectedDOMRange:range affinity:closeTyping:]. Now, callers must indicate whether setting the
        selection will act to close typing or not. The code changes below all add this new argument with the
        appropriate value for closeTyping.

        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView _deleteRange:killRing:prepend:smartDeleteOK:deletionAction:]): Passes NO for closeTyping when
        deletionAction is deleteKeyAction or forwardDeleteKeyAction; YES when deleteSelectionAction.
        (-[WebHTMLView _expandSelectionToGranularity:]): Passes YES for closeTyping.
        (-[WebHTMLView selectToMark:]): Passes YES for closeTyping.
        (-[WebHTMLView swapWithMark:]): Passes YES for closeTyping.
        (-[WebHTMLView transpose:]): Passes YES for closeTyping.
        (-[WebHTMLView _selectMarkedText]): Passes NO for closeTyping.
        (-[WebHTMLView _selectRangeInMarkedText:]): Passes NO for closeTyping.
        * WebView.subproj/WebView.m:
        (-[WebView setSelectedDOMRange:affinity:]): Passes YES for closeTyping.

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

17 years ago Reviewed by Vicki
kocienda [Tue, 15 Mar 2005 23:27:37 +0000 (23:27 +0000)]
    Reviewed by Vicki

        Fox for this bug:

        <rdar://problem/4052642> Each delete keystroke is in its own undo group; not included in undo group with other typing

        Calling -[WebCore setSelectedDOMRange:range affinity:] had the result of "closing" any active set of typing
        keystrokes grouped together in a single undo operation. A change on 27 Jan in WebKit to change the way delete
        keystrokes are handled made this feature regress. Previous to that change, the backwards delete
        key went through separate code that is no longer in the tree that did not set the selection in the way
        it is done now.

        The solution is to add an extra argument to the set-selection call. The WebCoreBridge now offers this method:
        -[WebCore setSelectedDOMRange:range affinity:closeTyping:]. Now, callers must indicate whether setting the
        selection will act to close typing or not.

        * kwq/WebCoreBridge.h: Changed header accordingly to change method shown below.
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge setSelectedDOMRange:affinity:closeTyping:]): Added closeTyping argument to this method.

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

17 years ago Reviewed by Vicki.
sullivan [Tue, 15 Mar 2005 22:27:31 +0000 (22:27 +0000)]
    Reviewed by Vicki.

        - fixed <rdar://problem/4052246> crash in KWQKHTMLPart::createPart() trying to display local file in frame

        * kwq/KWQKHTMLPart.mm:
        Check part for nil before trying to ref. This was probably a longstanding code flaw revealed by
        the recent security fix.

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

17 years ago Reviewed by Ken and Maciej.
kdecker [Tue, 15 Mar 2005 21:44:32 +0000 (21:44 +0000)]
    Reviewed by Ken and Maciej.

New fix for <rdar://problem/3667701> crash in KHTMLPart::jScriptEnabled()

The tokenizer has buffers which mean parsing can continue even after loading is supposed to be stopped. If the loading process was aborted, the tokenizer should abort, too.

        * khtml/html/htmltokenizer.cpp:
        (khtml::HTMLTokenizer::HTMLTokenizer): Initialize loadStopped to false.
        (khtml::HTMLTokenizer::write): Go ahead and bail out if loadStopped is true.
        * khtml/html/htmltokenizer.h: Added loadStopped flag. Changed the view pointer from a standard pointer to a QGuardedPtr.  This fixes the crash.  Now the tokenizer's handle to the view will now automatically nil-out and never dangle.
        * khtml/khtml_part.cpp:
        (KHTMLPart::closeURL): Notify the tokenizer to stop parsing.
        * khtml/xml/xml_tokenizer.cpp:
        (khtml::XMLTokenizer::XMLTokenizer): Initialize loadStopped to false.
        * khtml/xml/xml_tokenizer.h:
        (khtml::Tokenizer::stopParsing): Added.

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

17 years ago Fix <rdar://problem/4051389> 8A413: gifs animating too fast
rjw [Tue, 15 Mar 2005 04:00:59 +0000 (04:00 +0000)]
Fix <rdar://problem/4051389> 8A413: gifs animating too fast

        Reviewed by Maciej.

Match Mozilla's policy for minimum frame duration, which is somewhat odd:

<= 0.01 sec use .1 sec, otherwise use specified duration.

        * WebCoreSupport.subproj/WebImageData.m:
        (-[WebImageData _frameDurationAt:]):

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

17 years ago Reviewed by Darin, Maciej.
harrison [Tue, 15 Mar 2005 02:06:19 +0000 (02:06 +0000)]
    Reviewed by Darin, Maciej.

        <rdar://problem/4046103> REGRESSION (Mail): clicking after style change sets insertion point incorrectly

        Also fixes crash by adding nil check.

        * khtml/editing/htmlediting.cpp:
        Check the node for nil.

        * khtml/khtml_part.cpp:
        Use the node from the event rather than from the selection.

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

17 years ago Reviewed by Harrison.
darin [Tue, 15 Mar 2005 01:45:23 +0000 (01:45 +0000)]
    Reviewed by Harrison.

        - fixed <rdar://problem/4049776> Seed: Mail: Disable spellcheck leaves red artifacts

        * WebView.subproj/WebFrameInternal.h: Added _unmarkAllMisspellings.
        * WebView.subproj/WebFrame.m: (-[WebFrame _unmarkAllMisspellings]): Added.
        Calls unmarkAllMisspellings on the bridge and self and all subframes.

        * WebView.subproj/WebView.m: (-[WebView setContinuousSpellCheckingEnabled:]):
        Call _unmarkAllMisspellings on the main frame when turning continuous spell checking off.

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

17 years ago Reviewed by Harrison.
darin [Tue, 15 Mar 2005 01:05:23 +0000 (01:05 +0000)]
    Reviewed by Harrison.

        - fixed <rdar://problem/4049776> Seed: Mail: Disable spellcheck leaves red artifacts

        * khtml/xml/dom_docimpl.cpp:
        (DocumentImpl::DocumentImpl): Set markers list to be "auto-delete" so they don't all leak.
        (DocumentImpl::removeMarker): Remove markers list for a node when the last marker is removed
        for that node. Otherwise, we can have empty marker lists for each node forever until the
        document goes away.
        (DocumentImpl::removeAllMarkers): Added code to dirty the markers.
        (DocumentImpl::shiftMarkers): Remove unneeded empty check.

        * kwq/WebCoreBridge.h: Added unmarkAllMisspellings for WebKit.
        * kwq/WebCoreBridge.mm: (-[WebCoreBridge unmarkAllMisspellings]): Added. Calls removeAllMarkers.

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

17 years agoWebKit:
rjw [Tue, 15 Mar 2005 00:50:45 +0000 (00:50 +0000)]
Fixed <rdar://problem/4027928> Tiger_8A394:Acrobat crashes while tried to remove the subscription errors by clicking on "Would you like to remove the subscription" from Tracker details view pane

The Acrobat application triggers loads of new documents in it's policy delegate.  This
ultimately causes the WebHTMLView to be released before their event handlers have
returned.  To bullet proof against this case we retain/release self before passing
the event on for further handling.

        Reviewed by Maciej.

        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView _updateMouseoverWithEvent:]):
        (-[WebHTMLView scrollWheel:]):
        (-[WebHTMLView mouseDown:]):
        (-[WebHTMLView mouseDragged:]):
        (-[WebHTMLView mouseUp:]):
        (-[WebHTMLView keyDown:]):
        (-[WebHTMLView keyUp:]):
        (-[WebHTMLView performKeyEquivalent:]):

Fixed <rdar://problem/4027928> Tiger_8A394:Acrobat crashes while tried to remove the subscription errors by clicking on "Would you like to remove the subscription" from Tracker details view pane

A document may be deleted as a consequence of handling an event,
as was the case with Acrobat.app.  Ensure that the document is still valid
before passing the event on for further handling.

        * khtml/xml/dom_nodeimpl.cpp:

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

17 years ago Reviewed by me
kocienda [Tue, 15 Mar 2005 00:43:10 +0000 (00:43 +0000)]
    Reviewed by me

        Added a couple of comments about setChanged() to this code based on my experiences with 4047028.

        * khtml/css/css_valueimpl.cpp:

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

17 years ago Reviewed by John
kocienda [Tue, 15 Mar 2005 00:26:14 +0000 (00:26 +0000)]
    Reviewed by John

        Fix for this bug:

        <rdar://problem/4047028> Changing quote levels on stylized text causes it to be sent as colored (Blue). Tiger8A410

        * khtml/css/css_valueimpl.cpp:
        (DOM::CSSMutableStyleDeclarationImpl::removePropertiesInSet): This function now calls setChanged() at the
        end of its loop if any properties were removed. This makes the style system update correctly in response
        to changes made by this function. The code to paste removes style from the pasted content in a
        preliminary step, and the fact that the style system did not update properly left unwanted color
        declarations in the document.

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

17 years ago - roll out the fix for 4040321, since it is still pending CCC review.
vicki [Mon, 14 Mar 2005 23:50:14 +0000 (23:50 +0000)]
- roll out the fix for 4040321, since it is still pending CCC review.

    2005-03-10  Richard Williamson   <rjw@apple.com>

        Fixed <rdar://problem/4040321> Exception: Someone's trying to encode a WebDataRequestParameters instance

        Reviewed by Darin.

        If a delegate returns a mutated applewebdata: request in it's willSendRequest:
        method, we don't load using the WebDataRequest.  Instead we do a normal load.
        Unfortunately, if the request they return is mutated *copy* of the applewebdata:
        request it will hold the applewebdata: special properties.  These properties
        will be encoded into the cache.   They should not be.  So, to fix, we sanitize the
        request, by removing the special properties from the request.

        Note that we had to dig into the private guts of NSURLRequest because there is
        no public mechanism to remove properties from a request, see 4046775.

        * WebView.subproj/WebBaseResourceHandleDelegate.m:
        (-[WebBaseResourceHandleDelegate willSendRequest:redirectResponse:]):
        * WebView.subproj/WebDataProtocol.h:
        * WebView.subproj/WebDataProtocol.m:
        (-[NSURLRequest _webDataRequestExternalRequest]):
        (-[NSURLRequest _webDataRequestSanitize]):

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

17 years ago - roll out this change for now, since it was denied by CCC
vicki [Mon, 14 Mar 2005 23:33:30 +0000 (23:33 +0000)]
- roll out this change for now, since it was denied by CCC

    2005-03-11  David Harrison  <harrison@apple.com>

        Reviewed by Darin.

        <rdar://problem/4046602> WebCore invokes undefined behavior when the spell checker isn't running

        * kwq/KWQKHTMLPart.mm:
        Nil check checker.

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

17 years ago Reviewed by John
kocienda [Mon, 14 Mar 2005 22:09:35 +0000 (22:09 +0000)]
    Reviewed by John

        Fix for this bug:

        <rdar://problem/4050403> Mail crashes after pasting and deleting the content of one Excel cell

        * khtml/editing/htmlediting.cpp:
        (khtml::DeleteSelectionCommand::handleGeneralDelete): Add some null checks to the code. This fixes the crash, although
        following the steps described in the bug by John Sullivan on 3/14/05 at 10:49 AM will leave us with a "blank line" in
        the document that cannot be removed (this is actually an empty table). This is undesirable, however, work Maciej is
        doing to fix the general-case problem of trying to edit constructs we do not handle well in editing should fix this
        particular case, making the deletion of this "blank line" possible. Maciej is doing this work as part of this bug:
        <rdar://problem/4036051> Hard to select (and thus delete) an IFRAME in an editable WebView

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

17 years ago Reviewed by Darin
kocienda [Mon, 14 Mar 2005 21:49:25 +0000 (21:49 +0000)]
    Reviewed by Darin

        Fix for this bug:

        <rdar://problem/4029632> Mail crashes in DOM::NodeImpl::isBlockFlow() after pasting text with alignment style and BR element from Safari

        The problem is that removeInlineStyle() can remove nodes, and if either the start or end node of the
        selection at the time of the call to removeInlineStyle() was in a node that got removed, bad things
        would happen. The fix is described below.

        * khtml/editing/htmlediting.cpp:
        (khtml::maxRangeOffset): Moved this static function to a different place in the file so the code below can use it.
        (khtml::ApplyStyleCommand::applyInlineStyle): Calling removeInlineStyle() now has the side effect of
        setting the command's ending selection. Now resets start and end using the ending selection after the call to
        removeInlineStyle() as it is done elsewhere in this function.
        (khtml::ApplyStyleCommand::removeInlineStyle): Track the removal of the start or end node based on
        the positions passed in. If either the start or the end node is removed as part of style removal,
        set an appropriate replacement start or end that is still in the document.

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

17 years agoversioning for tip of tree, Safari 2.0 (406+)
vicki [Mon, 14 Mar 2005 21:40:39 +0000 (21:40 +0000)]
versioning for tip of tree, Safari 2.0 (406+)

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

17 years agoversioning for SUPanWheat, Safari 1.3 (v306)
vicki [Mon, 14 Mar 2005 21:36:13 +0000 (21:36 +0000)]
versioning for SUPanWheat, Safari 1.3 (v306)

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

17 years agoSafari-406 stamp
vicki [Mon, 14 Mar 2005 21:21:44 +0000 (21:21 +0000)]
Safari-406 stamp

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

17 years ago Reviewed by Darin
kocienda [Mon, 14 Mar 2005 17:58:38 +0000 (17:58 +0000)]
    Reviewed by Darin

        I need to roll out Kevin's change to fix 3667701. It breaks contextual fragments, and hence breaks
        paste in editing (among other things).

        * khtml/html/htmltokenizer.cpp: Roll out recent change.
        * khtml/html/htmltokenizer.h: Ditto.

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

17 years ago Reviewed by Ken and Maciej.
darin [Mon, 14 Mar 2005 17:49:31 +0000 (17:49 +0000)]
    Reviewed by Ken and Maciej.

        - fixed <rdar://problem/4049040> REGRESSION (403-405): security check prevents user stylesheet from loading (Dictionary.app doesn't work at all!)

        * Plugins.subproj/WebNetscapePluginStream.m: (-[WebNetscapePluginStream initWithRequest:pluginPointer:notifyData:sendNotification:]):
        Allow plug-in subresource streams to load with any URL, ignoring the "canLoadURL" method's restriction (only
        file URLs can load other file URLs), which now applies only to main resources, like web pages in frames or
        object tags and plug-in main resources.

        * WebCoreSupport.subproj/WebBridge.m:
        (-[WebBridge startLoadingResource:withURL:customHeaders:]): Allow subresources to load with any URL, as above.
        This allows things like images, stylesheets, and JavaScript to be loaded without the "canLoadURL" method's
        (-[WebBridge startLoadingResource:withURL:customHeaders:postData:]): Ditto.
        (-[WebBridge syncLoadResourceWithURL:customHeaders:postData:finalURL:responseHeaders:statusCode:]): Ditto.

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

17 years ago Reviewed by Ken and Maciej.
darin [Mon, 14 Mar 2005 17:49:05 +0000 (17:49 +0000)]
    Reviewed by Ken and Maciej.

        - fixed <rdar://problem/4049040> REGRESSION (403-405): security check prevents user stylesheet from loading (Dictionary.app doesn't work at all!)

        * kwq/WebCoreBridge.mm: (-[WebCoreBridge canLoadURL:fromReferrer:hideReferrer:]): Changed to give "applewebdata:"
        documents the same privileges to open local files that "file:" documents have.

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

17 years ago Reviewed by mjs.
kdecker [Mon, 14 Mar 2005 15:04:01 +0000 (15:04 +0000)]
    Reviewed by mjs.

        Fixed: <rdar://problem/3667701> crash in KHTMLPart::jScriptEnabled()

        The problem here was that the tokenizer would continue to receive chunks of data from the loader already
        after the view and part had been destroyed.  Situations like this could arise when clicking on another link
        while still loading the current view, or during self test where we rapidly open, load, and close browser
        windows very fast.

        * khtml/html/htmltokenizer.cpp:
        (khtml::HTMLTokenizer::write): Simple nil check against the view.
        * khtml/html/htmltokenizer.h: Changed the view pointer from a standard pointer to a QGuardedPtr.  The tokenizer's
        handle to the view will now automatically nil-out and never dangle.

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

17 years ago Reviewed by John and Ken.
darin [Sun, 13 Mar 2005 21:35:32 +0000 (21:35 +0000)]
    Reviewed by John and Ken.

        - fixed <rdar://problem/4044347> REGRESSION (Mail): Control-K in particular message moves insertion point to previous line

        Tweaked the deleting code, and added three new deleting layout tests to confirm the new code works.

        * khtml/editing/htmlediting.cpp:
        (khtml::DeleteSelectionCommand::handleSpecialCaseBRDelete): Removed special case with comment that said it was
        for the case where a "selection contains only a BR right after a block ended". This code was being triggered in
        more cases than just that one, and in all the cases I tested, the general delete code works fine.
        (khtml::DeleteSelectionCommand::handleGeneralDelete): Changed the code that decides whether to delete an entire
        block to understand the case where the end block is outside the start block, but contains the start block.
        In that case, we want to delete the entire block. Not deleting the block was causing us to delete just the <br>,
        and not the enclosing <div> in the case in the bug.

        * layout-tests/editing/deleting/delete-line-015-expected.txt: Added.
        * layout-tests/editing/deleting/delete-line-015.html: Added.
        * layout-tests/editing/deleting/delete-line-016-expected.txt: Added.
        * layout-tests/editing/deleting/delete-line-016.html: Added.
        * layout-tests/editing/deleting/delete-line-017-expected.txt: Added.
        * layout-tests/editing/deleting/delete-line-017.html: Added.
        * layout-tests/editing/style/smoosh-styles-002-expected.txt: Updated to improved results. With the code change, the deletion
        now deletes more than it used to. The old results had an empty text node and <h1> element that were both 0-sized, and now
        we delete both of those.

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

17 years ago - fixed <rdar://problem/4049172> REGRESSION (403-405): Gmail: text box in...
darin [Sun, 13 Mar 2005 17:29:34 +0000 (17:29 +0000)]
    - fixed <rdar://problem/4049172> REGRESSION (403-405): Gmail: text box in "Invite a friend" section overlaps other sections

        Rolled out fix for <rdar://problem/3952698> Function buttons do not display properly with Telia Webmail

        * khtml/rendering/render_replaced.cpp: (RenderReplaced::calcMinMaxWidth): Back to previous version of this file.

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

17 years ago Reviewed by Adele.
mjs [Sun, 13 Mar 2005 01:58:09 +0000 (01:58 +0000)]
    Reviewed by Adele.

<rdar://problem/4046144> RSS pages leave a hole in local file security policy (need to revert feed: exemption)

* kwq/WebCoreBridge.mm:
        (-[WebCoreBridge canLoadURL:fromReferrer:hideReferrer:]): Revert
emergency workaround for Safari RSS, now that a new Syndication
has been submitted.

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

17 years ago Reviewed by Kevin.
mjs [Sun, 13 Mar 2005 00:51:41 +0000 (00:51 +0000)]
    Reviewed by Kevin.

<rdar://problem/4026787> text typed after a link (pasted or Mail Link to this Page) is part of the link, underlined and colored blue

The concept of this change is every time you type at the very
start or very end of a link (even if nested in further inner
elements), the typed text goes outside the link instead of inside.

* khtml/editing/htmlediting.cpp:
        (khtml::InsertTextCommand::prepareForTextInsertion): Check whether
we are at the first visible position or last visible position of a
special element. For now this only includes HTML A elements that
are links (i.e. they have an href).
(khtml::isSpecialElement): Helper function that identifies special
elements (for now only links).
        (khtml::isFirstVisiblePositionInSpecialElement): Checks if a given DOM
position is equivalent to the first visible position in some containing
editable special element.
        (khtml::positionBeforeNode): Returns the DOM position immediately
before a node.
        (khtml::positionBeforeContainingSpecialElement): Gives a DOM
position immediately before the outermost editable containing
special element where the passed-in position is equivalent to the
first visible position.
        (khtml::maxRangeOffset): Helper to get the maximum allowed
range/position offset for a node, does the right thing based on
whether the node would use a character offset or child offset.
        (khtml::isLastVisiblePositionInSpecialElement): Similar to above,
but for end of node instead of start.
        (khtml::positionAfterNode): Ditto.
        (khtml::positionAfterContainingSpecialElement): Ditto.

Some layout tests changed - I looked over all the diffs and found
that the only changes were "junk nodes" like empty spans and text
nodes moving from one spot in the tree to another. These changes
are all harmless and do not affect layout or future editing.

        * layout-tests/editing/inserting/typing-003-expected.txt:
        * layout-tests/editing/style/remove-underline-across-paragraph-expected.txt:
        * layout-tests/editing/style/remove-underline-across-paragraph-in-bold-expected.txt:
        * layout-tests/editing/style/remove-underline-after-paragraph-expected.txt:
        * layout-tests/editing/style/remove-underline-after-paragraph-in-bold-expected.txt:
        * layout-tests/editing/style/remove-underline-expected.txt:
        * layout-tests/editing/style/remove-underline-from-stylesheet-expected.txt:
        * layout-tests/editing/style/remove-underline-in-bold-expected.txt:
        * layout-tests/editing/style/typing-style-003-expected.txt:
        * layout-tests/editing/style/unbold-in-bold-expected.txt:
        * layout-tests/editing/style/underline-expected.txt:

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

17 years ago backing out fix for <rdar://problem/4021711> REGRESSION (125-188): blank...
adele [Sat, 12 Mar 2005 00:43:59 +0000 (00:43 +0000)]
    backing out fix for <rdar://problem/4021711> REGRESSION (125-188): blank pages when browsing forum at cooperativeresearch.org - cached external script problem

        This caused the following regressions (that we know of):
        <rdar://problem/4047445> REGRESSION (Safari-400-403?): Some or all page contents sometimes don't appear (macworld.com)
        <rdar://problem/4046153> 8a409: Problem loading Citibank page in Safari 2 (403)
        <rdar://problem/4047801> REGRESSION (402-403): .Mac homepage links don't work

        * khtml/html/htmltokenizer.cpp:

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

17 years ago Reviewed by Darin.
harrison [Fri, 11 Mar 2005 20:54:43 +0000 (20:54 +0000)]
    Reviewed by Darin.

        <rdar://problem/4046602> WebCore invokes undefined behavior when the spell checker isn't running

        * kwq/KWQKHTMLPart.mm:
        Nil check checker.

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

17 years ago Reviewed by me
kocienda [Fri, 11 Mar 2005 19:08:55 +0000 (19:08 +0000)]
    Reviewed by me

        * ForwardingHeaders/editing/visible_units.h: Added.

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

17 years ago Reviewed by John
kocienda [Fri, 11 Mar 2005 18:43:36 +0000 (18:43 +0000)]
    Reviewed by John

        Fix for this bug:

        <rdar://problem/4045521> Hitting return key with full line selected does not add blank line as it should

        * khtml/editing/htmlediting.cpp:
        (khtml::InsertParagraphSeparatorCommand::doApply): Removed some "special-case" code from this
        function that would look for a selection that started and ended in a different block, and would
        then bail right after the deletion of the selection without inserting a paragraph separator.
        This was just wrong. So, the code change is removal only. When the general-case code runs instead
        of the erroneous special-case code, the bug goes away.

        New tests:

        * layout-tests/editing/inserting/return-key-with-selection-001-expected.txt: Added.
        * layout-tests/editing/inserting/return-key-with-selection-001.html: Added.
        * layout-tests/editing/inserting/return-key-with-selection-002-expected.txt: Added.
        * layout-tests/editing/inserting/return-key-with-selection-002.html: Added.
        * layout-tests/editing/inserting/return-key-with-selection-003-expected.txt: Added.
        * layout-tests/editing/inserting/return-key-with-selection-003.html: Added.

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

17 years ago Reviewed by Darin.
harrison [Fri, 11 Mar 2005 17:40:53 +0000 (17:40 +0000)]
    Reviewed by Darin.

        <rdar://problem/4009446> AX: kAXTextMarkerForPositionParameterizedAttribute not working correctly (required for Dictionary pop-up)

        * kwq/KWQAccObject.mm:
        (-[KWQAccObject accessibilityAttributeValue:]):
        Comment changes.

        (-[KWQAccObject doAXTextMarkerForPosition:]):
        Dig into widgets.

        (-[KWQAccObject doAXBoundsForTextMarkerRange:]):
        Use the selection's document instead of the top document, to accommodate frames, etc.

        (-[KWQAccObject accessibilityAttributeValue:forParameter:]):
        Fixed parameter processing to look for NSValue instead of AXValue.

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

17 years agomove the Safari-405 release marker, since <rdar://problem/4046510> will be included...
vicki [Fri, 11 Mar 2005 17:32:03 +0000 (17:32 +0000)]
move the Safari-405 release marker, since <rdar://problem/4046510> will be included in 405

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

17 years agomove the Safari-405 release marker, since we're including <rdar://problem/4037700...
vicki [Fri, 11 Mar 2005 17:27:55 +0000 (17:27 +0000)]
move the Safari-405 release marker, since we're including <rdar://problem/4037700> in Safari-405

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

17 years ago Reviewed by Harrison
kocienda [Fri, 11 Mar 2005 16:52:18 +0000 (16:52 +0000)]
    Reviewed by Harrison

        Fix for this bug:

        <rdar://problem/3972665> 8A360: HTML message partially truncated on left hand side, text-indent from Script Editor

        This was fixed, then regressed with Harrison's fix for this bug:

        <rdar://problem/3948453> Can't type accented chars as first character in Stickies widget

        * khtml/editing/htmlediting.cpp:
        (khtml::ReplaceSelectionCommand::doApply): My now addresses both problems in a way that they no longer
        clobber each other.

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

17 years ago Reviewed by John
kocienda [Fri, 11 Mar 2005 16:30:14 +0000 (16:30 +0000)]
    Reviewed by John

        Fix for these bugs:

        <rdar://problem/4045511> Copying and pasting end-of-paragraph selection puts insertion point in wrong place
        <rdar://problem/4045513> Copying and pasting selection starting at end of paragraph can incorrectly remove line break

        The copy/paste code before this patch had no notion of a "logical newline" at the start of the selection. We have
        had a similar notion for "logical newline" at the end of the selection for quite some time. To fix these bugs, we
        need to introduce the same idea for selection starts.

        * khtml/editing/htmlediting.cpp:
        (khtml::ReplacementFragment::ReplacementFragment): Process the "logical newline" at start as we write it out
        in markup. Set the bit we added to this object to signify we have such a newline.
        (khtml::ReplaceSelectionCommand::doApply): Many, many changes to introduce the new "logical newline" at start concept.
        I also tried to simply the code that sets the start position for inserting content to be pasted. I also improved a
        weakness in the smart-paste code. Now, we check before and after the paste for whether we need to add a leading or
        trailing space. The code previous to this patch only did a "before" check, with the result that we sometimes added
        a second space. In other words, the code did not realize that DOM changes done by pasting could cause formerly
        unrendered whitespace to become rendered. Also moved line placeholder clean up code to its own function.
        (khtml::ReplaceSelectionCommand::removeLinePlaceholderIfNeeded): New helper that further refines the notion
        of when we can remove a line placeholder. The definition is now, "If a line placeholder is at the visible start
        and visible end of its line, keep it; otherwise remove it".
        * khtml/editing/htmlediting.h: Declare new functions. Rework inlines in ReplacementFragment class to account for
        addition of new "logical newline" at start concept.
        (khtml::ReplacementFragment::hasInterchangeNewlineAtStart): New accessor.
        (khtml::ReplacementFragment::hasInterchangeNewlineAtEnd): Renamed from hasInterchangeNewline(), since before we
        only had a bit for the end, hence we did not need to distinguish it from the start.
        * khtml/editing/markup.cpp:
        (khtml::createMarkup): Added code to detect and write out markup for cases where we have a "logical newline" at start.
        * khtml/xml/dom2_rangeimpl.cpp:
        (DOM::RangeImpl::startPosition): New helper.
        (DOM::RangeImpl::endPosition): Ditto.
        * khtml/xml/dom2_rangeimpl.h: Declare new helpers.

        New tests:
        * layout-tests/editing/pasteboard/paste-line-endings-001-expected.txt: Added.
        * layout-tests/editing/pasteboard/paste-line-endings-001.html: Added.
        * layout-tests/editing/pasteboard/paste-line-endings-002-expected.txt: Added.
        * layout-tests/editing/pasteboard/paste-line-endings-002.html: Added.
        * layout-tests/editing/pasteboard/paste-line-endings-003-expected.txt: Added.
        * layout-tests/editing/pasteboard/paste-line-endings-003.html: Added.
        * layout-tests/editing/pasteboard/paste-line-endings-004-expected.txt: Added.
        * layout-tests/editing/pasteboard/paste-line-endings-004.html: Added.
        * layout-tests/editing/pasteboard/paste-line-endings-005-expected.txt: Added.
        * layout-tests/editing/pasteboard/paste-line-endings-005.html: Added.
        * layout-tests/editing/pasteboard/paste-line-endings-006-expected.txt: Added.
        * layout-tests/editing/pasteboard/paste-line-endings-006.html: Added.
        * layout-tests/editing/pasteboard/paste-line-endings-007-expected.txt: Added.
        * layout-tests/editing/pasteboard/paste-line-endings-007.html: Added.
        * layout-tests/editing/pasteboard/paste-line-endings-008-expected.txt: Added.
        * layout-tests/editing/pasteboard/paste-line-endings-008.html: Added.
        * layout-tests/editing/pasteboard/paste-line-endings-009-expected.txt: Added.
        * layout-tests/editing/pasteboard/paste-line-endings-009.html: Added.
        * layout-tests/editing/pasteboard/paste-line-endings-010-expected.txt: Added.
        * layout-tests/editing/pasteboard/paste-line-endings-010.html: Added.

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

17 years ago Fixed <rdar://problem/4040321> Exception: Someone's trying to encode a WebDataReques...
rjw [Fri, 11 Mar 2005 01:43:15 +0000 (01:43 +0000)]
Fixed <rdar://problem/4040321> Exception: Someone's trying to encode a WebDataRequestParameters instance

        Reviewed by Darin.

If a delegate returns a mutated applewebdata: request in it's willSendRequest:
method, we don't load using the WebDataRequest.  Instead we do a normal load.
Unfortunately, if the request they return is mutated *copy* of the applewebdata:
request it will hold the applewebdata: special properties.  These properties
will be encoded into the cache.   They should not be.  So, to fix, we sanitize the
request, by removing the special properties from the request.

Note that we had to dig into the private guts of NSURLRequest because there is
no public mechanism to remove properties from a request, see 4046775.

        * WebView.subproj/WebBaseResourceHandleDelegate.m:
        (-[WebBaseResourceHandleDelegate willSendRequest:redirectResponse:]):
        * WebView.subproj/WebDataProtocol.h:
        * WebView.subproj/WebDataProtocol.m:
        (-[NSURLRequest _webDataRequestExternalRequest]):
        (-[NSURLRequest _webDataRequestSanitize]):

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

17 years ago Reviewed by Vicki.
mjs [Fri, 11 Mar 2005 01:27:18 +0000 (01:27 +0000)]
    Reviewed by Vicki.

<rdar://problem/4046510> REGRESSION (TOT): All Flash and Shockwave plugin-based web content missing

* Plugins.subproj/WebNetscapePluginStream.m:
        (-[WebNetscapePluginStream initWithRequest:pluginPointer:notifyData:sendNotification:]):

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

17 years ago Reviewed by Richard.
darin [Fri, 11 Mar 2005 01:18:39 +0000 (01:18 +0000)]
    Reviewed by Richard.

        - fixed <rdar://problem/4037700> Every character typed causes stat call for /usr/share/icu/icudt32b_char.brk

        * khtml/rendering/render_text.cpp: (getCharacterBreakIterator): Set boolean "got iterator" to true.

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

17 years agoversioning for TOT, Safari 2.0 (v405+). The tree is open!
vicki [Fri, 11 Mar 2005 00:49:55 +0000 (00:49 +0000)]
versioning for TOT, Safari 2.0 (v405+).  The tree is open!

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

17 years agoversioning for SUPanWheat, Safari 1.3 (v305)
vicki [Fri, 11 Mar 2005 00:42:18 +0000 (00:42 +0000)]
versioning for SUPanWheat, Safari 1.3 (v305)

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

17 years agoSafari-405 stamp (skipped 404 since it ends in a "4")
vicki [Fri, 11 Mar 2005 00:37:54 +0000 (00:37 +0000)]
Safari-405 stamp (skipped 404 since it ends in a "4")

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

17 years ago Reviewed by Ken.
darin [Thu, 10 Mar 2005 22:05:33 +0000 (22:05 +0000)]
    Reviewed by Ken.

        - fixed <rdar://problem/4042867> "Bigger" changes the font size of too much text when the selection is on a style-change boundary

        * khtml/editing/htmlediting.cpp: (khtml::ApplyStyleCommand::applyRelativeFontStyleChange):
        Advance out of the starting text node if we're at the end of it.

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

17 years ago * khtml/html/htmltokenizer.cpp: (khtml::HTMLTokenizer::write): Fixed assertio...
darin [Thu, 10 Mar 2005 21:59:39 +0000 (21:59 +0000)]
    * khtml/html/htmltokenizer.cpp: (khtml::HTMLTokenizer::write): Fixed assertion for nested calls to write.

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

17 years ago Reviewed by Darin.
harrison [Thu, 10 Mar 2005 21:54:45 +0000 (21:54 +0000)]
    Reviewed by Darin.

        <rdar://problem/4032346> REGRESSION (Mail): changing 1st line of a URL that wraps to two lines doesn't always update 2nd line

        * khtml/rendering/bidi.cpp:
        Look at first clean line in case line wrap implicitly dirtied it.

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

17 years ago Reviewed by Vicki.
mjs [Thu, 10 Mar 2005 21:43:38 +0000 (21:43 +0000)]
    Reviewed by Vicki.

<rdar://problem/4046018> REGRESSION (TOT): RSS pages don't display anything

* kwq/WebCoreBridge.mm:
        (-[WebCoreBridge canLoadURL:fromReferrer:hideReferrer:]): Exempt
feed: and feeds: pages from the local file security check.

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

17 years ago Change written by Steve Peters, reviewed by me.
darin [Thu, 10 Mar 2005 21:40:27 +0000 (21:40 +0000)]
    Change written by Steve Peters, reviewed by me.

        - fixed <rdar://problem/4045924> improve compareBoundaryPoints to make style changes faster

        * khtml/xml/dom2_rangeimpl.cpp: (DOM::RangeImpl::compareBoundaryPoints):
        Do early outs in a couple of the loops to make things faster.

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

17 years ago Reviewed by Vicki.
sullivan [Thu, 10 Mar 2005 21:26:44 +0000 (21:26 +0000)]
    Reviewed by Vicki.

        - fixed <rdar://problem/4045843> Going back/forward to error page
        hits assertion in -[WebDataSource(WebPrivate) _setData:]

        * WebView.subproj/WebDataSource.m:
        (-[WebDataSource _setData:]):
        Removed bogus assertion

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

17 years agoFixes <rdar://problem/4040848> "REGR: Sun security-check demo applet does not load...
jens [Thu, 10 Mar 2005 21:09:24 +0000 (21:09 +0000)]
Fixes <rdar://problem/4040848> "REGR: Sun security-check demo applet does not load". Includes restoring part of the old NodeImpl::closeRenderer mechanism.

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

17 years ago Reviewed by Darin.
darin [Thu, 10 Mar 2005 19:30:07 +0000 (19:30 +0000)]
    Reviewed by Darin.

        - fixed <rdar://problem/3997044> default encoding for non-Latin incorrect

* WebKit/WebView.subproj/WebPreferences.m: (+[WebPreferences _systemCFStringEncoding]):
        Call __CFStringGetUserDefaultEncoding to get region, and TECGetWebTextEncodings to get
        the first encoding to determine the default encoding.

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

17 years agoFixed an indenting problem that crept in with the last check-in.
darin [Thu, 10 Mar 2005 19:29:57 +0000 (19:29 +0000)]
Fixed an indenting problem that crept in with the last check-in.

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

17 years ago Reviewed by John
kocienda [Thu, 10 Mar 2005 17:24:05 +0000 (17:24 +0000)]
    Reviewed by John

        Fix for this bug:

        <rdar://problem/4024929> REGRESSION (Mail): Pasting text with multiple reply levels removes one level instead of all

        The code to figure out which node to use to merge into an existing line did not drill into the first inline element
        as needed to make the feature work as user expect. Instead, it looked at the first node, and if it was a block, it
        skipped that node. This worked for some cases (including the important "paste-as-quotation" case) but obviously
        doesn't work for content quoted more than once.

        Now, mergeStartNode() will look for the first node in pasted content that is not a block. It will now also look
        for nodes specially marked by Mail as a node added to make "Paste As Quotation" work. It won't skip those.

        NOTE: This change will break Mail's "Paste As Quotation" feature for TOT WebKit users, but this is only a temporary
        problem that will exist until we sync up with Mail's pending change to mark nodes as needed in its pasteAsQuotation:

        * khtml/editing/html_interchange.h: Add ApplePasteAsQuotation constant used to check for "marked" blockquotes.
        * khtml/editing/htmlediting.cpp:
        (khtml::ReplacementFragment::mergeStartNode): Look for first node that is either not a block or is marked as
        an ApplePasteAsQuotation node.
        (khtml::isMailPasteAsQuotationNode): New helper that looks for nodes marked with ApplePasteAsQuotation.
        * khtml/editing/htmlediting.h: Updated header for new function.

        This test result changed is an acceptable way.

        * layout-tests/editing/pasteboard/paste-text-013-expected.txt
        * layout-tests/editing/pasteboard/paste-text-013.html

        NOTE: This change causes a regression in this layout test:

        * layout-tests/editing/pasteboard/paste-text-013.html

        This problem will need to be fixed separately, and this bug has been filed to track this problem:
        <rdar://problem/4045513> Copying and pasting selection starting at end of paragraph can incorrectly remove line break

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

17 years ago Reviewed by Richard.
mjs [Thu, 10 Mar 2005 04:04:46 +0000 (04:04 +0000)]
    Reviewed by Richard.

<rdar://problem/4040776> Dashboard (Weather widget) is a memory hog

Change things around so the event listeners for XMLHttpRequest
mark their JS listener objects instead of holding a hard
reference, to avoid an unbreakable reference cycle.

* khtml/ecma/kjs_events.cpp:
        * khtml/ecma/kjs_events.h:
        * khtml/ecma/kjs_html.h:
        * khtml/ecma/kjs_window.cpp:
        * khtml/ecma/kjs_window.h:
        * khtml/ecma/xmlhttprequest.cpp:
        * khtml/ecma/xmlhttprequest.h:
        * khtml/khtml_part.h:

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

17 years ago3997044 Use TECGetWebTextEncodings for default encoding per user language
goldsmit [Thu, 10 Mar 2005 03:21:26 +0000 (03:21 +0000)]
3997044 Use TECGetWebTextEncodings for default encoding per user language

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

17 years ago Reviewed by Richard.
rjw [Thu, 10 Mar 2005 01:34:34 +0000 (01:34 +0000)]
    Reviewed by Richard.

        - fixed <rdar://problem/4034175> REGRESSION (Mail): Can't use any font with style Light/Condensed/Semibold/Extrabold, etc

        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView _styleFromFontAttributes:]): Use a constant instead of hard-coded weight for clarity.
        (-[WebHTMLView _originalFontA]): Ditto.
        (-[WebHTMLView _originalFontB]): Ditto.
        (-[WebHTMLView _addToStyle:fontA:fontB:]): Add code to detect the case where the family name is not good enough
        to specify the font precisely. In that case, use the Postscript font name instead. Also change variable names
        so it's easier to understand the method.

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

17 years agoWebCore:
mjs [Thu, 10 Mar 2005 01:00:28 +0000 (01:00 +0000)]

        Reviewed by Darin.

<rdar://problem/4005575> Arbitrary file disclosure vulnerability due to ability to load local html from remote content

        * khtml/ecma/kjs_html.cpp:
        * khtml/ecma/kjs_window.cpp:
        * khtml/khtml_part.cpp:
        * khtml/khtml_part.h:
        * khtml/khtmlpart_p.h:
        * kwq/KWQKHTMLPart.mm:
        * kwq/KWQKHTMLPartBrowserExtension.mm:
        * kwq/WebCoreBridge.h:
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge didNotOpenURL:pageCache:]):
        (-[WebCoreBridge canLoadURL:fromReferrer:hideReferrer:]):


        Reviewed by Darin.

<rdar://problem/4005575> Arbitrary file disclosure vulnerability due to ability to load local html from remote content

* Plugins.subproj/WebBaseNetscapePluginView.m:
        (-[WebBaseNetscapePluginView requestWithURLCString:]):
        * Plugins.subproj/WebNetscapePluginEmbeddedView.m:
        (-[WebNetscapePluginEmbeddedView didStart]):
        * Plugins.subproj/WebNetscapePluginStream.m:
        (-[WebNetscapePluginStream initWithRequest:pluginPointer:notifyData:sendNotification:]):
        * WebCoreSupport.subproj/WebBridge.m:
        (-[WebBridge createWindowWithURL:frameName:]):
        (-[WebBridge startLoadingResource:withURL:customHeaders:]):
        (-[WebBridge startLoadingResource:withURL:customHeaders:postData:]):
        (-[WebBridge syncLoadResourceWithURL:customHeaders:postData:finalURL:responseHeaders:statusCode:]):
        (-[WebBridge loadURL:referrer:reload:userGesture:target:triggeringEvent:form:formValues:]):
        (-[WebBridge postWithURL:referrer:target:data:contentType:triggeringEvent:form:formValues:]):
        (-[WebBridge createChildFrameNamed:withURL:referrer:renderPart:allowsScrolling:marginWidth:marginHeight:]):
        (-[WebBridge viewForPluginWithURL:attributeNames:attributeValues:MIMEType:]):
        * WebView.subproj/WebFrame.m:
        (-[WebFrame _loadURL:referrer:intoChild:]):
        * WebView.subproj/WebFramePrivate.h:

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

17 years agoWebKit:
rjw [Wed, 9 Mar 2005 22:30:26 +0000 (22:30 +0000)]
Fixed <rdar://problem/4032938> Safari: text layout for MS P Gothic font is corrupted

The AppKit and ATS reports that MS P Gothic is fixed pitch.  It is
not!  This is another case of "fixed pitch" being wrong.  I've
coalesced all the special cases into our isFontFixedPitch:, and
used a dictionary to improve speed.  No performance regression.

        Reviewed by Maciej.

        * WebCoreSupport.subproj/WebTextRenderer.m:
        (-[WebTextRenderer _computeWidthForSpace]):
        * WebCoreSupport.subproj/WebTextRendererFactory.m:
        (-[WebTextRendererFactory clearCaches]):
        (-[WebTextRendererFactory isFontFixedPitch:]):

Fixed <rdar://problem/4032938> Safari: text layout for MS P Gothic font is corrupted

Remove our hacked special case now we have our own cache of
which fonts are fixed  pitch.

        Reviewed by Maciej.

        * kwq/KWQFont.mm:

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

17 years ago Reviewed by Maciej.
harrison [Wed, 9 Mar 2005 19:49:48 +0000 (19:49 +0000)]
    Reviewed by Maciej.

        <rdar://problem/4037141> REGRESSION (Mail): Pasting deletes preceding blank lines with certain steps

        * khtml/editing/htmlediting.cpp:
        Add check for anonymous text after blocks.

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

17 years ago Reviewed by Maciej.
darin [Wed, 9 Mar 2005 19:00:31 +0000 (19:00 +0000)]
    Reviewed by Maciej.

        <rdar://problem/4040388> REGRESSION (172-173): nonrepro crash in -[NSString(WebNSURLExtras) _web_isUserVisibleURL]

        * Misc.subproj/WebNSURLExtras.m:
        (-[NSString _web_isUserVisibleURL]): Fixed some pointer expressions that didn't include the index in the expression.
        (readIDNScriptWhiteListFile): Removed NSLog statements in here since we decided they aren't useful and they will
        write some messages on Tiger.

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

17 years ago * DOM.subproj/DOMPrivate.h: Checked in file copied from WebCore.
darin [Wed, 9 Mar 2005 18:37:58 +0000 (18:37 +0000)]
    * DOM.subproj/DOMPrivate.h: Checked in file copied from WebCore.

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

17 years agoUpdated bug number in Richard's change.
darin [Wed, 9 Mar 2005 18:21:44 +0000 (18:21 +0000)]
Updated bug number in Richard's change.

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

17 years ago Reviewed by John
kocienda [Wed, 9 Mar 2005 01:06:32 +0000 (01:06 +0000)]
    Reviewed by John

        Fix for these bugs:

        <rdar://problem/4039661> crash in ApplyStyleCommand::applyBlockStyle pasting contents of webpage into Mail or Blot
        <rdar://problem/4039672> hang in moveParagraphContentsToNewBlockIfNecessary after pasting contents of webpage into Blot

        * khtml/editing/htmlediting.cpp:
        (khtml::CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessary): Fix for 4039672. Iteration needs to do
        a traverseNextSibling(), not a traverseNextNode(). The latter might iterate into a child that already got moved, and
        the code can infinite loop as a result.
        (khtml::ApplyStyleCommand::applyBlockStyle): Fix for 4039661. This function iterates over a set of nodes to apply
        block styles. Before, the iteration would go from the start to the end of the selection, and apply block styles
        as it went. However, the act of applying style could confuse the iteration. Now I iterate and store the relevant
        nodes in QPtrList before doing any style manipulation, and then iterate that set of nodes.

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

17 years ago Change written by Hyatt, reviewed by me.
darin [Wed, 9 Mar 2005 00:23:55 +0000 (00:23 +0000)]
    Change written by Hyatt, reviewed by me.

        - fixed <rdar://problem/3952698> Function buttons do not display properly with Telia Webmail

        * khtml/rendering/render_replaced.cpp: (RenderReplaced::calcMinMaxWidth):
        Only use a minWidth of 0 for images with a percentage value. Other replaced elements aren't scalable
        so their minWidth should be their calculated width. This has been wrong all along, but it's a relatively
        safe change because it only affects replaced elements' min-width.

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

17 years ago Reviewed by Ken.
harrison [Wed, 9 Mar 2005 00:08:04 +0000 (00:08 +0000)]
    Reviewed by Ken.

        <rdar://problem/4039006> REGRESSION (Mail): Command-left-arrow goes to the start of the wrong line in particular message

        * khtml/editing/visible_units.cpp:
        Use firstLeafChild() instead of firstChild().

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

17 years ago Fixed <rdar://problem/4042570> Need to check image properties for presence of width...
rjw [Wed, 9 Mar 2005 00:00:52 +0000 (00:00 +0000)]
Fixed <rdar://problem/4042570> Need to check image properties for presence of width/height properties

ImageIO-55 changed how image properties are created.  They
are now created incrementally.  So we need "re-get" the image
properties if the properties we care about (width/height) aren't
in the property dictionary.

        Reviewed by John.

        * WebCoreSupport.subproj/WebImageData.h:
        * WebCoreSupport.subproj/WebImageData.m:
        (-[WebImageData init]):
        (-[WebImageData fileProperties]):
        (-[WebImageData propertiesAtIndex:]):
        (-[WebImageData _isSizeAvailable]):
        (-[WebImageData incrementalLoadWithBytes:length:complete:callback:]):
        (-[WebImageData size]):

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

17 years ago Fixed by Tom Madden.
rjw [Tue, 8 Mar 2005 21:31:55 +0000 (21:31 +0000)]
Fixed by Tom Madden.

Fixed <rdar://problem/4038586> 8A402: Osaka-Mono text overlaps when typing with input method

We weren't clearing the "all ascii" flag when setting text on

        Reviewed by Richard Williamson.

        * khtml/rendering/render_text.cpp:

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

17 years ago A couple of tweaks to the previous patch, from Darin's review.
sullivan [Tue, 8 Mar 2005 19:05:50 +0000 (19:05 +0000)]
    A couple of tweaks to the previous patch, from Darin's review.

        * Misc.subproj/WebNSPasteboardExtras.m:
        remove unnecessary _web prefix
        (+[NSPasteboard _web_writableTypesForImageIncludingArchive:]):
        use mutableCopy rather than initWithArray:, and adjust for name changes

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

17 years ago Reviewed by Ken.
sullivan [Tue, 8 Mar 2005 18:53:42 +0000 (18:53 +0000)]
    Reviewed by Ken.

        - fixed <rdar://problem/4031826> REGRESSION (Mail): standalone images from
        Safari can't be pasted into Mail (WebKit part of fix)

        We were always declaring webarchive-related pasteboard types, even in the standalone
        image cases where we had no webarchive. Unfortunately, the WebView pasteboard-related
        API doesn't prevent this kind of thing from happening, because the code that
        declares the types isn't guaranteed to be anywhere near the code that writes
        the pasteboard data.

        After this fix, I discovered that pasting standalone images into Mail still doesn't
        work right, but the remaining issues seem to be entirely in Mail. I wrote up 4041671
        to cover these.

        * Misc.subproj/WebNSPasteboardExtras.h:
        (+[NSPasteboard _web_writableTypesForImageIncludingArchive:]):
        Added boolean parameter; clients must specify whether or not there's an
        archive involved, because the array of types is different if there is.

        * Misc.subproj/WebNSPasteboardExtras.m:
        new static function, constructs (once) and returns the array of types
        for images that don't have archives
        new static function, constructs (once) and returns the array of types
        for images that do have archives
        (+[NSPasteboard _web_writableTypesForImageIncludingArchive:]):
        added boolean parameter, now calls one of the two new static functions

        (-[NSPasteboard _web_writeImage:URL:title:archive:types:]):
        added asserts that we aren't declaring the archive types if we don't have archive data

        (-[NSPasteboard _web_declareAndWriteDragImage:URL:title:archive:source:]):
        updated to pass parameter to _web_writableTypesForImageIncludingArchive:

        * WebView.subproj/WebDefaultContextMenuDelegate.m:
        (-[WebDefaultUIDelegate copyImageToClipboard:]):
        updated to pass parameter to _web_writableTypesForImageIncludingArchive:

        * WebView.subproj/WebImageView.m:
        (-[WebImageView copy:]):
        updated to pass parameter to _web_writableTypesForImageIncludingArchive:

        * WebView.subproj/WebView.m:
        (-[WebView pasteboardTypesForElement:]):
        updated to pass parameter to _web_writableTypesForImageIncludingArchive:

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

17 years ago Reviewed by Ken and Maciej.
darin [Tue, 8 Mar 2005 17:42:38 +0000 (17:42 +0000)]
    Reviewed by Ken and Maciej.

        - fixed <rdar://problem/3988809> REGRESSION (Mail): wide space characters are turned into plain old spaces when typed or pasted

        Changed the few places where it matters to use a "collapsible whitespace" concept instead of
        the general whitespace concept. This means treating only ' ' and '\n' specially instead of
        including other space characters, which matches what the space-collapsing logic does in RenderText,
        although it really needs to behave differently based on whitespace mode.

        * khtml/editing/visible_text.h: (khtml::isCollapsibleWhitespace): Added. This returns true only for
        ' ' and '\n' since they are the only characters collapsed once text is in the DOM. But really it
        can't do the job ignoring white-space mode, so some day it must go.

        * khtml/editing/html_interchange.cpp: (convertHTMLTextToInterchangeFormat): Changed to use
        isCollapsibleWhitespace and removed unnecessary calls to latin1().

        * khtml/editing/htmlediting.cpp:
        (khtml::isNBSP): Removed unnecessary creation/destruction of QChar each time this is called.
        (khtml::nextCharacterIsCollapsibleWhitespace): Renamed from isWS and changed to use isCollapsibleWhitespace.
        (khtml::DeleteSelectionCommand::fixupWhitespace): Use isCollapsibleWhitespace instead of isWS,
        since we only want to do our NBSP tricks for collapsible whitespace.
        (khtml::InsertTextCommand::input): Changed use of isTab to instead say == "\t" since that does the
        same thing and is arguably just as clear. Changed use of isWS to == " " since the input text can't
        include any "\n" characters, and really a plain old space is the only collapsible thing that can
        be passed in. Use isCollapsibleWhitespace instead of isWS since we want to do NBSP tricks only for
        collapsible whitespace, not all whitespace.
        (khtml::InsertTextCommand::insertSpace): Use isCollapsibleWhitespace instead of isWS since we want
        to do NBSP tricks only for collapsible whitespace, not all whitespace.
        (khtml::RebalanceWhitespaceCommand::doApply): Ditto.

        * khtml/xml/dom_position.h: Changed treatNBSPAsWhiteSpace parameters to considerNonCollapsibleWhitespace
        parameters. The most common callers are only interested in collapsible whitespace, and the smart copy
        and paste callers want to include all whitespace, including non-breaking spaces and all the Unicode spaces.
        * khtml/xml/dom_position.cpp:
        (DOM::Position::leadingWhitespacePosition): Rename the parameter, and use either QChar::isSpace or
        isCollapsibleWhitespace depending on the boolean passed in.
        (DOM::Position::trailingWhitespacePosition): Ditto.

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

17 years ago More bullet proofing for <rdar://problem/4038304> CrashTracer: ....9 crashes at...
rjw [Tue, 8 Mar 2005 02:27:57 +0000 (02:27 +0000)]
More bullet proofing for <rdar://problem/4038304> CrashTracer: ....9 crashes at com.apple.WebKit: -[WebTextRenderer initWithFont:usingPrinterFont:] + 840

Protect against removal of Times and Times New Roman from
system.  If these fonts are removed attempt to get system font
instead of FATAL_ALWAYS.

        Reviewed by John.

        * WebCoreSupport.subproj/WebTextRenderer.m:
        (-[WebTextRenderer initWithFont:usingPrinterFont:]):

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

17 years ago Reviewed by Darin.
sullivan [Tue, 8 Mar 2005 02:27:50 +0000 (02:27 +0000)]
    Reviewed by Darin.

        - <rdar://problem/4040868> REGRESSION (Mail, 403-403+): Drag and drop deletes text,
        many other bad editing problems

        * khtml/rendering/render_text.cpp:
        A "-" should have been a "+" in this method that was tweaked an hour ago. Editing
        was completely horked.

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

17 years ago Additional nil check from fix for 4040749.
rjw [Tue, 8 Mar 2005 01:46:44 +0000 (01:46 +0000)]
Additional nil check from fix for 4040749.

        * khtml/rendering/render_box.cpp:

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

17 years ago Additional nil check from fix for 4040749.
rjw [Tue, 8 Mar 2005 01:38:13 +0000 (01:38 +0000)]
Additional nil check from fix for 4040749.

        * khtml/rendering/render_layer.cpp:

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

17 years ago Reviewed by Darin.
harrison [Tue, 8 Mar 2005 01:30:01 +0000 (01:30 +0000)]
    Reviewed by Darin.

        <rdar://problem/4033202> REGRESSION (Mail): Can't arrow up at a particular spot in a particular Mail message

        Doublecheck that new position is really on a different line, because the VisiblePosition constructor does not.
        Filed <rdar://problem/4040763> for that problem.

        * khtml/editing/visible_units.cpp:

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

17 years ago Fixed <rdar://problem/4040749> REGRESSION (125-178): opacity style not working,...
rjw [Tue, 8 Mar 2005 01:11:48 +0000 (01:11 +0000)]
Fixed <rdar://problem/4040749> REGRESSION (125-178): opacity style not working, breaks fading images on okcupid.com

When layers are dynamically created/removed as a result of changing opacity they weren't being correctly
sized and positioned.  This happens whenever opacity goes from < 1 to 1.

        Reviewed by Darin.

        * khtml/rendering/render_box.cpp:
        * khtml/rendering/render_layer.cpp:

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

17 years ago- fixed handling of min max caret position to take into account the possibility of...
kali [Tue, 8 Mar 2005 01:00:23 +0000 (01:00 +0000)]
- fixed handling of min max caret position to take into account the possibility of BIDI text (4016072)

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

17 years ago Reviewed by Ken.
harrison [Tue, 8 Mar 2005 00:24:13 +0000 (00:24 +0000)]
    Reviewed by Ken.

        <rdar://problem/4029225> REGRESSION (Mail): Crash if hit return after dragging in attachment - DeleteSelectionCommand::initializePositionData

        Work around the fact that the height() of a BR is 0 if there are no text elements on the line, even if there are replaced elements.
        Filed <rdar://problem/4040358> RenderBR height() is not accurate.

        * khtml/editing/htmlediting.cpp:
        When height is 0, double check that the placeholder is the first position on the line.

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

17 years agoversioning for TOT, Safari 2.0 (403+). The tree is open!
vicki [Mon, 7 Mar 2005 23:35:20 +0000 (23:35 +0000)]
versioning for TOT, Safari 2.0 (403+).  The tree is open!

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

17 years agoversioning for SUPanWheat, Safari 1.3 (v303)
vicki [Mon, 7 Mar 2005 23:23:26 +0000 (23:23 +0000)]
versioning for SUPanWheat, Safari 1.3 (v303)

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

17 years agoSafari-403 stamp
vicki [Mon, 7 Mar 2005 23:17:20 +0000 (23:17 +0000)]
Safari-403 stamp

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

17 years ago Reviewed by Vicki
kocienda [Mon, 7 Mar 2005 22:04:17 +0000 (22:04 +0000)]
    Reviewed by Vicki

        Fix for this bug:

        <rdar://problem/4040136> Expose SPI for WebCore's functions to create document fragments from plain text and markup strings

        * kwq/DOMHTML.mm: Add two new SPI functions.
        (-[DOMHTMLDocument _createDocumentFragmentWithMarkupString:baseURLString:])
        (-[DOMHTMLDocument _createDocumentFragmentWithText:])
        * kwq/DOMPrivate.h: Declare the new SPI here, a privately-exported header, so Mail can make use of it.

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

17 years ago Reviewed by John
kocienda [Mon, 7 Mar 2005 21:18:59 +0000 (21:18 +0000)]
    Reviewed by John

        Fix for this bug:

        <rdar://problem/4039676> REGRESSION (Mail): in reply, <cr> on pasted text (without trailing newline) is eaten when pasted above date

        * khtml/editing/htmlediting.cpp:
        (khtml::ReplaceSelectionCommand::doApply): Code to "eat" a <br> element, that was creating an otherwise empty line, was running
        when it should not. If the content being pasted in does not end in a "logical" newline itself, then the <br> already
        in the content needs to be preserved. A simple one-line change now sees to this.

        * layout-tests/editing/pasteboard/paste-text-010-expected.txt: This test now has an extra, but harmless,
        <br> at the end of a paragraph. This makes sense given the code change.

        New test:
        * layout-tests/editing/pasteboard/paste-text-018-expected.txt: Added.
        * layout-tests/editing/pasteboard/paste-text-018.html: Added.

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

17 years ago Reviewed by John
kocienda [Mon, 7 Mar 2005 16:19:15 +0000 (16:19 +0000)]
    Reviewed by John

        Fix for this bug:

        <rdar://problem/4035648> REGRESSION (Mail): line feed in source HTML file causes bad copy/paste behavior

        The createMarkup() function in markup.cpp iterates over the nodes in a range,
        and does some bookkeeping to figure out when to add close tags to the markup.
        Some code added at the start of the loop to prevent markup from being written
        for unrendered nodes short-circuited the rest of the loop, and so prevented
        the close-tag-writing code from running when it should.

        This is why the "plain" text wound up inside of the bold tag in the example
        above. The addition of the unrendered return character caused an incorrect
        delay in the close tag for the bold element from being written out, with the
        result being that it wound up including additional content.

        The fix is to add checks for node renderers throughout the loop at the points
        where markup is written out for each node. This allows the additional close
        tag logic to run as needed.

        All layout tests pass with this change.

        * khtml/editing/markup.cpp:

        New test:

        * layout-tests/editing/pasteboard/paste-4035648-fix-expected.txt: Added.
        * layout-tests/editing/pasteboard/paste-4035648-fix.html: Added.

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

17 years ago - fixed obvious mistake in IDN script code (luckily it hasn't been in a submi...
darin [Mon, 7 Mar 2005 03:46:44 +0000 (03:46 +0000)]
    - fixed obvious mistake in IDN script code (luckily it hasn't been in a submission yet!)

        * Misc.subproj/WebNSURLExtras.m: (readIDNScriptWhiteListFile): Use "index" to index into the array,
        not "script", which is the script number, not the 32-bit-word index.

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

17 years ago- fixed text box search code for caret rect to properly account for BIDI text (4038674)
kali [Sun, 6 Mar 2005 22:33:02 +0000 (22:33 +0000)]
- fixed text box search code for caret rect to properly account for BIDI text (4038674)

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

17 years ago- fixed problem with searching for BIDI text boxes (3587609)
kali [Sun, 6 Mar 2005 08:03:56 +0000 (08:03 +0000)]
- fixed problem with searching for BIDI text boxes (3587609)
- fixed missing initalizer of RTL flag in WebCoreStyle

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

17 years ago Reviewed by Darin.
kdecker [Sun, 6 Mar 2005 03:36:59 +0000 (03:36 +0000)]
    Reviewed by Darin.

Fixed: <rdar://problem/4038529> Infinite progress bar loading webcams and other sites that use multipart/x-mixed-replace

The previous patch I landed prevented us from loading multipart/x-mixed-replace but did not always update the progress bar accordingly.
        This stops websites from having seemingly infinite progress in the browser UI.

        * WebCoreSupport.subproj/WebSubresourceClient.m:
        (-[WebSubresourceClient didReceiveResponse:]): If this is "multipart/x-mixed-replace", remove the WebBaseResourceHandleDelegate client from
        the datasource's subresource array, otherwise -[WebDataSource isLoading] incorrectly returns YES.   Also it's possible at this point in
         time we're done loading now (loaded everything else except for the multipart/x-mixed-replace content) so go ahead and check to see if
         in fact we're complete.
        * WebView.subproj/WebMainResourceClient.m:
        (-[WebMainResourceClient connection:didReceiveResponse:]): ditto

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

17 years ago Reviewed by Maciej.
sullivan [Sun, 6 Mar 2005 01:37:42 +0000 (01:37 +0000)]
    Reviewed by Maciej.

        - fixed <rdar://problem/4038417> Mail crashed in StyleChange::checkForLegacyHTMLStyleChange
        when composing a reply

        * khtml/editing/htmlediting.cpp:
        Added missing nil check.

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

17 years ago Fixed panther build problem. Shouldn't include
rjw [Sat, 5 Mar 2005 23:35:03 +0000 (23:35 +0000)]
Fixed panther build problem.  Shouldn't include
changes for 3968753 on panther.

        Reviewed by John.

        * WebView.subproj/WebView.m:
        (-[WebView _commonInitializationWithFrameName:groupName:]):

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

17 years ago Reviewed by Don.
darin [Sat, 5 Mar 2005 23:20:51 +0000 (23:20 +0000)]
    Reviewed by Don.

        - fixed <rdar://problem/4038478> Crash in renderer viewing RSS feed at feed://wvs.topleftpixel.com/index.rdf

        * khtml/xml/dom_docimpl.cpp: (widgetForNode): Check for nil before going from node to renderer.

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

17 years ago Reviewed by Richard.
darin [Sat, 5 Mar 2005 23:08:46 +0000 (23:08 +0000)]
    Reviewed by Richard.

        - fixed <rdar://problem/4037700> Every character typed causes stat call for /usr/share/icu/icudt32b_char.brk

        * khtml/rendering/render_text.cpp:
        (getCharacterBreakIterator): Added. Helper that sets up an iterator for the passed-in text.
        Shares a single global iterator (fast, albeit not thread-safe).
        (RenderText::previousOffset): Changed to call getCharacterBreakIterator.
        (RenderText::nextOffset): Ditto.

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

17 years ago Reviewed by Darin
kocienda [Sat, 5 Mar 2005 22:40:17 +0000 (22:40 +0000)]
    Reviewed by Darin

        Fix for this bug:

        <rdar://problem/4038267> REGRESSION (Mail): Crash copying and pasting end of paragraph

        Code to handle content that has a "logical" newline at the end of the pasted content, and the code
        to adjust the selection at the end of the paste operation made an assumption that at least one
        node had been inserted by the paste command. This is not necessarily true in the case where the sole content
        in the pasted content is one of these "logical" newlines. Adjust some code around so that we don't deref
        null, but still adjust the selection correctly for this case. In each of the two functions below, some
        null checks have been added, and some code has been rearranged a little bit to continue on through
        the end of completeHTMLReplacement, even if no nodes have been inserted. The patch looks bigger and more
        complicated than the conceptual change.

        * khtml/editing/htmlediting.cpp:

        * layout-tests/editing/pasteboard/paste-4038267-fix-expected.txt: Added.
        * layout-tests/editing/pasteboard/paste-4038267-fix.html: Added.

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

17 years ago Reviewed by John.
darin [Sat, 5 Mar 2005 19:20:29 +0000 (19:20 +0000)]
    Reviewed by John.

        - fixed <rdar://problem/4025918> images copied from Safari with relative src URLs aren't pasted into Mail messages (KURL resolves base URLs incorrectly)

        * kwq/KWQKURL.mm: (KURL::KURL): Add a slash at the start of the path if a relative part is adding
        a path onto a URL that has "pre-path" bits like host name, but no path yet. This doesn't come up
        for http because in that case we add a trailing "/" as part of canonicalization.

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

17 years ago Reviewed by John.
darin [Sat, 5 Mar 2005 19:17:45 +0000 (19:17 +0000)]
    Reviewed by John.

        - fixed <rdar://problem/4034603> REGRESSION (185-188): RadarWeb can't send enclosures anymore

        * WebView.subproj/WebFormDataStream.m:
        (closeCurrentStream): Release currentData when closing the stream.
        (advanceCurrentStream): Set up and retain currentData when the current stream is reading that data, so the
        data won't be released while in use.
        (formCreate): Initialize currentData to NULL.

        - fixed <rdar://problem/4037562> Tiger8A402: Help Viewer crashed when viewing help for iChat (infinite recursion in WebView)

        * WebView.subproj/WebView.m: (-[WebView _responderValidateUserInterfaceItem:]):
        Check for the case where we ourselves are the responder. This avoids an infinite loop.
        The actual code to perform operations avoids this with a global variable, but this lighter weight
        solution is sufficient here because validate operations don't call through to the next responder.

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

17 years agoRolled out a couple of assertion-related changes I accidentally checked in.
sullivan [Sat, 5 Mar 2005 15:39:05 +0000 (15:39 +0000)]
Rolled out a couple of assertion-related changes I accidentally checked in.

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

17 years ago- forgot to check this in for the previous fix
kali [Sat, 5 Mar 2005 03:15:55 +0000 (03:15 +0000)]
- forgot to check this in for the previous fix

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