WebKit-https.git
16 years ago Reviewed by John.
mjs [Tue, 13 Jul 2004 00:26:18 +0000 (00:26 +0000)]
    Reviewed by John.

<rdar://problem/3632570>: (REGRESSION: SocialText.net wiki keeps asking for auth, even though pages load)

        * Misc.subproj/WebIconLoader.m:
        (-[WebIconLoader didReceiveAuthenticationChallenge:]): Ignore the challenge - we don't
want an auth panel for favicons.
        (-[WebIconLoader didCancelAuthenticationChallenge:]): Ignore cancel, since we are ignoring
the challenge.

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

16 years ago Fixed 3717982. Implemented navigator.language!
rjw [Mon, 12 Jul 2004 23:33:10 +0000 (23:33 +0000)]
Fixed 3717982.  Implemented navigator.language!

        Reviewed by John.

        * khtml/ecma/kjs_navigator.cpp:
        (Navigator::getValueProperty):

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

16 years agoReviewed by Dave
kdecker [Mon, 12 Jul 2004 23:01:08 +0000 (23:01 +0000)]
Reviewed by Dave

Added a layout test for css 'width:auto'

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

16 years agoBack out my changes to the fix for my previous checkin, since it broke the inline...
hyatt [Mon, 12 Jul 2004 22:58:42 +0000 (22:58 +0000)]
Back out my changes to the fix for my previous checkin, since it broke the inline-block layout test.

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

16 years ago Reviewed by me
kocienda [Mon, 12 Jul 2004 22:30:09 +0000 (22:30 +0000)]
    Reviewed by me

        Remove cvs conflict indicators from ChangeLog

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

16 years ago Reviewed by Hyatt
kocienda [Mon, 12 Jul 2004 22:29:20 +0000 (22:29 +0000)]
    Reviewed by Hyatt

        * khtml/xml/dom_position.cpp:
        (DOM::Position::inRenderedContent): I broke selection drawing with my last patch. This
        function is now used in selection drawing, and it was making an unneeded check to see
        that content was editable to answer whether or not is was rendered. Bad. Fixed.

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

16 years ago Fix for 3621138, crash on hrweb.apple.com. Make sure that in the case where objects...
hyatt [Mon, 12 Jul 2004 22:26:57 +0000 (22:26 +0000)]
Fix for 3621138, crash on hrweb.apple.com.  Make sure that in the case where objects get pulled up from merging
blocks that we just delete all line boxes.

        Reviewed by kocienda

        * khtml/rendering/render_block.cpp:
        (khtml::RenderBlock::removeChild):

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

16 years ago Reviewed by John.
mjs [Mon, 12 Jul 2004 22:03:21 +0000 (22:03 +0000)]
    Reviewed by John.

<rdar://problem/3706080>: (REGRESSION (125.8-147u): Nested <ul> do not display bullets)
<rdar://problem/3676376>: (Second level bullets not printed when printing Xcode release notes)

        * kwq/KWQPainter.h:
        * kwq/KWQPainter.mm:
        (CGColorFromNSColor):
        (QPainter::drawEllipse):
        (QPainter::setShadow):

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

16 years ago Reviewed by me
kocienda [Mon, 12 Jul 2004 21:57:34 +0000 (21:57 +0000)]
    Reviewed by me

        Added new editing-related layout tests

        * layout-tests/editing/deleting/delete-after-span-ws-001-expected.txt: Added.
        * layout-tests/editing/deleting/delete-after-span-ws-001.html: Added.
        * layout-tests/editing/deleting/delete-after-span-ws-002-expected.txt: Added.
        * layout-tests/editing/deleting/delete-after-span-ws-002.html: Added.
        * layout-tests/editing/deleting/delete-after-span-ws-003-expected.txt: Added.
        * layout-tests/editing/deleting/delete-after-span-ws-003.html: Added.
        * layout-tests/editing/selection/unrendered-001-expected.txt: Added.
        * layout-tests/editing/selection/unrendered-001.html: Added.
        * layout-tests/editing/selection/unrendered-002-expected.txt: Added.
        * layout-tests/editing/selection/unrendered-002.html: Added.
        * layout-tests/editing/selection/unrendered-003-expected.txt: Added.
        * layout-tests/editing/selection/unrendered-003.html: Added.
        * layout-tests/editing/selection/unrendered-004-expected.txt: Added.
        * layout-tests/editing/selection/unrendered-004.html: Added.
        * layout-tests/editing/selection/unrendered-005-expected.txt: Added.
        * layout-tests/editing/selection/unrendered-005.html: Added.
        * layout-tests/traversal/node-iterator-008-expected.txt: Added.
        * layout-tests/traversal/node-iterator-008.html: Added.
        * layout-tests/traversal/tree-walker-005-expected.txt: Added.
        * layout-tests/traversal/tree-walker-005.html: Added.

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

16 years ago Reviewed by Hyatt
kocienda [Mon, 12 Jul 2004 21:51:02 +0000 (21:51 +0000)]
    Reviewed by Hyatt

        Fixes for these bugs:

        <rdar://problem/3723359> Extending then "unextending" selection with arrow keys should draw caret but doesn't
        <rdar://problem/3724626> White-space deletion code deletes wrong character when space follows span

        * khtml/editing/htmlediting_impl.cpp:
        (khtml::DeleteSelectionCommandImpl::doApply): Modify special-case white-space deletion code so it runs
        only in the special case. It was throwing its net too widely, catching the case described in 3724626.
        By tightening up the special-case white-space deletion, and allowing the more general-purpose code to run,
        the bug is fixed.
        * khtml/xml/dom_docimpl.cpp:
        (DocumentImpl::updateSelection): Use recently-added closestRenderedPosition helper in Position class
        to figure out the start and end positions for selection drawing.
        * khtml/xml/dom_position.cpp:
        (DOM::Position::equivalentUpstreamPosition): Added code to handle white-space that causes line breaks.
        (DOM::Position::equivalentDownstreamPosition): Ditto.
        (DOM::Position::closestRenderedPosition): Trap empty selections at function entry, return *this.
        (DOM::Position::isFirstRenderedPositionOnLine): Can't be first rendered position on line if not rendered.
        Add check for this.
        (DOM::Position::isLastRenderedPositionOnLine): Ditto, but s/first/last/
        * khtml/xml/dom_selection.cpp:
        (DOM::Selection::validate): A selection is in caret state if the start and end are equal *or* equivalent.
        The equivalence case is new, and fixes 3723359.

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

16 years agoFix the fast layout tests.
hyatt [Mon, 12 Jul 2004 20:13:10 +0000 (20:13 +0000)]
Fix the fast layout tests.

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

16 years ago Reviewed by Hyatt.
kdecker [Fri, 9 Jul 2004 23:50:20 +0000 (23:50 +0000)]
    Reviewed by Hyatt.

        fixes the width:auto problem in
        <rdar://problem/3698344> REGRESSION (143?-144): macrumors.com tabs are compressed and illegible

        * khtml/css/cssstyleselector.cpp:
        (khtml::CSSStyleSelector::applyProperty):

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

16 years ago Reviewed by me
kocienda [Fri, 9 Jul 2004 23:23:06 +0000 (23:23 +0000)]
    Reviewed by me

        Updated some layout test results.

        * layout-tests/editing/deleting/delete-image-004-expected.txt:
        * layout-tests/editing/selection/extend-by-character-006-expected.txt:

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

16 years agoWebCore:
cblu [Fri, 9 Jul 2004 21:24:00 +0000 (21:24 +0000)]
WebCore:

Allowed my change for 3715785 to compile on Jaguar.

        Reviewed by kocienda.

        * kwq/WebCoreBridge.h:
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge domain]): new, allows access to the domain without using the DOM API which doesn't exist on Jaguar

WebKit:

Allowed my change for 3715785 to compile on Jaguar.

        Reviewed by kocienda.

        * WebCoreSupport.subproj/WebBridge.m:
        (-[WebBridge canTargetLoadInFrame:]): don't use the DOM API since it doesn't exist on Jaguar, instead call the new domain method on the bridge

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

16 years ago Reviewed by Hyatt
kocienda [Fri, 9 Jul 2004 18:31:01 +0000 (18:31 +0000)]
    Reviewed by Hyatt

        Some improvements to fix:

        <rdar://problem/3723111> Caret not drawn when selection set to unrendered content

        * khtml/editing/htmlediting_impl.cpp:
        (khtml::TypingCommandImpl::issueCommandForDeleteKey): Adjust selection to delete if
        selected position is not rendered.
        * khtml/rendering/render_block.cpp:
        (khtml::RenderBlock::paintObject): Use new caretPosition() function on Selection to
        figure out whether to paint.
        * khtml/xml/dom_position.cpp:
        (DOM::Position::previousCharacterPosition): Now correctly deals with a start
        position that is not rendered.
        (DOM::Position::nextCharacterPosition): Ditto.
        (DOM::Position::closestRenderedPosition): New helper.
        * khtml/xml/dom_position.h:
        (DOM::): Moved in EAffinity from Selection header. Now used in closestRenderedPosition function.
        * khtml/xml/dom_selection.cpp:
        (DOM::Selection::Selection): Added new m_caretPosition member. This is the position of the caret
        after a caret layout. This may be different from start or end if start and end are not rendered.
        (DOM::Selection::init):
        (DOM::Selection::modifyExtendingRightForward): New helper to clean up modify() and make it more readble.
        (DOM::Selection::modifyMovingRightForward): Ditto.
        (DOM::Selection::modifyExtendingLeftBackward): Ditto.
        (DOM::Selection::modifyMovingLeftBackward): Ditto.
        (DOM::Selection::modify): Use new helpers to make this more readble.
        (DOM::Selection::layoutCaret): Uses new closestRenderedPosition helper to place the caret if in unrendered
        content.
        (DOM::Selection::paintCaret): Remove moveToRenderedContent. obsolete.
        * khtml/xml/dom_selection.h:
        (DOM::Selection::caretPosition): New accessor.
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge setSelectedDOMRange:affinity:]): EAffinity no longer a member enum of Selection class.

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

