18 years ago Reviewed by Darin.
harrison [Fri, 19 Nov 2004 02:03:10 +0000 (02:03 +0000)]
    Reviewed by Darin.

        Back out Darin's fix for <rdar://problem/3885729>, because the new exception gets triggered by Mail.app.
        Filed <rdar://problem/3886832> against Mail.app.

        * kwq/DOM-CSS.mm:
        (-[DOMCSSStyleDeclaration setProperty:::]):

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

18 years agoWebCore:
cblu [Fri, 19 Nov 2004 01:40:39 +0000 (01:40 +0000)]

Fixed: <rdar://problem/3587481> Bug Reporter Login Page: Password AutoFill does not work reliably

        Reviewed by john.

        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::currentForm): just return the current form, don't scan the entire document looking for a form if there is no current form


Fixed: <rdar://problem/3587481> Bug Reporter Login Page: Password AutoFill does not work reliably

        Reviewed by john.

        * FormCompletionController.m:
        (+[FormCompletionController firstFormInFrame:]): new, currentForm in WebCore used to do this work, but now currentForm just returns the current form
        (+[FormCompletionController currentOrFirstFrameAndForm:inWebView:]): renamed, if there is no current form, call firstFormInFrame
        (+[FormCompletionController autoFillInWebView:]): call renamed method
        (+[FormCompletionController autoFillPasswordInFrame:]): if there is no current form, find a password form from all the forms in the document rather than giving up when the first form is not a password form

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

18 years ago * WebView.subproj/WebHTMLRepresentation.m:
cblu [Fri, 19 Nov 2004 01:10:17 +0000 (01:10 +0000)]
    * WebView.subproj/WebHTMLRepresentation.m:
        (-[WebHTMLRepresentation currentForm]): removed stray ";"

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

18 years ago Reviewed by Chris.
mjs [Fri, 19 Nov 2004 00:49:09 +0000 (00:49 +0000)]
    Reviewed by Chris.

- fix recursive item traversal, use traverseNextNode() instead of
the buggy hand-rolled traversal.

        * khtml/xml/dom_nodeimpl.cpp:

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

18 years ago Reviewed by Ken.
darin [Fri, 19 Nov 2004 00:12:21 +0000 (00:12 +0000)]
    Reviewed by Ken.

        - fixed <rdar://problem/3885744> crash with XMLHttpRequest test page (reported by KDE folks)

        * khtml/ecma/xmlhttprequest.cpp: (KJS::XMLHttpRequest::slotFinished):
        Rolled in fix from KDE; make sure to set job to 0 before calling changeState.

        - fixed <rdar://problem/3885729> attempting to modify a computed style does nothing, but should raise a DOM exception
        - fixed <rdar://problem/3885731> style declarations use too many malloc blocks; switch to QValueList
        - fixed <rdar://problem/3885739> DOM::NodeImpl accessor in DOM::Node class is hot; should be inlined
        - changed NodeImpl calls like replaceChild to always ref/deref the parameter; this is a better way to fix
          an entire category of leaks we have been fixing one by one recently
        - changed computed styles so they hold a reference to the DOM node; the old code could end up with a
          stale RenderObject pointer, although I never saw it do that in practice
        - implemented the length and item methods for computed styles
        - implemented querying additional properties in computed styles (29 more)

        * khtml/khtml_part.h: Update forward declaration of CSSMutableStyleDeclarationImpl since it's
        now a separate class rather than a typedef. Changed the parameter type of setTypingStyle to
        take a mutable style.
        * khtml/khtml_part.cpp:
        (KHTMLPart::setTypingStyle): Change parameter to take a mutable style.
        (KHTMLPart::applyStyle): Add code to make a mutable style in case we are passed
        a computed style; also change some types to mutable style.
        (updateState): Update iteration of CSSProperty objects in a style declaration to use
        the new valuesIterator interface.
        (KHTMLPart::selectionHasStyle): Add a call to makeMutable.
        (KHTMLPart::selectionStartHasStyle): Add call to makeMutable and update iteration.
        (editingStyle): Change type to mutable style, and simplify the style-creation calls,
        including accomodating the exception code that setCssText has now.
        (KHTMLPart::applyEditingStyleToElement): Change types to mutable style.
        (KHTMLPart::removeEditingStyleFromElement): Change code to call setChanged only if removing
        the style attributes really was a change, although it's not an important optimization it's
        good to do it right.

        * khtml/css/css_base.h: Remove unneeded setParsedValue method.
        * khtml/css/css_base.cpp: Remove unneeded setParsedValue method. All the places that were
        calling it were already removing the old property explicitly, so the code in here to remove
        the property again was redundant.

        * khtml/css/css_computedstyle.h: Updated virtual functions for changes to parameters in base class.
        Moved all the "set"-type functions so they are private. Store a node pointer instead of a renderer.
        * khtml/css/css_computedstyle.cpp:
        (DOM::CSSComputedStyleDeclarationImpl::CSSComputedStyleDeclarationImpl): Hold a reference to
        the node we compute style for, so we don't end up with a pointer to a deallocated RenderObject.
        Before we had no guarantee the object would outlast us.
        (DOM::CSSComputedStyleDeclarationImpl::setCssText): Add exception parameter, and set the
        exception to NO_MODIFICATION_ALLOWED_ERR.
        (DOM::CSSComputedStyleDeclarationImpl::getPropertyCSSValue): Update to use node pointer rather
        than renderer pointer. Added implementation for box-align, box-direction, box-flex, box-flex-group,
        box-lines, box-ordinal-group, box-orient, box-pack, caption-side, clear, cursor, direction,
        list-style-image, list-style-position, list-style-type, marquee-direction, marquee-repetition,
        marquee-style, user-modify, opacity, orphans, outline-style, page-break-after, page-break-before,
        page-break-inside, position, unicode-bidi, widows, z-index.
        (DOM::CSSComputedStyleDeclarationImpl::removeProperty): Add exception parameter, and set the
        exception to NO_MODIFICATION_ALLOWED_ERR.
        (DOM::CSSComputedStyleDeclarationImpl::setProperty): Ditto.
        (DOM::CSSComputedStyleDeclarationImpl::length): Implemented.
        (DOM::CSSComputedStyleDeclarationImpl::item): Implemented, calls getPropertyValue.
        (DOM::CSSComputedStyleDeclarationImpl::copyInheritableProperties): Changed return type to
        (DOM::CSSComputedStyleDeclarationImpl::copy): Added.
        (DOM::CSSComputedStyleDeclarationImpl::makeMutable): Added.

        * khtml/css/css_ruleimpl.h: Update forward declaration of CSSMutableStyleDeclarationImpl since it's
        now a separate class rather than a typedef.
        * khtml/css/cssparser.h: Ditto.

        * khtml/css/css_valueimpl.h: Refactor CSSStyleDeclarationImpl into two classes. New derived class
        CSSMutableStyleDeclarationImpl has the guts, and the base class has only some virtual functions.
        Removed a bunch of redundant stuff from other classes in this file too.
        (DOM::DashboardRegionImpl::setNext): Ref new before deref'ing old to handle the set-to-same case.
        (DOM::CSSProperty::CSSProperty): Added new overload so you can create a CSSProperty with initial values.
        (DOM::CSSProperty::operator=): Added.
        (DOM::CSSProperty::setValue): Use ref-before-deref pattern to simplify slightly.

        * khtml/css/css_valueimpl.cpp:
        (DOM::CSSStyleDeclarationImpl::CSSStyleDeclarationImpl): Remove uneeded things.
        (DOM::CSSStyleDeclarationImpl::isStyleDeclaration): Put here now that it's no longer inline.
        (DOM::CSSMutableStyleDeclarationImpl::CSSMutableStyleDeclarationImpl): Added.
        (DOM::CSSMutableStyleDeclarationImpl::operator=): Added.
        (DOM::CSSMutableStyleDeclarationImpl::~CSSMutableStyleDeclarationImpl): Updated.
        (DOM::CSSMutableStyleDeclarationImpl::getPropertyValue): Removed now-uneeded check.
        (DOM::CSSMutableStyleDeclarationImpl::get4Values): Moved here from base class.
        (DOM::CSSMutableStyleDeclarationImpl::getShortHandValue): Ditto.
        (DOM::CSSMutableStyleDeclarationImpl::getPropertyCSSValue): Update to use QValueList instead of QPtrList.
        (DOM::CSSMutableStyleDeclarationImpl::removeProperty): Added exception parameter, updated for QValueList.
        (DOM::CSSMutableStyleDeclarationImpl::setChanged): Moved here from base class.
        (DOM::CSSMutableStyleDeclarationImpl::getPropertyPriority): Update to use QValueList.
        (DOM::CSSMutableStyleDeclarationImpl::setProperty): Added more overloads to match new parameters.
        (DOM::CSSMutableStyleDeclarationImpl::setStringProperty): Update to use QValueList.
        (DOM::CSSMutableStyleDeclarationImpl::setImageProperty): Ditto.
        (DOM::CSSMutableStyleDeclarationImpl::parseProperty): Remove unneeded initialization code due to QValueList.
        (DOM::CSSMutableStyleDeclarationImpl::addParsedProperties): Added.
        (DOM::CSSMutableStyleDeclarationImpl::setLengthProperty): Moved here from base class.
        (DOM::CSSMutableStyleDeclarationImpl::length): Update to use QValueList.
        (DOM::CSSMutableStyleDeclarationImpl::item): Moved here from base class.
        (DOM::CSSMutableStyleDeclarationImpl::cssText): Return empty string rather than null string when there are
        no styles in the list. Update to use QValueList.
        (DOM::CSSMutableStyleDeclarationImpl::setCssText): Update to use QValueList and to take an exceptionCode
        parameter and set it.
        (DOM::CSSMutableStyleDeclarationImpl::merge): Update to use QValueList.
        (DOM::CSSStyleDeclarationImpl::diff): Update to use QValueList.
        (DOM::CSSMutableStyleDeclarationImpl::copyBlockProperties): Moved here from base class. Change return type.
        (DOM::CSSStyleDeclarationImpl::copyPropertiesInSet): Update to use QValueList and use stack, not new/delete.
        (DOM::CSSMutableStyleDeclarationImpl::makeMutable): Added.
        (DOM::CSSMutableStyleDeclarationImpl::copy): Added.

        * khtml/css/cssparser.cpp:
        (CSSParser::parseValue): Changed to use addParsedProperties.
        (CSSParser::parseDeclaration): Ditto.
        (CSSParser::createStyleDeclaration): Use new constructor to create declaration in a more efficient manner.

        * khtml/css/cssproperties.in: Removed unused font-size-adjust and -khtml-flow-mode.
        * khtml/css/cssproperties.c: Regenerated.
        * khtml/css/cssproperties.h: Regenerated.

        * khtml/css/cssstyleselector.cpp: (khtml::CSSStyleSelector::applyDeclarations):
        Updated to use QValueList interface to CSSMutableStyleDeclarationImpl.

        * khtml/dom/css_value.cpp:
        (DOM::CSSStyleDeclaration::cssText): Removed unneeded cast.
        (DOM::CSSStyleDeclaration::setCssText): Added exception code handling.
        (DOM::CSSStyleDeclaration::getPropertyValue): Changed to call getPropertyValue directly instead of
        first doing getPropertyCSSValue and then doing cssText.
        (DOM::CSSStyleDeclaration::getPropertyCSSValue): Removed unneeded cast.
        (DOM::CSSStyleDeclaration::removeProperty): Added exception code handling.
        (DOM::CSSStyleDeclaration::setProperty): Added exception code handling.
        (DOM::CSSStyleDeclaration::length): Removed unneeded cast.
        (DOM::CSSStyleDeclaration::item): Removed unneeded cast.
        (DOM::CSSStyleDeclaration::parentRule): Removed unneeded cast.
        (DOM::CSSValue::setCssText): Removed strange non-implementation (still not implemented).

        * khtml/dom/dom_node.h: Made isNull and handle functions inline.
        * khtml/dom/dom_node.cpp: Ditto.

        * khtml/editing/htmlediting.h: Change some types to mutable style.
        * khtml/editing/htmlediting.cpp:
        (khtml::EditCommandPtr::typingStyle): Change return type to mutable style.
        (khtml::EditCommandPtr::setTypingStyle): Change parameter to mutable style.
        (khtml::StyleChange::init): Convert parameter to mutable style. Update to use QValueList.
        (khtml::EditCommand::assignTypingStyle): Change parameter to mutable type.
        (khtml::EditCommand::setTypingStyle): Ditto.
        (khtml::ApplyStyleCommand::ApplyStyleCommand): Convert parameter to mutable style.
        (khtml::ApplyStyleCommand::doApply): Change local variables to mutable style.
        (khtml::ApplyStyleCommand::applyBlockStyle): Change parameter to mutable style.
        (khtml::ApplyStyleCommand::applyInlineStyle): Ditto.
        (khtml::ApplyStyleCommand::isHTMLStyleNode): Ditto.
        (khtml::ApplyStyleCommand::removeCSSStyle): Ditto. Also update to use QValueList.
        (khtml::ApplyStyleCommand::removeBlockStyle): Change parameter to mutable style.
        (khtml::ApplyStyleCommand::removeInlineStyle): Ditto.
        (khtml::ApplyStyleCommand::addBlockStyleIfNeeded): Ditto.
        (khtml::ApplyStyleCommand::addInlineStyleIfNeeded): Ditto.
        (khtml::InsertLineBreakCommand::doApply): Convert locals to mutable style.
        (khtml::InsertTextCommand::prepareForTextInsertion): Ditto.
        (khtml::RemoveCSSPropertyCommand::RemoveCSSPropertyCommand): Convert parameter to mutable style.

        * khtml/editing/jsediting.cpp: Convert types to mutable styles where we create styles.
        * khtml/html/html_baseimpl.h: Change type to mutable style.
        * khtml/html/html_baseimpl.cpp: (HTMLBodyElementImpl::createLinkDecl): Ditto.

        * khtml/html/html_elementimpl.h: Make CSSMappedAttributeDeclarationImpl use the mutable style
        class as a base class, and change types to mutable style as needed.
        * khtml/html/html_elementimpl.cpp:
        (HTMLElementImpl::createInlineStyleDecl): Change type to mutable style.
        (HTMLElementImpl::parseHTMLAttribute): Call parseProperty method.
        (HTMLElementImpl::getInlineStyleDecl): Change type to mutable style.
        (HTMLElementImpl::additionalAttributeStyleDecl): Ditto.
        (HTMLElementImpl::createContextualFragment): Add ref/deref to fix potential node leak.
        (HTMLElementImpl::setInnerHTML): Remove ref/deref pair because this leak is now fixed by changes
        to appendChild.
        (HTMLElementImpl::setOuterHTML): Remove ref/deref pair because this leak is now fixed by changes
        to replaceChild.

        * khtml/html/html_tableimpl.h: Change types to mutable style.
        * khtml/html/html_tableimpl.cpp:
        (HTMLTableElementImpl::additionalAttributeStyleDecl): Change type to mutable style.
        (HTMLTableElementImpl::getSharedCellDecl): Change type to mutable style.
        (HTMLTableCellElementImpl::additionalAttributeStyleDecl): Change type to mutable style.

        * khtml/html/htmlparser.cpp:
        (KHTMLParser::parseToken): Use a local variable to protect the node by ref'ing it. This is better
        than using an explicit delete to make the node go away, and is required for compatibility with the
        changes to the NodeImpl functions.
        (KHTMLParser::insertNode): Ditto.
        (KHTMLParser::createHead): Get rid of explicit delete, no longer needed because of changes to
        the NodeImpl functions.

        * khtml/xml/dom_docimpl.cpp: (DocumentImpl::createCSSStyleDeclaration): Call simpler constructor
        now that there's no need to make the property list explictly.

        * kwq/DOM-CSS.mm:
        (-[DOMCSSStyleDeclaration setCssText:]): Raise exception when appropriate.
        (-[DOMCSSStyleDeclaration removeProperty:]): Ditto.
        (-[DOMCSSStyleDeclaration setProperty:::]): Dito.

        * khtml/xml/dom_nodeimpl.cpp:
        (NodeImpl::insertBefore): Always do a ref/deref, so callers don't have to worry about whether the
        function succeeded or not for ownership purposes.
        (NodeImpl::replaceChild): Ditto.
        (NodeImpl::appendChild): Ditto.
        (NodeBaseImpl::insertBefore): Ditto.
        (NodeBaseImpl::replaceChild): Ditto.
        (NodeBaseImpl::appendChild): Ditto.
        (NodeBaseImpl::addChild): Ditto.

        * WebCore-tests.exp: Removed CSSStyleDeclaration::length; not sure why it was in here.
        * WebCore-combined.exp: Regenerated.

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

