17 years ago Fixed: <rdar://problem/3766915> PDF content needs search to work
cblu [Sun, 19 Dec 2004 19:09:10 +0000 (19:09 +0000)]
Fixed: <rdar://problem/3766915> PDF content needs search to work

        Reviewed by kevin, john.

        * WebView.subproj/WebPDFView.m:
(-[WebPDFView searchFor:direction:caseSensitive:wrap:]): implemented
        (-[WebPDFView takeFindStringFromSelection:]): new
        (-[WebPDFView jumpToSelection:]): new
        (-[WebPDFView validateUserInterfaceItem:]): new

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

17 years agoUse 40K, not 40MB as min max cacheable object size.
rjw [Sat, 18 Dec 2004 03:30:08 +0000 (03:30 +0000)]
Use 40K, not 40MB as min max cacheable object size.

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

17 years ago Fix for 3923255, specified percentage heights of divs with overflow auto inside...
hyatt [Sat, 18 Dec 2004 01:31:42 +0000 (01:31 +0000)]
Fix for 3923255, specified percentage heights of divs with overflow auto inside tables not honored.

        Reviewed by kocienda

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

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

17 years ago Reviewed by Kevin.
mjs [Sat, 18 Dec 2004 00:43:37 +0000 (00:43 +0000)]
    Reviewed by Kevin.

<rdar://problem/3926869> Opening caches window after running PLT causes crash

        * kjs/protected_values.cpp:
        (KJS::ProtectedValues::getProtectCount): Don't include simple numbers in
the protected value table.
        (KJS::ProtectedValues::increaseProtectCount): Ditto.
        (KJS::ProtectedValues::decreaseProtectCount): Ditto.

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

17 years ago Reviewed by Ken Kocienda.
harrison [Sat, 18 Dec 2004 00:38:27 +0000 (00:38 +0000)]
    Reviewed by Ken Kocienda.

        <rdar://problem/3924930> REGRESSION: triple click does not select to end of line

        * khtml/editing/visible_units.cpp:
        When includeLineBreak is true, allow traversal to next node after enclosingBlockFlowElement.

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

17 years agoFix Panther build bustage.
hyatt [Sat, 18 Dec 2004 00:16:03 +0000 (00:16 +0000)]
Fix Panther build bustage.

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

17 years ago Reviewed by Vicki
kocienda [Fri, 17 Dec 2004 23:32:31 +0000 (23:32 +0000)]
    Reviewed by Vicki

        * khtml/editing/htmlediting.cpp:
        (khtml::InsertParagraphSeparatorInQuotedContentCommand::doApply): Missed deleting some now-obsolete expcetion
        codes when I added the createBreakElement() function.

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

17 years ago Make image decoding as lazy as possible for non-threaded case; in some cases
rjw [Fri, 17 Dec 2004 23:01:02 +0000 (23:01 +0000)]
Make image decoding as lazy as possible for non-threaded case; in some cases
can avoid unnecessary decoding work.

        Reviewed by Chris.

        * WebCoreSupport.subproj/WebImageData.h:
        * WebCoreSupport.subproj/WebImageData.m:
        (-[WebImageData imageAtIndex:]):
        (-[WebImageData propertiesAtIndex:]):
        (-[WebImageData incrementalLoadWithBytes:length:complete:callback:]):

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

17 years ago Set the floor of max cacheable object size to 40K. This restores
rjw [Fri, 17 Dec 2004 22:56:34 +0000 (22:56 +0000)]
Set the floor of max cacheable object size to 40K.  This restores
the long standing floor.  Lower floor deleteriously impacts the PLT.
        Reviewed by Hyatt.

        * khtml/khtml_part.cpp:
        * khtml/misc/loader.cpp:

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

17 years ago Reviewed by Hyatt
kocienda [Fri, 17 Dec 2004 22:21:44 +0000 (22:21 +0000)]
    Reviewed by Hyatt

        Fix for this bug:

        <rdar://problem/3926142> REGRESSION (Mail): Deleting text decreases quote level

        * khtml/editing/htmlediting.cpp:
        (khtml::DeleteSelectionCommand::moveNodesAfterNode): Stop merging nodes when a <br> is hit.
        Formerly checked only for block boundary.

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

17 years ago Reviewed by Darin.
harrison [Fri, 17 Dec 2004 21:58:19 +0000 (21:58 +0000)]
    Reviewed by Darin.

Add KWQCFAutorelease for autoreleasing CF objects.
        * kwq/KWQFoundationExtras.h:

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

17 years ago Reviewed by Darin.
harrison [Fri, 17 Dec 2004 21:56:03 +0000 (21:56 +0000)]
    Reviewed by Darin.

Fix GC compatibility in getNSString.

        * kwq/KWQString.mm:
Use NSString allocator instead of CFString, so that autorelease works under GC.

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

17 years ago Reviewed by Hyatt
kocienda [Fri, 17 Dec 2004 19:58:01 +0000 (19:58 +0000)]
    Reviewed by Hyatt

        Fix for this bug:

        <rdar://problem/3890973> REGRESSION (Mail): Deleting reorders remaining text

        * khtml/editing/htmlediting.cpp:
        (khtml::DeleteSelectionCommand::moveNodesAfterNode): Added check to ensure that moving content will not
        move it after the <body> element.

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

17 years ago Reviewed by me
kocienda [Fri, 17 Dec 2004 18:57:58 +0000 (18:57 +0000)]
    Reviewed by me

        Added new layout tests covering cases from recent bug fixes.

        * layout-tests/editing/inserting/insert-div-018-expected.txt: Added.
        * layout-tests/editing/inserting/insert-div-018.html: Added.
        * layout-tests/editing/inserting/insert-div-019-expected.txt: Added.
        * layout-tests/editing/inserting/insert-div-019.html: Added.
        * layout-tests/editing/inserting/insert-div-020-expected.txt: Added.
        * layout-tests/editing/inserting/insert-div-020.html: Added.
        * layout-tests/editing/inserting/insert-div-021-expected.txt: Added.
        * layout-tests/editing/inserting/insert-div-021.html: Added.

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

17 years ago Reviewed by me
kocienda [Fri, 17 Dec 2004 18:31:49 +0000 (18:31 +0000)]
    Reviewed by me

        Changes in layout resulting from giving <p> elements no margin rather than 0.1em margin.

        * layout-tests/editing/inserting/insert-div-013-expected.txt
        * layout-tests/editing/inserting/insert-div-014-expected.txt

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

17 years ago Reviewed by John
kocienda [Fri, 17 Dec 2004 18:01:32 +0000 (18:01 +0000)]
    Reviewed by John

        Fix for this bug:

        <rdar://problem/3925317> Increase quote in email and with cursor below the quote the new line appears above the quote

        * khtml/editing/htmlediting.cpp:
        * khtml/editing/visible_position.cpp: Refine rules for whether to use the starting node or the starting
        block as the reference node for the insertion of the new block.
        (khtml::isLastVisiblePositionInBlock): Tweak rules again. Descendants of following blocks should answer true.
        I worked this all out on the whiteboard this time. This should be the last tweak.

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

17 years ago Reviewed by Ken.
kdecker [Fri, 17 Dec 2004 16:29:28 +0000 (16:29 +0000)]
    Reviewed by Ken.

Fixed <rdar://problem/3824438> Need a clean way for Dashboard to detect when an XML parsing error occurs

        * khtml/xml/xml_tokenizer.cpp:
        (khtml::XMLTokenizer::insertErrorMessageBlock): In the xml error report, instead of a generic <div>, use <parsererror> to match Mozilla.

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

17 years ago Reviewed by Chris
kocienda [Fri, 17 Dec 2004 01:05:23 +0000 (01:05 +0000)]
    Reviewed by Chris

        Fix for this bug:

        <rdar://problem/3924888> REGRESSION (Mail): Hitting return key at end of line does not insert visible newline

        * khtml/editing/htmlediting.cpp:
        (khtml::InsertParagraphSeparatorCommand::doApply): Tweaked code I added just before to fix 3924486, so that
        it checks the downstream node for the starting position.

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

17 years ago Reviewed by Chris
kocienda [Fri, 17 Dec 2004 00:57:30 +0000 (00:57 +0000)]
    Reviewed by Chris

        Added new createBreakElement() function that makes creating a <br> element a one-liner.
        Converted all the code that used to call the DocumentImpl, and dealt with the exceptionCode,
        over to this new helper.

        * khtml/editing/htmlediting.cpp:
        (khtml::DeleteSelectionCommand::moveNodesAfterNode): Now uses new helper function.
        (khtml::InsertLineBreakCommand::doApply): Ditto.
        (khtml::InsertParagraphSeparatorCommand::doApply): Ditto.
        (khtml::InsertParagraphSeparatorInQuotedContentCommand::doApply): Ditto.
        (khtml::ReplaceSelectionCommand::doApply): Ditto.
        (khtml::createBreakElement): New helper.
        * khtml/editing/htmlediting.h: Ditto.

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

17 years ago Reviewed by Maciej.
darin [Fri, 17 Dec 2004 00:10:25 +0000 (00:10 +0000)]
    Reviewed by Maciej.

        - fixed <rdar://problem/3920764> Unimplemented String methods toLocaleLowerCase and toLocaleUpperCase

        * kjs/string_object.h: Added toLocaleLowerCase and toLocaleUpperCase.
        * kjs/string_object.cpp: (StringProtoFuncImp::call): Made locale versions be synonmyms for the
        non-locale-specific versions.
        * kjs/string_object.lut.h: Regenerated.

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

