WebKit-https.git
18 years ago fixed <rdar://problem/3482852>: oft-seen, non-repro, nil-deref in
sullivan [Tue, 16 Dec 2003 19:33:46 +0000 (19:33 +0000)]
    fixed <rdar://problem/3482852>: oft-seen, non-repro, nil-deref in
        HTMLTokenizer::notifyFinished (snapfish.com, etc.)

        At least one of the dupes of this bug is a separate (still reproducible) issue;
        I'll clone it back to life and test the others.

        Reviewed by Darin.

        * khtml/html/htmltokenizer.cpp:
        (HTMLTokenizer::notifyFinished):
        Move check of cachedScript.isEmpty() until after scriptExecution()
        call, because cachedScript.isEmpty() value can be changed by that call.

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

18 years ago Fixed a couple of snafus and removed some logging.
rjw [Tue, 16 Dec 2003 06:24:55 +0000 (06:24 +0000)]
Fixed a couple of snafus and removed some logging.

        Reviewed by Maciej.

        * bindings/jni_jsobject.cpp:
        (Bindings::performJavaScriptAccess):
        (Bindings::completedJavaScriptAccess):
        (Bindings::dispatchToJavaScriptThread):
Removed some annoying JS_LOG clutter.

        (Bindings::RootObject::removeAllJavaReferencesForRoot):
Fixed allocation of key buffer that was called after it was needed.

        (Bindings::JSObject::invoke):
        (Bindings::JSObject::JSObject):
        (Bindings::JSObject::getMember):
        (Bindings::JSObject::getSlot):
Added additional interpreter locks around getMember and getSlot.
These functions may cause allocation of JS impls.

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

18 years ago args weren't passed to 'call' invocation. d'oh.
rjw [Tue, 16 Dec 2003 01:27:59 +0000 (01:27 +0000)]
args weren't passed to 'call' invocation.  d'oh.
lock interpreter when we create instances of JS impls.

        Reviewed by Maciej.

        * bindings/jni_jsobject.cpp:
        (Bindings::JSObject::call):
        (Bindings::JSObject::eval):
        (Bindings::JSObject::getMember):
        (Bindings::JSObject::setMember):
        (Bindings::JSObject::getSlot):
        (Bindings::JSObject::convertValueToJObject):
        (Bindings::JSObject::convertJObjectToValue):
        (Bindings::JSObject::listFromJArray):
        * bindings/jni_jsobject.h:

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

18 years ago Fix for 3508807, positions/sizes wrong for text elts and multi-line elts for accessi...
hyatt [Tue, 16 Dec 2003 00:45:11 +0000 (00:45 +0000)]
Fix for 3508807, positions/sizes wrong for text elts and multi-line elts for accessibility.

        Reviewed by john

        * khtml/rendering/render_inline.cpp:
        (RenderInline::absoluteRects):
        * khtml/rendering/render_inline.h:
        * khtml/rendering/render_object.cpp:
        (RenderObject::absoluteRects):
        * khtml/rendering/render_object.h:
        * khtml/rendering/render_text.cpp:
        (RenderText::absoluteRects):
        * khtml/rendering/render_text.h:
        * kwq/KWQAccObject.mm:
        (boundingBoxRect):
        (-[KWQAccObject position]):
        (-[KWQAccObject size]):

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

18 years agoJavaScriptCore:
rjw [Mon, 15 Dec 2003 23:14:03 +0000 (23:14 +0000)]
JavaScriptCore:
Last piece of LiveConnect!  This checkin adds implementation
of the Java to JavaScript object conversion functions.

        Reviewed by John.

        * bindings/jni/jni_instance.cpp:
        (JavaInstance::invokeMethod):
        * bindings/jni/jni_utility.cpp:
        * bindings/jni/jni_utility.h:
        * bindings/jni_jsobject.cpp:
        (Bindings::JSObject::invoke):
        (Bindings::JSObject::call):
        (Bindings::JSObject::eval):
        (Bindings::JSObject::getMember):
        (Bindings::JSObject::setMember):
        (Bindings::JSObject::getSlot):
        (Bindings::JSObject::setSlot):
        (Bindings::JSObject::createNative):
        (Bindings::JSObject::convertValueToJObject):
        (Bindings::JSObject::convertJObjectToValue):
        (Bindings::JSObject::listFromJArray):
        * bindings/jni_jsobject.h:
        (Bindings::):
        * bindings/runtime_method.cpp:
        (RuntimeMethodImp::get):
        (RuntimeMethodImp::codeType):
        (RuntimeMethodImp::execute):

WebCore:
Return 0 if the view doesn't have a bridge.

        Reviewed by John.

        * kwq/WebCoreBridge.mm:
        (rootForView):

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

18 years ago Fixed: <rdar://problem/3505546>: always get keychain prompt when sending mail using...
cblu [Mon, 15 Dec 2003 21:44:54 +0000 (21:44 +0000)]
Fixed: <rdar://problem/3505546>: always get keychain prompt when sending mail using cert downloaded with Safari

        Reviewed by john.

        * WebCoreSupport.subproj/WebKeyGeneration.cpp:
        (signedPublicKeyAndChallengeString): set up the SecAccessRef with "everything goes" restrictions

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

18 years ago Fix for 3508792. Remove tables and cells as AxObjects.
hyatt [Mon, 15 Dec 2003 21:38:20 +0000 (21:38 +0000)]
Fix for 3508792.  Remove tables and cells as AxObjects.

        Reviewed by john

        * kwq/KWQAccObject.mm:
        (-[KWQAccObject role]):
        (-[KWQAccObject accessibilityIsIgnored]):

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