18 years ago still even more build fixing
mjs [Fri, 19 Nov 2004 00:08:12 +0000 (00:08 +0000)]
    still even more build fixing

        * khtml/html/html_miscimpl.cpp:

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

18 years ago more build fixing
mjs [Thu, 18 Nov 2004 23:09:20 +0000 (23:09 +0000)]
    more build fixing

        * khtml/html/html_miscimpl.cpp:

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

18 years ago Fixed build problem.
mjs [Thu, 18 Nov 2004 22:38:02 +0000 (22:38 +0000)]
    Fixed build problem.

        * khtml/html/html_miscimpl.h:
        (DOM::HTMLCollectionImpl::CollectionInfo::CollectionInfo): it's haslength, not hasLenght.

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

18 years ago Reviewed by Ken.
mjs [Thu, 18 Nov 2004 21:42:05 +0000 (21:42 +0000)]
    Reviewed by Ken.

- merged and cleaned up HTMLCollection and HTMLFormCollection speedups from konqueror

<rdar://problem/3822992> VIP: Program listings pages at directv.com take a really long time to load [HTMLCollection]
<rdar://problem/3701991> Safari unresponsive loading (www.maxim-ic.com) (HTMLCollection)

This is also a start on fixing 5 other bugs, but those need additional work to make
HTMLFormCollection fast.

        * khtml/html/html_documentimpl.h:
        * khtml/html/html_formimpl.cpp:
        * khtml/html/html_formimpl.h:
        * khtml/html/html_imageimpl.cpp:
        * khtml/html/html_imageimpl.h:
        * khtml/html/html_miscimpl.cpp:
        * khtml/html/html_miscimpl.h:
        * khtml/html/htmlparser.cpp:
        * khtml/xml/dom_docimpl.cpp:
        * khtml/xml/dom_docimpl.h:
        * khtml/xml/dom_nodeimpl.cpp:

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

18 years ago Fixed development build failure.
cblu [Thu, 18 Nov 2004 20:50:45 +0000 (20:50 +0000)]
Fixed development build failure.

        * Misc.subproj/WebIconDatabase.m:
        (+[WebIconDatabase sharedIconDatabase]): call LOG not Log

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

18 years ago Reviewed by Chris.
kdecker [Thu, 18 Nov 2004 19:29:58 +0000 (19:29 +0000)]
    Reviewed by Chris.

fixed: <rdar://problem/3841842> getPropertyID expensive

        * kwq/DOM-CSS.mm:
        (getPropertyID): avoid unnecessary memory allocations by using a fixed-sized stack based buffer.

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

18 years ago <rdar://problem/3885708> save memory in icon DB by not using NSSets when holding...
cblu [Thu, 18 Nov 2004 18:20:03 +0000 (18:20 +0000)]
<rdar://problem/3885708> save memory in icon DB by not using NSSets when holding 1 object

        Reviewed by sullivan.

        * Misc.subproj/WebIconDatabase.m:
        (+[WebIconDatabase sharedIconDatabase]): added timing code
        (-[WebIconDatabase _clearDictionaries]): new
        (-[WebIconDatabase _loadIconDictionaries]): call _clearDictionaries in 2 places before we bail, use _web_setObjectUsingSetIfNecessary:forKey: when adding site URLs to the iconURLToURLs dictionary
        (-[WebIconDatabase _updateFileDatabase]): fixed comment
        (-[WebIconDatabase _setIconURL:forURL:]): use _web_setObjectUsingSetIfNecessary:forKey: when adding site URLs to the iconURLToURLs dictionary
        (-[WebIconDatabase _releaseIconForIconURLString:]): handle NSString objects retured from iconURLToURLs
        (-[NSMutableDictionary _web_setObjectUsingSetIfNecessary:forKey:]): new, puts a set on the dictionary when there are 2 or more object for s key

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

