Reviewed by Ken.
authordarin <darin@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 20 May 2004 15:09:33 +0000 (15:09 +0000)
committerdarin <darin@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 20 May 2004 15:09:33 +0000 (15:09 +0000)
commit6cde62850a985c2b6a2cdd17a5a67c6c141c43a4
treecd506399422d14f8f98ef2a8e324b36a2a17c6c6
parent65851a08c863abbc91a1102466eb0b963a2475f1
    Reviewed by Ken.

        - fixed <rdar://problem/3661918>: "repro nil-deref in RenderImage::paint (www.codepoetry.net)"

        * khtml/rendering/render_image.cpp: (RenderImage::paint): Check renderer pointer to see if it's
        nil before dereferencing it.

        - fixed <rdar://problem/3658455>: "readFromData:options:documentAttributes: crashes when passed page without a body (in WebKit mode)"

        * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::bodyBackgroundColor): Check renderer pointer to see if it's
        nil before dereferencing it.

        - fixed <rdar://problem/2948112>: "implement addRule for JavaScript for style sheets"

        * khtml/dom/css_stylesheet.h: Added addRule.
        * khtml/dom/css_stylesheet.cpp: (CSSStyleSheet::addRule): Added.
        * khtml/css/css_stylesheetimpl.h: Added addRule.
        * khtml/css/css_stylesheetimpl.cpp: (CSSStyleSheetImpl::addRule): Added an implementation
        based on the Microsoft documentation. An index of -1 means "at the end of the list".

        * khtml/dom/dom_string.h: Changed the string-append operator to be a non-member function
        so it works even if the left side has to undergo type conversion.
        * khtml/dom/dom_string.cpp: (DOM::operator+): Changed implementation to match above.
        Also changed to not use anything private or protected so it doesn't have to be a friend.

        * khtml/ecma/kjs_css.h: Added addRule to the list of functions for CSS style sheets.
        * khtml/ecma/kjs_css.cpp: (DOMCSSStyleSheetProtoFunc::tryCall): Add support for addRule,
        based on the Microsoft documentation; always returns -1. Also removed unused string conversions.
        * khtml/ecma/kjs_css.lut.h: Regenerated.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6647 268f45cc-cd09-0410-ab3c-d52691b4dbfc
12 files changed:
WebCore/ChangeLog-2005-08-23
WebCore/khtml/css/css_stylesheetimpl.cpp
WebCore/khtml/css/css_stylesheetimpl.h
WebCore/khtml/dom/css_stylesheet.cpp
WebCore/khtml/dom/css_stylesheet.h
WebCore/khtml/dom/dom_string.cpp
WebCore/khtml/dom/dom_string.h
WebCore/khtml/ecma/kjs_css.cpp
WebCore/khtml/ecma/kjs_css.h
WebCore/khtml/ecma/kjs_css.lut.h
WebCore/khtml/rendering/render_image.cpp
WebCore/kwq/KWQKHTMLPart.mm