2010-09-30 Darin Adler <darin@apple.com>
authordarin@apple.com <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 1 Oct 2010 00:04:02 +0000 (00:04 +0000)
committerdarin@apple.com <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 1 Oct 2010 00:04:02 +0000 (00:04 +0000)
commit9a2c755bc372b010526a11002a4b2497c2da86bc
tree2af587ab7e1b7d1c2e445d68bd2d79a423b0d0f1
parent6e8bec0b31e8e04d8e8322401d958288913a5305
2010-09-30  Darin Adler  <darin@apple.com>

        Reviewed by Sam Weinig.

        Remove remaining calls to deprecatedParseURL
        https://bugs.webkit.org/show_bug.cgi?id=26599

        * WebCoreSupport/WebFrameLoaderClient.cpp:
        (WebFrameLoaderClient::dispatchDidFailToStartPlugin):
        Call stripLeadingAndTrailingHTMLSpaces instead of deprecatedParseURL.
2010-09-30  Darin Adler  <darin@apple.com>

        Reviewed by Sam Weinig.

        Remove remaining calls to deprecatedParseURL
        https://bugs.webkit.org/show_bug.cgi?id=26599

        * DOM/WebDOMOperations.mm:
        (-[DOMDocument URLWithAttributeString:]):
        * WebCoreSupport/WebFrameLoaderClient.mm:
        (WebFrameLoaderClient::createPlugin):
        Call stripLeadingAndTrailingHTMLSpaces instead of deprecatedParseURL.