17 years ago Fix a bug where vertical-align values that depended on their parent's value went...
hyatt [Fri, 17 Dec 2004 00:03:44 +0000 (00:03 +0000)]
Fix a bug where vertical-align values that depended on their parent's value went crazy if the parent was
vertical-align top or bottom.  The bug is 3771007, bankofamerica's ebills page.

        Reviewed by kocienda

        * khtml/rendering/render_object.cpp:

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

17 years ago Reviewed by John
kocienda [Thu, 16 Dec 2004 23:39:50 +0000 (23:39 +0000)]
    Reviewed by John

        Fix for these bugs:

        <rdar://problem/3924486> REGRESSION (Mail): Hitting return key does not insert visible newline
        <rdar://problem/3924579> REGRESSION (Mail): After deleting, hitting return key does not insert visible newline

        * khtml/editing/htmlediting.cpp:
        (khtml::InsertParagraphSeparatorCommand::doApply): For the first bug, detect when inserting a <p> will
        make a visible <br> collapse. For the second bug, move the code that inserts the new <p> after
        a check which may move the node used as the reference node for the insertion. Also change this code to
        insert the <p> after the last sibling of the starting position, to move it past the nodes we're going
        to want to shift into the new <p>.

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

17 years ago Reviewed by Chris.
sullivan [Thu, 16 Dec 2004 22:44:15 +0000 (22:44 +0000)]
    Reviewed by Chris.

        One of the assertions from my previous checkin fired, so
        I made this code more robust.

        * WebCoreSupport.subproj/WebBridge.m:
        (-[WebBridge _preferences]):
        new helper method, returns global preferences if webView is nil,
        otherwise returns webView's preferences
        (-[WebBridge getObjectCacheSize]):
        use new helper method, remove now-unnecessary assert
        (-[WebBridge _retrieveKeyboardUIModeFromPreferences:]):

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

17 years ago Reviewed by Ken.
darin [Thu, 16 Dec 2004 22:10:56 +0000 (22:10 +0000)]
    Reviewed by Ken.

        - use <p> elements rather than <br> when pasting plain text; also use margin of 0 rather than 0.1 em
          after talking this over with Dave and Ken

        * khtml/editing/htmlediting.h: Added createDefaultParagraphElement and createBlockPlaceholderElement.
        * khtml/editing/htmlediting.cpp:
        (khtml::CompositeEditCommand::insertBlockPlaceholderIfNeeded): Use new createBlockPlaceholderElement
        helper so this can share code with the plain-text conversion code.
        (khtml::InsertParagraphSeparatorCommand::createParagraphElement): Use new createDefaultParagraphElement
        helper so this can share code with the plain-text conversion code.
        (khtml::createDefaultParagraphElement): Added.
        (khtml::createBlockPlaceholderElement): Added.

        * khtml/editing/markup.cpp: (khtml::createFragmentFromText): Use paragraphs rather than
        <br> elements for pasting plain text.

        - regenerated these files with the newer gperf

        * khtml/css/cssproperties.c: Regenerated.
        * khtml/css/cssvalues.c: Regenerated.
        * khtml/misc/htmlattrs.c: Regenerated.
        * khtml/misc/htmltags.c: Regenerated.

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

17 years ago Reviewed by Darin.
sullivan [Thu, 16 Dec 2004 21:33:09 +0000 (21:33 +0000)]
    Reviewed by Darin.

        - fixed <rdar://problem/3913523> Mail needs SPI for adding tooltips to links
        - cleaned up some calls to +[WebPreferences standardPreferences] that should
          have been using -[WebView preferences]

        This adds a (currently SPI-only) new feature that shows the URL of the link
        under the mouse in a toolTip. I tested this in Safari, but we're adding this
        feature for Mail, and Safari won't use it (unless of course you know the
        magic defaults command)

        * Plugins.subproj/WebBaseNetscapePluginView.m:
        (-[WebBaseNetscapePluginView start]):
        use -[WebView preferences] instead of +[WebPreferences standardPreferences]

        * WebCoreSupport.subproj/WebBridge.m:
        (-[WebBridge getObjectCacheSize]):
        (-[WebBridge _retrieveKeyboardUIModeFromPreferences:]):

        * WebView.subproj/WebBaseResourceHandleDelegate.m:
        (-[WebBaseResourceHandleDelegate willCacheResponse:]):

        * WebView.subproj/WebFrame.m:
        (-[WebFrame _transitionToCommitted:]):
        (-[WebFrame _loadItem:withLoadType:]):

        * WebView.subproj/WebHTMLViewInternal.h:
        private struct now keeps ivar for cached value of showsURLsInToolTips
        so it doesn't have look it up in preferences a zillion times

        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView _updateMouseoverWithEvent:]):
        if private->showsURLsInToolTips is true, set the toolTip from the URL.
        Fall back to showing the title attribute in case some element has a title
        attribute but no URL.
        (-[WebHTMLView _mayStartDragAtEventLocation:]):
        use -[WebView preferences] instead of +[WebPreferences standardPreferences]
        (-[WebHTMLView _resetCachedWebPreferences:]):
        get a fresh value for private->showsURLsInToolTips
        (-[WebHTMLView initWithFrame:]):
        call _resetCachedWebPreferences the first time, and listen for WebPreferencesChanged notifications
        (-[WebHTMLView _handleStyleKeyEquivalent:]):
        use -[WebView preferences] instead of +[WebPreferences standardPreferences]

        * WebView.subproj/WebPreferenceKeysPrivate.h:
        added WebKitShowsURLsInToolTipsPreferenceKey

        * WebView.subproj/WebPreferences.m:
        (+[WebPreferences initialize]):
        initialize WebKitShowsURLsInToolTipsPreferenceKey to 0
        (-[WebPreferences showsURLsInToolTips]):
        return WebKitShowsURLsInToolTipsPreferenceKey value
        (-[WebPreferences setShowsURLsInToolTips:]):
        set WebKitShowsURLsInToolTipsPreferenceKey value

        * WebView.subproj/WebPreferencesPrivate.h:
        add declarations for showsURLsInToolTips and setter

        * WebView.subproj/WebTextView.m:
        (-[WebTextView _preferences]):
        new helper method that gets preferences from webView if there is a webView,
        otherwise gets global preferences
        (-[WebTextView setFixedWidthFont]):
        use new helper method rather than always using global preferences
        (-[WebTextView initWithFrame:]):
        observe WebPreferencesChangedNotification instead of unnecessarily general

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

17 years ago Reviewed by Hyatt
kocienda [Thu, 16 Dec 2004 21:15:57 +0000 (21:15 +0000)]
    Reviewed by Hyatt

        Fix for this bug:

        <rdar://problem/3924291> REGRESSION (Mail): Crash deleting content following a <p> element

        * khtml/xml/dom_nodeimpl.cpp:
        (NodeImpl::enclosingInlineElement): Fixed problem in this function where recursive search for
        parent that is not an inline would skip past previous siblings of nodes which were blocks. Now
        it stops looking in this situation. This problem eventually caused the delete code to try to
        merge a node under a descendent.

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

17 years ago Change by Richard, reviewed by me.
adele [Thu, 16 Dec 2004 19:21:57 +0000 (19:21 +0000)]
    Change by Richard, reviewed by me.

Fix for: <rdar://problem/3923983> background image decoding prevents page with 0Kb image from finishing to load

        * khtml/misc/loader.cpp: (CachedImage::data): Added call to notifyFinished so the 0Kb image case finishes loading.

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

17 years ago Reviewed by Chris.
adele [Thu, 16 Dec 2004 18:53:39 +0000 (18:53 +0000)]
    Reviewed by Chris.

        Fix for: <rdar://problem/3534824> VIP: some navigation links on safeway.com don't work due to a JavaScript quirk

        Added a call to ObjectImp::get before Window::get just returns Undefined.
        This was preventing us from getting the toString function from a Window object.

        * khtml/ecma/kjs_window.cpp: (Window::get):

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

17 years ago Reviewed by John
kocienda [Thu, 16 Dec 2004 18:46:13 +0000 (18:46 +0000)]
    Reviewed by John

        Fix for this bug:

        <rdar://problem/3918351> REGRESSION (Mail, 173-175+): Return before first char of line leaves insertion point in wrong place

        * khtml/editing/htmlediting.cpp:
        (khtml::InsertParagraphSeparatorCommand::doApply): Basically, did a rewrite of this function
        to do a better job than it was doing before. Added several test cases to prove I am on a
        better track.
        * khtml/editing/visible_position.cpp:
        (khtml::isFirstVisiblePositionInBlock): Tweaked the rules a bit to fix an issue very similar to the
        leaving-the-bar-node case problem I just fixed in a recent checkin (relevant markup: <p>foo</p>bar).
        This function was returning true for the first position in "bar". Wrong. Also tightened up other
        rule: Should not report true when relationship between blocks cannot be determined.
        (khtml::isLastVisiblePositionInBlock): Tightened up rule as above: Should not report true
        when relationship between blocks cannot be determined.
        * layout-tests/editing/inserting/insert-div-010-expected.txt: Added.
        * layout-tests/editing/inserting/insert-div-010.html: Added.
        * layout-tests/editing/inserting/insert-div-011-expected.txt: Added.
        * layout-tests/editing/inserting/insert-div-011.html: Added.
        * layout-tests/editing/inserting/insert-div-012-expected.txt: Added.
        * layout-tests/editing/inserting/insert-div-012.html: Added.
        * layout-tests/editing/inserting/insert-div-013-expected.txt: Added.
        * layout-tests/editing/inserting/insert-div-013.html: Added.
        * layout-tests/editing/inserting/insert-div-014-expected.txt: Added.
        * layout-tests/editing/inserting/insert-div-014.html: Added.
        * layout-tests/editing/inserting/insert-div-015-expected.txt: Added.
        * layout-tests/editing/inserting/insert-div-015.html: Added.
        * layout-tests/editing/inserting/insert-div-016-expected.txt: Added.
        * layout-tests/editing/inserting/insert-div-016.html: Added.
        * layout-tests/editing/inserting/insert-div-017-expected.txt: Added.
        * layout-tests/editing/inserting/insert-div-017.html: Added.

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

