18 years ago Divorce the notion of a marquee being stopped from JS from the notion of being suspe...
hyatt [Sat, 21 Aug 2004 00:58:24 +0000 (00:58 +0000)]
Divorce the notion of a marquee being stopped from JS from the notion of being suspended by the back/forward cache.

        * khtml/ecma/kjs_html.cpp:
        * khtml/rendering/render_layer.cpp:
        * khtml/rendering/render_layer.h:

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

18 years agoFix layout tests.
hyatt [Fri, 20 Aug 2004 23:37:47 +0000 (23:37 +0000)]
Fix layout tests.

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

18 years ago Fix the directionality of the unicode hyphen so that on Panther it now matches Tiger.
hyatt [Fri, 20 Aug 2004 23:12:11 +0000 (23:12 +0000)]
Fix the directionality of the unicode hyphen so that on Panther it now matches Tiger.

        Reviewed by darin

        * Misc.subproj/WebUnicode.m:

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

18 years agoAdded.
rjw [Fri, 20 Aug 2004 23:09:09 +0000 (23:09 +0000)]

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

18 years agoWebKit:
rjw [Fri, 20 Aug 2004 21:57:16 +0000 (21:57 +0000)]
    Implemented new JNI abstraction.  We no longer invoke Java methods
    directly with JNI, rather we call into the plugin.  This allows the
    plugin to dispatch the call to the appropriate VM thread.  This
    change should (will?) fix a whole class of threading related problems with
    the Java VM.

        Reviewed by Hyatt.

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

        Implemented new JNI abstraction.  We no longer invoke Java methods
        directly with JNI, rather we call into the plugin.  This allows the
        plugin to dispatch the call to the appropriate VM thread.  This
        change should (will?) fix a whole class of threading related problems with
        the Java VM.

        Reviewed by Hyatt.

        * kwq/KWQKHTMLPart.mm:
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge executionContextForView:]):

        Implemented new JNI abstraction.  We no longer invoke Java methods
        directly with JNI, rather we call into the plugin.  This allows the
        plugin to dispatch the call to the appropriate VM thread.  This
        change should (will?) fix a whole class of threading related problems with
        the Java VM.

        Reviewed by Hyatt.

        * JavaScriptCore.pbproj/project.pbxproj:
        * bindings/c/c_instance.h:
        * bindings/jni/jni_instance.cpp:
        * bindings/jni/jni_instance.h:
        * bindings/jni/jni_jsobject.cpp:
        * bindings/jni/jni_runtime.cpp:
        * bindings/jni/jni_runtime.h:
        * bindings/jni/jni_utility.h:
        * bindings/objc/objc_instance.h:
        * bindings/runtime.cpp:
        * bindings/runtime.h:
        * bindings/runtime_root.h:

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

18 years ago Reviewed by Darin.
mjs [Fri, 20 Aug 2004 21:15:22 +0000 (21:15 +0000)]
    Reviewed by Darin.

More text paint cleanup. Separated the background and foreground
passes instead of doing a weird for loop thing. Eliminated
redundant if conditions. Added comments.

        * khtml/rendering/render_text.cpp:

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

18 years ago Reviewed by Darin
kocienda [Fri, 20 Aug 2004 20:19:53 +0000 (20:19 +0000)]
    Reviewed by Darin

        * khtml/css/css_computedstyle.cpp:
        (DOM::): Changed CopyProperties constant to InheritableProperties. This reflects the
        name change of copy() to copyInheritableProperties()
        (DOM::CSSComputedStyleDeclarationImpl::copyInheritableProperties: Renamed from copy().
        Now just copies those properties which can be inherited.
        (DOM::CSSComputedStyleDeclarationImpl::diff): Add a couple null checks.
        * khtml/css/css_computedstyle.h: copyInheritableProperties name change. No longer needs to be virtual.
        * khtml/css/css_valueimpl.cpp: Removed unneeded copy() function from CSSStyleDeclarationImpl.
        * khtml/css/css_valueimpl.h: Ditto.
        * khtml/editing/htmlediting.cpp:
        (khtml::EditCommand::typingStyle): Added.
        (khtml::EditCommand::setTypingStyle): Added.
        * khtml/editing/htmlediting.h:
        * khtml/editing/htmlediting_impl.cpp:
        (khtml::StyleChange::currentlyHasStyle): Fix leak of computed style used in this function.
        (khtml::EditCommandImpl::EditCommandImpl): Initialize m_typingStyle.
        (khtml::EditCommandImpl::~EditCommandImpl): Deref m_typingStyle.
        (khtml::EditCommandImpl::assignTypingStyle): New helper used in setting typing style.
        (khtml::EditCommandImpl::setTypingStyle): New setter.
        (khtml::DeleteSelectionCommandImpl::doApply): Use new method for managing typing style.
        * khtml/editing/htmlediting_impl.h:
        (khtml::EditCommandImpl::typingStyle): New accessor.
        * khtml/khtml_part.cpp:
        (KHTMLPart::appliedEditing): Restores typing style from command after setting selection.
        (KHTMLPart::applyStyle): Does a diff between the current style and the style of the caret.
        * khtml/khtml_part.h:
        * khtml/xml/dom_position.cpp:
        (DOM::Position::computedStyle): Now returns a CSSComputedStyleDeclarationImpl instead of a plain
        * khtml/xml/dom_position.h:
        * layout-tests/editing/style/style-3681552-fix-002-expected.txt:

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

18 years agoGet rid of weird chars in bug titles from last checkin (maybe nb spaces?)
trey [Fri, 20 Aug 2004 18:44:42 +0000 (18:44 +0000)]
Get rid of weird chars in bug titles from last checkin (maybe nb spaces?)

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

18 years agoWebCore:
trey [Fri, 20 Aug 2004 18:29:07 +0000 (18:29 +0000)]

3655407 - Editing:�complete:�ethod�nimplemented�WebKit�diting�PI)

One new support routine here.

        Reviewed by John

        * kwq/WebCoreBridge.h:
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge caretRectAtNode:offset:]):  New routine.
        (-[WebCoreBridge rangeByExpandingSelectionWithGranularity:]):
Fixed former misleading method name.


3655407 - Editing:�complete:�ethod�nimplemented�WebKit�diting�PI)

This feature is mostly implemented.  The only loose ends I know of are:

3769654 - text insertions done via complete: should preserve case of full replacement string
3769652 - positioning of complete: popup window wrong for right-to-left languages

        Reviewed by John

        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLViewPrivate dealloc]):  Free new object.
        (-[WebHTMLView menuForEvent:]):  Bail on completion session.
        (-[WebHTMLView windowDidResignKey:]):  Ditto.
        (-[WebHTMLView windowWillClose:]):  Ditto.
        (-[WebHTMLView mouseDown:]):  Ditto.
        (-[WebHTMLView resignFirstResponder]):  Ditto.
        (-[WebHTMLView keyDown:]):  Bail on completion session if WebCore takes the event.
Give the CompleteController a crack at the key event.
        (-[WebHTMLView _expandSelectionToGranularity:]):  Adopt method rename
        (-[WebHTMLView complete:]):  Make CompleteController, tell it to do its thing.
        (-[WebHTMLView checkSpelling:]):  Add ERROR().
        (-[WebHTMLView showGuessPanel:]): Add ERROR().
        (-[WebHTMLView _changeSpellingToWord:]): Add ERROR().
        (-[WebHTMLView ignoreSpelling:]): Add ERROR().

        (-[WebTextCompleteController initWithHTMLView:]):
        (-[WebTextCompleteController dealloc]):
        (-[WebTextCompleteController _insertMatch:]): Stick the new string into the doc.
        (-[WebTextCompleteController _buildUI]):  Make popup window.
        (-[WebTextCompleteController _placePopupWindow:]):  Position popup window.
        (-[WebTextCompleteController doCompletion]):  Lookup matches, display window.
        (-[WebTextCompleteController endRevertingChange:moveLeft:]):  Bail on complete: session.
        (-[WebTextCompleteController filterKeyDown:]):  Process keys while popup is up.
        (-[WebTextCompleteController _reflectSelection]):  Handle choice in popup.
        (-[WebTextCompleteController tableAction:]):  Handle double click in popup
        (-[WebTextCompleteController numberOfRowsInTableView:]):  Fill table with matches.
        (-[WebTextCompleteController tableView:objectValueForTableColumn:row:]):  Ditto.
        (-[WebTextCompleteController tableViewSelectionDidChange:]):  Handle selection change.
        * WebView.subproj/WebHTMLViewInternal.h:

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

18 years agoI neglected to add these files on my previous checkin
kocienda [Fri, 20 Aug 2004 16:57:07 +0000 (16:57 +0000)]
I neglected to add these files on my previous checkin

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

18 years ago Reviewed by Trey
kocienda [Fri, 20 Aug 2004 16:55:47 +0000 (16:55 +0000)]
    Reviewed by Trey

        Fix for this bug:

        <rdar://problem/3768378> crash typing newline in Blot

        * khtml/editing/htmlediting_impl.cpp:
        (khtml::InputNewlineCommandImpl::doApply): Adding an assert in a recent change
        showed up that inserting newlines that was not being handled correctly for the
        case described in the bug. I added a new case to handle inserting BR's when
        at the caret max offset for a node, and this new code runs instead of the
        fall-through case that should not have been running and triggered the assert.
        * layout-tests/editing/inserting/insert-br-case2-expected.txt: Regenerated results.
        * layout-tests/editing/inserting/insert-br-case6-expected.txt: Added.
        * layout-tests/editing/inserting/insert-br-case6.html: Added.

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

18 years ago Fixing: Spellchecker called once or twice for every char typed.
trey [Fri, 20 Aug 2004 16:53:59 +0000 (16:53 +0000)]
    Fixing: Spellchecker called once or twice for every char typed.

        Reviewed by Ken

        * khtml/khtml_part.cpp:
        (KHTMLPart::setSelection):  Don't do any spell checking if we're typing (it's done
        elsewhere, in markMisspellingsAfterTyping)

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

