18 years ago Make sure the dominant line direction is properly set for RTL runs so that spaces...
hyatt [Fri, 5 Nov 2004 01:19:35 +0000 (01:19 +0000)]
Make sure the dominant line direction is properly set for RTL runs so that spaces will reverse.

Change xHeight to measure the ascent of the x glyph, since the xHeight metrics appear to be
totally bogus in both CG and AppKit.

        Reviewed by darin

        * WebCoreSupport.subproj/WebTextRenderer.m:
        (-[WebTextRenderer xHeight]):
        (-[WebTextRenderer _createATSUTextLayoutForRun:style:]):
        (-[WebTextRenderer _trapezoidForRun:style:atPoint:]):
        (-[WebTextRenderer _ATSU_drawHighlightForRun:style:geometry:]):
        (-[WebTextRenderer _ATSU_drawRun:style:geometry:]):
        (-[WebTextRenderer _ATSU_pointToOffset:style:position:reversed:includePartialGlyphs:]):

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

18 years ago Implement CSS3 support for multiple backgrounds. Also fix a bug with background...
hyatt [Fri, 5 Nov 2004 01:18:23 +0000 (01:18 +0000)]
Implement CSS3 support for multiple backgrounds.  Also fix a bug with background propagation so that it only
happens (from the <body> to the root) for HTML documents.  Fixed background-position to handle a mixture of
keyword and length values.

        Reviewed by darin

        * khtml/css/cssparser.cpp:
        * khtml/css/cssparser.h:
        * khtml/css/cssstyleselector.cpp:
        * khtml/css/cssstyleselector.h:
        * khtml/rendering/render_box.cpp:
        * khtml/rendering/render_box.h:
        * khtml/rendering/render_form.cpp:
        * khtml/rendering/render_line.cpp:
        * khtml/rendering/render_line.h:
        * khtml/rendering/render_object.cpp:
        * khtml/rendering/render_object.h:
        * khtml/rendering/render_style.cpp:
        * khtml/rendering/render_style.h:
        * khtml/rendering/render_table.cpp:

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

18 years ago Make sure the text decoder returns empty strings rather than null strings when the...
hyatt [Fri, 5 Nov 2004 00:32:01 +0000 (00:32 +0000)]
Make sure the text decoder returns empty strings rather than null strings when the utf8 char ptr is non-null.
Ensures that <a href=""> works with libxml (which returns data in utf-8 buffers).

        Reviewed by darin

        * kwq/KWQTextCodec.mm:

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

18 years ago Make sure line-height returns the correct value for normal.
hyatt [Fri, 5 Nov 2004 00:30:34 +0000 (00:30 +0000)]
Make sure line-height returns the correct value for normal.

        Reviewed by darin

        * khtml/css/css_computedstyle.cpp:

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

18 years agoDon't ignore results file since it's not here any more.
darin [Thu, 4 Nov 2004 21:07:27 +0000 (21:07 +0000)]
Don't ignore results file since it's not here any more.

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

18 years ago Reviewed by Ken Kocienda.
harrison [Thu, 4 Nov 2004 18:29:23 +0000 (18:29 +0000)]
    Reviewed by Ken Kocienda.

<rdar://problem/3857753> REGRESSION (Mail): Delete incorrectly causes text to take on new style

        * khtml/editing/htmlediting.cpp:
        (khtml::DeleteSelectionCommand::moveNodesAfterNode): Fixed to move entire source subtree (up
        to, but not including, the enclosingBlockFlowElement) rather than just the source element.
        Fixed to insert after the destination subtree, rather than the destination element.  Handles
        edge case of deleting back to the top of the tree, where there is nothing left to insert after.
        * khtml/xml/dom_nodeimpl.cpp:
        (NodeImpl::enclosingNonBlockFlowElement): New method to support moveNodesAfterNode changes.
        * khtml/xml/dom_nodeimpl.h: Declare NodeImpl::enclosingNonBlockFlowElement
        * layout-tests/editing/deleting/delete-3857753-fix-expected.txt: Added.
        * layout-tests/editing/deleting/delete-3857753-fix.html: Added.

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

18 years ago Reviewed by Ken.
darin [Thu, 4 Nov 2004 17:16:03 +0000 (17:16 +0000)]
    Reviewed by Ken.

        - fixed <rdar://problem/3865365> since -[WebScriptObject dealloc] does not call [super dealloc], the build will fail due to a warning
        - fixed behavior so that [[WebScriptObject alloc] initWithCoder:] doesn't leak WebUndefined instances
          and incidentally so that [[WebScriptObject alloc] init] returns the single shared instance rather
          than allocating a new one

        * bindings/objc/WebScriptObject.mm: Removed some stray semicolons.
        (+[WebUndefined allocWithZone:]): Made this the common bottleneck that returns the single instance
        of WebUndefined, since it's the single method that normally allocates new instances. Calls super to
        actually allocate only the very first time it's called.
        (-[WebUndefined initWithCoder:]): Simplified to just return self (no reason to re-lookup the single
        shared instance since there can be only one).
        (-[WebUndefined copyWithZone:]): Ditto.
        (-[WebUndefined retain]): Ditto.
        (-[WebUndefined retainCount]): Use UINT_MAX constant here (matches usage in NSObject.m for retain count
        of class).
        (-[WebUndefined autorelease]): Simplified to just return self (see above).
        (-[WebUndefined copy]): No need to override this since it just turns around and calls copyWithZone:.
        (-[WebUndefined dealloc]): Added an assertion since this method should never be called. Also added
        a call to [super dealloc] after return; to make the new -Wdealloc-check compiler happy (fixing the
        bug mentioned above).
        (+[WebUndefined undefined]): Reimplemented; calls allocWithZone:NULL to get to the shared instance.
        No need to call init, since that's a no-op for this class.

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

18 years ago Reviewed by Darin.
harrison [Thu, 4 Nov 2004 00:40:31 +0000 (00:40 +0000)]
    Reviewed by Darin.

        Eliminate the use of a marker file to determine how to build.

        * .cvsignore:
        * Makefile.am:

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

18 years ago Reviewed by me
kocienda [Wed, 3 Nov 2004 15:58:45 +0000 (15:58 +0000)]
    Reviewed by me

        More layout tests.

        * layout-tests/editing/deleting/delete-br-008-expected.txt: Added.
        * layout-tests/editing/deleting/delete-br-008.html: Added.
        * layout-tests/editing/deleting/delete-br-009-expected.txt: Added.
        * layout-tests/editing/deleting/delete-br-009.html: Added.
        * layout-tests/editing/deleting/delete-br-010-expected.txt: Added.
        * layout-tests/editing/deleting/delete-br-010.html: Added.

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

18 years ago Fix by Yasuo Kida, reviewed by me.
mjs [Wed, 3 Nov 2004 11:52:26 +0000 (11:52 +0000)]
    Fix by Yasuo Kida, reviewed by me.

<rdar://problem/3819004> REGRESSION (Mail): Can't move cursor / delete character after deleting the active input area

* kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::setMarkedTextRange): Treat a collapsed range the
same as a nil range - setting an empty marked range should clear
the marked range entirely.

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

18 years agoWebCore:
mjs [Wed, 3 Nov 2004 11:19:25 +0000 (11:19 +0000)]

        Reviewed by Dave Hyatt (when I originally coded it).

WebCore part of fix for:

<rdar://problem/3759187> REGRESSION (Mail): implement firstRectForCharacterRange:

        * kwq/WebCoreBridge.h:
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge firstRectForDOMRange:]): New method to compute the rect for a
DOMRange, or if the range is split into multiple lines, the rect for the part on
the first line only.

        * khtml/rendering/render_object.cpp:
        (RenderObject::caretRect): Added extraWidthToEndOfLine parameter and ditto
for the overrides below.
        * khtml/rendering/render_object.h:
        * khtml/rendering/render_box.cpp:
        * khtml/rendering/render_box.h:
        * khtml/rendering/render_br.cpp:
        * khtml/rendering/render_br.h:
        * khtml/rendering/render_flow.cpp:
        * khtml/rendering/render_flow.h:
        * khtml/rendering/render_text.cpp:


        Reviewed by Dave Hyatt (when I originally coded it).

        Redid WebKit part of fix for:

        <rdar://problem/3759187> REGRESSION (Mail): implement firstRectForCharacterRange:

        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView firstRectForCharacterRange:]): Call the appropriate new bridge method,
        and translate to screen coordinates.

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

18 years ago Reviewed by Hyatt.
sullivan [Wed, 3 Nov 2004 01:07:17 +0000 (01:07 +0000)]
    Reviewed by Hyatt.

        - [NSFont menuFontOfSize:], called from WebStringTruncator, was taking > 9% of the time creating a
        very large bookmarks menu, so I cached this one NSFont object.

        * Misc.subproj/WebStringTruncator.m:
        new function, caches the font used when no font is specified
        (+[WebStringTruncator centerTruncateString:toWidth:]):
        call new function

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

18 years agoWebCore:
kocienda [Tue, 2 Nov 2004 23:22:45 +0000 (23:22 +0000)]

        Reviewed by Hyatt

        Implemented command to insert a block in response to typing a return key (even though
        I am not turning that on by default with this patch....that will come later).

        This new command is called InsertParagraphSeparatorCommand.

        Reworked the command and function names associated with inserting content into a
        document. Before this patch, there were inputXXX and insertXXX variants, with the
        former used for more high-level actions and the latter used for lower-level stuff.
        However, this was confusing as the AppKit uses insertXXX for everything. This resulted
        in an insertXXX command going through an inputXXX WebCore step and then finally to an
        insertXXX WebCore step. To make this less confusing, I have changes all the names to
        be insertXXX, and modified the lower-level operations so that it is clear what they do.

        * khtml/editing/htmlediting.cpp:
        (khtml::EditCommandPtr::isInsertTextCommand): Name change.
        (khtml::EditCommand::isInsertTextCommand): Ditto.
        (khtml::CompositeEditCommand::inputText): Ditto.
        (khtml::CompositeEditCommand::insertTextIntoNode): Ditto.
        (khtml::CompositeEditCommand::deleteTextFromNode): Ditto.
        (khtml::CompositeEditCommand::replaceTextInNode): Ditto.
        (khtml::CompositeEditCommand::deleteInsignificantText): Name changes in implementation.
        (khtml::CompositeEditCommand::isLastVisiblePositionInNode): Ditto.
        (khtml::DeleteFromTextNodeCommand::DeleteFromTextNodeCommand): Class name change, was DeleteTextCommand.
        (khtml::DeleteFromTextNodeCommand::~DeleteFromTextNodeCommand): Ditto.
        (khtml::DeleteFromTextNodeCommand::doApply): Ditto.
        (khtml::DeleteFromTextNodeCommand::doUnapply): Ditto.
        (khtml::DeleteSelectionCommand::performGeneralDelete): Ditto.
        (khtml::DeleteSelectionCommand::fixupWhitespace): Ditto.
        (khtml::DeleteSelectionCommand::moveNodesAfterNode): Ditto.
        (khtml::InsertIntoTextNode::InsertIntoTextNode): Class name change.
        (khtml::InsertIntoTextNode::~InsertIntoTextNode): Ditto.
        (khtml::InsertIntoTextNode::doApply): Ditto.
        (khtml::InsertIntoTextNode::doUnapply): Ditto.
        (khtml::InsertLineBreakCommand::InsertLineBreakCommand): Class name change, was InsertNewlineCommand.
        (khtml::InsertNodeBeforeCommand::InsertNodeBeforeCommand): Code moved. No changes.
        (khtml::InsertNodeBeforeCommand::~InsertNodeBeforeCommand): Ditto.
        (khtml::InsertNodeBeforeCommand::doApply): Ditto.
        (khtml::InsertNodeBeforeCommand::doUnapply): Ditto.
        (khtml::InsertParagraphSeparatorCommand::InsertParagraphSeparatorCommand): New command.
        Class name change, was InsertNewlineCommandInQuotedContentCommand.
        (khtml::InsertParagraphSeparatorInQuotedContentCommand::~InsertParagraphSeparatorInQuotedContentCommand): Ditto.
        (khtml::InsertParagraphSeparatorInQuotedContentCommand::isMailBlockquote): Ditto.
        (khtml::InsertParagraphSeparatorInQuotedContentCommand::doApply): Ditto.
        (khtml::InsertTextCommand::InsertTextCommand): Class name change, was InputTextCommand.
        (khtml::InsertTextCommand::doApply): Ditto.
        (khtml::InsertTextCommand::deleteCharacter): Ditto.
        (khtml::InsertTextCommand::prepareForTextInsertion): Ditto.
        (khtml::InsertTextCommand::input): Ditto.
        (khtml::InsertTextCommand::insertSpace): Ditto.
        (khtml::InsertTextCommand::isInsertTextCommand): Ditto.
        (khtml::TypingCommand::insertLineBreak): Name change, was insertNewline.
        (khtml::TypingCommand::insertParagraphSeparatorInQuotedContent): Name change, was insertNewlineInQuotedContent.
        (khtml::TypingCommand::insertParagraphSeparator): New function.
        (khtml::TypingCommand::doApply): Name changes, as above.
        (khtml::TypingCommand::insertText): Ditto.
        (khtml::TypingCommand::deleteKeyPressed): Ditto.
        (khtml::TypingCommand::preservesTypingStyle): Ditto.
        * khtml/editing/htmlediting.h:
        (khtml::DeleteFromTextNodeCommand::node): Name change.
        (khtml::DeleteFromTextNodeCommand::offset): Ditto.
        (khtml::DeleteFromTextNodeCommand::count): Ditto.
        (khtml::InsertIntoTextNode::text): Ditto.
        (khtml::InsertNodeBeforeCommand::insertChild): Ditto.
        (khtml::InsertNodeBeforeCommand::refChild): Ditto.
        (khtml::TypingCommand::): Ditto.
        * khtml/editing/jsediting.cpp: Name changes, as above.
        * kwq/WebCoreBridge.h:
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge insertLineBreak]): Name change, was insertNewline.
        (-[WebCoreBridge insertParagraphSeparator]): New function.
        (-[WebCoreBridge insertParagraphSeparatorInQuotedContent]): Name change, was insertNewlineInQuotedContent.


        Reviewed by Hyatt

        WebCore now implements a command to insert a block in response to typing a return key, and
        some names were improved in the course of this work.

        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView insertNewline:]): Now calls insertLineBreak on bridge object.
        (-[WebHTMLView insertLineBreak:]): New method.
        (-[WebHTMLView insertParagraphSeparator:]): Now implemented.
        * WebView.subproj/WebView.m:

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

18 years ago Fixed <rdar://problem/3861469> Latest Real player crashes Safari on some...
rjw [Mon, 1 Nov 2004 23:46:31 +0000 (23:46 +0000)]
    Fixed <rdar://problem/3861469> Latest Real player crashes Safari on some sites.

        Reviewed by Ken.

        * bindings/c/c_instance.cpp:
        Initialize out parameters to void type.

        * bindings/c/c_runtime.cpp:
        Initialize out parameters to void type.
        Also added additional checks to protect against classes that
        don't implement all functions.

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

18 years ago Fixed <rdar://problem/3861257> WebUndefined should be returned for undefined...
rjw [Mon, 1 Nov 2004 22:33:14 +0000 (22:33 +0000)]
    Fixed <rdar://problem/3861257> WebUndefined should be returned for undefined values

        Reviewed by John.

        * ChangeLog:
        * bindings/objc/WebScriptObject.mm:
        (+[WebScriptObject _convertValueToObjcValue:KJS::root:Bindings::]):
Added additional conversion Undefined -> WebUndefined.
        * bindings/objc/objc_utility.mm:
Added additional conversion WebUndefined -> Undefined.

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

18 years ago Reviewed by rjw.
kdecker [Mon, 1 Nov 2004 22:20:58 +0000 (22:20 +0000)]
    Reviewed by rjw.

fixed <rdar://problem/3681094> Crash in KJS::WindowFunc::tryCall with application/xhtml+xml Content-Type
once and for all.

        * khtml/ecma/kjs_window.cpp:
        (WindowFunc::tryCall): Added a nil check in the case of an empty document lacking a baseURL().

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

18 years ago - fixed <rdar://problem/3855573> Remove reference to "WebScriptMethods" from...
darin [Mon, 1 Nov 2004 21:23:14 +0000 (21:23 +0000)]
    - fixed <rdar://problem/3855573> Remove reference to "WebScriptMethods" from WebScriptObject.h comments

        * bindings/objc/WebScriptObject.h: Removed unneeded #ifdef protection for multiple includes (since
        this is an Objective-C header and we use #import for those). Fixed comments as requested in the bug
        report to match the contents of the file.

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

18 years ago Reviewed by Hyatt.
darin [Mon, 1 Nov 2004 19:21:24 +0000 (19:21 +0000)]
    Reviewed by Hyatt.

        - fixed <rdar://problem/3859381> REGRESSION (167-168): text in form fields should not use body's text color

        * khtml/css/html4.css: Use color: initial for textarea and related ones.

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

18 years ago Reviewed by John
kocienda [Mon, 1 Nov 2004 17:56:33 +0000 (17:56 +0000)]
    Reviewed by John

        Fix for this bug:

        <rdar://problem/3775920> REGRESSION (Mail): Centering doesn't work in HTML mail

        * khtml/css/css_computedstyle.cpp:
        (DOM::CSSComputedStyleDeclarationImpl::copyInheritableProperties): Factor out the
        implementation here into new copyPropertiesInSet helper. This now calls the
        generalized copyPropertiesInSet function with the arguments needed to make copying
        inheritable work.
        * khtml/css/css_computedstyle.h:
        * khtml/css/css_valueimpl.cpp:
        (CSSStyleDeclarationImpl::diff): Move this function here from css_computedstyle.cpp.
        In order to do apply block properties, "regular" style declarations need to do style
        diffs as well.
        (CSSStyleDeclarationImpl::copyBlockProperties): New helper. Just like copyInheritableProperties
        except that it uses a different set of properties that apply only to blocks.
        (CSSStyleDeclarationImpl::copyPropertiesInSet): New helper that looks at a style declaration
        and copies out those properties listed in a pre-defined set.
        * khtml/css/css_valueimpl.h:
        * khtml/editing/htmlediting.cpp:
        (khtml::StyleChange::StyleChange): Modified to work with style changes that apply to a whole
        block, factoring out some of the special case code that should now only run in the inline case.
        (khtml::StyleChange::init): Factored out the code that now is in checkForLegacyHTMLStyleChange.
        (khtml::StyleChange::checkForLegacyHTMLStyleChange): New helper for case where we want
        special handling for "legacy" HTML styles like <B> and <I>.
        (khtml::ApplyStyleCommand::doApply): Much refactoring in this class to divide up the work of
        style changes into different kinds. CSS specifies certain properties only apply to certain
        element types. This set of changes now recognizes two such separate cases: styles that apply
        to blocks, and styles that apply to inlines.
        (khtml::ApplyStyleCommand::applyBlockStyle): New function to handle apply styles to whole blocks.
        (khtml::ApplyStyleCommand::applyInlineStyle): New function to handle apply styles to inlines.
        (khtml::ApplyStyleCommand::isHTMLStyleNode): Is now passed a CSSStyleDeclarationImpl to work
        with rather than working on the CSSStyleDeclarationImpl member variable of the class. This is
        done so that the function can be passed a portion of the styles being applied so that block styles
        and inline styles can be handled separately.
        (khtml::ApplyStyleCommand::removeCSSStyle): Ditto.
        (khtml::ApplyStyleCommand::removeBlockStyle): New function to handle removing styles from whole blocks.
        (khtml::ApplyStyleCommand::removeInlineStyle): New function to removing styles from inlines.
        (khtml::ApplyStyleCommand::addBlockStyleIfNeeded): New function to handle applying style to whole blocks.
        (khtml::ApplyStyleCommand::addInlineStyleIfNeeded): New function to handle applying style to inlines.
        * khtml/editing/htmlediting.h:
        (khtml::StyleChange::): Changed as described above.
        (khtml::EditCommand::setEndingSelectionNeedsLayout): New function to that tells the ending selection
        it needs to layout, even though it has not changed position in the DOM. For instance, this is needed
        when text align changes.
        * khtml/khtml_part.cpp:
        (KHTMLPart::setTypingStyle): Put in an early bail-out in the case where the current style matches
        the passed-in argument.
        (KHTMLPart::applyStyle): Modify this function so that block styles are applied when the selection
        is a caret. Formerly, this just set typing style and made no visible changes to the document.

        New tests.

        * layout-tests/editing/editing.js: Added some glue to change text align.
        * layout-tests/editing/style/block-style-001-expected.txt: Added.
        * layout-tests/editing/style/block-style-001.html: Added.
        * layout-tests/editing/style/block-style-002-expected.txt: Added.
        * layout-tests/editing/style/block-style-002.html: Added.
        * layout-tests/editing/style/block-style-003-expected.txt: Added.
        * layout-tests/editing/style/block-style-003.html: Added.

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

18 years agoversioning for TOT, Safari 2.0 (170u)
vicki [Fri, 29 Oct 2004 23:51:55 +0000 (23:51 +0000)]
versioning for TOT, Safari 2.0 (170u)

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

18 years agoSafari-169 stamp
vicki [Fri, 29 Oct 2004 23:42:16 +0000 (23:42 +0000)]
Safari-169 stamp

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

18 years ago Reviewed by NOBODY (OOPS!).
darin [Fri, 29 Oct 2004 21:53:52 +0000 (21:53 +0000)]
    Reviewed by NOBODY (OOPS!).

        - fixed <rdar://problem/3751619> Safari crash in khtml::CircularSearchBuffer::append(QChar const&)

        * khtml/editing/visible_text.cpp: (khtml::findPlainText): Fix exit condition to check for break
        before advancing one character; before it did it backwards.

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

18 years ago Fixed: <rdar://problem/3853262> REGRESSION(166-168) gmail gets blank page when loading
cblu [Fri, 29 Oct 2004 21:48:55 +0000 (21:48 +0000)]
Fixed: <rdar://problem/3853262> REGRESSION(166-168) gmail gets blank page when loading

        Reviewed by kocienda, adele.

        * khtml/rendering/render_frames.cpp:
        (RenderPartObject::updateWidget): remove infinite frame recursion check for iframes

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

18 years ago * WebKit.exp: added _WebPlugInModeKey, forgot to add it earlier
cblu [Fri, 29 Oct 2004 20:16:58 +0000 (20:16 +0000)]
    * WebKit.exp: added _WebPlugInModeKey, forgot to add it earlier

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

18 years ago Reviewed by Chris.
darin [Fri, 29 Oct 2004 18:59:39 +0000 (18:59 +0000)]
    Reviewed by Chris.

        - fixed <rdar://problem/3857395> clicking on calendar in Apple Travel site crashes Safari in invalidateClick (getthere.net)

        * khtml/khtmlview.cpp:
        (KHTMLView::viewportMousePressEvent): Use a SharedPtr<KHTMLView> to make sure the KHTMLView is not
        deleted before this function finishes running.
        (KHTMLView::viewportMouseDoubleClickEvent): Ditto.
        (KHTMLView::viewportMouseReleaseEvent): Ditto.
        (KHTMLView::dispatchMouseEvent): Removed ref/deref pairs that aren't needed since dispatchEvent
        is guaranteed to do ref/deref as needed.

        * kwq/KWQObject.mm: (QObject::startTimer): Fixed a comment.

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

18 years ago - fixed <rdar://problem/3855573> Remove reference to "WebScriptMethods" from...
darin [Fri, 29 Oct 2004 18:11:20 +0000 (18:11 +0000)]
    - fixed <rdar://problem/3855573> Remove reference to "WebScriptMethods" from WebScriptObject.h comments

        * Plugins.subproj/WebScriptObject.h: Removed unneeded #ifdef protection for multiple includes (since
        this is an Objective-C header and we use #import for those). Fixed comments as requested in the bug
        report to match the contents of the file.

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

18 years ago Enabled XSLT on Panther. See intrigue mail for compiling instructions.
cblu [Thu, 28 Oct 2004 23:14:40 +0000 (23:14 +0000)]
Enabled XSLT on Panther. See intrigue mail for compiling instructions.

        Reviewed by darin.

        * WebCore.pbproj/project.pbxproj: link against xslt unconditionally, link against specific version of libxml on Panther
        * WebCorePrefix.h: always use XSLT

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

18 years ago Reviewed by Chris
kocienda [Thu, 28 Oct 2004 22:35:00 +0000 (22:35 +0000)]
    Reviewed by Chris

        Fix for these bugs:

        <rdar://problem/3854848> Tiger Mail Crash in WebCore - khtml::CompositeEditCommand::insertNodeAfter
        <rdar://problem/3803832> REGRESSION (Mail): incorrect behavior after Return + Delete in quoted text

        * khtml/editing/htmlediting.cpp:
        (khtml::DeleteSelectionCommand::DeleteSelectionCommand): Added node pointer class members
        to initialization list, zeroing them out.
        (khtml::DeleteSelectionCommand::canPerformSpecialCaseBRDelete): New special-case helper to
        handle a delete of content in special cases where the only thing selected is a BR. This
        code path is much simpler than the newly-named performGeneralDelete, and detects when no
        content merging should be done between blocks. This aspect of the change fixes 3854848.
        One of the special cases added fixes 3803832.
        (khtml::DeleteSelectionCommand::performGeneralDelete): Renamed, from performDelete.
        (khtml::DeleteSelectionCommand::moveNodesAfterNode): Made this helper be a no-arg function, just
        like the other helpers in this class.
        (khtml::DeleteSelectionCommand::clearTransientState): Fix cut and paste error in deref code.
        (khtml::DeleteSelectionCommand::doApply): Updated for changed helpers.
        * khtml/editing/htmlediting.h: Added new helper and changed an old one.

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

18 years ago Fixed: <rdar://problem/3856913> Panther-only crash in QString code copying front...
cblu [Thu, 28 Oct 2004 22:05:35 +0000 (22:05 +0000)]
Fixed: <rdar://problem/3856913> Panther-only crash in QString code copying front page of store.apple.com

        Reviewed by darin.

        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::attributedString): check that the renderer is a list item before making list item calls on it

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

18 years ago Reviewed by Harrison
kocienda [Thu, 28 Oct 2004 20:07:47 +0000 (20:07 +0000)]
    Reviewed by Harrison

        Reorganization of delete command functionality so that doApply is not
        several hundred lines long. This is not a squeaky-clean cleanup, but
        it is a step in the right direction. No functionality changes.

        * khtml/editing/htmlediting.cpp:
        (khtml::DeleteSelectionCommand::initializePositionData): New helper.
        (khtml::DeleteSelectionCommand::saveTypingStyleState): Ditto.
        (khtml::DeleteSelectionCommand::performDelete): Ditto.
        (khtml::DeleteSelectionCommand::fixupWhitespace): Ditto.
        (khtml::DeleteSelectionCommand::moveNodesAfterNode): Ditto.
        (khtml::DeleteSelectionCommand::calculateEndingPosition): Ditto.
        (khtml::DeleteSelectionCommand::calculateTypingStyleAfterDelete): Ditto.
        (khtml::DeleteSelectionCommand::clearTransientState): Ditto.
        (khtml::DeleteSelectionCommand::doApply): Factor out code into new helpers.
        * khtml/editing/htmlediting.h:

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

18 years ago Reviewed by me
kocienda [Thu, 28 Oct 2004 16:38:52 +0000 (16:38 +0000)]
    Reviewed by me

        * khtml/editing/htmlediting.cpp:
        (khtml::DeleteSelectionCommand::DeleteSelectionCommand): Typo in initializer caused
        new mergeBlocksAfterDelete flag to be set improperly, causing layout regressions.

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

18 years agoWebCore:
kocienda [Wed, 27 Oct 2004 22:41:14 +0000 (22:41 +0000)]

        Reviewed by Chris

        * khtml/editing/htmlediting.cpp:
        (khtml::CompositeEditCommand::deleteSelection): Added new mergeBlocksAfterDelete flag to control
        whether content not in the block containing the start of the selection is moved to that block
        after the selection is deleted.
        (khtml::DeleteSelectionCommand::DeleteSelectionCommand): Ditto.
        (khtml::DeleteSelectionCommand::doApply): Ditto.
        (khtml::InputNewlineInQuotedContentCommand::InputNewlineInQuotedContentCommand): New command
        to handle the case of inserting a newline when in quoted content in Mail.
        (khtml::InputNewlineInQuotedContentCommand::~InputNewlineInQuotedContentCommand): Ditto.
        (khtml::InputNewlineInQuotedContentCommand::isMailBlockquote): Ditto.
        (khtml::InputNewlineInQuotedContentCommand::isLastVisiblePositionInBlockquote): Ditto.
        (khtml::InputNewlineInQuotedContentCommand::doApply): Ditto.
        (khtml::TypingCommand::insertNewlineInQuotedContent): Support for new newline command.
        (khtml::TypingCommand::doApply): Ditto.
        (khtml::TypingCommand::preservesTypingStyle): Ditto.
        * khtml/editing/htmlediting.h: Add new delclarations.
        (khtml::TypingCommand::): Ditto.
        * kwq/WebCoreBridge.h: Added new bridge method called from WebKit.
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge insertNewlineInQuotedContent]): Ditto.


        Reviewed by Chris

        Added new SPI for Mail so it can get the behavior it needs when the user hits
        the return key with the selection in quoted content.

        * WebView.subproj/WebView.m
        * WebView.subproj/WebViewPrivate.h

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

18 years ago Fixed: <rdar://problem/3774243> page up/down, arrow up/down, etc in Safari RSS shoul...
cblu [Tue, 26 Oct 2004 22:13:02 +0000 (22:13 +0000)]
Fixed: <rdar://problem/3774243> page up/down, arrow up/down, etc in Safari RSS should scroll main content

        Reviewed by dave.

        * khtml/ecma/kjs_dom.cpp:
        (DOMElementProtoFunc::tryCall): added scrollByLines and scrollByPages to HTML element for Safari RSS
        * khtml/ecma/kjs_dom.h:
        * khtml/ecma/kjs_dom.lut.h:

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

18 years ago Fix for 3848214, deleting a partial word left a repaint artifact if the partial...
hyatt [Tue, 26 Oct 2004 21:08:41 +0000 (21:08 +0000)]
Fix for 3848214, deleting a partial word left a repaint artifact if the partial word was pulled back onto
the previous line.

        Reviewed by kocienda

        * khtml/rendering/bidi.cpp:

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

18 years ago Convert selectionRect() from using a list to a dict and patch it to be like setSelec...
hyatt [Tue, 26 Oct 2004 20:15:08 +0000 (20:15 +0000)]
Convert selectionRect() from using a list to a dict and patch it to be like setSelection.  It was still trying
to use the old dirty bit optimization (which had been removed), and so it was pathologically slow on large documents.

        Reviewed by kocienda

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

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

18 years ago Reviewed by Hyatt
kocienda [Tue, 26 Oct 2004 19:57:55 +0000 (19:57 +0000)]
    Reviewed by Hyatt

        Fix for this bug::

        <rdar://problem/3851164> mail crashed when I pasted a large amount of text into a reply

        * khtml/editing/htmlediting.cpp:
        (khtml::CompositeEditCommand::removeBlockPlaceholderIfNeeded): This now returns bool to
        let the caller know if a placeholder was removed.
        (khtml::ReplaceSelectionCommand::doApply): Use the bool return value from the call to
        removeBlockPlaceholderIfNeeded. If true, shift the selection to the now-empty block. In
        some cases, the selection was still set on the removed BR, and this was the cause of the
        * khtml/editing/htmlediting.h: Change removeBlockPlaceholderIfNeeded return type.

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

18 years ago Reviewed by Chris.
darin [Tue, 26 Oct 2004 18:26:50 +0000 (18:26 +0000)]
    Reviewed by Chris.

        - fixed <rdar://problem/3851301> leak of one NSCFDictionary for each XMLHttpRequest issued

        * kwq/KWQLoader.mm: (KWQServeSynchronousRequest): Add a release.

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

18 years ago Fixed exception that Darin encountered in Mail.
cblu [Tue, 26 Oct 2004 17:40:12 +0000 (17:40 +0000)]
Fixed exception that Darin encountered in Mail.

        Reviewed by darin.

        * Plugins.subproj/WebPluginController.m:
        (+[WebPluginController plugInViewWithArguments:fromPluginPackage:]): if the plug-in returns a nil view, return nil

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

18 years ago Reviewed by John
kocienda [Tue, 26 Oct 2004 17:08:42 +0000 (17:08 +0000)]
    Reviewed by John

        * khtml/editing/htmlediting.cpp:
        (khtml::CompositeEditCommand::deleteInsignificantText): Do not call replaceText
        with a zero-length string. That triggers an assert. Call deleteText instead,
        using the same indices that are passed to replaceText.

        Cleaned up the asserts in these three functions below, making them
        more consistent. This is not needed for the fix, but I tripped over
        these in the course of debugging.


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

18 years ago * khtml/xml/dom_docimpl.cpp: (DocumentImpl::inDesignMode): made inDesignMode...
adele [Tue, 26 Oct 2004 00:46:58 +0000 (00:46 +0000)]
    * khtml/xml/dom_docimpl.cpp: (DocumentImpl::inDesignMode): made inDesignMode const
        * khtml/xml/dom_docimpl.h:

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

18 years ago Darin made an internal notification have the Web prefix.
cblu [Mon, 25 Oct 2004 23:42:06 +0000 (23:42 +0000)]
Darin made an internal notification have the Web prefix.

        Reviewed by me.

        * Plugins.subproj/WebBaseNetscapePluginView.m:
        (-[WebBaseNetscapePluginView addWindowObservers]):
        (-[WebBaseNetscapePluginView removeWindowObservers]):

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

18 years ago Reviewed by me, code change by Darin.
adele [Mon, 25 Oct 2004 23:02:01 +0000 (23:02 +0000)]
    Reviewed by me, code change by Darin.

        * khtml/xml/dom_docimpl.cpp: Moved design mode code outside the XSLT ifdef.

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

18 years ago Reviewed by me
kocienda [Mon, 25 Oct 2004 22:05:19 +0000 (22:05 +0000)]
    Reviewed by me

        Oops. These two test results changed with my last checkin, for the better.

        * layout-tests/editing/deleting/delete-3800834-fix-expected.txt
        * layout-tests/editing/inserting/insert-3775316-fix-expected.txt

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

18 years ago Reviewed by Chris
kocienda [Mon, 25 Oct 2004 21:52:20 +0000 (21:52 +0000)]
    Reviewed by Chris

        Fix for this bug:

        <rdar://problem/3820349> REGRESSION (Mail): select all, delete does not always delete everything

        * khtml/editing/htmlediting.cpp:
        (khtml::DeleteSelectionCommand::startPositionForDelete): New helper that determines when to
        expand the selection outwards when the selection is on the visible boundary of a root
        editable element. This fixes the bug. Note that this function also contains a little code
        I factored out of doApply: it also takes care of adjusting the selection in the smart delete case.
        (khtml::DeleteSelectionCommand::endPositionForDelete): Ditto.
        (khtml::DeleteSelectionCommand::doApply): Call new helpers. Refactored out the code as described.
        * khtml/editing/htmlediting.h: Declare new helpers.
        * layout-tests/editing/deleting/delete-select-all-001-expected.txt: Added.
        * layout-tests/editing/deleting/delete-select-all-001.html: Added.
        * layout-tests/editing/deleting/delete-select-all-002-expected.txt: Added.
        * layout-tests/editing/deleting/delete-select-all-002.html: Added.
        * layout-tests/editing/deleting/delete-select-all-003-expected.txt: Added.
        * layout-tests/editing/deleting/delete-select-all-003.html: Added.

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

18 years ago Reviewed by me
kocienda [Mon, 25 Oct 2004 18:49:50 +0000 (18:49 +0000)]
    Reviewed by me

        Added some more editing layout tests.

        * layout-tests/editing/deleting/delete-ws-fixup-001-expected.txt: Added.
        * layout-tests/editing/deleting/delete-ws-fixup-001.html: Added.
        * layout-tests/editing/deleting/delete-ws-fixup-002-expected.txt: Added.
        * layout-tests/editing/deleting/delete-ws-fixup-002.html: Added.
        * layout-tests/editing/deleting/delete-ws-fixup-003-expected.txt: Added.
        * layout-tests/editing/deleting/delete-ws-fixup-003.html: Added.
        * layout-tests/editing/deleting/delete-ws-fixup-004-expected.txt: Added.
        * layout-tests/editing/deleting/delete-ws-fixup-004.html: Added.
        * layout-tests/editing/inserting/typing-003-expected.txt: Added.
        * layout-tests/editing/inserting/typing-003.html: Added.

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

18 years ago Reviewed by John
kocienda [Mon, 25 Oct 2004 18:48:44 +0000 (18:48 +0000)]
    Reviewed by John

        * khtml/rendering/bidi.cpp:
        (khtml::RenderBlock::findNextLineBreak): I did not get my fix for 3848343 and 3848224
    yesterday quite right: words that should have been placed on the next line were instead
        appearing on the line before, beyond the right margin. This was a one-word only error
        based on moving the line break object when it should have stayed put. Here is the rule:
        The line break object only moves to after the whitespace on the end of a line if that
        whitespace caused line overflow when its width is added in.

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

18 years ago Reviewed by Darin.
adele [Mon, 25 Oct 2004 18:26:01 +0000 (18:26 +0000)]
    Reviewed by Darin.

        Fix for <rdar://problem/3619890> Feature request: designMode

        This change implements the designMode property of a document.  This is an IE property that is also supported by Mozilla.
        This will enable more JS editing compatibility.

        * khtml/ecma/kjs_html.cpp:
        (KJS::HTMLDocument::tryGet): added case for designMode
        (KJS::HTMLDocument::putValue): added case for designMode
        * khtml/ecma/kjs_html.lut.h: (KJS::): regenerated
        * khtml/khtml_part.cpp: (KHTMLPart::isContentEditable): Now returns designMode value
        * khtml/xml/dom_docimpl.cpp:
        (DocumentImpl::DocumentImpl): initialize m_designMode member variable
        (DocumentImpl::setDesignMode): added function to assign m_designMode value
        (DocumentImpl::getDesignMode): return m_designMode value
        (DocumentImpl::inDesignMode): if designMode is inherited, this will find the appropriate parent document designMode and return that value.
            Otherwise, it will just return the m_designMode value.
        * khtml/xml/dom_docimpl.h: (DOM::DocumentImpl::): added InheritedBool enum, prototypes, and m_designMode member variable.
        * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::isContentEditable): added check for isContentEditable function in KHTMLPart

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

18 years agoWebKit:
sullivan [Mon, 25 Oct 2004 17:52:07 +0000 (17:52 +0000)]

        Reviewed by Chris.

        - Cleanup from fix for <rdar://problem/3851676> bookmarks should not hold onto a WebHistoryItem object;
          eliminated notificationsSuppressed mechanism, which was used only by WebBookmark

        * History.subproj/WebHistoryItem.m:
        removed notificationsSuppressed ivar from private data object
        (-[WebHistoryItem setAlternateTitle:]):
        remove notificationsSuppressed guard
        (-[WebHistoryItem setURLString:]):
        (-[WebHistoryItem setOriginalURLString:]):
        (-[WebHistoryItem setTitle:]):
        (-[WebHistoryItem _setLastVisitedTimeInterval:]):
        (-[WebHistoryItem setNotificationsSuppressed:]):
        removed this method
        (-[WebHistoryItem notificationsSuppressed]):

        * History.subproj/WebHistoryItemPrivate.h:
        removed notificationsSuppressed and setNotificationsSuppressed


        Reviewed by Chris.

        - fixed these bugs:
        <rdar://problem/3851676> bookmarks should not hold onto a WebHistoryItem object
        <rdar://problem/3852373> Could eliminate -[WebBookmark lastVisitedTimeInterval] for performance

        This reduced RPRVT after launch with the standard set of built-in bookmarks on my machine from
        4.12M to 4.09M, and sped up reading bookmarks a little also.

        * BrowserWebBookmarkExtras.m:
        (-[WebBookmark _goToWithWindowPolicy:]):
        Don't set lastVisitedTimeInterval here

        * URLCompletionController.m:
        (-[URLCompletionController _addStatsForURL:]):
        Added comment to this #defined-away method explaining that it wouldn't work as-is anymore
        since it calls the obsolete setLastVisitedTimeInterval

        * WebBookmark.h:
        remove lastVisitedTimeInterval and setLastVisitedTimeInterval

        * WebBookmark.m:
        removed _URL, setLastVisitedTimeInterval, and lastVisitedTimeInterval

        * WebBookmarkExporter.m:
        (-[WebBookmarkExporter stringForBookmarkLeaf:withIndentLevel:]):
        Don't export last visited time anymore

        * WebBookmarkGroup.m:
        (-[WebBookmarkGroup _addBookmarkToURLStringDictionary:]):
        use [bookmark URLString] instead of [bookmark _URL]. The latter was getting the URL from its
        WebHistoryItem, which no longer exists.

        * WebBookmarkLeaf.h:
        remove _entry ivar, add _title ivar
        * WebBookmarkLeaf.m:
        (-[WebBookmarkLeaf init]):
        removed this method, which set up _entry
        (-[WebBookmarkLeaf initWithURLString:title:group:]):
        weaned from _entry, also calls setURLString instead of setting the ivar directly to
        ensure that the WebIconDatabase is updated properly
        (-[WebBookmarkLeaf initFromDictionaryRepresentation:topLevelOnly:withGroup:]):
        (-[WebBookmarkLeaf dictionaryRepresentation]):
        weaned from _entry
        (-[WebBookmarkLeaf dealloc]):
        calls setURLString instead of setting the ivar directly to ensure that the WebIconDatabase
        is updated properly
        (-[WebBookmarkLeaf copyWithZone:]):
        (-[WebBookmarkLeaf title]):
        weaned from _entry
        (-[WebBookmarkLeaf setTitle:]):
        (-[WebBookmarkLeaf icon]):
        (-[WebBookmarkLeaf URLString]):
        (-[WebBookmarkLeaf setURLString:]):
        ditto, also updates WebIconDatabase
        (-[WebBookmarkLeaf setLastVisitedTimeInterval:]):
        removed this method
        (-[WebBookmarkLeaf lastVisitedTimeInterval]):
        (-[WebBookmarkLeaf _computeIsRSSBookmark]):
        use isSyndicationURLString on a string instead of isSyndicationURL on a URL

        * WebBookmarkPrivate.h:
        removed _URL method

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

18 years ago Fixed: <rdar://problem/3851491> installedPlugins being called for a page without...
cblu [Sat, 23 Oct 2004 00:19:49 +0000 (00:19 +0000)]
Fixed: <rdar://problem/3851491> installedPlugins being called for a page without plugins

        Reviewed by mjs.

        * WebView.subproj/WebFrameView.m:
        (+[WebFrameView _canShowMIMETypeAsHTML:]): call _viewTypesAllowImageTypeOmission instead of using ivar since the ivar is nil until _viewTypesAllowImageTypeOmission is called, this was causing [WebView canShowMIMEType:] to check plug-ins

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

18 years ago Reviewed by Hyatt
kocienda [Fri, 22 Oct 2004 22:26:12 +0000 (22:26 +0000)]
    Reviewed by Hyatt

        Fix for this bug:

        <rdar://problem/3844662> REGRESSION (Mail): Style changes can affect adjacent, unselected text

        * khtml/editing/htmlediting.cpp:
        (khtml::ApplyStyleCommand::doApply): Move end position downstream to be sure we remove style from
        everything that could be affected.
        (khtml::ApplyStyleCommand::removeCSSStyle): Comma in intended function call was outside the
        braces, making it act as a comma operator, with a zero value as the right value!!! This made
        an important check always fail!!! It turns out that we do not want the constant at all, since
        that constant is only needed when checking a computed style, not an inline style as is being
        done here.
        (khtml::ApplyStyleCommand::removeStyle): Call nodeFullySelected with new interface.
        (khtml::ApplyStyleCommand::nodeFullySelected): Change interface and implementation to rely on
        RangeImpl::compareBoundaryPoints to perform the required check.
        * khtml/editing/htmlediting.h: Changed nodeFullySelected function interface.

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

18 years ago Reviewed by Hyatt
kocienda [Fri, 22 Oct 2004 20:07:05 +0000 (20:07 +0000)]
    Reviewed by Hyatt

        Fix for this bugs:

        <rdar://problem/3848343> REGRESSION (Mail, 166-168u): Typed text after space at end of line before block quote does not appear
        <rdar://problem/3848224> REGRESSION (Mail): space typed at end of line vanishes after typing next character

        * khtml/rendering/bidi.cpp:
        (khtml::RenderBlock::findNextLineBreak): When the khtmlLineBreak is in AFTER_WHITE_SPACE mode, as
        it is when we are editing, add in the space of the current character when calculating the width
        of committed plus uncommitted characters. If this value exceeds the width of the line, move up
        the line break object and call skipWhitespace to move past the end of the whitespace.

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

18 years agoversioning for TOT. the tree is open!
vicki [Fri, 22 Oct 2004 19:14:15 +0000 (19:14 +0000)]
versioning for TOT.  the tree is open!

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

18 years agoSafari-168 stamp
vicki [Fri, 22 Oct 2004 19:04:54 +0000 (19:04 +0000)]
Safari-168 stamp

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

18 years agoJavaScriptCore:
kocienda [Fri, 22 Oct 2004 16:20:36 +0000 (16:20 +0000)]

        Reviewed by me

        * JavaScriptCore.pbproj/project.pbxproj:


        Reviewed by me

        * WebCore.pbproj/project.pbxproj:


        Reviewed by me

        * WebKit.pbproj/project.pbxproj: Add GCC_ENABLE_OBJC_GC and GCC_FAST_OBJC_DISPATCH flags.

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

18 years ago Reviewed by darin
hyatt [Fri, 22 Oct 2004 01:08:56 +0000 (01:08 +0000)]
    Reviewed by darin

Clean up the inline run function so that it doesn't return incorrect answers when making children non-inline.

<rdar://problem/3848724> REGRESSION (166-168u): RenderText::layout called, firing assertion that kills Mail
<rdar://problem/3848357> RenderText::layout called, firing assertion that kills Safari (www.apple.com/downloads/macosx)

        * khtml/rendering/render_block.cpp:

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

18 years agoAdd layout test for dynamic block/inline crash.
hyatt [Fri, 22 Oct 2004 00:00:29 +0000 (00:00 +0000)]
Add layout test for dynamic block/inline crash.

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

18 years ago Fix for 3810389, crash because of continuation() craziness. Revert back to the...
hyatt [Thu, 21 Oct 2004 23:45:58 +0000 (23:45 +0000)]
Fix for 3810389, crash because of continuation() craziness.  Revert back to the old behavior of
making sure that all line boxes get deleted and recreated when inlines are split because of a block.

        Reviewed darin

        * khtml/rendering/render_inline.cpp:

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

18 years ago Reviewed by Darin
kocienda [Thu, 21 Oct 2004 21:19:35 +0000 (21:19 +0000)]
    Reviewed by Darin

        Significant improvement to the way that whitespace is handled during editing.

        * khtml/editing/htmlediting.cpp:
        (khtml::CompositeEditCommand::deleteInsignificantText): New functions (there are actually
        two being added with this name) that delete "insignificant" unrendered text.
        (khtml::CompositeEditCommand::deleteInsignificantTextDownstream): Takes a position,
        calculates the downstream position to use as the endpoint for the deletion, and
        then calls deleteInsignificantText with this start and end.
        (khtml::DeleteSelectionCommand::doApply): Call new deleteInsignificantTextDownstream function.
        (khtml::InputNewlineCommand::doApply): Ditto.
        (khtml::InputTextCommand::input): Ditto.
        * khtml/editing/htmlediting.h: Add new declarations.

        Modified layout test results:
        * layout-tests/editing/deleting/delete-block-merge-contents-016-expected.txt:
        * layout-tests/editing/deleting/delete-block-merge-contents-017-expected.txt:
        * layout-tests/editing/deleting/delete-contiguous-ws-001-expected.txt:
        * layout-tests/editing/deleting/delete-selection-001-expected.txt:
        * layout-tests/editing/deleting/delete-tab-001-expected.txt:
        * layout-tests/editing/deleting/delete-tab-004-expected.txt:
        * layout-tests/editing/deleting/delete-trailing-ws-001-expected.txt:
        * layout-tests/editing/inserting/insert-3659587-fix-expected.txt:
        * layout-tests/editing/inserting/insert-3775316-fix-expected.txt:
        * layout-tests/editing/inserting/insert-3778059-fix-expected.txt:
        * layout-tests/editing/inserting/insert-br-001-expected.txt:
        * layout-tests/editing/inserting/insert-br-004-expected.txt:
        * layout-tests/editing/inserting/insert-br-005-expected.txt:
        * layout-tests/editing/inserting/insert-br-006-expected.txt:
        * layout-tests/editing/inserting/insert-tab-001-expected.txt:
        * layout-tests/editing/inserting/insert-tab-002-expected.txt:
        * layout-tests/editing/inserting/insert-tab-004-expected.txt:
        * layout-tests/editing/inserting/insert-text-with-newlines-expected.txt:
        * layout-tests/editing/inserting/typing-001-expected.txt:
        * layout-tests/editing/inserting/typing-around-br-001-expected.txt:
        * layout-tests/editing/inserting/typing-around-image-001-expected.txt:
        * layout-tests/editing/style/typing-style-003-expected.txt:
        * layout-tests/editing/undo/redo-typing-001-expected.txt:
        * layout-tests/editing/undo/undo-typing-001-expected.txt:

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

18 years ago Fix for 3847054, assertion failure in RenderText::layout() on news.com page. Fix...
hyatt [Thu, 21 Oct 2004 21:12:06 +0000 (21:12 +0000)]
Fix for 3847054, assertion failure in RenderText::layout() on news.com page.  Fix getInlineRun so that
it no longer breaks early (thus causing some children not to get properly wrapped by anonymous blocks).

        Reviewed by darin

        * khtml/rendering/render_block.cpp:

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

18 years ago Reviewed by John.
darin [Thu, 21 Oct 2004 17:04:37 +0000 (17:04 +0000)]
    Reviewed by John.

        - fixed <rdar://problem/3847994> REGRESSION: reproducible exception in WebImageRenderer releasePatternColor; afterwards get crash or no more browsing

        * WebCoreSupport.subproj/WebImageRenderer.m:
        (-[WebInternalImage createRendererIfNeeded]): Replaced retainOrCopyIfNeeded with this.
        This returns nil if a copied renderer isn't needed, and returns a new renderer if a copy is.
        The old version was sometimes returning a WebInternalImage and other times a WebImageRenderer.
        (-[WebImageRenderer retainOrCopyIfNeeded]): Returns the result of createRendererIfNeeded
        or retains self and returns self.

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

18 years agoLand updated layout tests with scroll info.
hyatt [Thu, 21 Oct 2004 00:23:33 +0000 (00:23 +0000)]
Land updated layout tests with scroll info.

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

18 years ago Reviewed by Dave.
darin [Thu, 21 Oct 2004 00:20:59 +0000 (00:20 +0000)]
    Reviewed by Dave.

        - fixed <rdar://problem/3470715> Pattern cache can get huge with use of css background-image in Safari

        * WebCoreSupport.subproj/WebImageRenderer.h: Change WebImageRenderer to be a subclass of NSObject
        rather than NSImage and contain a pointer to a WebInternalImage.
        * WebCoreSupport.subproj/WebImageRenderer.m:
        (-[WebInternalImage releasePatternColor]): Added. Releases patternColor.
        (-[WebImageRenderer initWithMIMEType:]): Added. Makes WebInternalImage and then self.
        (-[WebImageRenderer initWithData:MIMEType:]): Ditto.
        (-[WebImageRenderer initWithContentsOfFile:]): Ditto.
        (-[WebImageRenderer dealloc]): Added. Calls releasePatternColor and then releases WebInternalImage.
        (-[WebImageRenderer image]): Added. Returns pointer to image.
        (-[WebImageRenderer MIMEType]): Added. Calls through to image.
        (-[WebImageRenderer TIFFRepresentation]): Ditto.
        (-[WebImageRenderer frameCount]): Ditto.
        (-[WebImageRenderer setOriginalData:]): Added. Sets image data pointer.
        (+[WebImageRenderer stopAnimationsInView:]): Added. Calls through to image.
        (-[WebImageRenderer incrementalLoadWithBytes:length:complete:]): Ditto.
        (-[WebImageRenderer size]): Ditto.
        (-[WebImageRenderer resize:]): Ditto.
        (-[WebImageRenderer drawImageInRect:fromRect:]): Ditto.
        (-[WebImageRenderer drawImageInRect:fromRect:compositeOperator:context:]): Ditto.
        (-[WebImageRenderer stopAnimation]): Ditto.
        (-[WebImageRenderer tileInRect:fromPoint:context:]): Ditto.
        (-[WebImageRenderer isNull]): Ditto.
        (-[WebImageRenderer retainOrCopyIfNeeded]): Ditto.
        (-[WebImageRenderer increaseUseCount]): Ditto.
        (-[WebImageRenderer decreaseUseCount]): Ditto.
        (-[WebImageRenderer flushRasterCache]): Ditto.
        (-[WebImageRenderer imageRef]): Ditto.
        (-[WebImageRenderer copyWithZone:]): Ditto.

        * Misc.subproj/WebNSViewExtras.m: (-[NSView _web_dragImage:rect:event:pasteboard:source:offset:]):
        Update for slight changes to WebImageRenderer API.
        * WebCoreSupport.subproj/WebImageRendererFactory.m:
        (-[WebImageRendererFactory imageRendererWithMIMEType:]): Ditto.
        (-[WebImageRendererFactory imageRendererWithData:MIMEType:]): Ditto.
        (-[WebImageRendererFactory imageRendererWithSize:]): Ditto.
        (-[WebImageRendererFactory imageRendererWithName:]): Ditto.
        * WebView.subproj/WebImageView.m: (-[WebImageView image]): Ditto.

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

18 years ago Add better dumping of overflow information for scrolling regions.
hyatt [Thu, 21 Oct 2004 00:20:29 +0000 (00:20 +0000)]
Add better dumping of overflow information for scrolling regions.

Fix for 3726524, crash in updateLayerPosition.  Make sure anonymous elements properly remove themselves
from the render tree so that layers and so forth are cleaned up.

        Reviewed by darin

        * khtml/rendering/render_container.cpp:
        * khtml/rendering/render_layer.h:
        * kwq/KWQRenderTreeDebug.cpp:

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

18 years ago Fix for 3791146, make sure all lines are checked when computing overflow.
hyatt [Wed, 20 Oct 2004 21:34:01 +0000 (21:34 +0000)]
Fix for 3791146, make sure all lines are checked when computing overflow.

        Reviewed by kocienda

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

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

18 years ago Fixed: <rdar://problem/3846943> REGRESSION: JNLP files are rendered instead of downl...
cblu [Wed, 20 Oct 2004 21:31:53 +0000 (21:31 +0000)]
Fixed: <rdar://problem/3846943> REGRESSION: JNLP files are rendered instead of downloaded

        Reviewed by john.

        * Plugins.subproj/WebBasePluginPackage.h:
        * Plugins.subproj/WebBasePluginPackage.m:
        (-[WebBasePluginPackage isJavaPlugIn]): new
        * Plugins.subproj/WebPluginDatabase.m:
        (-[WebPluginDatabase refresh]): don't register the Java plug-in for a document view since Java file should be downloaded when not embedded.

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

18 years ago Fix for 3790936, make the unicode-breaking on the layout tests match Panther.
hyatt [Wed, 20 Oct 2004 20:58:12 +0000 (20:58 +0000)]
Fix for 3790936, make the unicode-breaking on the layout tests match Panther.

        Reviewed by kocienda

        * khtml/rendering/break_lines.cpp:

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

18 years ago Reviewed by John.
darin [Wed, 20 Oct 2004 19:01:16 +0000 (19:01 +0000)]
    Reviewed by John.

        - fixed <rdar://problem/3317107> text input fields and text areas don't respect background color and text color CSS properties

        * khtml/rendering/render_form.cpp: (RenderFormElement::updateFromElement):
        Create a palette with the background and foreground colors in it and set it on the widget.

        * khtml/rendering/render_style.h: (khtml::StyleVisualData::operator==): No palette to compare
        with APPLE_CHANGES. Removed palette and palette-related function members.
        * khtml/rendering/render_style.cpp:
        (StyleVisualData::StyleVisualData): No palette to initialize with APPLE_CHANGES.
        (RenderStyle::diff): No palette to compare.

        * kwq/KWQLineEdit.h: Added setPalette override. Made text function const.
        * kwq/KWQLineEdit.mm:
        (QLineEdit::setPalette): Added. Sets foreground and background color based on palette.
        (QLineEdit::text): Made const.

        * kwq/KWQTextEdit.h: Added setPalette override.
        * kwq/KWQTextEdit.mm: (QTextEdit::setPalette): Added. Sets foreground and background color
        based on palette.

        * kwq/KWQPalette.h: Removed most things, leaving only background and foreground colors
        per color group, and only a single color group per palette.
        * kwq/KWQColorGroup.mm: Removed.
        * kwq/KWQPalette.mm: Removed.
        * WebCore.pbproj/project.pbxproj: Removed KWQColorGroup.mm and KWQPalette.mm.

        * kwq/KWQApplication.h: Removed unused palette function.
        * kwq/KWQApplication.mm: Ditto.

        * kwq/KWQWidget.h: Removed unsetPalette.
        * kwq/KWQWidget.mm: Ditto.

        - fixed storage leak

        * khtml/html/html_formimpl.cpp: (DOM::HTMLGenericFormElementImpl::~HTMLGenericFormElementImpl):
        Roll in storage leak fix from KDE guys.

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

18 years ago Fixed:
cblu [Wed, 20 Oct 2004 18:21:48 +0000 (18:21 +0000)]
<rdar://problem/3842030> WebKit needs to pass the mode (NP_FULL, NP_EMBED, etc) when calling plugInViewWithArguments
<rdar://problem/3792852> Safari is loading the new QuickTime Cocoa plugin on Panther

        Reviewed by darin.

        * Plugins.subproj/WebPluginDocumentView.m:
        (-[WebPluginDocumentView setDataSource:]): pass "full" as the mode
        * Plugins.subproj/WebPluginPackage.m:
        (-[WebPluginPackage initWithPath:]): load plug-in with the "webplugin" extension
        * WebCoreSupport.subproj/WebBridge.m:
        (-[WebBridge pluginViewWithPackage:attributeNames:attributeValues:baseURL:]): pass "embed" as the mode
        * WebKit.pbproj/project.pbxproj:

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

18 years ago - bump WebKit version to 167.1, so that we can do a quick dot submission for <rdar...
vicki [Tue, 19 Oct 2004 23:50:43 +0000 (23:50 +0000)]
- bump WebKit version to 167.1, so that we can do a quick dot submission for <rdar://problem/3843951>

        * WebKit.pbproj/project.pbxproj:

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

18 years agoCheck in updated layout tests.
hyatt [Tue, 19 Oct 2004 23:28:51 +0000 (23:28 +0000)]
Check in updated layout tests.

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

18 years ago Reviewed by kocienda
hyatt [Tue, 19 Oct 2004 23:04:29 +0000 (23:04 +0000)]
    Reviewed by kocienda

More cleanup of block layout.  Eliminates the separate step for tables that dont fit on a line with a float
and consolidates it with clearing.

Also patch dom_textimpl.cpp to reduce further the # of RenderTexts created.

        * khtml/rendering/render_block.cpp:
        * khtml/rendering/render_block.h:
        * khtml/rendering/render_frames.cpp:
        * khtml/xml/dom_textimpl.cpp:

        Fix for 3841060, regression with * in frames.  Reviewed by kocienda.

* layout-tests/fast/frames/002-expected.txt: Added.
        * layout-tests/fast/frames/002.html: Added.

 2004-10-19  Darin Adler  <darin@apple.com>

        Reviewed by Maciej.

        - follow-on to my fix yesterday, which broke a layout test because I rolled out a fix that Maciej had done

        * khtml/html/htmltokenizer.cpp: (khtml::HTMLTokenizer::write): Need to check the actual queue of external
        scripts being loaded here. If the current code being run is the external script itself, then we don't want
        to defer parsing. But loadingExtScript has to stay true until after the script runs. The old code would
        assume that any time we're running a script there's no need to look at loadingExtScript, but that was also
        wrong since there can be a script loading in that case too. Layout tests check for both problems.

        * layout-tests/fast/tokenizer/external-script-document-write-expected.txt: Added.
        * layout-tests/fast/tokenizer/external-script-document-write.html: Added.
        * layout-tests/fast/tokenizer/resources/external-script-document-write.js: Added.

        * layout-tests/fast/tokenizer/004.html: Fixed line endings (were CR, should be LF).

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

18 years ago Change suggested by Maciej during code review.
darin [Tue, 19 Oct 2004 22:05:02 +0000 (22:05 +0000)]
    Change suggested by Maciej during code review.

        * WebCoreSupport.subproj/WebTextRenderer.m: Changed rounding hack table to be const so it can be in shared instead
        of private memory, and doesn't require an initialization function.
        (+[WebTextRenderer initialize]): Removed initialization.

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

18 years ago Reviewed by Maciej.
darin [Tue, 19 Oct 2004 21:56:04 +0000 (21:56 +0000)]
    Reviewed by Maciej.

        - fixed <rdar://problem/3838934> Safari stops loading pages after rangeOfCharacterFromSet nil argument exception
        - fixed <rdar://problem/3843951> REGRESSION (166-167): Safari crashes in widthForNextCharacter (belkin.com, at startup for others)
        - fixed <rdar://problem/3841049> REGRESSION (109-110): control characters render as square boxes

        * WebCoreSupport.subproj/WebTextRenderer.m:
        (isSpace): Merged in isAlternateSpace, never used.
        (setupRoundingHackCharacterTable): Fixed size of table, was 1 entry too short. Got rid of unneeded call to bzero,
        since globals start out zeroed automatically.
        (isRoundingHackCharacter): Fixed backwards logic causing the crash in widthForNextCharacter.
        Also removed explicit compare with 1; check for non-zero is just fine.
        (fontContainsString): Change code so we'll just skip the font if the covered character set returns nil rather than
        throwing an exception like the old version did. This should make bug 3838934 go away, although perhaps covering up
        the underlying problem.
        (-[WebTextRenderer _convertCharacters:length:toGlyphs:]): Removed unused skipControlCharacters: parameter and also
        the unnecessary code to copy the buffer to change newline characters and non-break spaces to spaces.
        (-[WebTextRenderer _convertUnicodeCharacters:length:toGlyphs:]): Removed unused local.
        (-[WebTextRenderer _extendCharacterToGlyphMapToInclude:]): Added code to set up special cases for control characters,
        \n and non-break spaces.
        (-[WebTextRenderer _createATSUTextLayoutForRun:]): Added comment about the cases this code does not handle that
        are handled by the CG case.
        (widthForNextCharacter): Call isSpace instead of checking specifically for the space character here. The old code
        would not handle cases with '\n' coming across from WebCore properly.

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

18 years agoAdd image for lists test.
hyatt [Tue, 19 Oct 2004 21:11:43 +0000 (21:11 +0000)]
Add image for lists test.

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

18 years ago 2004-10-19 Darin Adler <darin@apple.com>
darin [Tue, 19 Oct 2004 19:01:15 +0000 (19:01 +0000)]
 2004-10-19  Darin Adler  <darin@apple.com>

        Reviewed by Maciej.

        - follow-on to my fix yesterday, which broke a layout test because I rolled out a fix that Maciej had done

        * khtml/html/htmltokenizer.cpp: (khtml::HTMLTokenizer::write): Need to check the actual queue of external
        scripts being loaded here. If the current code being run is the external script itself, then we don't want
        to defer parsing. But loadingExtScript has to stay true until after the script runs. The old code would
        assume that any time we're running a script there's no need to look at loadingExtScript, but that was also
        wrong since there can be a script loading in that case too. Layout tests check for both problems.

        * layout-tests/fast/tokenizer/external-script-document-write-expected.txt: Added.
        * layout-tests/fast/tokenizer/external-script-document-write.html: Added.
        * layout-tests/fast/tokenizer/resources/external-script-document-write.js: Added.

        * layout-tests/fast/tokenizer/004.html: Fixed line endings (were CR, should be LF).

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

18 years ago Reviewed by Dave Hyatt.
darin [Tue, 19 Oct 2004 00:23:55 +0000 (00:23 +0000)]
    Reviewed by Dave Hyatt.

        - fixed <rdar://problem/3807234> REGRESSION (152-153): can't get element by ID that was just written with document.write in separate JS file (lacoccinelle.net)

        * khtml/html/htmltokenizer.cpp:
        (khtml::HTMLTokenizer::scriptHandler): Use !isEmpty instead of count != 0, since it's cheaper.
        (khtml::HTMLTokenizer::write): Roll back to the old version of the check here. The fix is that
        we only want to look at loadingExtScript if m_executingScript is 0.

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

18 years ago Reviewed by Hyatt
kocienda [Mon, 18 Oct 2004 21:52:36 +0000 (21:52 +0000)]
    Reviewed by Hyatt

        Fix for this bug:

        <rdar://problem/3840907> textedit doesn't render italic or bold text in html documents

        * khtml/css/css_valueimpl.cpp:
        (CSSPrimitiveValueImpl::getStringValue): This function did not return string values for idents.
        Also changed the return value to be DOMString, rather than DOMStringImpl, to deal with the
        lifecycle issues associated with creating a string to be returned in the ident case.
        * khtml/css/css_valueimpl.h: Change getStringValue to return DOMString rather than DOMStringImpl.
        * khtml/css/cssstyleselector.cpp:
        (khtml::CSSStyleSelector::applyProperty): Two calls of getStringValue needed updating.

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

18 years ago Fixed: <rdar://problem/3770135> hang loading page with EMBED tag pointing to same...
cblu [Mon, 18 Oct 2004 17:56:01 +0000 (17:56 +0000)]
Fixed: <rdar://problem/3770135> hang loading page with EMBED tag pointing to same page (tridentantennas.co.uk)

        Reviewed by kocienda.

        * khtml/rendering/render_frames.cpp:
        (RenderPartObject::updateWidget): use completeURL before comparing the URL of the plug-in with the base URL of the document when avoiding frame recursion

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

18 years ago Fixed: <rdar://problem/3840916> GC: -[WebNetscapePluginPackage initWithPath:] leaks...
cblu [Mon, 18 Oct 2004 17:36:07 +0000 (17:36 +0000)]
Fixed: <rdar://problem/3840916> GC: -[WebNetscapePluginPackage initWithPath:] leaks an NSURL

        Reviewed by kevin.

        * Plugins.subproj/WebNetscapePluginPackage.m:
        (-[WebNetscapePluginPackage initWithPath:]): use executablePath on NSBundle instead of CFBundleCopyExecutableURL

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

18 years ago * DOM.subproj/DOMPrivate.h: change to copied header that was never committed
cblu [Mon, 18 Oct 2004 17:30:39 +0000 (17:30 +0000)]
    * DOM.subproj/DOMPrivate.h: change to copied header that was never committed

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

18 years ago Reviewed by Ken.
sullivan [Mon, 18 Oct 2004 16:55:06 +0000 (16:55 +0000)]
    Reviewed by Ken.

        - fixed <rdar://problem/3810183> Make WebHTMLView respect return value of webView:doCommandBySelector:

        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView doCommandBySelector:]):
        only do default action if delegate returns NO; this works with Mail as of Tiger 8A275.

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

18 years ago Fixed: <rdar://problem/3841774> would like to get NSColor from DOM-CSS
cblu [Fri, 15 Oct 2004 23:17:56 +0000 (23:17 +0000)]
Fixed: <rdar://problem/3841774> would like to get NSColor from DOM-CSS

        Reviewed by john.

        * kwq/DOM-CSS.mm:
        (-[DOMRGBColor _color]): new, returns getNSColor on KWQColor
        * kwq/DOMPrivate.h:

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

18 years ago Reviewed by Hyatt
kocienda [Fri, 15 Oct 2004 21:07:24 +0000 (21:07 +0000)]
    Reviewed by Hyatt

        * khtml/rendering/bidi.cpp:
        (khtml::RenderBlock::skipNonBreakingSpace): Also need to forego the
        skipping after a clean line break, in addition to the cases already
        checked for.
        * layout-tests/editing/inserting/insert-br-007-expected.txt: Added.
        * layout-tests/editing/inserting/insert-br-007.html: Added.
        * layout-tests/editing/inserting/insert-br-008-expected.txt: Added.
        * layout-tests/editing/inserting/insert-br-008.html: Added.

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

18 years agoversioning for TOT, Safari 2.0 (168u)
vicki [Fri, 15 Oct 2004 18:22:26 +0000 (18:22 +0000)]
versioning for TOT, Safari 2.0 (168u)

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

18 years agoSafari-167 stamp
vicki [Fri, 15 Oct 2004 18:12:14 +0000 (18:12 +0000)]
Safari-167 stamp

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

18 years ago Reviewed by John
kocienda [Fri, 15 Oct 2004 00:01:20 +0000 (00:01 +0000)]
    Reviewed by John

        Fix for this bug:

        <rdar://problem/3839989> REGRESSION (Mail): Left arrow does nothing after inserting attachment

        * khtml/editing/visible_position.cpp:
        (khtml::VisiblePosition::deepEquivalent): Remove code that attempted to bridge old-style
        position code to new-style VisiblePosition code. In retrospect, this code was misguided.
        Since we do a good job of insulating external code from the internal workings of
        VisiblePosition, the "hop ahead" being done here was not doing anyone any real good, and
        in the case of this bug, was doing harm. Simply removing this code makes the bug
        go away and does not cause any editing layout test regresssions.

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

18 years ago Reviewed by Hyatt
kocienda [Thu, 14 Oct 2004 23:51:47 +0000 (23:51 +0000)]
    Reviewed by Hyatt

        * khtml/rendering/bidi.cpp:
        (khtml::skipNonBreakingSpace): New helper.
        (khtml::RenderBlock::skipWhitespace): Do not skip non-breaking spaces that are
        at the start of a block. This was preventing users from typing spaces in empty
        * layout-tests/editing/inserting/insert-space-in-empty-doc-expected.txt: Added.
        * layout-tests/editing/inserting/insert-space-in-empty-doc.html: Added.

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

18 years ago Reviewed by Darin and Ken.
adele [Thu, 14 Oct 2004 21:52:53 +0000 (21:52 +0000)]
    Reviewed by Darin and Ken.

fix for <rdar://problem/3821070> null de-ref in DelectSelectionCommand::doApply()

        This change shifts some code around so that the code that determines what typing style
        is in effect is called before deleteUnrenderedText is called.  Two asserts are also added
        to ensure that start and end nodes of the selection are in the document.

        * khtml/editing/htmlediting.cpp: (khtml::DeleteSelectionCommand::doApply):

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

18 years ago Reviewed by Ken
adele [Thu, 14 Oct 2004 21:35:16 +0000 (21:35 +0000)]
    Reviewed by Ken

This change makes these three functions virtual so that the work is being done in KWQHTMLPart
        instead of khtml_part, eliminating the need for the "#if APPLE_CHANGES" statements in the khtml code.

        * khtml/khtml_part.cpp:
        * khtml/khtml_part.h:
        * kwq/KWQKHTMLPart.h:

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

18 years agoWebCore:
kocienda [Thu, 14 Oct 2004 20:38:16 +0000 (20:38 +0000)]

        Reviewed by John

        Final fix for these bugs:

        <rdar://problem/3806306> HTML editing puts spaces at start of line
        <rdar://problem/3814252> HTML editing groups space with word causing wrapping

        This change sets some new CSS properties that have been added to WebCore to
        enable whitespace-handling and line-breaking features that make WebView work
        more like a text editor.

        * khtml/css/cssstyleselector.cpp:
        (khtml::CSSStyleSelector::applyProperty): Add and remove special editing CSS properties
        based on property value.
        * khtml/html/html_elementimpl.cpp:
        (HTMLElementImpl::setContentEditable): Add and remove special editing CSS properties
        based on attribute value.
        * khtml/khtml_part.cpp:
        (KHTMLPart::applyEditingStyleToBodyElement): New helper. Calls applyEditingStyleToElement on
        body element.
        (KHTMLPart::removeEditingStyleFromBodyElement): New helper. Calls removeEditingStyleFromElement on
        body element.
        (KHTMLPart::applyEditingStyleToElement): Adds special editing CSS properties to passed in element.
        (KHTMLPart::removeEditingStyleFromElement): Removes special editing CSS properties from passed in element.
        * khtml/khtml_part.h: Add new declarations.
        * kwq/WebCoreBridge.h: Ditto.
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge applyEditingStyleToBodyElement]): Call through to similarly-named function on KHTMLPart.
        (-[WebCoreBridge removeEditingStyleFromBodyElement]): Ditto.
        (-[WebCoreBridge applyEditingStyleToElement:]): Ditto.
        (-[WebCoreBridge removeEditingStyleFromElement:]): Ditto.


        Reviewed by John

        Final fix for these bugs:

        <rdar://problem/3806306> HTML editing puts spaces at start of line
        <rdar://problem/3814252> HTML editing groups space with word causing wrapping

        This change sets some new CSS properties that have been added to WebCore to
        enable whitespace-handling and line-breaking features that make WebView work
        more like a text editor.

        * WebView.subproj/WebHTMLRepresentation.m:
        (-[WebHTMLRepresentation finishedLoadingWithDataSource:]): Turn on special editing
        CSS properties when loading an HTML document into a WebView that is editable.
        * WebView.subproj/WebView.m:
        (-[WebView setEditable:]): Add and remove special editing CSS properties in current
        document being displayed.

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

18 years ago Reviewed by Ken.
sullivan [Thu, 14 Oct 2004 19:51:14 +0000 (19:51 +0000)]
    Reviewed by Ken.

        - fixed <rdar://problem/3840052> Crash in removeBlockPlaceholderIfNeeded attaching file to empty document

        * khtml/editing/htmlediting.cpp:
        needed a nil check to handle empty document case

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

18 years ago Fixed <rdar://problem/3823026> making isRoundingHackCharacter use -O3 and...
rjw [Thu, 14 Oct 2004 17:14:28 +0000 (17:14 +0000)]
    Fixed <rdar://problem/3823026> making isRoundingHackCharacter use -O3 and an 8-bit lookup-table will speed "XBS" test up by 3% (actually < 1%)

        Careful testing shows a small performance gain on very large text files.
        I saw large variations in timings, but taking the lowest PLT timing
        with and without this change showed a 0.9% gain.  Note the cvs-base showed
        no improvement.  The improvement was for the large page attached to the

        Reviewed by Ken.

        * WebCoreSupport.subproj/WebTextRenderer.m:
        (+[WebTextRenderer initialize]):

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

18 years ago Reviewed by me
kocienda [Thu, 14 Oct 2004 14:31:07 +0000 (14:31 +0000)]
    Reviewed by me

        Fix build breakage. These three functions need to return the values from their
        calls to WebCGColorSpaceCreateXXX.

        * WebCoreSupport.subproj/WebGraphicsBridge.m:
        (-[WebGraphicsBridge createRGBColorSpace])
        (-[WebGraphicsBridge createGrayColorSpace])
        (-[WebGraphicsBridge createCMYKColorSpace])

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

18 years ago Addressed concerns in <rdar://problem/3803117> RESP: High complexity in icu uidna_ID...
rjw [Thu, 14 Oct 2004 01:32:23 +0000 (01:32 +0000)]
Addressed concerns in <rdar://problem/3803117> RESP: High complexity in icu uidna_IDNToASCII called by [NSString(WebNSURLExtras) _web_mapHostNameWithRange:encode:makeString:]

In practice I saw NO improvement in performance.  Although,
special-case tests could possibly show improvement.  Anyway,
the changes don't hurt performance.

        Reviewed by Maciej.

        * Misc.subproj/WebNSURLExtras.m:
        (-[NSString _web_mapHostNameWithRange:encode:makeString:]):

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

18 years agoWebCore:
mjs [Thu, 14 Oct 2004 01:26:54 +0000 (01:26 +0000)]

        Reviewed by Ken.

<rdar://problem/3824626> Change to do colormatching for DeviceRGB colorspace causes ~11% Safari slowdown

- I fixed this by turning off all colormatching for WebKit
content. We might turn it back on later. For now, it's possible to
turn it on temporarily by defining COLORMATCH_EVERYTHING.

* WebCorePrefix.h:
        * khtml/ecma/kjs_html.cpp:
        * khtml/rendering/render_canvasimage.cpp:
        * kwq/KWQColor.mm:
        * kwq/KWQPainter.h:
        * kwq/KWQPainter.mm:
        * kwq/WebCoreGraphicsBridge.h:
        * kwq/WebCoreGraphicsBridge.m:
        (-[WebCoreGraphicsBridge createRGBColorSpace]):
        (-[WebCoreGraphicsBridge createGrayColorSpace]):
        (-[WebCoreGraphicsBridge createCMYKColorSpace]):


        Reviewed by Ken.

<rdar://problem/3824626> Change to do colormatching for DeviceRGB colorspace causes ~11% Safari slowdown

- I fixed this by turning off all colormatching for WebKit
content. We might turn it back on later. For now, it's possible to
turn it on temporarily by defining COLORMATCH_EVERYTHING.

* WebCoreSupport.subproj/WebGraphicsBridge.m:
        (-[WebGraphicsBridge setFocusRingStyle:radius:color:]):
        (-[WebGraphicsBridge additionalPatternPhase]):
        (-[WebGraphicsBridge createRGBColorSpace]):
        (-[WebGraphicsBridge createGrayColorSpace]):
        (-[WebGraphicsBridge createCMYKColorSpace]):
        * WebCoreSupport.subproj/WebImageData.m:
        * WebCoreSupport.subproj/WebImageRenderer.h:
        * WebCoreSupport.subproj/WebImageRenderer.m:
        (-[WebImageRenderer _adjustSizeToPixelDimensions]):
        (-[WebImageRenderer incrementalLoadWithBytes:length:complete:]):
        (-[WebImageRenderer _adjustColorSpace]):
        (-[WebImageRenderer drawClippedToValidInRect:fromRect:]):
        (-[WebImageRenderer tileInRect:fromPoint:context:]):
        * WebKitPrefix.h:

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

18 years ago Reviewed by Hyatt
kocienda [Thu, 14 Oct 2004 00:10:47 +0000 (00:10 +0000)]
    Reviewed by Hyatt

        * khtml/css/css_valueimpl.cpp:
        (CSSStyleDeclarationImpl::merge): A little cleanup. Also, make sure m_lstValues
        is non-null before appending.

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

18 years ago Reviewed by me
kocienda [Thu, 14 Oct 2004 00:05:11 +0000 (00:05 +0000)]
    Reviewed by me

        Update expected results for improved behavior as a result of fix to 3816768.

        * layout-tests/editing/deleting/delete-3775172-fix-expected.txt
        * layout-tests/editing/deleting/delete-3800834-fix-expected.txt
        * layout-tests/editing/deleting/delete-block-merge-contents-002-expected.txt

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

18 years ago Reviewed by Richard
kocienda [Wed, 13 Oct 2004 23:35:19 +0000 (23:35 +0000)]
    Reviewed by Richard

        * khtml/css/css_computedstyle.cpp:
        (DOM::CSSComputedStyleDeclarationImpl::getPropertyCSSValue): Add support to computed style
        for getting -khtml-line-break and -khml-nbsp-mode.

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

18 years ago Reviewed by John
kocienda [Wed, 13 Oct 2004 23:21:42 +0000 (23:21 +0000)]
    Reviewed by John

        Fix for this bug:

        <rdar://problem/3816768> REGRESSION (Mail): Deleting last character in block incorrectly
        moves caret out of block.

        The issue here is that an empty block with no explicit height set by style collapses
        to zero height, and does so immediately after the last bit of content is removed from
        it (as a result of deleting text with the delete key for instance). Since zero-height
        blocks are not eligible caret positions, the caret jumped to the closest eligible spot.

        The fix is to detect when a block has not been removed itself, but has had all its
        contents removed. In this case, a BR element is placed in the block, one that is
        specially marked as a placeholder. Later, if the block ever receives content, this
        placeholder is removed.

        * khtml/editing/htmlediting.cpp:
        (khtml::blockPlaceholerClassString): String which acts as a placeholder marker class.
        (khtml::CompositeEditCommand::insertBlockPlaceholderIfNeeded): Adds a placeholder BR if needed.
        (khtml::CompositeEditCommand::removeBlockPlaceholderIfNeeded): Removes a placeholder BR if needed.
        (khtml::DeleteSelectionCommand::moveNodesAfterNode): Call removeBlockPlaceholderIfNeeded.
        Also, do some cleanup on some old, crufty code in the move logic that is just so clearly wrong
        (it's very clear that we needs to be able to move more than just text nodes). This may expose
        bugs, but these bugs needs to be filed and fixed, not ducked. Besides, undoing this silliness
        made the test case in the bug work.
        (khtml::DeleteSelectionCommand::doApply): Call insertBlockPlaceholderIfNeeded and
        (khtml::InputTextCommand::input): Call removeBlockPlaceholderIfNeeded.
        (khtml::ReplaceSelectionCommand::doApply): Call removeBlockPlaceholderIfNeeded.
        * khtml/editing/htmlediting.h: Declare new functions.

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

18 years ago Don't fill background with transparency unless debug flag
rjw [Wed, 13 Oct 2004 22:00:44 +0000 (22:00 +0000)]
Don't fill background with transparency unless debug flag
is enabled.

        Reviewed by Hyatt.

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

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