17 years agoFailed to check in this file after changing it; I hate having too many changes in...
kocienda [Thu, 16 Dec 2004 18:18:06 +0000 (18:18 +0000)]
Failed to check in this file after changing it; I hate having too many changes in my tree at once

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

17 years ago Reviewed by me
kocienda [Thu, 16 Dec 2004 18:04:58 +0000 (18:04 +0000)]
    Reviewed by me

        Added a layout test based on my last checkin.

        * layout-tests/editing/selection/move-by-word-001-expected.txt: Added.
        * layout-tests/editing/selection/move-by-word-001.html: Added.

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

17 years ago Reviewed by John
kocienda [Thu, 16 Dec 2004 17:57:54 +0000 (17:57 +0000)]
    Reviewed by John

        Fix for this bug:

        <rdar://problem/3917929> REGRESSION (Mail): Command-left-arrow leaves insertion point too high after specific steps

        * khtml/editing/visible_text.cpp:
        (khtml::SimplifiedBackwardsTextIterator::advance): Add new check for leaving a text node and iterating
        backwards into a different block that is an descendent of the block containing the text node (as in leaving
        the "bar" node in this example: <p>foo</p>bar).
        (khtml::SimplifiedBackwardsTextIterator::handleNonTextNode): Call new emitNewlineForBROrText helper.
        (khtml::SimplifiedBackwardsTextIterator::emitNewlineForBROrText): Factor out code from handleNonTextNode, since
        it is called from there, and now also from advance().

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

17 years ago Reviewed by Ken.
darin [Thu, 16 Dec 2004 01:02:30 +0000 (01:02 +0000)]
    Reviewed by Ken.

        - fixed problem where plain-text would put a blank line between each <p> even when they have no margins

        * khtml/editing/visible_text.cpp: (khtml::TextIterator::exitNode): Add more checks and only set the
        "add one more newline" flag if the margin is sufficient. A more complete fix would ignore the node
        type altogether and use the render tree instead.

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

17 years agoWebCore:
sullivan [Wed, 15 Dec 2004 19:13:48 +0000 (19:13 +0000)]

        Reviewed by Ken.

        - rest of WebCore fix for <rdar://problem/3790011> undoable operations all say "Undo"
        in the menu, no specific action names

        * khtml/editing/edit_actions.h: new header, contains EditAction enum
        (renamed from HTMLEditAction, formerly in htmlediting.h)

        * ForwardingHeaders/editing/edit_actions.h: new forwarding header

        * khtml/editing/htmlediting.h:
        removed HTMLEditAction enum in favor of including edit_actions.h; added khtml::
        namespace to EditAction usages; added m_editingAction ivar to ApplyStyleCommand

        * khtml/editing/htmlediting.cpp:
        update for enum name change
        added editingAction parameter to this constructor
        return new ivar
        update for enum name change

        * khtml/khtml_part.h:
        added EditAction parameter to applyStyle and computeAndSetTypingStyle
        * khtml/khtml_part.cpp:
        added EditAction parameter

        * kwq/KWQKHTMLPart.mm:
        do the cast from EditAction to WebUndoAction a different way to match other code

        * kwq/WebCoreBridge.h:
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge setTypingStyle:withUndoAction:]):
        added WebUndoAction parameter, passed into ApplyStyleCommand constructor
        (-[WebCoreBridge applyStyle:withUndoAction:]):

        * WebCore.pbproj/project.pbxproj:
        updated for new files


        Reviewed by Ken.

        - rest of WebKit fix for <rdar://problem/3790011> undoable operations all say "Undo"
        in the menu, no specific action names

        I only know of one loose end currently, which I wrote up as <rdar://problem/3920971> Edit menu
        says "Undo Change Attributes" when it should say "Undo Set Color", from font panel

        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView concludeDragForDraggingInfo:actionMask:]):
        use WebUndoActionSetColor when dragging color swatch
        (-[WebHTMLView _applyStyleToSelection:withUndoAction:]):
        new WebUndoAction parameter, passed across bridge
        (-[WebHTMLView _toggleBold]):
        use WebUndoActionSetFont
        (-[WebHTMLView _toggleItalic]):
        use WebUndoActionSetFont
        (-[WebHTMLView pasteFont:]):
        use WebUndoActionPasteFont
        (-[WebHTMLView changeFont:]):
        use WebUndoActionSetFont
        (-[WebHTMLView changeAttributes:]):
        use WebUndoActionChangeAttributes
        (-[WebHTMLView _undoActionFromColorPanelWithSelector:]):
        new method, returns WebUndoActionSetBackgroundColor or WebUndoActionSetColor
        (-[WebHTMLView _changeCSSColorUsingSelector:inRange:]):
        now calls _undoActionFromColorPanelWithSelector
        (-[WebHTMLView changeColor:]):
        use WebUndoActionSetColor
        (-[WebHTMLView _alignSelectionUsingCSSValue:withUndoAction:]):
        new WebUndoAction parameter, passed through
        (-[WebHTMLView alignCenter:]):
        use WebUndoActionCenter
        (-[WebHTMLView alignJustified:]):
        use WebUndoActionJustify
        (-[WebHTMLView alignLeft:]):
        use WebUndoActionAlignLeft
        (-[WebHTMLView alignRight:]):
        use WebUndoActionAlignRight
        (-[WebHTMLView subscript:]):
        use WebUndoActionAlignSubscript
        (-[WebHTMLView superscript:]):
        use WebUndoActionAlignSuperscript
        (-[WebHTMLView unscript:]):
        use WebUndoActionAlignUnscript
        (-[WebHTMLView underline:]):
        use WebUndoActionAlignUnderline

        * WebView.subproj/WebView.m:
        (-[WebView setTypingStyle:]):
        pass WebUndoActionUnspecified through as new parameter since we don't have any more specific info
        (-[WebView applyStyle:]):

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

17 years agoAdd layout test for large rowspans.
hyatt [Wed, 15 Dec 2004 02:42:25 +0000 (02:42 +0000)]
Add layout test for large rowspans.

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

17 years ago Fix for 3562458, rowspan and colspan converted to ints so that large values will...
hyatt [Wed, 15 Dec 2004 02:41:38 +0000 (02:41 +0000)]
Fix for 3562458, rowspan and colspan converted to ints so that large values will work for them.  Remove
the ridiculous 1024 limit on the span values.

        * khtml/html/html_tableimpl.cpp:
        * khtml/rendering/render_table.cpp:
        * khtml/rendering/render_table.h:

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

17 years ago Make sure <col> and <colgroup> can have spans updated dynamically as well.
hyatt [Wed, 15 Dec 2004 02:27:27 +0000 (02:27 +0000)]
Make sure <col> and <colgroup> can have spans updated dynamically as well.

        Reviewed by rjw

        * khtml/html/html_tableimpl.cpp:
        * khtml/rendering/render_table.cpp:

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

17 years agoFix crasher caused by lack of null style check.
hyatt [Wed, 15 Dec 2004 02:20:51 +0000 (02:20 +0000)]
Fix crasher caused by lack of null style check.

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

17 years ago Fix for 3833123, setting a cell's colspan does not update rendering like it should.
hyatt [Wed, 15 Dec 2004 02:09:19 +0000 (02:09 +0000)]
Fix for 3833123, setting a cell's colspan does not update rendering like it should.

        Reviewed by rjw

        * khtml/html/html_tableimpl.cpp:
        * khtml/rendering/render_table.cpp:

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

17 years agoWebKit:
rjw [Wed, 15 Dec 2004 02:00:34 +0000 (02:00 +0000)]
Helper method to get URL of plugin view.

        Reviewed by Chris.

        * Misc.subproj/WebNSViewExtras.m:
        (-[NSView _webViewURL]):

Pass URL of plugin view when call into JNI.

        Reviewed by Chris.

        * bindings/jni/jni_objc.mm:

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

17 years ago Fixed: <rdar://problem/3864536> crash copying text from other apps and pasting in...
cblu [Wed, 15 Dec 2004 01:53:43 +0000 (01:53 +0000)]
Fixed: <rdar://problem/3864536> crash copying text from other apps and pasting in a sticky in dashboard

        Reviewed by hyatt.

        * khtml/editing/markup.cpp:
        (khtml::createFragmentFromText): ref and deref the fragment since calling appendChild can completely deref it

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

17 years ago Fix for 3785211. Make sure to do a layout with the old position before doing a layou...
hyatt [Wed, 15 Dec 2004 01:13:40 +0000 (01:13 +0000)]
Fix for 3785211. Make sure to do a layout with the old position before doing a layout after changing to the new position.
This is actually a regression from my positioned object DHTML optimization.

        Reviewed by kocienda

        * khtml/rendering/render_object.cpp:

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