18 years ago * English.lproj/StringsNotToBeLocalized.txt:
sullivan [Fri, 20 Aug 2004 16:06:33 +0000 (16:06 +0000)]
    * English.lproj/StringsNotToBeLocalized.txt:
        checked this in; the only difference is that
        the strings were out of order.

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

18 years ago Reviewed by John.
mjs [Fri, 20 Aug 2004 03:26:06 +0000 (03:26 +0000)]
    Reviewed by John.

- fixed <rdar://problem/3549369> Crash at www.e1.ru in HTMLTokenizer::notifyFinished

Probably also fixed the following likely duplicates:

<rdar://problem/3503938> Safari crashed opening many tabs (HTMLTokenizer::notifyFinished(khtml::CachedObject*))
<rdar://problem/3566332> CrashTracer: ..405 crashes at com.apple.WebCore: QString::QString[unified] + 0x5c
<rdar://problem/3703964> CrashTracer: ...86 crashes at com.apple.WebCore: QString::QString[unified] + 0x5c
<rdar://problem/3703969> CrashTracer: ..234 crashes at com.apple.WebCore: HTMLTokenizer::notifyFinished + 0x1c8

        * khtml/xml/dom_docimpl.cpp:
        (DocumentImpl::open): call setParsing(true), because we need to know we are once again
parsing when we re-open a document that has previously completed loading.

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

18 years ago Reviewed by Dave and Darin.
mjs [Fri, 20 Aug 2004 02:21:32 +0000 (02:21 +0000)]
    Reviewed by Dave and Darin.

        * khtml/rendering/render_text.cpp:
        (RenderText::paint): Split apple and non-apple code paths to allow further cleanup.

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

18 years ago Reviewed by Dave.
darin [Fri, 20 Aug 2004 00:38:01 +0000 (00:38 +0000)]
    Reviewed by Dave.

        - fixed <rdar://problem/3767274> crash in partForWidget inside setFocus (test page attached)

        * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::nextKeyViewInFrame): Remove code to do position
        the widget; no longer needed since we reworked how widgets get their positions.
        * kwq/KWQWidget.mm: (QWidget::setFocus): Ditto. This was the one that caused the bug.

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

18 years ago Continue to call old pollForAppletInView: in Tiger until
rjw [Fri, 20 Aug 2004 00:11:34 +0000 (00:11 +0000)]
    Continue to call old pollForAppletInView: in Tiger until
        we get an plugin that supports the new API.

        Reviewed by Chris.

        * WebCoreSupport.subproj/WebBridge.m:
        (-[WebBridge getAppletInView:]):
        * WebKit.pbproj/project.pbxproj:

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

18 years ago Fix crash when text is contained inside a table-colgroup.
hyatt [Thu, 19 Aug 2004 23:23:33 +0000 (23:23 +0000)]
Fix crash when text is contained inside a table-colgroup.

        Reviewed by john

        * khtml/xml/dom_textimpl.cpp:

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

18 years ago Unexpected errors hit while finding word boundaries, leading to crash.
trey [Thu, 19 Aug 2004 23:17:26 +0000 (23:17 +0000)]
Unexpected errors hit while finding word boundaries, leading to crash.

        Reviewed by Ken.

        * kwq/KWQTextUtilities.cpp:
        (KWQFindWordBoundary):  Don't call UCFindTextBreak with edge cases it thinks
are param errors, and pass correct mask for forward case.  Also fix off-by-one
crashers in fallback code.

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

18 years ago Make XSLT imports/includes work. This code has to be turned off until the newer...
hyatt [Thu, 19 Aug 2004 22:50:30 +0000 (22:50 +0000)]
Make XSLT imports/includes work.  This code has to be turned off until the newer version of libxslt is

        Reviewed by kocienda

        * khtml/css/css_ruleimpl.cpp:
        * khtml/xml/dom_docimpl.cpp:
        * khtml/xml/dom_docimpl.h:
        * khtml/xml/dom_xmlimpl.cpp:
        * khtml/xml/xml_tokenizer.cpp:
        * khtml/xsl/xsl_stylesheetimpl.cpp:
        * khtml/xsl/xsl_stylesheetimpl.h:
        * khtml/xsl/xslt_processorimpl.cpp:
        * khtml/xsl/xslt_processorimpl.h:

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

18 years agoset version to Safari 2.0, (v159u) for tip of tree.
vicki [Thu, 19 Aug 2004 21:00:11 +0000 (21:00 +0000)]
set version to Safari 2.0, (v159u) for tip of tree.

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

18 years agoSafari-158 stamp
vicki [Thu, 19 Aug 2004 20:54:53 +0000 (20:54 +0000)]
Safari-158 stamp

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

18 years ago Fixed typo in comment.
cblu [Thu, 19 Aug 2004 17:34:06 +0000 (17:34 +0000)]
Fixed typo in comment.

        * Misc.subproj/WebIconDatabase.m:
        (-[WebIconDatabase _updateFileDatabase]):

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

18 years ago Fixed: <rdar://problem/3566336> CrashTracer: .2403 crashes at com.apple.WebKit:...
cblu [Thu, 19 Aug 2004 17:33:36 +0000 (17:33 +0000)]
Fixed: <rdar://problem/3566336> CrashTracer: .2403 crashes at com.apple.WebKit: -[WebFileDatabase performSetObject:forKey:] + 0x94

        Reviewed by trey.

        * Misc.subproj/WebIconDatabase.m:
        (-[WebIconDatabase _updateFileDatabase]): pass WebFileDatabase copies of the mutable dictionaries or else they may be accessed on a separate thread as the main thread is modifying them

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

18 years ago- initialize deletedElementIndex to make the compiler happy
vicki [Thu, 19 Aug 2004 16:21:29 +0000 (16:21 +0000)]
- initialize deletedElementIndex to make the compiler happy

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

18 years ago 3765958 - downstreamPosition() can hit infinite loop when at end of doc
trey [Thu, 19 Aug 2004 00:30:38 +0000 (00:30 +0000)]
3765958 - downstreamPosition() can hit infinite loop when at end of doc

The problem was that I had a position that was after the maximum position in the text
node, because it was the old caret position before a backspace was processed.  Later
I happened to call downstream() on that position, and hit the bug.  Fix is to consider
a position past the end point of its node if it is *greater than* or equal to its max offset.

        Reviewed by Ken.

        * khtml/xml/dom_positioniterator.cpp:

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

18 years ago Make the header overlap the footer in the zero-line case. Changes to Emerson's...
hyatt [Thu, 19 Aug 2004 00:15:47 +0000 (00:15 +0000)]
Make the header overlap the footer in the zero-line case.  Changes to Emerson's template will ensure the
header draws over the footer.

        Reviewed by darin

        * khtml/rendering/render_block.cpp:

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

18 years agoWebKit:
rjw [Wed, 18 Aug 2004 23:34:39 +0000 (23:34 +0000)]
        Replace horrible pollForAppletInView: with new
        webPlugInGetApplet.  The details of how the applet instance
        is provided now belong to the Java team.  Yeh.

        Reviewed by Chris.

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

        Replace horrible pollForAppletInView: with new
        webPlugInGetApplet.  The details of how the applet instance
        is provided now belong to the Java team.  Yeh.

        Reviewed by Chris.

        * kwq/KWQKHTMLPart.mm:
        * kwq/WebCoreBridge.h:

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

18 years ago Fixed: <rdar://problem/3692199> 8A146: Safari crashes in toHTMLWithOptions, selectio...
cblu [Wed, 18 Aug 2004 18:19:40 +0000 (18:19 +0000)]
Fixed: <rdar://problem/3692199> 8A146: Safari crashes in toHTMLWithOptions, selection with no renderer (various sites)

        Reviewed by trey.

        * khtml/xml/dom2_rangeimpl.cpp:
        (DOM::RangeImpl::toHTML): renamed, don't assume that nodes of the range had renderers, use the common ancestor of the range as the root
        * khtml/xml/dom2_rangeimpl.h:
        * khtml/xml/dom_nodeimpl.cpp:
        (NodeImpl::recursive_toHTML): renamed, removed code that determines whether to include the root in the HTML, leave this up to the caller
        * khtml/xml/dom_nodeimpl.h:
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge markupStringFromNode:nodes:]): call renamed methods
        (-[WebCoreBridge markupStringFromRange:nodes:]): ditto

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

18 years ago Reviewed by me
kocienda [Wed, 18 Aug 2004 17:43:35 +0000 (17:43 +0000)]
    Reviewed by me

        * khtml/css/css_valueimpl.cpp:
        (CSSStyleDeclarationImpl::copy): Roll back silly last minute change that broke this code.
        Note to self: read code before making changes to it.

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

18 years ago Coded by Darin and Ken
kocienda [Wed, 18 Aug 2004 17:34:22 +0000 (17:34 +0000)]
    Coded by Darin and Ken

        * khtml/css/css_computedstyle.cpp: Added CopyProperties static array. This contains
        the properties we implement that we also want to copy in the new
        CSSComputedStyleDeclarationImpl::copy described below.
        (DOM::CSSComputedStyleDeclarationImpl::copy): New function. In this class, copies the
        computed values of all the properties listed in CopyProperties. In essence, this makes
        a freeze-dired version of a computed style.
        (DOM::CSSComputedStyleDeclarationImpl::diff): Removes every property from the passed-in
        CSSStyleDeclarationImpl that is also in the computed style.
        * khtml/css/css_computedstyle.h:
        * khtml/css/css_valueimpl.cpp:
        (CSSStyleDeclarationImpl::copy): New function. In this class, the copy operation is
        straightforward. Returns a copy that will be unchanged when the original changes.
        * khtml/css/css_valueimpl.h:
        (DOM::CSSStyleDeclarationImpl::values): Added a accessor suitable for use when the
        CSSStyleDeclarationImpl is const.

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

18 years agoChange some tabs to spaces.
darin [Wed, 18 Aug 2004 03:13:30 +0000 (03:13 +0000)]
Change some tabs to spaces.

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

