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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 years ago Reviewed by Don.
darin [Tue, 7 Dec 2004 17:45:31 +0000 (17:45 +0000)]
    Reviewed by Don.

        - fixed <rdar://problem/3908701> REGRESSION: Cursor does not change to "hand" over active links

        * kwq/KWQEvent.mm: (positionForEvent): Add NSMouseMoved to list of events that have mouse location.

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

17 years ago Reviewed by John
kocienda [Tue, 7 Dec 2004 17:02:11 +0000 (17:02 +0000)]
    Reviewed by John

        Changed name of constant from KHTMLInterchangeNewline to AppleInterchangeNewline.
        I discussed this with Hyatt and he agreed that going with "Apple" names was OK.

        * khtml/editing/html_interchange.h: Name change, as described above.
        * khtml/editing/htmlediting.cpp:
        (khtml::ReplacementFragment::isInterchangeNewlineComment): Ditto.
        * khtml/xml/dom2_rangeimpl.cpp:
        (DOM::RangeImpl::toHTML): Ditto.

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

17 years ago Reviewed by me
kocienda [Tue, 7 Dec 2004 15:09:33 +0000 (15:09 +0000)]
    Reviewed by me

        Added a couple more layout tests.

        * layout-tests/editing/deleting/delete-line-013-expected.txt: Added.
        * layout-tests/editing/deleting/delete-line-013.html: Added.
        * layout-tests/editing/deleting/delete-line-014-expected.txt: Added.
        * layout-tests/editing/deleting/delete-line-014.html: Added.

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

17 years ago Use the AppKit's font rendering mode. This fixes 3905347, but we still need to...
rjw [Tue, 7 Dec 2004 04:11:36 +0000 (04:11 +0000)]
Use the AppKit's font rendering mode.  This fixes 3905347, but we still need to track down
and resolve why metrics have changed for Courier.  This may be caused by changes in
AppKit for 3902394.

        Reviewed by John.

        * WebCoreSupport.subproj/WebTextRenderer.m:

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

17 years ago Reviewed by Hyatt.
mjs [Tue, 7 Dec 2004 02:26:24 +0000 (02:26 +0000)]
    Reviewed by Hyatt.

- fixed <rdar://problem/3906974> assertion failure in QWidget::beforeMouseDown clicking on <select multiple>

* kwq/KWQListBox.mm:
        (QListBox::QListBox): Initialize KWQListBoxScrollView with this.
        (-[KWQListBoxScrollView initWithListBox:]): Make this class a KWQWidgetHolder.
        (-[KWQListBoxScrollView widget]): See above.
        (-[KWQTableView mouseDown:]): Pass outerView rather than self to beforeMouseDown and
afterMouseDown, to avoid triggering an assertion failure.

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

17 years agoAdd table test to cover the document.write line layout bug.
hyatt [Tue, 7 Dec 2004 02:09:56 +0000 (02:09 +0000)]
Add table test to cover the document.write line layout bug.

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

17 years ago Fix for 3615411, the linesAppended optimization was old and broken, and it's easier...
hyatt [Tue, 7 Dec 2004 02:09:10 +0000 (02:09 +0000)]
Fix for 3615411, the linesAppended optimization was old and broken, and it's easier with the new code fixes
made by me, kocienda and harrison to just remove it.

        Reviewed by mjs

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

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

17 years ago Fix for 3787133, some web pages print with many blank pages. Make sure to use the...
hyatt [Tue, 7 Dec 2004 01:36:23 +0000 (01:36 +0000)]
Fix for 3787133, some web pages print with many blank pages.  Make sure to use the real page print rect and
not a damage rect that can be changed when intersected with the clip regions of the web page.

        Reviewed by john

        * khtml/rendering/render_canvas.h:
        * khtml/rendering/render_flow.cpp:
        * khtml/rendering/render_list.cpp:
        * kwq/KWQKHTMLPart.mm:

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

17 years ago Forgot to commit copied header.
cblu [Tue, 7 Dec 2004 00:47:11 +0000 (00:47 +0000)]
Forgot to commit copied header.

        * DOM.subproj/DOMPrivate.h:

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