17 years ago Make sure the class attribute works when newlines are present in the attribute.
hyatt [Wed, 15 Dec 2004 00:36:32 +0000 (00:36 +0000)]
Make sure the class attribute works when newlines are present in the attribute.

        Reviewed by kocienda

        * khtml/html/html_elementimpl.cpp:

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

17 years ago Reviewed by rjw.
vicki [Tue, 14 Dec 2004 22:34:54 +0000 (22:34 +0000)]
    Reviewed by rjw.

<rdar://problem/3855573> Remove reference to "WebScriptMethods" from WebScriptObject.h comments

        * Plugins.subproj/WebPlugin.h: changed instances of "WebScriptMethods" to "WebScripting" in this
file as well, as requested in the bug report

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

17 years ago Reviewed by John.
mjs [Tue, 14 Dec 2004 21:23:07 +0000 (21:23 +0000)]
    Reviewed by John.

<rdar://problem/3912488> Mail throws an exception after backspacing "away" inline input

* WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView setMarkedText:selectedRange:]): Don't try to set a selection if
we end up with no marked text, since that case fails and is unnecessary.

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

17 years ago Reviewed by Ken.
sullivan [Tue, 14 Dec 2004 19:52:06 +0000 (19:52 +0000)]
    Reviewed by Ken.

        - added Undo action names for Cut, Paste, and Drag

        * khtml/editing/htmlediting.h:
        * khtml/editing/htmlediting.cpp:
        overridden to return HTMLEditActionCut
        overridden to return HTMLEditActionDrag
        overridden to return HTMLEditActionPaste

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

17 years agoWebCore:
sullivan [Tue, 14 Dec 2004 19:17:31 +0000 (19:17 +0000)]

        Reviewed by Ken.

        - architecture for WebCore part of fix for <rdar://problem/3790011> undoable operations all say "Undo" in the menu,
        no specific action names

        The remaining step is to make each EditCommand subclass override editingAction() to return an
        appropriate value. (Unfortunately the mapping between subclass and user-distinguishable action
        is not completely straightforward, so this next step isn't trivial.)

        * khtml/editing/htmlediting.h:
        new enum for HTMLEditAction

        * khtml/editing/htmlediting.cpp:
        new method, calls through to EditCommand
        new method for subclasses to override, returns HTMLEditActionUnspecified at this level
        proof of concept override, returns HTMLEditActionTyping

        * kwq/KWQKHTMLPart.h:
        declare new private bottleneck method registerCommandForUndoOrRedo
        * kwq/KWQKHTMLPart.mm:
        new bottleneck method to reduce code duplication; now calls over the bridge
        to get the localized string to use for the Undo action name
        now calls new bottleneck method
        now calls new bottleneck method

        * kwq/WebCoreBridge.h:
        new enum for WebUndoAction, maps directly to HTMLEditAction.
        Declaration of nameForUndoAction:


        Reviewed by Ken.

        - WebKit part of fix for <rdar://problem/3790011> undoable operations all say "Undo" in the menu,
        no specific action names

        * WebCoreSupport.subproj/WebBridge.m:
        (-[WebBridge nameForUndoAction:]):
        renamed from setUndoActionNamePlaceholder, replaced arbitrary integers with enum values, and
        handled new "unspecified" case as a fallback

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

17 years ago Reviewed by John.
darin [Tue, 14 Dec 2004 17:26:28 +0000 (17:26 +0000)]
    Reviewed by John.

        - added a bunch of missing nil checks; our old version of inherits used to work for nil (by accident)

        * khtml/rendering/render_frames.cpp:
        (RenderPart::~RenderPart): Check widget for nil.
        (RenderPart::setWidget): Ditto.
        (RenderFrame::slotViewCleared): Ditto.
        (RenderPartObject::slotViewCleared): Ditto.

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

17 years ago Fixed <rdar://problem/3827799> repro. crash with IBM Rational ClearCase Web under...
rjw [Tue, 14 Dec 2004 02:44:45 +0000 (02:44 +0000)]
Fixed <rdar://problem/3827799> repro. crash with IBM Rational ClearCase Web under Safari (Java/LiveConnect-related)

Add support for calling static Java methods from JavaScript.

        Reviewed by Maciej.

        * bindings/jni/jni_instance.cpp:
        * bindings/jni/jni_runtime.cpp:
        * bindings/jni/jni_runtime.h:
        * bindings/jni/jni_utility.cpp:
        * bindings/jni/jni_utility.h:

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

17 years agoWebKit:
rjw [Tue, 14 Dec 2004 00:29:51 +0000 (00:29 +0000)]
Fixed <rdar://problem/3887767> LiveConnect doesn't propagate Java exceptions back to JavaScript (prevents security suite from running)

        Reviewed by John.

        * Plugins.subproj/WebJavaPlugIn.h:

Fixed <rdar://problem/3887767> LiveConnect doesn't propagate Java exceptions back to JavaScript (prevents security suite from running)

        Reviewed by John.

        * bindings/jni/jni_instance.cpp:
        * bindings/jni/jni_objc.mm:
        * bindings/jni/jni_runtime.h:
        * bindings/jni/jni_utility.h:

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

17 years ago Reviewed by Maciej.
sullivan [Tue, 14 Dec 2004 00:15:02 +0000 (00:15 +0000)]
    Reviewed by Maciej.

        - fixed <rdar://problem/3744583> Safari can not quit when a webpage has a login sheet
        that can't be cancelled.

        The proper fix for this would be to change the class of the NSPanel in the nib file.
        But since this would require a localization change, I did a run-time hack instead.
        I'll file a bug about fixing this when we're out of localization freeze.

        * Panels.subproj/WebAuthenticationPanel.m:
        (-[WebAuthenticationPanel replacePanelWithSubclassHack]):
        new method, creates a new panel that is identical to the original one except that
        it's our subclass, and moves all the subviews of the original panel into the new one.
        (-[WebAuthenticationPanel loadNib]):
        call replacePanelWithSubclassHack
        (-[NonBlockingPanel _blocksActionWhenModal:]):
        only method of new NSPanel subclass; overrides this SPI to allow the user to quit
        when one of these panels/sheets is on-screen

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

17 years ago Reviewed by Ken.
darin [Tue, 14 Dec 2004 00:10:19 +0000 (00:10 +0000)]
    Reviewed by Ken.

        - moved markup-related functions into new sources files in the editing directory
        - removed all of the uses of dynamic_cast, preparing to turn off RTTI to make our code smaller and slightly faster

        * ForwardingHeaders/editing/markup.h: Added.
        * khtml/editing/markup.h: Added.
        * khtml/editing/markup.cpp: Added.

        * WebCore.pbproj/project.pbxproj: Added markup.h/cpp.

        * khtml/dom/dom_node.cpp: (Node::toHTML): Call createMarkup since there's no toHTML in NodeImpl any more.
        * khtml/html/html_elementimpl.cpp:
        (HTMLElementImpl::innerHTML): Changed to call createMarkup.
        (HTMLElementImpl::outerHTML): Ditto.

        * khtml/ecma/kjs_window.cpp:
        (Window::retrieveWindow): Comment out assert that uses dynamic_cast.
        (Window::retrieveActive): Ditto.

        * khtml/editing/htmlediting.h: Added forward class declaration needed now that I removed one elsewhere.
        * khtml/xml/dom_docimpl.h: Ditto.

        * khtml/khtml_part.cpp:
        (KHTMLPart::slotDebugDOMTree): Use createMarkup instead of toHTML.
        (KHTMLPart::processObjectRequest): Use inherits instead of dynamic_cast.

        * khtml/rendering/render_image.cpp: (RenderImage::paint): Add an explicit QChar conversion so this code
        still works even with the additional replace overloads added to QString.
        * kwq/KWQTextCodec.mm: (QTextCodec::fromUnicode): Ditto.

        * khtml/rendering/render_object.h: Removed the version of arenaDelete that does not take an object
        base pointer, because it used dynamic_cast in its implementation. Made the other version public.
        * khtml/rendering/render_object.cpp: Ditto.
        * khtml/rendering/render_replaced.cpp: (RenderWidget::deref): Pass object base pointer to arenaDelete.

        * khtml/xml/dom2_rangeimpl.h: Removed extra parameters from toHTML, and unneeded includes and declarations.
        * khtml/xml/dom2_rangeimpl.cpp: (DOM::RangeImpl::toHTML): Changed to call createMarkup, and moved all
        the support code into markup.cpp.

        * khtml/xml/dom_nodeimpl.h: Moved toHTML and related functions into markup.cpp.
        * khtml/xml/dom_nodeimpl.cpp: Ditto.

        * khtml/xml/dom_position.cpp:
        (DOM::startPosition): Implemented the version of this that takes a RangeImpl. Also added null checks
        so these return null positions rather than raising exceptions.
        (DOM::endPosition): Ditto.

        * khtml/khtmlview.h: Added an APPLE_CHANGES function so inherits can detect this class without dynamic_cast.
        * kwq/KWQFrame.h: Ditto.
        * kwq/KWQFrame.mm: (QFrame::isQFrame): Ditto.
        * kwq/KWQKPartsPart.h: Ditto.
        * kwq/KWQKPartsPart.mm: (KParts::ReadOnlyPart::isKPartsReadOnlyPart): Ditto.
        * kwq/KWQScrollView.h: Ditto.
        * kwq/KWQScrollView.mm: (QScrollView::isQScrollView): Ditto.
        * kwq/KWQKHTMLPart.h: Ditto.
        * kwq/KWQKHTMLPart.mm:
        (KHTMLView::isKHTMLView): Ditto.
        (KWQKHTMLPart::setTitle): Added an explicit QChar conversion so this code still works even with the additional
        replace overloads added to QString.
        (KWQKHTMLPart::setStatusBarText): Ditto.
        (KWQKHTMLPart::runJavaScriptAlert): Ditto.
        (KWQKHTMLPart::runJavaScriptConfirm): Ditto.
        (KWQKHTMLPart::runJavaScriptPrompt): Ditto.
        (KWQKHTMLPart::attributedString): Ditto.
        (KWQKHTMLPart::isCharacterSmartReplaceExempt): Ditto.
        (KWQKHTMLPart::isKHTMLPart): That dynamic_cast thing (see above).

        * kwq/KWQObject.h: Added virtual methods for the few cases where we need dynamic_cast-like behavior.
        * kwq/KWQObject.mm:
        (QObject::inherits): Changed to not use dynamic cast.
        (QObject::isKHTMLPart): Added. Returns false.
        (QObject::isKHTMLView): Ditto.
        (QObject::isKPartsReadOnlyPart): Ditto.
        (QObject::isQFrame): Ditto.
        (QObject::isQScrollView): Ditto.

        * kwq/KWQRenderTreeDebug.cpp:
        (write): Changed to use inherits rather than dynamic_cast.
        (writeSelection): Ditto.

        * kwq/KWQSlot.mm: (KWQSlot::call): Call through to the version with just a job pointer parameter rather
        than going straight on to the "no parameters at all" version.

        * kwq/KWQString.h:
        * kwq/KWQString.mm: (QString::replace): Added overloads.
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge markupStringFromNode:nodes:]): Changed to call functions in markup.h.
        (-[WebCoreBridge markupStringFromRange:nodes:]): Ditto.
        (-[WebCoreBridge selectedString]): Added an explicit QChar conversion so this code still works even with
        the additional replace overloads added to QString.
        (-[WebCoreBridge stringForRange:]): Ditto.
        (-[WebCoreBridge copyDOMNode:copier:]): Changed to call functions in markup.h.
        (-[WebCoreBridge elementAtPoint:]): QChar conversion.
        (-[WebCoreBridge documentFragmentWithMarkupString:baseURLString:]): Changed to call functions in markup.h.
        (-[WebCoreBridge documentFragmentWithText:]): Changed to call functions in markup.h.

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