18 years ago Fixed <rdar://problem/3759093> Need PDF context menu: "Open in Preview" or...
rjw [Wed, 18 Aug 2004 01:16:50 +0000 (01:16 +0000)]
    Fixed <rdar://problem/3759093> Need PDF context menu: "Open in Preview" or other external app

        Added support for "Open with ..." in PDF view.

        Reviewed by Chris and Trey.

        * ChangeLog:
        * English.lproj/Localizable.strings:
        * English.lproj/StringsNotToBeLocalized.txt:
        * WebView.subproj/WebPDFView.h:
        * WebView.subproj/WebPDFView.m:
        (-[WebPDFView initWithFrame:]):
        (-[WebPDFView dealloc]):
        (-[WebPDFView path]):
        (-[WebPDFView menuForEvent:]):
        (-[WebPDFView setDataSource:]):
        (-[WebPDFView layout]):
        (-[WebPDFView viewDidMoveToHostWindow]):
        (-[WebPDFView openWithFinder:]):

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

18 years ago Reviewed by Darin.
mjs [Wed, 18 Aug 2004 00:09:46 +0000 (00:09 +0000)]
    Reviewed by Darin.

<rdar://problem/3703768> CrashTracer: ...50 crashes at com.apple.WebCore: KHTMLPart::xmlDocImpl const + 0

        * khtml/khtmlview.cpp:
        (KHTMLView::viewportMouseMoveEvent): Add a nil check and an
assertion for m_part being null. It seems impossible for this to
happen, so we want to debug it ourselves, but in the meantime,
let's try to avoid causing crashes for our users.

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

18 years ago Reviewed by Adele.
darin [Wed, 18 Aug 2004 00:07:10 +0000 (00:07 +0000)]
    Reviewed by Adele.

        - fixed <rdar://problem/3746676> SAP WebDynpro app hangs inside JavaScript property map hash table code (deleted sentinel problem)

        * kjs/property_map.h: Added some private functions.
        * kjs/property_map.cpp:
        (KJS::PropertyMap::clear): Set sentinelCount to 0.
        (KJS::PropertyMap::put): Complete search for the element before choosing to use the deleted-element sentinel.
        Also keep sentinel count up to date when we destroy a sentinel by overwriting with a new added element.
        (KJS::PropertyMap::expand): Added. Calls rehash with a size 2x the old size, or 16.
        (KJS::PropertyMap::rehash): Added. Refactored the rehash code into a separate function.
        (KJS::PropertyMap::remove): Add one to sentinelCount, and rehash if 1/4 or more of the elements are
        deleted-element sentinels.
        (KJS::PropertyMap::checkConsistency): Check the sentinelCount.

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

18 years ago Code change by Eric Albert, reviewd by me.
mjs [Tue, 17 Aug 2004 23:19:59 +0000 (23:19 +0000)]
    Code change by Eric Albert, reviewd by me.

<rdar://problem/3571960> washingtonpost.com claims I don't have cookies enabled and won't let me read articles

        * kjs/date_object.cpp:
        (timetUsingCF): Clamp time to LONG_MAX (getting rid of time_t
entirely would be even better, but is not required to fix this bug.

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

18 years ago JNI needs both the jmethodID and return type. Changed API to
rjw [Tue, 17 Aug 2004 22:14:06 +0000 (22:14 +0000)]
    JNI needs both the jmethodID and return type.  Changed API to
        pass both.

        Reviewed by Chris.

        * Plugins.subproj/WebJavaPlugIn.h:

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

18 years ago Fix the line truncation function for Emerson so that at the far left setting of...
hyatt [Tue, 17 Aug 2004 22:03:28 +0000 (22:03 +0000)]
Fix the line truncation function for Emerson so that at the far left setting of the slider, only the header
is visible.

        Reviewed by darin

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

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

18 years ago Reviewed by Hyatt
kocienda [Tue, 17 Aug 2004 21:53:45 +0000 (21:53 +0000)]
    Reviewed by Hyatt

        Rewrite of the command that deletes a selection. I deleted great
        big swaths of bug-ridden code to accomplish this and replaced it
        with code that is much cleaner and smarter.

        Also, renamed equivalentUpstreamPosition and equivalentDownstreamPosition to
        upstream to downstream, respectively.

        Added a couple of new helper methods.

        * khtml/editing/htmlediting.cpp: DeleteCollapsibleWhitespaceCommand and
        RemoveNodeAndPruneCommand now obsolete. A huge win.
        * khtml/editing/htmlediting.h: Ditto.
        * khtml/editing/htmlediting_impl.cpp:
        (khtml::debugPosition): Fix printf which had a placeholder, but no argument passed in the varargs.
        (khtml::CompositeEditCommandImpl::deleteUnrenderedText): New helper. Much simplified and cleaner
        version of
        (khtml::ApplyStyleCommandImpl::doApply): upstream/downstream name change
        (khtml::ApplyStyleCommandImpl::nodeFullySelected):  upstream/downstream name change
        (khtml::DeleteSelectionCommandImpl::doApply):  upstream/downstream name change
        (khtml::DeleteTextCommandImpl::DeleteTextCommandImpl): Add an assert to check that the
        passed offset is less than the length of the text node.
        (khtml::InputNewlineCommandImpl::insertNodeAfterPosition): upstream/downstream name change
        (khtml::InputNewlineCommandImpl::insertNodeBeforePosition): upstream/downstream name change
        (khtml::InputNewlineCommandImpl::doApply): upstream/downstream name change
        (khtml::InputTextCommandImpl::prepareForTextInsertion): upstream/downstream name change
        (khtml::InputTextCommandImpl::execute): upstream/downstream name change
        (khtml::InputTextCommandImpl::insertSpace): upstream/downstream name change
        (khtml::ReplaceSelectionCommandImpl::doApply): upstream/downstream name change
        (khtml::TypingCommandImpl::issueCommandForDeleteKey): upstream/downstream name change
        * khtml/editing/htmlediting_impl.h:
        * khtml/xml/dom_position.cpp:
        (DOM::Position::inRenderedText): Add null check.
        (DOM::Position::isRenderedCharacter): New helper.
        (DOM::isWS): New helper in this file.
        (DOM::Position::leadingWhitespacePosition): New helper. Factored out from htmlediting_impl.cpp.
        (DOM::Position::trailingWhitespacePosition): Ditto.
        (DOM::Position::debugPosition): Add null check.
        * khtml/xml/dom_position.h:
        * khtml/xml/dom_selection.cpp:
        (DOM::Selection::toRange): upstream/downstream name change
        (DOM::Selection::validate): upstream/downstream name change
        (DOM::Selection::debugPosition): upstream/downstream name change
        * layout-tests/editing/deleting/delete-block-contents-003-expected.txt: Updated tests with new expected results.
        * layout-tests/editing/deleting/delete-contiguous-ws-001-expected.txt: Ditto.
        * layout-tests/editing/deleting/delete-selection-001-expected.txt: Ditto.
        * layout-tests/editing/deleting/delete-trailing-ws-001-expected.txt: Ditto.
        * layout-tests/editing/inserting/insert-br-case1-expected.txt: Ditto.
        * layout-tests/editing/inserting/insert-br-case2-expected.txt: Ditto.
        * layout-tests/editing/style/style-3681552-fix-002-expected.txt: Ditto.

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

18 years ago Various spelling fixes.
trey [Tue, 17 Aug 2004 21:41:11 +0000 (21:41 +0000)]
Various spelling fixes.

        Reviewed by Ken.

        * khtml/khtml_part.cpp:
        (KHTMLPart::setSelection): No misspellings in the spelling code comments
        * khtml/xml/dom_docimpl.cpp:
        (DocumentImpl::removeMarker):  Repaint if doc changes.  Sometimes the markers
were not being erased when you clicked in a word.
        * khtml/xml/dom_position.cpp:
        (DOM::Position::previousWordBoundary):  Small optimization.  Bail after first
try if the second try will not come out any different.
        (DOM::Position::nextWordBoundary):  Ditto
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::markMisspellingsInSelection):  Comment.

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

18 years agoAdded a bug number to the textarea bug fix check-in,
darin [Tue, 17 Aug 2004 20:42:47 +0000 (20:42 +0000)]
Added a bug number to the textarea bug fix check-in,
so I can look it up here in ChangeLog.

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

18 years ago Reviewed by Maciej.
darin [Tue, 17 Aug 2004 20:41:15 +0000 (20:41 +0000)]
    Reviewed by Maciej.

        - fixed <rdar://problem/3689700> crash loading page; stoxx.com (works in IE and Firefox)

        * khtml/khtml_part.h: Make completeURL public.
        * kwq/KWQKJavaAppletWidget.mm: (KJavaAppletWidget::KJavaAppletWidget): Complete the base URL
        before passing it across the bridge. This sidesteps the crashing bug in CFURL, filed as
        '<rdar://problem/3764632> CFURLCreateAbsoluteURLWithBytes crashes if passed the string "../.."'
        and also is obviously correct behavior that may fix other sites too.

        - fixed <rdar://problem/3547725> Crashes at csuohio.edu, list box vs. mouse event problem (Spoof No Fix)

        * kwq/KWQListBox.mm:
        (QListBox::~QListBox): Nil out the pointer from the KWQTableView back to the widget by calling
        a new detach method.
        (-[KWQTableView detach]): Set the pointer to the QListBox to 0. Also set the delegate and data
        source to nil, so we don't need nil checks in delegate and data source methods.
        (-[KWQTableView mouseDown:]): Add nil check.
        (-[KWQTableView keyDown:]): Add nil check.
        (-[KWQTableView keyUp:]): Add nil check.
        (-[KWQTableView becomeFirstResponder]): Add nil check.
        (-[KWQTableView resignFirstResponder]): Add nil check.
        (-[KWQTableView canBecomeKeyView]): Add nil check.
        (-[KWQTableView tableViewSelectionDidChange:]): Add nil checks, even though this is a delegate
        callback, to handle cases where calls to JavaScript result in the QListBox going away partway
        (-[KWQTableView drawRow:clipRect:]): Add nil check.
        (-[KWQTableView _accessibilityTableCell:tableColumn:]): Add nil check.

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