18 years ago - fixed <rdar://problem/3510459>: REGRESSION (100-113): Pressing button at...
sullivan [Mon, 15 Dec 2003 21:28:27 +0000 (21:28 +0000)]
    - fixed <rdar://problem/3510459>: REGRESSION (100-113): Pressing button at google.com
        removes focus from text field

        Reviewed by Dave.

        * khtml/khtmlview.cpp:
        (KHTMLView::dispatchMouseEvent):
        Don't clear the focused widget when a mousedown occurs on a widget that is focusable
        in the abstract sense but is not mouse focusable or currently keyboard focusable. This
        matches the behavior of older Safaris (clicking in background or page text will make the
        webview itself be first responder, but clicking on a button won't).

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

18 years ago Reviewed by Maciej.
darin [Mon, 15 Dec 2003 04:58:58 +0000 (04:58 +0000)]
    Reviewed by Maciej.

        - fixed 3458937: nil-deref in timed layout

        * khtml/khtmlview.cpp: (KHTMLView::layout): Add a nil check for m_part.

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

18 years agoWebCore:
darin [Mon, 15 Dec 2003 00:46:46 +0000 (00:46 +0000)]
WebCore:

        Reviewed by Maciej.

        - fixed 3311205: click() on a file input type form element does not work bring up the file chooser as it does in IE

        * khtml/html/html_formimpl.cpp:
        (HTMLInputElementImpl::click): Add a case for FILE that calls RenderFileButton's click() function.
        Get rid of the default case and list more cases explicitly.
        (HTMLInputElementImpl::accessKeyAction): Change FILE from just focus to focus/click.

        * khtml/rendering/render_form.h: Added a click() function to RenderFileButton.
        * khtml/rendering/render_form.cpp:
        (RenderFileButton::slotTextChanged): Added call to onChange on the element to match text input
        fields; helpful for the test case Adobe supplied.
        (RenderFileButton::click): Added. Calls click() on KWQFileButton.

        * kwq/KWQFileButton.h: Added a click function.
        * kwq/KWQFileButton.mm: (KWQFileButton::click): Added. Calls performClick on the file button.

        * kwq/WebCoreBridge.h: Add a performClick method to WebCoreFileButton.

WebKit:

        Reviewed by Maciej.

        - fixed 3311205: click() on a file input type form element does not work bring up the file chooser as it does in IE

        * WebCoreSupport.subproj/WebFileButton.m: (-[WebFileButton performClick]):
        Add method for clicking, now part of the WebCoreFileButton protocol.
        The rest of the fix is in WebCore.

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

18 years ago Reviewed by Darin.
mjs [Sun, 14 Dec 2003 23:50:33 +0000 (23:50 +0000)]
    Reviewed by Darin.

<rdar://problem/3269212>: FILEMAKER: can't use Option objects created in a different window

        * khtml/ecma/kjs_binding.cpp:
        (ScriptInterpreter::updateDOMObjectDocument): Update per-document
caching for the DOM object - let it be protected by both the old
and the new document.
        * khtml/ecma/kjs_binding.h: Prototype new method.
        * khtml/xml/dom_nodeimpl.cpp:
        (NodeImpl::setDocument): New method to change a node's document pointer.
        (NodeImpl::checkAddChild): If the new child node is owned by the
wrong document but not actually in it, change its document (using
the two aforementioned methods) instead of throwing an exception.
* khtml/xml/dom_nodeimpl.h: Prototype new method.

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

18 years ago Reviewed by Maciej.
darin [Sun, 14 Dec 2003 17:10:12 +0000 (17:10 +0000)]
    Reviewed by Maciej.

        - fixed 3332280: REGRESSION (74-85): setting src of iframe results in two GETs

        * khtml/html/html_baseimpl.h: Added openURL virtual function.
        * khtml/html/html_baseimpl.cpp:
        (HTMLFrameElementImpl::updateForNewURL): Call openURL to do the meat of the work,
        since it's different for frames and iframes.
        (HTMLFrameElementImpl::openURL): Move the part that's different for frames in here.
        (HTMLFrameElementImpl::parseAttribute): Call setLocation to share code.
        (HTMLFrameElementImpl::setLocation): Do nothing if the location is not changing.
        Not needed to fix this bug, but could eliminate other cases of extra GETs.
        (HTMLIFrameElementImpl::parseAttribute): Remove special handling of SRC, because now
        we will end up calling openURL, which will do the right thing for iframes.
        (HTMLIFrameElementImpl::openURL): Instead of doing the change to the frame directly,
        use updateWidget, since that's what we do for other changes to iframes. To trigger a
        call to updateWidget(), set needWidgetUpdate and mark the node changed.

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

18 years ago Reviewed by Darin.
mjs [Sun, 14 Dec 2003 06:43:46 +0000 (06:43 +0000)]
    Reviewed by Darin.

<rdar://problem/3507885>: REGRESSION (100-116): frames missing due to cross-domain check (derstandard.at)

* khtml/ecma/kjs_window.cpp:
        (Window::isSafeScript): Loosen the frame access rules a bit. We already allowed access to
a document loaded as empty from the parent or opener. Now also allow access from any document
in the same domain as the parent or opener, so that, for instance, a sibling frame can access it
so long as it is in the same domain as the parent.

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

18 years ago Reviewed by Maciej.
darin [Sun, 14 Dec 2003 00:43:13 +0000 (00:43 +0000)]
    Reviewed by Maciej.

        - fixed 3506204: homepage.mac slide show window is wrong size on 2nd monitor

        * kwq/KWQApplication.mm: (QDesktopWidget::screenGeometry): Add code to flip the Y coordinate.
        This has no effect on the main screen, but a big effect on others. I used the same code to
        flip Y screen coordinates that is used KWQWindowWidget.mm and KWQKHTMLPartBrowserExtension.mm.
        * kwq/KWQKWinModule.mm: (KWinModule::workArea): Replaced the incorrect code to flip the Y
        coordinate here with correct code. The code flipped based on the frame of the main screen,
        but it needs to flip based on the frame of screen 0.

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

18 years ago Fixed by Ed Voas, reviewed by me.
darin [Sat, 13 Dec 2003 18:06:26 +0000 (18:06 +0000)]
    Fixed by Ed Voas, reviewed by me.

        - fixed 3278443: CARBON: grow box obscures scroll bar knob

        * Carbon.subproj/CarbonWindowAdapter.m: (-[CarbonWindowAdapter _growBoxRect]):
        Return the grow box so AppKit's scroll bar code will know where it is.

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

18 years ago Reviewed by me
kocienda [Sat, 13 Dec 2003 03:23:22 +0000 (03:23 +0000)]
    Reviewed by me

        * WebCoreSupport.subproj/WebKeyGeneration.cpp:
        (signedPublicKeyAndChallengeString): Fix build-bustin' typo.

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

18 years ago Added implementation of stubs in JSObject. All that
rjw [Sat, 13 Dec 2003 01:37:13 +0000 (01:37 +0000)]
Added implementation of stubs in JSObject.  All that
remains is a couple of simple conversion functions stubs and
we're done with LiveConnect.  Also, changed string passing to
JS to use uchars instead of chars.

        Reviewed by Maciej.

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

18 years agoWebCore:
cblu [Sat, 13 Dec 2003 00:57:46 +0000 (00:57 +0000)]
WebCore:

Fixed: <rdar://problem/3505208>: keys added to keychain from KEYGEN need better UI names

        Reviewed by rjw.

        * khtml/html/html_formimpl.cpp:
        (HTMLKeygenElementImpl::encoding): pass the page URL to signedPublicKeyAndChallengeString
        * kwq/KWQKSSLKeyGen.h:
        * kwq/KWQKSSLKeyGen.mm:
        (KSSLKeyGen::signedPublicKeyAndChallengeString): take a URL
        * kwq/WebCoreKeyGenerator.h:
        * kwq/WebCoreKeyGenerator.m:
        (-[WebCoreKeyGenerator signedPublicKeyAndChallengeStringWithStrengthIndex:challenge:pageURL:]): take a URL

WebKit:

Fixed:
<rdar://problem/3396936>: can't obtain a digital ID from Verisign, form submission fails
<rdar://problem/3505208>: keys added to keychain from KEYGEN need better UI names

        Reviewed by rjw.

        * English.lproj/Localizable.strings:
        * WebCoreSupport.subproj/WebKeyGeneration.cpp:
        (signedPublicKeyAndChallengeString): take a key description arg and use it, take and return CFStrings, handle the empty string case
        (addCertificatesToKeychainFromData): return a WebCertificateParseResult so WB knows how to handle the cert
        * WebCoreSupport.subproj/WebKeyGeneration.h:
        * WebCoreSupport.subproj/WebKeyGenerator.h:
        * WebCoreSupport.subproj/WebKeyGenerator.m:
        (-[WebKeyGenerator signedPublicKeyAndChallengeStringWithStrengthIndex:challenge:pageURL:]): take a page URL so we can use its host name in the key description
        * WebKit.pbproj/project.pbxproj:

WebBrowser:

Fixed:  <rdar://problem/3506645>: open PKCS7 encoded certificates downloaded from Verisign in Keychain Access

        Reviewed by rjw.

        * DownloadProgressEntry.m:
        (-[DownloadProgressEntry _addCertificateToKeyChain]): open PKCS7 files in Keychain Access
        * English.lproj/StringsNotToBeLocalized.txt:

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

18 years ago Fix for 3254534, CSS background-image style should be loaded lazily only when used.
hyatt [Sat, 13 Dec 2003 00:23:54 +0000 (00:23 +0000)]
Fix for 3254534, CSS background-image style should be loaded lazily only when used.

        Reviewed by rjw

        * ChangeLog:
        * khtml/css/css_valueimpl.cpp:
        (CSSImageValueImpl::CSSImageValueImpl):
        (CSSImageValueImpl::~CSSImageValueImpl):
        (CSSImageValueImpl::image):
        * khtml/css/css_valueimpl.h:

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

18 years ago - fixed <rdar://problem/3508825>: REGRESSION (100-116): crash in
sullivan [Fri, 12 Dec 2003 23:25:54 +0000 (23:25 +0000)]
    - fixed <rdar://problem/3508825>: REGRESSION (100-116): crash in
        HTMLGenericFormElementImpl::attach at sonyericsson.com

        Reviewed by Maciej.

        * khtml/html/html_formimpl.cpp:
        (HTMLGenericFormElementImpl::attach):
        Move a few lines inside an existing nil check to prevent nil dereference.

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

18 years ago - fixed <rdar://problem/3508760>: tabbing to out-of-sight link behaves
sullivan [Fri, 12 Dec 2003 22:01:33 +0000 (22:01 +0000)]
    - fixed <rdar://problem/3508760>: tabbing to out-of-sight link behaves
        differently than tabbing to out-of-sight form control

        Reviewed by Dave.

        * kwq/KWQScrollView.h:
        * kwq/KWQScrollView.mm:
        (QScrollView::ensureVisible):
        added comments and changed parameter names to reveal differences between
        what we've implemented and what QScrollView was intended to do.
        (QScrollView::ensureRectVisibleCentered):
        New method that calls _KWQ_scrollRectToVisible, which is the method
        we use when scrolling to reveal form controls.

        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::nextKeyViewInFrame):
        call ensureRectVisibleCentered so tabbing to a link will use the
        same scroll-to-reveal code as tabbing to a form control

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

18 years ago Reviewed by John.
mjs [Fri, 12 Dec 2003 20:18:46 +0000 (20:18 +0000)]
    Reviewed by John.

<rdar://problem/3507856>: XMLHttpRequest xhtml test displays but doesn't load

        * khtml/ecma/xmlhttprequest.cpp:
        (KJS::XMLHttpRequestProtoFunc::tryCall): complete the URL using the document,
not the htmlDocument.

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

18 years ago Reviewed by me.
vicki [Fri, 12 Dec 2003 20:01:00 +0000 (20:01 +0000)]
    Reviewed by me.

- change the WebKit version number back to 118u for tip of tree builds

        * WebKit.pbproj/project.pbxproj:

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

18 years ago Reviewed by NOBODY (OOPS!).
vicki [Fri, 12 Dec 2003 19:14:25 +0000 (19:14 +0000)]
    Reviewed by NOBODY (OOPS!).

- fix version number for submission (117)

        * WebKit.pbproj/project.pbxproj:

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

18 years ago Reviewed by kocienda.
vicki [Fri, 12 Dec 2003 18:14:24 +0000 (18:14 +0000)]
    Reviewed by kocienda.

- fix buildit build bustage.  INSTALL_PATH should be '=', not '+=' (probably changed unintentionally)

        * WebKit.pbproj/project.pbxproj:

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

18 years agoJavaScriptCore:
rjw [Fri, 12 Dec 2003 17:32:00 +0000 (17:32 +0000)]
JavaScriptCore:
Ensure that all calls from Java into JavaScript are
performed on a designated thread (the main thread).

        Reviewed by Ken.

        * bindings/jni_jsobject.cpp:
        (isJavaScriptThread):
        (rootForImp):
        (Bindings::performJavaScriptAccess):
        (Bindings::completedJavaScriptAccess):
        (Bindings::initializeJavaScriptAccessLock):
        (Bindings::lockJavaScriptAccess):
        (Bindings::unlockJavaScriptAccess):
        (Bindings::dispatchToJavaScriptThread):
        (Bindings::RootObject::setFindRootObjectForNativeHandleFunction):
        (Bindings::RootObject::removeAllJavaReferencesForRoot):
        (Bindings::JSObject::invoke):
        (Bindings::JSObject::JSObject):
        (Bindings::JSObject::call):
        (Bindings::JSObject::eval):
        (Bindings::JSObject::getMember):
        (Bindings::JSObject::setMember):
        (Bindings::JSObject::removeMember):
        (Bindings::JSObject::getSlot):
        (Bindings::JSObject::setSlot):
        (Bindings::JSObject::toString):
        (Bindings::JSObject::finalize):
        (Bindings::JSObject::getWindow):
        * bindings/jni_jsobject.h:
        (Bindings::RootObject::~RootObject):
        (Bindings::RootObject::findRootObjectForNativeHandleFunction):
        (Bindings::RootObject::runLoop):
        (Bindings::RootObject::performJavaScriptSource):
        (Bindings::):

WebCore:
Replace calls to global functions with static member functions.

        Reviewed by Ken.

        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::cleanupPluginRootObjects):
        * kwq/WebCoreBridge.mm:
        (rootForView):
        (-[WebCoreBridge init]):

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

18 years ago Reviewed by Darin.
mjs [Fri, 12 Dec 2003 01:54:56 +0000 (01:54 +0000)]
    Reviewed by Darin.

<rdar://problem/3464315>: createDocument creates document with initial child element, unlike other browsers

        * khtml/xml/dom_docimpl.cpp:
        (DOMImplementationImpl::createDocument): Don;t add initial element.

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

18 years ago Reviewed by Darin.
mjs [Fri, 12 Dec 2003 01:32:59 +0000 (01:32 +0000)]
    Reviewed by Darin.

<rdar://problem/3507863>: XMLHttpRequest should not parse response if HTML

* khtml/ecma/xmlhttprequest.cpp:
        (KJS::XMLHttpRequest::getValueProperty):

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