17 years ago Reviewed by John
kocienda [Mon, 13 Dec 2004 23:17:57 +0000 (23:17 +0000)]
    Reviewed by John

        Fix for this bug:

        <rdar://problem/3917956> REGRESSION (Mail): pasting can leave insertion point inside pasted text

        * khtml/editing/htmlediting.cpp:
        (khtml::ReplaceSelectionCommand::doApply): Fix coding mistake. Calculations of bool flag based on
        leading and trailing whitespace positions was reversed! I must have introduced this error recently
        when changing around this code.

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

17 years ago Fix for 3915787, macobserver doesn't paint. floatRect() needed to be const in the...
hyatt [Mon, 13 Dec 2004 22:59:48 +0000 (22:59 +0000)]
Fix for 3915787, macobserver doesn't paint.  floatRect() needed to be const in the base class.  Also hit-testing
and painting was using the wrong rect when setting up the x/y of the rect.

        Reviewed by mjs

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

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

17 years ago Reviewed by John
kocienda [Mon, 13 Dec 2004 22:41:27 +0000 (22:41 +0000)]
    Reviewed by John

        Fix for this bug:

        <rdar://problem/3917863> REGRESSION (Mail): pasting two lines of plain text copied from an RTF document results in two styles

        Code to figuire out the end node to merge was missing the font tag in the second paragraph
        written out by AppKit convert-to-HTML function. I refined the algorithm to be smarter.

        * khtml/editing/htmlediting.cpp:
        (khtml::ReplacementFragment::mergeEndNode): Refine algorithm used to walk through the fragment being pasted
        looking for the node that is the last inline in the last block of the fragment. The old algorithm was
        insufficiently powerful.
        (khtml::ReplacementFragment::enclosingBlock): New helper function.
        * khtml/editing/htmlediting.h: Add declaration for new helper function.
        * layout-tests/editing/pasteboard/paste-text-011-expected.txt: Added.
        * layout-tests/editing/pasteboard/paste-text-011.html: Added.

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

17 years ago Reviewed by John
kocienda [Mon, 13 Dec 2004 21:01:02 +0000 (21:01 +0000)]
    Reviewed by John

        WebCore side of fix for this bug:

        <rdar://problem/3768372> REGRESSION (Mail): paste of text ending in whitespace loses whitespace

        Note that we are coordinating with Doug Davidson on the AppKit team to make a complete fix for this
        bug. This change involves our half of the needed changes.

        Note that a lot of this change has to do with changing code to use a <br> element instead of
        a comment node as the mechanism to annotate HTML with information used to fix the bug. In some
        other places, code to handle comments in markup can be removed since we do not use comments for
        such annotations after this change.

        * khtml/editing/htmlediting.cpp: Remove isComment() helper; no longer needed.
        (khtml::ReplacementFragment::ReplacementFragment): Change m_hasInterchangeNewlineComment name to m_hasInterchangeNewline.
        (khtml::ReplacementFragment::isInterchangeNewlineNode): Name changed from isInterchangeNewlineComment.
        (khtml::ReplacementFragment::isInterchangeConvertedSpaceSpan): Local variable name convertedSpaceSpanClass changed to
        convertedSpaceSpanClassString to match other uses of the idiom used here.
        (khtml::ReplaceSelectionCommand::doApply): Change hasInterchangeNewlineComment() name to hasInterchangeNewline().
        * khtml/editing/htmlediting.h: Change names as noted in .cpp file. Remove isComment() helper; no longer needed.
        (khtml::ReplacementFragment::hasInterchangeNewline):  Change hasInterchangeNewlineComment() name to hasInterchangeNewline().
        * khtml/html/html_elementimpl.cpp:
        (HTMLElementImpl::createContextualFragment): No longer has includeCommentsInDOM flag; no longer needed as we do not
        annotate fragments with comments any longer.
        * khtml/html/html_elementimpl.h: Ditto.
        * khtml/xml/dom2_rangeimpl.cpp: Remove addCommentToHTMLMarkup() helper. No longer needed.
        (DOM::interchangeNewlineMarkupString): New helper to return <br> element markup we use to annotate content for interchange.
        (DOM::RangeImpl::toHTML): No longer uses addCommentToHTMLMarkup; now calls interchangeNewlineMarkupString(). Remove
        spurious semi-colon.
        * khtml/xml/dom2_rangeimpl.h: Remove obsolete addCommentToHTMLMarkup() function and EAddToMarkup enum.
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge documentFragmentWithMarkupString:baseURLString:]): No longer pass bool to ask for including comments
        in DOM when calling createContextualFragment().

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

17 years agoVersions were backwards in TOT. They should read Safari 2.0 (175+), not Safari 175...
vicki [Mon, 13 Dec 2004 20:59:44 +0000 (20:59 +0000)]
Versions were backwards in TOT.  They should read Safari 2.0 (175+), not Safari 175+ (2.0).

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

17 years ago fixed deployment build bustage that John Louch ran into
sullivan [Sat, 11 Dec 2004 01:48:44 +0000 (01:48 +0000)]
    fixed deployment build bustage that John Louch ran into

        * kwq/KWQTextEdit.mm:
        move bool declaration inside exception-handling block to avoid obscure
        compiler error

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

17 years ago Reviewed by Richard.
mjs [Fri, 10 Dec 2004 23:15:35 +0000 (23:15 +0000)]
    Reviewed by Richard.

<rdar://problem/3907484> REGRESSION (125-173): crash when KWQTextField is dealloc'ed while setting focus (profoundlearning.com)

        * kwq/KWQWidget.mm:
        (QWidget::setFocus): Handle the case where setting focus removed
us from the superview - this can happen due to style changes on
focus change.

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

17 years ago Reviewed by Hyatt
kocienda [Fri, 10 Dec 2004 23:02:06 +0000 (23:02 +0000)]
    Reviewed by Hyatt

        Fix for this bug:

        <rdar://problem/3915008> REGRESSION (Mail): Too much white space between lines separated by carriage returns

        There are a number of interesting things we could do to fix this bug, including SPI and involving
        the WebKit delegate, etc., however it seems reasonable to start with a hard-coded default that
        will fix the bug in the general case until such time as we can come up with more specific

        So, I added a helper method to create <p> elements with an inline style that sets top and bottom margins
        to 0.1em.

        * khtml/editing/htmlediting.cpp:
        (khtml::InsertParagraphSeparatorCommand::createParagraphElement): New factory method to create
        paragraph elements to insert. Also adds style information to keep the <p> from having "too-big" margins.
        (khtml::InsertParagraphSeparatorCommand::doApply): Call new factory method.
        * khtml/editing/htmlediting.h: Add createParagraphElement() declaration.

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