18 years ago Fixed <rdar://problem/3885073> REGRESSION: Tab images at top of news.com.com replica...
rjw [Thu, 18 Nov 2004 03:20:36 +0000 (03:20 +0000)]
Fixed <rdar://problem/3885073> REGRESSION: Tab images at top of news.com.com replicated and squished

Correctly account for scaled image size and clipping.

        Reviewed by Maciej.

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

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

18 years ago Reviewed by Richard.
mjs [Thu, 18 Nov 2004 02:48:09 +0000 (02:48 +0000)]
    Reviewed by Richard.

<rdar://problem/3885076> Don't make IDN calls for all-ascii URLs to save about 3 pages
at Safari startup.

        * Misc.subproj/WebNSURLExtras.m:
        (mapHostNames): If encoding and not decoding, then bail early if the URL is all ascii.
        (-[NSString _web_mapHostNameWithRange:encode:makeString:]): Remove earlier special-case
check for localhost, no longer needed.

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

18 years ago Improve responsiveness by being willing to break out of the tokenizer. (This patch...
hyatt [Thu, 18 Nov 2004 01:42:17 +0000 (01:42 +0000)]
Improve responsiveness by being willing to break out of the tokenizer.  (This patch was landed already
and subsequently backed out).

        Reviewed by kocienda

        * khtml/html/html_baseimpl.cpp:
        * khtml/html/htmltokenizer.cpp:
        * khtml/html/htmltokenizer.h:
        * khtml/khtmlview.cpp:
        * khtml/khtmlview.h:
        * khtml/xml/dom_docimpl.cpp:
        * khtml/xml/dom_docimpl.h:
        * kwq/KWQDateTime.mm:

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

18 years ago Reviewed by Ken Kocienda.
harrison [Thu, 18 Nov 2004 00:35:36 +0000 (00:35 +0000)]
    Reviewed by Ken Kocienda.

        Make sure previousLineStart is non-null before calling compareBoundaryPoints.
        Treat null case as meaning no post-move merge is needed.

        * khtml/editing/htmlediting.cpp:

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

18 years ago Fixed <rdar://problem/3863601> Legacy font cache code in [WebTextRendererFactory...
rjw [Wed, 17 Nov 2004 23:02:24 +0000 (23:02 +0000)]
Fixed <rdar://problem/3863601> Legacy font cache code in [WebTextRendererFactory createSharedFactory] may be unnecesary

and added call to SPI for

<rdar://problem/3884448> WebKit should turn on CG local font cache

currently disabled until a Tiger build shows up with the SPI.

        Reviewed by David Harrison.

        * WebCoreSupport.subproj/WebTextRendererFactory.m:
        (+[WebTextRendererFactory createSharedFactory]):

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

18 years ago Fixed <rdar://problem/3882212> REGRESSION: Images clipped instead of scaled
rjw [Wed, 17 Nov 2004 20:31:34 +0000 (20:31 +0000)]
    Fixed <rdar://problem/3882212> REGRESSION: Images clipped instead of scaled
        Fixed <rdar://problem/3884088> Crash terminating image load

        Also added code to turn off color correction for images created
        via CGImageSources.  This code is currently disabled because CG
        can't change the color space of images loaded progressively.
        Further, according to Dave Hayward, CG will no longer attempt
        to color correct images that don't have embedded profiles as of
        Tiger 8A306.

        Reviewed by Chris.

        * WebCoreSupport.subproj/WebImageData.m:
        (-[WebImageData _commonTermination]):
        (-[WebImageData dealloc]):
        (-[WebImageData _invalidateImageProperties]):
        (-[WebImageData imageAtIndex:]):
        (-[WebImageData incrementalLoadWithBytes:length:complete:]):
        (-[WebImageData propertiesAtIndex:]):

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

18 years ago Reviewed by NOBODY (OOPS!).
harrison [Wed, 17 Nov 2004 19:33:45 +0000 (19:33 +0000)]
    Reviewed by NOBODY (OOPS!).

        Added displayNode and displayTree methods for debugging.  Fixed comment typo in dispatchChildRemovalEvents.
        * khtml/xml/dom_nodeimpl.cpp:
        * khtml/xml/dom_nodeimpl.h:

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

18 years ago Fixed: <rdar://problem/3882034> REGRESSION: Context menu incorrect for PDF content
cblu [Wed, 17 Nov 2004 00:17:56 +0000 (00:17 +0000)]
Fixed: <rdar://problem/3882034> REGRESSION: Context menu incorrect for PDF content

        Reviewed by darin.

        * WebView.subproj/WebPDFView.m:
        (-[WebPDFView hitTest:]): return self if the current event is a context menu event
        (-[WebPDFView menuForEvent:]): use the PDFView subview

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

18 years ago Reviewed by Richard.
sullivan [Tue, 16 Nov 2004 19:52:26 +0000 (19:52 +0000)]
    Reviewed by Richard.

        - fixed <rdar://problem/3881929> 32 byte leak in editingStyle() in KHTMLPart (one-time only)

        * khtml/khtml_part.cpp:
        delete the list we created when we're done with it

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

18 years ago Reviewed by John
kocienda [Tue, 16 Nov 2004 16:48:52 +0000 (16:48 +0000)]
    Reviewed by John

        It is unwise to use the QPtrList autodelete feature on shared objects like DOM nodes.
        Instead, I replaced this with a helper function that derefs DOM nodes stored in a
        QPtrList when the list goes out of scope.

        * khtml/editing/htmlediting.cpp:
        (khtml::derefNodesInList): New helper to deref DOM nodes stored in a QPtrList.
        (khtml::InsertParagraphSeparatorCommand::InsertParagraphSeparatorCommand): No longer set lists to autodelete.
        (khtml::InsertParagraphSeparatorCommand::~InsertParagraphSeparatorCommand): Call new derefNodesInList helper.
        No longer set lists to autodelete.
         Call new derefNodesInList helper.
        * khtml/editing/htmlediting.h: Add virtual destructor for InsertParagraphSeparatorCommand. It had no need
        of one before, but now it does.

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

18 years ago Reviewed by Chris and Darin.
harrison [Tue, 16 Nov 2004 01:34:11 +0000 (01:34 +0000)]
    Reviewed by Chris and Darin.

        <rdar://problem/3880304> Non-linear performance hit for style changes

        * khtml/xml/dom_nodeimpl.cpp:
        Return 0 rather than traversing beyond stayWithin when this == stayWithin.
        Add asserts that stayWithin is an ancestor of the returned node.

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

18 years ago Fixed <rdar://problem/3880561> Default string value of ObjC object in JS...
rjw [Tue, 16 Nov 2004 01:24:55 +0000 (01:24 +0000)]
    Fixed <rdar://problem/3880561> Default string value of ObjC object in JS should be [obj description].

        Reviewed by Hyatt.

        * bindings/objc/objc_instance.mm:
        * bindings/objc/objc_utility.h:
        * bindings/objc/objc_utility.mm:

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

18 years ago Reviewed by Ken.
darin [Tue, 16 Nov 2004 01:04:13 +0000 (01:04 +0000)]
    Reviewed by Ken.

        - fixed <rdar://problem/3880036> Many leaks from CSSComputedStyleDeclarationImpl::getPropertyCSSValue, seen in Mail and Blot

        * khtml/css/css_computedstyle.cpp:
        (DOM::CSSComputedStyleDeclarationImpl::getPropertyValue): Ref and deref the value returned from getPropertyCSSValue,
        since there's no guarantee it's already ref'd.
        * khtml/css/css_valueimpl.cpp:
        (CSSStyleDeclarationImpl::getPropertyValue): Wrap result in a CSSValue to ref/deref.
        (CSSStyleDeclarationImpl::get4Values): Ref/deref explicitly.
        (CSSStyleDeclarationImpl::getShortHandValue): Ditto.
        (CSSStyleDeclarationImpl::merge): Ditto.
        (CSSStyleDeclarationImpl::diff): Ditto.
        * khtml/editing/htmlediting.cpp:
        (khtml::StyleChange::currentlyHasStyle): Ditto.
        (khtml::ApplyStyleCommand::removeCSSStyle): Ditto.
        * khtml/html/html_baseimpl.cpp: (HTMLBodyElementImpl::parseHTMLAttribute): Ditto.
        * khtml/html/html_tableimpl.cpp: (HTMLTableElementImpl::parseHTMLAttribute): Ditto.

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

18 years ago Reviewed by Ken.
darin [Tue, 16 Nov 2004 00:47:54 +0000 (00:47 +0000)]
    Reviewed by Ken.

        Use separate mutable style and computed style types as appropriate.
        For now this should have no effect, but it prepares us for refactoring later.
        Also remove some unnecessary "DOM::" prefixes and in one case factor out
        some shared code.

        * khtml/khtml_part.cpp:
        * khtml/khtml_part.h:
        * khtml/khtmlpart_p.h:

        * khtml/css/css_base.h:
        * khtml/css/css_ruleimpl.cpp:
        * khtml/css/css_ruleimpl.h:
        * khtml/css/css_valueimpl.h:
        * khtml/css/cssparser.cpp:
        * khtml/css/cssparser.h:
        * khtml/css/cssstyleselector.cpp:
        * khtml/css/cssstyleselector.h:
        * khtml/css/parser.cpp:
        * khtml/css/parser.y:
        * khtml/dom/css_rule.h:
        * khtml/dom/css_stylesheet.h:
        * khtml/dom/css_value.h:
        * khtml/dom/dom2_views.cpp:
        * khtml/xml/dom2_viewsimpl.cpp:
        * khtml/xml/dom_docimpl.cpp:
        * khtml/xml/dom_docimpl.h:
        * khtml/xml/dom_xmlimpl.cpp:
        * khtml/xml/dom_xmlimpl.h:

        * khtml/dom/css_value.cpp:
        (DOM::throwException): Added.
        (DOM::CSSStyleDeclaration::setCssText): Call throwException, but always on 0 for now.
        The real thing is coming with the next change to refactor.
        (DOM::CSSPrimitiveValue::setFloatValue): Call throwException.
        (DOM::CSSPrimitiveValue::setStringValue): Ditto.

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

18 years ago Reviewed by Ken.
darin [Tue, 16 Nov 2004 00:29:07 +0000 (00:29 +0000)]
    Reviewed by Ken.

        - fixed <rdar://problem/3878489> REGRESSION: modifying attribute of <textarea> blows away edited text (breaks simplemachines.org forum)

        * khtml/xml/dom_nodeimpl.h: Added boolean "children changed" parameter to
        dispatchSubtreeModifiedEvent, so it can be called in cases where only the
        node's attributes changed without sending a misleading childrenChanged call,
        but the childrenChanged call can happen at the exact right moment.
        * khtml/xml/dom_nodeimpl.cpp: Removed some uneeded "DOM::".
        (NodeImpl::dispatchSubtreeModifiedEvent): Only call "children changed" if
        the boolean true is passed in.

        * khtml/xml/dom_elementimpl.cpp:
        (NamedAttrMapImpl::addAttribute): Pass false for "children changed".
        (NamedAttrMapImpl::removeAttribute): Ditto.

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

18 years ago Fixed: <rdar://problem/3880410> save 5 dirty pages by soft-linking against PDFKit...
cblu [Tue, 16 Nov 2004 00:25:11 +0000 (00:25 +0000)]
Fixed: <rdar://problem/3880410> save 5 dirty pages by soft-linking against PDFKit framework

        Reviewed by john.

        * WebKit.pbproj/project.pbxproj:
        * WebView.subproj/WebPDFRepresentation.m:
        (+[WebPDFRepresentation PDFDocumentClass]): new
        (-[WebPDFRepresentation finishedLoadingWithDataSource:]): use PDFDocumentClass
        * WebView.subproj/WebPDFView.h:
        * WebView.subproj/WebPDFView.m:
        (+[WebPDFView PDFKitBundle]): new
        (+[WebPDFView PDFViewClass]): new
        (-[WebPDFView initWithFrame:]): create a PDFView subview
        (-[WebPDFView dealloc]): release the PDFView subview
        (-[WebPDFView PDFSubview]): new

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

18 years ago Fixed: <rdar://problem/3879891> WebKit should link against PDFKit instead of Quartz
cblu [Mon, 15 Nov 2004 23:36:33 +0000 (23:36 +0000)]
Fixed: <rdar://problem/3879891> WebKit should link against PDFKit instead of Quartz

        Reviewed by darin.

        * WebKit.pbproj/project.pbxproj: link against PDFKit if it is present instead of Quartz.framework

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

18 years ago Reviewed by Ken.
sullivan [Mon, 15 Nov 2004 22:08:42 +0000 (22:08 +0000)]
    Reviewed by Ken.

        - fixed <rdar://problem/3880075> leak in CSSStyleDeclarationImpl::copyPropertiesInSet,
        seen often in Mail and Blot

        * khtml/css/css_valueimpl.cpp:
        delete temporary list after we're done using it

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

18 years ago Fixed leak (3879883) that John found. Early return leaked
rjw [Mon, 15 Nov 2004 20:33:49 +0000 (20:33 +0000)]
Fixed leak (3879883) that John found.  Early return leaked
allocated instance.

        Reviewed by John.

        * khtml/css/css_computedstyle.cpp:

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

18 years ago Fixed missing retain of image property data.
rjw [Mon, 15 Nov 2004 20:29:17 +0000 (20:29 +0000)]
Fixed missing retain of image property data.

        Reviewed by John.

        * WebCoreSupport.subproj/WebImageData.h:
        * WebCoreSupport.subproj/WebImageData.m:
        (-[WebImageData dealloc]):
        (-[WebImageData _invalidateImages]):
        (-[WebImageData imageAtIndex:]):
        (-[WebImageData propertiesAtIndex:]):
        (-[WebImageData _frameDuration]):

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

18 years ago Reviewed by John
kocienda [Mon, 15 Nov 2004 19:53:33 +0000 (19:53 +0000)]
    Reviewed by John

        Fix for this bug:

        <rdar://problem/3879569> Many leaks in EditCommand mechanism, seen in Mail

        Fixed a couple of object lifetime issues. The EditCommand class used to hold an
        EditCommandPtr to its parent, but this caused a a reference cycle in composite
        commands as the children held a ref to their parent. Now, the parent variable
        is a non-retained reference to an EditCommand *. It would be nice to have a
        weak reference to the parent or even override deref in composite commands (but I
        can't since deref() is not virtual). However, this should be OK since any
        dangling parent pointer is a sign of a bigger object lifetime problem that
        would need to be addressed anyway.

        * khtml/css/css_valueimpl.cpp:
        (CSSStyleDeclarationImpl::CSSStyleDeclarationImpl): Fix bug in constructor that takes a
        QPtrList<CSSProperty> *. List values must be copied into newly-allocated list, rather than
        just assigning the list variable passed in to the local list variable, or the list will be
        * khtml/editing/htmlediting.cpp:
        (khtml::EditCommand::setStartingSelection): No longer call get(). m_parent is no longer a smart pointer.
        (khtml::EditCommand::setEndingSelection): Ditto.
        (khtml::EditCommand::assignTypingStyle): Short-circuit if passed in style is identical to current style.
        Unrelated to the change, but saves some ref's and deref's.
        (khtml::EditCommand::setTypingStyle): No longer call get(). m_parent is no longer a smart pointer.
        * khtml/editing/htmlediting.h: Change m_parent to a EditCommand *. Was an EditCommandPtr. Using an
        EditCommandPtr caused a reference cycle in composite commands as the children held a ref to their parent.
        (khtml::EditCommand::parent): No longer call get(). m_parent is no longer a smart pointer.

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

18 years ago Reviewed by Kevin.
mjs [Mon, 15 Nov 2004 19:50:06 +0000 (19:50 +0000)]
    Reviewed by Kevin.

<rdar://problem/3807080> Safari so slow it seems like a hang accessing a page on an IBM website

        * khtml/xml/dom_nodeimpl.cpp:
        (NodeListImpl::NodeListImpl): Initialize isItemCacheValid, renamed isCacheValid to
        (NodeListImpl::recursiveLength): Adjusted for rename.
        (NodeListImpl::recursiveItem): Cache the last item accessed and its offset.
If the same offset is looked up again, just return it, otherwise, if looking up
a later offset, start at the last item and proceed from there.
        (NodeListImpl::itemById): Apply the special document optimization to all
nodes that are either a document or in a document - just walk up to make
sure the node found by ID has the root node as an ancestor.
        (NodeListImpl::rootNodeSubtreeModified): Adjust both cache bits.
        * khtml/xml/dom_nodeimpl.h: Prototype new stuff.

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

18 years ago Cache image properties and frame durations.
rjw [Mon, 15 Nov 2004 19:16:30 +0000 (19:16 +0000)]
Cache image properties and frame durations.
Create NSImage and TIFF representations from CGImage, lazily, as needed for
dragging and element info dictionary.

        Reviewed by John.

        * WebCoreSupport.subproj/WebImageData.h:
        * WebCoreSupport.subproj/WebImageData.m:
        (-[WebImageData dealloc]):
        (-[WebImageData size]):
        (-[WebImageData propertiesAtIndex:]):
        (-[WebImageData _frameDurationAt:]):
        (-[WebImageData _frameDuration]):
        * WebCoreSupport.subproj/WebImageRenderer.h:
        * WebCoreSupport.subproj/WebImageRenderer.m:
        (-[WebImageRenderer dealloc]):
        (-[WebImageRenderer TIFFRepresentation]):
        (-[WebImageRenderer image]):

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

18 years ago Reviewed by John.
mjs [Mon, 15 Nov 2004 18:53:42 +0000 (18:53 +0000)]
    Reviewed by John.

<rdar://problem/3879226> WebKit needlessly uses extra memory to store icon refcounts as NSNumbers

* Misc.subproj/WebIconDatabase.m:
        (-[WebIconDatabase init]):
        (-[WebIconDatabase _setIconURL:forURL:]):
        (-[WebIconDatabase _retainIconForIconURLString:]):
        (-[WebIconDatabase _releaseIconForIconURLString:]):
        (-[WebIconDatabase _retainFutureIconForURL:]):
        (-[WebIconDatabase _releaseFutureIconForURL:]):
        * Misc.subproj/WebIconDatabasePrivate.h:

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

18 years ago Reviewed by Ken.
sullivan [Mon, 15 Nov 2004 17:20:58 +0000 (17:20 +0000)]
    Reviewed by Ken.

        - fixed <rdar://problem/3879539> leak of NSString after pasting into editable HTML (e.g. Mail)

        * kwq/KWQKHTMLPart.mm:
        release mutable copy of string after we're done using it

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

18 years ago Reviewed by Ken.
sullivan [Mon, 15 Nov 2004 16:54:14 +0000 (16:54 +0000)]
    Reviewed by Ken.

        - fixed <rdar://problem/3879513> leak in [WebArchive _propertyListRepresentation] copying HTML to pasteboard

        * WebView.subproj/WebArchive.m:
        (-[WebArchive _propertyListRepresentation]):
        the array holding the subresources was not released after use, oops!

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

18 years ago Reviewed by mjs.
kdecker [Mon, 15 Nov 2004 05:18:01 +0000 (05:18 +0000)]
    Reviewed by mjs.

fixed: <rdar://problem/3823038> LEAK: huge leak in DOM::HTMLElementImpl::createContextualFragment(DOM::DOMString const&, bool)

        * khtml/html/html_elementimpl.cpp:
        (HTMLElementImpl::setInnerHTML): uses the ref counting system to deallocate fragments instead of explicitly invoking a destructor.
        (HTMLElementImpl::setOuterHTML): function is responsible for derefing the fragment prior to returning. Now it does.

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

18 years ago Reviewed by Kevin.
mjs [Sun, 14 Nov 2004 02:07:49 +0000 (02:07 +0000)]
    Reviewed by Kevin.

<rdar://problem/3878766> VIP: Program listings pages at directv.com takes 75% of time traversing NodeLists

        * khtml/dom/dom_node.cpp:
        (NodeList::itemById): New method, just forward to impl.
        * khtml/dom/dom_node.h: Prototype it.
        * khtml/ecma/kjs_dom.cpp:
        (DOMNodeList::tryGet): Instead of looping over the whole list to do by-id access,
let the NodeList do it. The NodeList might be able to do it more efficiently.
        * khtml/xml/dom_nodeimpl.cpp:
(NodeListImpl::itemById): Optimize for the case where the NodeList
covers the whole document. In this case, just use getElementById,
then check that the element satisfies the list criteria.
        (ChildNodeListImpl::nodeMatches): Return true only if the node is our child.
        (TagNodeListImpl::TagNodeListImpl): Irrelevant change to reformat initializers.
        * khtml/xml/dom_nodeimpl.h:

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

18 years ago Reviewed by Gramps.
mjs [Sat, 13 Nov 2004 02:54:31 +0000 (02:54 +0000)]
    Reviewed by Gramps.

- fixed another bug in the last checkin, isCacheValid was unitialized, resulting in
sometimes using a huge bogus length value.

        * khtml/xml/dom_nodeimpl.cpp:
        (NodeListImpl::NodeListImpl): Initialize isCacheValid.

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

18 years ago Reviewed by NOBODY (OOPS!).
mjs [Sat, 13 Nov 2004 02:53:52 +0000 (02:53 +0000)]
    Reviewed by NOBODY (OOPS!).

- fixed another bug in the last checkin, isCacheValid was unitialized, resulting in
sometimes using a huge bogus length value.

        * khtml/xml/dom_nodeimpl.cpp:
        (NodeListImpl::NodeListImpl): Initialize isCacheValid.

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

18 years ago Reviewed by Maciej.
darin [Sat, 13 Nov 2004 02:12:28 +0000 (02:12 +0000)]
    Reviewed by Maciej.

        - fixed an infinite loop in that last check-in

        * khtml/xml/dom_nodeimpl.cpp: (NodeImpl::notifyLocalNodeListsSubtreeModified):
        Added a ++i to the loop so it won't get stuck on the first element in the list.

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

18 years ago Reviewed by Kevin.
mjs [Sat, 13 Nov 2004 01:12:18 +0000 (01:12 +0000)]
    Reviewed by Kevin.

- fixed <rdar://problem/3878183> Safari is 77% slower than it should be on a page on an IBM website due to NodeListImpl length

I fixed this by changing NodeLists to cache their length, but
invalidate it whenever there is a change in the DOM subtree at
which they are rooted. This makes NodeListImpl::recursiveLength()
drop completely off the profile, since we were repeatedly getting
a length for the same NodeList over and over.

        * khtml/xml/dom_nodeimpl.cpp:
        * khtml/xml/dom_nodeimpl.h:

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

18 years ago Reviewed by Maciej.
darin [Fri, 12 Nov 2004 22:04:26 +0000 (22:04 +0000)]
    Reviewed by Maciej.

        - various small cleanups

        * khtml/xml/dom_docimpl.h: Added policyBaseURL and setPolicyBaseURL.
        * khtml/html/html_documentimpl.h: Removed policyBaseURL and setPolicyBaseURL.

        * khtml/xml/xml_tokenizer.h: Marked isWaitingForScripts const.
        * khtml/xml/xml_tokenizer.cpp: (khtml::XMLTokenizer::isWaitingForScripts): Marked const.
        * khtml/html/htmltokenizer.h: Marked isWaitingForScripts const.
        * khtml/html/htmltokenizer.cpp:
        (khtml::HTMLTokenizer::isWaitingForScripts): Marked const.
        (khtml::HTMLTokenizer::setOnHold): Took out extraneous line of code.

        * khtml/khtml_part.h: Removed docImpl function.
        * khtml/khtml_part.cpp: Ditto.

        * khtml/xml/dom_docimpl.cpp: (DocumentImpl::close): Simplified code that implements
        the "redirect during onload" optimization. Now uses isScheduledLocationChangePending.

        * kwq/KWQKHTMLPart.h: Removed now-unused _firstResponderAtMouseDownTime.
        * kwq/KWQKHTMLPart.mm: Removed _firstResponderAtMouseDownTime (forgot to land this
        part of the change last time, which is why the build broke).
        (KWQKHTMLPart::updatePolicyBaseURL): Use xmlDocImpl instead of docImpl.
        (KWQKHTMLPart::setPolicyBaseURL): Ditto.
        (KWQKHTMLPart::keyEvent): Ditto.
        (KWQKHTMLPart::dispatchCPPEvent): Ditto.
        (KWQKHTMLPart::bodyBackgroundColor): Ditto.

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

18 years agoWebKit:
cblu [Fri, 12 Nov 2004 20:49:40 +0000 (20:49 +0000)]

Fixed: <rdar://problem/3874577> Opening restricted (parental) content in new window/tab reveals Safari's "Resources" folder

        Reviewed by john.

        * WebView.subproj/WebDefaultContextMenuDelegate.m:
        (-[WebDefaultUIDelegate openFrameInNewWindow:]): use the unreachable URL if there is one


Fixed: <rdar://problem/3874577> Opening restricted (parental) content in new window/tab reveals Safari's "Resources" folder

        Reviewed by john.

        * ContextMenuHandler.m:
        (-[BrowserWebView openFrameInNewTab:]): use the unreachable URL if there is one

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

18 years ago <rdar://problem/3843312> REGRESSION: Tabbing into content area puts insertion point...
cblu [Fri, 12 Nov 2004 20:19:38 +0000 (20:19 +0000)]
<rdar://problem/3843312> REGRESSION: Tabbing into content area puts insertion point at start, should go to where it last was

        Reviewed by rjw.

        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::nextKeyViewInFrameHierarchy): only blow away selection when another view is focused

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

18 years agoversioning for TOT, Safari 2.0 (171+)
vicki [Fri, 12 Nov 2004 20:06:33 +0000 (20:06 +0000)]
versioning for TOT, Safari 2.0 (171+)

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

18 years agoSafari-171 stamp
vicki [Fri, 12 Nov 2004 20:00:28 +0000 (20:00 +0000)]
Safari-171 stamp

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

18 years ago Reviewed by Kevin.
darin [Fri, 12 Nov 2004 18:35:37 +0000 (18:35 +0000)]
    Reviewed by Kevin.

        - fixed a couple places that would not work for XML documents

        * khtml/ecma/kjs_window.cpp:
        (Window::isSafeScript): Use xmlDocImpl instead of docImpl, since the function we're using
        is present on the base class.
        (WindowFunc::tryCall): More of the same.

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

18 years ago - land versions of these files generated by the newer gperf
darin [Fri, 12 Nov 2004 17:58:58 +0000 (17:58 +0000)]
    - land versions of these files generated by the newer gperf

        People building on Panther will continue to see these files modified.
        A workaround would be to install the newer gperf on our Tiger build machines.

        * khtml/css/cssproperties.c: Regenerated.
        * khtml/css/cssvalues.c: Regenerated.
        * khtml/html/doctypes.cpp: Regenerated.
        * khtml/html/kentities.c: Regenerated.
        * khtml/misc/htmlattrs.c: Regenerated.
        * khtml/misc/htmltags.c: Regenerated.
        * kwq/KWQColorData.c: Regenerated.

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

18 years ago Report actual size (not partial size) but use partial size
rjw [Fri, 12 Nov 2004 02:55:18 +0000 (02:55 +0000)]
    Report actual size (not partial size) but use partial size
        when drawing.

        Reviewed by Maciej.

        * WebCoreSupport.subproj/WebImageData.h:
        * WebCoreSupport.subproj/WebImageData.m:
        (-[WebImageData size]):

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

18 years ago Fix build horkage from previous checkin.
rjw [Fri, 12 Nov 2004 02:22:20 +0000 (02:22 +0000)]
    Fix build horkage from previous checkin.

        * kwq/KWQKHTMLPart.h:

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

18 years ago Reviewed by John.
darin [Fri, 12 Nov 2004 01:49:22 +0000 (01:49 +0000)]
    Reviewed by John.

        - fixed <rdar://problem/3846152> REGRESSION (125-166): can't drag text out of <input type=text> fields

        * kwq/WebCoreBridge.h: Added wasFirstResponderAtMouseDownTime: method.

        * kwq/KWQKHTMLPart.h: Removed _firstResponderAtMouseDownTime.
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::passWidgetMouseDownEventToWidget): Use the new wasFirstResponderAtMouseDownTime:
        method on the bridge instead of _firstResponderAtMouseDownTime. This will return YES for the case where
        we started with the NSTextField as first responder, and then took focus away and gave it back, which
        makes dragging text work again.
        (KWQKHTMLPart::mouseDown): Removed code to set _firstResponderAtMouseDownTime.

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