18 years agoJavaScriptCore:
rjw [Fri, 12 Dec 2003 00:48:31 +0000 (00:48 +0000)]
JavaScriptCore:
Added support for calling a JavaScript function from
Java.  Right now this only works for void func(void)
functions, but the conversion of args and return values
will come shortly.

Cleaned up and verified reference counting scheme, and
dereferencing of vended JavaScript objects when applet is
destroyed (actually when part is destroyed).

Removed link hack for testkjs now that the Java folks think
they have a solution for the 1.4.2 JavaVM link problem.  Although
Greg B. thinks his solution may cause problems for the 1.3.1
version of the VM!?!

        Reviewed by Ken.

        * Makefile.am:
        * bindings/jni/jni_runtime.h:
        (Bindings::JavaString::JavaString):
        * bindings/jni/jni_utility.cpp:
        (convertValueToJValue):
        (convertValueToJObject):
        (listFromJArray):
        * bindings/jni/jni_utility.h:
        * bindings/jni_jsobject.cpp:
        (KJS_setFindRootObjectForNativeHandleFunction):
        (KJS_findRootObjectForNativeHandleFunction):
        (getReferencesByRootDictionary):
        (getReferencesDictionary):
        (findReferenceDictionary):
        (rootForImp):
        (addJavaReference):
        (removeJavaReference):
        * bindings/jni_jsobject.h:
        (Bindings::RootObject::RootObject):
        (Bindings::RootObject::~RootObject):
        (Bindings::RootObject::setRootObjectImp):
        (Bindings::RootObject::rootObjectImp):
        (Bindings::RootObject::setInterpreter):
        (Bindings::RootObject::interpreter):

WebCore:
Cleaned up and verified reference counting scheme, and
dereferencing of vended JavaScript objects when applet is
destroyed (actually when part is destroyed).

        Reviewed by Ken.

        * kwq/KWQKHTMLPart.h:
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::~KWQKHTMLPart):
        (KWQKHTMLPart::getAppletInstanceForView):
        (KWQKHTMLPart::addPluginRootObject):
        (KWQKHTMLPart::cleanupPluginRootObjects):
        * kwq/WebCoreBridge.h:
        * kwq/WebCoreBridge.mm:
        (rootForView):
        (-[WebCoreBridge init]):

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

18 years ago Reviewed by Darin
kocienda [Thu, 11 Dec 2003 23:56:37 +0000 (23:56 +0000)]
    Reviewed by Darin

Fix for this bug:

<rdar://problem/3489280>: redirect via post blows cache, causing everything to get reloaded

Now POST requests reload the main document by default, but will not reload
all subresources.

        * WebCoreSupport.subproj/WebSubresourceClient.m:
        (+[WebSubresourceClient startLoadingResource:withRequest:customHeaders:referrer:forDataSource:]):
        * WebView.subproj/WebFrame.m:
        (-[WebFrame _postWithURL:referrer:target:data:contentType:triggeringEvent:form:formValues:]):
Take the cache policy for subresources from the original request, rather than
the data source's current request.
        * WebView.subproj/WebMainResourceClient.m:
        (-[WebMainResourceClient _isPostOrRedirectAfterPost:redirectResponse:]): New helper.
        (-[WebMainResourceClient connection:willSendRequest:redirectResponse:]):
Call new helper to set the cache policy on the main resource load.

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

18 years ago Reviewed by John.
mjs [Thu, 11 Dec 2003 23:50:09 +0000 (23:50 +0000)]
    Reviewed by John.

<rdar://problem/3507862>: XMLHttpRequest documents that reference external resources (e.g. stylesheets) cause crash

        * khtml/html/html_headimpl.cpp:
        (HTMLLinkElementImpl::process):
        * khtml/html/htmltokenizer.cpp:
        (HTMLTokenizer::scriptHandler):
        * khtml/xml/dom_xmlimpl.cpp:
        (ProcessingInstructionImpl::checkStyleSheet):
        * khtml/xml/xml_tokenizer.cpp:
        (XMLHandler::processingInstruction):
        (XMLTokenizer::executeScripts):

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

18 years ago Reviewed by Chris.
mjs [Thu, 11 Dec 2003 23:30:30 +0000 (23:30 +0000)]
    Reviewed by Chris.

<rdar://problem/3507859>: Status text should only include "OK", not full "HTTP/1.0 200 OK" status line

        * khtml/ecma/xmlhttprequest.cpp:
        (KJS::XMLHttpRequest::getStatusText): Include only the status
text, not the full status line.

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

18 years agothe tree is open for Safari-118
vicki [Thu, 11 Dec 2003 22:59:49 +0000 (22:59 +0000)]
the tree is open for Safari-118

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

18 years agoSafari-117 stamp, plus a few site changes
vicki [Thu, 11 Dec 2003 22:55:10 +0000 (22:55 +0000)]
Safari-117 stamp, plus a few site changes

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

18 years ago Reviewed by Darin
kocienda [Thu, 11 Dec 2003 21:43:40 +0000 (21:43 +0000)]
    Reviewed by Darin

        * WebCoreSupport.subproj/WebBridge.m: time_t is a signed type, so
casting -1 to a time_t does not work to make a max value.
We'll go with INT_MAX.

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

18 years agoFix duplicate changelog entry
hyatt [Thu, 11 Dec 2003 19:48:42 +0000 (19:48 +0000)]
Fix duplicate changelog entry

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

18 years agoLanding changed layout tests that don't dump incorrect backgrounds.
hyatt [Thu, 11 Dec 2003 19:46:18 +0000 (19:46 +0000)]
Landing changed layout tests that don't dump incorrect backgrounds.

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

18 years ago Fix for 3507164, scrolling really slow on hixie's web forms spec page. Hixie has...
hyatt [Thu, 11 Dec 2003 19:39:28 +0000 (19:39 +0000)]
Fix for 3507164, scrolling really slow on hixie's web forms spec page.  Hixie has 12 little transparent layers
        at various points on this page, and beginning/ending transparency on only those 12 layers as you scroll
        is enough to kill scrolling performance.

This patch works around the issue by lazily beginning transparency layers only when we determine that
we're actually painting a descendant layer of a transparent ancestor or a transparent layer.

Also fixing QColor's comparison operator.  It was broken and not comparing the "valid" bit, so invalid and
valid colors were being assumed to be the same.

Also fixed the render dumper to not dump transparent and invalid background colors and fixed it do dump the
alpha for colors with an alpha < 0xFF.

Reviewed by mjs (opacity changes), darin (color changes) and john (render tree dumper changes)

        * ChangeLog:
        * khtml/rendering/render_layer.cpp:
        (RenderLayer::RenderLayer):
        (RenderLayer::beginTransparencyLayers):
        (RenderLayer::paint):
        (RenderLayer::paintLayer):
        * khtml/rendering/render_layer.h:
        * kwq/KWQColor.h:
        (operator==):
        (operator!=):
        * kwq/KWQColor.mm:
        (QColor::name):
        * kwq/KWQRenderTreeDebug.cpp:
        (operator<<):

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

18 years ago Reviewed and C++ heavy-lifting by Darin
kocienda [Thu, 11 Dec 2003 19:12:27 +0000 (19:12 +0000)]
    Reviewed and C++ heavy-lifting by Darin

Fix warnings in C++ files.

        * WebCoreSupport.subproj/WebKeyGeneration.cpp:
        (signedPublicKeyAndChallengeString): Add cast to remove warning.
        (addCertificatesToKeychainFromData): Add cast to remove warning.
        * WebKit.pbproj/project.pbxproj: Add back warnings to C++ files.
        * WebKitPrefix.h: Add define for NULL that works for C++.

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

18 years ago Reviewed by me
kocienda [Thu, 11 Dec 2003 19:00:36 +0000 (19:00 +0000)]
    Reviewed by me

        * kwq/KWQLoader.mm:
        (KWQCacheObjectExpiresTime): Fixed deployment build bustage.

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

18 years agoWebCore:
kocienda [Thu, 11 Dec 2003 16:11:47 +0000 (16:11 +0000)]
WebCore:

        Reviewed by Darin

        <rdar://problem/3505444>: WebCore cache does not use expiration dates on cache items

        * khtml/misc/loader.cpp:
        (Loader::slotFinished): Don't reset expiration date. We set this once in
        slotReceivedResponse.
        (Loader::slotReceivedResponse): Call new KWQ function to get a cache object's
        expiration date using its NSURLResponse data.
        (Cache::requestImage): Don't reset expiration date. We set this once in
        slotReceivedResponse, and we do not want the value from the DocLoader
anyway.
        (Cache::requestStyleSheet): Ditto.
        (Cache::requestScript): Ditto.
        * kwq/KWQLoader.h:
        * kwq/KWQLoader.mm:
        (KWQCacheObjectExpiresTime): New function. Call over bridge to get access
        to SPI in NSURLResponse to calculate expiration time.
        * kwq/WebCoreBridge.h: Declare bridge method.

WebKit:

        Reviewed by Darin

        <rdar://problem/3505444>: WebCore cache does not use expiration dates on cache items

        * WebCoreSupport.subproj/WebBridge.m:
        (-[WebBridge expiresTimeForResponse:]): New method. Call response
        freshness lifetime method and add it to the current time to yield
        an expiration time.

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

18 years ago Reviewed by Darin.
mjs [Thu, 11 Dec 2003 06:56:10 +0000 (06:56 +0000)]
    Reviewed by Darin.

<rdar://problem/3504156>: XMLHttpRequest reuse test fails
<rdar://problem/3505158>: XMLHttpRequest "abort with open" test fails

        * khtml/ecma/xmlhttprequest.cpp:
        (KJS::XMLHttpRequest::open):
        (KJS::XMLHttpRequest::abort):
        (KJS::XMLHttpRequestProtoFunc::tryCall):

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

18 years ago Reviewed by Darin.
mjs [Thu, 11 Dec 2003 06:50:24 +0000 (06:50 +0000)]
    Reviewed by Darin.

<rdar://problem/3507175>: Setting timeout function can allocate JS objects without lock

        * khtml/ecma/kjs_window.cpp:
        (ScheduledAction::execute): Lock interpreter around code that
might allocate JS objects.

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

18 years agoAdding overflow test with auto height.
hyatt [Thu, 11 Dec 2003 06:26:08 +0000 (06:26 +0000)]
Adding overflow test with auto height.

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

