2008-11-24  Julien Chaffraix  <jchaffraix@webkit.org>

        Reviewed by Darin Adler.

        Bug 22441: Bridge the gap between the generated ElementFactory and HTMLElementFactory
        https://bugs.webkit.org/show_bug.cgi?id=22441

        - Make the generated ElementFactory constructors return PassRefPtr instead of raw pointers.

        - Tweaked the generated files to better match our coding style.

        * dom/make_names.pl:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@38754 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2008-11-24  Jungshik Shin  <jshin@chromium.org>

        Reviewed by Darin Adler.

        For Unicode encodings other than UTF-8, use UTF-8 for
        form submission and URL query part encoding.

        See https://bugs.webkit.org/show_bug.cgi?id=21635

        Tests: http/tests/misc/submit-get-in-utf16be.html
               http/tests/misc/submit-get-in-utf16le.html
               http/tests/misc/submit-get-in-utf32be.html
               http/tests/misc/submit-get-in-utf32le.html
               http/tests/misc/submit-get-in-utf7.html
               http/tests/misc/submit-post-in-utf16be.html
               http/tests/misc/submit-post-in-utf16le.html
               http/tests/misc/submit-post-in-utf32be.html
               http/tests/misc/submit-post-in-utf32le.html
               http/tests/misc/submit-post-in-utf7.html
               http/tests/misc/url-in-utf16be.html
               http/tests/misc/url-in-utf16le.html
               http/tests/misc/url-in-utf32be.html
               http/tests/misc/url-in-utf32le.html
               http/tests/misc/url-in-utf7.html
 
        * html/HTMLFormElement.cpp:
        (WebCore::HTMLFormElement::formData):
        * loader/TextResourceDecoder.cpp:
        (WebCore::TextResourceDecoder::setEncoding):
        * platform/KURL.cpp:
        (WebCore::KURL::KURL):
        * platform/text/TextEncoding.cpp:
        (WebCore::UTF7Encoding):
        (WebCore::TextEncoding::isNonByteBasedEncoding):
        (WebCore::TextEncoding::closestByteBasedEquivalent):
        (WebCore::TextEncoding::encodingForFormSubmission):
        * platform/text/TextEncoding.h:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@38755 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2008-11-25  David Levin  <levin@chromium.org>

        Reviewed by Alexey Proskuryakov.

        Made the PreflightResultCache thread-safe in preparation for usage of XMLHttpRequest by
        Workers on threads.

        No observable change in behavior, so no test.

        * platform/text/PlatformString.h:
        * platform/text/String.cpp:
        (WebCore::String::substringCopy):
        * platform/text/StringImpl.cpp:
        (WebCore::StringImpl::substringCopy):
        * platform/text/StringImpl.h:
        Added the ability to copy a substring.

        * xml/XMLHttpRequest.cpp:
        (WebCore::PreflightResultCacheItem::PreflightResultCacheItem):
        (WebCore::PreflightResultCache::PreflightResultCache):
        (WebCore::PreflightResultCacheItem::addToAccessControlAllowList):
        (WebCore::PreflightResultCacheItem::parseAccessControlAllowList):
        (WebCore::PreflightResultCacheItem::parseAccessControlMaxAge):
        (WebCore::PreflightResultCacheItem::parse):
        (WebCore::PreflightResultCacheItem::allowsRequest):
        (WebCore::PreflightResultCache::shared):
        (WebCore::PreflightResultCache::appendEntry):
        (WebCore::PreflightResultCache::canSkipPreflight):
        (WebCore::XMLHttpRequest::makeCrossSiteAccessRequestWithPreflight):
        (WebCore::XMLHttpRequest::didReceiveResponsePreflight):
        Made the PreflightResultCache threadsafe.

        (WebCore::PreflightResultCacheItem::allowsCrossSiteMethod):
        (WebCore::PreflightResultCacheItem::allowsCrossSiteHeaders):
        Consolidation of duplicate logic.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@38756 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add bug URL to ChangeLog.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@38757 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Build fix. Use WebCore::Frame::loader instead of QWebFrame

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@38758 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2008-11-25  Darin Fisher  <darin@chromium.org>

        Disabling these newly added tests since they fail in some configurations.

        See https://bugs.webkit.org/show_bug.cgi?id=21635

        * http/tests/misc/submit-get-in-utf7.html: Removed.
        * http/tests/misc/submit-get-in-utf7.html-disabled: Copied from http/tests/misc/submit-get-in-utf7.html.
        * http/tests/misc/submit-post-in-utf7.html: Removed.
        * http/tests/misc/submit-post-in-utf7.html-disabled: Copied from http/tests/misc/submit-post-in-utf7.html.
        * http/tests/misc/url-in-utf7.html: Removed.
        * http/tests/misc/url-in-utf7.html-disabled: Copied from http/tests/misc/url-in-utf7.html.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@38759 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2008-11-25  Dean Jackson  <dino@apple.com>

        Add a new work-in-progress proposal for pointer-events in
        HTML content. Also note that the Media Queries extensions
        are not at all official.

        * specs/MediaQueriesExtensions.html:
        * specs/PointerEventsProperty.html: Added.
        * specs/index.html:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@38760 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2008-11-25  Antti Koivisto  <antti@apple.com>

        Reviewed by Mark Rowe.

        Fix https://bugs.webkit.org/show_bug.cgi?id=22483
        Assertion failure in CachedResource::makePurgeable during layout tests
        
        Deleting SVG image can re-enter destroyDecodedData.

        * loader/CachedImage.cpp:
        (WebCore::CachedImage::destroyDecodedData):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@38761 268f45cc-cd09-0410-ab3c-d52691b4dbfc