16 years ago Reviewed by John
kocienda [Fri, 9 Jul 2004 17:40:10 +0000 (17:40 +0000)]
    Reviewed by John

        * Plugins.subproj/npruntime.h: Updated license to lawyer-approved
        joint Apple-Mozilla BSD-style license.

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

16 years ago Fix for the table layout test that failed because of a change in how innerText worke...
hyatt [Thu, 8 Jul 2004 22:54:49 +0000 (22:54 +0000)]
Fix for the table layout test that failed because of a change in how innerText worked.  We need to do
updateLayout now when using innerText, since the method has been changed to use line boxes in the render tree
that might otherwise be out of date.

        Reviewed by kocienda

        * khtml/html/html_elementimpl.cpp:
        (HTMLElementImpl::innerText):

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

16 years ago Reviewed by Ken.
sullivan [Thu, 8 Jul 2004 21:31:58 +0000 (21:31 +0000)]
    Reviewed by Ken.

        - fixed <rdar://problem/3691569> REGRESSION (142): cmd-shift-clicking on a link
        now also extends selection (even if there wasn't one before)

        * khtml/khtml_part.cpp:
        (KHTMLPart::handleMousePressEventSingleClick):
        if there's a URL associated with the event, don't extend the selection

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

16 years ago Reviewed by Vicki
kocienda [Thu, 8 Jul 2004 21:08:03 +0000 (21:08 +0000)]
    Reviewed by Vicki

        Added some helper functions which provide strings to display in the
        Xcode debugger's variable inspector window. These functions are called
        from the LabyrinthDataFormatter debugger plugin I just checked in to
        the Labyrinth/Tools directory.

        Note that these functions are compiled in on Development builds only.

        * WebCore-combined.exp:
        * WebCore-tests.exp: Export all the formatForDebugger symbols so the
        debugger program can link with them.
        * khtml/xml/dom2_rangeimpl.cpp:
        (DOM::RangeImpl::formatForDebugger):
        * khtml/xml/dom2_rangeimpl.h:
        * khtml/xml/dom_elementimpl.cpp:
        (ElementImpl::formatForDebugger):
        * khtml/xml/dom_elementimpl.h:
        * khtml/xml/dom_nodeimpl.cpp:
        * khtml/xml/dom_nodeimpl.h:
        * khtml/xml/dom_position.cpp:
        (DOM::Position::formatForDebugger):
        * khtml/xml/dom_position.h:
        * khtml/xml/dom_selection.cpp:
        (DOM::Selection::formatForDebugger):
        * khtml/xml/dom_selection.h:
        * khtml/xml/dom_textimpl.cpp:
        (TextImpl::formatForDebugger):
        * khtml/xml/dom_textimpl.h:

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

16 years ago Reviewed by Vicki.
sullivan [Thu, 8 Jul 2004 21:01:38 +0000 (21:01 +0000)]
    Reviewed by Vicki.

        - fixed <rdar://problem/3721544> crash increasing font size;
        entrezeroetun.com (works in IE and Firefox)

        * khtml/rendering/render_block.cpp:
        (khtml::RenderBlock::updateFirstLetter):
        Check for nil originalString() before dereffing

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

16 years ago Fixed: <rdar://problem/3720728> REGRESSION (125.8-146): Crash moving mouse over...
cblu [Thu, 8 Jul 2004 20:49:12 +0000 (20:49 +0000)]
Fixed: <rdar://problem/3720728> REGRESSION (125.8-146): Crash moving mouse over plugin at manray-photo.com

        Reviewed by john.

        * Plugins.subproj/WebBaseNetscapePluginView.m:
        (-[WebBaseNetscapePluginView pluginScriptableObject]): don't call NPP_GetValue unless the plug-in implements it

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

16 years ago Fixed: <rdar://problem/3706296> VIP: ifilm.com crashing reproducibly with Safari
cblu [Thu, 8 Jul 2004 20:28:24 +0000 (20:28 +0000)]
Fixed: <rdar://problem/3706296> VIP: ifilm.com crashing reproducibly with Safari

        Reviewed by kocienda.

        * Plugins.subproj/WebNetscapePluginPackage.m:
        (-[WebNetscapePluginPackage launchRealPlayer]): don't release a NULL appURL

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

16 years ago Fix for 3721453, CSS3 initial property caused crashes because the macros were not...
hyatt [Thu, 8 Jul 2004 20:22:01 +0000 (20:22 +0000)]
Fix for 3721453, CSS3 initial property caused crashes because the macros were not written correctly.

        Reviewed by john

        * khtml/css/cssstyleselector.cpp:

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

16 years ago Fixed: <rdar://problem/3650140> reproducible assertion failure going to plugin page...
cblu [Thu, 8 Jul 2004 19:33:15 +0000 (19:33 +0000)]
Fixed: <rdar://problem/3650140> reproducible assertion failure going to plugin page with JavaScript disabled

        Reviewed by john.

        * Plugins.subproj/WebBaseNetscapePluginView.m:
        (-[WebBaseNetscapePluginView evaluateJavaScriptPluginRequest:]): don't call NPP_NewStream and other stream methods if there is no JS result to deliver. This is what Mozilla does.
        (-[WebBaseNetscapePluginView loadRequest:inTarget:withNotifyData:]): Return NPERR_GENERIC_ERROR if JS is disabled. This is what Mozilla does.

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

16 years agochange the version number from '151' to '152u'
vicki [Thu, 8 Jul 2004 18:46:41 +0000 (18:46 +0000)]
change the version number from '151' to '152u'

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

16 years agoSafari-151 stamp!
vicki [Thu, 8 Jul 2004 18:38:17 +0000 (18:38 +0000)]
Safari-151 stamp!

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

16 years ago Fix for 3712133, crash from first-line pseudo-style use.
hyatt [Wed, 7 Jul 2004 23:24:25 +0000 (23:24 +0000)]
Fix for 3712133, crash from first-line pseudo-style use.

        Reviewed by kocienda

        * khtml/css/cssstyleselector.cpp:
        (khtml::CSSStyleSelector::styleForElement):
        * khtml/css/cssstyleselector.h:
        * khtml/rendering/render_object.cpp:
        (RenderObject::getPseudoStyle):

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

16 years ago 3719051 - Safari doesn't update form inputs when a page was refreshed by javascript...
trey [Wed, 7 Jul 2004 21:36:48 +0000 (21:36 +0000)]
3719051 - Safari doesn't update form inputs when a page was refreshed by javascript window.location
... and at least 5 other cases in Radar

Very similar problem to the Harvard PIN bug.  We need to be sure
to not carry any state over when we are processing a client
redirect, which reuses the same WebHistoryItem.

        Reviewed by John.

        * WebView.subproj/WebFrame.m:
        (-[WebFrame _transitionToCommitted:]):  Comment
        (-[WebFrame _opened]):  Clear form and scroll state on client redirect.

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

16 years ago Reviewed by Hyatt
kocienda [Wed, 7 Jul 2004 20:13:00 +0000 (20:13 +0000)]
    Reviewed by Hyatt

        Fix for this bug:

        <rdar://problem/3716479> calling setInnerHTML during a webViewDidChange delegate call causes a crash

        The fix involves some rearrangement of code in TypingCommand and TypingCommandImpl.
        Formerly, new TypingCommands would apply themselves (which was a no-op) and then
        do their action in some code a way different than other commands. This type of command
        application is different than for all other commands since TypingCommands can be coalesced.
        The crash occurred as a result of the "no-op" TypingCommand having the unconsidered
        consequence of causing editing delegate notifications to be sent before the command
        has actually run. This change takes a small step towards making TypingCommandImpl function like
        other commands, where the command work is done in doApply. This makes the notification
        happen in the right order.

        * khtml/editing/htmlediting.cpp:
        (khtml::TypingCommand::TypingCommand):
        (khtml::TypingCommand::insertText):
        (khtml::TypingCommand::insertNewline):
        (khtml::TypingCommand::deleteKeyPressed):
        * khtml/editing/htmlediting.h:
        (khtml::TypingCommand::):
        * khtml/editing/htmlediting_impl.cpp:
        (khtml::TypingCommandImpl::TypingCommandImpl):
        (khtml::TypingCommandImpl::doApply):
        * khtml/editing/htmlediting_impl.h:

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

16 years ago Fixed: <rdar://problem/3715785> multiple frame injection vulnerability reported...
cblu [Tue, 6 Jul 2004 23:11:23 +0000 (23:11 +0000)]
Fixed: <rdar://problem/3715785> multiple frame injection vulnerability reported by Secunia, affects almost all browsers

        Reviewed by john, trey, kocienda.

        * WebCoreSupport.subproj/WebBridge.m:
        (-[WebBridge canTargetLoadInFrame:]): new method, return YES if the requesting frame is local, the target frame is an entire window or if the domain of the parent of the targeted frame equals this domain
        (-[WebBridge loadURL:referrer:reload:userGesture:target:triggeringEvent:form:formValues:]): call canTargetLoadInFrame: to make sure we can load the request
        (-[WebBridge postWithURL:referrer:target:data:contentType:triggeringEvent:form:formValues:]): ditto

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

16 years ago Reviewed by me
kocienda [Tue, 6 Jul 2004 22:18:06 +0000 (22:18 +0000)]
    Reviewed by me

        * khtml/html/html_tableimpl.cpp:
        (HTMLTableElementImpl::addChild): Added a better comment in the
        code I just checked in a few minutes ago.

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

16 years ago Reviewed by Hyatt
kocienda [Tue, 6 Jul 2004 22:07:11 +0000 (22:07 +0000)]
    Reviewed by Hyatt

        Fix for this bug:

        <rdar://problem/3672377> assertion failure in AppendNodeCommandImpl::doApply
        due to non-0 exception code trying to insert a DIV markup string

        The solution was to revert to the code that was rolled out, and removing
        the child checks from NodeImpl::checkAddChild. However, this time, I added
        code very similar to this check into the code that runs while HTML is
        being parsed to build up tables. This code relies on child-add failure
        to ensure the proper construction of well-formed tables (as gross as that
        sounds), so the check needs to be retained there. No other code seems to
        be so affected. Layout tests are unchanged by this patch.

        * khtml/html/html_tableimpl.cpp:
        (HTMLTableElementImpl::addChild):
        * khtml/xml/dom_nodeimpl.cpp:
        (NodeImpl::checkAddChild):

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

16 years ago Reviewed by John
kocienda [Tue, 6 Jul 2004 17:58:38 +0000 (17:58 +0000)]
    Reviewed by John

        Simple change. I switched the arguments of the appendNode helper function
        and the AppendNodeCommand and AppendNodeCommandImpl classes. The node to
        insert now comes before the parent node in the argument list. I did this
        to make this function match the convention of others in the HTML editing code.
        This was the only one that was "different" in the way that it ordered arguments.
        As a result, I was always looking to see that I was passing things in the right
        order.

        * khtml/editing/htmlediting.cpp:
        (khtml::AppendNodeCommand::AppendNodeCommand):
        (khtml::AppendNodeCommand::appendChild):
        (khtml::AppendNodeCommand::parentNode):
        * khtml/editing/htmlediting.h:
        * khtml/editing/htmlediting_impl.cpp:
        (khtml::CompositeEditCommandImpl::insertNodeAfter):
        (khtml::CompositeEditCommandImpl::insertNodeAt):
        (khtml::CompositeEditCommandImpl::appendNode):
        (khtml::AppendNodeCommandImpl::AppendNodeCommandImpl):
        (khtml::AppendNodeCommandImpl::~AppendNodeCommandImpl):
        (khtml::AppendNodeCommandImpl::doApply):
        (khtml::AppendNodeCommandImpl::doUnapply):
        (khtml::ApplyStyleCommandImpl::surroundNodeRangeWithElement):
        (khtml::DeleteSelectionCommandImpl::doApply):
        (khtml::InputNewlineCommandImpl::insertNodeAfterPosition):
        (khtml::InputNewlineCommandImpl::insertNodeBeforePosition):
        (khtml::InputTextCommandImpl::prepareForTextInsertion):
        * khtml/editing/htmlediting_impl.h:
        (khtml::AppendNodeCommandImpl::parentNode):

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

16 years ago Reviewed by Trey
kocienda [Tue, 6 Jul 2004 17:04:45 +0000 (17:04 +0000)]
    Reviewed by Trey

        Fixed several problems with traversal classes. For one, NodeIterators treat
        FILTER_REJECT and FILTER_SKIP the same, since it treats the DOM tree as a
        flat collection of nodes free of hierarchy. The code before this change did
        not do this correctly. It sure pays to go back and read the specs. :)

        Also, the code to traverse from node to node when filters were applied was
        not working correctly. My first attemmpt to implement this was just plain
        buggy, as I discovered when I tried to write tests for my WWDC talk. I have
        settled on an implementation which is much simpler and worked for all the
        tests I threw at it.

        * khtml/xml/dom2_traversalimpl.cpp:
        (DOM::NodeIteratorImpl::findNextNode):
        (DOM::NodeIteratorImpl::nextNode):
        (DOM::NodeIteratorImpl::findPreviousNode):
        (DOM::NodeIteratorImpl::previousNode):
        (DOM::TreeWalkerImpl::parentNode):
        (DOM::TreeWalkerImpl::firstChild):
        (DOM::TreeWalkerImpl::lastChild):
        (DOM::TreeWalkerImpl::previousSibling):
        (DOM::TreeWalkerImpl::nextSibling):
        (DOM::TreeWalkerImpl::previousNode):
        (DOM::TreeWalkerImpl::nextNode):
        (DOM::TreeWalkerImpl::ancestorRejected):
        * khtml/xml/dom2_traversalimpl.h:

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