17 years ago Reviewed by Hyatt.
darin [Fri, 10 Dec 2004 22:15:59 +0000 (22:15 +0000)]
    Reviewed by Hyatt.

        - fixed <rdar://problem/3910419> setting style={overflow:hidden} for <textarea> does not prevent appearance of scrollbars

        * khtml/rendering/render_form.h: Remove now-unneeded wrap parameter.
        * khtml/rendering/render_form.cpp:
        (RenderSubmitButton::rawText): Convert to QChar explicitly.
        (RenderLineEdit::updateFromElement): Ditto.
        (RenderLineEdit::slotTextChanged): Ditto.
        (RenderSelect::updateFromElement): Ditto.
        (TextAreaWidget::TextAreaWidget): Moved out most of the initialization since it's not something
        that requires a derived class. Now we don't use this class at all for WebCore, but they still
        have it for KDE.
        (TextAreaWidget::event): Moved out the ifdefs.
        (RenderTextArea::RenderTextArea): Moved setting code from TextAreaWidget here. Put a bunch that
        we don't need at all inside !APPLE_CHANGES, and removed the setting for scroll bars, since that's
        now done in setStyle.
        (RenderTextArea::handleFocusOut): Use type QTextEdit instead of TextAreaWidget since that's all
        that's needed and WebCore no longer has TextAreaWidget.
        (RenderTextArea::calcMinMaxWidth): Ditto.
        (RenderTextArea::setStyle): Add code to set scroll bar modes based on wrap setting combined with
        overflow style.
        (RenderTextArea::updateFromElement): Use type QTextEdit.
        (RenderTextArea::text): Ditto.
        (RenderTextArea::select): Ditto.

        * kwq/KWQTextArea.mm:
        (-[KWQTextArea _configureTextViewForWordWrapMode]): Don't set horizontal scroller visibility here,
        since it's now handled by QTextEdit.
        (-[KWQTextArea initWithFrame:]): Don't set vertical scroller visibility or scroller auto-hiding.

        * kwq/KWQTextEdit.h: Add setScrollBarModes function to be used instead of separate setter for
        the horizontal and vertical mode; needed because AppKit switches "autohide" for both at once.
        * kwq/KWQTextEdit.mm: (QTextEdit::setScrollBarModes): Added.

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

17 years ago Reviewed by Darin
kocienda [Fri, 10 Dec 2004 21:57:46 +0000 (21:57 +0000)]
    Reviewed by Darin

        Fix for this bug:

        <rdar://problem/3915047> HItting return in empty document inserts <p> but
        insertion point does not move

        * khtml/editing/htmlediting.cpp:
        (khtml::InsertParagraphSeparatorCommand::doApply): The issue is that the
        code to insert the <p> element for the return is not detecting the fact
        that the document is empty. Inserting a <p> into an empty body will not
        "add a new line" as the user expects. With this change, we'll add a second
        <p> when the root editable element has no rendered kids.

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

17 years ago Reviewed by John.
mjs [Fri, 10 Dec 2004 21:13:57 +0000 (21:13 +0000)]
    Reviewed by John.

<rdar://problem/3912979> REGRESSION (125-173): repro crash in HTMLCollectionImpl code (www.clubtravel.ie)

        * khtml/html/html_miscimpl.cpp:
        (HTMLCollectionImpl::traverseNextItem): Pass base when traversing
the initial one step, otherwise we might inadvertantly step
outside the collection base, thereby causing assertion failures or
other badness later.

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

17 years ago Reviewed by Chris
kocienda [Fri, 10 Dec 2004 21:10:35 +0000 (21:10 +0000)]
    Reviewed by Chris

        * khtml/editing/htmlediting.cpp:
        (khtml::InsertParagraphSeparatorCommand::doApply): There is a starting block which is supposed to
        act as the root node for this operation. However, a loop was incorrectly coded, and a parent node
        search could escape this node. Also, one other piece to code to move nodes to the new <p> element
        should do nothing if the starting point for the selection is itself the starting block.
        (khtml::InsertParagraphSeparatorInQuotedContentCommand::doApply): Similar changes, in spirit, to the above
        function, though the names and concepts are slightly different.

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

17 years ago Reviewed by Ken.
mjs [Fri, 10 Dec 2004 21:09:43 +0000 (21:09 +0000)]
    Reviewed by Ken.

<rdar://problem/3907705> REGRESSION (172-173): DHTML menus are broken at hrweb.apple.com

* khtml/dom/html_document.cpp:
        (HTMLDocument::nameableItems): New method, wrapper for HTMLCollection creation.
        * khtml/dom/html_document.h:
        * khtml/ecma/kjs_html.cpp:
        (KJS::HTMLDocument::tryGet): use doc.nameableItems(), not doc.all()!
        * khtml/html/html_miscimpl.cpp:
        (HTMLCollectionImpl::traverseNextItem): Added new DOC_NAMEABLE_ITEMS type, this represents
the items that can be accessed directly as a document propery, in particular forms, images,
objects, applets and embeds.
        (HTMLCollectionImpl::updateNameCache): Fix some nameCache/idCache confusion.
        (HTMLFormCollectionImpl::updateNameCache): Ditto.
        * khtml/html/html_miscimpl.h:
        (DOM::HTMLCollectionImpl::): Added new type.

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

17 years ago Fixed <rdar://problem/3898708> REGRESSION (8A314-8A317): World Clock's short hand...
rjw [Fri, 10 Dec 2004 20:23:37 +0000 (20:23 +0000)]
Fixed <rdar://problem/3898708> REGRESSION (8A314-8A317): World Clock's short hand not displayed (ImageIO problem with PDF?)
Fixed <rdar://problem/3914012> use CG directly for pdf images not ImageIO

Create a PDF document and draw that instead of using ImageIO to create a rasterized image.

        Reviewed by Maciej.

        * WebCoreSupport.subproj/WebImageData.h:
        * WebCoreSupport.subproj/WebImageData.m:
        (-[WebImageData setIsPDF:]):
        (-[WebImageData isPDF]):
        (-[WebImageData dealloc]):
        (-[WebImageData decodeData:isComplete:callback:]):
        (-[WebImageData incrementalLoadWithBytes:length:complete:callback:]):
        (-[WebImageData size]):
        (-[WebImageData animate]):
        (-[WebImageData _createPDFWithData:]):
        (-[WebImageData _PDFDocumentRef]):
        (-[WebImageData _PDFDrawInContext:]):
        (-[WebImageData _PDFDrawFromRect:toRect:operation:alpha:flipped:context:]):
        * WebCoreSupport.subproj/WebImageRenderer.h:
        * WebCoreSupport.subproj/WebImageRenderer.m:
        (-[WebImageRenderer size]):
        (-[WebImageRenderer incrementalLoadWithBytes:length:complete:callback:]):
        (-[WebImageRenderer drawImageInRect:fromRect:compositeOperator:context:]):

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

17 years ago Reviewed by Ken.
sullivan [Fri, 10 Dec 2004 18:53:47 +0000 (18:53 +0000)]
    Reviewed by Ken.

        - fixed <rdar://problem/3855127> Error while printing w/o sheet, then window is left in a bad state,
        if there's no default printer set

        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView beginDocument]):
        Our implementation of knowsPageRange puts the WebHTMLView into a special "printing mode". We must
        exit the "printing mode" to return to normal behavior. This is normally done in endDocument.
        However, it turns out that if there's an exception in [super beginDocument], then endDocument
        will not be called (lame-o AppKit API). So, we handle that case by catching the exception and
        exiting the "printing mode" in beginDocument when it occurs.

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

17 years ago Reviewed by John
kocienda [Fri, 10 Dec 2004 18:45:29 +0000 (18:45 +0000)]
    Reviewed by John

        Fix for this bug:

        <rdar://problem/3914779> REGRESSION (Mail): Cannot arrow navigate to position before last character on text-wrapped line

        * khtml/rendering/render_text.cpp:
        (RenderText::caretRect): Code was not detecting space at the end of a line correctly. Now it does.

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

17 years ago Reviewed by John
kocienda [Fri, 10 Dec 2004 17:11:16 +0000 (17:11 +0000)]
    Reviewed by John

        Fix for this bug:

        <rdar://problem/3914755> REGRESSION (Mail): Insertion point disappears after pasting paragraph

        * khtml/editing/htmlediting.cpp:
        (khtml::ReplaceSelectionCommand::doApply): Selection could end up in a "placeholder" node
        that was removed from the document when pasting. This caused the disappearance. Now this
        is detected, and the selection is shifted to a node that is in the document.

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

17 years agoRemove conflict marker
kocienda [Fri, 10 Dec 2004 16:29:00 +0000 (16:29 +0000)]
Remove conflict marker

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

17 years ago Check to disable threaded decoding during
rjw [Fri, 10 Dec 2004 04:38:19 +0000 (04:38 +0000)]
Check to disable threaded decoding during
layout tests wasn't invoking function, just checking address of
function, which would always return true.

        * kwq/WebCoreImageRendererFactory.m:
        (+[WebCoreImageRendererFactory shouldUseThreadedDecoding]):

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

17 years ago Fixed <rdar://problem/3905789> Burn Disc image vibrates rapidly
rjw [Fri, 10 Dec 2004 03:09:19 +0000 (03:09 +0000)]
Fixed <rdar://problem/3905789> Burn Disc image vibrates rapidly

Restrict our support for animated images to GIF.  We used to
use presence of more than one image in a resource to determine
if an image should be animated.  This caused us to animate icns!
If we ever support any other animated image formats we'll have
to extend.

        Reviewed by Hyatt.

        * WebCoreSupport.subproj/WebImageData.h:
        * WebCoreSupport.subproj/WebImageData.m:
        (-[WebImageData shouldAnimate]):
        * WebCoreSupport.subproj/WebImageRenderer.m:
        (-[WebImageRenderer _startOrContinueAnimationIfNecessary]):

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

17 years ago Fix for 3892686, left/top overflow was not being propagated properly up to containin...
hyatt [Fri, 10 Dec 2004 03:05:50 +0000 (03:05 +0000)]
Fix for 3892686, left/top overflow was not being propagated properly up to containing blocks because of a math