18 years ago Fix for 3507097, overflow:auto should include the height of the horizontal scrollbar...
hyatt [Thu, 11 Dec 2003 06:25:17 +0000 (06:25 +0000)]
Fix for 3507097, overflow:auto should include the height of the horizontal scrollbar when the height
of the block is auto.

        Reviewed by darin

        * khtml/rendering/bidi.cpp:
        (khtml::RenderBlock::layoutInlineChildren):
        * khtml/rendering/render_block.cpp:
        (khtml::RenderBlock::layoutBlock):
        (khtml::RenderBlock::layoutBlockChildren):

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

18 years ago Reviewed by Maciej.
darin [Thu, 11 Dec 2003 05:15:54 +0000 (05:15 +0000)]
    Reviewed by Maciej.

        - fixed 3506739: nil-deref in DocumentImpl::setSelection triple clicking (generated content)

        * khtml/khtml_part.cpp: (KHTMLPart::khtmlMousePressEvent): Check for the case where
        m_selectionEnd is 0. This doesn't fix the behavior completely, but it does prevent a crash.

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

18 years agoWebCore:
mjs [Thu, 11 Dec 2003 04:55:47 +0000 (04:55 +0000)]
WebCore:

        Reviewed by Richard.

<rdar://problem/3487160>: Implement synchronous loading for XMLHttpRequest

* khtml/ecma/xmlhttprequest.cpp:
        (KJS::XMLHttpRequest::XMLHttpRequest):
        (KJS::XMLHttpRequest::send):
        (KJS::XMLHttpRequest::abort):
        (KJS::XMLHttpRequest::processSyncLoadResults):
        (KJS::XMLHttpRequest::slotRedirection):
        (KJS::XMLHttpRequest::slotData):
        * khtml/ecma/xmlhttprequest.h:
        * kwq/KWQLoader.h:
        * kwq/KWQLoader.mm:
        (KWQHeaderStringFromDictionary):
        (KWQServeSynchronousRequest):
        (KWQResponseHeaderString):
        * kwq/WebCoreBridge.h:

WebKit:

        Reviewed by Richard.

WebKit part of fix for:

<rdar://problem/3487160>: Implement synchronous loading for XMLHttpRequest

        * WebCoreSupport.subproj/WebBridge.m:
        (-[WebBridge syncLoadResourceWithURL:customHeaders:postData:finalURL:responseHeaders:statusCode:]):

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

18 years ago Reviewed by Maciej.
darin [Thu, 11 Dec 2003 04:55:12 +0000 (04:55 +0000)]
    Reviewed by Maciej.

        - fixed regression in JavaScript tests reported by the KDE guys
        - fixed 3506345: REGRESSION (115-116): VIP: chordfind.com no longer displays chords

        * kjs/ustring.h: Add tolerateEmptyString parameter to toDouble and toULong.
        * kjs/ustring.cpp:
        (KJS::UString::toDouble): Separate the "tolerant" parameter into two separate ones:
        tolerateTrailingJunk and tolerateEmptyString. Add new overloads; better for code size
        and binary compatibility than default parameter values.
        (KJS::UString::toULong): Pass tolerateEmptyString down to toDouble. Add new overload.

        * kjs/string_object.cpp: (StringProtoFuncImp::call): Pass false for the new
        "tolerate empty string" parameter.

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

18 years ago Reviewed by Maciej.
darin [Thu, 11 Dec 2003 04:49:51 +0000 (04:49 +0000)]
    Reviewed by Maciej.

        - fixed 3506706: REGRESSION (100-115): onkeyup handlers called twice for active input fields

        * kwq/KWQTextArea.mm: (-[KWQTextAreaTextView keyUp:]): Don't call super because we
        don't want to pass the event down the responder chain.
        * kwq/KWQTextField.mm: (-[KWQTextField textView:shouldHandleEvent:]): Return NO for
        key up events because we don't want to pass the event down the responder chain.

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

18 years agoFix optimized build bustage.
hyatt [Thu, 11 Dec 2003 04:47:55 +0000 (04:47 +0000)]
Fix optimized build bustage.

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

18 years agoWebKit:
rjw [Thu, 11 Dec 2003 02:20:43 +0000 (02:20 +0000)]
WebKit:
Added method to get to the bridge from a view.  This is
used to ultimately get the part and KJS::Window for a
particular applet.

        Reviewed by Hyatt.

        * WebCoreSupport.subproj/WebViewFactory.m:
        (-[WebViewFactory refreshPlugins:]):
        (-[WebViewFactory bridgeForView:]):

WebCore:
Added method to get to the bridge from a view.  This is
used to ultimately get the part and KJS::Window for a
particular applet.

        Reviewed by Hyatt.

        * kwq/WebCoreBridge.h:
        * kwq/WebCoreBridge.mm:
        (rootForView):
        (-[WebCoreBridge init]):
        * kwq/WebCoreViewFactory.h:
        * kwq/WebCoreViewFactory.m:

JavaScriptCore:
Added code to manage reference counting of JavaScript
objects passed to Java.   Also added implementation of
KJS_JSCreateNativeJSObject.  This is the function that
provides the root object to Java (KJS::Window).

        Reviewed by Hyatt.

        * JavaScriptCore.pbproj/project.pbxproj:
        * bindings/jni_jsobject.cpp:
        (KJS_setFindObjectForNativeHandleFunction):
        (KJS_findObjectForNativeHandleFunction):
        (getReferencesByOwnerDictionary):
        (getReferencesDictionary):
        (findReferenceDictionary):
        (addJavaReference):
        (removeJavaReference):
        (removeAllJavaReferencesForOwner):
        * bindings/jni_jsobject.h:

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

18 years agoWebCore:
sullivan [Thu, 11 Dec 2003 01:47:13 +0000 (01:47 +0000)]
WebCore:

        - WebCore part of fix for:
        <rdar://problem/3505231>: REGRESSION (100-114): Some sites autoscroll to bottom of page when loading

        Reviewed by Darin.

        * kwq/KWQNSViewExtras.h:
        * kwq/KWQNSViewExtras.m:
        (-[NSView _KWQ_scrollPointRecursive:]):
        (-[NSView _KWQ_scrollPointRecursive:inView:]):
        new methods, similar to existing scrollRect methods
        except that the preferred position for the point is
        the top-left corner rather than centered in the visible area

        * kwq/KWQScrollView.h:
        * kwq/KWQScrollView.mm:
        (QScrollView::setContentsPosRecursive):
        new method, calls _KWQ_scrollPointRecursive:

        * khtml/khtml_part.cpp:
        (KHTMLPart::gotoAnchor):
        call setContentsPosRecursive instead of setContentsPos; also remove
        the 50 pixel offset that upset Hyatt so.

WebKit:

        - WebKit part of fix for:
        <rdar://problem/3505231>: REGRESSION (100-114): Some sites autoscroll to bottom of page when loading

        Reviewed by Darin

        * Misc.subproj/WebNSViewExtras.h:
        * Misc.subproj/WebNSViewExtras.m:
        removed _web_scrollPointToVisible:fromView:

        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView scrollPoint:]):
        removed call to _web_scrollPointToVisible:fromView:

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

18 years agoWebKit:
cblu [Thu, 11 Dec 2003 00:34:01 +0000 (00:34 +0000)]
WebKit:

Fixed: <rdar://problem/3505537>: certificates downloaded from Verisign are multipart/mixed, must be parsed out

        Reviewed by kocienda.

        * WebCoreSupport.subproj/WebKeyGeneration.cpp:
        (signedPublicKeyAndChallengeString): tweak
        (addCertificateToKeychainFromData): renamed to use lowercase "c" in "keychain"
        (addCertificatesToKeychainFromData): take data instead of a path to a file
        * WebCoreSupport.subproj/WebKeyGeneration.h:
        * WebCoreSupport.subproj/WebKeyGenerator.h:
        * WebCoreSupport.subproj/WebKeyGenerator.m:
        (-[WebKeyGenerator signedPublicKeyAndChallengeStringWithStrengthIndex:challenge:]): added temporary workaround for 3396936

WebBrowser:

Fixed: <rdar://problem/3505537>: certificates downloaded from Verisign are multipart/mixed, must be parsed out

        Reviewed by me, kocienda.

        * BrowserNSDataExtras.h:
        * BrowserNSDataExtras.m: new categories implemented by kocienda.
        (-[NSData indexOfCharacterInCString:]):
        (-[NSData indexOfCString:]):
        (-[NSData indexOfCString:startOffset:]):
        (-[NSData indexOfByteString:length:]):
        (-[NSData indexOfByteString:length:startOffset:]):
        (-[NSData certificateFromMultipartData]): extracts the cert
        * DownloadProgressEntry.m:
        (-[DownloadProgressEntry _addCertificateToKeyChain]): if the file is multipart/mixed, attempt to extract the cert using certificateFromMultipartData

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

18 years ago * kwq/KWQKSSLKeyGen.mm:
cblu [Wed, 10 Dec 2003 22:39:49 +0000 (22:39 +0000)]
    * kwq/KWQKSSLKeyGen.mm:
        (KSSLKeyGen::signedPublicKeyAndChallengeString): removed unnecessary includes

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

18 years ago Fix for 3505846, overflow:auto region doesn't update when scrolled. The child layer...
hyatt [Wed, 10 Dec 2003 22:34:27 +0000 (22:34 +0000)]
Fix for 3505846, overflow:auto region doesn't update when scrolled.  The child layers inside an overflow:auto
block were not updating their positions.

        Reviewed by john

        * khtml/khtmlview.cpp:
        (KHTMLView::layout):
        * khtml/rendering/render_layer.cpp:
        (RenderLayer::updateLayerPositions):
        (RenderLayer::scrollToOffset):
        * khtml/rendering/render_layer.h:

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

18 years agoCorrected ChangeLog entry.
mjs [Wed, 10 Dec 2003 21:47:30 +0000 (21:47 +0000)]
Corrected ChangeLog entry.

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

18 years ago Reviewed by John.
mjs [Wed, 10 Dec 2003 21:46:45 +0000 (21:46 +0000)]
    Reviewed by John.

<rdar://problem/3505795>: loading invalid XML document crashes trying to create h1 element

* khtml/xml/dom_docimpl.cpp:
        (DocumentImpl::isValidName): include "0123456789" instead of
"0-9", it's not a regexp it's just a list of characters.

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

18 years ago Reviewed by John.
mjs [Wed, 10 Dec 2003 21:42:25 +0000 (21:42 +0000)]
    Reviewed by John.

<rdar://problem/3504155>: Safari fails XMLHttpRequest abort test