16 years ago Reviewed by Trey.
sullivan [Tue, 6 Jul 2004 16:45:13 +0000 (16:45 +0000)]
    Reviewed by Trey.

        - fixed <rdar://problem/3717147> folder icon used for error page in back/forward
        menu when iTunes is not installed

        * WebView.subproj/WebFrame.m:
        (-[WebFrame _transitionToCommitted:]):
        When displaying the error page for an unreachable URL, leave the requested URL
        in the WebHistoryItem; don't clobber it with a bogus one that represents the
        error page. This not only avoids the wrong-icon problem, but should also help
        in cases where an unreachable URL becomes reachable later on.

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

16 years ago Reviewed by kocienda.
vicki [Tue, 6 Jul 2004 16:23:43 +0000 (16:23 +0000)]
    Reviewed by kocienda.

- added backColorCommand, foreColorCommand, fontNameCommand,
and fontSizeCommand

        * layout-tests/editing/editing.js:

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

16 years agoWebCore:
trey [Tue, 6 Jul 2004 16:13:36 +0000 (16:13 +0000)]
WebCore:

3716053 - www.theage.com.au has extra back/forward items due to ads

This turned out to be easily fixed by generalizing the fix to 3438441.  We prevent
addition to the b/f list not just during an onload event, but during any non-user
gesture, which includes top level script executing.

        Reviewed by Richard.

        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::openURL):  Only real change - prevent adding to b/f list if not
a user gesture.
        (KWQKHTMLPart::openURLRequest):  Rename "onLoadEvent" to "userGesture", swap sense
        (KWQKHTMLPart::submitForm):  Ditto
        (KWQKHTMLPart::urlSelected): Ditto
        * kwq/KWQKHTMLPartBrowserExtension.mm:
        (KHTMLPartBrowserExtension::createNewWindow):  Ditto
        * kwq/WebCoreBridge.h:

WebKit:

3716053 - www.theage.com.au has extra back/forward items due to ads

The real change was in WebKit.  Here was are just renaming a method and folding
all the WebFrameLoadTypeOnLoadEvent uses to be WebFrameLoadTypeInternal, since there
was never any difference anyway.

        Reviewed by Richard

        * WebCoreSupport.subproj/WebBridge.m:
        (-[WebBridge loadURL:referrer:reload:userGesture:target:triggeringEvent:form:formValues:]):  rename part of the method.
        * WebView.subproj/WebFrame.m:  Nuke WebFrameLoadTypeOnLoadEvent.
        (-[WebFrame _transitionToCommitted:]):
        (-[WebFrame _checkLoadCompleteForThisFrame]):
        (-[WebFrame _loadItem:withLoadType:]):
        (-[WebFrame _itemForRestoringDocState]):
        * WebView.subproj/WebFramePrivate.h:

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

16 years ago Reviewed by Trey
kocienda [Tue, 6 Jul 2004 15:46:43 +0000 (15:46 +0000)]
    Reviewed by Trey

        Only register the editing delegate for those notifications for which it implements the callbacks.

        * WebView.subproj/WebView.m:
        (-[WebView registerForEditingDelegateNotification:selector:]):
        (-[WebView setEditingDelegate:]):

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

16 years ago 3294652 - Failed drag of links doesn't slide back
trey [Tue, 6 Jul 2004 15:40:04 +0000 (15:40 +0000)]
3294652 - Failed drag of links doesn't slide back

The only reason for this is that because of some hacks, we lie to
AK about the drag image offset, which means we slide back to
slightly the wrong place.  But it's very minor, so we should
just fix it.

        Reviewed by Ken.

        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView _startDraggingImage:at:operation:event:sourceIsDHTML:DHTMLWroteData:]):
Ask for slideback.

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

16 years ago Reviewed by Dave.
darin [Fri, 2 Jul 2004 17:27:36 +0000 (17:27 +0000)]
    Reviewed by Dave.

        - fixed problem where tabsToLinks and privateBrowsingEnabled did not work with non-
          standard WebPreferences objects

        * WebView.subproj/WebPreferences.m:
        (-[WebPreferences _valueForKey:]): New helper.
        (-[WebPreferences _stringValueForKey:]): Use _valueForKey.
        (-[WebPreferences _integerValueForKey:]): Use _valueForKey.
        (-[WebPreferences _boolValueForKey:]): Use _valueForKey.
        (-[WebPreferences tabsToLinks]): Use _boolValueForKey; this is the bug fix.
        (-[WebPreferences privateBrowsingEnabled]): Ditto.
        (+[WebPreferences _setIBCreatorID:]): Use copy instead of retain for keeping an NSString.

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

16 years ago Reviewed by Dave.
darin [Fri, 2 Jul 2004 17:03:32 +0000 (17:03 +0000)]
    Reviewed by Dave.

        - fixed half of <rdar://problem/3709244> utf-8 meta tag not parsed when page title contains angle brackets or if </meta> tag used

        * khtml/misc/decoder.cpp: (Decoder::decode): Allow </meta> tags without deciding we
        are done with the header.

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

16 years ago 3556159 - Crashes in -[WebFrame(WebPrivate) _transitionToCommitted:] at www.masterca...
trey [Thu, 1 Jul 2004 20:41:07 +0000 (20:41 +0000)]
3556159 - Crashes in -[WebFrame(WebPrivate) _transitionToCommitted:] at mastercardbusiness.com

We know from the line number of the crash that it is due to [self parentFrame]==nil.

Looking at the HTML and that of the related bugs, they do special stuff with onload
handlers.  It is no longer repro, presumably because the includes JS files changed,
as the bugs only included the top level HTML.  I suspect that the problem is that the
WebFrameLoadTypeOnLoadEvent case was added, and in some weird sequence specific to
MasterCard, they hit a case where we would be in WebFrameLoadTypeOnLoadEvent mode but
not have a parent frame.

So we guard in the code against hitting a nil parentFrame, and log an error just in
case this ever crops up again and we can learn more about it.

        Reviewed by Richard.

        * WebView.subproj/WebFrame.m:
        (-[WebFrame _transitionToCommitted:]):  Guard against nil parentFrame.

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