Also fix a bug I noticed on the same page where relative position offsets were not being added in properly for
all inlines when repainting.

        Reviewed by rjw

        * khtml/rendering/render_block.cpp:
        * khtml/rendering/render_flow.cpp:

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

17 years ago Make WebPluginDatabase.h private (Dashboard needs SPI).
rjw [Fri, 10 Dec 2004 01:46:58 +0000 (01:46 +0000)]
Make WebPluginDatabase.h private (Dashboard needs SPI).

        * WebKit.pbproj/project.pbxproj:

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

17 years agoNew layout test to cover more details of tables shifting below floats.
hyatt [Fri, 10 Dec 2004 01:38:21 +0000 (01:38 +0000)]
New layout test to cover more details of tables shifting below floats.

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

17 years ago Fix for 3867545, finance.yahoo.com lays out incorrectly. Add a quirk that will...
hyatt [Fri, 10 Dec 2004 01:38:04 +0000 (01:38 +0000)]
Fix for 3867545, finance.yahoo.com lays out incorrectly.  Add a quirk that will prevent tables from moving
down below floats when there is insufficient space.  Instead we will match Gecko and just spill out of the
containing block to the right.  This appears to be the more common desired behavior, despite being wrong.
WinIE sometimes wraps and sometimes doesn't, but it's really hard for us to match its inconsistency.

        Reviewed by john

        * khtml/rendering/render_block.cpp:
        * layout-tests/apple-only/base/www.cnn.com/index-expected.txt:
        * layout-tests/apple-only/base/www.ebay.com/index-expected.txt:
        * layout-tests/apple-only/base/www.excite.com/index-expected.txt:
        * layout-tests/fast/block/margin-collapse/102-expected.txt:
        * layout-tests/fast/block/margin-collapse/102.html:

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

17 years ago Fixed <rdar://problem/3914078> worldclock crashing gc related
rjw [Fri, 10 Dec 2004 01:15:55 +0000 (01:15 +0000)]
Fixed <rdar://problem/3914078> worldclock crashing gc related

Use ProtectedValue for Context2D instance members.

        Reviewed by Maciej.

        * khtml/ecma/kjs_html.h:

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

17 years ago Reviewed by Dave.
sullivan [Fri, 10 Dec 2004 00:37:10 +0000 (00:37 +0000)]
    Reviewed by Dave.

        - fixed <rdar://problem/3731099> Move AXTitle string for image elements to AXDescription

        * kwq/KWQAccObject.mm:
        (-[KWQAccObject title]): moved image alt tag code out of here
        (-[KWQAccObject accessibilityDescription]): moved image alt tag code into this new method
        (-[KWQAccObject accessibilityAttributeNames]): include AXDescription in the set of attributes
        that ordinary elements return; this means that ordinary elements that aren't images will return
        a nil description, which isn't ideal, but is in keeping with the way the rest of these attributes
        work here.
        (-[KWQAccObject accessibilityAttributeValue:]):
        call accessibilityDescription when asked for AXDescription

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

17 years ago Reviewed by Harrison
kocienda [Fri, 10 Dec 2004 00:10:34 +0000 (00:10 +0000)]
    Reviewed by Harrison

        Fix for this bug:

        <rdar://problem/3910425> REGRESSION (Mail): Crash in ReplaceSelectionCommand; selection is empty, leading to null deref

        * khtml/editing/htmlediting.cpp:
        (khtml::MoveSelectionCommand::doApply): The node representing the destination for the move may have
        been deleted. If this is the case, set the destination to the node the delete command provides in
        its ending selection.

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

17 years agoversioning for TOT, Safari 2.0 (175+)
vicki [Fri, 10 Dec 2004 00:00:39 +0000 (00:00 +0000)]
versioning for TOT, Safari 2.0 (175+)

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

17 years agoSafari-175 stamp (skipped Safari-174 because it ends in a "4")
vicki [Thu, 9 Dec 2004 23:53:41 +0000 (23:53 +0000)]
Safari-175 stamp (skipped Safari-174 because it ends in a "4")

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

17 years agoRolling out change. Tree was closed.
kocienda [Thu, 9 Dec 2004 22:41:02 +0000 (22:41 +0000)]
Rolling out change. Tree was closed.

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

17 years agoRolling out change. Tree was closed.
kocienda [Thu, 9 Dec 2004 22:40:47 +0000 (22:40 +0000)]
Rolling out change. Tree was closed.

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

17 years ago Reviewed by Harrison
kocienda [Thu, 9 Dec 2004 22:37:45 +0000 (22:37 +0000)]
    Reviewed by Harrison

        Fix for this bug:

        <rdar://problem/3910425> REGRESSION (Mail): Crash in ReplaceSelectionCommand; selection is empty, leading to null deref

        * khtml/editing/htmlediting.cpp:
        (khtml::MoveSelectionCommand::doApply): The node representing the destination for the move may have
        been deleted. If this is the case, set the destination to the node the delete command provides in
        its ending selection.

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

17 years ago Workaround for this exception being raised during download:
cblu [Thu, 9 Dec 2004 19:49:23 +0000 (19:49 +0000)]
Workaround for this exception being raised during download:
[WebDownload connection:willStopBufferingData:]: selector not recognized

        Reviewed by john.

        * Misc.subproj/WebDownload.m:
        (-[WebDownload connection:willStopBufferingData:]): implement this method so no exception is raised. It is a bug in Foundation that this method is being called, but it's too late to fix Foundation since it has already been submitted this week. This workaround will prevent any problems from affecting users.

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

17 years ago Reviewed by John
kocienda [Thu, 9 Dec 2004 19:21:09 +0000 (19:21 +0000)]
    Reviewed by John

        Fix for this bug:

        <rdar://problem/3912841> REGRESSION (173-TOT): Some images report 0x0 dimensions on layout tests, causes spurious test failures

        The new threaded image decoding capability can throw off layout tests. The issue is that the decoding
        callback may not be delivered before the program asks for the dimensions of an image in order to
        wrote the layout dimensions. More generally, I think we need to ensure that there are no races in
        layout tests, so I have added a flag to the render tree debug code that we can set when debugging.

        * kwq/KWQRenderTreeDebug.cpp:
        (debuggingRenderTree): New function. Returns flag which tells whether the program is debugging the render tree.
        (externalRepresentation): Sets debuggingRenderTree flag to true;
        * kwq/KWQRenderTreeDebug.h:
        * kwq/WebCoreImageRendererFactory.m:
        (+[WebCoreImageRendererFactory shouldUseThreadedDecoding]): Checks debuggingRenderTree flag and will not
        do threaded decoding in any case if the flag is set.

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

17 years ago Fix for busting XMLHTTPRequest.
cblu [Thu, 9 Dec 2004 18:57:20 +0000 (18:57 +0000)]
Fix for busting XMLHTTPRequest.

        Reviewed by kocienda.

        * khtml/misc/loader.cpp:
        (Loader::servePendingRequests): pass true for deliverAllData
        * kwq/KWQKJob.h:
        (KIO::get): take deliverAllData param
        (KIO::http_post): ditto
        * kwq/KWQKJobClasses.h:
        * kwq/KWQKJobClasses.mm:
        (KIO::TransferJob::TransferJob): if deliverAllData, create signal with data param
        (KIO::TransferJob::emitResult): if deliverAllData, call signal with data param

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

17 years ago Reviewed by John
kocienda [Thu, 9 Dec 2004 15:32:31 +0000 (15:32 +0000)]
    Reviewed by John

        <rdar://problem/3911011> REGRESSION (Mail): Spaces at end of line causing word wrap lost when copied/pasted

        * khtml/xml/dom_nodeimpl.cpp:
        (NodeImpl::renderedText): Fixed the code so that spaces at the end of lines are not skipped.

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

18 years ago Fixed <rdar://problem/3911719> REGRESSION: Images no longer scale vertically
rjw [Thu, 9 Dec 2004 01:20:31 +0000 (01:20 +0000)]
Fixed <rdar://problem/3911719> REGRESSION: Images no longer scale vertically
Account for scaling correctly when taking into account progressively
  loaded images.

Also added implementation of repetition count for animated GIF images.
Also replaced strings with new constants from CFImageProperties.h

Also fixed possible problem with -(NSSize)size implementation,
relevant to Panther only.

        Reviewed by Chris.

        * WebCoreSupport.subproj/WebImageData.m:
        (-[WebImageData _floatProperty:type:at:]):
        (-[WebImageData _frameDurationAt:]):
        (-[WebImageData _repetitionCount]):
        * WebCoreSupport.subproj/WebImageRenderer.m:
        (-[WebImageRenderer size]):

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

18 years ago Reviewed by Darin.
mjs [Wed, 8 Dec 2004 22:54:45 +0000 (22:54 +0000)]
    Reviewed by Darin.

<rdar://problem/3908017> REGRESSION (172-173): assertion in ObjectImp::construct trying to create JS error (24hourfitness.com)

The fix was to implement copy constructor and assignment operator,
the ones that worked on the base class did not replace the
defaults apparently!

        * kjs/protect.h:

Also fixed a bug in the GC test mode that compares the results of
the old collector and the new collector.

* kjs/value.cpp:

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

18 years ago Removed NPN wrappers since these no longer need to be defined to make the QT plug...
cblu [Wed, 8 Dec 2004 21:58:18 +0000 (21:58 +0000)]
Removed NPN wrappers since these no longer need to be defined to make the QT plug-in work
since 3828925 has been fixed.

        Reviewed by john.

        * Plugins.subproj/WebNetscapePluginPackage.m:
        (-[WebNetscapePluginPackage load]): use under-bar symbols since non-under-bar wrappers have been removed
        * Plugins.subproj/npapi.m: removed NPN wrappers
        * WebKit.exp: removed symbols

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