18 years ago Reviewed by John.
darin [Fri, 12 Nov 2004 01:29:05 +0000 (01:29 +0000)]
    Reviewed by John.

        - added _wasFirstResponderAtMouseDownTime method to bridge so we can fix
          <rdar://problem/3846152> REGRESSION (125-166): can't drag text out of <input type=text> fields
          with a subsequent change to WebCore.

        * WebCoreSupport.subproj/WebBridge.m:
        (wasFirstResponderAtMouseDownTime:): Added. Calls _wasFirstResponderAtMouseDownTime
        on the WebHTMLView.
        (_getPreSmartSet): Move global inside the function, add (void) for cleanliness.
        (_getPostSmartSet): Ditto.

        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLViewPrivate dealloc]): Release firstResponderAtMouseDownTime.
        (-[WebHTMLView _setMouseDownEvent:]): Early exit if event is not changing.
        Set firstResponderAtMouseDownTime to the first responder.
        (-[WebHTMLView mouseDown:]): Release firstResponderAtMouseDownTime after handling
        the mouseDown event.
        (-[WebHTMLView _wasFirstResponderAtMouseDownTime:]): Added. Uses the
        firstResponderAtMouseDownTime field.
        * WebView.subproj/WebHTMLViewInternal.h: Added firstResponderAtMouseDownTime field
        and _wasFirstResponderAtMouseDownTime method.

        * English.lproj/StringsNotToBeLocalized.txt: Update for recent changes.

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