16 years ago Reviewed by Trey.
sullivan [Thu, 1 Jul 2004 17:41:26 +0000 (17:41 +0000)]
    Reviewed by Trey.

        - fixed these bugs:
        <rdar://problem/3709110> REGRESSION (Tiger): Pressing Tab key to move focus
        onto links skips every other link
        <rdar://problem/3692576> focus ring is in odd place after clicking RSS button
        with "Tab to links" enabled

        WebHTMLView has some trickery by which we advance the focused link when nextKeyView
        or previousKeyView is called within nextValidKeyView or previousValidKeyView. This
        broke in Tiger because AppKit now (sometimes at least) calls nextKeyView more than
        once within nextValidKeyView. Fixed 3709110 by making sure we only advance the focus
        once within a call to nextValidKeyView or previousValidKeyView.

        Also, this same trickery didn't work right with hidden views. Fixed 3692576 by checking
        whether the view is hidden and bypassing the focus-moving trickery in that case.

        * WebView.subproj/WebHTMLViewInternal.h:
        renamed inNextValidKeyView -> nextKeyViewAccessShouldMoveFocus

        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView nextKeyView]):
        now clears nextKeyViewAccessShouldMoveFocus
        (-[WebHTMLView previousKeyView]):
        ditto
        (-[WebHTMLView nextValidKeyView]):
        now doesn't set focus-moving trigger ivar if view is hidden or has hidden ancestor
        (-[WebHTMLView previousValidKeyView]):
        ditto

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

16 years agoWebCore:
trey [Thu, 1 Jul 2004 02:07:43 +0000 (02:07 +0000)]
WebCore:

Dragging within a web view should be allowed to start when the window isn't key.

A few months ago, Chris made this work, but it relied on the fact that all dragging
was done in WebKit.  When WebCore got involved in dragging, it was broken.  Now we
have a new scheme that gets it working again that properly involves WebCore.

The general idea is that when AK asks us whether to accept the first mouse and do
"delayed window ordering", we must consult WC to see if we might start a drag.  In
addition, instead of these drags in non-active windows being started as a special
case in WK, they go through the normal WK-WC drag machinery.

        Reviewed by John.

        * khtml/khtml_part.cpp:
        (KHTMLPart::shouldDragAutoNode):  New x,y args.
        * khtml/khtml_part.h:
        * khtml/rendering/render_object.cpp:
        (RenderObject::draggableNode):  Pass through new x,y args.
        * khtml/rendering/render_object.h:
        * kwq/KWQKHTMLPart.h:
        (KWQKHTMLPart::setActivationEventNumber):  New setter.
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::KWQKHTMLPart):  Init new ivar.
        (KWQKHTMLPart::eventMayStartDrag):  New routine that checks if we might start
a drag in response to a mouseDown.
        (KWQKHTMLPart::khtmlMouseMoveEvent):  Pass x,y to the routine that finds a draggable
node.  This eventually gets back up to WK's _mayStartDragAtEventLocation:.
Delay requirement when dragging the selection now implemented here.
        (KWQKHTMLPart::khtmlMouseReleaseEvent):  Must avoid changing the selection if we
wind up here as part of the first click in a window (because we started handling
the click to possible start a drag, but that never came through).
        (KWQKHTMLPart::mouseDown): Save away event timestamp.
        (KWQKHTMLPart::shouldDragAutoNode):  Pass location up to WK instead of the
most recent event we stashed.
        * kwq/WebCoreBridge.h:
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge setActivationEventNumber:]):  Trivial glue.
        (-[WebCoreBridge eventMayStartDrag:]):  Ditto.

WebKit:

Dragging within a web view should be allowed to start when the window isn't key.

A few months ago, Chris made this work, but it relied on the fact that all dragging
was done in WebKit.  When WebCore got involved in dragging, it was broken.  Now we
have a new scheme that gets it working again that properly involves WebCore.

The general idea is that when AK asks us whether to accept the first mouse and do
"delayed window ordering", we must consult WC to see if we might start a drag.  In
addition, instead of these drags in non-active windows being started as a special
case in WK, they go through the normal WK-WC drag machinery.  Finally to work in
frames we have to drill to the deepest hit view in acceptsFirstMouse, because previous
hacks to hitTest make the top-most WebHTMLView field all events for its view tree
(which leads to it fielding all acceptFirstMouse messages too).

        Reviewed by John.

        * WebCoreSupport.subproj/WebBridge.m:
        (-[WebBridge mayStartDragAtEventLocation:]):  Glue change for new arg type.
        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView _startDraggingImage:at:operation:event:sourceIsDHTML:DHTMLWroteData:]):
firstMouseDownEvent ivar is no longer needed.
        (-[WebHTMLView _mayStartDragAtEventLocation:]):  Receives a location instead of a drag
event, since we need to do this work when we have no drag event.  This means the
check of the delay for text dragging is moved down to WebCore.
        (-[WebHTMLView acceptsFirstMouse:]):  Respond based on whether we might do a drag.
This includes drilling to the deepest view the event hits, whereas we used to only
respond considering the topmost WebHTMLView.
        (-[WebHTMLView shouldDelayWindowOrderingForEvent:]):  Ditto.
        (-[WebHTMLView mouseDown:]):  Get rid of special case where some activating
mouseDown events weren't sent to WC.  We need to go through the whole pipeline
now to get a drag started properly.
        (-[WebHTMLView mouseDragged:]):  Ditto, let WC start the drag.
        (-[WebHTMLView mouseUp:]):  firstMouseDownEvent ivar is no longer needed.
        * WebView.subproj/WebHTMLViewInternal.h:
        * WebView.subproj/WebHTMLViewPrivate.h:

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

16 years ago Need to tighten up JS error checking for requesting drag props
trey [Wed, 30 Jun 2004 17:14:58 +0000 (17:14 +0000)]
Need to tighten up JS error checking for requesting drag props
in the wrong cases.

        Reviewed by John.

        * khtml/ecma/kjs_events.cpp:
        (Clipboard::getValueProperty):  Assert if someone somehow set
dropEffect or effectAllowed and it's a copy/paste clipboard
instead of a dragging clipboard.
        (Clipboard::putValue):  Don't let anyone set dropEffect or
effectAllowed on a copy/paste clipboard.
        (ClipboardProtoFunc::tryCall):  Disallow setting dragImage on
a copy/paste clipboard.

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

16 years ago DHTML dragging - source should have access to the operation chosen
trey [Tue, 29 Jun 2004 23:37:57 +0000 (23:37 +0000)]
DHTML dragging - source should have access to the operation chosen
by the destination.

        Reviewed by John

        * kwq/KWQKHTMLPart.h:
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::dragSourceEndedAt):  Set the destination's operation
on the clipboard.
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge dragExitedWithDraggingInfo:]):  For completeness
we set the source op for the ondragexit event.
        (-[WebCoreBridge concludeDragForDraggingInfo:]):  Ditto for the
drop event.
        (-[WebCoreBridge dragSourceEndedAt:operation:]):  Pass through of operation.

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

16 years agoFix "reviewed by" line.
trey [Fri, 25 Jun 2004 23:49:22 +0000 (23:49 +0000)]
Fix "reviewed by" line.

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

16 years agoWebKit:
trey [Fri, 25 Jun 2004 22:53:02 +0000 (22:53 +0000)]
WebKit:

Added new utility method.

        Reviewed by John.

        * WebView.subproj/WebFrame.m:
        (-[WebFrame _isDescendantOfFrame:]):   New code.
        * WebView.subproj/WebFramePrivate.h:

WebBrowser:

3562182 - repro Safari crash when altering specific form field

The basic problem was that JS would disable the search field on submit, which prevents
AK from sending a proper endEditing notification, which left the FormCompletionControler
hung out to dry.  We now watch for page transitions, and clear the FormCC then.

Reviewed by John

        * BrowserWebController.h:
        * BrowserWebController.m:
        (-[BrowserWebView dataSourceHasChanged:forFrame:]):  New callback from
LocationChangeHandler, just pass through to FormDelegate.
        (-[FormDelegate controlTextDidBeginEditing:inFrame:]):  Add ASSERT to catch similiar
trouble in the figure.
        (-[FormDelegate controlTextDidEndEditing:inFrame:]):  Ditto.
        (-[FormDelegate controlTextDidChange:inFrame:]):  Ditto
        (-[FormDelegate control:textView:doCommandBySelector:inFrame:]):  Ditto.
        (-[FormDelegate frameHasChanged:]):  Clear state when page transitions out from under us.
        * CompletionController.m:
        (+[CompletionController setCurrentCompletionController:]):  Make the current comp controller a
non-retained reference.  Side pointers like this do not want to keep around objects with pointers
into UI widgetry.
        (-[CompletionController dealloc]):  Clear the current comp controller if we're going away.
        * FormCompletionController.h:
        * FormCompletionController.m:
        (-[FormCompletionController webFrame]):  New getter.
        * LocationChangeHandler.m:  Cleaned up a bunch of silly code due to old rote conversion.
        (-[LocationChangeHandler webView:didStartProvisionalLoadForFrame:]):
        (-[LocationChangeHandler webView:didReceiveServerRedirectForProvisionalLoadForFrame:]):
        (-[LocationChangeHandler webView:didCommitLoadForFrame:]):  Let WebView know of commit.
        (-[LocationChangeHandler webView:didReceiveTitle:forFrame:]):
        (-[LocationChangeHandler webView:didReceiveIcon:forFrame:]):
        (-[LocationChangeHandler webView:didChangeLocationWithinPageForFrame:]):
        (-[LocationChangeHandler webView:willCloseFrame:]):

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

16 years ago 3710422 - REGRESSION: Safari crashes trying to send onbeforecut event at about:...
trey [Fri, 25 Jun 2004 05:20:55 +0000 (05:20 +0000)]
3710422 - REGRESSION: Safari crashes trying to send onbeforecut event at about://blank

Simple fix - don't try to send the event to the body element if we have no body element.

        Reviewed by NOBODY (OOPS!).

        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::dispatchCPPEvent):

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

16 years ago Fixed <rdar://problem/3710313>: CGContext not zeroed when WebImageRenderer is copied
rjw [Fri, 25 Jun 2004 00:28:04 +0000 (00:28 +0000)]
Fixed <rdar://problem/3710313>: CGContext not zeroed when WebImageRenderer is copied
The context ivar of WebImageRenderer wasn't being nil when the object was copied.

        Reviewed by Darin.

        * WebCoreSupport.subproj/WebImageRenderer.m:
        (-[WebImageRenderer copyWithZone:]):
        (-[WebImageRenderer dealloc]):
        (-[WebImageRenderer drawImageInRect:fromRect:compositeOperator:context:]):

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

16 years agoWebKit:
trey [Thu, 24 Jun 2004 22:46:55 +0000 (22:46 +0000)]
WebKit:

3672725 - Assertion failure in URLCompletion code with particular set of bookmarks