wx build fix - we don't support PurgeableBuffer on Leopard for now.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@38762 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2008-11-24  Gavin Barraclough  <barraclough@apple.com>

        Reviewed by Geoff Garen.

        Polymorpic caching for get by id chain.  Similar to the polymorphic caching already implemented
        for self and proto accesses (implemented by allowing multiple trampolines to be JIT genertaed,
        and linked together) - the get by id chain caching is implemented as a genericization of the
        proto list caching, allowing cached access lists to contain a mix of proto and proto chain
        accesses (since in JS style inheritance hierarchies you may commonly see a mix of properties
        being overridden on the direct prototype, or higher up its prototype chain).

        In order to allow this patch to compile there is a fix to appease gcc 4.2 compiler issues
        (removing the jumps between fall-through cases in privateExecute).
        
        This patch also removes redundant immediate checking from the reptach code, and fixes a related
        memory leak (failure to deallocate trampolines). 

        ~2% progression on v8 tests (bulk on the win on deltablue)

        * bytecode/Instruction.h:
        (JSC::PolymorphicAccessStructureList::PolymorphicStubInfo::):
        (JSC::PolymorphicAccessStructureList::PolymorphicStubInfo::set):
        (JSC::PolymorphicAccessStructureList::PolymorphicAccessStructureList):
        (JSC::PolymorphicAccessStructureList::derefStructures):
        * interpreter/Interpreter.cpp:
        (JSC::countPrototypeChainEntriesAndCheckForProxies):
        (JSC::Interpreter::tryCacheGetByID):
        (JSC::Interpreter::privateExecute):
        (JSC::Interpreter::tryCTICacheGetByID):
        (JSC::Interpreter::cti_op_get_by_id_self_fail):
        (JSC::getPolymorphicAccessStructureListSlot):
        (JSC::Interpreter::cti_op_get_by_id_proto_list):
        * interpreter/Interpreter.h:
        * jit/JIT.cpp:
        (JSC::JIT::privateCompileGetByIdProto):
        (JSC::JIT::privateCompileGetByIdSelfList):
        (JSC::JIT::privateCompileGetByIdProtoList):
        (JSC::JIT::privateCompileGetByIdChainList):
        (JSC::JIT::privateCompileGetByIdChain):
        (JSC::JIT::privateCompilePatchGetArrayLength):
        * jit/JIT.h:
        (JSC::JIT::compileGetByIdChainList):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@38763 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add Geolocation support to the configure.ac

Add an option to build WebKit/Gtk+ with Geolocation. The
implementation will be using Gypsy.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@38764 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add GeoleocationServiceGtk stubs and integrate it into the buildsystem