2010-09-30  Darin Adler  <darin@apple.com>

        Reviewed by Sam Weinig.

        Remove remaining calls to deprecatedParseURL
        https://bugs.webkit.org/show_bug.cgi?id=26599

        Test: fast/replaced/object-param-spaces.html

        * css/CSSHelper.cpp: Removed.
        * css/CSSHelper.h: Removed deprecatedParseURL.

        * html/parser/HTMLParserIdioms.cpp:
        (WebCore::stripLeadingAndTrailingHTMLSpaces):
        Fixed bug where the function would turn the null string into the empty string.
        Fixed bug where the function would not strip all trailing spaces.

        * html/parser/CSSPreloadScanner.cpp:
        (WebCore::CSSPreloadScanner::CSSPreloadScanner): Initialize m_state
        instead of calling the reset function.
        (WebCore::CSSPreloadScanner::scan): Tweaked coding style.
        (WebCore::CSSPreloadScanner::tokenize): Use isHTMLSpace instead of
        an identical local function named isWhitespace.
        (WebCore::parseCSSStringOrURL): Added. This function does what
        deprecatedParseURL did before, and this is the only place in WebKit
        that needs it. The code implements the rules for a string or URL
        token. The real CSS parser does this with flex and the code to hook
        flex up to yacc, so the function is not needed there.
        (WebCore::CSSPreloadScanner::emitRule): Streamlined the code a bit
        and mae it call parseCSSStringOrURL.

        * bindings/generic/BindingSecurity.h:
        (WebCore::::allowSettingFrameSrcToJavascriptUrl):
        * bindings/js/JSDOMBinding.cpp:
        (WebCore::allowSettingSrcToJavascriptURL):
        * bindings/js/JSHTMLFrameElementCustom.cpp:
        (WebCore::allowSettingJavascriptURL):
        * bindings/objc/DOM.mm:
        (-[DOMElement _getURLAttribute:]):
        * bindings/objc/DOMHTML.mm:
        (-[DOMHTMLDocument _createDocumentFragmentWithMarkupString:baseURLString:]):
        * dom/Document.cpp:
        (WebCore::Document::processBaseElement):
        * dom/Element.cpp:
        (WebCore::isAttributeToRemove):
        (WebCore::Element::getURLAttribute):
        (WebCore::Element::getNonEmptyURLAttribute):
        * html/HTMLAnchorElement.cpp:
        (WebCore::HTMLAnchorElement::defaultEventHandler):
        (WebCore::HTMLAnchorElement::parseMappedAttribute):
        (WebCore::HTMLAnchorElement::href):
        * html/HTMLBodyElement.cpp:
        (WebCore::HTMLBodyElement::parseMappedAttribute):
        * html/HTMLEmbedElement.cpp:
        (WebCore::HTMLEmbedElement::parseMappedAttribute):
        * html/HTMLFrameElementBase.cpp:
        (WebCore::HTMLFrameElementBase::parseMappedAttribute):
        * html/HTMLImageElement.cpp:
        (WebCore::HTMLImageElement::parseMappedAttribute):
        * html/HTMLImageLoader.cpp:
        (WebCore::HTMLImageLoader::sourceURI):
        * html/HTMLLinkElement.cpp:
        (WebCore::HTMLLinkElement::parseMappedAttribute):
        * html/HTMLMediaElement.cpp:
        * html/HTMLObjectElement.cpp:
        (WebCore::HTMLObjectElement::parseMappedAttribute):
        (WebCore::HTMLObjectElement::parametersForPlugin):
        * html/HTMLTableElement.cpp:
        (WebCore::HTMLTableElement::parseMappedAttribute):
        * html/HTMLTablePartElement.cpp:
        (WebCore::HTMLTablePartElement::parseMappedAttribute):
        * html/parser/HTMLPreloadScanner.cpp:
        (WebCore::HTMLNames::PreloadTask::setUrlToLoad):
        * loader/FormSubmission.cpp:
        (WebCore::FormSubmission::Attributes::parseAction):
        * platform/chromium/ClipboardChromium.cpp:
        (WebCore::ClipboardChromium::declareAndWriteDragImage):
        * platform/chromium/PasteboardChromium.cpp:
        (WebCore::Pasteboard::writeImage):
        * platform/qt/ClipboardQt.cpp:
        (WebCore::ClipboardQt::declareAndWriteDragImage):
        * platform/win/ClipboardWin.cpp:
        (WebCore::ClipboardWin::declareAndWriteDragImage):
        * rendering/HitTestResult.cpp:
        (WebCore::HitTestResult::absoluteImageURL):
        (WebCore::HitTestResult::absoluteMediaURL):
        (WebCore::HitTestResult::absoluteLinkURL):
        * svg/SVGAElement.cpp:
        (WebCore::SVGAElement::defaultEventHandler):
        * svg/SVGImageLoader.cpp:
        (WebCore::SVGImageLoader::sourceURI):
        * wml/WMLAElement.cpp:
        (WebCore::WMLAElement::defaultEventHandler):
        * wml/WMLImageLoader.cpp:
        (WebCore::WMLImageLoader::sourceURI):
        Call stripLeadingAndTrailingHTMLSpaces instead of deprecatedParseURL.

        * WebCore.exp.in: Updated.

        * Android.mk: Removed CSSHelper.cpp.
        * CMakeLists.txt: Ditto.
        * GNUmakefile.am: Ditto.
        * WebCore.gypi: Ditto.
        * WebCore.pro: Ditto.
        * WebCore.vcproj/WebCore.vcproj: Ditto.
        * WebCore.xcodeproj/project.pbxproj: Ditto.

        * bindings/js/JSAttrCustom.cpp:
        * bindings/js/JSElementCustom.cpp:
        * bindings/v8/custom/V8ElementCustom.cpp:
        * bindings/v8/custom/V8LocationCustom.cpp:
        * css/CSSParser.cpp:
        * html/HTMLMediaElement.cpp:
        * html/HTMLVideoElement.cpp:
        * loader/ImageLoader.cpp:
        * rendering/style/RenderStyle.h:
        Removed unneeded include of CSSHelper.h.