18 years ago Fix ASSERT in spelling marker management.
trey [Tue, 17 Aug 2004 19:55:27 +0000 (19:55 +0000)]
Fix ASSERT in spelling marker management.

        Reviewed by John.

        * khtml/xml/dom_docimpl.cpp:
        (DocumentImpl::shiftMarkers):  Use assert instead of ASSERT.
Tweak test to allow for a start position of 0.

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

18 years agoWebCore:
trey [Tue, 17 Aug 2004 19:48:29 +0000 (19:48 +0000)]

3764147 - failure of subframe to load leaves links in parent doc broken

        Reviewed by Maciej.

        * khtml/khtml_part.cpp:
        (KHTMLPart::childBegin):  New method to mark part as not complete.
        (KHTMLPart::processObjectRequest):  Mark child part imcomplete, so if we
later get a failure on load it won't think it's already complete and do nothing.
        * khtml/khtml_part.h:


3764147 - failure of subframe to load leaves links in parent doc broken

        Reviewed by Maciej.

        * WebView.subproj/WebDataSource.m:
        (-[WebDataSource _receivedMainResourceError:complete:]):
Need to call [bridge end] in the case of an error, so WC can clean up.

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

18 years agoset version number to '158u'. the tree is open
vicki [Tue, 17 Aug 2004 19:05:12 +0000 (19:05 +0000)]
set version number to '158u'.  the tree is open

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

18 years agoSafari-157 stamp
vicki [Tue, 17 Aug 2004 18:59:48 +0000 (18:59 +0000)]
Safari-157 stamp

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

18 years agoFix project so that OTHER_LDFLAGS in the project also links dynamically to libxslt
hyatt [Tue, 17 Aug 2004 04:53:54 +0000 (04:53 +0000)]
Fix project so that OTHER_LDFLAGS in the project also links dynamically to libxslt

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

18 years ago Fix the #define. I had it all backwards.
hyatt [Tue, 17 Aug 2004 02:10:37 +0000 (02:10 +0000)]
Fix the #define.  I had it all backwards.

        * WebCorePrefix.h:

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

18 years ago Land initial support for XSLT using xml-stylesheet PIs.
hyatt [Tue, 17 Aug 2004 01:54:55 +0000 (01:54 +0000)]
Land initial support for XSLT using xml-stylesheet PIs.

        * WebCore.pbproj/project.pbxproj:
        * khtml/khtml_part.cpp:
        * khtml/khtml_part.h:
        * khtml/khtmlview.h:
        * khtml/xml/dom_docimpl.cpp:
        * khtml/xml/dom_docimpl.h:
        * khtml/xml/dom_xmlimpl.cpp:
        * khtml/xml/dom_xmlimpl.h:
        * khtml/xml/xml_tokenizer.cpp:
        * khtml/xml/xml_tokenizer.h:
        * khtml/xml/xsl_stylesheetimpl.cpp: Removed.
        * khtml/xml/xsl_stylesheetimpl.h: Removed.
        * khtml/xsl/xsl_stylesheetimpl.cpp: Added.
        * khtml/xsl/xsl_stylesheetimpl.h: Added.
        * khtml/xsl/xslt_processorimpl.cpp: Added.
        * khtml/xsl/xslt_processorimpl.h: Added.

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

18 years ago Fix build.
mjs [Mon, 16 Aug 2004 23:06:41 +0000 (23:06 +0000)]
    Fix build.

        * khtml/khtml_part.cpp:

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

18 years ago Fixed <rdar://problem/3704339> Context2D forces integer positions in drawImage
rjw [Mon, 16 Aug 2004 22:26:32 +0000 (22:26 +0000)]
Fixed <rdar://problem/3704339> Context2D forces integer positions in drawImage

Use floats instead of ints to draw images.

        Reviewed by Ken.

        * khtml/ecma/kjs_html.cpp:
        * kwq/KWQPainter.h:
        * kwq/KWQPainter.mm:

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

18 years ago Reviewed by Darin.
mjs [Mon, 16 Aug 2004 22:21:01 +0000 (22:21 +0000)]
    Reviewed by Darin.

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

(actually the previous fix for this bug was mostly correct, but
this additional change is needed to avoid the regression in
<rdar://problem/3751025> REGRESSION: website rejects Safari 125.9
as "need to upgrade to IE 6", but didn't reject 125.8

So if merging for a software update, make sure to include both
this and the previous fix.

        * khtml/html/htmltokenizer.cpp:
        (khtml::HTMLTokenizer::write): When there is an immediate reidrect pending,
make sure to stop tokenizing, because we need to make sure no further
script tags are processed beyond the one that triggered the redirect.
        * khtml/khtml_part.cpp:
        (KHTMLPart::isImmediateRedirectPending): New method to allow
checking if a redirect is pending.
* khtml/khtml_part.h:

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

18 years ago Fixed <rdar://problem/3581092> cash in KJS::Bindings::JSObject::eval at tcvet...
rjw [Mon, 16 Aug 2004 21:17:53 +0000 (21:17 +0000)]
    Fixed <rdar://problem/3581092> cash in KJS::Bindings::JSObject::eval at tcvetantcvetkov.com

        Adds bullet proofing to protect against evaluation of bogus JS in all the flavors of bindings (Java, C, and ObjC).

        Reviewed by Chris.

        * bindings/NP_jsobject.cpp:
        * bindings/jni/jni_jsobject.cpp:
        * bindings/objc/WebScriptObject.mm:
        (-[WebScriptObject evaluateWebScript:]):

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

18 years ago Fix the blank textarea problem by ensuring that any change to a <textarea>'s DOM...
hyatt [Mon, 16 Aug 2004 20:56:16 +0000 (20:56 +0000)]
Fix the blank textarea problem by ensuring that any change to a <textarea>'s DOM children causes the form control
to resync with the DOM.  This behavior matches WinIE.

        Reviewed by kocienda

        * khtml/html/html_formimpl.cpp:
        * khtml/html/html_formimpl.h:

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

18 years agoWebKit:
rjw [Mon, 16 Aug 2004 03:41:56 +0000 (03:41 +0000)]
        More changes to np headers.

        Reviewed by Darin.

        * Plugins.subproj/WebNetscapePluginPackage.m:
        (-[WebNetscapePluginPackage load]):
        * Plugins.subproj/npapi.h:
        * Plugins.subproj/npfunctions.h:
        * Plugins.subproj/npruntime.h:

More updates to np headers.  Implemented new NPN functions.

        Reviewed by Darin.

        * bindings/NP_jsobject.cpp:
        * bindings/npapi.h:
        * bindings/npruntime.h:

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

18 years agoBack out accidental bad change.
mjs [Fri, 13 Aug 2004 22:04:17 +0000 (22:04 +0000)]
Back out accidental bad change.

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

18 years agotop level:
mjs [Fri, 13 Aug 2004 21:58:24 +0000 (21:58 +0000)]
top level:

        Reviewed by Ken.

        * Makefile.am: Remove WebKitExamples for now, until it actually works to
include it in a recursive make.


        Reviewed by NOBODY (OOPS!).

        * Plugins.subproj/npapi.h:

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

18 years ago 3761794 Slider doesn't call onmouseup handler
trey [Fri, 13 Aug 2004 21:26:15 +0000 (21:26 +0000)]
3761794 Slider doesn't call onmouseup handler

        Reviewed by Hyatt

        * khtml/rendering/render_form.cpp:
        (RenderSlider::RenderSlider):  Listen for signal.
        (RenderSlider::slotClicked):  Pass to superclass.
        * khtml/rendering/render_form.h:
        * kwq/KWQSlider.h:
        * kwq/KWQSlider.mm:
        (-[KWQSlider mouseDown:]):  Generate mouseUp and clicked events,
since AK consumes the mouseUp event in a modal tracking loop.
        (QSlider::QSlider):  Make signal.
        (QSlider::clicked):  Send signal.

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

18 years ago Reviewed by Chris.
darin [Fri, 13 Aug 2004 17:45:12 +0000 (17:45 +0000)]
    Reviewed by Chris.

        - fixed <rdar://problem/3760924> Carbon path passed in NPP_StreamAsFile must be in local character set, not UTF-8

        * Plugins.subproj/WebBaseNetscapePluginStream.m:
        (CarbonPathFromPOSIXPath): Added. New function that uses the path pieces from an FSSpec.
        This has many advantages; the big one that fixes the bug is that it gives the mangled names
        that work even for files that have names that can't otherwise be encoded in Carbon-style
        path names. I didn't write this from scratch: I started with the method in Foundation
        and just changed it to use FSSpec.
        (-[WebBaseNetscapePluginStream destroyStream]): Remove code that used NSString and just call
        CarbonPathFromPOSIXPath instead.

        * Plugins.subproj/npapi.h: The Revision tag wanted to touch this file.
        I think we are going to have some trouble with this; I'd like to take that out.

        * English.lproj/StringsNotToBeLocalized.txt: Updated.

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

18 years agoWebCore:
trey [Fri, 13 Aug 2004 17:13:29 +0000 (17:13 +0000)]

3761329 - query result links all dead in ingrammicro.com (sometimes)
3761328 - links in some docs dead when doc is loaded from WebArchive

Make sure to get part to completed state when end is called,
even if we have no doc.  See WebKit changelog for more info.

        Reviewed by Richard and Darin.

        * khtml/khtml_part.cpp:


        3761329 - query result links all dead in ingrammicro.com (sometimes)
        3761328 - links in some docs dead when doc is loaded from WebArchive

        Nasty problem.  It turns out that these result pages are a parent frame with two child
        frames.  One of the child frames is a 1 or 2 byte text document.  When the text child
        is the last doc to complete, because we use a Text rep instead of an HTMLRep, it turns
        out we never send [bridge end] from WebKit.  That mistake results in checkCompleted not
        being called enough in the part, and we never realize the load is done.  WebCore does
        not allow redirects to happen until the entire load is complete,  and  the links on this
        results page are actually little pieces of JS that set location to a generated URL.  Since
        redirects are not allowed these links all silently fail to do anything, and the doc never
        achieves a completed state where they will work.

        Solution is to make sure we always call [bridge end] from the DataSource instead of only
        the HTML rep doing it.

        Reviewed by Richard and Darin.

        * WebView.subproj/WebDataSource.m:
        (-[WebDataSource _finishedLoading]):  Call [bridge end] here for all kinds of docs.
        * WebView.subproj/WebHTMLRepresentation.m:
        (-[WebHTMLRepresentation finishedLoadingWithDataSource:]):  Don't call is just for HTMLReps.

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

18 years ago 3761098 - red dotted underline for misspelled words shows up in drag image
trey [Fri, 13 Aug 2004 16:57:01 +0000 (16:57 +0000)]
    3761098 - red dotted underline for misspelled words shows up in drag image

        Reviewed by Ken

        * khtml/rendering/render_text.cpp:
        (RenderText::paint):  Don't draw misspelling when creating selection image.

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

18 years ago - fix build so we can compile again
darin [Fri, 13 Aug 2004 16:50:08 +0000 (16:50 +0000)]
    - fix build so we can compile again

        * bindings/npapi.h: Added. Richard forgot to check this in. The one I'm checking in here
        is good enough so that we can compile, but it's only a stopgap measure, because I think
        Richard has a newer one he wants to check in.

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

18 years agoWebKit:
rjw [Fri, 13 Aug 2004 01:31:22 +0000 (01:31 +0000)]
        Bring npruntime.h and friends closer to compliance with
        latest spec.

        Reviewed by Maciej.

        * Plugins.subproj/npapi.h:
        * Plugins.subproj/npfunctions.h:
        * Plugins.subproj/npruntime.h:
        * copy-webcore-files-to-webkit:

Bring npruntime.h and friends closer to compliance with
latest spec.

        Reviewed by Maciej.

        * kwq/KWQKHTMLPart.mm:

Bring npruntime.h and friends closer to compliance with
latest spec.

        Reviewed by Maciej.

        * JavaScriptCore.pbproj/project.pbxproj:
        * bindings/NP_jsobject.cpp:
        * bindings/NP_jsobject.h:
        * bindings/c/c_instance.cpp:
        * bindings/c/c_utility.cpp:
        * bindings/npruntime.cpp:
        * bindings/npruntime.h:
        * bindings/npruntime_priv.h: Added.

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

18 years ago Reviewed by Richard.
mjs [Fri, 13 Aug 2004 00:43:52 +0000 (00:43 +0000)]
    Reviewed by Richard.

<rdar://problem/3245706> URLs with backslashes instead of slashes work on WinIE; should work on Safari (SAP)
<rdar://problem/3506429> <BASE> tag containing backslash is breaking images with absolute URLs

        * kwq/KWQKURL.mm:
        (substituteBackslashes): Helper method
        (KURL::KURL): If the URL contains any backslashes, substitute all
that appear before the query or fragment.

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

18 years ago Fixed: <rdar://problem/3761097> should be able to option-drag selection so HTML...
cblu [Fri, 13 Aug 2004 00:25:53 +0000 (00:25 +0000)]
Fixed: <rdar://problem/3761097> should be able to option-drag selection so HTML can be copied within a page

        Reviewed by rjw.

        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView _isMoveDrag]): new, take into account the option key
        (-[WebHTMLView draggingUpdatedWithDraggingInfo:actionMask:]): call _isMoveDrag
        (-[WebHTMLView concludeDragForDraggingInfo:actionMask:]): call _isMoveDrag

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