18 years ago Reviewed by Chris.
rjw [Fri, 12 Nov 2004 01:11:15 +0000 (01:11 +0000)]
    Reviewed by Chris.

Work-around to minimize impact of 3876764.  Cache frame durations
after first call.  So we'll still leak 1K for each animated
image, but that's better than 1K each time the frame is drawn!
        * WebCoreSupport.subproj/WebImageData.h:
        * WebCoreSupport.subproj/WebImageData.m:
        (-[WebImageData _frameDuration]):

Simplified animation cleanup code.  Fixed leak due to
incorrect key passed to CFDictionaryRemoveValue.

        (+[WebImageData stopAnimationsInView:]):
        (-[WebImageData addAnimatingRenderer:inView:]):
        (-[WebImageData removeAnimatingRenderer:]):
        (-[WebImageData _stopAnimation]):

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

18 years ago Disable the tokenizer deferral, since it hurts the PLT by 3% or so.
hyatt [Thu, 11 Nov 2004 23:55:39 +0000 (23:55 +0000)]
Disable the tokenizer deferral, since it hurts the PLT by 3% or so.

        Reviewed by vicki

        * khtml/html/htmltokenizer.cpp:

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

18 years ago Reviewed by Maciej
kocienda [Thu, 11 Nov 2004 23:49:02 +0000 (23:49 +0000)]
    Reviewed by Maciej

        * khtml/editing/htmlediting.cpp:
        (khtml::InsertLineBreakCommand::doApply): Use new isLastVisiblePositionInBlock() helper instead
        of old isLastInBlock() member function on VisiblePosition. This is a cosmetic change in keeping
        with the prevailing style for the VisiblePosition class.
        * khtml/editing/htmlediting.h: Move isLastVisiblePositionInNode() function to visible_position.[cpp|h] files.
        * khtml/editing/visible_position.cpp: Removed isLastInBlock() helper. Renamed to isLastVisiblePositionInBlock().
        (khtml::visiblePositionsInDifferentBlocks): New helper method.
        (khtml::isLastVisiblePositionInBlock): Ditto.
        (khtml::isLastVisiblePositionInNode): Ditto.
        * khtml/editing/visible_position.h: Add declarations for new functions.

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

18 years ago Reviewed by Hyatt
kocienda [Thu, 11 Nov 2004 23:15:37 +0000 (23:15 +0000)]
    Reviewed by Hyatt

        * khtml/editing/htmlediting.cpp:
        (khtml::CompositeEditCommand::deleteInsignificantText): Call new compareBoundaryPoints convenience.
        (khtml::ApplyStyleCommand::removeBlockStyle): Ditto.
        (khtml::ApplyStyleCommand::removeInlineStyle): Ditto.
        (khtml::ApplyStyleCommand::nodeFullySelected): Ditto.
        (khtml::DeleteSelectionCommand::initializePositionData): Ditto.
        * khtml/xml/dom2_rangeimpl.cpp:
        (DOM::RangeImpl::compareBoundaryPoints): New convenience variant of this function which takes two Position objects.
        * khtml/xml/dom2_rangeimpl.h: Ditto.

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

18 years ago Reviewed by Maciej.
darin [Thu, 11 Nov 2004 22:59:28 +0000 (22:59 +0000)]
    Reviewed by Maciej.

        - fixed <rdar://problem/3605906> Flash scrolled off the top and bottom cause CPU spin when combined with something dirty on the visible part of the page

        * WebView.subproj/WebHTMLView.m: (-[WebHTMLView drawRect:]):
        Work around AppKit bug by using rectangles from getRectsBeingDrawn:count: instead of
        using the passed-in rectangle.

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

18 years ago Reviewed by Harrison
kocienda [Thu, 11 Nov 2004 22:23:23 +0000 (22:23 +0000)]
    Reviewed by Harrison

        Some improvements to deleting when complete lines are selected.

        * khtml/editing/htmlediting.cpp:
        (khtml::DeleteSelectionCommand::initializePositionData): Detect when the line containing
        the end of a selection is fully selected. Turn off block merging in this case.
        (khtml::DeleteSelectionCommand::handleSpecialCaseBRDelete): Fix a bug in the check for
        whether a BR immediately followed a block. The old code could erroneously skip nodes.
        (khtml::DeleteSelectionCommand::handleGeneralDelete): Add a case for when the entire
        start block is selected. This new code will now delete this block in one call, rather
        than iterating over each child.
        * khtml/editing/visible_position.cpp:
        (khtml::visiblePositionsOnDifferentLines): New helper called in initializePositionData()
        to do the work mentioned above in the comment for that function.
        (khtml::isFirstVisiblePositionOnLine): Ditto.
        (khtml::isLastVisiblePositionOnLine): Ditto.
        * khtml/editing/visible_position.h: Add new functions.
        * layout-tests/editing/deleting/delete-line-001-expected.txt: Added.
        * layout-tests/editing/deleting/delete-line-001.html: Added.
        * layout-tests/editing/deleting/delete-line-002-expected.txt: Added.
        * layout-tests/editing/deleting/delete-line-002.html: Added.
        * layout-tests/editing/deleting/delete-line-003-expected.txt: Added.
        * layout-tests/editing/deleting/delete-line-003.html: Added.
        * layout-tests/editing/deleting/delete-line-004-expected.txt: Added.
        * layout-tests/editing/deleting/delete-line-004.html: Added.
        * layout-tests/editing/deleting/delete-line-005-expected.txt: Added.
        * layout-tests/editing/deleting/delete-line-005.html: Added.
        * layout-tests/editing/deleting/delete-line-006-expected.txt: Added.
        * layout-tests/editing/deleting/delete-line-006.html: Added.
        * layout-tests/editing/deleting/delete-line-007-expected.txt: Added.
        * layout-tests/editing/deleting/delete-line-007.html: Added.
        * layout-tests/editing/deleting/delete-line-008-expected.txt: Added.
        * layout-tests/editing/deleting/delete-line-008.html: Added.
        * layout-tests/editing/deleting/delete-line-009-expected.txt: Added.
        * layout-tests/editing/deleting/delete-line-009.html: Added.
        * layout-tests/editing/deleting/delete-line-010-expected.txt: Added.
        * layout-tests/editing/deleting/delete-line-010.html: Added.
        * layout-tests/editing/deleting/delete-line-011-expected.txt: Added.
        * layout-tests/editing/deleting/delete-line-011.html: Added.
        * layout-tests/editing/deleting/delete-line-012-expected.txt: Added.
        * layout-tests/editing/deleting/delete-line-012.html: Added.

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

18 years agoReplaced NOBODY with John.
rjw [Thu, 11 Nov 2004 21:35:51 +0000 (21:35 +0000)]
Replaced NOBODY with John.

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

18 years ago Work-arounds to make new ImageIO code work correctly. Still
rjw [Thu, 11 Nov 2004 21:35:26 +0000 (21:35 +0000)]
    Work-arounds to make new ImageIO code work correctly.  Still
        disabled for now.  Requires at least Tiger 300.  Testing does
        show a 3% improvement in PLT tests!  That's huge!

        Reviewed by NOBODY (OOPS!).

        * WebCoreSupport.subproj/WebImageData.m:
        (-[WebImageData imageAtIndex:]):
        (-[WebImageData incrementalLoadWithBytes:length:complete:]):
        (-[WebImageData isNull]):

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

18 years ago Reviewed by Adele
kocienda [Thu, 11 Nov 2004 18:09:51 +0000 (18:09 +0000)]
    Reviewed by Adele

        * khtml/editing/htmlediting.cpp:
        (khtml::DeleteSelectionCommand::initializePositionData): Add some comments and a new piece of debugging output.

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

18 years ago Reviewed by John
kocienda [Thu, 11 Nov 2004 17:49:56 +0000 (17:49 +0000)]
    Reviewed by John

        Fix for these bugs:

        <rdar://problem/3875618> REGRESSION (Mail): Hitting down arrow with full line selected skips line (br case)
        <rdar://problem/3875641> REGRESSION (Mail): Hitting down arrow with full line selected skips line (div case)

        * khtml/editing/selection.cpp:
        (khtml::Selection::modifyMovingRightForward): Fixed by juggling the position as the starting point for
        the next line position when necessary.
        * layout-tests/editing/selection/move-3875618-fix-expected.txt: Added.
        * layout-tests/editing/selection/move-3875618-fix.html: Added.
        * layout-tests/editing/selection/move-3875641-fix-expected.txt: Added.
        * layout-tests/editing/selection/move-3875641-fix.html: Added.

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

18 years ago Reviewed by John
kocienda [Thu, 11 Nov 2004 15:35:56 +0000 (15:35 +0000)]
    Reviewed by John

        Improved some function names, at John's urging. No changes to the
        functions themselves.

        canPerformSpecialCaseAllContentDelete() --> handleSpecialCaseAllContentDelete()
        canPerformSpecialCaseBRDelete() --> handleSpecialCaseBRDelete()
        performGeneralDelete() --> handleGeneralDelete()

        * khtml/editing/htmlediting.cpp:
        * khtml/editing/htmlediting.h

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

18 years ago Reviewed by John
kocienda [Thu, 11 Nov 2004 15:28:56 +0000 (15:28 +0000)]
    Reviewed by John

        Updated some layout test results that changed as a result of my last checking.
        Added a new test that has been in my tree for a few days.

        * layout-tests/editing/deleting/delete-3775172-fix-expected.txt:
        * layout-tests/editing/deleting/delete-3800834-fix-expected.txt:
        * layout-tests/editing/inserting/insert-3851164-fix-expected.txt: Added.
        * layout-tests/editing/inserting/insert-3851164-fix.html: Added.

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

18 years ago Reviewed by John
kocienda [Thu, 11 Nov 2004 15:26:01 +0000 (15:26 +0000)]
    Reviewed by John

        * khtml/editing/htmlediting.cpp:
        (khtml::debugNode): New debugging helper.
        (khtml::DeleteSelectionCommand::initializePositionData): No longer call obsoleted
        startPositionForDelete() and endPositionForDelete() functions. Just use the
        m_selectionToDelete object to determine start and end positions for the delete.
        (khtml::DeleteSelectionCommand::canPerformSpecialCaseAllContentDelete): New
        function that creates a special case for deleting all the content in a root
        editable element.
        (khtml::DeleteSelectionCommand::doApply): Call canPerformSpecialCaseAllContentDelete()
        function before BR special case and the general case delete functions.
        * khtml/editing/htmlediting.h: Updated for changed functions.

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

18 years ago Reviewed by mjs.
kdecker [Thu, 11 Nov 2004 02:08:31 +0000 (02:08 +0000)]
    Reviewed by mjs.

Fixed <rdar://problem/3875011> DOMNodeList::tryGet() performs unnecessary (and expensive) dom tree traversals. Improved a loop from 2-n-squared to just n-squared.

        * khtml/ecma/kjs_dom.cpp:
        (DOMNodeList::tryGet): Got rid of an unnecessary node traversal.

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

18 years ago Fixed: <rdar://problem/3396872> ICONS: icon DB inconsistencies can cause slowness...
cblu [Wed, 10 Nov 2004 22:39:20 +0000 (22:39 +0000)]
Fixed: <rdar://problem/3396872> ICONS: icon DB inconsistencies can cause slowness during startup, idle and quit

        Reviewed by john.

        * Misc.subproj/WebFileDatabase.m:
        (-[WebFileDatabase objectForKey:]): added logging code
        * Misc.subproj/WebIconDatabase.m:
        (-[WebIconDatabase init]): use alloc, init rather than autorelease, retain
        (-[WebIconDatabase _loadIconDictionaries]): use 1 object for mapping icon URLs to site URLs and vice versa rather than 3. This avoids inconsistencies and is faster.
        (-[WebIconDatabase _updateFileDatabase]): write 1 object out

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

18 years ago Reviewed by Chris
kocienda [Wed, 10 Nov 2004 22:03:04 +0000 (22:03 +0000)]
    Reviewed by Chris

        * khtml/editing/htmlediting.cpp:
        (khtml::DeleteSelectionCommand::initializePositionData): Move position adjustments for
        smart delete from the two functions below to here. There was an unnecessary double
        calculation of the leading and trailing whitespace positions. Also refined the trailing
        case so it only acts when the leading position is null (which seems to match TextEdit in
        my tests). Also removed some unnecessary copying of Position objects.
        (khtml::DeleteSelectionCommand::startPositionForDelete): Move out smart delete adjustment
        from here.
        (khtml::DeleteSelectionCommand::endPositionForDelete): Ditto.

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

18 years ago Reviewed by Harrison
kocienda [Wed, 10 Nov 2004 19:04:35 +0000 (19:04 +0000)]
    Reviewed by Harrison

        (khtml::DeleteSelectionCommand::performGeneralDelete): Add some more comments to
        make things more clear.
        * khtml/editing/selection.cpp:
        (khtml::Selection::toRange): Fixed the upstream and downstream calls so that the
        resulting positions do not cross block boundaries. This was a bug and caused some
        delete problems when whole blocks were selected. I will be addressing that issue
        more fully in upcoming changes.

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

18 years ago Reviewed by Harrison
kocienda [Wed, 10 Nov 2004 16:58:30 +0000 (16:58 +0000)]
    Reviewed by Harrison

        Some cleanups and fixes in upstream and downstream functions.

        Removed redundant checks for isBlockFlow() when calling enclosingBlockFlowElement().
        Blocks do not need to skip the call to enclosingBlockFlowElement() for fear that the
        block's enclosing block will be returned.

        Remove code from upstream that confined the serach to block boundaries outside of
        the code which runs in the StayInBlock case. This code was redundant, and caused
        incorrect results to be returned in the DoNotStayInBlock case.

        In downstream, the check for crossing into a new block should use the equivalentDeepPosition()
        node, not the the this pointer's node.

        * khtml/xml/dom_position.cpp:

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

18 years ago Fix for 3873234, Safari UI is unresponsive when parsing multiple HTML docs and 38732...
hyatt [Wed, 10 Nov 2004 03:47:56 +0000 (03:47 +0000)]
Fix for 3873234, Safari UI is unresponsive when parsing multiple HTML docs and 3873233, Safari hangs when
        loading large local files.

        Reviewed by mjs

        * khtml/html/htmltokenizer.cpp:
        * khtml/html/htmltokenizer.h:
        * khtml/khtml_part.cpp:
        * khtml/khtml_part.h:
        * khtml/khtmlview.cpp:
        * khtml/xml/dom_docimpl.cpp:
        * khtml/xml/xml_tokenizer.h:
        * kwq/KWQDateTime.h:
        * kwq/KWQDateTime.mm:
        * kwq/KWQKHTMLPart.h:
        * kwq/KWQKHTMLPart.mm:
        * kwq/WebCoreBridge.h:
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge stop]):
        (-[WebCoreBridge numPendingOrLoadingRequests]):
        (-[WebCoreBridge doneProcessingData]):

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

18 years ago Fix for 3873234, Safari UI is unresponsive when parsing multiple HTML docs and 38732...
hyatt [Wed, 10 Nov 2004 03:46:05 +0000 (03:46 +0000)]
Fix for 3873234, Safari UI is unresponsive when parsing multiple HTML docs and 3873233, Safari hangs when
loading large local files.

        Reviewed by mjs

        * WebCoreSupport.subproj/WebBridge.m:
        (-[WebBridge tokenizerProcessedData]):
        * WebView.subproj/WebDataSource.m:
        (-[WebDataSource _receivedMainResourceError:complete:]):
        (-[WebDataSource isLoading]):

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

18 years ago Reviewed by Ken Kocienda.
harrison [Wed, 10 Nov 2004 01:04:41 +0000 (01:04 +0000)]
    Reviewed by Ken Kocienda.

<rdar://problem/3865837> Wrong text style after delete to start of document

        * khtml/editing/htmlediting.cpp:
        Sample computedStyle of m_selectionToDelete.start instead of m_downstreamStart.

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

18 years ago Fixed: <rdar://problem/3872724> soft link against JavaVM to save ~2MB RSHRD
cblu [Wed, 10 Nov 2004 00:28:07 +0000 (00:28 +0000)]
Fixed: <rdar://problem/3872724> soft link against JavaVM to save ~2MB RSHRD

        Reviewed by rjw.

        * ChangeLog:
        * JavaScriptCore.pbproj/project.pbxproj: don't link against JavaVM
        * bindings/softlinking.c: Added.
        (loadFramework): new
        (getFunctionPointer): new
        (JNI_GetCreatedJavaVMs): load JavaVM if not already loaded, get _JNI_GetCreatedJavaVMs symbol if we don't already have it, call JNI_GetCreatedJavaVMs

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

18 years ago Fixed <rdar://problem/3872440> NSTimer prematurely released.
rjw [Tue, 9 Nov 2004 21:52:20 +0000 (21:52 +0000)]
    Fixed <rdar://problem/3872440> NSTimer prematurely released.

        Reviewed by Darin.

        * kwq/KWQTimer.mm:
        * kwq/KWQWidget.mm:

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

18 years ago Fixed <rdar://problem/3870964> 8A300: Safari not recognizing a PDF link ...
rjw [Tue, 9 Nov 2004 20:57:09 +0000 (20:57 +0000)]
    Fixed <rdar://problem/3870964> 8A300: Safari not recognizing a PDF link (it displays raw data)

Add "text/pdf" as an acceptable PDF MIME type.

        Reviewed by Chris.

        * WebView.subproj/WebDataSource.m:
        (+[WebDataSource _repTypesAllowImageTypeOmission:]):
        * WebView.subproj/WebFrameView.m:
        (+[WebFrameView _viewTypesAllowImageTypeOmission:]):

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

18 years ago Reviewed by vicki.
cblu [Tue, 9 Nov 2004 20:52:46 +0000 (20:52 +0000)]
    Reviewed by vicki.

        * WebCore.pbproj/project.pbxproj: explicitly link against libxml2.2.6.14.dylib since the version number has been bumped

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

18 years ago Reviewed by Ken Kocienda.
harrison [Tue, 9 Nov 2004 03:46:04 +0000 (03:46 +0000)]
    Reviewed by Ken Kocienda.

<rdar://problem/3865854> Deleting first line deletes all lines

        * khtml/editing/htmlediting.cpp:
        Problem was that the code that deletes fully selected m_downstreamEnd.node() by deleting one
        of its ancestors, failed to end the loop that deletes all fully selected nodes.  Also,
        fixed this code to clear m_trailingWhitespaceValid.  Also removed dead m_endingPosition
        update because it is handled in calculateEndingPosition now.
        * layout-tests/editing/deleting/delete-3865854-fix-expected.txt: Added.
        * layout-tests/editing/deleting/delete-3865854-fix.html: Added.

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

18 years ago Reviewed by Hyatt
kocienda [Tue, 9 Nov 2004 00:32:21 +0000 (00:32 +0000)]
    Reviewed by Hyatt

        * khtml/html/html_elementimpl.cpp:
        (HTMLElementImpl::createContextualFragment): Now takes flag to control whether comments
        are added to the DOM.
        * khtml/html/html_elementimpl.h: Ditto.
        * khtml/html/htmlparser.cpp:
        (KHTMLParser::KHTMLParser): Ditto.
        (KHTMLParser::getElement): Remove ifdef for comment processing. Replace with flag check.
        * khtml/html/htmlparser.h: Add flag to constructor so callers can request comment nodes.
        * khtml/html/htmltokenizer.cpp:
        (khtml::HTMLTokenizer::HTMLTokenizer): Add flag to constructor so callers can request comment nodes.
        (khtml::HTMLTokenizer::parseComment): Fix code to handle parsing out comment text correctly.
        There were a couple of indexing errors that resulted in the comment text containing part of the
        comment markers.
        (khtml::HTMLTokenizer::processToken): Don't let token id be reset to ID_TEXT if token is a comment.
        * khtml/html/htmltokenizer.h:  Add flag to constructor so callers can request comment nodes.

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