Add stubs for a Gtk Implementation.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@38765 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Better wx build fix - support PurgeableBuffer on Mac.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@38766 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2008-11-25  Cameron Zwarich  <zwarich@apple.com>

        Reviewed by Maciej Stachowiak.

        Remove the unused member function JSFunction::getParameterName().

        * runtime/JSFunction.cpp:
        * runtime/JSFunction.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@38767 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2008-11-25  Chris Marrin  <cmarrin@apple.com>

        Reviewed by Darin Adler

        https://bugs.webkit.org/show_bug.cgi?id=22046

        Fix a crash when an animation or transition end event handler
        removes the element upon which the transition/animation is running,
        by keeping a reference to the AnimationBase object on the stack.

        Tests: animations/transform-animation-event-destroy-element.html
               transitions/transform-transition-event-destroy-element.html

        * page/animation/AnimationBase.cpp:
        (WebCore::AnimationBase::setChanged):
        (WebCore::AnimationBase::updateStateMachine):
        * page/animation/AnimationBase.h:
        (WebCore::AnimationBase::clearRenderer):
        * page/animation/AnimationController.cpp:
        (WebCore::AnimationControllerPrivate::clear):
        * page/animation/CompositeAnimation.cpp:
        (WebCore::CompositeAnimationPrivate::~CompositeAnimationPrivate):
        * page/animation/CompositeAnimation.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@38768 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2008-11-25  Julien Chaffraix  <jchaffraix@webkit.org>

        Reviewed by Eric Seidel.

        Bug 22441: Bridge the gap between the generated ElementFactory and HTMLElementFactory
        https://bugs.webkit.org/show_bug.cgi?id=22441

        Element's other than HTML ones take a QualifiedName in their constructors.
        To make HTMLElementFactory closer to the other ElementFactory, we need
        to make them take the same arguments.
        This patch only makes the 5 first one in HTMLElementFactory abide by that. The others
        will go into the next patch.

        * dom/Document.cpp:
        (WebCore::Document::implicitClose):
        * html/HTMLBaseElement.cpp:
        (WebCore::HTMLBaseElement::HTMLBaseElement):
        * html/HTMLBaseElement.h:
        * html/HTMLBodyElement.cpp:
        (WebCore::HTMLBodyElement::HTMLBodyElement):
        * html/HTMLBodyElement.h:
        * html/HTMLElementFactory.cpp:
        (WebCore::htmlConstructor):
        (WebCore::headConstructor):
        (WebCore::bodyConstructor):
        (WebCore::baseConstructor):
        (WebCore::linkConstructor):
        (WebCore::metaConstructor):
        * html/HTMLHeadElement.cpp:
        (WebCore::HTMLHeadElement::HTMLHeadElement):
        * html/HTMLHeadElement.h:
        * html/HTMLHtmlElement.cpp:
        (WebCore::HTMLHtmlElement::HTMLHtmlElement):
        * html/HTMLHtmlElement.h:
        * html/HTMLLinkElement.cpp:
        (WebCore::HTMLLinkElement::HTMLLinkElement):
        * html/HTMLLinkElement.h:
        * html/HTMLMetaElement.cpp:
        (WebCore::HTMLMetaElement::HTMLMetaElement):
        * html/HTMLMetaElement.h:
        * html/HTMLParser.cpp:
        (WebCore::HTMLParser::handleError):
        (WebCore::HTMLParser::headCreateErrorCheck):
        (WebCore::HTMLParser::createHead):
        (WebCore::HTMLParser::finished):
        * html/HTMLViewSourceDocument.cpp:
        (WebCore::HTMLViewSourceDocument::createContainingTable):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@38769 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2008-11-25  Pierre-Olivier Latour  <pol@apple.com>

        Reviewed by Mark Rowe.

        createFontCustomPlatformData() crashes if CGFontCreateWithPlatformFont() returns NULL

        https://bugs.webkit.org/show_bug.cgi?id=22503

        * platform/graphics/mac/FontCustomPlatformData.cpp:
        (WebCore::createFontCustomPlatformData):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@38770 268f45cc-cd09-0410-ab3c-d52691b4dbfc
        Windows build fix.

        * DumpRenderTree/cg/ImageDiffCG.cpp:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@38771 268f45cc-cd09-0410-ab3c-d52691b4dbfc
        Windows build fix.

        * DumpRenderTree/cg/PixelDumpSupportCG.h:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@38772 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Reviewed by Sam Weinig.

Fixes: https://bugs.webkit.org/show_bug.cgi?id=22477

A WMLTaskElement checks wheter it's parent is an <anchor>/<do>/<onevent> element, and calls registerTask(this) on the parent.
Add a isWMLTaskElement() function to WMLElement, making it possible to cast to WMLTaskElement directly.

Add WMLEventHandlingElement class, inheriting from WMLElement, to serve as common base WMLTemplate/Option/CardElement,
centralizing the eventHandler() / createEventHandlerIfNeeded() implementation. Add a isWMLEventHandlingElement()
function to WMLElement, so WMLOnEventElement can create event handlers, without knowing wheter it's a
<template>/<option> or <card> element.

Add complete <onevent> support.


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