18 years ago Reviewed by Chris
kocienda [Thu, 12 Aug 2004 23:58:03 +0000 (23:58 +0000)]
    Reviewed by Chris

        Fix for this bug:

        <rdar://problem/3761014> command-down-arrow takes you to start of document instead of end of document

        * khtml/xml/dom_selection.cpp:
        (DOM::Selection::modifyExtendingRightForward): Code used to assume, incorrectly, that index 1 of the
        document element was beyond the last node in the document. But this is not true, since the document
        element is the HTML element (generally). Instead, move to the index equal to the number of children
        of the document element. This puts us past everything.
        (DOM::Selection::modifyMovingRightForward): Ditto.

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

18 years ago Reviewed by Trey
kocienda [Thu, 12 Aug 2004 23:28:33 +0000 (23:28 +0000)]
    Reviewed by Trey

        Fix for this bug:

        <rdar://problem/3695446> shift-down-arrow on last line of editable text should select to end of document

        Detect when current position is on first or last line and move to the
        start or end of that line, respectively.

        * khtml/xml/dom_position.cpp:

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

18 years ago Quick fix for 3760903. The real fix is described in 3760920. Needed
rjw [Thu, 12 Aug 2004 23:19:23 +0000 (23:19 +0000)]
    Quick fix for 3760903.  The real fix is described in 3760920.  Needed
        by Java plugin guys so they can be unblocked for feature freeze.

        Reviewed by Chris.

        * WebView.subproj/WebFrame.m:
        (-[WebFrame _reloadForPluginChanges]):
        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView addSubview:]):

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

18 years agoWebKit:
cblu [Thu, 12 Aug 2004 23:04:52 +0000 (23:04 +0000)]

Fixed: <rdar://problem/3760898> error pages in subframes attempt to load appledata URLs when reloaded

        Reviewed by darin.

        * WebView.subproj/WebFrame.m:
        (-[WebFrame _createItem:]): when setting the original URL of the history item, use the unreachable URL


<rdar://problem/3760743> "Save As.." and "View Source" context menu items should be omitted from error pages
<rdar://problem/3760892> PARENTAL: buttons in parental control error page do nothing when in subframes

        Reviewed by darin

        * BrowserWebController.m:
        (-[BrowserWebView webView:unableToImplementPolicyWithError:frame:]): handle subframes for error page schemes
        * ContextMenuHandler.m:
        (-[BrowserWebView webView:contextMenuItemsForElement:defaultMenuItems:]): omit menu item in error pages

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

18 years ago Reviewed by Adele.
darin [Thu, 12 Aug 2004 23:04:11 +0000 (23:04 +0000)]
    Reviewed by Adele.

        - fixed 3 problems with parse functions that I just wrote, fixing 3 more Mozilla JavaScript tests

        * kjs/function.cpp:
        (KJS::parseDigit): Fix typo, 'Z' instead of 'z', that prevented lowercase hex digits from working.
        (KJS::parseInt): Add octal support. Specification says it's optional, but I guess not.
        (KJS::parseFloat): Fix check for "0x" in parseFloat to return 0 rather than NaN. Also add code
        to skip leading "+" or "-".

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

18 years agoback to 157u, 2.0 for TOT. the tree is open!
vicki [Thu, 12 Aug 2004 22:57:00 +0000 (22:57 +0000)]
back to 157u, 2.0 for TOT.  the tree is open!

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

18 years agoSafari-156 stamp
vicki [Thu, 12 Aug 2004 22:47:47 +0000 (22:47 +0000)]
Safari-156 stamp

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

18 years ago Reviewed by Darin
kocienda [Thu, 12 Aug 2004 20:53:34 +0000 (20:53 +0000)]
    Reviewed by Darin

        Some consolidation in style application code.

        * khtml/editing/htmlediting_impl.cpp:
        (khtml::StyleChange::StyleChange): Made this a full-on class and added a couple of
        members and a constructors to make a StyleChange from a CSSStyleDeclarationImpl, as
        well as from a CSSStyleDeclarationImpl and a Position.
        (khtml::StyleChange::init): Common init function for StyleChange constructors.
        (khtml::StyleChange::currentlyHasStyle): Moved this here from ApplyStyleCommandImpl.
        (khtml::CompositeEditCommandImpl::applyTypingStyle): Tweak to adjust to new StyleChange
        (khtml::ApplyStyleCommandImpl::applyStyleIfNeeded): Ditto.
        * khtml/editing/htmlediting_impl.h:
        (khtml::StyleChange::cssStyle): New accessor.
        (khtml::StyleChange::applyBold): Ditto.
        (khtml::StyleChange::applyItalic): Ditto.
        * khtml/xml/dom_position.cpp:
        (DOM::Position::computedStyle): New helper.
        * khtml/xml/dom_position.h: Ditto.

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

18 years ago Reviewed by Darin
kocienda [Thu, 12 Aug 2004 17:34:56 +0000 (17:34 +0000)]
    Reviewed by Darin

        Fix for this bug:
        <rdar://problem/3751098> HTML email has one set of SPAN tags per character in the message

        Progress on this bug:
        <rdar://problem/3755562> Typing styles do not use same tag application conventions as font and color panel

        * khtml/editing/htmlediting_impl.cpp:
        (khtml::CompositeEditCommandImpl::applyTypingStyle): Name changed from createTypingStyleElement.
        Also, interface changed to take the node to which the typing style is to be applied.
        This makes it easier to apply what may be up to three levels of nested tags to get the
        desired style (<B>, <I>, and <SPAN STYLE="">).
        Also, Borrow some of the style change smarts from ApplyStyleCommandImpl to use bold and
        italic tags for applying styles when that is apprpriate. This creates on opportunity to
        factor the code to do this so that this function and the ApplyStyleCommandImpl class can
        share the implementation. I will follow up with a change to do that after landing this
        change. Some future code factoring could be done here to bring together some similar code
        into one place.
        (khtml::ApplyStyleCommandImpl::applyStyleIfNeeded): Add comment about code factoring work.
        (khtml::ApplyStyleCommandImpl::computeStyleChange): StyleChange struct no longer a member of the
        ApplyStyleCommandImpl class. CompositeEditCommandImpl needs it now in its applyTypingStyle()
        (khtml::InputNewlineCommandImpl::doApply): Pass along node to style to applyTypingStyle.
        (khtml::InputTextCommandImpl::prepareForTextInsertion): Ditto.
        * khtml/editing/htmlediting_impl.h:
        (khtml::StyleChange::StyleChange): Pull this struct out of ApplyStyleCommandImpl so
        CompositeEditCommandImpl can use it.
        * khtml/khtml_part.cpp:
        (KHTMLPart::notifySelectionChanged): Always clear typing style when the selection
        changes, not only when closing typing. This fixes 3751098.

        These three tests actually had results that treated the buggy behavior as correct!

        * layout-tests/editing/style/style-3681552-fix-001-expected.txt
        * layout-tests/editing/style/style-3681552-fix-002-expected.txt
        * layout-tests/editing/style/typing-style-002-expected.txt

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