18 years ago Reviewed by Darin
kocienda [Wed, 8 Dec 2004 16:30:23 +0000 (16:30 +0000)]
    Reviewed by Darin

        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView drawRect:]): Work around for this bug:
        <rdar://problem/3908282> REGRESSION (Mail): No drag image dragging selected text in Blot and Mail
        The reason for the workaround is that this method is called explicitly from the code
        to generate a drag image, and at that time, getRectsBeingDrawn:count: will return a zero count.
        This code change uses the passed-in rect when the count is zero.

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

18 years agoWebKit:
cblu [Wed, 8 Dec 2004 00:27:09 +0000 (00:27 +0000)]

Support for fix for:
<rdar://problem/3734309> Safari doesn't open folders in title bar menu with non-Roman names using Cmd+click

        Reviewed by john.

        * Misc.subproj/WebNSURLExtras.h:
        * Misc.subproj/WebNSURLExtras.m:
        (+[NSURL _web_URLWithUserTypedString:relativeToURL:]): renamed to take relativeToURL parameter
        (+[NSURL _web_URLWithUserTypedString:]): call _web_URLWithUserTypedString:relativeToURL: with nil for URL


Fixed: <rdar://problem/3734309> Safari doesn't open folders in title bar menu with non-Roman names using Cmd+click

        Reviewed by john.

        * TitleBarButton.m:
        (-[TitleBarButton showPathRepresentingPopUpMenu]): use _web_URLWithUserTypedString:: since the path returned by [NSURL path] is of the "user typed" variety

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

18 years ago Fixed <rdar://problem/3905564> REGRESSION (Tiger); in History menu, pixel size appea...
rjw [Tue, 7 Dec 2004 23:39:07 +0000 (23:39 +0000)]
Fixed <rdar://problem/3905564> REGRESSION (Tiger); in History menu, pixel size appears but is wrong for standalone images in Safari.

        Reviewed by Chris.

        * WebCoreSupport.subproj/WebImageRenderer.m:
        (-[WebImageRenderer size]):

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

18 years agoWebCore:
rjw [Tue, 7 Dec 2004 23:06:24 +0000 (23:06 +0000)]
Support threaded image decoding on machines w/ > 2 CPUs.

        Reviewed by Maciej and Chris.

        * khtml/misc/loader.cpp:
        * khtml/misc/loader.h:
        * khtml/rendering/render_object.cpp:
        * kwq/KWQPixmap.h:
        * kwq/KWQPixmap.mm:
        (-[WebImageCallback initWithCallback:khtml::]):
        (-[WebImageCallback _commonTermination]):
        (-[WebImageCallback dealloc]):
        (-[WebImageCallback finalize]):
        (-[WebImageCallback notify]):
        (-[WebImageCallback setImageSourceStatus:]):
        (-[WebImageCallback status]):
        * kwq/WebCoreImageRenderer.h:
        * kwq/WebCoreImageRendererFactory.h:
        * kwq/WebCoreImageRendererFactory.m:
        (+[WebCoreImageRendererFactory shouldUseThreadedDecoding]):
        (+[WebCoreImageRendererFactory setShouldUseThreadedDecoding:]):

Support threaded image decoding on machines w/ > 2 CPUs.

        Reviewed by Maciej and Chris.

        * Misc.subproj/WebKitSystemBits.h:
        * Misc.subproj/WebKitSystemBits.m:
        * WebCoreSupport.subproj/WebImageData.h:
        * WebCoreSupport.subproj/WebImageData.m:
        (+[WebImageData initialize]):
        (-[WebImageData init]):
        (-[WebImageData _commonTermination]):
        (-[WebImageData dealloc]):
        (-[WebImageData _invalidateImages]):
        (-[WebImageData _imageSourceOptions]):
        (-[WebImageData imageAtIndex:]):
        (-[WebImageData propertiesAtIndex:]):
        (-[WebImageData _createImages]):
        (-[WebImageData decodeData:isComplete:callback:]):
        (-[WebImageData incrementalLoadWithBytes:length:complete:callback:]):
        (-[WebImageData tileInRect:fromPoint:context:]):
        (-[WebImageData isNull]):
        (-[WebImageData size]):
        (-[WebImageData _frameDurationAt:]):
        (-[WebImageData _frameDuration]):
        (+[WebImageData stopAnimationsInView:]):
        (-[WebImageData addAnimatingRenderer:inView:]):
        (-[WebImageData removeAnimatingRenderer:]):
        * WebCoreSupport.subproj/WebImageDecodeItem.h: Added.
        * WebCoreSupport.subproj/WebImageDecodeItem.m: Added.
        (+[WebImageDecodeItem decodeItemWithImage:data:isComplete:callback:]):
        (-[WebImageDecodeItem initWithImage:data:isComplete:callback:]):
        (-[WebImageDecodeItem finalize]):
        (-[WebImageDecodeItem dealloc]):
        * WebCoreSupport.subproj/WebImageDecoder.h: Added.
        * WebCoreSupport.subproj/WebImageDecoder.m: Added.
        (+[WebImageDecoder initialize]):
        (+[WebImageDecoder notifyMainThread]):
        (+[WebImageDecoder sharedDecoder]):
        (+[WebImageDecoder performDecodeWithImage:data:isComplete:callback:]):
        (+[WebImageDecoder imageDecodesPending]):
        (+[WebImageDecoder decodeComplete:status:]):
        (-[WebImageDecoder init]):
        (-[WebImageDecoder dealloc]):
        (-[WebImageDecoder finalize]):
        (-[WebImageDecoder removeItem]):
        (-[WebImageDecoder addItem:]):
        (-[WebImageDecoder decodeItem:]):
        * WebCoreSupport.subproj/WebImageRenderer.m:
        (-[WebImageRenderer initWithData:MIMEType:]):
        (-[WebImageRenderer initWithContentsOfFile:]):
        (-[WebImageRenderer incrementalLoadWithBytes:length:complete:callback:]):
        (-[WebInternalImage incrementalLoadWithBytes:length:complete:callback:]):
        * WebKit.pbproj/project.pbxproj:
        * WebView.subproj/WebImageRepresentation.m:
        (-[WebImageRepresentation receivedData:withDataSource:]):
        (-[WebImageRepresentation receivedError:withDataSource:]):
        (-[WebImageRepresentation finishedLoadingWithDataSource:]):

Added a menu item to enable/disable threaded image decoding.

        Reviewed by Maciej and Chris.

        * Debug/DebugUtilities.m:
        (-[DebugUtilities createDebugMenu]):
        (-[BrowserDocument toggleUseATSUForAllTextDrawing:]):
        (-[BrowserDocument toggleUseThreadedImageDecoding:]):
        (-[BrowserDocument validate_toggleUseThreadedImageDecoding:]):

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

18 years ago Fix for performance regression.
cblu [Tue, 7 Dec 2004 20:46:29 +0000 (20:46 +0000)]
Fix for performance regression.

        Reviewed by kevin.

        * WebCoreSupport.subproj/WebBridge.m:
        (-[WebBridge objectLoadedFromCacheWithURL:response:data:]): construct the WebResource without copying the data

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

18 years ago Fixed: <rdar://problem/3909243> REGRESSION: large standalone images stop loading...
cblu [Tue, 7 Dec 2004 20:05:21 +0000 (20:05 +0000)]
Fixed: <rdar://problem/3909243> REGRESSION: large standalone images stop loading part way through

        Reviewed by kevin.

        * WebView.subproj/WebBaseResourceHandleDelegate.h:
        * WebView.subproj/WebMainResourceClient.m:
        (-[WebMainResourceClient addData:]): call super so it buffers the data

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

18 years agoFix my NOBODY (OOPS!). John reviewed.
kocienda [Tue, 7 Dec 2004 19:01:44 +0000 (19:01 +0000)]
Fix my NOBODY (OOPS!). John reviewed.

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

18 years ago Reviewed by NOBODY (OOPS!).
kocienda [Tue, 7 Dec 2004 18:13:22 +0000 (18:13 +0000)]
    Reviewed by NOBODY (OOPS!).

        * khtml/editing/htmlediting.cpp:
        (khtml::InsertParagraphSeparatorInQuotedContentCommand::doApply): Fix a problem with my
        change in thei code yesterday. Call to insertBlockPlaceholderIfNeeded() must be done
        after new block has been inserted, otherwise a crash can result. Shuffle down call
        to insertBlockPlaceholderIfNeeded() a couple of lines (where the node is inserted),
        and all is good.

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

18 years ago Reviewed by John
kocienda [Tue, 7 Dec 2004 18:01:01 +0000 (18:01 +0000)]
    Reviewed by John

        Fix for this bug:

        <rdar://problem/3907422> REGRESSION (Mail): Pasting quoted content can place content after body element

        * khtml/editing/htmlediting.cpp:
        (khtml::ReplaceSelectionCommand::doApply): Detect when the body element is the "reference block" used
        for determining the location for inserting content. Do not allow an insert before or after if the
        reference block is the body. Perform insertNodeAt(0) and appendNode, respectively, in the block-is-body case.
        * layout-tests/editing/inserting/insert-3907422-fix-expected.txt: Added.
        * layout-tests/editing/inserting/insert-3907422-fix.html: Added.

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