Problem was caused by a URL with unescaped unicodes getting into
the Bookmarks file, presumably from import from IE.  We now test
for this case and convert the data on the way in as if it were
user-entered.

        Reviewed by John and Darin.

        * History.subproj/WebHistoryItem.m:
        (-[WebHistoryItem initFromDictionaryRepresentation:]):

WebBrowser:

A little extra timing logging added as part of fixing 3672725.

        Reviewed by John.

        * URLCompletionController.m:
        (+[URLCompletionController _loadDB]):

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

16 years agoHmm, I thought this was working when I checked it in, but now it's not.
trey [Thu, 24 Jun 2004 22:23:30 +0000 (22:23 +0000)]
Hmm, I thought this was working when I checked it in, but now it's not.
So once more with feeling, eliminate the cvs warnings for all *mode*
files within XCode doc wrappers.

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

16 years agoAdded *.mode% to all .cvsignore files in XCode project doc wrappers.
trey [Thu, 24 Jun 2004 20:53:34 +0000 (20:53 +0000)]
Added *.mode% to all .cvsignore files in XCode project doc wrappers.
Then copied the result to all the XCode wrappers that had none.

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

16 years agoWebCore:
trey [Thu, 24 Jun 2004 20:27:42 +0000 (20:27 +0000)]
WebCore:

3704950 drag image in DB ConfigBar has horizontal graphics turd WebCore JavaScript

When we generate a drag image (or a selection image too, for that matter) we
translate the CTM using a CG call.  Later, WebImageRenderer adjusts the pattern
phase based on the CTM of the focused view, which doesn't include our translate.
So we must inform WebKit about the additional phase adjustment.

        Reviewed by Richard

        * kwq/KWQKHTMLPart.mm:  Tell WebKit about the phase adjustment.
        (KWQKHTMLPart::imageFromRect):
        * kwq/WebCoreGraphicsBridge.h:
        * kwq/WebCoreGraphicsBridge.m:
        (-[WebCoreGraphicsBridge setAdditionalPatternPhase:]):  New routine to receive
the phase adjustment.

WebKit:

3704950 drag image in DB ConfigBar has horizontal graphics turd WebCore JavaScript

When we generate a drag image (or a selection image too, for that matter) we
translate the CTM using a CG call.  Later, WebImageRenderer adjusts the pattern
phase based on the CTM of the focused view, which doesn't include our translate.
So we must inform WebKit about the additional phase adjustment.

        Reviewed by Richard

        * WebCoreSupport.subproj/WebGraphicsBridge.h:
        * WebCoreSupport.subproj/WebGraphicsBridge.m:
        (-[WebGraphicsBridge setAdditionalPatternPhase:]):  New trivial setter.
        (-[WebGraphicsBridge additionalPatternPhase]):      ...and getter.
        * WebCoreSupport.subproj/WebImageRenderer.m:
        (-[WebImageRenderer tileInRect:fromPoint:context:]):  Take any additional phase
adjustment into account when setting phase.

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

16 years ago 3679986 - screenX and screenY are flipped and relative to the bottom left of the...
trey [Thu, 24 Jun 2004 20:20:44 +0000 (20:20 +0000)]
3679986 - screenX and screenY are flipped and relative to the bottom left of the WebView, rather than the screen
3699510 - synthesized click events have bogus screen coords

        Reviewed by Darin.

        * khtml/khtmlview.cpp:
        (KHTMLView::dispatchDragEvent):  Generate screen coords for drag events using new func.
        (KHTMLView::dispatchMouseEvent):   Ditto.
        * khtml/khtmlview.h:
        * khtml/xml/dom_nodeimpl.cpp:
        (NodeImpl::dispatchMouseEvent):  Comment tricky semantics.
Calc screen coords in apple-specific way.
        * kwq/KWQKHTMLView.mm:
        (KHTMLView::viewportToGlobal):  Passthrough to window widget.
        * kwq/KWQScrollView.mm:
        * kwq/KWQWindowWidget.h:
        * kwq/KWQWindowWidget.mm:
        (KWQWindowWidget::mapToGlobal):  Call former code factored to new method below.
        (KWQWindowWidget::viewportToGlobal):  New method to convert "viewport" (which for us
really means NSWindow coords) to screen coords.

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

16 years agoWebCore:
trey [Thu, 24 Jun 2004 18:58:43 +0000 (18:58 +0000)]
WebCore:

3693420 - onbeforecut and onbeforepaste need real implementaion

        Reviewed by Chris.

        * kwq/KWQKHTMLPart.h:
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::mayCut):  Dispatch event to DHTML.
        (KWQKHTMLPart::mayCopy):  Ditto
        (KWQKHTMLPart::mayPaste):  Ditto
        (KWQKHTMLPart::tryCut):  No more need to send fake onbefore event
        (KWQKHTMLPart::tryCopy):  Ditto
        (KWQKHTMLPart::tryPaste): Ditto
        * kwq/WebCoreBridge.h:
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge mayDHTMLCut]):  Standard glue
        (-[WebCoreBridge mayDHTMLCopy]):  Ditto
        (-[WebCoreBridge mayDHTMLPaste]):  Ditto

WebKit:

3693420 - onbeforecut and onbeforepaste need real implementaion

        Reviewed by Chris.

        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView validateUserInterfaceItem:]):  Check with WebCore
to see if cut, copy, paste should be enabled.

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

16 years ago Reviewed by John.
darin [Thu, 24 Jun 2004 18:43:57 +0000 (18:43 +0000)]
    Reviewed by John.

        - fixed <rdar://problem/3709385> Find on page doesn't find a string at the very end of the file

        * khtml/misc/khtml_text_operations.cpp: (khtml::findPlainText): Rearrange loop to avoid an early
        exit once we have all the characters we need, but are at the end of the range we are searching.

        - fixed <rdar://problem/3102271>: (text areas have scroll bars even when they don't need them)
        - fixed <rdar://problem/3665430>: (horizontal scroll bar of text area does not show, even when text is wide in "no wrap" mode)

        * kwq/KWQTextArea.mm:
        (-[KWQTextArea _configureTextViewForWordWrapMode]): Added. Helper method that sets up the
        view for a new word wrap mode.
        (-[KWQTextArea _createTextView]): Moved much of the code inside _configureTextViewForWordWrapMode.
        (-[KWQTextArea _frameSizeChanged]): Added. Method shared by setFrame: and initWithFrame: to
        avoid duplicate code that was there before. The old code also had redundant code to update
        the text container size, but NSText handles that automatically.
        (-[KWQTextArea initWithFrame:]): Set wrap to YES by default, which is the key to fixing bug 3665430.
        Call setAutohidesScrollers:YES, which fixes bug 3102271. Also call the new _frameSizeChanged method.
        (-[KWQTextArea setWordWrap:]): Call _configureTextViewForWordWrapMode instead of trying
        to do the work here. The old version did both too little and too much.
        (-[KWQTextArea setFrame:]): Call _frameSizeChanged instead of trying to do the work here.
        The old version did both too little and too much.

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

16 years agoJavaScriptCore:
cblu [Thu, 24 Jun 2004 18:41:06 +0000 (18:41 +0000)]
JavaScriptCore:

Ignore .mode1 files in JavaScriptCore.pbproj

        Reviewed by kocienda.

        * JavaScriptCore.pbproj/.cvsignore:

Tests:

Made TestBindingsPlugin compile again.
Removed TestPlugin from CVS since NetscapeMoviePlugin is a better Netscape plug-in example.

        Reviewed by kocienda.

        * TestBindingsPlugin/TestBindingsPlugin.pbproj/.cvsignore: Added.
        * TestBindingsPlugin/TestBindingsPlugin.pbproj/project.pbxproj:
        * TestBindingsPlugin/main.c:
        (NPP_GetValue):
        (NPP_SetValue):
        * TestPlugin/English.lproj/InfoPlist.strings: Removed.
        * TestPlugin/TestPlugin.pbproj/project.pbxproj: Removed.
        * TestPlugin/main.c: Removed.
        * TestPlugin/npapi.h: Removed.
        * TestPlugin/test_plugin.html: Removed.

WebBrowser:

Ignore .mode1 files in WebBrowser.pbproj

        Reviewed by kocienda.

        * WebBrowser.pbproj/.cvsignore:

WebKitExamples:

Ignore .mode1 and other files in WebKitMoviePlugIn.xcode and NetscapeMoviePlugIn.xcode.

        Reviewed by kocienda.

        * NetscapeMoviePlugIn/NetscapeMoviePlugIn.xcode/.cvsignore: Added.
        * WebKitMoviePlugIn/WebKitMoviePlugIn.xcode/.cvsignore: Added.
        * WebKitMoviePlugIn/WebKitMoviePlugIn.xcode/project.pbxproj: Tiger updated the project

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

16 years ago Darin made this change on my machine; I reviewed it.
sullivan [Thu, 24 Jun 2004 18:22:54 +0000 (18:22 +0000)]
    Darin made this change on my machine; I reviewed it.

        - fixed <rdar://problem/3698333> Find on page doesn't find a particular string
        with a newline in the source

        * khtml/misc/khtml_text_operations.cpp:
        (khtml::TextIterator::handleTextBox):
        Clear m_lastTextNodeEndedWithCollapsedSpace after taking it into account.

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

16 years ago Reviewed by Darin.
sullivan [Thu, 24 Jun 2004 18:22:25 +0000 (18:22 +0000)]
    Reviewed by Darin.

        - fixed <rdar://problem/3706792> 8A161: Choosing text encoding for
        error page opens finder window!?

        * WebView.subproj/WebFrame.m:
        (-[WebFrame _reloadAllowingStaleDataWithOverrideEncoding:]):
        take unreachableURL into account

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