18 years ago Reviewed by Ken.
darin [Thu, 12 Aug 2004 17:21:29 +0000 (17:21 +0000)]
    Reviewed by Ken.

        - fixed 43 Mozilla JavaScript tests

        * kjs/date_object.h: Change parseDate and timeClip to take and return doubles.
        * kjs/date_object.cpp:
        (DateObjectImp::construct): Change to use a timeClip function that takes and returns a double rather
        than constructing a number object to pass to it.
        (DateObjectFuncImp::call): Change to use a parseDate function that returns a double.
        (KJS::parseDate): Change to return a double instead of creating the Number object here.
        (KJS::timeClip): Implement this as specified in the language standard.

        * kjs/error_object.cpp: (NativeErrorImp::NativeErrorImp): Set the DontDelete, ReadOnly, and DontEnum
        flags on the prototype property.

        * kjs/function.cpp:
        (KJS::FunctionImp::get): Return null rather than undefined for arguments when the function is not
        currently in scope.
        (KJS::isStrWhiteSpace): Added. Matches specification for StrWhiteSpace. Could move it to some utility
        file later.
        (KJS::parseDigit): Added. Helper function for parseInt.
        (KJS::parseInt): Added. Integer parser that puts result in a double so we're not limited to what
        strtoll can handle. Also matches standard more closely.
        (KJS::parseFloat): Added. Handles "0x" properly and passes flag to make empty string turn into NaN
        instead of 0.
        (KJS::GlobalFuncImp::call): Use the new parseInt and parseFloat.

        * kjs/function_object.cpp: (FunctionPrototypeImp::FunctionPrototypeImp): Add a length property.

        * kjs/lexer.h: Added error flag and sawError() function for detecting errors.
        * kjs/lexer.cpp:
        (Lexer::setCode): Clear error state.
        (Lexer::lex): Set error state if the lexer encounters an error

        * kjs/internal.cpp:
        (NumberImp::toString): Roll in change from KDE version to special case 0 so we handle -0 correctly.
        (Parser::parse): Use new lexer error method so those errors are treated like parser errors.

        * kjs/math_object.cpp: (MathFuncImp::call): Change min and max to treat -0 as less than +0.
        Change round to round values between -0.5 and -0 to -0 instead of +0.

        * kjs/nodes.h: Add evaluateReference function to GroupNode.
        * kjs/nodes.cpp: (GroupNode::evaluateReference): Pass references through groups (parenthesized
        expressions) properly so that expressions like "delete (x.y)" work. Before, the parentheses
        would change x.y into a value that can't be deleted as a side effect.

        * kjs/string_object.cpp: Change parameter count for indexOf and lastIndexOf from 2 to 1 to match
        the specification.

        * kjs/testkjs.cpp: Rolled in changes from KDE to add a "quit" function to the test tool and
        get rid of the fixed size limit for code.

        * kjs/ustring.cpp: (KJS::UString::substr): Added optimized case for substr(0, length) so it just
        returns the string without creating a new Rep, since I'm using substr in a place where it will
        often be passed a 0.

        * tests/mozilla/ecma/String/ Fixed one wrong entry in the Unicode table I added to
        the other day that was making a couple tests fail.
        * tests/mozilla/ecma/String/ Ditto.
        * tests/mozilla/ecma/String/ Ditto.
        * tests/mozilla/ecma/String/ Ditto.
        * tests/mozilla/ecma/String/ Ditto.
        * tests/mozilla/ecma/String/ Ditto.

        * kjs/string_object.lut.h: Regenerated.

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

18 years ago Reviewed by Ken.
darin [Thu, 12 Aug 2004 16:45:53 +0000 (16:45 +0000)]
    Reviewed by Ken.

        - fixed <rdar://problem/3740485> Repro crash involving replacing content that includes form field

        * kwq/KWQLineEdit.mm: (QLineEdit::selectAll): Since this function calls selectText: which has a side
        effect of making the text field be first responder, call to bridge first to make it first responder.
        The bridge version lets WebHTMLView know we are changing the responder, avoiding some unpleasantness
        because it sets the "changing focus programmatically" flag. Without that flag set, we were getting
        an additional setFocusNode(0) call, which is unnecessary and incorrect.

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

18 years ago Reviewed by Ken.
darin [Thu, 12 Aug 2004 16:39:08 +0000 (16:39 +0000)]
    Reviewed by Ken.

        - fixed <rdar://problem/3758756> copying text selected with down arrow results in all text to end of document

        * khtml/xml/dom2_rangeimpl.h: Make startNode and pastEndNode public.
        * khtml/xml/dom2_rangeimpl.cpp: (DOM::RangeImpl::pastEndNode): Fix bug where this would return
        one node too far in the case where the end container was not a text node.

        * khtml/xml/dom_nodeimpl.cpp:
        (NodeImpl::recursive_toHTMLWithOptions): Rewrite loop, using startNode and pastEndNode,
        to fix bug where it would run past the end node, including too many nodes in the generated
        HTML. Nice side benefit: easier to read the code.

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

18 years ago - fixed a tiny problem with the UTF-16 PCRE check-in
darin [Thu, 12 Aug 2004 03:17:50 +0000 (03:17 +0000)]
    - fixed a tiny problem with the UTF-16 PCRE check-in

        * pcre/maketables.c: (pcre_maketables): Fix mistake in table-generating code that sometimes caused
        the ctype_meta flag to get set in items that should not have it.

        * pcre/chartables.c: Regenerated.

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

18 years ago Reviewed by me, bug fix by Darin.
adele [Thu, 12 Aug 2004 00:36:43 +0000 (00:36 +0000)]
    Reviewed by me, bug fix by Darin.

- fixed <rdar://problem/3736477> Pages don't load if hard drive is named with non-ASCII Symbol

        * Plugins.subproj/WebBaseNetscapePluginStream.m:
        (-[WebBaseNetscapePluginStream startStreamWithURL:expectedContentLength:lastModifiedDate:MIMEType:]):
Use UTF8String instead of cString to convert the MIME type to a C string. Safer, since it can't
ever fail due to encoding problems even though this string should always be ASCII.
        (-[WebBaseNetscapePluginStream destroyStream]): Use stringWithUTF8String to convert the path name
to an NSString, since stringWithCString is deprecated (doesn't really matter since the path is always
all ASCII). Fix the bug by calling fileSystemRepresentation on the NSString to turn it into a C
string form. Even though the POSIX path can't have any non-ASCII characters in it, the Carbon path
can, so we need to use this instead of cString which can fail depending on characters and encoding.

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

18 years ago Fixed: <rdar://problem/3758216> PARENTAL: buttons on parental controls page only...
cblu [Wed, 11 Aug 2004 23:39:03 +0000 (23:39 +0000)]
Fixed: <rdar://problem/3758216> PARENTAL: buttons on parental controls page only work once

        Reviewed by john.

        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::submitForm): prevent a form from being submitted more than once only if it uses a scheme of http or https

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

18 years ago Reviewed by Ken.
darin [Wed, 11 Aug 2004 21:35:06 +0000 (21:35 +0000)]
    Reviewed by Ken.

        - fixed <rdar://problem/3715878> 8A162: connect.apple.com password field showed in cleartext

        * kwq/KWQTextField.mm: (-[KWQSecureTextField textDidEndEditing:]):
        Enhanced workaround for shifting focus from one secure text field to another so that it works
        even for the case of shifting focus from a secure text field back to itself.

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

18 years ago Reviewed by me
kocienda [Wed, 11 Aug 2004 20:11:49 +0000 (20:11 +0000)]
    Reviewed by me

        Missed adding this file before.

        * kwq/KWQTextUtilities.mm: Added.

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

18 years ago Reviewed by Trey
kocienda [Wed, 11 Aug 2004 17:55:34 +0000 (17:55 +0000)]
    Reviewed by Trey

        Efficiency improvements on string manipulations in these two new function
        implementations. Use the versions of QString append/prepend that take
        (QChar *c, uint length) instead of creating new strings each time.

        * khtml/xml/dom_position.cpp:
        (DOM::Position::previousWordPosition): Changed, as described above.
        (DOM::Position::nextWordPosition): Ditto.

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

18 years ago Reviewed by Darin
kocienda [Wed, 11 Aug 2004 17:27:42 +0000 (17:27 +0000)]
    Reviewed by Darin

        Fix for this bug:
        <rdar://problem/3675812> Moving a word at a time does not use the correct conception of "word"

        I have implemented versions of previousWordPosition and nextWordPosition that are now
        different than previousWordBoundary and nextWordBoundary. The behavior of the new
        functions attempts to match what Cocoa does as closely as it can. Let the bug filing begin!

        * WebCore.pbproj/project.pbxproj: Added KWQTextUtilities.mm
        * khtml/misc/helper.cpp:
        (khtml::nextWordFromIndex): Glue to call through to KWQFindNextWordFromIndex.
        * khtml/misc/helper.h: Declare the function above.
        * khtml/misc/khtml_text_operations.cpp: Added SimplifiedBackwardsTextIterator class.
        (khtml::SimplifiedBackwardsTextIterator::SimplifiedBackwardsTextIterator): New
        (khtml::SimplifiedBackwardsTextIterator::advance): Ditto.
        (khtml::SimplifiedBackwardsTextIterator::handleTextNode): Ditto.
        (khtml::SimplifiedBackwardsTextIterator::handleReplacedElement): Ditto.
        (khtml::SimplifiedBackwardsTextIterator::handleNonTextNode): Ditto.
        (khtml::SimplifiedBackwardsTextIterator::exitNode): Ditto.
        (khtml::SimplifiedBackwardsTextIterator::emitCharacter): Ditto.
        (khtml::SimplifiedBackwardsTextIterator::range): Ditto.
        * khtml/misc/khtml_text_operations.h:
        (khtml::SimplifiedBackwardsTextIterator::atEnd): Ditto.
        (khtml::SimplifiedBackwardsTextIterator::length): Ditto.
        (khtml::SimplifiedBackwardsTextIterator::characters): Ditto.
        * khtml/xml/dom_position.cpp:
        (DOM::Position::previousWordBoundary): Updated to gather appropriate text and call through to
        AppKit to perform the same calculations NSText uses.
        (DOM::Position::nextWordBoundary): Ditto.
        (DOM::Position::previousWordPosition): Unrelated change to fix case where the function could get "stuck".
        (DOM::Position::nextWordPosition): Ditto
        (DOM::Position::equivalentDeepPosition): Changed to look backwards if the position's offset is equal
        to the number of child nodes it has. This handles more cases correctly, like when the position is
        gives as one beyond the end of a document element's last child.
        * kwq/KWQTextUtilities.h: Declared KWQFindNextWordFromIndex.
        * kwq/KWQTextUtilities.mm: Added.
        (KWQFindNextWordFromIndex): New function.

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