18 years ago Fixed: <rdar://problem/3870907> WebCore unnecessary links against JavaVM and Security
cblu [Tue, 9 Nov 2004 00:22:02 +0000 (00:22 +0000)]
Fixed: <rdar://problem/3870907> WebCore unnecessary links against JavaVM and Security

        Reviewed by darin.

        * WebCore.pbproj/project.pbxproj: stop unnecessary linking
        * khtml/html/html_objectimpl.h: don't unnecessarily include JavaVM header
        * kwq/KWQKHTMLPart.h: ditto

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

18 years ago Reviewed by John.
darin [Tue, 9 Nov 2004 00:02:11 +0000 (00:02 +0000)]
    Reviewed by John.

        - fixed <rdar://problem/3825966> 8A274 Safari crashes closing window: QTimer::fire() with MallocStackLogging and MallocScribble enabled

        * kwq/KWQTimer.mm: (QTimer::fire): Rearrange so we don't access the QTimer object after calling code
        that possibly deletes the QTimer.

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

18 years agoWebCore:
cblu [Mon, 8 Nov 2004 19:11:49 +0000 (19:11 +0000)]

Fixed: <rdar://problem/3783904> Return key behavior is confusingly different between popup menus and autofill menus

        Reviewed by john.

        * kwq/KWQTextField.mm:
        (-[KWQTextFieldController textView:shouldHandleEvent:]): let the bridge have a crack at the event so that it can swallow the newline if it wants to
        * kwq/WebCoreBridge.h:


Fixed: <rdar://problem/3783904> Return key behavior is confusingly different between popup menus and autofill menus

        Reviewed by john.

        * WebCoreSupport.subproj/WebBridge.m:
        (-[WebBridge control:textView:shouldHandleEvent:]): new
        * WebView.subproj/WebFormDelegate.h:
        * WebView.subproj/WebFormDelegate.m:
        (-[WebFormDelegate control:textView:shouldHandleEvent:inFrame:]): new


Fixed: <rdar://problem/3783904> Return key behavior is confusingly different between popup menus and autofill menus

        Reviewed by john.

        * BrowserWebController.m:
        (-[FormDelegate control:textView:shouldHandleEvent:inFrame:]): new
        * CompletionController.h:
        * CompletionController.m:
        (-[CompletionController handleInsertNewline]): new, factored out from next method
        (-[CompletionController control:textView:doCommandBySelector:]): call handleInsertNewline
        * FormCompletionController.h:
        * FormCompletionController.m:
        (-[FormCompletionController control:textView:shouldHandleEvent:]): new, call handleInsertNewline so that WebCore does not submit the form when a newline is entered

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

18 years ago Reviewed by Darin.
harrison [Mon, 8 Nov 2004 18:31:03 +0000 (18:31 +0000)]
    Reviewed by Darin.

        Renamed NodeImpl::enclosingNonBlockFlowElement to NodeImpl::enclosingInlineElement, per Hyatt.

        * khtml/editing/htmlediting.cpp:
        * khtml/xml/dom_nodeimpl.cpp:
        * khtml/xml/dom_nodeimpl.h:

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

18 years ago Fixed: <rdar://problem/3854218> Safari is sometimes really slow because of increased...
cblu [Sat, 6 Nov 2004 00:45:14 +0000 (00:45 +0000)]
Fixed: <rdar://problem/3854218> Safari is sometimes really slow because of increased null events to plug-ins

        * Plugins.subproj/WebBaseNetscapePluginView.m: reverted null event interval to 0.02

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

18 years ago Fixed: <rdar://problem/3838413> REGRESSION (Mail): "Smart" word paste adds spaces...
cblu [Sat, 6 Nov 2004 00:36:52 +0000 (00:36 +0000)]
Fixed: <rdar://problem/3838413> REGRESSION (Mail): "Smart" word paste adds spaces before/after special characters

        Reviewed by rjw.

        * khtml/editing/htmlediting.cpp:
        (khtml::ReplaceSelectionCommand::doApply): call isCharacterSmartReplaceExempt on the part to see if a space should be inserted
        * khtml/editing/visible_position.cpp:
        (khtml::VisiblePosition::character): new, returns the character for the position
        * khtml/editing/visible_position.h:
        * kwq/KWQKHTMLPart.h:
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::isCharacterSmartReplaceExempt): new, calls the bridge
        * kwq/WebCoreBridge.h:

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

18 years ago Fixed: <rdar://problem/3838413> REGRESSION (Mail): "Smart" word paste adds spaces...
cblu [Sat, 6 Nov 2004 00:36:12 +0000 (00:36 +0000)]
Fixed: <rdar://problem/3838413> REGRESSION (Mail): "Smart" word paste adds spaces before/after special characters

        Reviewed by rjw.

        * WebCoreSupport.subproj/WebBridge.m:
        (_getPreSmartSet): copied from AppKit
        (_getPostSmartSet): ditto
        (-[WebBridge isCharacterSmartReplaceExempt:isPreviousCharacter:]): new

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

18 years ago Fixed <rdar://problem/3810702> _checkNavigationPolicyForRequest:dataSource...
rjw [Fri, 5 Nov 2004 23:31:45 +0000 (23:31 +0000)]
    Fixed <rdar://problem/3810702> _checkNavigationPolicyForRequest:dataSource:formState:andCall:withSelector: ASSERTS when reentered from Xcode's man page viewer

        Reviewed by Maciej (a long time ago).

        * WebView.subproj/WebFrame.m:
        (-[WebFrame _loadDataSource:withLoadType:formState:]):

        Fixed <rdar://problem/3845307> WebKit needs to export _HIWebViewRegisterClass so HIWebViews can work in Carbon nib files

        As suggested in the bug, the fix is to actually call
        HIWebViewRegisterClass in WebKitInitForCarbon, rather than
        exporting the symbol.

        Reviewed by Chris.

        * Carbon.subproj/CarbonUtils.m:
        * Carbon.subproj/HIWebView.m:
        * WebKit.pbproj/project.pbxproj:

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

18 years agoversioning for TOT, Safari 2.0 (170+)
vicki [Fri, 5 Nov 2004 22:11:11 +0000 (22:11 +0000)]
versioning for TOT, Safari 2.0 (170+)

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

18 years agoSafari-170 stamp
vicki [Fri, 5 Nov 2004 21:59:13 +0000 (21:59 +0000)]
Safari-170 stamp

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

18 years agoBacking out change because tree is closed.
rjw [Fri, 5 Nov 2004 21:14:21 +0000 (21:14 +0000)]
Backing out change because tree is closed.

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

18 years ago Fixed <rdar://problem/3845307> WebKit needs to export _HIWebViewRegisterClass so...
rjw [Fri, 5 Nov 2004 20:38:41 +0000 (20:38 +0000)]
Fixed <rdar://problem/3845307> WebKit needs to export _HIWebViewRegisterClass so HIWebViews can work in Carbon nib files

        Reviewed by Chris.

        * Carbon.subproj/CarbonUtils.m:
        * Carbon.subproj/HIWebView.m:

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

18 years ago Reviewed by Darin
adele [Fri, 5 Nov 2004 18:45:31 +0000 (18:45 +0000)]
    Reviewed by Darin

Fix for <rdar://problem/3854383> REGRESSION(166-168) input fields show black background when background color is set to transparent
and a workaround for displaying transparent backgrounds for textareas.

        * kwq/KWQLineEdit.mm: (QLineEdit::setPalette): If the background color is transparent (we check the alpha value) then we set the background to white
        * kwq/KWQTextEdit.mm: (QTextEdit::setPalette): If the background color is transparent then we don't draw the background
        * kwq/KWQTextArea.mm: (-[KWQTextArea setDrawsBackground:]): added setDrawsBackground function which calls setDrawsBackground on the super class,
          on the contentView, and on the textView.

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

18 years ago Reviewed by Chris.
darin [Fri, 5 Nov 2004 18:00:25 +0000 (18:00 +0000)]
    Reviewed by Chris.

        - fixed <rdar://problem/3857151> Assertion failure in "trackingRectOwner" while moving mouse over Slashdot.org page

        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView _addTrackingRect:owner:userData:assumeInside:useTrackingNum:]): Changed to no longer call
        addTrackingRect to do the work for consistency with the new method below. Not too much copied and pasted code.
        (-[WebHTMLView _addTrackingRects:owner:userDataList:assumeInsideList:trackingNums:count:]): Added an override
        for this new method in Tiger. No harm in implementing it on Panther, although it won't be called.
        (-[WebHTMLView _removeTrackingRects:count:]): Ditto.

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

18 years agoland updated layout tests for the relpositioned change, the ex unit change, and the...
hyatt [Fri, 5 Nov 2004 03:09:18 +0000 (03:09 +0000)]
land updated layout tests for the relpositioned change, the ex unit change, and the text-top vertical-align change

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

18 years ago Fix for relpositioned inlines. This was reviewed a long time ago, but I can't recal...
hyatt [Fri, 5 Nov 2004 02:59:48 +0000 (02:59 +0000)]
Fix for relpositioned inlines.  This was reviewed a long time ago, but I can't recall who reviewed it (either
darin or ken).

        Reviewed by darin or ken

        * khtml/rendering/bidi.cpp:
        * khtml/rendering/render_block.cpp:
        * khtml/rendering/render_box.cpp:
        * khtml/rendering/render_box.h:
        * khtml/rendering/render_layer.cpp:
        * khtml/rendering/render_line.cpp:
        * khtml/rendering/render_object.h:

Finish turning on XSLT.  Make sure child stylesheets can load.

        * khtml/xsl/xslt_processorimpl.cpp:

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

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

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

        Reviewed by darin

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

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

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

        Reviewed by darin

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

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