2010-09-30  Darin Adler  <darin@apple.com>

        Reviewed by Sam Weinig.

        Remove remaining calls to deprecatedParseURL
        https://bugs.webkit.org/show_bug.cgi?id=26599

        * fast/replaced/object-param-spaces-expected.txt: Copied from
        LayoutTests/fast/replaced/object-param-url-control-char-expected.txt.
        * fast/replaced/object-param-spaces.html: Copied from
        LayoutTests/fast/replaced/object-param-url-control-char.html.
        * fast/replaced/object-param-url-control-char-expected.txt: Removed.
        * fast/replaced/object-param-url-control-char.html: Removed.
        Changed this test to expect HTML standard space trimming, but not the WebKit-only
        control character stripping we had historically.

        * fast/url/query-expected.txt: Updated to expect the test to pass.

        * fast/url/script-tests/segments-from-data-url.js: Changed expected result to not
        expect stripping of newline characters.
        * fast/url/script-tests/segments.js: Ditto.
        * fast/url/segments-expected.txt: Updated results.
        * fast/url/segments-from-data-url-expected.txt: Ditto.

        * http/tests/security/javascriptURL/javascriptURL-execution-context-frame-location-htmldom-expected.txt:
        * http/tests/security/javascriptURL/javascriptURL-execution-context-frame-src-getAttribute-value-expected.txt:
        * http/tests/security/javascriptURL/javascriptURL-execution-context-frame-src-htmldom-expected.txt:
        * http/tests/security/javascriptURL/javascriptURL-execution-context-frame-src-setAttribute-expected.txt:
        * http/tests/security/javascriptURL/javascriptURL-execution-context-frame-src-setAttributeNS-expected.txt:
        * http/tests/security/javascriptURL/javascriptURL-execution-context-frame-src-setAttributeNode-expected.txt:
        * http/tests/security/javascriptURL/javascriptURL-execution-context-frame-src-setAttributeNodeNS-expected.txt:
        * http/tests/security/javascriptURL/javascriptURL-execution-context-iframe-src-getAttribute-value-expected.txt:
        * http/tests/security/javascriptURL/javascriptURL-execution-context-iframe-src-htmldom-expected.txt:
        * http/tests/security/javascriptURL/javascriptURL-execution-context-iframe-src-setAttribute-expected.txt:
        * http/tests/security/javascriptURL/javascriptURL-execution-context-iframe-src-setAttributeNS-expected.txt:
        * http/tests/security/javascriptURL/javascriptURL-execution-context-iframe-src-setAttributeNode-expected.txt:
        * http/tests/security/javascriptURL/javascriptURL-execution-context-iframe-src-setAttributeNodeNS-expected.txt:
        These tests had multiple test cases with embedded control characters. These URLs no
        longer qualify as javascript URLs, so there are no longer any unsafe JavaScript log
        messages for them. The test cases themselves need not be changed at this time.

        * http/tests/security/xssAuditor/embed-tag-control-char-expected.txt:
        * http/tests/security/xssAuditor/object-embed-tag-control-char-expected.txt:
        Updated expected results to reflect the fact that the control character is no longer
        stripped from the URL in these cases. The test is still valid, but these are not as
        interesting test cases any more since control characters do not have special handling.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@68854 268f45cc-cd09-0410-ab3c-d52691b4dbfc