16 years agoWebKit:
rjw [Thu, 24 Jun 2004 00:36:33 +0000 (00:36 +0000)]
WebKit:
Implemented changes for latest npruntime.h.
Made npruntime.h public.

        Reviewed by Chris.

        * Plugins.subproj/WebBaseNetscapePluginView.h:
        * Plugins.subproj/WebBaseNetscapePluginView.m:
        (-[WebBaseNetscapePluginView pluginScriptableObject]):
        (-[WebBaseNetscapePluginView forceRedraw]):
        (-[WebBaseNetscapePluginView getVariable:value:]):
        * Plugins.subproj/WebBaseNetscapePluginViewPrivate.h:
        * Plugins.subproj/WebNetscapePluginPackage.m:
        (-[WebNetscapePluginPackage load]):
        * Plugins.subproj/npapi.h:
        * Plugins.subproj/npapi.m:
        (NPN_GetValue):
        * Plugins.subproj/npfunctions.h:
        * Plugins.subproj/npruntime.h:
        * WebKit.pbproj/project.pbxproj:

WebCore:
Implemented changes for latest npruntime.h.

        Reviewed by Chris.

        * kwq/KWQKHTMLPart.h:
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::KWQKHTMLPart):
        (KWQKHTMLPart::windowScriptNPObject):
        (KWQKHTMLPart::getEmbedInstanceForView):
        * kwq/WebCoreBridge.h:
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge windowScriptObject]):
        (-[WebCoreBridge windowScriptNPObject]):

JavaScriptCore:
Implemented changes for latest npruntime.h.

        Reviewed by Chris.

        * JavaScriptCore.pbproj/project.pbxproj:
        * bindings/NP_jsobject.cpp:
        (listFromVariantArgs):
        (identiferFromNPIdentifier):
        (_NPN_CreateScriptObject):
        (NPN_Call):
        (NPN_Evaluate):
        (NPN_GetProperty):
        (NPN_SetProperty):
        (NPN_RemoveProperty):
        * bindings/NP_jsobject.h:
        * bindings/c/c_class.cpp:
        (CClass::methodsNamed):
        (CClass::fieldNamed):
        * bindings/c/c_instance.cpp:
        (CInstance::invokeMethod):
        * bindings/c/c_utility.cpp:
        (convertNPVariantToValue):
        * bindings/c/c_utility.h:
        * bindings/npruntime.cpp:
        (stringIdentifierEqual):
        (stringIdentifierHash):
        (getStringIdentifierDictionary):
        (intIdentifierEqual):
        (intIdentifierHash):
        (getIntIdentifierDictionary):
        (NPN_GetStringIdentifier):
        (NPN_GetStringIdentifiers):
        (NPN_GetIntIdentifier):
        (NPN_IdentifierIsString):
        (NPN_UTF8FromIdentifier):
        (NPN_VariantToInt32):
        (NPN_VariantToDouble):
        (NPN_SetException):
        * bindings/npruntime.h:
        * bindings/objc/WebScriptObject.mm:
        (+[WebScriptObject _convertValueToObjcValue:KJS::root:Bindings::]):
        * bindings/runtime_object.cpp:
        (RuntimeObjectImp::~RuntimeObjectImp):
        * bindings/runtime_root.cpp:
        (KJS::Bindings::rootForInterpreter):
        * bindings/testbindings.cpp:
        (initializeIdentifiers):
        (logMessage):
        (setDoubleValue):
        (setIntValue):
        (setBooleanValue):

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

16 years ago- bump the version number in TOT to 148u, since I burned 147 for the WWDC demo build
vicki [Thu, 24 Jun 2004 00:23:11 +0000 (00:23 +0000)]
- bump the version number in TOT to 148u, since I burned 147 for the WWDC demo build

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

16 years ago Fixed <rdar://problem/3707162>: accessing embeds[] plug-in interface may crash
rjw [Wed, 23 Jun 2004 00:16:44 +0000 (00:16 +0000)]
Fixed <rdar://problem/3707162>: accessing embeds[] plug-in interface may crash

embedInstance was uninitialized.

        Reviewed by Chris.

        * khtml/html/html_objectimpl.cpp:
        (HTMLEmbedElementImpl::HTMLEmbedElementImpl):

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

16 years ago * English.lproj/StringsNotToBeLocalized.txt: Updated for recent changes.
darin [Mon, 21 Jun 2004 23:50:34 +0000 (23:50 +0000)]
    * English.lproj/StringsNotToBeLocalized.txt: Updated for recent changes.

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

16 years ago Made WebKitErrorDescriptionPlugInCancelledConnection have its own description string
cblu [Mon, 21 Jun 2004 22:13:21 +0000 (22:13 +0000)]
Made WebKitErrorDescriptionPlugInCancelledConnection have its own description string
(Not for software update branch)

        Reviewed by john.

        * English.lproj/Localizable.strings:
        * Misc.subproj/WebKitErrors.m:

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

16 years ago Made WebKitErrorDescriptionPlugInCancelledConnection properly reuse an already local...
cblu [Mon, 21 Jun 2004 22:05:33 +0000 (22:05 +0000)]
Made WebKitErrorDescriptionPlugInCancelledConnection properly reuse an already localized string to avoid loc changes.

        Reviewed by john.

        * ChangeLog:
        * Misc.subproj/WebKitErrors.m:

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

16 years agoWebKit:
cblu [Mon, 21 Jun 2004 21:28:58 +0000 (21:28 +0000)]
WebKit:

Fixed: <rdar://problem/3701269> change in error handling behavior from 10.3.3 to 10.3.4 breaks unreleased Adobe PDF plug-in

        Reviewed by john.

        * Misc.subproj/WebKitErrors.m:
        (registerErrors): register string for WebKitErrorPlugInCancelledConnection
        * Misc.subproj/WebKitErrorsPrivate.h:
        * Plugins.subproj/WebBaseNetscapePluginStream.h:
        * Plugins.subproj/WebBaseNetscapePluginStream.m:
        (-[WebBaseNetscapePluginStream startStreamWithURL:expectedContentLength:lastModifiedDate:MIMEType:]): use renamed WEB_REASON_PLUGIN_CANCELLED constant
        (-[WebBaseNetscapePluginStream destroyStream]): ditto
        * Plugins.subproj/WebNetscapePluginRepresentation.m:
        (-[WebNetscapePluginRepresentation cancelWithReason:]): if the reason is WEB_REASON_PLUGIN_CANCELLED, cancel the load with WebKitErrorPlugInCancelledConnection
        * Plugins.subproj/WebNetscapePluginStream.m:
        (-[WebNetscapePluginStream cancelWithReason:]): ditto

WebBrowser:

Fixed: <rdar://problem/3701269> change in error handling behavior from 10.3.3 to 10.3.4 breaks unreleased Adobe PDF plug-in

        Reviewed by john.

        * LoadProgressMonitor.m:
        * LocationChangeHandler.m: if the error is WebKitErrorPlugInCancelledConnection ignore it
        (-[LocationChangeHandler webView:locationChangeDone:forDataSource:]): ditto

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

16 years agoadd a release marker for WebCore-146.1
vicki [Mon, 21 Jun 2004 17:46:51 +0000 (17:46 +0000)]
add a release marker for WebCore-146.1

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

16 years agoadd release marker for JSC-146.1
vicki [Mon, 21 Jun 2004 17:24:11 +0000 (17:24 +0000)]
add release marker for JSC-146.1

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

16 years ago Fixed <rdar://problem/3702287> Crash returning nil from bound ObjC
rjw [Sat, 19 Jun 2004 01:41:24 +0000 (01:41 +0000)]
Fixed <rdar://problem/3702287> Crash returning nil from bound ObjC

This turned out to be a show stopper for Dashboard.  Accessing a nil
ObjC property from JS caused a crash.  Similar to the problem
3696112 fixed below.

        Reviewed by Trey.

        * bindings/objc/objc_runtime.mm:
        (KJS::Bindings::ObjcField::valueFromInstance):

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

16 years ago 3702053 - DHTML dragging destination can't control the cursor (by setting the drop...
trey [Fri, 18 Jun 2004 23:58:14 +0000 (23:58 +0000)]
3702053 - DHTML dragging destination can't control the cursor (by setting the drop operation)

Fallout from security work, but an easy fix.

        Reviewed by Darin

        * kwq/KWQClipboard.mm:
        (KWQClipboard::setDropEffect):  Allow dest side to set dropEffect.

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

16 years ago Reviewed by John.
darin [Fri, 18 Jun 2004 23:50:23 +0000 (23:50 +0000)]
    Reviewed by John.

        - re-fixed <rdar://problem/3701893> show expert preferences notes in xcode causes crash (in EllipsisBox code)

        * khtml/rendering/render_block.cpp: (khtml::RenderBlock::paintEllipsisBoxes):
        Check !isInlineFlow rather than checking hasMarkupTruncation. Otherwise, we break
        plain old non-markup truncation.

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

16 years ago Reviewed by John.
darin [Fri, 18 Jun 2004 23:21:55 +0000 (23:21 +0000)]
    Reviewed by John.

        - fixed <rdar://problem/3701893> show expert preferences notes in xcode causes crash (in EllipsisBox code)

        * khtml/rendering/render_block.cpp: (khtml::RenderBlock::paintEllipsisBoxes):
        Only walk the ellipsis list if hasMarkupTruncation is true.

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

16 years ago Reviewed by Darin
sullivan [Fri, 18 Jun 2004 20:57:05 +0000 (20:57 +0000)]
    Reviewed by Darin

        - fixed <rdar://problem/3534851> Pop up windows not showing up within SAP's
        BW Module (changing location.href on new window created by window.open)

        * khtml/khtml_part.cpp:
        (KHTMLPart::scheduleRedirection):
        allow new redirect to win if delay <= current delay, not just <

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

16 years agoset version to 147u
vicki [Thu, 17 Jun 2004 22:46:04 +0000 (22:46 +0000)]
set version to 147u

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

16 years agoSafari-146 stamp
vicki [Thu, 17 Jun 2004 22:39:14 +0000 (22:39 +0000)]
Safari-146 stamp

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

16 years ago Changed private headers to be pubic for npapi.h and npfunctions.h. That
rjw [Thu, 17 Jun 2004 20:18:57 +0000 (20:18 +0000)]
Changed private headers to be pubic for npapi.h and npfunctions.h.  That
API was approved but never marked as public in the project file.  This change does
not make npruntime.h public, which contains the not yet approved changes
for script-ability of netscape plugins.  Unfortunately, that API will not
be public for WWDC.

        Reviewed by Chris.

        * WebKit.pbproj/project.pbxproj:

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