17 years ago Reviewed by Ken Kocienda and Dave Hyatt (OOPS!).
harrison [Tue, 7 Dec 2004 00:45:22 +0000 (00:45 +0000)]
    Reviewed by Ken Kocienda and Dave Hyatt (OOPS!).

<rdar://problem/3849947> Typing after pasting line does not appear until after window resize.

        * khtml/rendering/render_flow.cpp:
Dirty the line above because new child can inval the cached line break position of previous line.

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

17 years ago Fix for 3254464, radio buttons do not work for quiz on netscape.com. Left/top overf...
hyatt [Tue, 7 Dec 2004 00:34:02 +0000 (00:34 +0000)]
Fix for 3254464, radio buttons do not work for quiz on netscape.com.  Left/top overflow needed to be implemented.
This also fixes 3106907, link hover color only partially set on rollover and the more general architecture bug
3126929, handle top/left overflow.

This patch also fixes 3902891, scroll bar of position:fixed content moves when a page is scrolled.

Finally, the Emerson regression 3869718 (error involving computing the rightmost/lowest position of overflow:auto
regions and web pages) has been fixed.

        Reviewed by mjs

        * khtml/rendering/bidi.cpp:
        * khtml/rendering/render_block.cpp:
        * khtml/rendering/render_block.h:
        * khtml/rendering/render_box.h:
        * khtml/rendering/render_layer.cpp:
        * khtml/rendering/render_line.cpp:
        * khtml/rendering/render_line.h:
        * khtml/rendering/render_object.h:
        * khtml/rendering/render_table.cpp:
        * khtml/rendering/render_table.h:
        * kwq/KWQRect.h:
        * kwq/KWQRect.mm:

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

17 years ago Reviewed by John.
mjs [Tue, 7 Dec 2004 00:24:21 +0000 (00:24 +0000)]
    Reviewed by John.

- fixed <rdar://problem/3903797> scripts can cause other frames/windows to execute arbitrary script using javascript: URLs

I changed all unprotected places that can navigate a different
window or frame from script to check for a javascript: URL, and if
found, to check for safety using cross-site-script rules.

I considered a few other possible exploits and made no change:

- document.location is already protected because the document
object itself is protected

- frame.src, frame.location, iframe.src and targetted links are
all safe because setting the URL of a frame to a javascript: URL
executes the script in the context of the parent

* khtml/ecma/kjs_window.cpp:

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

17 years ago Reviewed by Maciej
kocienda [Mon, 6 Dec 2004 23:57:52 +0000 (23:57 +0000)]
    Reviewed by Maciej

        Fix for this bug:

        <rdar://problem/3890955> 8A314: Forward delete sometimes fails to delete the selected quoted text

        * khtml/editing/htmlediting.cpp:
        (khtml::DeleteSelectionCommand::handleSpecialCaseBRDelete): Fixed bonehead coding mistake in the
        check for one of the special cases being checked for in this function. The specific case
        intends to check for a selection that is only a <br> after a block ends (as in </div><br>). If it
        sees such markup, it deletes only the <br> and bails. However, this code would run in *any*
        case where a selection ended in a <br> after a block and would not delete any part of the
        selection preceding the <br>. Bad. I have tightened the check to see that only a <br> is

        Fixing the bug above was accomplished with an additional call to DOM::Position::downstream. This
        new use of the function exposed this bug:

        <rdar://problem/3907666> Incorrectly coded loop in Position::downstream can lead to infinite loop

        * khtml/xml/dom_position.cpp:
        (DOM::Position::downstream): I am ashamed of my first cut at this. Rewrote the loop so it does
        not have this fatal flaw. It is a much better design as well.

        * layout-tests/editing/deleting/delete-3800834-fix-expected.txt: Changes made this test
        have what I consider to be a better result. Going with it.

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

17 years ago Fixed: <rdar://problem/3871718> REGRESSION (125-168): text marked bold with font...
cblu [Mon, 6 Dec 2004 23:39:15 +0000 (23:39 +0000)]
Fixed: <rdar://problem/3871718> REGRESSION (125-168): text marked bold with font that does not have bold variant copies as non-bold

        Reviewed by hyatt.

        * kwq/DOM.mm:
        (-[DOMElement _font]): new SPI for AppKit
        * kwq/DOMPrivate.h:

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

17 years agoBump version number to 173.1. We're doing a dot submission today for <rdar://problem...
vicki [Mon, 6 Dec 2004 22:59:04 +0000 (22:59 +0000)]
Bump version number to 173.1.  We're doing a dot submission today for <rdar://problem/3903749>.

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

17 years ago Fixed: <rdar://problem/3907381> NSURLConnection and WebKit buffer 2 copies of incomi...
cblu [Mon, 6 Dec 2004 22:20:29 +0000 (22:20 +0000)]
Fixed: <rdar://problem/3907381> NSURLConnection and WebKit buffer 2 copies of incoming data

        Reviewed by darin.

        * WebView.subproj/WebBaseResourceHandleDelegate.h:
        * WebView.subproj/WebBaseResourceHandleDelegate.m:
        (+[WebBaseResourceHandleDelegate initialize]): cache check to see if Foundation supports access to its buffered data
        (-[WebBaseResourceHandleDelegate addData:]): don't buffer data if Foundation is buffering it for us
        (-[WebBaseResourceHandleDelegate saveResource]): when creating a WebResource, pass NO for copyData since we know it won't be mutated
        (-[WebBaseResourceHandleDelegate resourceData]): return the buffered data from the connection if it supports it
        (-[WebBaseResourceHandleDelegate willStopBufferingData:]): make a mutable copy of the data from NSURLConnection so we can continue buffering
        (-[WebBaseResourceHandleDelegate willCacheResponse:]): removed optimization that used the cached response data to save the resource since that is obsolete by this change
        (-[WebBaseResourceHandleDelegate connection:willStopBufferingData:]): new callback from NSURLConnection, informs us that NSURLConnection has given up buffering
        * WebView.subproj/WebDataSource.m:
        (-[WebDataSource _receivedData:]): removed buffering code since that's done by NSURLConnection and the main client
        (-[WebDataSource _setData:]): removed unnecessary cast since the resourceData ivar is now an NSData instead of NSMutableData
        (-[WebDataSource data]): return resourceData ivar, else return the resourceData from the main client
        * WebView.subproj/WebDataSourcePrivate.h:
        * WebView.subproj/WebMainResourceClient.m:
        (-[WebMainResourceClient releaseResources]): store resourceData on the data source so it can continue to have data after the main client has gone away
        (-[WebMainResourceClient connection:didReceiveData:lengthReceived:]):don't call [dataSource data] just to get the length of data received since [dataSource data] can now cause data to be copied
        (-[WebMainResourceClient connectionDidFinishLoading:]): ditto
        * WebView.subproj/WebResource.m:
        (-[WebResource initWithData:URL:MIMEType:textEncodingName:frameName:]): call following method with YES for copyData
        (-[WebResource _initWithData:URL:MIMEType:textEncodingName:frameName:copyData:]): new initializer, allows caller to choose whether or not the data is copied
        * WebView.subproj/WebResourcePrivate.h:

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

17 years ago Reviewed by Maciej.
darin [Mon, 6 Dec 2004 21:49:50 +0000 (21:49 +0000)]
    Reviewed by Maciej.

        - fixed <rdar://problem/3906327> Select All of a large document is slow (>15 secs on my machine for attached specimen)

        * kwq/KWQScrollView.mm: (QScrollView::updateContents): Intersect with visibleRect before calling through
        to NSView to dirty; NSView could also be more efficient in this case (I filed 3906343).

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

17 years ago Fixed <rdar://problem/3903749> REGRESSION (8A321): WebKit gets incorrect glyph metri...
rjw [Mon, 6 Dec 2004 21:09:19 +0000 (21:09 +0000)]
Fixed <rdar://problem/3903749> REGRESSION (8A321): WebKit gets incorrect glyph metrics due to change in how AppKit uses CGFont

Use CGFontRef direction when both getting font metrics and drawing
glyphs, instead on depending on [NSFont set].

        Reviewed by John.

        * WebCoreSupport.subproj/WebTextRenderer.m:

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

17 years ago Darin found what appears to be the real leak that we were falsely blaming
sullivan [Mon, 6 Dec 2004 19:48:37 +0000 (19:48 +0000)]
    Darin found what appears to be the real leak that we were falsely blaming
        on the 'leaks' tool (3880245). I made the change, and ran layout tests and PLT to make
        sure nothing barfed.

        * khtml/css/cssparser.cpp:
        call clearProperties() instead of just setting numParsedProperties to 0

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

17 years ago Reviewed by me
kocienda [Mon, 6 Dec 2004 18:38:56 +0000 (18:38 +0000)]
    Reviewed by me

        New layout tests.

        * layout-tests/editing/inserting/insert-div-001-expected.txt: Added.
        * layout-tests/editing/inserting/insert-div-001.html: Added.
        * layout-tests/editing/inserting/insert-div-002-expected.txt: Added.
        * layout-tests/editing/inserting/insert-div-002.html: Added.
        * layout-tests/editing/inserting/insert-div-003-expected.txt: Added.
        * layout-tests/editing/inserting/insert-div-003.html: Added.
        * layout-tests/editing/inserting/insert-div-004-expected.txt: Added.
        * layout-tests/editing/inserting/insert-div-004.html: Added.
        * layout-tests/editing/inserting/insert-div-005-expected.txt: Added.
        * layout-tests/editing/inserting/insert-div-005.html: Added.
        * layout-tests/editing/inserting/insert-div-006-expected.txt: Added.
        * layout-tests/editing/inserting/insert-div-006.html: Added.
        * layout-tests/editing/inserting/insert-div-007-expected.txt: Added.
        * layout-tests/editing/inserting/insert-div-007.html: Added.
        * layout-tests/editing/inserting/insert-div-008-expected.txt: Added.
        * layout-tests/editing/inserting/insert-div-008.html: Added.
        * layout-tests/editing/inserting/insert-div-009-expected.txt: Added.
        * layout-tests/editing/inserting/insert-div-009.html: Added.

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

17 years ago Reviewed by Harrison
kocienda [Mon, 6 Dec 2004 18:21:29 +0000 (18:21 +0000)]
    Reviewed by Harrison

        Fix for this bug:

        <rdar://problem/3906948> REGRESSION (Mail): Insert paragraph code can make the insertion point "stick" in place.

        * khtml/editing/htmlediting.cpp:
        (khtml::InsertParagraphSeparatorCommand::doApply): Call insertBlockPlaceholderIfNeeded(), passing block
        being added to this function. This ensures that the added block has a height.
        (khtml::InsertParagraphSeparatorInQuotedContentCommand::doApply): Ditto.

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

17 years ago Reviewed by Harrison
kocienda [Mon, 6 Dec 2004 18:21:21 +0000 (18:21 +0000)]
    Reviewed by Harrison

        Fix for this bug:

        <rdar://problem/3906930> Hitting return key in editable content inserts br elements instead of blocks

        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView insertNewline:]): One-line change to call insert-block rather than insert-br method
        on bridge.

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

17 years ago Reviewed by John
kocienda [Mon, 6 Dec 2004 17:39:44 +0000 (17:39 +0000)]
    Reviewed by John

        * khtml/dom/dom_string.cpp:
        (DOM::DOMString::substring): Expose method already on DOMStrimgImpl.
        * khtml/dom/dom_string.h: Ditto.
        * khtml/editing/htmlediting.cpp:
        (khtml::CompositeEditCommand::rebalanceWhitespace): New helper to create and execute a
        RebalanceWhitespaceCommand instance.
        (khtml::DeleteSelectionCommand::doApply): Call rebalanceWhitespace() after running command.
        (khtml::InsertLineBreakCommand::doApply): Ditto.
        (khtml::InsertParagraphSeparatorCommand::doApply): Ditto.
        (khtml::InsertParagraphSeparatorInQuotedContentCommand::doApply): Ditto.
        (khtml::InsertTextCommand::input): Ditto.
        (khtml::RebalanceWhitespaceCommand::RebalanceWhitespaceCommand): New command.
        (khtml::RebalanceWhitespaceCommand::~RebalanceWhitespaceCommand): Ditto.
        (khtml::RebalanceWhitespaceCommand::doApply): Ditto.
        (khtml::RebalanceWhitespaceCommand::doUnapply): Ditto.
        (khtml::RebalanceWhitespaceCommand::preservesTypingStyle): Ditto.
        (khtml::ReplaceSelectionCommand::completeHTMLReplacement): Ditto.
        * khtml/editing/htmlediting.h: Ditto.
        (khtml::RebalanceWhitespaceCommand::): Ditto.

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

17 years ago - fixed small problem in my check-in from yesterday
darin [Sun, 5 Dec 2004 20:40:25 +0000 (20:40 +0000)]
    - fixed small problem in my check-in from yesterday

        * kwq/KWQEvent.mm:
        (positionForEvent): Get location from event without raising exception if it's the wrong type.
        (clickCountForEvent): Same, for clickCount.
        (QMouseEvent::QMouseEvent): Use the new helper functions so this can be constructed even with
        the wrong type of NSEvent. Required for cases where a keyboard event causes a "click" and we need
        to synthesize a QMouseEvent for KHTML internal use, using the key down NSEvent.

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

17 years agoWebCore:
darin [Sat, 4 Dec 2004 22:31:12 +0000 (22:31 +0000)]

        Reviewed by John.

        - fixed <rdar://problem/3878329> REGRESSION (169-170): colors are wrong for my.yahoo.com due to CSS background parsing changes

        * khtml/css/cssparser.cpp: (CSSParser::parseBackgroundShorthand): Changed function so it doesn't rely on the position
        attribute being at the end of the array and then moved position attribute before color attribute so it takes precedence.
        Since "0" can be both the X coordinate of a position and a legal color (meaning black), we need to do position first.

        - fixed <rdar://problem/3760869> click events for input type=button or type=checkbox don't have flags like shiftKey set

        * khtml/rendering/render_form.h: Remove unused RenderFormElement fields.
        * khtml/rendering/render_form.cpp:
        (RenderFormElement::RenderFormElement): Take out code to set a bunch of unused fields.
        (RenderFormElement::slotClicked): Change to create the QMouseEvent from the actual mouse event rather than
        creating it with all the flags set to 0, using the new QMouseEvent constructor that does so.

        * kwq/KWQEvent.h: Added constructor that takes no parameters which uses the current event from AppKit.
        Made the click count getter const and added an isDoubleClick that matches the logic used elsewhere.
        Added a fixState helper method so the constructors can save code.
        * kwq/KWQEvent.mm:
        (QMouseEvent::QMouseEvent): Factored out the state-fixing code that was in the two existing constructors
        and added a third constructor that uses the "current event" from AppKit (used above).
        (QMouseEvent::fixState): Compute state and click count based on event type.

        - fixed first symptom of <rdar://problem/3830936> REGRESSION (125-165): crash due to null font family, hang at changeforamerica.com

        * kwq/KWQFontFamily.mm: (KWQFontFamily::getNSFamily): Handle empty strings specially so we don't run into trouble when
        the family name is a null string. This prevents the crash, but there are still other problems that may have the same
        underlying cause in CSS.

        - fixed <rdar://problem/3829808> Safari crashes when adding a DOM node that was removed from an XMLHTTP request result

        * khtml/html/html_baseimpl.cpp: (HTMLBodyElementImpl::insertedIntoDocument):
        Added nil check before calling scheduleRelayout. This is new code so the nil-dereference is a recent regression.


        Reviewed by John.

        - fixed <rdar://problem/3846079> assertion failure in WebHTMLView(WebPrivate) removeTrackingRect at boots.com
        - fixed <rdar://problem/3857737> REGRESSION (165-166): clicking in a text field that's scrolled to the right causes it to scroll all the way left
        - fixed <rdar://problem/3861952> REGRESSION (165-166): selection is cleared when you start to scroll a frame

        * WebView.subproj/WebHTMLViewInternal.h: Added handlingMouseDown flag.
        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView _addTrackingRect:owner:userData:assumeInside:useTrackingNum:]): Allow passing in a
        tracking number of 0, which means no existing tracking number.
        (-[WebHTMLView _addTrackingRects:owner:userDataList:assumeInsideList:trackingNums:count:]): Ditto.
        (-[WebHTMLView removeTrackingRect:]): Allow removing a tracking number of 0, which is a no-op.
        (-[WebHTMLView _removeTrackingRects:count:]): Ditto.
        (-[WebHTMLView acceptsFirstResponder]): Changed check to use handlingMouseDown flag instead of mouseDownEvent
        field since that field is set up too early in the mouse down event handling process.
        (-[WebHTMLView mouseDown:]): Added code to set handlingMouseDown flag.

        - fixed part of <rdar://problem/3829808> Safari crashes when adding a DOM node that was removed from an XMLHTTP request result

        * WebCoreSupport.subproj/WebBridge.m:
        (-[WebBridge syncLoadResourceWithURL:customHeaders:postData:finalURL:responseHeaders:statusCode:]):
        Changed code around so that it won't try to create a WebResource when the load fails.

        - moved next/previous links into private structure with the rest of WebFrame fields
          (We have a rule against putting new fields into obejcts that are part of our public API.)

        * WebView.subproj/WebFrame.h: Remove _nextSibling and _previousSibling.
        * WebView.subproj/WebFramePrivate.h: Added nextSibling and previousSibling fields to private class.
        * WebView.subproj/WebFrame.m: Got rid of some tabs in this file.
        (-[WebFrame _addChild:]): Changed code to use fields inside _private.
        (-[WebFrame _removeChild:]): Ditto.
        (-[WebFrame _nextFrameWithWrap:]): Ditto.
        (-[WebFrame _previousFrameWithWrap:]): Ditto.

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