* khtml/ecma/xmlhttprequest.cpp:
        (KJS::XMLHttpRequestProtoFunc::tryCall): Avoid throwing an
exception after send().

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

18 years ago Rename -apple-aqua to auto for outline styles.
hyatt [Wed, 10 Dec 2003 21:14:01 +0000 (21:14 +0000)]
Rename -apple-aqua to auto for outline styles.

        Reviewed by darin

        * khtml/css/cssparser.cpp:
        (CSSParser::parseValue):
        * khtml/css/cssstyleselector.cpp:
        (khtml::CSSStyleSelector::applyRule):
        * khtml/css/cssvalues.c:
        (hash_val):
        (findValue):
        * khtml/css/cssvalues.h:
        * khtml/css/cssvalues.in:
        * khtml/css/html4.css:
        * khtml/rendering/render_inline.cpp:
        (RenderInline::paintObject):
        * khtml/rendering/render_object.cpp:
        (RenderObject::drawBorder):
        (RenderObject::paintOutline):
        * khtml/rendering/render_style.h:
        (khtml::):
        (khtml::OutlineValue::OutlineValue):
        (khtml::RenderStyle::outlineStyleIsAuto):
        (khtml::RenderStyle::outlineOffset):
        (khtml::RenderStyle::setOutlineStyle):
        (khtml::RenderStyle::setOutlineOffset):
        * kwq/KWQRenderTreeDebug.cpp:
        (printBorderStyle):

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

18 years ago Reviewed by John.
mjs [Wed, 10 Dec 2003 04:09:52 +0000 (04:09 +0000)]
    Reviewed by John.

<rdar://problem/3487195>: Implement responseXML property for XMLHttpRequest

        * khtml/ecma/xmlhttprequest.cpp:
        (KJS::XMLHttpRequest::getValueProperty): Implemented responseXML by parsing the
document and returning it.
        (KJS::XMLHttpRequest::XMLHttpRequest): Initialize new field
        * khtml/ecma/xmlhttprequest.h:

        * khtml/ecma/kjs_window.cpp:
(Windw::get): Forgot this in last commit; add XMLSerializer
constructor.
        * khtml/ecma/kjs_window.lut.h:
* khtml/ecma/Makefile.am: Forgot to include this in the last commit.

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

18 years ago Reviewed by Richard.
mjs [Wed, 10 Dec 2003 04:05:47 +0000 (04:05 +0000)]
    Reviewed by Richard.

<rdar://problem/3504049>: XMLSerializer object and serializeToString method needed for XMLHttpRequest testing

Also fixed some lasst-minute mistakes in the DOM serialization
code that was already there.

        * WebCore.pbproj/project.pbxproj:
        * khtml/dom/dom_doc.h:
        * khtml/ecma/Makefile.am:
        * khtml/ecma/kjs_window.cpp:
        (Window::get):
        * khtml/ecma/kjs_window.h:
        (KJS::Window::):
        * khtml/ecma/kjs_window.lut.h:
        (KJS::):
        * khtml/ecma/xmlserializer.cpp: Added.
        (KJS::XMLSerializerConstructorImp::XMLSerializerConstructorImp):
        (KJS::XMLSerializerConstructorImp::implementsConstruct):
        (KJS::XMLSerializerConstructorImp::construct):
        (KJS::):
        (KJS::XMLSerializer::XMLSerializer):
        (KJS::XMLSerializerProtoFunc::tryCall):
        * khtml/ecma/xmlserializer.h: Added.
        (KJS::XMLSerializer::toBoolean):
        (KJS::XMLSerializer::classInfo):
        (KJS::XMLSerializer::):
        * khtml/ecma/xmlserializer.lut.h: Added.
        (KJS::):
        * khtml/xml/dom_docimpl.cpp:
        (DocumentImpl::toString):
        (DocumentFragmentImpl::toString):
        * khtml/xml/dom_elementimpl.cpp:
        (AttrImpl::toString):
        (ElementImpl::toString):

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

18 years ago Implement start() and stop() for marquees.
hyatt [Wed, 10 Dec 2003 01:23:53 +0000 (01:23 +0000)]
Implement start() and stop() for marquees.

        Reviewed by darin

        * khtml/ecma/kjs_html.cpp:
        (KJS::HTMLElement::classInfo):
        (KJS::HTMLElementFunction::tryCall):
        * khtml/ecma/kjs_html.h:
        (KJS::HTMLElement::):
        * khtml/ecma/kjs_html.lut.h:
        (KJS::):

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

18 years ago LiveConnect stubs that correspond to the native methods
rjw [Wed, 10 Dec 2003 01:05:57 +0000 (01:05 +0000)]
LiveConnect stubs that correspond to the native methods
on JSObject.  These will be called from the new Java plugin
when an instance of JSObject is instantiated and messaged.
When these are implemented the Java will be able to originate
calls into JavaScript.

Also a temporary work-around added to Makefile.am to solve
a link problem.  The 1.4.2 JavaVM accidentally links against
libobjc.  This call a failure linking testkjs.  Mike Hay is
working with someone to fix the problem (3505587).

        Reviewed by Chris.

        * JavaScriptCore.pbproj/project.pbxproj:
        * Makefile.am:
        * bindings/jni_jsobject.cpp: Added.
        (KJS_JSCreateNativeJSObject):
        (KJS_JSObject_JSFinalize):
        (KJS_JSObject_JSObjectCall):
        (KJS_JSObject_JSObjectEval):
        (KJS_JSObject_JSObjectGetMember):
        (KJS_JSObject_JSObjectSetMember):
        (KJS_JSObject_JSObjectRemoveMember):
        (KJS_JSObject_JSObjectGetSlot):
        (KJS_JSObject_JSObjectSetSlot):
        (KJS_JSObject_JSObjectToString):
        * bindings/jni_jsobject.h: Added.

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

18 years ago Reviewed by John.
darin [Wed, 10 Dec 2003 00:53:40 +0000 (00:53 +0000)]
    Reviewed by John.

        - fixed 3505277: nil-deref in ownerElement after choosing item from menu at projectnissan.com

        * khtml/xml/dom_nodeimpl.cpp: (NodeImpl::dispatchWindowEvent): Add check for nil.

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

18 years ago Reviewed by Maciej.
darin [Wed, 10 Dec 2003 00:46:10 +0000 (00:46 +0000)]
    Reviewed by Maciej.

        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::saveLocationProperties): Add locking around the call to get the location
        since it can allocate.
        (KWQKHTMLPart::restoreLocationProperties): Ditto.

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

18 years ago Fix for mojibake bg painting problem on bofa.com. The bug # is 3487144. Transparen...
hyatt [Wed, 10 Dec 2003 00:29:03 +0000 (00:29 +0000)]
Fix for mojibake bg painting problem on bofa.com.  The bug # is 3487144.  Transparent colors were not
being handled properly when specified on the body.

        Reviewed by darin

        * khtml/rendering/render_box.cpp:
        (RenderBox::paintRootBoxDecorations):
        (RenderBox::paintBackgroundExtended):

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

18 years ago Reviewed by Dave.
darin [Tue, 9 Dec 2003 23:39:56 +0000 (23:39 +0000)]
    Reviewed by Dave.

        - fixed 3505391: REGRESSION (100-116): pages that move cells around don't repaint correctly

        * khtml/rendering/render_table.cpp: (RenderTableSection::layoutRows): Added code
        similar to the code in RenderBlock::layoutBlock, but for table cells.

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

18 years ago Reviewed by Maciej.
darin [Tue, 9 Dec 2003 23:38:02 +0000 (23:38 +0000)]
    Reviewed by Maciej.

        * khtml/ecma/kjs_events.cpp: (JSEventListener::handleEvent): Add locking around the call to
        push event handler scope. Without this, we hit the "allocated without locking" assertion.

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

18 years ago Fix the dirty rect checks on various render_objects to be more accurate so that...
hyatt [Tue, 9 Dec 2003 23:15:57 +0000 (23:15 +0000)]
Fix the dirty rect checks on various render_objects to be more accurate so that page-break properties don't
have mojibake when printing.

        Reviewed by john

        * khtml/rendering/render_block.cpp:
        (khtml::RenderBlock::paint):
        * khtml/rendering/render_flow.cpp:
        (RenderFlow::paintLineBoxBackgroundBorder):
        (RenderFlow::paintLineBoxDecorations):
        * khtml/rendering/render_replaced.cpp:
        (RenderReplaced::paint):
        * khtml/rendering/render_table.cpp:
        (RenderTable::paint):

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

18 years ago Reviewed by Richard.
darin [Tue, 9 Dec 2003 23:01:09 +0000 (23:01 +0000)]
    Reviewed by Richard.

        - fixed 3500408: Web Kit should pass the MAYSCRIPT attribute from the APPLET tag to the Java plug-in

        * khtml/html/html_objectimpl.cpp:
        (HTMLAppletElementImpl::parseAttribute): Allow the "mayscript" attribute.
        (HTMLAppletElementImpl::createRenderer): Pass the value of the "mayscript" attribute
        as an argument named "mayScript".

        * khtml/misc/htmlattrs.in: Added "mayscript".
        * khtml/misc/htmlattrs.c: Regenerated.
        * khtml/misc/htmlattrs.h: Regenerated.

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

18 years ago Reviewed by John.
mjs [Tue, 9 Dec 2003 22:26:20 +0000 (22:26 +0000)]
    Reviewed by John.

<rdar://problem/3505183>: JavaScriptCore should assert that interpreter is locked in collector

        * kjs/collector.cpp:
        (KJS::Collector::allocate): Assert that interpreter lock count is not 0.
        (KJS::Collector::collect): likewise

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

18 years ago Reviewed by Darin.
mjs [Tue, 9 Dec 2003 22:26:12 +0000 (22:26 +0000)]
    Reviewed by Darin.

<rdar://problem/3501030>: JavaScript sites crash when a PAC file is in place (WebCore,Safari 1.2)

        * khtml/ecma/kjs_events.cpp:
        (JSEventListener::handleEvent): Lock interpreter when needed.
        (JSLazyEventListener::parseCode): Likewise.
        (KJS::getDOMEvent): Likewise.
        * khtml/ecma/kjs_proxy.cpp:
        (KJSProxyImpl::evaluate): Likewise.
        (KJSProxyImpl::initScript): Likewise.

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

18 years ago Fix for 3491235, really make <script src="..."/> work in HTML. My original attempt...
hyatt [Tue, 9 Dec 2003 22:11:56 +0000 (22:11 +0000)]
Fix for 3491235, really make <script src="..."/> work in HTML.  My original attempt to fix this only made
the tag flat, but did not ensure that the script got processed.

        Reviewed by john

        * khtml/html/htmltokenizer.cpp:
        (HTMLTokenizer::parseTag):

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

18 years agoWebKit:
cblu [Tue, 9 Dec 2003 21:52:36 +0000 (21:52 +0000)]
WebKit:

Fixed: <rdar://problem/3504237>: add downloaded certificates to keychain

        Reviewed by darin.

        * WebCoreSupport.subproj/WebKeyGeneration.cpp:
        (signedPublicKeyAndChallengeString):
        (addCertificateToKeyChainFromData): new
        (addCertificateToKeyChainFromFile): new
        * WebCoreSupport.subproj/WebKeyGeneration.h:
        * WebCoreSupport.subproj/WebKeyGenerator.h:
        * WebCoreSupport.subproj/WebKeyGenerator.m:
        (-[WebKeyGenerator addCertificateToKeyChainFromFileAtPath:]): new
        * WebKit.exp:
        * WebKit.pbproj/project.pbxproj: made WebKeyGenerator.h private

WebBrowser:

Fixed: <rdar://problem/3504237>: add downloaded certificates to keychain

        Reviewed by darin.

        * DownloadProgressEntry.m:
        (-[DownloadProgressEntry _addCertificateToKeyChain]): new, calls [WebKeyGenerator addCertificateToKeyChainFromFileAtPath:]
        (-[DownloadProgressEntry autoOpen]): call _addCertificateToKeyChain

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

18 years ago - fixed <rdar://problem/3504907>: REGRESSION (100-116):
sullivan [Tue, 9 Dec 2003 21:23:07 +0000 (21:23 +0000)]
    - fixed <rdar://problem/3504907>: REGRESSION (100-116):
        Clicking QuickTime-requiring link twice crashes (wholenote.com)

        I found the bug; Darin wrote the fix; I reviewed and tested.

        * Plugins.subproj/WebNetscapePluginPackage.m:
        (-[WebNetscapePluginPackage stringForStringListID:andIndex:]):
        Rewrote this method to not use GetIndString, because GetIndString looks
        at all open resource files and in this case was reading information from
        the wrong plugin file.

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

18 years agoAdding a dynamic cell array test.
hyatt [Tue, 9 Dec 2003 19:56:10 +0000 (19:56 +0000)]
Adding a dynamic cell array test.

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

18 years ago Fix for 3503652, news.com misrenders badly (footer is out of position). My fix...
hyatt [Tue, 9 Dec 2003 06:58:56 +0000 (06:58 +0000)]
Fix for 3503652, news.com misrenders badly (footer is out of position).  My fix to 3495748 caused this
regression.  I made the tag priority of <nobr> too high.  It needed to be the same as <div>, and I
accidentally made it higher.  I intended for it to be the same as <div>.

I also had to make a fix (now that <nobr> has a higher priority) to ensure <nobr> can't be nested inside
other <nobr>.

Both fixes were required to make news.com render correctly again.

        Reviewed by darin

        * khtml/html/dtd.cpp:
        * khtml/html/htmlparser.cpp:
        (KHTMLParser::getElement):

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

18 years agoWebCore:
cblu [Tue, 9 Dec 2003 02:12:56 +0000 (02:12 +0000)]
WebCore:

Fixed: <rdar://problem/3234676>: Support for KEYGEN tag (ie 509 email certificates from www.thawte.com)

        Reviewed by mjs.

        * WebCore-combined.exp:
        * WebCore.exp:
        * WebCore.pbproj/project.pbxproj:
        * khtml/html/html_formimpl.cpp:
        (HTMLKeygenElementImpl::parseAttribute): store the KEYTYPE attribute
        (HTMLKeygenElementImpl::encoding): call KSSLKeyGen::signedPublicKeyAndChallengeString
        * khtml/html/html_formimpl.h: remove 2 declared but unimplemented methods
        * khtml/misc/htmlattrs.c: generated changes
        (hash_attr):
        (findAttr):
        * khtml/misc/htmlattrs.h: generated change
        * khtml/misc/htmlattrs.in: added KEYTYPE
        * kwq/KWQKSSLKeyGen.h:
        * kwq/KWQKSSLKeyGen.mm:
        (KSSLKeyGen::supportedKeySizes): call renamed strengthMenuItemTitles
        (KSSLKeyGen::signedPublicKeyAndChallengeString): new, calls [WebCoreKeyGenerationFactory signedPublicKeyAndChallengeStringWithStrengthIndex:challenge:]
        * kwq/WebCoreKeyGenerationFactory.h: Added.
        * kwq/WebCoreKeyGenerationFactory.m: Added.
        (+[WebCoreKeyGenerationFactory sharedFactory]):
        (-[WebCoreKeyGenerationFactory init]):
        (-[WebCoreKeyGenerationFactory strengthMenuItemTitles]):
        (-[WebCoreKeyGenerationFactory signedPublicKeyAndChallengeStringWithStrengthIndex:challenge:]):
        * kwq/WebCoreLocalizedStringFactory.h: Removed.
        * kwq/WebCoreLocalizedStringFactory.m: Removed.

WebKit:

Fixed: <rdar://problem/3234676>: Support for KEYGEN tag (ie 509 email certificates from www.thawte.com)

        Reviewed by mjs.

        * WebCoreSupport.subproj/WebKeyGeneration.cpp: Added.
        (gnrAddContextAttribute): new
        (gnrGetSubjPubKey): new
        (gnrNullAlgParams): new
        (gnrSign): new
        (gnrFreeCssmData): new
        (signedPublicKeyAndChallengeString): new
        * WebCoreSupport.subproj/WebKeyGeneration.h: Added.
        * WebCoreSupport.subproj/WebKeyGenerationFactory.h: Added. Renamed from WebLocalizedStringFactory.
        * WebCoreSupport.subproj/WebKeyGenerationFactory.m: Added.
        (+[WebKeyGenerationFactory createSharedFactory]): no change
        (-[WebKeyGenerationFactory dealloc]): no change
        (-[WebKeyGenerationFactory strengthMenuItemTitles]): new
        (-[WebKeyGenerationFactory signedPublicKeyAndChallengeStringWithStrengthIndex:challenge:]): new
        * WebCoreSupport.subproj/WebLocalizedStringFactory.h: Removed.
        * WebCoreSupport.subproj/WebLocalizedStringFactory.m: Removed.
        * WebCoreSupport.subproj/WebNetscapeTemplates.cpp: Added.
        * WebCoreSupport.subproj/WebNetscapeTemplates.h: Added.
        * WebKit.pbproj/project.pbxproj:
        * WebKitPrefix.h:
        * WebView.subproj/WebFrameView.m:

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

18 years ago Reviewed by Ken.
mjs [Tue, 9 Dec 2003 01:02:38 +0000 (01:02 +0000)]
    Reviewed by Ken.

<rdar://problem/3504047>: XMLHttpRequest object needs onload event

* khtml/ecma/xmlhttprequest.cpp:
        (KJS::XMLHttpRequest::getValueProperty): Implemented onload property.
        (KJS::XMLHttpRequest::putValue): Ditto.
        (KJS::XMLHttpRequest::XMLHttpRequest): Ditto.
        (KJS::XMLHttpRequest::changeState): Ditto.
        * khtml/ecma/xmlhttprequest.h:
        * khtml/ecma/xmlhttprequest.lut.h: Regenerated.

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

18 years agoJavaScriptCore:
rjw [Tue, 9 Dec 2003 00:53:54 +0000 (00:53 +0000)]
JavaScriptCore:
LiveConnect:  The last piece of the JavaScript side of the
LiveConnect implementation.  This change adds support for
setting/getting values from Java arrays in JavaScript.

        Reviewed by John.

        * bindings/jni/jni_instance.h:
        * bindings/jni/jni_runtime.cpp:
        (JavaField::JavaField):
        (convertJObjectToArray):
        (JavaArray::JavaArray):
        (JavaArray::~JavaArray):
        (JavaArray::setValueAt):
        (JavaArray::valueAt):
        (JavaArray::getLength):
        * bindings/jni/jni_runtime.h:
        (Bindings::JavaArray::operator=):
        (Bindings::JavaArray::javaArray):
        * bindings/jni/jni_utility.cpp:
        (JNITypeFromPrimitiveType):
        (convertValueToJValue):
        * bindings/jni/jni_utility.h:
        * bindings/runtime.h:
        * bindings/runtime_array.cpp:
        (RuntimeArrayImp::RuntimeArrayImp):
        (RuntimeArrayImp::~RuntimeArrayImp):
        (RuntimeArrayImp::get):
        (RuntimeArrayImp::put):
        (RuntimeArrayImp::hasProperty):
        * bindings/runtime_array.h:
        (KJS::RuntimeArrayImp::getLength):
        (KJS::RuntimeArrayImp::getConcreteArray):
        * bindings/runtime_object.cpp:
        (RuntimeObjectImp::get):
        (RuntimeObjectImp::canPut):
        (RuntimeObjectImp::hasProperty):

Tests:
        LiveConnect:  Added tests for JavaScript to Java
        array access.

        Reviewed by John.

        * LiveConnect/Blink/Blink.java:
        (Blink):
        (Blink.init):
        * LiveConnect/Blink/test.html:

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

18 years agoAdd asahi.com layout test.
hyatt [Mon, 8 Dec 2003 23:51:45 +0000 (23:51 +0000)]
Add asahi.com layout test.

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

18 years ago Fix for 3503022, asahi.com is too wide. Bugs in line breaking of breakable Japanese...
hyatt [Mon, 8 Dec 2003 23:50:26 +0000 (23:50 +0000)]
Fix for 3503022, asahi.com is too wide.  Bugs in line breaking of breakable Japanese characters caused
the breaks to be ignored.

        Reviewed by john

        * khtml/rendering/render_text.cpp:
        (RenderText::calcMinMaxWidth):

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

18 years ago Fix the position method to return screen coords like it should and to use the lower...
hyatt [Mon, 8 Dec 2003 19:44:04 +0000 (19:44 +0000)]
Fix the position method to return screen coords like it should and to use the lower left corner instead of
the upper left.

        Reviewed by john

        * kwq/KWQAccObject.h:
        * kwq/KWQAccObject.mm:
        (-[KWQAccObject position]):
        (-[KWQAccObject size]):

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

18 years ago Reviewed by John.
darin [Mon, 8 Dec 2003 16:45:07 +0000 (16:45 +0000)]
    Reviewed by John.

        - fixed 3502347: REGRESSION (100-116): bottom of login window sometimes missing (TR background image)

        * khtml/rendering/render_object.h: Added setPixmap.
        * khtml/rendering/render_object.cpp: (RenderObject::setPixmap): Moved this
        function here from RenderBox. This code is needed for the table row class and
        similar classes that supply a background image that is drawn by the table cell,
        and those are not RenderBox subclasses.

        * khtml/rendering/render_box.cpp: Removed setPixmap.
        * khtml/rendering/render_box.h: Removed setPixmap.

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

18 years ago - fixed <rdar://problem/3502655>: REGRESSION: Repro crash at espn.com
sullivan [Mon, 8 Dec 2003 06:04:13 +0000 (06:04 +0000)]
    - fixed <rdar://problem/3502655>: REGRESSION: Repro crash at espn.com

        Reviewed by Darin.

        * khtml/html/html_objectimpl.cpp:
        (HTMLAppletElementImpl::getAppletInstance):
        Check for nil RenderApplet before dereferencing rather than after.

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

19 years ago Add support for link clicking as an accessibility action.
hyatt [Fri, 5 Dec 2003 23:22:01 +0000 (23:22 +0000)]
Add support for link clicking as an accessibility action.

        Reviewed by john

        * kwq/KWQAccObject.mm:
        (-[KWQAccObject anchorElement]):
        (-[KWQAccObject role]):
        (-[KWQAccObject accessibilityAttributeNames]):
        (-[KWQAccObject accessibilityActionNames]):
        (-[KWQAccObject accessibilityActionDescription:]):
        (-[KWQAccObject accessibilityPerformAction:]):

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

19 years agoJavaScriptCore:
rjw [Fri, 5 Dec 2003 23:05:10 +0000 (23:05 +0000)]
JavaScriptCore:
LiveConnect:  Part 1 of supporting JS bindings to
native language arrays.

        Reviewed by Chris.

        * JavaScriptCore.pbproj/project.pbxproj:
        * bindings/jni/jni_runtime.cpp:
        (JavaField::JavaField):
        (convertJObjectToArray):
        (JavaField::valueFromInstance):
        (JavaField::setValueToInstance):
        * bindings/jni/jni_runtime.h:
        * bindings/runtime.cpp:
        (Instance::setValueOfField):
        * bindings/runtime.h:
        (Bindings::Array::~Array):

Tests:
        Added tests to access Java arrays.

        Reviewed by Chris.

        * LiveConnect/Blink/Blink.java:
        (Blink):
        (Blink.init):
        * LiveConnect/Blink/test.html:

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

19 years ago Reviewed by John.
mjs [Fri, 5 Dec 2003 22:03:07 +0000 (22:03 +0000)]
    Reviewed by John.

<rdar://problem/3487222>: Add ability to create working fully standalone document object

        * khtml/css/cssstyleselector.cpp:
        (khtml::CSSStyleSelector::CSSStyleSelector):
        (khtml::CSSStyleSelector::addSheet):
        (khtml::CSSStyleSelector::initForStyleResolve):
        (khtml::CSSStyleSelector::applyRule):
        * khtml/dom/dom_doc.cpp:
        (DOM::Document::part):
        * khtml/dom/dom_doc.h:
        * khtml/ecma/kjs_dom.cpp:
        (DOMDocument::getValueProperty):
        (KJS::checkNodeSecurity):
        * khtml/ecma/kjs_html.cpp:
        (KJS::HTMLDocFunction::tryCall):
        (KJS::HTMLDocument::tryGet):
        (KJS::HTMLDocument::putValue):
        (KJS::HTMLElement::tryGet):
        (Image::notifyFinished):
        * khtml/ecma/kjs_traversal.cpp:
        (JSNodeFilter::acceptNode):
        * khtml/ecma/xmlhttprequest.cpp:
        (KJS::XMLHttpRequest::changeState):
        * khtml/html/html_baseimpl.cpp:
        (HTMLBodyElementImpl::insertedIntoDocument):
        (HTMLFrameElementImpl::isURLAllowed):
        (HTMLFrameElementImpl::attach):
        (HTMLFrameElementImpl::detach):
        (HTMLFrameElementImpl::contentDocument):
        (HTMLIFrameElementImpl::attach):
        * khtml/html/html_documentimpl.cpp:
        (HTMLDocumentImpl::referrer):
        (HTMLDocumentImpl::lastModified):
        * khtml/html/html_formimpl.cpp:
        (HTMLFormElementImpl::formData):
        (HTMLFormElementImpl::prepareSubmit):
        (HTMLFormElementImpl::submit):
        (HTMLFormElementImpl::reset):
        (HTMLGenericFormElementImpl::isKeyboardFocusable):
        (HTMLGenericFormElementImpl::defaultEventHandler):
        * khtml/html/html_headimpl.cpp:
        (HTMLBaseElementImpl::process):
        (HTMLLinkElementImpl::process):
        * khtml/html/html_inlineimpl.cpp:
        (HTMLAnchorElementImpl::isKeyboardFocusable):
        (HTMLAnchorElementImpl::defaultEventHandler):
        * khtml/html/html_objectimpl.cpp:
        (HTMLAppletElementImpl::createRenderer):
        (HTMLAppletElementImpl::getAppletInstance):
        (HTMLEmbedElementImpl::rendererIsNeeded):
        (HTMLObjectElementImpl::rendererIsNeeded):
        * khtml/html/htmltokenizer.cpp:
        (HTMLTokenizer::scriptExecution):
        (HTMLTokenizer::parseTag):
        * khtml/rendering/render_applet.cpp:
        (RenderApplet::RenderApplet):
        * khtml/xml/dom_docimpl.cpp:
        (DocumentImpl::setTitle):
        (DocumentImpl::part):
        (DocumentImpl::close):
        (DocumentImpl::processHttpEquiv):
        * khtml/xml/dom_docimpl.h:
        * khtml/xml/dom_nodeimpl.cpp:
        (NodeImpl::dispatchEvent):
        * kwq/KWQAccObject.mm:
        (-[KWQAccObject textUnderElement]):
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::partForNode):
        (KWQKHTMLPart::attributedString):

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

19 years ago Fixed 3501885. Added null test to returned node from collection.
rjw [Fri, 5 Dec 2003 22:00:06 +0000 (22:00 +0000)]
Fixed 3501885.  Added null test to returned node from collection.

        Reviewed by John.

        * khtml/ecma/kjs_html.cpp:
        (KJS::HTMLCollection::tryGet):

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

19 years ago - fixed <rdar://problem/3491427>: REGRESSION (100-114): multi-page HTML
sullivan [Fri, 5 Dec 2003 18:06:33 +0000 (18:06 +0000)]
    - fixed <rdar://problem/3491427>: REGRESSION (100-114): multi-page HTML
        content in Mail is blank when printed

        Darin and I figured this one out.

        Reviewed by Ken.

        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView _setPrinting:minimumPageWidth:maximumPageWidth:adjustViewSize:]):
        Don't call setNeedsDisplay:NO when we're turning printing on, as doing so prevents
        anything from drawing in the case where this is called from
        adjustPageHeightsNew:top:bottom:limit

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