16 years ago Fixed <rdar://problem/3698867> setting the canvas or parent to display:none and...
rjw [Thu, 17 Jun 2004 18:24:46 +0000 (18:24 +0000)]
Fixed <rdar://problem/3698867> setting the canvas or parent to display:none and updating the causes a nil-deref

Ensured that we have a renderer before rendering.

        Reviewed by John.

        * khtml/ecma/kjs_html.cpp:
        (KJS::Context2DFunction::tryCall):

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

16 years ago Fix for 3674601, "Read More..." links should trail articles in Emerson.
hyatt [Thu, 17 Jun 2004 18:09:49 +0000 (18:09 +0000)]
Fix for 3674601, "Read More..." links should trail articles in Emerson.

        Reviewed by darin

        * khtml/rendering/bidi.cpp:
        (khtml::RenderBlock::layoutInlineChildren):
        (khtml::RenderBlock::deleteEllipsisLineBoxes):
        (khtml::RenderBlock::checkLinesForTextOverflow):
        * khtml/rendering/render_block.cpp:
        (khtml:::RenderFlow):
        (khtml::RenderBlock::paintEllipsisBoxes):
        (khtml::RenderBlock::nodeAtPoint):
        (khtml::shouldCheckLines):
        (khtml::getLineAtIndex):
        (khtml::getHeightForLineCount):
        (khtml::RenderBlock::lineAtIndex):
        (khtml::RenderBlock::lineCount):
        (khtml::RenderBlock::heightForLineCount):
        (khtml::RenderBlock::clearTruncation):
        * khtml/rendering/render_block.h:
        (khtml::RenderBlock::setHasMarkupTruncation):
        (khtml::RenderBlock::hasMarkupTruncation):
        * khtml/rendering/render_flexbox.cpp:
        (khtml::RenderFlexibleBox::layoutVerticalBox):
        * khtml/rendering/render_line.cpp:
        (khtml::EllipsisBox::m_str):
        (khtml::InlineBox::adjustPosition):
        (khtml::InlineFlowBox::adjustPosition):
        (khtml::InlineFlowBox::clearTruncation):
        (khtml::EllipsisBox::paint):
        (khtml::EllipsisBox::nodeAtPoint):
        (khtml::RootInlineBox::clearTruncation):
        (khtml::RootInlineBox::placeEllipsis):
        (khtml::RootInlineBox::paintEllipsisBox):
        (khtml::RootInlineBox::hitTestEllipsisBox):
        (khtml::RootInlineBox::adjustPosition):
        (khtml::RootInlineBox::childRemoved):
        * khtml/rendering/render_line.h:
        (khtml::InlineBox::clearTruncation):
        * khtml/rendering/render_text.cpp:
        * khtml/rendering/render_text.h:
        (khtml::InlineTextBox::clearTruncation):

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

16 years agoWebCore:
trey [Thu, 17 Jun 2004 08:30:25 +0000 (08:30 +0000)]
WebCore:

3698514 - coordinates in ondragstart and ondrag events are wrong

This part fixes the ondragstart coords.  We salt away the window-based mouseDown
location, since we need that when we dispatch the ondragstart event.  Previously
we were errantly using a mouseDown point that had already been converted to view
coords, and then the dispatch converted it again.

        Reviewed by Maciej.

        * kwq/KWQKHTMLPart.h:
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::khtmlMouseMoveEvent):  Use window based mouse event coords to dispatch event.
        (KWQKHTMLPart::mouseDown):  Save window based mouse event coords .

WebKit:

3698514 - coordinates in ondragstart and ondrag events are wrong

This part fixes the ondrag coords.  I thought Cocoa passed us the mouse location
in draggedImage:movedTo:, but no, it's the position of the dragged image.
WebCore needs the mouse location, so to calc that we must save away the
offset of the mouse relative to the image when we kick off the drag.

        Reviewed by Maciej.

        * Misc.subproj/WebNSViewExtras.h:
        * Misc.subproj/WebNSViewExtras.m:
        (-[NSView _web_dragImage:rect:event:pasteboard:source:offset:]): Add the ability
to return the offset of the cursor wrt to the drag image, since this routine
generates its own drag image and positions it.
        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView _startDraggingImage:at:operation:event:sourceIsDHTML:DHTMLWroteData:]):
Calc the offset of the cursor wrt to the drag image in the myriad of ways
that we kick off the drag.
        (-[WebHTMLView draggedImage:movedTo:]):  Adjust the location by the
offset we save when we kicked off the drag.
        (-[WebHTMLView draggedImage:endedAt:operation:]):  Ditto.
        * WebView.subproj/WebHTMLViewInternal.h:
        * WebView.subproj/WebImageView.m:
        (-[WebImageView mouseDragged:]):  Pass nil for new arg, we don't care.

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

16 years ago- versioning and ChangeLog marker for WebCore-145.1 (WebCore-145 plus the selection...
vicki [Thu, 17 Jun 2004 04:52:31 +0000 (04:52 +0000)]
- versioning and ChangeLog marker for WebCore-145.1 (WebCore-145 plus the selection fix)

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

16 years agoWebCore:
hyatt [Thu, 17 Jun 2004 01:38:30 +0000 (01:38 +0000)]
WebCore:

Fix for 3596620, implement a subset of CSS3 text truncation for Emerson.

        Reviewed by mjs

        * khtml/rendering/bidi.cpp:
        (khtml::RenderBlock::checkLinesForTextOverflow):
        * khtml/rendering/font.cpp:
        (Font::checkSelectionPoint):
        * khtml/rendering/font.h:
        * khtml/rendering/render_block.cpp:
        (khtml::RenderBlock::paintObject):
        (khtml::RenderBlock::paintFloats):
        (khtml::RenderBlock::paintEllipsisBoxes):
        * khtml/rendering/render_block.h:
        * khtml/rendering/render_line.cpp:
        (InlineBox::canAccommodateEllipsis):
        (InlineBox::placeEllipsisBox):
        (InlineFlowBox::paintDecorations):
        (InlineFlowBox::placeEllipsisBox):
        (EllipsisBox::paint):
        (RootInlineBox::placeEllipsis):
        (RootInlineBox::placeEllipsisBox):
        * khtml/rendering/render_line.h:
        (khtml::EllipsisBox::m_str):
        (khtml::RootInlineBox::ellipsisBox):
        * khtml/rendering/render_text.cpp:
        (InlineTextBox::placeEllipsisBox):
        (InlineTextBox::paintDecoration):
        (InlineTextBox::offsetForPosition):
        (RenderText::positionForCoordinates):
        (RenderText::paint):
        * khtml/rendering/render_text.h:
        * kwq/KWQFontMetrics.h:
        * kwq/KWQFontMetrics.mm:
        (QFontMetrics::checkSelectionPoint):
        * kwq/WebCoreTextRenderer.h:

WebKit:

In order to support truncation in Emerson, enhance pointToOffset so that it needn't include partial
character glyphs (the left half of a glyph).

        Reviewed by mjs

        * WebCoreSupport.subproj/WebTextRenderer.m:
        (-[WebTextRenderer pointToOffset:style:position:reversed:includePartialGlyphs:]):
        (-[WebTextRenderer _ATSU_pointToOffset:style:position:reversed:includePartialGlyphs:]):
        (-[WebTextRenderer _CG_pointToOffset:style:position:reversed:includePartialGlyphs:]):

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

16 years ago Reviewed by John.
mjs [Thu, 17 Jun 2004 01:19:22 +0000 (01:19 +0000)]
    Reviewed by John.

<rdar://problem/3697602> REGRESSION (144.2-TOT) Selection highlight does not draw

        * khtml/rendering/render_canvas.cpp:
        (RenderCanvas::setSelection):

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

16 years ago Fixed <rdar://problem/3696112>: nil from an Objective-C class seems to get wrapped...
rjw [Thu, 17 Jun 2004 00:54:18 +0000 (00:54 +0000)]
Fixed <rdar://problem/3696112>: nil from an Objective-C class seems to get wrapped as a JavaScript proxy that will not print.

This turned out to be a show stopper for Dashboard.  We now
return Undefined() when nil is returned from a ObjC method
that returns an object type.

        Reviewed by Maciej.

        * bindings/objc/objc_utility.mm:
        (KJS::Bindings::convertObjcValueToValue):

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

16 years agochange version number to 146u -- the tree is open
vicki [Wed, 16 Jun 2004 23:46:08 +0000 (23:46 +0000)]
change version number to 146u -- the tree is open

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

16 years agoSafari-145 stamp
vicki [Wed, 16 Jun 2004 23:32:17 +0000 (23:32 +0000)]
Safari-145 stamp

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

16 years ago Reviewed by Darin.
sullivan [Wed, 16 Jun 2004 18:37:40 +0000 (18:37 +0000)]
    Reviewed by Darin.

        - fixed <rdar://problem/3685827> Add standard news feeds from marketing.

        * BookmarksController.m:
        (-[BookmarksController mergeBuiltInBookmarksIfNecessary]):
        Use a different file for Tiger than for Panther; only the Tiger one
        has the news feeds in it.

        * English.lproj/BuiltInBookmarks.plist:
        new file that contains news feeds from marketing

        * English.lproj/OldBuiltInBookmarks.plist:
        Added. New name for old file.

        * WebBookmark.m:
        (-[WebBookmark dictionaryRepresentation]):
        #ifdeffed hack to avoid writing out UUIDs; used for creating built-in bookmarks file

        * WebBookmarkLeaf.m:
        (-[WebBookmarkLeaf dictionaryRepresentation]):
        #ifdeffed hack to avoid writing out last visited time; used for creating built-in bookmarks file

        * WebBookmarkList.m:
        (-[WebBookmarkList dictionaryRepresentation]):
        #ifdeffed hack to avoid writing out proxy bookmarks; used for creating built-in bookmarks file

        * WebBrowser.pbproj/project.pbxproj:
        updated for new file

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

16 years ago - fixed <rdar://problem/3696081> REGRESSION: <WebKit/CarbonUtils.h> doesn...
darin [Wed, 16 Jun 2004 18:18:40 +0000 (18:18 +0000)]
    - fixed <rdar://problem/3696081> REGRESSION: <WebKit/CarbonUtils.h> doesn't build any more

        Reviewed by Trey.

        * Carbon.subproj/CarbonUtils.h: Fixed include. Need to include <ApplicationServices/ApplicationServices.h>
        to get CGImageRef; can't include an individual header.

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

16 years ago Fixed 3695730: Added support for document.embeds[], much like
rjw [Wed, 16 Jun 2004 18:09:53 +0000 (18:09 +0000)]
Fixed 3695730:  Added support for document.embeds[], much like
document.applets[], to allow access to a plugin's exported interface.

        Reviewed by Chris.

        * khtml/dom/html_document.cpp:
        (HTMLDocument::embeds):
        * khtml/dom/html_document.h:
        * khtml/ecma/kjs_dom.cpp:
        (KJS::getRuntimeObject):
        * khtml/ecma/kjs_html.cpp:
        (KJS::HTMLDocument::tryGet):
        (KJS::HTMLElement::tryGet):
        (KJS::HTMLCollection::tryGet):
        (KJS::HTMLCollection::getNamedItems):
        * khtml/ecma/kjs_html.h:
        (KJS::HTMLDocument::):
        * khtml/ecma/kjs_html.lut.h:
        (KJS::):
        * khtml/html/html_miscimpl.cpp:
        (HTMLCollectionImpl::calcLength):
        (HTMLCollectionImpl::getItem):
        (HTMLCollectionImpl::getNamedItem):
        * khtml/html/html_miscimpl.h:
        (DOM::HTMLCollectionImpl::):
        * khtml/html/html_objectimpl.cpp:
        (HTMLEmbedElementImpl::getEmbedInstance):
        * khtml/html/html_objectimpl.h:
        * kwq/KWQKHTMLPart.h:
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::getEmbedInstanceForView):

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