18 years ago Reviewed by John
kocienda [Wed, 11 Aug 2004 16:45:12 +0000 (16:45 +0000)]
    Reviewed by John

        Fix for this bug:

        <rdar://problem/3732702> crash in CSSComputedStyleDeclarationImpl running devtools.com editing sample code

        * khtml/khtml_part.cpp:
        (KHTMLPart::selectionComputedStyle): Added a null check.

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

18 years ago Reviewed by Trey.
darin [Wed, 11 Aug 2004 06:26:32 +0000 (06:26 +0000)]
    Reviewed by Trey.

        - fixed <rdar://problem/3710123> Loading iframe that replaces content in the parent document crashes Safari

        I fixed three problems:

            1) script interpreter destroyed while it was interpreting scripts, caused random havoc
            2) code trying to get to view after view was detached from part, caused nil-deref
            3) signals sent to parent after child was no longer in the parent's frames list, caused nil-deref

        Now the test page works fine. Hope the real sites do too.

        * khtml/khtml_part.h: Add connectChild and disconnectChild helper functions (private).
        * khtml/khtml_part.cpp:
        (KHTMLPart::clear): Call disconnectChild on each frame as we detach it (see below).
        (KHTMLPart::end): Ref the part at the start, and deref the part at the end, of this function.
        Otherwise, we can end up destroying the part, and hence the interpreter, inside a script that
        the interpreter itself is running.
        (KHTMLPart::slotFinishedParsing): Add another check for a nil m_view, after the call to
        (KHTMLPart::checkCompleted): Remove bogus if statement with empty body.
        (KHTMLPart::processObjectRequest): Call disconnectChild to disconnect the child <-> parent signals of the
        old child that the new one is replacing, and connectChild to connect the signals (nicer factoring).
        (KHTMLPart::slotChildCompleted): Fixed up a confusing boolean if/expression to be simpler. Not related to
        the bug fix, but an earlier version of the fix had changes in this function.
        (KHTMLPart::connectChild): Added. Connects the appropriate signals for a child frame.
        (KHTMLPart::disconnectChild): Added. Disconnects the same signals that connectChild connects.

        * kwq/KWQKHTMLPart.mm: (KHTMLPart::frameDetached): Added a call to disconnectChild before removing the
        child from the frames list.

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

18 years ago Fixed <rdar://problem/3674747> Need to implement invokeUndefinedMethodFromWeb...
rjw [Wed, 11 Aug 2004 02:51:46 +0000 (02:51 +0000)]
    Fixed <rdar://problem/3674747> Need to implement invokeUndefinedMethodFromWebScript:withArguments:

The following WebScripting methods are now supported on bound

- (id)invokeUndefinedMethodFromWebScript:(NSString *)name withArguments:(NSArray *)args;
        - (void)setValue:(id)value forUndefinedKey:(NSString *)key
        - (id)valueForUndefinedKey:(NSString *)key

        Reviewed by Chris.

        * bindings/c/c_class.cpp:
        * bindings/c/c_class.h:
        * bindings/jni/jni_class.cpp:
        * bindings/jni/jni_class.h:
        * bindings/objc/objc_class.h:
        * bindings/objc/objc_class.mm:
        * bindings/objc/objc_instance.h:
        * bindings/objc/objc_instance.mm:
        * bindings/objc/objc_runtime.h:
        * bindings/objc/objc_runtime.mm:
        * bindings/runtime.h:
        * bindings/runtime_object.cpp:
        * bindings/testbindings.mm:
        (-[MyFirstInterface valueForUndefinedKey:]):
        (-[MyFirstInterface setValue:forUndefinedKey:]):

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

18 years agoWebCore:
mjs [Wed, 11 Aug 2004 00:21:04 +0000 (00:21 +0000)]

        Reviewed by Trey.

WebCore part of:

- made basic marked text highlighting work to complete basic level of <rdar://problem/3704359> input method support not yet implemented for HTML editing

        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge setMarkedDOMRange:]): Added this new call to support storing
a marked range in WebCore. The provided DOMRange must start and end in the same
node, which must be a text node.
        (-[WebCoreBridge markedDOMRange]): New call to get the marked range.
        (-[WebCoreBridge clearMarkedDOMRange]): New call to clear the marked range.
        * kwq/WebCoreBridge.h: Prototype new methods.
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::markedRange): Implementation of WebCore call above.
        (KWQKHTMLPart::setMarkedRange): Implementation of WebCore call above -
store the marked range, and repaint new and old nodes if needed.
        (KWQKHTMLPart::clear): Clear marked range.
        * kwq/KWQKHTMLPart.h: Prototype new methods.
        * khtml/rendering/render_text.cpp:
        (InlineTextBox::paintMarkedTextBackground): New method to paint the background
for marked text, modeled on paintSelection.
(RenderText::paint): Optionally handle painting marked text
background as well as selection background in the marked text
        * khtml/rendering/render_text.h: Prototype new method.


        Reviewed by Trey.

WebKit part of:

- made basic marked text highlighting work to complete basic level of <rdar://problem/3704359> input method support not yet implemented for HTML editing

        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView markedRange]): Use new bridge calls instead of internal marked range storage.
        (-[WebHTMLView hasMarkedText]): Likewise.
        (-[WebHTMLView unmarkText]): Likewise.
        (-[WebHTMLView _selectMarkedText]): Likewise.
        (-[WebHTMLView _selectRangeInMarkedText:]): Likewise.
        (-[WebHTMLView _selectionIsInsideMarkedText]): Likewise.
        (-[WebHTMLView _updateSelectionForInputManager]): Likewise.
        (-[WebHTMLView setMarkedText:selectedRange:]): Use direct bridge call instead
of private _selectMarkedDOMRange: method, which would now be trivial.
        * WebView.subproj/WebHTMLViewInternal.h: Remove unneeded

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

18 years agoJavaScriptCore:
darin [Tue, 10 Aug 2004 21:35:09 +0000 (21:35 +0000)]

        Reviewed by Dave.

        - switch PCRE to do UTF-16 directly instead of converting to/from UTF-8 for speed

        * pcre/pcre.h: Added PCRE_UTF16 switch, set to 1. Added pcre_char typedef, which is char
        or uint16_t depending on the mode, and used appropriate in the 7 public functions
        that need to use it.
        * pcre/pcre.c: Add UTF-16 support to all functions.
        * pcre/study.c: Ditto.

        * pcre/internal.h: Added ichar typedef, which is unsigned char or uint16_t depending on
        the mode. Changed declarations to use symbolic constants and typedefs so we size
        things to ichar when needed.

        * pcre/maketables.c: (pcre_maketables): Change code to make tables that are
        sized to 16-bit characters instead of 8-bit.

        * pcre/get.c:
        (pcre_copy_substring): Use pcre_char instead of char.
        (pcre_get_substring_list): Ditto.
        (pcre_free_substring_list): Ditto.
        (pcre_get_substring): Ditto.
        (pcre_free_substring): Ditto.

        * pcre/dftables.c: (main): Used a bit more const, and use ICHAR sizes instead
        of hard-coding 8-bit table sizes.

        * pcre/chartables.c: Regenerated.

        * kjs/ustring.h: Remove functions that convert UTF-16 to/from UTF-8 offsets.
        * kjs/ustring.cpp: Change the shared empty string to have a unicode pointer that
        is not null. The null string still has a null pointer. This prevents us from
        passing a null through to the regular expression engine (which results in a null
        error even when the string length is 0).

        * kjs/regexp.cpp:
        (KJS::RegExp::RegExp): Null-terminate the pattern and pass it.
        (KJS::RegExp::match): Use the 16-bit string directly, no need to convert to UTF-8.


        Reviewed by Dave.

        - switch PCRE to do UTF-16 directly instead of converting to/from UTF-8 for speed

        * kwq/KWQRegExp.mm:
        (QRegExp::KWQRegExpPrivate::compile): Null-terminate the pattern and pass it.
        (QRegExp::match): Use the 16-bit string directly, no need to convert to UTF-8.

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