17 years agoWebCore:
cblu [Sat, 4 Dec 2004 18:37:32 +0000 (18:37 +0000)]

New fixes for:
<rdar://problem/3685766> WebDataSource is missing subresources when they use cached WebCore data
<rdar://problem/3722434> REGRESSION?: Assertion failure trying to drag image in iframe (itapema.sc.gov.br)
<rdar://problem/3903173> REGRESSION (172-TOT): assertion failure and crash in slotAllData logging into hotmail account
<rdar://problem/3902749> REGRESSION (Tiger): missing image symbol does not appear

        Reviewed by darin, rjw, kocienda.

        * khtml/misc/loader.cpp:
        * khtml/misc/loader.h:
        * kwq/KWQKJobClasses.h:
        * kwq/KWQKJobClasses.mm:
        * kwq/KWQLoader.h:
        * kwq/KWQLoader.mm:
        * kwq/KWQPixmap.h:
        * kwq/KWQPixmap.mm:
        * kwq/KWQResourceLoader.mm:
        (-[KWQResourceLoader finishJobAndHandle:]):
        (-[KWQResourceLoader cancel]):
        (-[KWQResourceLoader reportError]):
        (-[KWQResourceLoader finishWithData:]):
        * kwq/KWQSignal.h:
        * kwq/KWQSignal.mm:
        * kwq/KWQSlot.h:
        * kwq/KWQSlot.mm:
        * kwq/WebCoreBridge.h:
        * kwq/WebCoreResourceLoader.h:


New fixes for:
<rdar://problem/3685766> WebDataSource is missing subresources when they use cached WebCore data
<rdar://problem/3722434> REGRESSION?: Assertion failure trying to drag image in iframe (itapema.sc.gov.br)
<rdar://problem/3903173> REGRESSION (172-TOT): assertion failure and crash in slotAllData logging into hotmail account
<rdar://problem/3902749> REGRESSION (Tiger): missing image symbol does not appear

        Reviewed by darin, rjw, kocienda.

        * WebCoreSupport.subproj/WebBridge.m:
        (-[WebBridge objectLoadedFromCacheWithURL:response:data:]):
        (-[WebBridge syncLoadResourceWithURL:customHeaders:postData:finalURL:responseHeaders:statusCode:]):
        * WebCoreSupport.subproj/WebSubresourceClient.m:
        (-[WebSubresourceClient didFinishLoading]):
        * WebView.subproj/WebFrame.m:
        (-[WebFrame _opened]):
        (-[WebFrame _internalLoadDelegate]):
        (-[WebFrame _sendResourceLoadDelegateMessagesForURL:response:length:]):
        * WebView.subproj/WebFrameInternal.h:

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