79 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/replaced/object-param-spaces-expected.txt [new file with mode: 0644]
LayoutTests/fast/replaced/object-param-spaces.html [moved from LayoutTests/fast/replaced/object-param-url-control-char.html with 76% similarity]
LayoutTests/fast/replaced/object-param-url-control-char-expected.txt [deleted file]
LayoutTests/fast/url/query-expected.txt
LayoutTests/fast/url/script-tests/segments-from-data-url.js
LayoutTests/fast/url/script-tests/segments.js
LayoutTests/fast/url/segments-expected.txt
LayoutTests/fast/url/segments-from-data-url-expected.txt
LayoutTests/http/tests/security/javascriptURL/javascriptURL-execution-context-frame-location-htmldom-expected.txt
LayoutTests/http/tests/security/javascriptURL/javascriptURL-execution-context-frame-src-getAttribute-value-expected.txt
LayoutTests/http/tests/security/javascriptURL/javascriptURL-execution-context-frame-src-htmldom-expected.txt
LayoutTests/http/tests/security/javascriptURL/javascriptURL-execution-context-frame-src-setAttribute-expected.txt
LayoutTests/http/tests/security/javascriptURL/javascriptURL-execution-context-frame-src-setAttributeNS-expected.txt
LayoutTests/http/tests/security/javascriptURL/javascriptURL-execution-context-frame-src-setAttributeNode-expected.txt
LayoutTests/http/tests/security/javascriptURL/javascriptURL-execution-context-frame-src-setAttributeNodeNS-expected.txt
LayoutTests/http/tests/security/javascriptURL/javascriptURL-execution-context-iframe-src-getAttribute-value-expected.txt
LayoutTests/http/tests/security/javascriptURL/javascriptURL-execution-context-iframe-src-htmldom-expected.txt
LayoutTests/http/tests/security/javascriptURL/javascriptURL-execution-context-iframe-src-setAttribute-expected.txt
LayoutTests/http/tests/security/javascriptURL/javascriptURL-execution-context-iframe-src-setAttributeNS-expected.txt
LayoutTests/http/tests/security/javascriptURL/javascriptURL-execution-context-iframe-src-setAttributeNode-expected.txt
LayoutTests/http/tests/security/javascriptURL/javascriptURL-execution-context-iframe-src-setAttributeNodeNS-expected.txt
LayoutTests/http/tests/security/xssAuditor/embed-tag-control-char-expected.txt
LayoutTests/http/tests/security/xssAuditor/object-embed-tag-control-char-expected.txt
WebCore/Android.mk
WebCore/CMakeLists.txt
WebCore/ChangeLog
WebCore/GNUmakefile.am
WebCore/WebCore.exp.in
WebCore/WebCore.gypi
WebCore/WebCore.pro
WebCore/WebCore.vcproj/WebCore.vcproj
WebCore/WebCore.xcodeproj/project.pbxproj
WebCore/bindings/generic/BindingSecurity.h
WebCore/bindings/js/JSAttrCustom.cpp
WebCore/bindings/js/JSDOMBinding.cpp
WebCore/bindings/js/JSElementCustom.cpp
WebCore/bindings/js/JSHTMLFrameElementCustom.cpp
WebCore/bindings/objc/DOM.mm
WebCore/bindings/objc/DOMHTML.mm
WebCore/bindings/v8/custom/V8ElementCustom.cpp
WebCore/bindings/v8/custom/V8LocationCustom.cpp
WebCore/css/CSSHelper.cpp [deleted file]
WebCore/css/CSSHelper.h
WebCore/css/CSSParser.cpp
WebCore/dom/Document.cpp
WebCore/dom/Element.cpp
WebCore/html/HTMLAnchorElement.cpp
WebCore/html/HTMLBodyElement.cpp
WebCore/html/HTMLEmbedElement.cpp
WebCore/html/HTMLFrameElementBase.cpp
WebCore/html/HTMLImageElement.cpp
WebCore/html/HTMLImageLoader.cpp
WebCore/html/HTMLLinkElement.cpp
WebCore/html/HTMLMediaElement.cpp
WebCore/html/HTMLObjectElement.cpp
WebCore/html/HTMLTableElement.cpp
WebCore/html/HTMLTablePartElement.cpp
WebCore/html/HTMLVideoElement.cpp
WebCore/html/parser/CSSPreloadScanner.cpp
WebCore/html/parser/HTMLParserIdioms.cpp
WebCore/html/parser/HTMLPreloadScanner.cpp
WebCore/loader/FormSubmission.cpp
WebCore/loader/ImageLoader.cpp
WebCore/platform/chromium/ClipboardChromium.cpp
WebCore/platform/chromium/PasteboardChromium.cpp
WebCore/platform/qt/ClipboardQt.cpp
WebCore/platform/win/ClipboardWin.cpp
WebCore/rendering/HitTestResult.cpp
WebCore/rendering/style/RenderStyle.h
WebCore/svg/SVGAElement.cpp
WebCore/svg/SVGImageLoader.cpp
WebCore/wml/WMLAElement.cpp
WebCore/wml/WMLImageLoader.cpp
WebKit/mac/ChangeLog
WebKit/mac/DOM/WebDOMOperations.mm
WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm
WebKit/win/ChangeLog
WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp