WebKit-https.git
16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 years ago Fix for 3475761, list bullets mislayout after text zooming.
hyatt [Thu, 4 Dec 2003 00:17:14 +0000 (00:17 +0000)]
Fix for 3475761, list bullets mislayout after text zooming.

        Reviewed by kocienda

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

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

16 years ago Fix for 3493356, table cells didn't repaint properly.
hyatt [Wed, 3 Dec 2003 22:46:42 +0000 (22:46 +0000)]
Fix for 3493356, table cells didn't repaint properly.

        Reviewed by kocienda

        * khtml/rendering/render_object.cpp:
        (RenderObject::repaintObjectsBeforeLayout):
        * khtml/rendering/render_table.cpp:
        (RenderTableCell::getAbsoluteRepaintRect):
        * khtml/rendering/render_table.h:

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

16 years ago*** empty log message ***
hyatt [Wed, 3 Dec 2003 22:07:32 +0000 (22:07 +0000)]
*** empty log message ***

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

16 years ago Fix for 3495748, hang in parser at ocelot.ca. <nobr> needs to have very high priori...
hyatt [Wed, 3 Dec 2003 22:04:45 +0000 (22:04 +0000)]
Fix for 3495748, hang in parser at ocelot.ca.  <nobr> needs to have very high priority (equal to the
priority of blocks like h1-6, p, and div), so that unclosed <nobr>s will close divs and ps.

        Reviewed by gramps

        * khtml/html/dtd.cpp:

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

16 years ago Fix for 3475767, hang at saabnet.com. Fix h1-h6 to be more tolerant regarding allow...
hyatt [Wed, 3 Dec 2003 20:58:20 +0000 (20:58 +0000)]
Fix for 3475767, hang at saabnet.com.  Fix h1-h6 to be more tolerant regarding allowed child elements, to avoid
deeply nested pages.

        Reviewed by darin

        * khtml/html/dtd.cpp:
        (DOM::checkChild):

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

16 years ago - fixed these two design issues after Dave and I talked to HI:
sullivan [Wed, 3 Dec 2003 20:50:36 +0000 (20:50 +0000)]
    - fixed these two design issues after Dave and I talked to HI:
        <rdar://problem/3497072>: There shouldn't be a focus ring around clicked regions
        <rdar://problem/3499315>: Focus ring should use aqua color always

        Reviewed by Dave.

        * khtml/css/html4.css:

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

16 years ago Reviewed by Ken.
mjs [Wed, 3 Dec 2003 19:46:12 +0000 (19:46 +0000)]
    Reviewed by Ken.

<rdar://problem/3395759>: results of parent.document.getElementsByTagName can't be added to string

* khtml/ecma/kjs_dom.cpp:
        (DOMNodeList::toPrimitive): Always convert to string instead of trying to convert
to number and failing, as is done for DOMNode.
        * khtml/ecma/kjs_dom.h: Prototype new method.

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

16 years agoWebCore:
rjw [Wed, 3 Dec 2003 01:21:39 +0000 (01:21 +0000)]
WebCore:
Return a value that is backed by RuntimeObjectImpl, instead
of a DOM object for applet[0].  This is better than having
the DOM object redirect to the RuntimeObjectImpl.

        Reviewed by Chris.

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

JavaScriptCore:
Added support for calling simple methods in Java from JavaScript.
(void return and no parameters).  Yay, LiveConnect lives.

Still need write argument and return value conversion code.

        Reviewed by Chris.

        * JavaScriptCore.pbproj/project.pbxproj:
        * bindings/jni/jni_instance.cpp:
        (JavaInstance::getClass):
        (JavaInstance::invokeMethod):
        * bindings/jni/jni_instance.h:
        * bindings/jni/jni_runtime.cpp:
        (JavaMethod::JavaMethod):
        (JavaMethod::signature):
        (JavaMethod::JNIReturnType):
        * bindings/jni/jni_runtime.h:
        (Bindings::JavaMethod::_commonDelete):
        (Bindings::JavaMethod::_commonCopy):
        (Bindings::JavaMethod::name):
        * bindings/jni/jni_utility.cpp:
        (signatureFromPrimitiveType):
        * bindings/jni/jni_utility.h:
        * bindings/runtime.h:
        * bindings/runtime_method.cpp: Added.
        (RuntimeMethodImp::RuntimeMethodImp):
        (RuntimeMethodImp::~RuntimeMethodImp):
        (RuntimeMethodImp::get):
        (RuntimeMethodImp::implementsCall):
        (RuntimeMethodImp::call):
        (RuntimeMethodImp::codeType):
        (RuntimeMethodImp::execute):
        * bindings/runtime_method.h: Added.
        * bindings/runtime_object.cpp:
        (RuntimeObjectImp::RuntimeObjectImp):
        (RuntimeObjectImp::get):
        * bindings/runtime_object.h:
        * kjs/function.cpp:
        (FunctionImp::FunctionImp):
        * kjs/interpreter.h:

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

16 years ago Reviewed by John.
mjs [Wed, 3 Dec 2003 01:09:01 +0000 (01:09 +0000)]
    Reviewed by John.

<rdar://problem/3488220>: namespaces test from David Faure causes Safari to crash in DOM::DocumentImpl::createElementNS

        * khtml/xml/dom_docimpl.cpp:
        (DocumentImpl::createElementNS): Check if new element is NULL
before messing with it, to avoid a crash.

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

16 years ago Fix for 3497999, null check the text() of RenderTexts to avoid a crash in current().
hyatt [Tue, 2 Dec 2003 23:19:11 +0000 (23:19 +0000)]
Fix for 3497999, null check the text() of RenderTexts to avoid a crash in current().

        Reviewed by kocienda

        * khtml/rendering/bidi.cpp:
        (khtml::BidiIterator::current):

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

16 years ago Reviewed by Darin.
mjs [Tue, 2 Dec 2003 23:13:50 +0000 (23:13 +0000)]
    Reviewed by Darin.

Implemented a simple form of document serialization, enough to take care of:

<rdar://problem/3487190>: implement send of DOMDocument for XMLHttpRequest

        * khtml/dom/dom_doc.cpp:
        (DOM::Document::toString):
        * khtml/dom/dom_doc.h:
        * khtml/ecma/xmlhttprequest.cpp:
        (KJS::XMLHttpRequest::urlMatchesDocumentDomain):
        (KJS::XMLHttpRequestProtoFunc::tryCall):
        * khtml/html/html_elementimpl.cpp:
        (HTMLElementImpl::toString):
        * khtml/html/html_elementimpl.h:
        * khtml/xml/dom_docimpl.cpp:
        (DocumentImpl::toString):
        (DocumentFragmentImpl::toString):
        (DocumentTypeImpl::copyFrom):
        (DocumentTypeImpl::toString):
        * khtml/xml/dom_docimpl.h:
        * khtml/xml/dom_elementimpl.cpp:
        (AttrImpl::toString):
        (ElementImpl::openTagStartToString):
        (ElementImpl::toString):
        * khtml/xml/dom_elementimpl.h:
        * khtml/xml/dom_nodeimpl.h:
        * khtml/xml/dom_textimpl.cpp:
        (CommentImpl::toString):
        (TextImpl::toString):
        (CDATASectionImpl::toString):
        * khtml/xml/dom_textimpl.h:
        * khtml/xml/dom_xmlimpl.cpp:
        (EntityImpl::toString):
        (EntityReferenceImpl::toString):
        (ProcessingInstructionImpl::setStyleSheet):
        (ProcessingInstructionImpl::toString):
        * khtml/xml/dom_xmlimpl.h:

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

16 years ago Fix for 3493677, containingBlock() null because we tried to support position:relativ...
hyatt [Tue, 2 Dec 2003 22:54:42 +0000 (22:54 +0000)]
Fix for 3493677, containingBlock() null because we tried to support position:relative on table rows.  Fix
is to disallow this.

        Reviewed by kocienda

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

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

16 years ago Fix for 3493697, nil-deref in bidi code. Need to null-check strings with no length.
hyatt [Tue, 2 Dec 2003 22:25:31 +0000 (22:25 +0000)]
Fix for 3493697, nil-deref in bidi code.  Need to null-check strings with no length.

        Reviewed by john

        * khtml/rendering/bidi.cpp:
        (khtml::addRun):

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

16 years ago Fix for 3495746, nil deref of containing block (frame inside frameset).
hyatt [Tue, 2 Dec 2003 22:06:13 +0000 (22:06 +0000)]
Fix for 3495746, nil deref of containing block (frame inside frameset).

        Reviewed by kocienda

        * khtml/rendering/render_box.cpp:
        (RenderBox::containingBlockWidth):

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

16 years ago Fixed:
cblu [Tue, 2 Dec 2003 19:58:03 +0000 (19:58 +0000)]
Fixed:
<rdar://problem/3439222>: always hangs opening plain text file on a particular machine due to missing font, no UI to detect
<rdar://problem/3492983>: Certain fonts cause Safari to hang on text/plain pages

        Reviewed by rjw.

        * WebView.subproj/WebTextView.m:
        (-[WebTextView setFixedWidthFont]): Use [[WebTextRendererFactory sharedFactory] fontWithFamilies:traits:size:] to get the font since it takes the font family which is what we store in WebPreferences and it does fallback work. Only set the font if non-nil is returned.

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

16 years ago Reviewed by John
kocienda [Tue, 2 Dec 2003 19:48:06 +0000 (19:48 +0000)]
    Reviewed by John

        * kwq/KWQRect.h:
        * kwq/KWQRect.mm:
        (QRect::bottomRight): Added helper.

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

16 years ago Reviewed by Maciej.
darin [Tue, 2 Dec 2003 16:04:55 +0000 (16:04 +0000)]
    Reviewed by Maciej.

        - fixed 3493799: JavaScript string.replace expands $ if it's the last character in replacement string

        * kjs/ustring.cpp: (KJS::UString::toDouble): Fix backwards handling of the "tolerant" boolean.
        This indirectly caused the string.replace bug.

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

16 years ago Merged the following patch from David Faure to fix:
mjs [Tue, 2 Dec 2003 11:00:40 +0000 (11:00 +0000)]
Merged the following patch from David Faure to fix:

<rdar://problem/3497663>: Can't look up frames by number using windw[i] notation

    2003-11-25  David Faure  <faure@kde.org>

        * ecma/kjs_window.cpp: Implement hasProperty and get for frames by number in Window,
        to fix window[0] and parent[1] etc. (#56983)

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

16 years ago Merged patches from Harri Porten and David Faure to fix:
mjs [Tue, 2 Dec 2003 10:11:47 +0000 (10:11 +0000)]
    Merged patches from Harri Porten and David Faure to fix:

<rdar://problem/3497643>: reproducible crash printing self-referential array

* kjs/array_object.cpp:
        (ArrayProtoFuncImp::call): Break out of the loop if an exception was thrown.
        * kjs/nodes.cpp:
        (FunctionCallNode::evaluate): Move function call depth check from here...
        * kjs/object.cpp:
        (KJS::Object::call): ...to here.
        * kjs/object.h: Un-inline Object::call now that it does more.

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

16 years ago Fixed mistake in method signatures used to get boolean and integer fields.
rjw [Mon, 1 Dec 2003 23:11:22 +0000 (23:11 +0000)]
Fixed mistake in method signatures used to get boolean and integer fields.

        Reviewed by Chris.

        * bindings/jni/jni_runtime.cpp:
        (JavaField::valueFromInstance):

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

16 years ago Reviewed by Richard.
mjs [Mon, 1 Dec 2003 22:53:31 +0000 (22:53 +0000)]
    Reviewed by Richard.

<rdar://problem/3487185>: implement security checks for XMLHttpRequest

* WebCoreSupport.subproj/WebSubresourceClient.m:
        (-[WebSubresourceClient connection:willSendRequest:redirectResponse:]): Let
WebCore know about redirects.

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

16 years ago Reviewed by Richard.
mjs [Mon, 1 Dec 2003 22:52:24 +0000 (22:52 +0000)]
    Reviewed by Richard.

<rdar://problem/3487185>: implement security checks for XMLHttpRequest

        * khtml/ecma/xmlhttprequest.cpp:
        (KJS::XMLHttpRequest::open): Refuse to start if the URL is not one
this document is allowed to access.
        (KJS::XMLHttpRequest::slotRedirection): Stop the job if we redirect
to a URL the home document is not allowed to access.
        * kwq/KWQResourceLoader.mm:
        (-[KWQResourceLoader redirectedToURL:]): emit the right signal
        * kwq/WebCoreResourceLoader.h: Prototype new method

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

16 years agoWebKit:
rjw [Mon, 1 Dec 2003 22:44:54 +0000 (22:44 +0000)]
WebKit:
Moved grungy polling code from WebKit to the JavaPlugin.

        Reviewed by Chris.

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

WebCore:
Fixed parameter passing to applet.  Child elements are NOT valid in setStyle().  So we now either create the widget before needed with createWidgetIfNecessary.  This either happens when doing the first layout, or when JavaScript first references the applet element.

Fixed early delete of the the main applet instance.  When the JS collector cleaned up the last JS object referring to the applet instance we were deleting the java instance.  This caused the applet instance cached on the applet element to be invalid.  The applet instance is the only Java object not to be cleaned up by the JS collector.

Added support for getting at Java object fields.

        Reviewed by Chris.

        * khtml/ecma/kjs_html.cpp:
        (KJS::HTMLElement::tryGet):
        * khtml/html/html_objectimpl.cpp:
        (HTMLAppletElementImpl::createRenderer):
        (HTMLAppletElementImpl::getAppletInstance):
        * khtml/html/html_objectimpl.h:
        * khtml/rendering/render_applet.cpp:
        (RenderApplet::createWidgetIfNecessary):
        (RenderApplet::layout):
        * khtml/rendering/render_applet.h:
        (khtml::RenderApplet::renderName):

JavaScriptCore:
Fixed parameter passing to applet.  Child elements are NOT valid in setStyle().  So we now create the widget before needed with createWidgetIfNecessary.  This either happens when doing the first layout, or when JavaScript first references the applet element.

Fixed early delete of the the main applet instance.  When the JS collector cleaned up the last JS object referring to the applet instance we were deleting the java instance.  This caused the applet instance cached on the applet element to be invalid.  The applet instance is the only Java object not to be cleaned up by the JS collector.

Added support for getting at Java object fields.

        Reviewed by Chris.

        * JavaScriptCore.pbproj/project.pbxproj:
        * Makefile.am:
        * bindings/jni/jni_instance.cpp:
        (JObjectWrapper::JObjectWrapper):
        * bindings/jni/jni_instance.h:
        (Bindings::JObjectWrapper::~JObjectWrapper):
        * bindings/jni/jni_runtime.cpp:
        (JavaField::valueFromInstance):
        * bindings/runtime_object.cpp:
        (RuntimeObjectImp::~RuntimeObjectImp):
        (RuntimeObjectImp::RuntimeObjectImp):
        (RuntimeObjectImp::get):
        (RuntimeObjectImp::deleteProperty):
        * bindings/runtime_object.h:

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

16 years ago Reviewed by Dave.
darin [Mon, 1 Dec 2003 21:33:54 +0000 (21:33 +0000)]
    Reviewed by Dave.

        - fixed 3496960: nil-deref in idFromNode inside elementDoesAutoComplete:

        * kwq/WebCoreBridge.mm:
        (inputElementFromDOMElement): Added nil check.
        (formElementFromDOMElement): Added nil check.

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

16 years ago Fix for 3490959, collapsed border tables don't paint backgrounds.
hyatt [Mon, 1 Dec 2003 19:22:06 +0000 (19:22 +0000)]
Fix for 3490959, collapsed border tables don't paint backgrounds.

        Reviewed by darin

        * khtml/rendering/render_table.cpp:
        (RenderTable::setStyle):
        (RenderTable::paint):
        (RenderTable::paintBoxDecorations):
        * khtml/rendering/render_table.h:

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

16 years ago Reviewed by Dave.
darin [Mon, 1 Dec 2003 19:18:51 +0000 (19:18 +0000)]
    Reviewed by Dave.

        - fixed 3493939: ordered lists with type="A" roll over to A' after X rather than after Z

        * khtml/rendering/render_list.cpp: (toLetter): Change 24 to 26.

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

16 years agoWebKit:
kocienda [Mon, 1 Dec 2003 19:05:21 +0000 (19:05 +0000)]
WebKit:

        Reviewed by John

Fix for this bug:

<rdar://problem/3496873>: Move key event helper functions to WebKit

        * Misc.subproj/WebNSEventExtras.h: Add declarations for new key event
helpers.
        * Misc.subproj/WebNSEventExtras.m:
        (-[NSEvent _web_isKeyEvent:]): Added.
        (-[NSEvent _web_isDeleteKeyEvent]): Added.
        (-[NSEvent _web_isEscapeKeyEvent]): Added.
        (-[NSEvent _web_isOptionTabKeyEvent]): Added.
        (-[NSEvent _web_isReturnOrEnterKeyEvent]): Added.
        (-[NSEvent _web_isTabKeyEvent]): Added.
        * WebKit.pbproj/project.pbxproj: Made WebNSEventExtras.h a private header
so WebBrowser can use the new helpers.

WebBrowser:

        Reviewed by John

Fix for this bug:

<rdar://problem/3496873>: Move key event helper functions to WebKit

        * BookmarksViewController.m:
        (-[BookmarksViewController handleKeyDown:inSourceColumn:]): Move
to new key event helper.
        * BrowserNSEventExtras.h: Remove key event helpers from here. WebBrowser
will now pick these up from WebKit.
        * BrowserNSEventExtras.m: Ditto.
        * BrowserWindowController.m: Move to new key event helpers.
        (-[BrowserWindowController cancel:]): Ditto.
        (-[BrowserWindowController windowWillHandleKeyEvent:]): Ditto.
        (-[BrowserWindowController performQuickSearch:]): Ditto.
        * DownloadViewController.m:
        (-[DownloadViewController keyDown:]): Ditto.
        * Preferences.subproj/SheetWithTableController.m:
        (-[SheetWithTableController tableView:keyDown:]): Ditto.
        * TitleBarButton.m: Ditto.

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

16 years agotree is open for Safari-116
vicki [Sat, 22 Nov 2003 00:38:32 +0000 (00:38 +0000)]
tree is open for Safari-116

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

16 years agoSafari-115 stamp
vicki [Sat, 22 Nov 2003 00:27:22 +0000 (00:27 +0000)]
Safari-115 stamp

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

16 years agoWebCore:
mjs [Fri, 21 Nov 2003 23:27:33 +0000 (23:27 +0000)]
WebCore:

        Reviewed by Ken.

WebCore part of fix for:

<rdar://problem/3487134>: Implement http request/response status and headers for XMLHttpRequest

        * khtml/ecma/xmlhttprequest.cpp:
        (KJS::XMLHttpRequest::getValueProperty): Call appropriate methods for
status and statusText.
        (KJS::XMLHttpRequest::send): Set request headers as "customHeaders"
metadata property.
        (KJS::XMLHttpRequest::setRequestHeader): Simply append to header
string.
        (KJS::XMLHttpRequest::getAllResponseHeaders): Return the header string
except for the first line.
(KJS::XMLHttpRequest::getResponseHeader): Scan the response header
string for the header field. Not sure if it's worth being more
efficient.
        (KJS::XMLHttpRequest::getStatus): Try to pull a code out
of the status line.
        (KJS::XMLHttpRequest::getStatusText): Pull the first line
off the headers (if any), otherwise return undefined.
        (KJS::XMLHttpRequest::slotData): The first time through, save
the response headers, retrieved from "HTTP-Headers" metadata
property.
        (KJS::XMLHttpRequestProtoFunc::tryCall): Make setRequestHeader,
getResponseHeader, getAllResponseHeaders call the right thing.
        * khtml/ecma/xmlhttprequest.h:
        * kwq/KWQKJobClasses.h:
        * kwq/KWQKJobClasses.mm:
        (KIO::TransferJobPrivate::TransferJobPrivate): Added header
support.
        (KIO::TransferJobPrivate::~TransferJobPrivate):
        (KIO::TransferJob::assembleResponseHeaders): Get a header string
out of the response if needed.
        (KIO::TransferJob::queryMetaData): Special-case "HTTP-Headers".
        (KIO::TransferJob::emitReceivedResponse): Save response.
        * kwq/KWQLoader.h:
        * kwq/KWQLoader.mm:
        (-[NSDictionary _webcore_initWithHeaderString:]): Helper method to
turn a string of header fields into a dictionary.
        (KWQServeRequest): Pass custom headers through.
        (KWQResponseMIMEType): Admit it's an NSURLResponse *.
        (KWQResponseHeaderString): Assembled status code and response
header fields into response header. Cheat a little on the status
line.
        * kwq/KWQResourceLoader.mm:
        (-[KWQResourceLoader receivedResponse:]): Admit it's an
NSURLResponse *.
        * kwq/WebCoreResourceLoader.h: Ditto.
* kwq/WebCoreBridge.h: Add customHeader: arguments.

WebKit:

        Reviewed by Ken.

WebKit part of fix for:

<rdar://problem/3487134>: Implement http request/response status and headers for XMLHttpRequest

        * WebCoreSupport.subproj/WebBridge.m:
        (-[WebBridge startLoadingResource:withURL:customHeaders:]): Added customHeaders
parameter.
        (-[WebBridge startLoadingResource:withURL:customHeaders:postData:]): Ditto.
        * WebCoreSupport.subproj/WebSubresourceClient.h:
        * WebCoreSupport.subproj/WebSubresourceClient.m:
        (+[WebSubresourceClient startLoadingResource:withRequest:customHeaders:referrer:forDataSource:]): Add the custom headers.
        (+[WebSubresourceClient startLoadingResource:withURL:customHeaders:referrer:forDataSource:]): Pass along the custom headers.
        (+[WebSubresourceClient startLoadingResource:withURL:customHeaders:postData:referrer:forDataSource:]): Pass along the custom headers.

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

16 years ago Fixed: <rdar://problem/3491907>: When viewing applet, view hierarchy was an empty...
cblu [Fri, 21 Nov 2003 19:14:23 +0000 (19:14 +0000)]
Fixed: <rdar://problem/3491907>: When viewing applet, view hierarchy was an empty KWQView

        Reviewed by rjw.

        * WebCore.pbproj/project.pbxproj:
        * khtml/html/html_objectimpl.cpp: removed setupApplet because that work is done when the applet widget is created
        (HTMLAppletElementImpl::createRenderer): pass the PARAM args to the render object
        (HTMLAppletElementImpl::getAppletInstance): don't call setupApplet
        * khtml/rendering/render_applet.cpp:
        (RenderApplet::RenderApplet): store args and context, don't call setQWidget here
        (RenderApplet::setStyle): call setQWidget here
        (RenderApplet::layout): don't parse args here, that is done in HTMLAppletElementImpl::createRenderer
        * khtml/rendering/render_applet.h:
        * kwq/KWQKJavaAppletWidget.h:
        (KJavaApplet::KJavaApplet): turned into a stub, this work is no longer needed
        (KJavaApplet::setAppletClass): ditto
        (KJavaApplet::setAppletName): ditto
        (KJavaApplet::setArchives): ditto
        (KJavaApplet::setBaseURL): ditto
        (KJavaApplet::setCodeBase): ditto
        (KJavaApplet::setParameter): ditto
        (KJavaAppletWidget::~KJavaAppletWidget): ditto
        (KJavaAppletWidget::applet): ditto
        (KJavaAppletWidget::setBaseURL): ditto
        (KJavaAppletWidget::setParameter): ditto
        (KJavaAppletWidget::showApplet): ditto
        * kwq/KWQKJavaAppletWidget.mm:
        (KJavaAppletWidget::KJavaAppletWidget): create the java here instead of doing it later

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

16 years agoWebCore:
sullivan [Fri, 21 Nov 2003 18:16:07 +0000 (18:16 +0000)]
WebCore:

        - WebCore part of fix for <rdar://problem/3333744>: Safari prints page with
        very, very long line very, very small

        Reviewed by Ken.

        * kwq/KWQKHTMLPart.h:
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::forceLayoutWithPageWidthRange):
        Changed method name from forceLayoutForPageWidth; now takes min and max
        page width values. Use max page width value to limit how wide page will
        get when there's a very long line.

        * kwq/WebCoreBridge.h:
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge forceLayoutWithMinimumPageWidth:maximumPageWidth:adjustingViewSize:]):
        changed pageWidth parameter into min and max parameters; pass them along to KWQKHTMLPart.

WebKit:

        - WebKit part of fix for <rdar://problem/3333744>: Safari prints page with
        very, very long line very, very small

        Reviewed by Ken.

        * WebView.subproj/WebHTMLView.m:
        renamed PrintingExtraWidthFactor to PrintingMinimumShrinkFactor, added
        PrintingMaximumShrinkFactor of 2.0, which matches IE
        (-[WebHTMLView layoutToMinimumPageWidth:maximumPageWidth:adjustingViewSize:]):
        now takes a min and max page width; passes them along to bridge
        (-[WebHTMLView _setPrinting:minimumPageWidth:maximumPageWidth:adjustViewSize:]):
        now takes a min and max page width; passes them along to layoutTo...
        (-[WebHTMLView _scaleFactorForPrintOperation:]):
        now takes PrintingMaximumScaleFactor into account
        (-[WebHTMLView knowsPageRange:]):
        now takes PrintingMaximumScaleFactor into account

        (-[WebHTMLView layout]):
        pass 0 for maximumPageWidth when passing 0 for minimumPageWidth
        (-[WebHTMLView adjustPageHeightNew:top:bottom:limit:]):
        ditto
        (-[WebHTMLView _web_setPrintingModeRecursive]):
        ditto
        (-[WebHTMLView _web_clearPrintingModeRecursive]):
        ditto
        (-[WebHTMLView endDocument]):
        ditto

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

16 years ago Reviewed by Ken.
darin [Fri, 21 Nov 2003 17:29:00 +0000 (17:29 +0000)]
    Reviewed by Ken.

        - fixed 3490260: allow &sup1 to be misspelled &supl (lowercase l instead of numeral 1) because WinIE does

        * khtml/html/kentities.gperf: Added supl to the list. Maps to U+00B9, just as sup1 does.
        * khtml/html/kentities.c: Regenerated.

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

16 years ago Patch from Harri Porten, reviewed by me.
mjs [Fri, 21 Nov 2003 08:54:42 +0000 (08:54 +0000)]
    Patch from Harri Porten, reviewed by me.

- fixed 3491712 - String slice with negative arguments does not offset from end of string

* kjs/string_object.cpp:
        (StringProtoFuncImp::call): Handle negative arguments as offsets from end by
adding length and clamping to [0,length-1].

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

16 years ago Patch from Harri Porten, reviewed by me.
mjs [Fri, 21 Nov 2003 08:49:58 +0000 (08:49 +0000)]
    Patch from Harri Porten, reviewed by me.

- fixed 3491709 - using Function.apply with a primitive type as the arg list causes crash

* kjs/function_object.cpp:
        (FunctionProtoFuncImp::call): Nest parentheses properly.

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

16 years ago Reviewed by Darin.
mjs [Fri, 21 Nov 2003 06:53:17 +0000 (06:53 +0000)]
    Reviewed by Darin.

- fixed 3487201 - Implement abort for XMLHttpRequest async loads

        * khtml/ecma/xmlhttprequest.cpp:
        (KJS::XMLHttpRequest::abort): Kill and clear job.
        (KJS::XMLHttpRequest::slotData): Avoid moving to state 3 on early abort.
        (KJS::XMLHttpRequestProtoFunc::tryCall): Call abort when appropriate.
        * khtml/ecma/xmlhttprequest.h:

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