16 years ago Reviewed by Dave.
mjs [Wed, 16 Jun 2004 06:29:26 +0000 (06:29 +0000)]
    Reviewed by Dave.

<rdar://problem/3695907>: (can't enable selection inside parent where it is disabled via CSS)

        * khtml/css/cssparser.cpp:
        (CSSParser::parseValue):
        * khtml/css/cssstyleselector.cpp:
        (khtml::CSSStyleSelector::applyProperty):
        * khtml/rendering/render_object.cpp:
        (RenderObject::shouldSelect):
        * khtml/rendering/render_style.h:
        (khtml::):
        (khtml::RenderStyle::userSelect):
        (khtml::RenderStyle::setUserSelect):
        (khtml::RenderStyle::initialUserSelect):

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

16 years agoWebKit:
rjw [Wed, 16 Jun 2004 02:12:14 +0000 (02:12 +0000)]
WebKit:
Fixed <rdar://problem/3695875>: Objective-C instances that are exported to JavaScript are too promiscuous

Flip the policy for exposing Objective-C methods and properties.

Reviewed by Trey.

* Plugins.subproj/WebPluginPackage.m:
(+[NSObject isSelectorExcludedFromWebScript:]):  Just return YES.
(+[NSObject isKeyExcludedFromWebScript:]):  Just return YES.

JavaScriptCore:
Fixed <rdar://problem/3695875>: Objective-C instances that are exported to JavaScript are too promiscuous

No longer need to check respondsToSelector: for
isSelectorExcludedFromWebScript: and isKeyExcludedFromWebScript:
because these now have a default implementation on NSObject.

        Reviewed by Trey.

        * bindings/objc/objc_class.mm:
        (ObjcClass::methodsNamed):
        (ObjcClass::fieldNamed):

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

16 years ago 3639321 - Harvard PIN authentication ends up sending PIN as clear text with POST...
trey [Wed, 16 Jun 2004 01:59:26 +0000 (01:59 +0000)]
3639321 - Harvard PIN authentication ends up sending PIN as clear text with POST action

When going back/forward to an item, if we went there originally via a POST,
we ask the user about rePOSTing, and if they say yes, we resend the POST.
This rePOST case is triggered by the form data that we saved on the b/f item.
In the case of this bug, the overall navigation was accomplished by a POST,
then a redirect, causing a GET.  When a load of type redirect achieves the Committed
stage, we replace the current URL in the b/f item with the new URL (instead of
adding a new item to the b/f list).

The bug is that at the same time we should also update the form data in
the b/f item to match that of the new request.  I think this will normally
mean nil'ing it out, unless there's some way for the result of the redirect
to be another POST.

The security leak occurred because we did not clear the form data on the item,
so when going back or forward to the page, we would go into the rePOSTing code,
even though we eventually reached that page via a GET (caused by the redirect).
So we would do a POST to the redirect URL containing the private data sent in
the original POST.

        Reviewed by mjs and rjw.

        * History.subproj/WebHistoryItem.m:
        (-[WebHistoryItem _setFormInfoFromRequest:]):  New method, just wraps 3 old set methods.
        (-[WebHistoryItem formData]):  Diff being dumb, no change.
        (-[WebHistoryItem formContentType]):  Ditto
        (-[WebHistoryItem formReferrer]): Ditto
        * History.subproj/WebHistoryItemPrivate.h:
        * WebView.subproj/WebFrame.m:
        (-[WebFrame _createItem:]):  Call new WebHistoryItem method - no change in real behavior
        (-[WebFrame _transitionToCommitted:]):  Clear out the form data at the key time, to fix the bug.

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

16 years ago Initial impl of the EllipsisBox. This code just gets the box created and gets it...
hyatt [Wed, 16 Jun 2004 01:19:26 +0000 (01:19 +0000)]
Initial impl of the EllipsisBox.  This code just gets the box created and gets it placed vertically.  The next
stage will be to position the box horizontally as well.

        Reviewed by trey

        * khtml/rendering/bidi.cpp:
        (khtml::RenderBlock::checkLinesForTextOverflow):
        * khtml/rendering/render_line.cpp:
        (RootInlineBox::placeEllipsis):
        * khtml/rendering/render_line.h:
        (khtml::EllipsisBox::m_str):

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

16 years ago Fixed: <rdar://problem/3695724> WebKit plug-ins should only have to implement plugIn...
cblu [Wed, 16 Jun 2004 00:41:21 +0000 (00:41 +0000)]
Fixed: <rdar://problem/3695724> WebKit plug-ins should only have to implement plugInViewWithArguments:

        Reviewed by rjw.

        * ChangeLog:
        * Plugins.subproj/WebPluginViewFactory.h: mention that plugInViewWithArguments is required
        * WebView.subproj/WebFrame.m:
        (-[WebFrame _reloadForPluginChanges]): check for plugInViewWithArguments: not webPlugInInitialize
        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView addSubview:]): ditto

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

16 years ago Implement canAccommodateEllipsis. The basic idea is that everything on a line will...
hyatt [Wed, 16 Jun 2004 00:00:13 +0000 (00:00 +0000)]
Implement canAccommodateEllipsis.  The basic idea is that everything on a line will allow an ellipsis to be
drawn on top of it unless it's a replaced element.  Then, if the replaced element overlaps, the ellipsis won't
be allowed.

        Reviewed by john

        * khtml/rendering/bidi.cpp:
        (khtml::RenderBlock::checkLinesForTextOverflow):
        * khtml/rendering/render_line.cpp:
        (InlineBox::closestLeafChildForXPos):
        (InlineBox::canAccommodateEllipsis):
        (InlineFlowBox::canAccommodateEllipsis):
        (RootInlineBox::canAccommodateEllipsis):
        * khtml/rendering/render_line.h:

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

16 years ago 3695240 - pasting plain text with newlines in it turns them into spaces
trey [Tue, 15 Jun 2004 22:48:02 +0000 (22:48 +0000)]
3695240 - pasting plain text with newlines in it turns them into spaces

Easy fix, we just need to consume the incoming data as text instead of markup.

        Reviewed by John and Darin.

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

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

16 years ago - added a few layout tests, rdar://3694510
vicki [Tue, 15 Jun 2004 18:07:27 +0000 (18:07 +0000)]
- added a few layout tests, rdar://3694510

        * layout-tests/editing/deleting/delete-image-004-expected.txt: Added.
        * layout-tests/editing/deleting/delete-image-004.html: Added.
        * layout-tests/editing/selection/extend-by-character-006-expected.txt: Added.
        * layout-tests/editing/selection/extend-by-character-006.html: Added.

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

16 years ago Dragging tweak: We pass the mouse down coords instead of the
trey [Tue, 15 Jun 2004 16:15:07 +0000 (16:15 +0000)]
Dragging tweak:  We pass the mouse down coords instead of the
latest mouse drag coords to the ondragstart event.  This makes it
easy for the client to figure the correct drag image offset,
whereas the mouse drag location is next to useless for that.

        Reviewed by Louch

        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::khtmlMouseMoveEvent):

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

16 years ago Reviewed by Darin.
mjs [Tue, 15 Jun 2004 09:44:45 +0000 (09:44 +0000)]
    Reviewed by Darin.

<rdar://problem/3685236>: (Safari does not support onselectstart event handler)

        * khtml/ecma/kjs_dom.cpp:
        (DOMNode::getValueProperty):
        (DOMNode::putValue):
        * khtml/ecma/kjs_dom.h:
        (KJS::DOMNode::):
        * khtml/ecma/kjs_dom.lut.h:
        (KJS::):
        * khtml/html/html_elementimpl.cpp:
        (HTMLElementImpl::parseHTMLAttribute):
        * khtml/misc/htmlattrs.c:
        (hash_attr):
        (findAttr):
        * khtml/misc/htmlattrs.h:
        * khtml/misc/htmlattrs.in:
        * khtml/rendering/render_object.cpp:
        (RenderObject::shouldSelect):
        * khtml/xml/dom2_eventsimpl.cpp:
        (EventImpl::typeToId):
        (EventImpl::idToType):
        * khtml/xml/dom2_eventsimpl.h:
        (DOM::EventImpl::):

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

16 years ago Reviewed by Darin.
mjs [Tue, 15 Jun 2004 08:49:17 +0000 (08:49 +0000)]
    Reviewed by Darin.

Fix crash with last checkin.

        * khtml/ecma/kjs_binding.cpp:
        (ScriptInterpreter::domObjectsPerDocument): check the same
property we want to initialize.

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