19 years ago Reviewed by John.
darin [Fri, 5 Dec 2003 16:52:36 +0000 (16:52 +0000)]
    Reviewed by John.

        - fixed  regression in small caps with substituted fonts my patch from yesterday caused
        - fixed 3463599: if Lucida font is installed, you see bad glyphs on pages that use it (advogato.org)
        - fixed storage leak if a renderer is ever deallocated (I don't think we ever do that)
        - fixed some small leaks in various error cases by adding appropriate free and dispose calls

        * WebCoreSupport.subproj/WebTextRenderer.m:
        (-[WebTextRenderer dealloc]): Free the Unicode glyph map too.
        (fontContainsString): Moved inline function up here so it will be inlined.
        (-[WebTextRenderer _setupFont]): Free the glyph map and set it back to zero if we fail after
        extending the glyph map to include space. This fixes the "wrong glyph codes" bug with Lucida above.
        (-[WebTextRenderer _extendUnicodeCharacterToGlyphMapToInclude:]): Add free calls needed to avoid
        storage leaks in failure cases.
        (-[WebTextRenderer _extendCharacterToGlyphMapToInclude:]): Ditto.
        (-[WebTextRenderer _initializeATSUStyle]): Add ATSUDisposeStyle to fix storage leak.
        (freeWidthMap): Use a loop instead of recursion.
        (freeGlyphMap): Use a loop instead of recursion.
        (freeUnicodeGlyphMap): Added.
        (widthForNextCharacter): Don't use the original characters or cluster length, because the
        character may have been capitalized for use in small caps rendering. So check the character
        for <= 0xFFFF instead of looking at clusterLength, and break the character into a local array
        instead of using the original character pointer.

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

19 years ago Reviewed by Richard.
darin [Fri, 5 Dec 2003 01:27:10 +0000 (01:27 +0000)]
    Reviewed by Richard.

        - fixed 3497879: REGRESSION (100-115): all non-BMP characters (including Deseret) are broken

        * WebCoreSupport.subproj/WebTextRenderer.m:
        (-[WebTextRenderer _CG_pointToOffset:style:position:reversed:]): Bump offset by getting it from
        the iterator; don't assume we can just bump it by one each time. It would be even nicer to have
        a bit more abstraction.
        (initializeCharacterWidthIterator): Remove call to initializeCharacterShapeIterator.
        (widthForNextCharacter): Move handling of surrogate pairs (non-BMP) in here and unify it with
        the handling of BMP characters; this removes the broken code that was returning the wrong font,
        and changes us to use the code that was already doing the right thing for the surrogate pair case.
        Also get rid of the use of 0 width to mean "no glyph", which fixes the doubled glyph problem.
        Also got rid of remnants of use of the shape iterator.

        * Misc.subproj/WebUnicode.h: Remove obsolete shape iterator.
        * Misc.subproj/WebUnicode.m: Ditto.

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

19 years agoJavaScriptCore:
rjw [Fri, 5 Dec 2003 01:05:49 +0000 (01:05 +0000)]
JavaScriptCore:
LiveConnect:  Moved defaultValue into concrete implementation because
more intelligent conversion can be perform with knowledge
of the class of the original instance.

        Reviewed by Chris.

        * bindings/jni/jni_class.cpp:
        (JavaClass::isNumberClass):
        (JavaClass::isBooleanClass):
        (JavaClass::isStringClass):
        * bindings/jni/jni_class.h:
        * bindings/jni/jni_instance.cpp:
        (JavaInstance::defaultValue):
        (JavaInstance::valueOf):
        * bindings/jni/jni_instance.h:
        (Bindings::JavaInstance::javaInstance):
        * bindings/runtime.h:
        * bindings/runtime_object.cpp:
        (RuntimeObjectImp::defaultValue):

Tests:
        Fixed incorrect log of boolean type.

        Reviewed by Chris.

        * LiveConnect/Blink/test.html:

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

19 years agoJavaScriptCore:
rjw [Fri, 5 Dec 2003 00:28:00 +0000 (00:28 +0000)]
JavaScriptCore:
LiveConnect:  Added support for setting the value of Java
fields.

        Reviewed by Chris.

        * bindings/jni/jni_instance.cpp:
        (JavaInstance::invokeMethod):
        * bindings/jni/jni_runtime.cpp:
        (JavaParameter::JavaParameter):
        (JavaField::JavaField):
        (JavaField::valueFromInstance):
        (JavaField::setValueToInstance):
        (JavaMethod::JavaMethod):
        * bindings/jni/jni_runtime.h:
        (Bindings::JavaField::getJNIType):
        * bindings/jni/jni_utility.cpp:
        (JNITypeFromClassName):
        (convertValueToJValue):
        * bindings/jni/jni_utility.h:
        * bindings/runtime.cpp:
        (Instance::setValueOfField):
        * bindings/runtime.h:
        * bindings/runtime_object.cpp:
        (RuntimeObjectImp::get):
        (RuntimeObjectImp::put):
        (RuntimeObjectImp::defaultValue):

Tests:
        Added test of setting Java fields from JavaScript.

        Reviewed by Chris.

        * LiveConnect/Blink/Holder.java:
        (Holder):
        * LiveConnect/Blink/test.html:

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

19 years agoWebCore:
rjw [Thu, 4 Dec 2003 22:33:12 +0000 (22:33 +0000)]
WebCore:
Added support for named applet access from document node.
Factored creation of KJS::Values from RuntimeObjectImps.

        Reviewed by Chris.

        * khtml/ecma/kjs_dom.cpp:
        (KJS::getDOMNamedNodeMap):
        (KJS::getRuntimeObject):
        * khtml/ecma/kjs_dom.h:
        * khtml/ecma/kjs_html.cpp:
        (KJS::HTMLDocument::tryGet):
        (KJS::HTMLElement::tryGet):
        (KJS::HTMLCollection::tryGet):

JavaScriptCore:
Added support for string conversions.
Changed various JavaString member variables to be inline.
Implemented defaultValue for context relevant type coercion.

        Reviewed by Chris.

        * bindings/jni/jni_class.cpp:
        (JavaClass::JavaClass):
        (JavaClass::setClassName):
        (JavaClass::classForInstance):
        * bindings/jni/jni_class.h:
        * bindings/jni/jni_instance.cpp:
        (JavaInstance::stringValue):
        (JavaInstance::numberValue):
        (JavaInstance::booleanValue):
        (JavaInstance::invokeMethod):
        * bindings/jni/jni_instance.h:
        * bindings/jni/jni_runtime.cpp:
        (JavaParameter::JavaParameter):
        (JavaField::JavaField):
        (JavaMethod::JavaMethod):
        (appendClassName):
        (JavaMethod::signature):
        * bindings/jni/jni_runtime.h:
        (Bindings::JavaString::JavaString):
        (Bindings::JavaString::~JavaString):
        (Bindings::JavaString::operator=):
        (Bindings::JavaString::characters):
        (Bindings::JavaParameter::JavaParameter):
        (Bindings::JavaParameter::~JavaParameter):
        (Bindings::JavaParameter::operator=):
        (Bindings::JavaParameter::type):
        (Bindings::JavaField::JavaField):
        (Bindings::JavaField::~JavaField):
        (Bindings::JavaField::operator=):
        (Bindings::JavaField::name):
        (Bindings::JavaField::type):
        (Bindings::JavaMethod::JavaMethod):
        (Bindings::JavaMethod::_commonDelete):
        (Bindings::JavaMethod::name):
        (Bindings::JavaMethod::returnType):
        * bindings/jni/jni_utility.cpp:
        (convertValueToJValue):
        * bindings/runtime.h:
        (Bindings::Instance::valueOf):
        * bindings/runtime_method.cpp:
        (RuntimeMethodImp::call):
        * bindings/runtime_object.cpp:
        (RuntimeObjectImp::RuntimeObjectImp):
        (RuntimeObjectImp::get):
        (RuntimeObjectImp::defaultValue):
        * bindings/runtime_object.h:
        (KJS::RuntimeObjectImp::classInfo):

Tests:
        Added tests passing various parameters type to Java methods.

        Reviewed by Chris.

        * LiveConnect/Blink/Blink.java:
        (Blink):
        (Blink.setTextWithString):
        (Blink.setTextWithNumberValueUsingByte):
        (Blink.setTextWithNumberValueUsingShort):
        (Blink.setTextWithNumberValueUsingInt):
        (Blink.setTextWithNumberValueUsingLong):
        (Blink.setTextWithNumberValueUsingFloat):
        (Blink.setTextWithNumberValueUsingDouble):
        (Blink.setTextWithNumberValueUsingChar):
        (Blink.setTextWithNumberValueUsingBoolean):
        * LiveConnect/Blink/Blink.pbproj/project.pbxproj:
        * LiveConnect/Blink/test.html:
        * PDFBundle/PDFBundle.pbproj/project.pbxproj:

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

19 years ago Reviewed by John.
darin [Thu, 4 Dec 2003 19:45:42 +0000 (19:45 +0000)]
    Reviewed by John.

        - fixed 3498712: REGRESSION (100-115): Safari aborts at http://www11.dht.dk/~blangstrup_org/

        This was an uncaught exception thrown by DocumentImpl. But the design of KHTML DOM is that
        "impl" classes return exception codes; they don't throw exceptions.

        * khtml/dom/dom_doc.cpp:
        (DOM::Document::createElement): Throw exception if necessary. The impl function now returns
        an exception code.
        (DOM::Document::createElementNS): Ditto.

        * khtml/html/html_documentimpl.h: Add exception code parameter to createElement.
        * khtml/html/html_documentimpl.cpp: (HTMLDocumentImpl::createElement): Pass along the
        exception code from the lower level.

        * khtml/xml/dom_docimpl.h: Add exception code parameters to createElement, createElementNS,
        and createHTMLElement.
        * khtml/xml/dom_docimpl.cpp:
        (DOMImplementationImpl::createDocument): Handle exception code from createElementNS.
        (DocumentImpl::createElement): Add exception code parameter, not set since there is
        no exception.
        (DocumentImpl::importNode): Handle exception code from createElementNS.
        (DocumentImpl::createElementNS): Add exception code parameter. Propagate the exception
        codes that we get from createHTMLElement and setPrefix.
        (DocumentImpl::createHTMLElement): Add exception code parameter. Use an exception code
        rather than a C++ exception for INVALID_CHARACTER_ERR.

        * khtml/xml/dom_elementimpl.cpp: (ElementImpl::cloneNode): Pass exception code parameter to
        createElement.

        * khtml/xml/xml_tokenizer.cpp:
        (XMLHandler::startElement): Pass exception code parameter to createElementNS, and return false
        if it is not zero. This is where the bug happened. Before we would get an exception from
        createElementNS, but "impl" functions are not supposed to throw in KHTML's DOM.
        (XMLTokenizer::finish): Add various exception code parameters to compile, but we know we won't
        get any exceptions.

        * kwq/WebCoreDOMDocument.mm:
        (-[WebCoreDOMDocument createElement:]): Pass an (ignored) exception code parameter.
        (-[WebCoreDOMDocument createElementNS::]): Pass an (ignored) exception code parameter.

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

19 years agothe tree is open for Safari-117
vicki [Thu, 4 Dec 2003 19:01:16 +0000 (19:01 +0000)]
the tree is open for Safari-117

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

19 years agoSafari-116, Safari 1.2 stamp
vicki [Thu, 4 Dec 2003 18:57:43 +0000 (18:57 +0000)]
Safari-116, Safari 1.2 stamp

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

19 years ago Reviewed by Ken.
darin [Thu, 4 Dec 2003 16:28:01 +0000 (16:28 +0000)]
    Reviewed by Ken.

        - fixed 3498426: assertion failure in tooltip code at macosx.apple.com

        * WebView.subproj/WebHTMLView.m: (-[WebHTMLView _setToolTip:]): Work around
        the apparent bug in AppKit (3500217) that causes it to return 0 for the tool tip
        tag by using removeAllToolTips and not storing the tag at all. Besides the assertion
        failure there may also be a symptom of a "stuck" tool tip and a small memory
        leak until the window is closed.
        * WebView.subproj/WebHTMLViewPrivate.h: Remove unused toolTipTag.

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

19 years agoWebCore:
rjw [Thu, 4 Dec 2003 01:41:24 +0000 (01:41 +0000)]
WebCore:
LiveConnect:  Removed some debugging.

        Reviewed by Chris.

        * khtml/ecma/kjs_html.cpp:
        (KJS::HTMLCollection::tryGet):

JavaScriptCore:
LiveConnect:  Added support for parameter passing to Java and conversion
of return values.

        Reviewed by Chris.

        * bindings/jni/jni_instance.cpp:
        (JavaInstance::invokeMethod):
        * bindings/jni/jni_instance.h:
        * bindings/jni/jni_runtime.cpp:
        (JavaParameter::JavaParameter):
        (JavaMethod::JavaMethod):
        (JavaMethod::signature):
        * bindings/jni/jni_runtime.h:
        (Bindings::JavaParameter::JavaParameter):
        (Bindings::JavaParameter::operator=):
        (Bindings::JavaParameter::getJNIType):
        * bindings/jni/jni_utility.cpp:
        (callJNIBooleanMethodA):
        (convertValueToJValue):
        * bindings/jni/jni_utility.h:
        * bindings/runtime.h:
        * bindings/runtime_method.cpp:
        (RuntimeMethodImp::call):
        * bindings/runtime_object.cpp:
        (RuntimeObjectImp::get):

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