18 years ago Reviewed by Maciej.
darin [Tue, 10 Aug 2004 18:43:51 +0000 (18:43 +0000)]
    Reviewed by Maciej.

        - fixed 28 Mozilla JavaScript tests

        * kjs/array_object.cpp: (ArrayProtoFuncImp::call): Check for undefined rather than
        checking the number of arguments for the join method.

        * kjs/lexer.cpp: (Lexer::lex): Parse hexadecimal and octal constants in doubles rather
        than integers, so we aren't limited to 32 bits.

        * kjs/math_object.cpp: (MathFuncImp::call): Get rid of many unneeded special cases in
        the implementation of the pow operation. Also simplied a case that was handling positive
        and negative infinity separately.

        * kjs/nodes.cpp: (ShiftNode::evaluate): Keep the result of shifts in a double instead of
        putting them in a long, so that unsigned shift will work properly.

        * kjs/number_object.cpp: Add the DontDelete and ReadOnly flags to the numeric constants.

        * kjs/operations.cpp:
        (KJS::isPosInf): Added an implementation inside APPLE_CHANGES that does not depend on the
        sign of isinf; our isinf function returns +1 even for negative infinity.
        (KJS::isNegInf): And again.
        (KJS::relation): Put in a nice simple implementation of comparison inside APPLE_CHANGES.
        Our floating point already handles the various infinity cases correctly.

        * kjs/regexp_object.cpp:
        (RegExpProtoFuncImp::call): Add missing return before Null() in Exec method.
        (RegExpObjectImp::arrayOfMatches): Put undefined rather than an empty string into the
        array in cases where we did not match.
        (RegExpObjectImp::construct): Set the DontDelete, ReadOnly, and DontEnum flags for
        "global", "ignoreCase", "multiline", and "source".

        * kjs/string_object.cpp: (StringProtoFuncImp::call): For the match method, turn a null
        string into undefined rather than an empty string. For the slice method, handle an
        undefined parameter for the limit properly as decribed in the specification, and add
        the limit to one case that didn't have the limit at all. For the methods that generate
        HTML strings, use lowercase tags instead of uppercase.

        * kjs/ustring.cpp:
        (KJS::UChar::toLower): Use u_tolower from the ICU library.
        (KJS::UChar::toUpper): Use u_toupper from the ICU library.
        (KJS::UString::append): Fix some math that caused a buffer overflow.
        (KJS::convertUTF16OffsetsToUTF8Offsets): Ignore negative numbers (-1 is used as a special
        flag) rather than converting them all to 0.
        (KJS::convertUTF8OffsetsToUTF16Offsets): Ditto.

        * tests/mozilla/jsDriver.pl: Fixed the relative links to point to our actual test files.

        * tests/mozilla/ecma/String/ Fixed the Unicode table in this test to match
        the Unicode specification in a few cases where it was wrong before.
        * tests/mozilla/ecma/String/ Ditto.
        * tests/mozilla/ecma/String/ Ditto.
        * tests/mozilla/ecma/String/ Ditto.
        * tests/mozilla/ecma/String/ Ditto.
        * tests/mozilla/ecma/String/ Ditto.
        * tests/mozilla/ecma/String/ Ditto.
        * tests/mozilla/ecma/String/ Ditto.
        * tests/mozilla/ecma/String/ Ditto.
        * tests/mozilla/ecma/String/ Ditto.

        * JavaScriptCore.pbproj/project.pbxproj: Link to libicu.

        * kjs/number_object.lut.h: Regenerated.

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

18 years ago Reviewed by Ken.
darin [Tue, 10 Aug 2004 18:14:25 +0000 (18:14 +0000)]
    Reviewed by Ken.

        - change name of WebMakeCollectable to WebNSRetainCFRelease so it fits into the
          "NS and CF retain counts are separate" mental model, rather than the "think about
          how garbage collection works" one

        * Misc.subproj/WebKitNSStringExtras.m: (+[NSString _web_encodingForResource:]): Rename.
        * Misc.subproj/WebNSObjectExtras.h: (WebNSRetainCFRelease): Ditto.
        * Misc.subproj/WebNSURLExtras.m:
        (+[NSURL _web_URLWithData:relativeToURL:]): Ditto.
        (-[NSURL _web_URLWithLowercasedScheme]): Ditto.

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

18 years ago Reviewed by Ken.
darin [Tue, 10 Aug 2004 18:09:25 +0000 (18:09 +0000)]
    Reviewed by Ken.

        - minor cleanup

        * khtml/editing/jsediting.cpp: Capitalize command names to match Windows.
        The dictionary lookup is case insensitive.

        * kwq/KWQFoundationExtras.h: Remove inaccurate comment.

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

18 years ago 3757094 - crash spell checking after a paste
trey [Tue, 10 Aug 2004 17:48:54 +0000 (17:48 +0000)]
3757094 - crash spell checking after a paste

        Reviewed by Ken

        * khtml/rendering/render_text.cpp:
        (InlineTextBox::paintSelection):  Add nil check.

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

18 years ago 3756195 - spell checking leaves misspelling marker behind after bad word is deleted
trey [Tue, 10 Aug 2004 16:34:46 +0000 (16:34 +0000)]
3756195 - spell checking leaves misspelling marker behind after bad word is deleted
... and other follow-on spell check fixes

        Reviewed by Ken

        * khtml/rendering/render_text.cpp:
        (InlineTextBox::paintMarker):  Close inspection shows we were drawing the
misspelling marker one pixel lower than AK, and one pixel outside the selection
rect we draw, in the case of Times-16.  So move it up one.  Still not an exact
match for AK, but less bad.
        * khtml/xml/dom_docimpl.cpp:
        (DocumentImpl::removeMarker):  Track whether we make any changes, so we only
repaint if something actually changed.
        (DocumentImpl::removeAllMarkers):  New utility.
        (DocumentImpl::removeAllMarkers):  Use clear() instead of (errant)
hand-rolled loop to empty array.
        (DocumentImpl::shiftMarkers):  Track whether we make any changes, so we only
repaint if something actually changed.
        * khtml/xml/dom_docimpl.h:
        * khtml/xml/dom_textimpl.cpp:
        (CharacterDataImpl::deleteData):  Along with shifting existing markers around,
remove any markers in the deleted range.  Fixes 3756195.
        (CharacterDataImpl::replaceData):  Ditto for the replaced range.
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::updateSpellChecking): comment

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

18 years ago 3756599 - REGRESSION: hit assertion in KWQPageState invalidate
trey [Tue, 10 Aug 2004 06:30:28 +0000 (06:30 +0000)]
3756599 - REGRESSION: hit assertion in KWQPageState invalidate

By inspection I found a flaw in the recently added logic, although
I have no steps to repro.  My theoretical explanation is that we would
get two errors and go through _receivedMainResourceError: twice, which
would cause the pageState to be invalidated twice, which is the only
way I can see to hit the assert.

        Reviewed by Darin

        * WebView.subproj/WebFrame.m:
        (-[WebFrame _receivedMainResourceError:]):  Clear the pageState out
of the history item after it's been invalidated by WebCore.

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

18 years ago Reviewed by Maciej.
darin [Tue, 10 Aug 2004 03:05:37 +0000 (03:05 +0000)]
    Reviewed by Maciej.

        - fixed <rdar://problem/3753467> REGRESSION (137-138): reproducible buffer overrun in UString manipulation code

        * kjs/ustring.cpp: (KJS::UString::append): Fix incorrect size computation. Without it
        we get a buffer overflow.

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

18 years ago Inspired by Trey we have a much better approach for conditionally
rjw [Tue, 10 Aug 2004 00:33:19 +0000 (00:33 +0000)]
    Inspired by Trey we have a much better approach for conditionally
        linking Quart.framework.  Instead of multiple targets we use
        `` to invoke some inline script to extend COMMON_LDFLAGS as
        necessary.  Thanks Trey!

        Reviewed by Trey.

        * WebKit.pbproj/project.pbxproj:

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

18 years ago Hookup UI for "Continuous Spelling" menu item.
trey [Tue, 10 Aug 2004 00:11:37 +0000 (00:11 +0000)]
Hookup UI for "Continuous Spelling" menu item.

        Reviewed by Richard.

        * WebView.subproj/WebView.m:
        (-[WebView validateUserInterfaceItem:]):  Enable and check the
menu item to reflect our state.
        (-[WebView toggleContinuousSpellChecking:]):  Change type to
IBAction, just cosmetic.
        * WebView.subproj/WebViewPrivate.h:

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

18 years agoWebCore:
trey [Mon, 9 Aug 2004 22:00:59 +0000 (22:00 +0000)]

3745023 - Safari crashes trying to access anchor while downloading

I bet this is behind a few other crashers as well.  In this bug the start of the
download leaves a KWQPageState hanging around, and when that is freed it damages
the part and view.  If you're still using that page, you're dead.

The fix is to properly invalidate the PageState when we receive an error before
reaching WebFrameCommitted state.  Normally this happens when a page is reheated
from the PageState, but in this case we never manage to leave the page to begin
with, although we've already created the PageState.

Other errors besides the synthetic one download generates would have caused similar
crashing.  Another example would be clicking on a second link before the load
caused by clicking on the first link reached committed state.

        Reviewed by Richard

        * kwq/WebCoreBridge.h:
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge didNotOpenURL:pageCache:]):  Invalidate the pageCache state
when a load doesn't get off the ground.


3745023 - Safari crashes trying to access anchor while downloading

I bet this is behind a few other crashers as well.  In this bug the start of the
download leaves a KWQPageState hanging around, and when that is freed it damages
the part and view.  If you're still using that page, you're dead.

The fix is to properly invalidate the PageState when we receive an error before
reaching WebFrameCommitted state.  Normally this happens when a page is reheated
from the PageState, but in this case we never manage to leave the page to begin
with, although we've already created the PageState.

Other errors besides the synthetic one download generates would have caused similar
crashing.  Another example would be clicking on a second link before the load
caused by clicking on the first link reached committed state.

        Reviewed by Richard

        * WebView.subproj/WebDataSource.m:
        (-[WebDataSource _receivedMainResourceError:complete:]):  Let the frame do the
main work (since it has access to the pageCache state).  Also renamed to make
it clear that this is about an error for the main resource.
        * WebView.subproj/WebDataSourcePrivate.h:
        * WebView.subproj/WebFrame.m:
        (-[WebFrame _receivedMainResourceError:]):  Let WC know about the failure, as
the DataSource used to, but now pass the pageCache state along too.
        * WebView.subproj/WebFramePrivate.h:
        * WebView.subproj/WebMainResourceClient.m:
        (-[WebMainResourceClient receivedError:]):  Call renamed method.
        (-[WebMainResourceClient cancelWithError:]):  Ditto.

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

18 years ago Reviewed by vicki (changes by rjw)
vicki [Sun, 8 Aug 2004 20:44:11 +0000 (20:44 +0000)]
    Reviewed by vicki (changes by rjw)

- make "weak" linking with Quartz work with buildit

        * WebKit.pbproj/project.pbxproj:

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